sdk

How to close AWS connection if there is no such key in the query

天涯浪子 提交于 2020-01-02 11:30:23
问题 I'm using AWS java SDK to upload file on AWS Management Console's Bucket. However, if there is no such file online at first time when I try to get access to it, my code will catch the exception (NoSuchKey). Then I want to close the connection. The problem is I don't have any reference to close that connection because of the exception(The original reference will be null). Here is my code: S3Object object = null; GetObjectRequest req = new GetObjectRequest(bucketName, fileName); try{ logconfig(

Using the system image for “no picture” contacts on Android

筅森魡賤 提交于 2020-01-02 10:59:41
问题 I found this question which is the same problem that I would like to address. Reading his question and the accepted answer though, it sound like his approach was to pull the actual image file from the resources, embed it in his app and use it as a local resource. What I'd prefer to be able to do is in the source property for my image, use an ID which would allow me to pull that image from the local system, so that whether my app is running on ICS, HC, GB or Froyo, or if the manufacturer of

Using the system image for “no picture” contacts on Android

最后都变了- 提交于 2020-01-02 10:59:33
问题 I found this question which is the same problem that I would like to address. Reading his question and the accepted answer though, it sound like his approach was to pull the actual image file from the resources, embed it in his app and use it as a local resource. What I'd prefer to be able to do is in the source property for my image, use an ID which would allow me to pull that image from the local system, so that whether my app is running on ICS, HC, GB or Froyo, or if the manufacturer of

Android Emulator doesn't work anymore

那年仲夏 提交于 2020-01-02 08:01:52
问题 i've been 24 hours nonstop trying to sort this out with no luck. At first it worked slow, but worked. Then Eclipse started to have errors connecting with the emulator and then the emulator by itself just shows ANDROID_ forever. ( forever as in two hours) What i've tried in this 24 hours: -reinstalling eclipse,sdk,jdk. -deleting .android folder in document and settings. -waiting 2 hours for the emulator to work by itself. -downloading the 2.2 image and the 2.2.3 image, also 1.6, none works.

libstdc++.6.0.0.tbd or .dylib

天涯浪子 提交于 2020-01-02 07:51:50
问题 So folks I'm developing an app and an SDK I use require adding libstdc++.6.0.0.dylib , and there's no .dylib when I search it and a .tbd shows up instead. I just googled the difference between the two and wanna know if it's okay that I add .tbd into my project instead of .dylib ? 回答1: When you add the library, rather than hunt though the list, just press "Add Other" then manually navigate to /usr/lib or just press "CMD + Shift + G" then type in "/usr/lib/libstdc++.dylib" 回答2: Here is a

libstdc++.6.0.0.tbd or .dylib

六月ゝ 毕业季﹏ 提交于 2020-01-02 07:50:06
问题 So folks I'm developing an app and an SDK I use require adding libstdc++.6.0.0.dylib , and there's no .dylib when I search it and a .tbd shows up instead. I just googled the difference between the two and wanna know if it's okay that I add .tbd into my project instead of .dylib ? 回答1: When you add the library, rather than hunt though the list, just press "Add Other" then manually navigate to /usr/lib or just press "CMD + Shift + G" then type in "/usr/lib/libstdc++.dylib" 回答2: Here is a

DirectX SDK project - porting to VS2012

☆樱花仙子☆ 提交于 2020-01-02 07:10:15
问题 I'm porting to visual studio 2012 a solution with a project which uses some headers from the directX SDK in this path: C:/../Microsoft DirectX SDK (June 2010)/Samples/C++/DXUT11/Core the problem is: I'm encountering all the (in)famous re-definitions warnings: 14>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(12): warning C4005: 'DXGI_STATUS_OCCLUDED' : macro redefinition 14> C:\Program Files (x86)\Windows Kits\8.0\Include\shared\winerror.h(49449) : see previous

DirectX SDK project - porting to VS2012

和自甴很熟 提交于 2020-01-02 07:09:03
问题 I'm porting to visual studio 2012 a solution with a project which uses some headers from the directX SDK in this path: C:/../Microsoft DirectX SDK (June 2010)/Samples/C++/DXUT11/Core the problem is: I'm encountering all the (in)famous re-definitions warnings: 14>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(12): warning C4005: 'DXGI_STATUS_OCCLUDED' : macro redefinition 14> C:\Program Files (x86)\Windows Kits\8.0\Include\shared\winerror.h(49449) : see previous

How do you remove a CAEmitterLayer when it ends the lifetime of it's CAEmitter Cells — instead of repeating until you remove it from super layer

烂漫一生 提交于 2020-01-02 06:11:10
问题 I am using generic code (from the iOS Fireworks demo) in a slightly changed way. I have the following in a subclass of UIView. What I want is to make the firework appear at the point the user touches (not hard) and play out for the length of the CAEmitterLayer/CAEmitterCells 'lifetime'. Instead, this is immediately starting when i add it to addSublayer -- like I am sure it is meant to. However, I would like to use it in a slightly different way. Is there a way that I can change this so there

On a jailbroken iPhone, how can I run commands as root?

人走茶凉 提交于 2020-01-02 05:29:13
问题 I want to login as a root using system call in Xcode. I try this code without success: System("su"); System("alpine"); or System("su root"); System("alpine"); or System("su root alpine"); When I google it I came to know that this is done using NSTask or NSPipe . Can anybody tell me how it possible to run multiple system commands using NSTask and NSPipe ? Please give me some hints about this or another method to do this. I am using this application on jailbroken iPhone. Some more details are