w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
google drive api - copyfile working only with permission for accessing all files in drive (but jst need to copy)
According to the documentation, Files.copy() requires at least one of the following three permissions: https://www.googleapis.com/auth/drive: "View and manage the files and documents in your Google Drive" which is the one you want to avoid https://www.googleapis.com/auth/drive.file: "View and manage Google Drive files that you have opened or created with this app." Which means you can freely create any file but only open the files your app created. You can only copy a file you created, but you cannot copy any other files even if it is public. https://www.googleapis.com/auth/drive.appdata: "View and manage its own configuration data in your Google Drive" Which only lets you control your application-specific Appdata folder which is probably not what you want. You can only copy a file with

Categories : Javascript

How to remove file permissions on linux from an external hard drive?
To make the partition accessible under Linux run: sudo chmod -R 777 /media/<drive-name>/ this should make the mac drive accessible for you. Changing ownership would do about the same, but you need not worry about it.

Categories : Linux

Use Google Drive as app backup
The folder you mention is called Application Data folder, the basics are explained on https://developers.google.com/drive/appdata

Categories : Android

SQL Server Backup fails in drive where OS is installed
Not sure this will work or not but You can try to run the program as administrator through code. There is a good article how to run program with admin rights. how to force my C# Winforms program run as administrator on any computer?

Categories : C#

Vim swap and backup files for encrypted drive
One way is to just make sure there's a Temp directory at the root of the encrypted drive: set backup set directory=/Temp//,C:/Temp// set backupdir=/Temp//,C:/Temp// If there isn't one, it will fall back to the Temp directory on the C drive.

Categories : Vim

Google drive: Get (root) file and folders with javascript api (get only deleted files on drive)
Same situation as following question: google drive api, javascript list files returns nothing I needed to add to the scope the path 'drive' at authorizing, I had only drive.file which is intent to create/edit files only. The weird thing is that the API returns deleted files when you don't have permissions to view files, I think it's a bug in the API (a serious one). Post this bug on google drive: https://productforums.google.com/forum/#!searchin/drive/security$20issue$20permission$20view/drive/pupjKxTz9FU/cUarGIl_Ah0J

Categories : Javascript

Error while Retriving files from google drive using drive API. “Calling this from your main thread can lead to deadlock
You should do any code that could take a long time such as I/O or network activity on a different thread. In your situation your file retrieval would be best done within an ASyncTask. The reason for this warning is because when your code is being executed to retrieve the file from Drive, the code will block until the file retrieval has completed, this means that nothing else within the program will be able to respond, i.e. GUI will not update and input from the user trying to do stuff with the GUI will not be registered. After a few seconds, if the file retrieval still isn't complete, then the user will be presented with an ANR (Application Not Responding) message. This will either give the user the choice of waiting, if their patient, or most likely force closing your app.

Categories : Android

Monitoring changes in Google Drive files for whole domain using Drive API
Domain-wide delegation simplifies the authentication portion for your app but you'll still need to auth as each user to get their files and changes. It may be possible for your app to "grab" all files and make itself (or a special user) the owner, then you just have one user account to scan but the "grab" process would still need to run at regular intervals to find new files created or uploaded by end users. I believe most apps that need to scan content at this level do it via cron jobs or AppEngine task queues which make it easy to chunk up the scans throughout the day. Generally they expect to scan each user account once every 24 hours or so.

Categories : Google App Engine

Google Drive Javascript API: Detect drive changes - return changes only
Start with zero on your first call. Within the response is the current largest change id, which you need to store and use on the next request. In your code, it will materialise as "resp.largestChangeId".

Categories : Javascript

[Qt][Linux] List drive or partitions
You need to use platform specific code. And, please, read the docs! Returns a list of the root directories on this system. On Windows this returns a list of QFileInfo objects containing "C:/", "D:/", etc. On other operating systems, it returns a list containing just one root directory (i.e. "/").

Categories : C++

Unmount my external hard drive in bash
Searching for "Unmount Hard Drive Terminal" yields http://ubuntuforums.org/showthread.php?t=842698 as the first result. >.> russlar provides a solution: open terminal, and run df -h. this will tell you all the hard drives mounted. then, run sudo umount /dev/something, where somethign is the name of the hard drive that you want to unmount. Nothing wrong with asking, but when a solution is on the first Google result, it's a little... odd.

Categories : Misc

Will SQL Server treat a USB 3.0 External Drive as local?
I just used a USB 2.0 drive the other day to perform a restore to a test environment. I imagine that as long as Windows identifies the drive as a local disk and not removable storage, and the SQL Server service can access the directory, it should work just fine.

Categories : Sql Server

Windows: How to symlink drive to another drive?
No, mklink isn't going to do it for you. What you need to do is to create a virtual hard drive (VHD) and copy the client's data to it. (Or modify the export script, which is the best thing to do.) I used Windows 7 to test my instructions below. Start-> run-> diskmgmt.msc (accept all defaults... I'm not doing anything special below) From the menu bar select Action -> Create VHD Choose the location and name the file (which will be the vhd) and specify the size and click OK. Right click on the Disk # (underneath will be Unknown and the size and "Not Initialized"). Select "Initialize Disk" & click OK Right click on the black bar of the unallocated disk space and select "new simple volume". A wizard opens up an on the second page it lets you assign the drive letter. Complete the wizar

Categories : Windows

How do I create & edit a spreadsheet file on google drive using Google Drive APIs only from my Android app?
You should take a look at Google Spreadsheet API 3.0. It supports JAVA which you can use in your Android application.

Categories : Java

Google Drive: read-only without authorisation on external site
It is be possible for a third party app to authorize requests without an access token. You can make requests from an allowed referrer/IP with an API key. https://developers.google.com/console/help/#generatingdevkeys Then, you should be allowed to GET the following public file: GET https://www.googleapis.com/drive/v2/files/1T_fVTiyyBVnfYKd_3gZzVfxqU5NbOhIlEG0nyReYh9w?key=[yourKey]

Categories : File

Creat .BAT to copy a .mdb from network drive to local C:/
Ok, this works for me where I work. There is a mapped drive to the location where the master .mdb is. That is "i:" drive. copy i:etsleadsoftwarepaintleadmain.mdb c:paint it copies the .mdb to the "c:paint" drive on the computer where the client clicked on the .bat file. It has been a while so I can't remember where the .bat file sits. Pretty sure it is on the client's computer. Open Notepad, add the code above, and save making sure to pick the option "All files" down below. That way you can change the extension to .bat from .txt.

Categories : Networking

Google Drive sdk for android, Getting error 400 Bad Request when uploading file to Google Drive
You seem to be setting the mime type in the File object, but you need to set it in the FileContent object. When you create your file content, you can try passing in the type in the constructor new FileContent("image/jpeg", localFile); or using the method setType("image/jpeg"); but in your mediaContent instance, not in your body instance.

Categories : Android

How can we use Linux from a small storage pen drive? Does it work on micro-controllers also?
I generally hear that LINUX OS can be downloaded on flash, pen drive (floppy disk?) etc. How > we can do that? If you can't get it to work on your own, you can buy a ready made Linux on a USB drive from a site like http://www.osdisc.com or http://www.cheapbytes.com Not all PCs, especially older PCs, can boot from the USB Drive. Even some newer PCs are beginning to ship with security features that can interfere with booting code. When it does work, you have to find out the proper way to boot the USB drive. You might have only a few seconds during reboot to enter the right key, or it will boot Windows (if Windows is installed). The key to get to the BIOS Boot Menu might be delete or escape or F10 or some other key (varies with PC motherboard manufacturer). A message on the screen

Categories : Linux

Change my current working directory in Python to my external hard drive.
You are correct. >>> 'E:CollegeProject3dlife-gc-2013-dataset-hhi3dlife-gc-2013-dataset-hhi' 'E:\College\Projectx03dlife-gc-2013-dataset-hhix03dlife-gc-2013-dataset-hhi' Double the backslashes, use forward slashes, or use a raw string.

Categories : Python

Send some working params to doc or save to docs db while making copy of a doc using drive api
Setting Document-Specific Parameters in a New Document I want to store some params into doc's database or at least to script content or someway that doc can know that value... You can accomplish this, but it requires that you use a script to create the document copy. While creating the copy, this script would also create an entry in a shared spreadsheet, with the ID of the new document and any parameters for that document. The onOpen() trigger function would then set document-specific values once, the first time the document is opened. If the parameters have not been set yet, the script would read the shared data, find its parameters (again, based on document ID), then store them in its ScriptDb (and, presumably, set text within the document using them). Permission vs Authorization

Categories : Google Apps Script

Using Subclipse with share drive specifically an office-like share drive
You should start with the SVN book, chapter 1: http://svnbook.red-bean.com/en/1.7/svn.basic.html You need a SVN server and repository. That is what you will "share" with. All users that want to collaborate on the versions of a file will need to use a SVN client so that they can checkout and edit files stored in your repository and commit their changes back.

Categories : Eclipse

Need Apps Script to Copy a File(s) from my Local Hard Drive to a Google Sites Folder
You have to write an UI to that allows the visitor to the site to upload the file. See https://developers.google.com/apps-script/reference/ui/file-upload for an example.

Categories : Google Apps Script

Listing of all folders of Google Drive through IOS Google Drive SDK
Assuming this code works, there is a problem in the query. Multiple queries should be combined by and. query.q = @"mimeType='application/vnd.google-apps.folder' and trashed=false"; For more examples of sample queries, take a look at Search for Files in official documentation. Also, in case this code doesn't work, you want to use Files.list() with query above. Check the link and there is a sample code for Object-c you might want to use.

Categories : Objective C

How can I do a copy of my spreadsheet into specifc folder in google drive using Google Script
Use DriveApp ... get the file using getFileById(id) then use makeCopy(name) then Use DocsList ... get the file using getFileById(id) then use addToFolder(folder) I don't think there is an addtofolder in DriveApp and the file objects in DocsList and DriveApp are not the same

Categories : Google Apps Script

JS Google Drive SDK
If you want a separate app that edits the spreadsheet externally, you can use Javascript in conjunction with the Spreadsheet API at https://developers.google.com/google-apps/spreadsheets/ Alternatively you can embed Javascript within your spreadsheet using Apps Script as described here https://developers.google.com/apps-script/reference/spreadsheet/ It really depends what you are trying to achieve.

Categories : Javascript

Searching a drive with vb.net
You need recursion here which handles each folder. EDIT: As requested by the OP, a little example: Public Sub DirSearch(ByVal sDir As String) Try For Each dir as String In Directory.GetDirectories(sDir) For Each file In Directory.GetFiles(dir, "yourfilename.exe") lstFilesFound.Items.Add(file) Next DirSearch(dir) Next Catch ex As Exception Debug.WriteLine(ex.Message) End Try End Sub Also take a look at the following answers: Looping through all directory's on the hard drive (VB.NET) How to handle UnauthorizedAccessException when attempting to add files from location without permissions (C#) Also note, if you have enough access rights, you could simplify your code to this: Dim di as New D

Categories : Vb.Net

Google Drive SDK for OCR
I just finished making this Google Drive Quickstart example from the documentation work. The code is outdated and didn't even compile at first. Once that succeeded I had some other issues when running the app on a device. I have listed the changes required to get this working and committed to the following github project. It's an Eclipse ADT project so feel free to check out and compare with your code. I've tested with the OCR option enabled and verified the result. https://github.com/hanscappelle/more-android-examples/tree/master/DriveQuickstart The readme file has an overview of all the required changes.

Categories : Android

Accessing the C: drive on azure VPS with ASP.NET
Sure. Since you want to access the VM's drive, and you have complete control over the VM it's easy. Server Expose your VM's drive using WebDAV. It's a HTTP API for file sharing. Here's a WebDAV setup guide for Windows: http://mythoughtsonit.com/2013/05/deploy-a-file-server-in-the-cloud-webdav-on-windows-azure/ Client If you are using Windows Azure Websites (very restrictive), your only option on your ASP.NET site is to add C#/VB code to read/write from the WebDAV share. Here's some .NET WebDAV clients: https://github.com/kvdb/WebDAVClient http://webdavnet.codeplex.com/ http://www.independentsoft.de/webdav/ If you are using a Windows Azure Cloud Project and have a Web Role (more flexible), on that web role you could make a startup task which maps the WebDAV as a network drive an

Categories : Asp Net Mvc

Google Drive SDK Client ID
On Android, your certificate SHA1 fingerprint and package name together is unique identifier of your application. As long as these two matches with information you provided to API console, Drive API will recognize who you are. You don't need to provide your clientId. In case you don't remember providing these two information, you should make special clientID for Android as shown here.

Categories : Android

Google Drive SDK: MediaUploadProgress - not sure how to use this
You can retrieve the latest status similar to what I'm attaching below. media = MediaFileUpload('image.png', mimetype='image/png', chunksize=1000, resumable=True) request = drive.files().update(id='fileId', media_body=media) response = None while response is None: status, response = request.next_chunk() if status: print status.progress()

Categories : Python

Run/drive Excel via own application
Is it possible to 'drive' excel via a c# application (i.e. select something from a excel gui dropdown list, press a button and read the content of particular cells)? Yes, you can use COM Automation from C#. Create a C# project and add a reference in the COM section of the dialog. You should reference Microsoft Excel 14.0 Object Library. This is the Excel 2010 version and if you use another version you should reference the version you have installed on your machine. You can then automate Excel in a similar way as you would do using VBA except you now are using C#. On MSDN you have Getting Started with VBA in Excel 2010 that among other things explain how you can use the macro recorder to create a VBA subroutine from actions you perform in Excel. You then have to translate the VBA int

Categories : C#

Installing TFS on a non-system drive
TFS stores it's data in SQL Server. So wherever SQL Server hosts it's data files (MDF/LDF) is where the TFS data will be located. Note: You don't have to "install" SQL to your data drive, you just have to make sure it's configured to place the SQL Server data files there. If your databases have already been created you can also move the existing data files using SSMS.

Categories : Tfs

Embedding a doc into a doc in Google Drive
You cannot embed a document into a document, but you can append the elements of one document to the body of another document. Have a look at the answer to How can I generate a multipage text document from a single page template in google-apps-script? for a start. You should be aware of all the element types, as each has its own handlers - Henrique's answer deals with the three elements that the current documentation says can be contained in a body, but you may find the list isn't exhaustive.

Categories : Google Apps Script

Access Google Drive through Web app
You need to use a service account if you don't wish to have to authenticate everytime. You can find the information you need about service accounts/service account-auth here; https://developers.google.com/drive/service-accounts Make sure when doing service account auth that you pass the prn parameter to make the account pretend to be you (so it can access your Google Drive). https://developers.google.com/accounts/docs/OAuth2ServiceAccount#formingclaimset

Categories : C#

Where should I put a new Sitecore project on my C drive
I'd advise you to have a read through this series of articles by Jens Mikkelsen. That's also how I've set it up here: - Install Sitecore in c:inetpubwwwroot - Create a VS project in c:projectssitecore I copy the code from my VS project to my Sitecore website using MSBuild. Regarding your browser question: I usually set up a website in IIS pointing to c:inetpubwwwroot (or wherever Sitecore is installed). Then add an entry in my hostfile such as sitecore.local, pointing that to

Categories : Asp Net

Nodejs Google Drive API
Yes. The Node.js API client will detect access token errors and automatically refresh the token. You can see this in the source: var hasAuthError = res.statusCode == 401 || res.statusCode == 403; // if there is an auth error, refresh the token // and make the request again if (!opt_dontForceRefresh && hasAuthError && credentials.refresh_token) { // refresh access token and re-request that.refreshToken_(credentials.refresh_token, function(err, result) { if (err) { opt_callback && opt_callback(err, null, null); } else { var tokens = result; tokens.refresh_token = credentials.refresh_token; that.credentials = tokens; that.request(opts, opt_callback, true); } }); }

Categories : Node Js

Google Drive API downloadUrl 404 in iOS
Hah, so it seems the devil is in the detail I left out of the question. When creating the authorizer the scope I was providing is kGTLAuthScopeDriveFile, which was the default in an example and I forgot all about it when everything else thus far worked fine. Apparently I need to use kGTLAuthScopeDrive instead (the differences are explained here) The logic seems a bit flawed here though, I mean I don't want access to other files that weren't created with the app, I just want access to a public file somebody else created with the app...

Categories : IOS

How can I get the name of the drive on which the Windows is setup?
Press Windows + R Type cmd In the console, type set You can see the enviroment variables Probably you'll see something like SystemDrive So you can simply use System.getenv("SystemDrive")

Categories : Java

Any possible way to re-program a USB drive's microcontroller?
What I was thinking was if one could reprogram them to say, start an application upon insertion into a USB port, then it could be useful for a multitude of applications (such as copying files automatically). You are mistaken. When you reprogram a USB flash microcontroller, you cause a program to run inside the USB flash stick. You do NOT cause any program to run on the computer's main processor. The USB flash stick's processor only interacts with the main computer by responding to USB transactions initiated by the USB host controller in the main computer, which is under the control of the OS. In effect, your capabilities are limited to changing what kind of USB device it is reported as (mass storage or imaging or network or ...) and changing the content of the data returned when t

Categories : Assembly

why I can't find fuslogvw.exe in my c drive
Fuslogvw is automatically installed with Visual Studio and with the Windows SDK. See relevant for reference MSDN Page Mine is at C:Program FilesMicrosoft SDKsWindowsv6.0Ain If you have Visual Studio installed on your computer: On the taskbar, click Start, click All Programs, click Visual Studio, click Visual Studio Tools, right-click Visual Studio Command Prompt, and then click Run as administrator from the shortcut menu. -or- If you have the Windows SDK installed on your computer: On the taskbar, click Start, click All Programs, click the folder for the Windows SDK, right-click Command Prompt (or CMD Shell), and then click Run as administrator from the shortcut menu. At the administrator command prompt, type the following: fuslowvw

Categories : C#

© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.