I want to observe mutations of the DOM on a dynamic webpage, specifically the value of one div.I don't want to repeatedly download the webpage and search for this value, as it seems inefficient. I would like to display this value inside another program. What are my options to communicate with another program from inside a Chrome extension ?
One idea that came to my mind is this one: install a local Web server and grab POST values sent to PHP script from the Chrome extension. Then I could write to the filesystem, and observe a specific file.
Is there another way to do this ?
Related
I am trying to create a unique id and attach it to a LabVIEW file so that later I can read back that id and know I am looking at exactly the same file. I must be able to generate the id and read it back programmatically. The information must be hidden from the user accessing the file and persist across operating systems and storage mediums.
I was thinking of just adding it into the file 'comment' section, but it appears the Windows no longer supports file comments.
Any ideas?
I would suggest using the Set Tag method on the VI (with persistence) and saving multiple copies of the VI using the Save Instrument method, where each copy would then have its own unique value of the tag. Note that the method is defined as a scripting method, so you would probably need to enable scripting in the LV options to access it.
I don't think there's any API for enumerating tags, so there would be no way to find the value unless you know what the tag is called. Obviously, it's encoded somewhere in the VI file itself, and presumably it would be possible to extract a list of tags if you know the structure of the file, but that's not knowledge I would expect most students to have.
I'm not sure if you can call the set tag method from Python using an external connection to VI server, but certainly the LV code for this should be pretty simple - basically a for loop with ID generation, a couple of method calls and saving a CSV file so you can keep track of which ID belongs to which student. If you use existing IDs, you don't even need to generate and save the IDs.
I would like to upload file programatically to my jsf application. The user should select a directory on his system, and a js script should loop on any file in dir and send each one to the listener serverside
I cannot use FileUpload, because it cannot select a whole dir with thousands of file, so I was thinking to use jquery and send the file to a remotecommand, but I have no clue to how send the file itself (normally I pass just string)
so I was thinking to use jquery and send the file to a remotecommand, but I have no clue to how send the file itself
Don't go there. It is a bad attempt to a workaround for a bad design choice. You'd most likely run into similar problems and what about the user selecting a lot of files for second time if it fails halfway? It might become slow, might run into browser limits (search for uploading multiple files in plain html)...
If you still want to do it via a webbrowser (which according to one of your other questions you do not want to), maybe try something like https://webdeltasync.github.io/ (disclaimer: I did not use it myself, and there might be similar ones (https://www.google.com/search?q=browser+based+rsync), it is just a hint in which direction to find a real solution)
I am trying to set up tabulator with all it's data validation goodness and simple to use UI in order to help a colleague with CRUD operations on a .txt file he has to do on a daily basis.
I found that tabulator can load data using AJAX but my question is, is it possible to load the data from a .csv/.txt file and then save to the same file?
I know you can export to .csv but without overwriting the loaded data, next time all his work would be lost.
If you are referring to a file on a users local computer then im afraid there is no import from file functionality built in to tabulator, but there is nothing to stop you implementing that bit your self.
The link below is a link to an article that explains how to load a CSV file from an input element in JavaScript,. In the example it loads it into an HTML table, but you could easily alter that to dump it into an array of objects to pass into Tabulators setData function
http://codeanalyze.com/Articles/Details/20174/Read-CSV-file-at-client-side-and-display-on-html-table-using-jquery-and-html5
In terms of saving the data back to the users computer, you would need to use the built in download function, there is no way to save it back to the users computer without the file popup due to browser safety constraints.
But i will add that the above approach is a bit unorthodox. The usual way to handle data persistence would be to save the data back to your server into a database, and then load it back to the client with an ajax request, giving the user the option to download the data when they want the final copy
I want to implement pdf printing from windows machine to Linux. I am using CUPS pdf in linux and driver installation in Windows.
Furthermore, I want to pass some custom parameters with printing like Full name of sender, receiver name, mobile No: to send SMS as Pdf reached etc. (I will use a custom print dialog to fetch these parameters with pint dialog.) How do I pass these along with the printing? How I can I handle this in linux side? What is the easy method for that?
I'm not good in PostScript or Ghostscript. If thats the only solution then I will try. Any alternate solution to pass custom variables from windows to linux printer also welcome.
I didn't get exact help for this , but I achieved this one by 2 printing. Initially printed custom parameters with reference of the next document. Then printed next document. Linux side parsed pdf using shell scripts.
I'm developing an App which works like Dropbox. I want to dynamically change the emblem of a file during synchronization. Like this:
Is there any solution to this with Qt/C++?
You do not need Qt for doing this. But you will need C calls to do it.
You can create an extension for Nautilus and use NautilusInfoProvider and NautilusFileInfo, in
particular nautilus_file_info_add_emblem().
If you implement NautilusInfoProvider and register your extension, then, Nautilus will
call nautilus_info_provider_update_file_info. There you can implement the logic to check the file status and set the icon properly (with nautilus_file_info_add_emblem()). However, I would recommend you to call that function when the application is idle.