Tutorial by Examples: al

Introduction Maps stores key/value pairs, where each key has an associated value. Given a particular key, the map can look up the associated value very quickly. Maps, also known as associate array, is an object that stores the data in form of keys and values. In Java, maps are represented using Ma...
DELETE FROM Helloworlds This will delete all the data from the table. The table will contain no rows after you run this code. Unlike DROP TABLE, this preserves the table itself and its structure and you can continue to insert new rows into that table. Another way to delete all rows in table is ...
Static .Net library methods can be called from PowerShell by encapsulating the full class name in third bracket and then calling the method using :: #calling Path.GetFileName() C:\> [System.IO.Path]::GetFileName('C:\Windows\explorer.exe') explorer.exe Static methods can be called from the c...
When assigning to a single object, a query that returns anything other than a single row will throw a QueryException. try { Account a = [SELECT Id FROM Account WHERE Name = 'Non-existent Account']; } catch (QueryException e) { // List has no rows for assignment to SObject } try { ...
Often you will want to perform asynchronous operations in parallel. There is direct syntax that supports this in the async/await proposal, but since await will wait for a promise, you can wrap multiple promises together in Promise.all to wait for them: // Not in parallel async function getFriend...
entry = tk.Entry(parent, width=10) entry.insert(0, "Hello, World!")
The value of an entry widget can be obtained with the get method of the widget: name_entry = tk.Entry(parent) ... name = name_entry.get() Optionally, you may associate an instance of a StringVar, and retrieve the value from the StringVar rather than from the widget: name_var = tk.StringVar() ...
If you like to show the dialog without the close button (i.e. the x button in the upper-right corner of the dialog), perhaps because you want to force the user to select one of options or buttons in the dialog itself: 1- Give your dialog a CSS class: $("#selector").dialog({ closeOnE...
Download: To set up WebSphere Liberty, download the latest zip from WASdev.net. Layout: Once you have the zip, extract it to any location on your file system. The basic layout of a Liberty install is the following: wlp/ # WLP_INSTALL_DIR bin/ # location of scrip...
We shall create a simple Alert Dialog in Xamarin.Android Now considering you have gone through the getting started guide from the documentation. You must be having the project structure like this: Your Main Activity must be looking like this: public class MainActivity : Activity { ...
Individual elements can be accessed through indexes. Python arrays are zero-indexed. Here is an example : my_array = array('i', [1,2,3,4,5]) print(my_array[1]) # 2 print(my_array[2]) # 3 print(my_array[0]) # 1
my_array = array('i', [1,2,3,4,5]) my_array.append(6) # array('i', [1, 2, 3, 4, 5, 6]) Note that the value 6 was appended to the existing array values.
We can use the insert() method to insert a value at any index of the array. Here is an example : my_array = array('i', [1,2,3,4,5]) my_array.insert(0,0) #array('i', [0, 1, 2, 3, 4, 5]) In the above example, the value 0 was inserted at index 0. Note that the first argument is the index while se...
Detailed instructions on getting testing set up or installed.
Provided that barButtonItem has a non-null image property (e.g. set in the Interface Builder). Objective-C barButtonItem.image = [barButtonItem.image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
An alert box can be popped-up on a Xamarin.Forms Page by the method, DisplayAlert. We can provide a Title, Body (Text to be alerted) and one/two Action Buttons. Page offers two overrides of DisplayAlert method. public Task DisplayAlert (String title, String message, String cancel) This overri...
Name-based virtual hosting on Apache is described on the Apache website as such: With name-based virtual hosting, the server relies on the client to report the hostname as part of the HTTP headers. Using this technique, many different hosts can share the same IP address. Therefore, more than...
Add this to your $MYVIMRC: " Source vim configuration file whenever it is saved if has ('autocmd') " Remain compatible with earlier versions augroup Reload_Vimrc " Group name. Always use a unique name! autocmd! " Clear any preexisting autoc...
Get NSData from Hexadecimal String + (NSData *)dataFromHexString:(NSString *)string { string = [string lowercaseString]; NSMutableData *data= [NSMutableData new]; unsigned char whole_byte; char byte_chars[3] = {'\0','\0','\0'}; int i = 0; int length = (int) string.len...
Create a file named '.jshintrc' in the root of your app, where package.json is. *Note on windows: create a file named "jshintrc.txt". Then rename it to ".jshintrc." (notice the dot at the end). This is a configuration file. It can for example tell jshint to ignore certain varia...

Page 130 of 269