Posts

Showing posts from October, 2009

Bluetooth HCI Snoop Log Not Generated

Answer : UPDATE: The btsnoop hci log seems to be getting phased out of the user-accessible areas on a lot of phones. Assuming you have hci logging enabled, you can get a bugreport adb bugreport anewbugreportfolder Then decompress the folder. If you're lucky there is an 'FS' folder that contains the btsnoop_hci.log log several layers down (not sure why some phones have this and some don't.) If you don`t have it, grab the bug report text file that looks like this bugreport-2018-08-01-15-08-01.txt Run btsnooz.py against it. Per Google`s instructions, To extract snoop logs from the bug report, use the btsnooz script. Get btsnooz.py. Extract the text version of the bug report. Run btsnooz.py on the text version of the bug report: btsnooz.py BUG_REPORT.txt > BTSNOOP.log As of 8/1/18 the link to btsnooz is here: https://android.googlesource.com/platform/system/bt/+/master/tools/scripts/btsnooz.py LEGACY ANSWER: You can see where your phone is storing th

Can I Create Custom Slot Types Dynamically In Alexa Voice Service?

Answer : I think that, in fact, this is possible. You have to define a custom slot type, as explained here: https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/defining-the-voice-interface#custom-slot-types Now, the custom slot type asks you to provide possible values, which you should do. BUT! It seems that Alexa will still parse slot values correctly even if they are not in the list of possible values that you provided! This seems to be an undocumented feature and what I am telling you is based on my own observations: My custom slot type is taking on unexpected values In general, my impression is that the interaction model as a whole should be seen less as a strict set of rules and more as a guideline that is interpreted at the discretion of the Alexa Voice Service. I was able to achieve this exact thing by creating a custom intent called "Search" with a custom slot type called 'query.' This sends whatever the user says in the slot v

Append String Javascript Code Example

Example 1: string concatenation in js var str1 = "Hello " ; var str2 = "world!" ; var res = str1 . concat ( str2 ) ; console . log ( res ) ; Example 2: string concat javascript //This method adds two or more strings and returns a new single string. let str1 = new String ( "This is string one" ) ; let str2 = new String ( "This is string two" ) ; let str3 = str1 . concat ( str2 . toString ( ) ) ; console . log ( "str1 + str2 : " + str3 ) output : str1 + str2 : This is string oneThis is string two Example 3: javascript string concat vs + It is strongly recommended to use the string concatenationoperators ( + , += ) instead of String . concat method for perfomance reasons Example 4: js concatenate strings const str1 = 'Hello' ; const str2 = 'World' ; console . log ( str1 + str2 ) ; >> HelloWorld console . log ( str1 + ' ' + str2 ) ; >> He

Android Manifest Internet Permission Code Example

Example 1: allow internet permission android //add to AndroidManifest.xml < uses-permission android: name = " android.permission.INTERNET " /> Example 2: internet permission android < uses-permission android: name = " android.permission.INTERNET " /> Example 3: android internet permission < uses-permission android: name = " android.permission.INTERNET " /> Example 4: android studio Manifest.xml internet permissionm < uses-permission android: name = " android.permission.INTERNET " />

Ascii Code Enter Key Javascript Code Example

Example: keycode letters 0 48 1 49 2 50 3 51 4 52 5 53 6 54 7 55 8 56 9 57 a 65 b 66 c 67 d 68 e 69 f 70 g 71 h 72 i 73 j 74 k 75 l 76 m 77 n 78 o 79 p 80 q 81 r 82 s 83 t 84 u 85 v 86 w 87 x 88 y 89 z 90

Android Firebase Phone Auth Not Receiving SMS Second Time

Answer : In my case, I have my number on Phone numbers for testing (optional) Removing it from there, firebase started sending SMS Code to my number. Spark Plan offer 10k phone auth per month. So that you can test and deploy your app without paying a penny. In case someone is not getting the concept or reason of not sent sms again then please go through on my below details. I have been confused for very long time that why I didn't get sms for second time, third and so on.. First Read the original documentation: onVerificationCompleted(PhoneAuthCredential) This method is called in two situations: Instant verification: in some cases the phone number can be instantly verified without needing to send or enter a verification code. Auto-retrieval: on some devices, Google Play services can automatically detect the incoming verification SMS and perform verification without user action. (This capability might be unavailable with some carriers.)

Adding A Gradient Background To Appbar On Flutter

Image
Answer : I don't believe you can pass a gradient to an AppBar as it expects a Color rather than a gradient. You can, however, create your own widget that mimics an AppBar except by using a gradient. Take a look at this example that I've pieced together from the Planets-Flutter tutorial along with the code below it. import "package:flutter/material.dart"; class Page extends StatelessWidget { @override Widget build(BuildContext context) { return Column(children : <Widget>[GradientAppBar("Custom Gradient App Bar"), Container()],); } } class GradientAppBar extends StatelessWidget { final String title; final double barHeight = 50.0; GradientAppBar(this.title); @override Widget build(BuildContext context) { final double statusbarHeight = MediaQuery .of(context) .padding .top; return new Container( padding: EdgeInsets.only(top: statusbarHeight), height: statusbarHeight + barHeigh

Android Custom SeekBar - Progress Is Not Following The Thumb

Image
Answer : Your implementation relies on a ClipDrawable to draw the progress bar. The progress drawable spans the entire length of the progress bar but is shortened, or clipped, by the ClipDrawable . This leaves the rounded corners on the left of the progress bar but squares off the right side. You are seeing the squared-off side as the progress bar grows, catches up to and overtakes the thumb. There are probably several ways to solve this, but let's go for something that is XML-based. Let's replace the ClipDrawable with a ScaleDrawable as follows: bg_seekbar.xml <layer-list> <item android:id="@android:id/background"> <shape android:shape="rectangle"> <size android:height="48dp" /> <corners android:radius="25dp" /> <stroke android:width="1dp" android:color="@color/semiLightBlue" /> </shape

413 Request Entity Too Large

Answer : Add ‘client_max_body_size xxM’ inside the http section in /etc/nginx/nginx.conf, where xx is the size (in megabytes) that you want to allow. http { client_max_body_size 20M; } I had the same issue but in docker. when I faced this issue, added client_max_body_size 120M; to my Nginx server configuration, nginx default configuration file path is /etc/nginx/conf.d/default.conf server { client_max_body_size 120M; ... it resizes max body size to 120 megabytes. pay attention to where you put client_max_body_size , because it effects on its scope. for example if you put client_max_body_size in a location scope, only the location scope will be effected with. after that, I did add these three lines to my PHP docker file RUN echo "max_file_uploads=100" >> /usr/local/etc/php/conf.d/docker-php-ext-max_file_uploads.ini RUN echo "post_max_size=120M" >> /usr/local/etc/php/conf.d/docker-php-ext-post_max_size.ini RUN echo &qu

Activate Office Cmd Code Code Example

Example: cmd code to activate microsoft office 2016 @echo off title Activate Microsoft Office 2016 ALL versions for FREE!&cls&echo ============================================================================&echo #Project: Activating Microsoft software products for FREE without software&echo ============================================================================&echo.&echo #Supported products:&echo - Microsoft Office Standard 2016&echo - Microsoft Office Professional Plus 2016&echo.&echo.&(if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16")&(if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16")&(for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&(for /f %%x in ('

Check Uppercase Javascript Code Example

Example 1: uppercase javascript var str = "Hello World!" ; var res = str . toUpperCase ( ) ; //HELLO WORLD! Example 2: javascript check if all capital letter function isUpper ( str ) { return ! / [ a - z ] / . test ( str ) && / [ A - Z ] / . test ( str ) ; } isUpper ( "FOO" ) ; //true isUpper ( "bar" ) ; //false isUpper ( "123" ) ; //false isUpper ( "123a" ) ; //false isUpper ( "123A" ) ; //true isUpper ( "A123" ) ; //true isUpper ( "" ) ; //false Example 3: javascript uppercase string var str = "Hello World!" ; var res = str . toUpperCase ( ) ; Example 4: how to check string uppercase or lowersace using regex javascript var regex = / ^ (?= . * [ a - z ] ) (?= . * [ A - Z ] ) (?= . * [ 0 - 9 ] ) (?= . * [ !# \* \? ] ) (?= . {8,} ) / ; Example 5: how to find if given character in a string is uppercase or lowercase in javascript var str =

A Good Wxpython GUI Builder?

Image
Answer : There is wxGlade. Here is a screenshot: and wxFormBuilder Also, have a look here for more alternatives: GUI Programming in Python I've tried a few, and the only one I seem to have any luck with is wxFormBuilder In addition to those, some people really like the XRCed application that's included with wxPython. Basically you create your GUI in XML. There's also the defunct Boa Constructor that I see people still using on the wxPython user's list.

Windows Bat File Download File Code Example

Example 1: download file by command line windows iwr - outf index . html http : //superuser.com Example 2: download file by command line windows Invoke - WebRequest - OutFile index . html http : //superuser.com

Change Startup Programs Mac Code Example

Example: how to change what startup apps mac Open System Preferences. Go to Users & Groups. Choose your nickname on the left. Choose Login items tab. Check startup programs you want to remove. Press the “–” sign below. You're done.

A Tag Open In New Tab Code Example

Example 1: open link in a new tab hmtl < a href = " https://insert.url " target = " _blank " > The Website Linked </ a > Example 2: how to make a link in html that opens in a new tab add attribute : target = "_blank" Example 3: open new tab href < a target = " _blank " rel = " noopener noreferrer " href = " http://your_url_here.html " > Link </ a > Example 4: a tag open in new tab < a href = " # " target = " _blank " rel = " noopener noreferrer " > Link </ a >

2000 Dollars In Rupees Code Example

Example 1: 1.2 million dollar in indian rupees 12,00,000 United States Dollar equals 27,81,06,00,000.00 Vietnamese dong Example 2: 50 dollars in rupees print("Why is the Indian rupee goin so low at cost? Example 3: 2000 dollars in rupees 1,46,184.50

Brooklyn Nie Nine Code Example

Example: brooklyn nine nine Yeah this show seems to be great