Tutorial by Examples: l

If you create files for exporting via USB cable to desktop using MTP protocol, may be a problem that newly created files are not immediately visible in the file explorer running on the connected desktop PC. To to make new files visible, you need to call MediaScannerConnection: File file = new File(...
Small files are processed in a fraction of second and you can read / write them in place of the code where you need this. However if the file is bigger or otherwise slower to process, you may need to use AsyncTask in Android to work with the file in the background: class FileOperation extends A...
Say you have the string s = 'AAAABBBCCDAABBB' and you would like to split it so all the 'A's are in one list and so with all the 'B's and 'C', etc. You could do something like this s = 'AAAABBBCCDAABBB' s_dict = {} for i in s: if i not in s_dict.keys(): s_dict[i] = [i] els...
This example illustrates how the default key is chosen if we do not specify any c = groupby(['goat', 'dog', 'cow', 1, 1, 2, 3, 11, 10, ('persons', 'man', 'woman')]) dic = {} for k, v in c: dic[k] = list(v) dic Results in {1: [1, 1], 2: [2], 3: [3], ('persons', 'man', 'woman'): [('...
Notice in this example that mulato and camel don't show up in our result. Only the last element with the specified key shows up. The last result for c actually wipes out two previous results. But watch the new version where I have the data sorted first on same key. list_things = ['goat', 'dog', 'do...
In this example we see what happens when we use different types of iterable. things = [("animal", "bear"), ("animal", "duck"), ("plant", "cactus"), ("vehicle", "harley"), \ ("vehicle", "speed b...
class ParentClass { [string] $Message = "Its under the Parent Class" [string] GetMessage() { return ("Message: {0}" -f $this.Message) } } # Bar extends Foo and inherits its members class ChildClass : ParentClass { } $Inherit = [ChildClass...
From Java 8 onwards, the Lambda operator ( -> ) is the operator used to introduce a Lambda Expression. There are two common syntaxes, as illustrated by these examples: Java SE 8 a -> a + 1 // a lambda that adds one to its argument a -> { return a + 1; } // an equivalen...
Naturally, being able to install hard drive cloning utilities can be an important aspect of installing and maintaining your operating system. Getting set up with Clonezilla is surprisingly less straightforward than I'd have expected. The wealth of options, while valuable, also makes each part of id...
Reference the ArcGIS JavaScript API from our CDN and you are ready to get started:
require(["esri/map", "dojo/domReady!"], function(Map) { var map = new Map("map", { center: [-118, 34.5], zoom: 8, basemap: "topo" }); });
Starting with version 3.2 of the ArcGIS API for JavaScript, developers must include an additional Cascading Style Sheet (CSS) file: esri.css. The URL for this file is: // versions 3.11 and forward <link rel="stylesheet" href="https://js.arcgis.com/API-VERSION/esri/css/esri.css&...
The esri.css file does not include the CSS for various Dojo widgets or themes like tundra or claro; those files must be included separately. Exceptions are the Grid and RangeSlider, which are used by widgets in the API. Grid styles must be explicitly included. For instance, this CSS file would be i...
This query will join three tables: Customer, Order and Orderline. The use of the OF statement as in childtable OF parenttable assumes that indexes are constructed in a specific way. That is the case in the sports2000-database. DEFINE QUERY q1 FOR Customer, Order, Orderline. OPEN QUERY q1 FOR EA...
Keras is a high-level neural networks library, written in Python and capable of running on top of either TensorFlow or Theano. It was developed with a focus on enabling fast experimentation. Being able to go from idea to result with the least possible delay is key to doing good research. Use Keras ...
In Twig templates variables can be accessed using double curly braces notation {{ variableName }}. Basic example of greeting user <!DOCTYPE html> <html> <body> <span>Hello {{ name }}</span> </body> </html> Accessing array elements Twig as ...
Variables can be modified using filters. To apply filter to variable follow variable name with pipe | and filter name: {{ variable|filterName }} For example to display variable value in uppercase use construct. {{ variable|upper }} Filters can be parametrized. Filter parameters are passed in...
To find a module that ends with DSC Find-Module -Name *DSC
If for some reason, the default PowerShell module repository PSGallery gets removed. You will need to create it. This is the command. Register-PSRepository -Default
Find-Module -Name <Name>

Page 696 of 861