Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Is there a way to revert all the documents in a folder to the revision at a certain time? I see how to do it for individual files, but how would I do it for an entire folder?
I had the same problem, so I wrote this script to restore any dropbox folder to its state as of a given date:
https://github.com/clark800/dropbox-restore
You have several options:
If you've recently done something that has modified a large bunch of files in your Dropbox and you want to revert all those changes, you can contact the support staff at Dropbox to have the modifications rolled back. See https://www.dropbox.com/help/400/en for details. Based on discussions in the Dropbox forums, it seems like they are also willing and able to restore any given folder to an arbitrary date, as long as it is within the bounds stored by Dropbox (30 days for a basic account; for accounts with the packrat feature all the way back to when packrat was activated).
You could use the script written by clark800, linked to in a separate answer to this question. I haven't used it so cannot vouch for it, but many seem very happy with it!
If you are on a Mac (OS X 10.7 or later), you can try out a new app called Revisions (available at https://www.revisionsapp.com) that I've been working on. The app allows you to select any folder in your Dropbox and shows you a timeline of all edits for that folder. Then, you can choose to restore or download any version of any single file, or restore or download an entire folder (including any subfolders) to its state at any desired point in time (subject to the Dropbox bounds stated above).
To my knowledge restoring to a particular revision is limited to a per file operation. It would be possible to accomplish what you are looking for using their REST API however it would require custom code.
If you don't want to use a script, Dropbox does allow you to select multiple files at the same time and restore them (if you login to your account online). Right click and select 'Show deleted files' first. Then if it's just a few folders, either select the files individually by holding down 'Ctrl' and selecting them, or using 'Ctrl' and 'A' to select them all. Then right click and select restore.
Related
I have looked everywhere for the answer but couldn't find it. What I am trying to do is take a folder of Google Drive and put it into my image list. The folder is a shared folder so I am uncertain if I can just use the Google Drive folder on my computer that is used for syncing to my Drive.
Accordingly to the comment posted by #jmcilhinney.
This is a classic case of a question that needs more focus, i.e. it's
really a combination of multiple questions. Creating and populating an
ImageList is the same no matter where the images come from. Your
question is whether multiple machines can see the same cloud drive,
which probably doesn't even have anything to do with VB.NET or
programming at all. If you can map that folder locally on two machines
then you have your answer about whether multiple users can see the
same folder. If you can access any file in that folder in VB.NET then
you know that your app can do that. That's it done.
I'm currently starting a project right. One of the requirements is to read details of a "Cheque" .Meaning to say, the app should be able to read the account number, amount, etc of a certain "Cheque".
There is a similar question here
I tried something ago and works fine. Check the open source project called tesseract and also a demonstration here (with source code)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have encountered a bug where using gradients sometimes randomly corrupts the illustrator file. When I open it I see the bug popup (yeah, I use Polish-localized version of Illustrator CC).
The bug report states something along:
Can't open the illustration. The illustration contains an invalid operation argument.
Offending Operator: Bd
Content:
%AI5_EndGradient
%AI5_BeginGradient:
I am using Windows 8.1. How can I recover my file?
You can follow the steps outlined in on that adobe page even though it states it's only for Illustrator CS2-CS5 it will work for CC as well.
The file location for Windows 8 is:
C:\Users\[ username ]\AppData\Roaming\Adobe\Adobe Illustrator 17 Settings\[localisation code]\[version]\
localisation code for Poland will be pl_PL, but don't worry about that, there will most probably be just one folder in the Adobe Illustrator 17 Settings.
version either x64 or x86, choose the one you are using
The file you are looking for has also localised name for Polish it's: Preferencje programu Adobe Illustrator for other localisations it will be some translation of Adobe Illustrator Preferences
in section:
/aiFileFormat {
/PDFCompatibility 1
enableATEReadRecovery 0
/enableContentRecovery 0
/enableATEWriteRecovery 0
/clipboardPSLevel 3
}
Set the enableContentRecovery flag to 1 /enableContentRecovery 1
Then follow the "Starting Document Recovery" section from the link.
When you have the _[your filename].ai file you need a huge text file editor so that you can remove offending operators. I have used 010 editor which has a 30 days trial.
Open the file and search (ctrl+F) for the offending content, it's a markup language so you have to remove whole sections between %AI5_BeginGradient: [your gradient name] and %AI5_EndGradient.
Remove one gradient.
Save the file in your text editor.
Try to open it in illustrator. (notice that the error message changes, if it doesn't try to look for the exact same name and remove it's section).
Rinse and repeat until it opens.
I've had an ongoing neglected question on Expert's Exchange that I would love to finally have answered. Here's the link:
My Expert's Exchange question
My objective is to return a list of every Access file that the user has open at any one time. The site includes a complete set of code to retrieve all open Excel and Word files as an array of those application objects. I've tried everything I know to solve this problem and am poised to pay Microsoft Tech Support to help me answer this question, if no one on the forums is forthcoming with an answer.
The solutions you link for Excel and Word function by looking for instances of those programs running, and using their known COM interface to find the files they have open.
With Access, other things can open the files as well. For example, a C# program or SQL Server import wizard could also have the files open.
A general solution would be rather tricky. However, if you can be sure that the files have the usual extensions, you could enumerate all files that are open in the system and return a list of those that have an appropriate file extension.
To enumerate all open files in the system, see the EnumerateOpenedFiles() method in this article
http://www.codeproject.com/KB/shell/OpenedFileFinder.aspx?fid=422864&df=90&mpp=25&noise=3&sort=Position&view=Quick&fr=26&select=2277170
Note that you don't need all of the code there, as it presents a shell extension that calls EnumerateOpenedFiles() as part of it's operation. You only need that one method, modified to return only files matching the desired file extensions.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I have a simple "post" AR class/table. Its based on the "blog tutorial" so it serves the same purpose.
I want to be able to embed images into posts. My design was as follows and I wasn't entirely happy with it so I'll be happy for your feedback:
Design suggestion: Directory protected/data/posts_files/{post_id} would be the repository of posts "resources" (images in our case, but can be anything). Post authors need to put the used images/files in the right location (after the post is created since its id is needed). My needs are really humble so from convenience point of view this is ok. When a post that include such images is requested, CAssetManager will be called to the rescue, to "publish()" the directory of that post (e.g. protected/data/posts_files/17).
In the posts themselves (in their "content" or "body" - which ever term you prefer), images will be embedded with img tags that the src attribute pointing to the published directory for this post_id in the assets folder (for example, after publishing a specific post, WEBROOT/assets/d379e294/some_image.gif).
Problem is that when the post is created/edited, I do not know what path the CAssetManager will create and return - that seemingly random text string (d379e294 in the example above). So, I need on runtime, when loading the 'post', to update its content live, after publishing has been made, with the correct url/paths in the 'src' attribute of the img tags (or for every other kind of resource linked in that 'post').
This was a little challenging: Initially I went with a PHP variable in the 'post' content/body and tried to somehow interpolate it when loading or just before rendering the post. I wasn't successful. I used PHP's eval(), which is very bad practice and dangerous by itself, and it kept crashing complaining on the other content within the 'post' body.
I resorted to have some simple place holder string in the body of the posts - "ASSETS_URL" and str_replace() it when loading the post with the published assets path that I "now" have at hand (at runtime).
I'm not sure this is the best approach. this place holder string could be needed in some post and besides, that seems like a basic templating engine start and my intuition tells me I'm missing something if I do a simple templating engine inside a framework. I just can pin point on the 'right' alternative, the best practice alternative, to do it in Yii.
I wanted to ask for your opinion on this - both on the design of the solution from the higher level and on the design of the implementation itself. Would you change things and make them different?
(I didn't want to dive into KcFinder so intentionally left it out).
Thanks,
Boaz.
Please read the class reference for Yii, it is an amazing tool and is meant to be used.
http://www.yiiframework.com/doc/api/1.1/CAssetManager#publish-detail
If you use the hashByName optional parameter the assetManager will always return the same url if given a folder with the same name as the parameter. However if you try to publish multiple files/folders with the same names with this parameter then it will do nothing assuming that the file/folder already is published, as it hashes by file/folder name rather than the concatenation of parent directory name and modification time.
Then upon the edit of said post just republish with the optional forceCopy to update said files.
As to respond to other's post saying
there's no real justification for using the CAssetManager in this
case
I would like to respond with the fact that obfuscating your directory layout and code is always the best option to avoid being hacked. Especially in a language like php where its limitations are so well known.
Also it allows for you to hide your "uploads" folder so because most of the time it would be with permissions 777 or 755 depending on your web host and setup. This allows you to protect yourself further.
Imho, it seems your entire problem arises because you are using CAssetManager. What advantage does it actually give you?
I would suggest making a directory under your application's root, say : root/post_files/{post_id}/ and storing the post related files there. You can store paths for related post files in the db, and retrieve the file, when needed, using that stored path.
I'm no expert, just my suggestion.