Where does Electron save previous zoom? - electron

Electron appears to remember what the zoom factor when restarting the app - where is this saved? I want to be able to reset this.
Thanks!

The zoom factor information for each browser window is memorized in a JSON file named Preferences located in the user data directory accessible through app.getPath ('userData');
If the zoom factor is different from its default value 1.0, it will be listed at the end of the JSON file (after the DevTools settings), associated with the window's URL. You may find the whole relevant syntax quite odd though...

As a user said, you must find Preferences file in C:\Users\<<username>>\AppData\Roaming\<<package name>>. I tried to change zoom value firstly but it didn't work. After I tried to change per_host_zoom_levels to 0 and it works.
So if you want to manipulate zoom from saved file, you must change per_host_zoom_levels.

I'm not sure about this, but could be in:
C:\Users\**<name>**\AppData\Local\Temp
and then in a folder relative of the name of the app.

The file structure should be C:\Users\%YOUR-USER%\AppData\Roaming\%YOUR-APP%\, edit the Preferences file with an editor (I used notepad), look for {per_host_zoom_levels": {"%SOME-NUMBER%":{%HERE%}}}. At the %HERE% part will have the zoom preference, delete the contents to reset and so that {per_host_zoom_levels": {"%SOME-NUMBER%":{}}} remains. Can augment to have different values as well. Hope it helps for future readers!

Related

Dropbox iOS SDK "Broken"?```

I am trying to use the latest official version of the DropBox iOS Core SDK, in particular the DBRestClient, to efficiently keep a document tree up to date on my local computer. However, several features of the SDK don't seem to be implemented as you'd expect, and I was wondering whether I am doing something wrong, failing to understand something, or on the other hand just looking for features that aren't there.
Dropbox has (at least?) two kinds of entities it stores: files and folders. If I make a change to a file in Dropbox, I can detect it by a change in the file's "rev" string.
However, for folders, the rev string doesn't change when the contents changes. For example, it doesn't change in response to any of the following:
Adding a file
Deleting a file
Editing a file
Question 1:
Is this the expected behavior ? If so, does that mean that when I want to know if any of my Dropbox files have changed I must walk through the entire folder tree every time ?
Deltas:
There is a command to get a "delta" of the current contents (of something, the command takes no path parameters) related a "cursor" string. The command looks like it is supposed to return a record of edited files/folders along with a new "cursor" string specifying the current state. However, when I get the delta, the contents are always empty. If I make a change in dropbox, and then send back the previous returned "cursor", I still get an empty delta.
Question 2:
Are deltas currently working in the SDK, and if so can anyone tell me what I am doing wrong ?
Question 1: Yes, that's the expected behavior. Typically you would use delta to watch for changes.
Question 2: Yes, I would assume that delta is working. You haven't shown any code, so it's impossible to guess what's going wrong.

RoR: Get file (attachment) name/location

In my app I want users to be able to associate a file(s) they have on their desktop/DropBox with a specific item, but I don't want/need them to be able to actually attach the file...I just want to get the file name and location and save that in my database. Then when I display the item I'll hyperlink to the location captured. Can someone point me to an example(s) of how to accomplish this? I looked at the JQuery File Upload (http://blueimp.github.com/jQuery-File-Upload/) but as I mentioned don't actually need to upload the file...so this should be something super easy.
Thanks for your time and assistance.
You can try and get value of file input, but you'll fail.
See this jsfiddle.
All I'm getting is the fake path
C:\fakepath\134.png
And there's certainly no C:\ drive on Mac OSX. :)
I guess, this is because of security restrictions. You shouldn't know (or care) about user's filesystem in a web app.

How to set permission for Folder in Blackberry ?

I want to know how to set permission for folder that is created by my app so no one can delete or see that folder.
I think this is not 100% possible, however you may do smth in this direction. Check for FileConnection.setHidden(boolean), FileConnection.setWritable(boolean) and FileConnection.setReadable(boolean).
First of all, the API docs are vague as to whether those methods will have any effect at all on a specific device (meaning a file system).
Secondly, even if you use FileConnection.setHidden(boolean), then it is still possible for another app to "see" your file/dir by using FileConnection.list(String filter, boolean includeHidden). Once one has a path of you hidden dir, he/she can change the hidden attr (and other attrs), so it becomes visible/readable/killable.

I want to widen the left viewer in rails.vim

I use rails.vim which is great. One thing that annoys me is that every time I open a file, the left window (directory viewer) is set to its default width(24 cols). It's too narrow to see the file path. Even if I widen it, it comes back to its default size when I open a file.
How can I change the default size? Or for better, how can I prevent it from auto-resizing?
I don't think the rails.vim plugin has a directory viewer -- my best guess would be that you're actually seeing NERDTree's directory viewer.
Try adding this to your ~/.vimrc file to set a custom width:
let g:NERDTreeWinSize=40

Custom icons in sharepoint 2007 document library view

I need to change the folder icon in a sharpoint document library view.
The catch is, the folder icon is dependent upon various folder properties. So, I need a specific icon for specific folders (I just don't want to change the folder icon across the board).
My initial thoughts were, that if I could find the page (xml or aspx) that sharepoint uses to generate the img tag, I would modify the source to be something like:
src="/GetFolderIcon.aspx?fn={FolderNameHere}"
Where {FolderNameHere} is the actual folder name. Then, in GetFolderIcon.aspx, I would look up the various folder properties, and determine which .gif or .jpeg I needed to send back to the browser.
The problem is, I don't know where that page is located, or what it's even called.
I don't know if that's the correct approach or not, but that's my current thoughts.
Any suggestions on how to do this?
Thanks!
here is a tutoral on something very similar.
http://blog.pathtosharepoint.com/2008/09/01/using-calculated-columns-to-write-html/

Resources