iso

Android camera preview is dark

心已入冬 提交于 2019-11-28 07:46:25
I am trying to create a custom camera app. I followed the Android Developer example from here with minor tweaks. However, my camera preview turns out to be rather dark. On the other hand, the stock camera gives a much brighter preview. I have tried several settings to make it work better but it seems none of them are having any impact. Relevant code is posted here. CameraActivity (Main) protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_camera); if(CameraHelper.checkCameraHardware(this)) { mHelper = new CameraHelper(this,

MP4 File Format Specification [closed]

丶灬走出姿态 提交于 2019-11-28 03:57:56
I am writing some code to parse MP4 files ... Is there a free source to get documentation on the MP4 File Format Specification. So far I have only found an ISO document which I would need to purchase ISO PDF . Is MP4 Not an open standard ? Here's the specification of the ISO base format , and here is the MP4 file format specification , both defined as part of the ISO/IEC 14496 standard. Also take a look at the QuickTime MP4 specification . It has a very clear explanation. Jaco " ISO 14496-1 Media Format " gives a detailed description of the MP4 layout: Akagi201 The latest ISO doc is ISO/IEC

Bitwise shift operators on signed types

守給你的承諾、 提交于 2019-11-28 00:06:28
I am trying to understand the behavior of bitwise operators on signed and unsigned types. As per the ISO/IEC document, following are my understandings. Left shift Operator The result of E1 << E2 , is E1 left-shifted E2 bit positions The vacated bits on the account of left shift will be filled by zeros. E1 as signed non-negative: E1 << E2 will result to E1 multiplied by 2 power of E2, if the value is representable by the result type. Q1: What about signed negatives? Q2: I am not able to understand on what's meant by "reduced modulo" in the following context. "If E1 has an unsigned type, the

Convert iso timestamp to date format with Javascript?

岁酱吖の 提交于 2019-11-27 22:12:49
This seems like a pretty simple question but I can't seem to get an answer for it. How can I convert an iso timestamp to display the date/time using JavaScript? Example timestamp: 2012-04-15T18:06:08-07:00 Any help is appreciated, Google is failing me. Thank you. Pass it to the Date constructor. > var date = new Date('2012-04-15T18:06:08-07:00') > date Mon Apr 16 2012 04:06:08 GMT+0300 (EEST) For more information about Date, check https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date . The newest version of javascript (v1.85 or higher in some of the latest browsers) can

Convert JSON date string to Python datetime

∥☆過路亽.° 提交于 2019-11-27 20:30:46
问题 When translating dates to JSON, javascript is saving dates in this format: 2012-05-29T19:30:03.283Z However, I am not sure how to get this into a python datetime object. I've tried these: # Throws an error because the 'Z' isn't accounted for: datetime.datetime.strptime(obj[key], '%Y-%m-%dT%H:%M:%S.%f') # Throws an error because '%Z' doesn't know what to do with the 'Z' # at the end of the string datetime.datetime.strptime(obj[key], '%Y-%m-%dT%H:%M:%S.%f%Z') I believe that javascript is saving

Android Camera API ISO Setting?

旧城冷巷雨未停 提交于 2019-11-27 19:55:06
Would anyone know where to control the ISO setting for the camera from in the Android SDK ? It should be possible as the native camera application on the HTC Desire has ISO settings. you should take a look at the methods flatten() , unflatten() , get(String key) , set(String key, String value) in android.hardware.Camera.Parameters . Also consider the source code of that class . It might make things clearer. First you need to obtain the Camera.Parameters . Unflatten it to a String and investigate it. I am developing on a HTC Desire as well an get the following String : sharpness-max=30;zoom=0

Warning: this decimal constant is unsigned only in ISO C90

六月ゝ 毕业季﹏ 提交于 2019-11-27 19:49:46
Piece of code : long rangeVar = 0; rangeVar = atol(p_value); if (rangeVar >= -2147483648 && rangeVar <= 2147483647) On compiling I get: warning: this decimal constant is unsigned only in ISO C90 Thanks in Advance The rules for the types of decimal integer constants changed between the 1990 and 1999 editions of the ISO C standard. In the 1990 version, an unsuffixed decimal integer constant's type is the first of int , long int , or unsigned long int in which its value can be represented. (C90 had no long long or unsigned long long type). In the 1999 and 2011 versions, its type is one of int ,

Converting country codes in .NET

泪湿孤枕 提交于 2019-11-27 18:58:33
In .NET is there any way to convert from three letter country codes (defined in ISO 3166-1 alpha-3) to two letter language codes (defined in ISO 3166-1 alpha-2) eg. convert BEL to BE? Have looked at the RegionInfo class in System.Globalization but the constructor does not seem to support the three letter codes. Mormegil The RegionInfo class does know the three-letter code (in the ThreeLetterISORegionName property), but I don’t think there is a way to get RegionInfo based on this code, you would need to enumerate all regions and add them to your own dictionary, with the three-letter code as a

Detecting integral overflow with scanf

为君一笑 提交于 2019-11-27 16:09:22
问题 When recently answering another question, I discovered a problem with code like: int n; scanf ("%d", &n); With strtol , you can detect overflow because, in that case, the maximum value allowed is inserted into n and errno is set to indicate the overflow, as per C11 7.22.1.4 The strtol, strtoll, strtoul, and strtoull functions /8 : If the correct value is outside the range of representable values, LONG_MIN, LONG_MAX, LLONG_MIN, LLONG_MAX, ULONG_MAX, or ULLONG_MAX is returned (according to the

ISO Standard Street Addresses?

此生再无相见时 提交于 2019-11-27 13:52:43
问题 Is there an ISO standard address format? I can't seem to find one, and I'd like to know for object- and database-design purposes. (One interesting document that shows a bunch of formats is this: http://www.bitboost.com/ref/international-address-formats.html, but it's insane!) 回答1: No; each country defines its own standard. There have been a number of questions about this in times past, including: Best practices for storing postal addresses in an RDBMS Is there a common street address database