Posts

Showing posts from December, 2019

Apache Tomcat Download Code Example

Example: download apache tomcat 8.0 for eclipse Apache Tomcat® - Apache Tomcat 8 Software Downloadstomcat.apache.org › download-80

Android Can't Record Video With Front Facing Camera, MediaRecorder Start Failed: -19

Answer : I wrestled with this problem a bit today, too. First, make sure that your permissions are set up correctly. Specifically, to record video, you'll want: <uses-feature android:name="android.hardware.camera.front" /> <uses-feature android:name="android.hardware.microphone"/> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> Second, and this is the tricky part, this line from the tutorial does not work with the front-facing camera! mMediaRecorder.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH)); That signature for CamcorderProfile.get() defaults to a profile for the back-facing camera: Returns the camcorder profile for the first back-facing camera on the device at the given quality level. If the device has n

Attack On Titan Map Code Example

Example 1: Attack on titan U can Watch it on Gogoanime.so Example 2: Attack on titan Written by Eren Yaeger

Check Checkbox Is Checked Or Not In Jquery Using Checkbox Code Example

Example 1: How to check whether a checkbox is checked in jQuery? //using plane javascript if ( document . getElementById ( 'on_or_off_checkbox' ) . checked ) { //I am checked } //using jQuery if ( $ ( '#on_or_off_checkbox' ) . is ( ':checked' ) ) { //I am checked } Example 2: jquery checkbox checked value if ( $ ( '#check_id' ) . is ( ":checked" ) ) { // it is checked }

Int To String In CPP Code Example

Example 1: change int to string cpp # include <string> std :: string s = std :: to_string ( 42 ) ; Example 2: c++ int to string # include <string> using namespace std ; int iIntAsInt = 658 ; string sIntAsString = to_string ( iIntAsInt ) ; Example 3: convert int to string c++ int x = 5 ; string str = to_string ( x ) ; Example 4: convert integer to string c++ std :: to_string ( 23213.123 ) Example 5: how to convert int to string c++ # include <iostream> # include <string> using namespace std ; int main ( ) { int i = 11 ; string str = to_string ( i ) ; cout << "string value of integer i is :" << str << "\n" ; return 0 ; } Example 6: c++ int to string // ----------------------------------- C++ 11 and onwards // EXAMPLE # include <string> int iIntAsInt = 658 ; std :: string sIntAsString = to_string ( iIntAsInt ) ; /* SYNTAX to_string(<your

Cdn Bootstrap-responsive.css W3schools Code Example

Example: bootstrap add html < script src = " https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js " > </ script > < script src = " https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js " > </ script >

Androidx MutliDex: The Number Of Method References In A .dex File Cannot Exceed 64K

Answer : Modify the module-level build.gradle file to enable multidex and add the multidex library as a dependency, as shown here: android { defaultConfig { ... minSdkVersion 16 targetSdkVersion 28 multiDexEnabled true } ... } dependencies { implementation 'com.android.support:multidex:1.0.3' } If you do not override the Application class, edit your manifest file to set android:name in the tag as follows: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.myapp"> <application android:name="android.support.multidex.MultiDexApplication" > ... </application> </manifest> If you do override the Application class, change it to extend MultiDexApplication (if possible) as follows: ... import androidx.multidex.M

Check If The File Exists Using VBA

Answer : Note your code contains Dir("thesentence") which should be Dir(thesentence) . Change your code to this Sub test() thesentence = InputBox("Type the filename with full extension", "Raw Data File") Range("A1").Value = thesentence If Dir(thesentence) <> "" Then MsgBox "File exists." Else MsgBox "File doesn't exist." End If End Sub Use the Office FileDialog object to have the user pick a file from the filesystem. Add a reference in your VB project or in the VBA editor to Microsoft Office Library and look in the help. This is much better than having people enter full paths. Here is an example using msoFileDialogFilePicker to allow the user to choose multiple files. You could also use msoFileDialogOpen . 'Note: this is Excel VBA code Public Sub LogReader() Dim Pos As Long Dim Dialog As Office.FileDialog Set Dialog = Application.FileDialog(msoFileDialogFilePicker

Chrome Extensions On Ipad Code Example

Example: chrome extension on ipad No, Chrome extensions do not work on iPad or iPhone. There is no web browser for the iPad that allows a desktop-level extension. It is not Apple’s policy to allow developers to include downloadable module engines in their apps, for multiple reasons which also include Apple’s security restrictions.

Adding Data Attribute To DOM

Answer : Use the .data() method: $('div').data('info', '222'); Note that this doesn't create an actual data-info attribute. If you need to create the attribute, use .attr() : $('div').attr('data-info', '222'); jQuery's .data() does a couple things but it doesn't add the data to the DOM as an attribute. When using it to grab a data attribute, the first thing it does is create a jQuery data object and sets the object's value to the data attribute. After that, it's essentially decoupled from the data attribute. Example: <div data-foo="bar"></div> If you grabbed the value of the attribute using .data('foo') , it would return "bar" as you would expect. If you then change the attribute using .attr('data-foo', 'blah') and then later use .data('foo') to grab the value, it would return "bar" even though the DOM says data-foo="blah

Android - Bought A New Battery, Do I Need To Calibrate It?

Answer : No Calibration of batteries (Li Ion or Li Po, used in almost all mobile devices) is a myth You can start using it straight away and charge as you normally did with earlier batteries This post will help you understand more: Looking for a consistent answer about battery calibration Using calibration apps doesn't really help as the battery files in system (to which these apps write) are renewed and previous data erased when you charge / reboot As explained in this article It [ Batterystats.bin file which stores calibration information ] has no impact on the current battery level shown to you. It has no impact on your battery life.......it is reset every time you unplug from power with a relatively full charge (thus why the battery usage UI data resets at that point)... Explanation in Italics mine from the same article Related Myth : Charging a new battery for X hours Charging a new battery for x hours before use is a " legacy hangover &quo

Check If A String Exists In An Array Case Insensitively

Answer : Xcode 8 • Swift 3 or later let list = ["kashif"] let word = "Kashif" if list.contains(where: {$0.caseInsensitiveCompare(word) == .orderedSame}) { print(true) // true } alternatively: if list.contains(where: {$0.compare(word, options: .caseInsensitive) == .orderedSame}) { print(true) // true } if you would like to know the position(s) of the element in the array (it might find more than one element that matches the predicate): let indices = list.indices.filter { list[$0].caseInsensitiveCompare(word) == .orderedSame } print(indices) // [0] You can also use localizedStandardContains method which is case and diacritic insensitive: func localizedStandardContains<T>(_ string: T) -> Bool where T : StringProtocol Discussion This is the most appropriate method for doing user-level string searches, similar to how searches are done generally in the system. The search is locale-aware, case and diacritic insensitive. The exact list of s

Animation Wow Code Example

Example 1: wow animation < script src = " js/wow.min.js " > </ script > < script > new WOW ( ) . init ( ) ; </ script > Example 2: wow.js < div class = " wow " > Content to Reveal Here </ div >

Bootstrap Mdb-select Md-form Cdn Code Example

Example 1: md bootstrap cdn <!-- Font Awesome --> < link rel = " stylesheet " href = " https://use.fontawesome.com/releases/v5.8.2/css/all.css " > <!-- Google Fonts --> < link rel = " stylesheet " href = " https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap " > <!-- Bootstrap core CSS --> < link href = " https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css " rel = " stylesheet " > <!-- Material Design Bootstrap --> < link href = " https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.19.1/css/mdb.min.css " rel = " stylesheet " > Example 2: mdb CDN <!-- JQuery --> < script type = " text/javascript " src = " https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js " > </ script > <!-- Bootstrap tooltips --> < script type =