w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
ANDROID ZXING: Saving a photo in onPreviewFrame saves a photo every frame. How to only save a single photo upon scan?
ZXing detects every received frame until finds out correct information. The image saving point is when ZXing returns a string which is not null. In addition, you can save file with different name "timestamp + .jpg", in case previous file will be overwritten.

Categories : Java

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

How to get photo of place from google places api
place.photos is an Array , you must select an item of the array to get details for a particular photo https://developers.google.com/maps/documentation/javascript/places#places_photos

Categories : Javascript

Show photo in sidebar from google places api
You put the link only if you have a photo. You can try something like : for (var i = 0, place; place = places[i]; i++) { if (place.photos) { markers.push(new PhotoMarker(place, map, modalWindow)); setLink(i, true); bounds.extend(place.geometry.location); } else { markers.push(new google.maps.Marker({ position: place.geometry.location, map: map, icon: new google.maps.MarkerImage( 'http://carsedia.com/code/voyage/icons/7.png', null, null, new google.maps.Point(3.5,3.5)), clickable: false })); /* if no photo, put false as 2nd argument */ setLink(i, false); } } And edit your "setLink" function : function setLink(i, has_photo) { var photo = has_pho

Categories : Javascript

Google Place Photo Requests Broken?
Sounds like you are either sending us a lot of requests, or you aren't adding your key to the photo fetch. Have you had any successful requests? If not, I'd suspect your keys are missing and/or incorrect.

Categories : PHP

how do I get my author ID photo to appear next to my site in google results?
This feature is called Google Authorship. Edit the contributor section of your profile Add a link to your blog to the contributor section. You will need to add markup to your articles that links to your profile and identifies you as the author. You might use a Wordpress plugin to do this for you. The following whos you how to manually do this for any type of HTML page. You do this by setting a byline with a link to your profile or by using a LINK element in your page: by <a href="https://plus.google.com/106189723444098348646" rel="author">Larry Page</a> <!-- Alternatively, use the link element in your <HEAD> --> <link rel="author" href="https://plus.google.com/106189723444098348646" /> Test your authorship markup by using the Structured Data Testing Tool.

Categories : Wordpress

Getting birthday,gender and photo from google UserInfo
The link you're using as a reference is for after the user has been successfully authenticated. That means their user already has a code. If you are unsure of how to get one, you should probably first focus on getting the OAuth flow and wait to perform the API call after. There are a number of good resources for showing you how to perform the OAuth flow (getting a code, exchanging it for a token, persisting the token, etc) using the Google API Client Library. One of my favorites is the Quickstart tool, which will generate a starter application for you that has the OAuth code already implemented. You can try that out here: https://developers.google.com/quickstart/ (Note that it depends on Maven to handle the jars/dependencies) You can also check out some of the library's samples here:

Categories : Java

Taking a photo and uploading to google cloud services on a phone
In google App engine it is possible to upload image by converting to base64 but you will need to convert it again into binary blob type from base64 to store it. It is possible to upload a image directly to google app engine just by using a single html form having <input file="" name="fileupload"/> on client side. Endpoint will be the servlet address on google appengine which handle this form request. On the server side toy just need to get parameters of submitted form. Assign parameter named fileupload into blob type and then save using entity or in resource. update: Submitting a from is possible through ajax without reloading but simple jquery/javascript don't support form submission which has input tag of file type therefore, a jquery plugin used to do this : Ex: $(function()

Categories : Javascript

How can I open a pretty photo iframe window when i click over the google maps
You can use below code for open Google map on pretty photo. <html> <head> <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script type="text/javascript" charset="utf-8"> google.load("jquery", "1.4.2"); </script> <link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8" /> <script src="js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script> <!-- Google Maps Code --> <script type="text/javascript" src="

Categories : Jquery

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

Select primary photo if exist else pick first uploaded photo
I was working in MS SQL but I don't see anything MS-specific except for the table variables. So if you change that to existing tables, it should run on MySQL too. (I am not sure but I guess MySQL should have EXCEPT set operation.) -- sample data start declare @place as table (plid int, plname nvarchar(100)) declare @photo as table (phid int, phname nvarchar(100), plid int, primary_pic nvarchar(1)) insert into @place values (1, 'aaa') insert into @place values (2, 'bbb') insert into @photo values (1, 'aaa_1.jpg', 1, '') insert into @photo values (2, 'aaa_2.jpg', 1, 'X') insert into @photo values (3, 'aaa_3.jpg', 1, '') insert into @photo values (4, 'aaa_4.jpg', 1, '') insert into @photo values (5, 'bbb_1.jpg', 2, '') insert into @photo values (6, 'bbb_2.jpg', 2, '') insert into @photo val

Categories : Mysql

I'm saving photo on android gallery but the photo have a delay to save
Ok. I solved this question doing this. The class I use to save the picture I changed this part... FileOutputStream out = new FileOutputStream(myImage); newImage.compress(Bitmap.CompressFormat.PNG, 100, out); bitmapFinal = newImage; out.flush(); and now I use this one... String nomeImagem = "TUBAGRAM_" + System.currentTimeMillis(); url = MediaStore.Images.Media.insertImage(preview.getContext().getContentResolver(), newImage ,nomeImagem, null); And the code I use to accept the photo and send to Intagram I changed to caminhoImagens = getRealPathFromURI(Uri.parse(hps.getUrl())); Log.i("Caminho imagem: ", caminhoImagens); shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + caminhoImagens)); shareIntent.setPackage("com.instagram.android"); And retire the cursor.

Categories : Android

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

Laravel - Is there a way to generate /photo/new and /photo/id without using resource controller
Yes: Route::get('/photos/new', array('as'=>'photos.new','uses'=>'PhotosController@new')); Route::get('/photos/{id}', array('as'=>'photos.show','uses'=>'PhotosController@show')); And you controller class PhotosController extends Controller { public function new() { ... } public function show($id) { ... } }

Categories : Laravel

Display default contact photo when no photo assigned?
if(bitmap!=null) { favIcon.setImageBitmap(bitmap); } else { favIcon.setImageDrawable(R.id.yourimg); } This should do it! place your default image in the drawable folder.

Categories : Android

how to pull instagram photo's caption along with the photo?
The data is available in the json feed sent by instagram to the plugin your using. it's inside the location attribute. location":{"latitude":-23.241574214,"name":"the beatles - a hard day's night","longitude":-45.886599107,"id":133717757}

Categories : PHP

Tumblr Theme Photo Overlay On To The Next Photo URL?
Try replacing your click event code with this: $('.post').on('click', 'a', function overlayShow(e){ e.preventDefault(); var elem = $(this), parent = elem.parents('.post'), photoId = (elem.find('.img-main').attr('href')); parent.addClass('selectedImg'); $('body') .css('overflow','hidden') .find('#overlay').show() .find('.overlay-img').attr('src', photoId); $('.next-img').on('click', function(e){ e.preventDefault(); nextImg = $('.selectedImg').removeClass('selectedImg').prev('.post').addClass('selectedImg').find('a').attr('href') $('.overlay-img').attr('src', nextImg); }); $('.prev-img').on('click', function(e){ e.preventDefault(); prevImg = $('.selectedImg').removeClass('sele

Categories : Jquery

C# photo capture device wp8
It should look like this: byte[] byteArray; // Initialization is not required captureDevice.GetPreviewBufferYCbCr(out byteArray); The ref requires that the variable be initialized before being passed not the out.

Categories : C#

Get the last saved Photo in photo album
Your code is doing what it's meant to do. You have a issue with the logic of the code. YOu are posting notification before it's finished with saving image. You have to post the notification inside the completion block code of writing image to the library. And, why not just show the captured image on the imageView instead of reading it from the library??

Categories : IOS

iOS replace a photo with newly taken photo
What you need to do is register your viewController as a UIImagePickerControllerDelegate, and then do: takePhotoPicker.delegate = self; Then, you need to add the method: - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {} which you can use to get the image. To get the image from the camera or photo album you need to get the value from the correct key from the info dictionary. For example, to get the Edited image (resized by user): UIImage *image = [info valueForKey:UIImagePickerControllerEditedImage]; And to get the original image: UIImage *image = [info valueForKey:UIImagePickerControllerOriginalImage]; The original image is the full screen image that the user took with the camera. You can then use this image

Categories : IOS

jQuery Photo Tag not displaying properly
CSS requires you to define units when referring to size and location, otherwise it discards it. You need to include "px" after your location values. $('#planetmap').append('<div class="tagged" style="width:'+pos_width+'px;height:'+ pos_height+'px;left:'+pos_x+'px;top:'+pos_y+'px;" ><div class="tagged_box" style="width:'+pos_width+'px;height:'+ pos_height+'px;display:none;" ></div><div class="tagged_title" style="top:'+(pos_height+5)+'px;display:none;" >'+ $("#title").val()+'</div></div>'); Make sure you are loading the dependent scripts when you deploy your code.

Categories : Jquery

How to delete a photo posted by an App in Facebook
In order to delete a photo that was created by the application, you have to make a DELETE request to a url like this: https://graph.facebook.com/PHOTO_ID I'm not sure why the documentation states otherwise (might be worth a bug report). So in the PHP SDK, it would look something like this: $facebook->setAccessToken( YOUR_APP_TOKEN ); $response = $facebook->api( '/PHOTO_ID', 'delete' );

Categories : Facebook

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

Which is better store photo as byte array or store photo as bitmap in object
In OO it is generally better to have your classes as close approximate the reality as possible. Bitmap closer approximates the reality of a photo than a byte array does. So Bitmap is better. Unless Bitmap does not capture essential characteristics of what you call a photo. Say, you only need to store your byte array somewhere. Then Bitmap will be of no use, only complicating the picture. But then it's not a photo.

Categories : Android

Script to delete photo from facebook fan page cover album
is there any way to delete photo from facebook fan page cover album Just like you make GET and POST request; do: DELETE /post_id/ photo_id But only if the photo is posted through your app!

Categories : Json

Google Drive Service Account Access on Google App Engine to Impersonate Users
I do not understand the user part of your code, bacause you use a Google App Engine project user account. See this doc on how to use and find this account. You can also fnd this account using : from google.appengine.api import app_identity logging.info('service account : ' + app_identity.get_service_account_name()) Make sure you have given this project user account access to your drive file or folder! My code looks like this : def createDriveService(): SCOPE = 'https://www.googleapis.com/auth/drive' API_KEY = 'AIzaSyB9UkK4OH5Z_E4v3Qp6bay6QEgGpzou3bc' # GAE credentials = AppAssertionCredentials(scope=SCOPE) logging.info('using service account : ' + app_identity.get_service_account_name()) http = credentials.authorize(httplib2.Http()) return build('drive',

Categories : Python

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

Is it possible to Use Google Apps Script to check condition in Google Drive Forms?
Google Forms does not support client-side validation like that, at this time. Deploying an Apps Script as a web app would allow you to do it, but you have to create all of the formatting and functionality yourself. The recent inclusion of data validation functions in Apps Script in conjunction with Google Forms supporting some scripting access means that we could see something along these lines in the future. Would certainly go a long way toward making Google Forms more useful.

Categories : Google Apps Script

How to edit the document after uploading it on google drive using Google Apps Script
Currently, when you upload a document/spreadsheet using Apps Script, it is uploaded in the same format i.e. it is not converted to Google Docs format. There is an open issue asking for this feature. You can star the issue to register your interest.

Categories : Google Apps Script

com.google.api.client.json.jackson.JacksonFactory; missing in Google Drive example
Since version 1.11, jackson library has been moved out to separate jar to provide developers better choice of versions of each library. Please check readme.html of zip file you downloaded from google-api-java-client and you can check which specific jar file you want to include in your project.

Categories : Java

Can I remove Powered By Google Drive Footer on embedded Google Form?
If you're sure that the form is finished, then the only way that I've found to remove the footer is to go to the "live form" view, view source code in the browser, copy and paste into your web-page and remove the ss-footer from the HTML. The only drawback is that you have to repeat the process every time you alter the form. Still, it gets rid of the footer!

Categories : Javascript

Trying to do a simple google drive API test using google's dot net library and service account
As it is a service account I don't believe it has its own 'Google Drive', service accounts exist to act on behalf of a user. To 'impersonate' the user whose files you wish to list, you need to pass a prn parameter when you generate the access token; Details can be found here if you scroll down to 'Additional Claims'; https://developers.google.com/accounts/docs/OAuth2ServiceAccount#formingclaimset It appears as though you can set the user via this; var _client = new AssertionFlowClient(GoogleAuthenticationServer.Description, certificate) { ServiceAccountId = SERVICE_ACCOUNT_EMAIL, Scope = DriveService.Scopes.Drive.GetStringValue(), ServiceAccountUser = "Name@Company.com" }; If you wish to log the HTTP interactions, I have f

Categories : Misc

Google Realtime API - creating and removing shortcut file in Google Drive
From an API perspective, the realtime documents are designed to be persistent storage. The files are long lived, and there is there is no need to ever recreate them or store data elsewhere. If you want to copy data elsewhere, how and when to do that sounds like a design decision you need to make given whatever makes sense for your app.

Categories : Misc

Upload text file to Google Drive with Google Apps Script
To do a file upload, you cannot use a server handler. You must use a FormPanel and a Submit button. See the FileUpload widget's documentation.

Categories : Javascript

Google Drive resumable upload has suddenly stopped working for Google Apps Marketplace App
I have experienced a similar problem. See POST method for resumable media link stopped working The solution we found was not related to the key and key secret. We just switched from an HTTP POST method to a PUT method.

Categories : Google App Engine

Using Google Drive API with service account in Google Apps Engine python project with local debugging
Yes - you can use SignedJwtAssertionCredentials to connect to Google Services. I wrote code which do that at one time and it work great. Using that class is one problem. On GAE is provided PyCrypto library like you wrote but on local you must install it manually. GAE have his own changed version of this library so they didn't provide her source code. Second problem with that library is that she is compiled for specified machine which will use her. If you look in source code of that class you will see that she needs some dependencies to work. If they didn't meet the requirements of that class she will be not accessible from outside code. About problems with import in old and new dev_server i can't write anything because i don't know anything about that.

Categories : Google App Engine

Prevent Google OAuth 2.0 redirection for Google Drive API Integration
We currently offer an alternative flow for installed apps that doesn't redirect back to an app but outputs the exchange code. In order to be sure that user is explicitly giving permissions to your application, we need to intercept the flow for a user action. If there are no end users involved in your use case, you may like to take a look at the service accounts: https://developers.google.com/accounts/docs/OAuth2ServiceAccount Service accounts also provide impersonation for Google Apps domains.

Categories : PHP

Activating Triggers in Google Spreadsheet Scripts with Google Drive SDK
Unfortunately, no. You cannot do meta programming with Apps Script. Based on the answer to this question, I wrote a simple function to try meta programming function meta(){ var mime = 'application/vnd.google-apps.script'; DocsList.createFile('MetaScript','function test(){}', mime); } It throws up an error saying Invalid mime type

Categories : Google Apps Script

How can i create a big file in google drive with google app script?
DriveApp.createFile() includes a note that it... Throws an exception if content is larger than 10MB. I expect that this limitation also affects DocsList.createFile() and DocsList.replace(). You might have better results by avoiding the need to handle the entire contents of docTotal. Use File.append() to add the content of each file: ... var str = docPartes.getContentAsString(); Logger.log("UNE LA CADENA"); docTotal.append(str); ...

Categories : Google Apps Script

Phonegap and Jquery to get a Photo stored on the device and convert it to a base64 string, path is from the sqlite database
I did it the following way. Check answer to this Then I used following code to upload image using web service. //function to upload image function uploadImage(ImagePath) { try { var options = new FileUploadOptions(); options.fileKey = "file"; options.fileName = ImagePath; options.mimeType = "image/jpg"; var params = new Object(); //You can set multiple params options.params = params; options.chunkedMode = false; var ft = new FileTransfer(); var url = "My_WebService_URL"; ft.upload(ImagePath, url, win, fail, options, false); } catch (e) { console.error("Error :"+e.message); } } //Success callback function win(response) { alert("Image uploaded successfully!!"

Categories : Jquery



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