Chrome ARC SDCard Location - google-chrome-arc

When you add your apk to ARC on a PC and enter
{"enableExternalDirectory": true}
it will prompt you for the local directory that you want to use as your SDCard location. After the user selects that directory, where does ARC write that value (the folder path)? I looked in Manifest.json but it didn't have the selected folder path, it just has "enableExternalDirectory": true, but not the folder path the user chose. Is there a config file somewhere that has it?

After you choose your apk, modify the Additional Metadata as {"enableExternalDirectory": true},then test your app, a file browser will open, then select the dictionary.

Related

Docker for Windows: No permissions over folders inside `C:\ProgramData\Docker`

I'm not sure since which version, but the permissions for the files and subfolders inside the C:\ProgramData\Docker folder have changed. I'm not able to display the current owner and I'm not able to delete the contents of the volumes anymore.
Below image shows the permissions over the plugins folder, but every file and folder inside C:\ProgramData\Docker is showing the same thing.
The current user is a member of the groups Administrators and docker-users.
Is this a known issue for anyone and is there a nice way to fix this?

How can I download the large file from google drive using rclone?

Now I want to download the dataset on the website(http://pubchemqc.riken.jp/), it's in google drive and filesize is 2TB. the website recommend using rclone to download the file but not said how to use.
As the picture shows
This was asked a while back already but I'd like to keep it recorded here as it seems hard to find.
Unfortunately I don't know if there's a way to automate this process but it's still easy.
What you can do is create a new remote with the link's root_folder_id.
The Root Folder ID is present in the url e.g:
in the example link
https://drive.google.com/drive/folders/a1b2c3deFgHi4JKlm56nOpqrStuv7w8xy9
the root_folder_id is the string after the slash /folders/ so in this case it would be "a1b2c3deFgHi4JKlm56nOpqrStuv7w8xy9". If the Google Drive shared link you got is a folder all you have to do is copy that id and use it in the rclone's new remote setup. Now if the shared link points directly to a file, like the one in the OP, there's no folder to download it from, so we gotta create our own! The whole process would look like:
get the folder_id from Google Drive's link. If it is a link to a direct file then first we have to create a new folder anywhere inside our own Google Drive, it's name doesn't matter as we will point directly to it using the ID. After creating this new folder, open it and note the url, it should look something like
https://drive.google.com/drive/u/1/folders/Fdrcv3nQvxQqXUGEEyvacwUxdYXpV33Ct
just copy everything after /folders/ and save it for later.
now go back to the link of the direct file. Add a shortcut for that file to inside your recently created folder, so say the folder was named dl-with-rclone, click the "Add shortcut to Drive" icon and navigate to the "dl-with-rclone" folder to add the shortcut there.
heading to rclone, do:
rclone config <to open settings>
On the prompt e/n/d/r/c/s/q> hit n (the key relative to creating a new remote)
On name> give it a name like sharedWithMe or anything else for personal reference later
On the prompt Storage>, the possible remotes to connect to, write down drive or the number relative to it (currently 15)
if you set up your own client_id and client_secret you put them next
On the scope> prompt option 2 "Read-only" is enough
now this is the important one:
on the root_folder_id> prompt input the ID of the folder of the shared link or the folder you created and pointed the file shortcut to, e.g. Fdrcv3nQvxQqXUGEEyvacwUxdYXpV33Ct
Now you can pretty much hit enter for everything, once you reach Use auto config? you will be redirected for a browser to login. Make sure the logged in account is the same that you created the folder for the shortcut. If the shared link is for a folder already your logged in account doesn't matter.
After finishing your remote setup you can exit rclone config
The command you would need would be something like rclone copy sharedWithMe: destination/folder
This being rclone you would surely be able to copy from one remote to another, that's up to the user.
In summary: I did test this method on your link, creating a folder in my Drive, pointing the file shortcut to it and using the root_folder_id to setup the rclone remote and it did begin to download:
rclone test download screenshot

equivalent of "Go to Folder window" in windows, to access a file in a windows open prompt located somewhere else from the current directory?

I am used on OSX to use CMD-Shift-g to open a Go to Folder window. What fundamentally does, is to open a file in a location without me using the mouse to navigate to a different directory. I paste the path of a file, like if I am loading a PSD in Photoshop, and I can load the file, independently from where my current directory is pointing at.
Is there an equivalent to this in Windows? Like if I have a file open prompt in Photoshop (or any other windows app, for what matters), that is pointing at my desktop, while my file is in some other location, and I can pass the full path of the file, like I do on OSX with the go to folder window?
I found a "workaround". Windows fundamentally accept in the file name textfield, the full path too; so if you are on desktop for example, and in the file name field you type the full path of the file, it will in fact change the current directory to the full path you pass.
Works in a similar way but without the need to call a window to just change the path.

How to open file using path inside user-selected file in sandboxed app

I am trying to write an import of a 3rd party file format in my macOS sandboxed app. The file the user opens is a Json document, and inside this document is a url pointing to some required external data file. In this case it is the relative path to a local binary data file. I can create an absolute path to this file but I cannot open it with [NSData datawithcontentsoffile: path] because my app is sandboxed (on macOS App Store). If I turn off sandbox then I can open the external binary file.
What are some good strategies to open the external file in a sand boxed app? I’m thinking of opening a second nsopenpanel and asking the user to select the other file, but that seems awkward.
I found no solution other than to open a second nsopenpanel and ask the user to select the folder containing the json document. Once I had permission for the folder I could open any file given in the json document as long as it is in the same folder or subfolders of the json document.
There is only one difference between a sandboxed app and not I can think of - if an app is sandboxed then the home directory points to the app’s sandbox, otherwise it points to the user’s home directory on the file system. Therefore, when creating a file path consider using URLsForDirectory:inDomains: method of NSFileManager class returning a directory’s location.

Image cannot be loaded - Javafx

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

Resources