I am trying to download two text files by the 'Download_Files' button.
I am facing below problems :
In the getFiles() function, if I comment out the webix.message, only the second file is getting saved. How can I save both the files into that function without the webix.message?
Is it possible to download them into a folder ?
Snippet is here : https://snippet.webix.com/a0qpcpxx
Thanks.
(1)
Your code works correctly for me. Still, you can try to make some delay between two downloads
webix.html.download(blob1, "file1.txt");
setTimeout(function(){
webix.html.download(blob2, "file2.txt");
}, 100);
(2)
There is no way to control the target folder for downloaded files
That is default browser behavior, files always are downloaded into the "Downloads" folder or into folder selected by the user
Related
I am relatively new to R studio, I am attempting to import a .RNK file to run on GSEA. However, the pathway to my working directory is lost and I keep receiving a file, "rt" warning message.
When comparing my working directory with my usual windows explorer file, the files themselves are absent from the working directory.
I have attempted to change the Default text encoding to UTF-8 but this has had no effect. I would be grateful for any suggestions to help with this problem?
That is a very common problem!
You have four options to select the correct file and path! Hope at least one can work well.
Manually without code, you can go to the top and choose Session->Set Working Directory -> Choose Directory... and then select the file.
You can just use the function file. choose() and look for the file on your computer and select it.
You can look for the file path on your computer and write it in R. Look in the local search engine for your computer and search for the file. For example: setwd("~/Desktop/University/Homework")
You can use getwd() in the console to know where the script is working and saving the files and then look for the files there!
PD: the best way to work in R and R-Studio/Posit for me is by creating a project. Doing so, you will have everything related to the script in one folder (new and old files!). It is similar to setwd()but better!
In MacOS i want a folder action to trigger when i place a new file into a subfolder. The action should grab a newly added file to the folder and copy it to another folder where all the latest files are collated and can be viewed together. I also want the script to delete any old version of the same file it copies across to the collated folder. The trouble is the file names are slightly dfferent as they have a version number in them. The version number is defined as "v01a" to start with but can change to "v01b" or "v01e" or "v02a" or "v03c".
So if a file called "1234_ProjectName_Image01_COMP_v01a.jpg" already exists and a new file called "1234_ProjectName_Image01_COMP_v01b.jpg" is added the the file called "1234_ProjectName_Image01_COMP_v01a.jpg" needs to be deleted from the destination folder.
I've tried a few times to get started in automator but never really get the pieces in place for it to be useful.
(SOURCE)
Dailies/_Internal
Dailies/_Internal/Image01/1234_ProjectName_Image01_COMP_v01a.jpg
Dailies/_Internal/Image02/1234_ProjectName_Image02_COMP_v01a.jpg
Dailies/_Internal/Image03/1234_ProjectName_Image03_COMP_v01a.jpg
(DESTINATION)
Dailies/_Latest
Dailies/_Latest/1234_ProjectName_Image01_COMP_v01a.jpg
Dailies/_Latest/1234_ProjectName_Image02_COMP_v01a.jpg
Dailies/_Latest/1234_ProjectName_Image03_COMP_v01a.jpg
If a new file is added called
Dailies/_Internal/Image01/1234_ProjectName_Image01_COMP_v02a.jpg
then this file is copied from its source folder and put into the Destination folder.
(DESTINATION)
Dailies/_Latest
Dailies/_Latest/1234_ProjectName_Image01_COMP_v01a.jpg
Dailies/_Latest/1234_ProjectName_Image01_COMP_v02a.jpg
Dailies/_Latest/1234_ProjectName_Image02_COMP_v01a.jpg
Dailies/_Latest/1234_ProjectName_Image03_COMP_v01a.jpg
Here there is already an image with the same name except the version number so the script should also delete the old file leaving me with.
(DESTINATION)
Dailies/_Latest
Dailies/_Latest/1234_ProjectName_Image01_COMP_v02a.jpg
Dailies/_Latest/1234_ProjectName_Image02_COMP_v01a.jpg
Dailies/_Latest/1234_ProjectName_Image03_COMP_v01a.jpg
I can't for the life of me figure out how to do this, any ideas would be greatly appreciated.
Screengrab of my very basic automator here
I`m trying to load image with code:
Image image = new Image(AddOrderController.class.getResourceAsStream("/resources/icons/ok_icon.png"));
And I receive exception:
java.lang.NullPointerException: Input stream must not be null
The tree of my project is simple:
When I'm adding ok_icon.png to package controller everything is ok and icon works, but in resources/icons the icon can't be loaded. Can anyone help me how to remake the code?
Since you have src/test/resources as a source folder, the contents of resources will be deployed as part of the application, to the root of the classpath. That means that icons is in the root of the classpath.
You can verify this by checking the contents of the output folder, which I'm guessing is target/classes, using the system file browser (Finder on a Mac, or Windows explorer, or whatever it is called these days). You can verify the output folder in Eclipse by choosing "Project" from the menu, then "Properties", select "Java Build Path", select the "Source" tab, and see what is specified as the "Default output folder".
If the path you supply to getResourceAsStream begins with a leading /, then the path will be interpreted relative to the classpath. So
Image image = new Image(AddOrderController.class.getResourceAsStream("/icons/ok_icon.png"));
should work.
Looks like you have to go one directory up first:
Image image = new Image(AddOrderController.class.getResourceAsStream("../resources/icons/ok_icon.png"));
if that doesn't work neither, check if the two source folders (src) are really the same or if they have a different parent folder
I have saved a complete webpage and there is also one folder saved with resources but when I delete webpage or move saved webpage to other directory then the folder associated with it also gets deleted or moved. So what is the code written behind it. Because I want to do same with my webpage and folder.
Thanks in advance for you kind help.
This "association" between the HTML file and its resources folder is a behaviour implemented by the Windows operating system.
It has nothing to due with a webpage in particular, with its HTML, JavaScript, or even with a particular browser.
Windows 2000 provides a simple way to connect a primary HTML file to its group of associated files. If Connected Files is enabled, when you perform any of the commands [Copy, Cut, Paste, Move, Delete, Send To] on a file or folder of associated files, the same command is performed on all connected files.
Even though the official page mentions "Windows 2000", the same behaviour is implemented in Windows XP and many (if not all) later versions of Windows.
See these pages:
Removing file / folder link after using “Save As…” then “Web Page, complete”
Operations on an HTML file or folder apply to similarly named folder or HTML file (from Microsoft support)
At least I finished developing a new windows gadget.
I zipped it and removed the ".zip", so that it's a valid ".gadget"-file now.
When I execute this file the install-dialog pops up, i click "install" but nothing happens.. Any suggestions? When i copy the extracted (not zipped) Windows gadget into "C:\Users\Username\AppData\Local\Microsoft\Windows Sidebar\Gadgets", I can use it successfully, but the way I descriped before isn't possible..
Sounds like you may have zipped up one folder too many.
If you zipped up "gadget_name.gadget" then, if you executed this it would not install.
You need to go into the gadget.gadget folder and zip up them files. For example in that folder you may have 2 folder labeled EN-US and Images. you need to zip them up from there and when save them as "gadget_name.gadget", change the extension from .zip to .gadget.
It may be a late reply but it might be helpful.
Check there are no empty folders in your gadget zip.
Also ensure you have the correct Directory structure Eg,
mygadget.gadget\gadget.xml
Not
mygadget.gadget\mygadget\gadget.xml
If you could post the gadget zip file it could also be helpful.