Tutorial by Examples: dse

//Creates a Random instance with a seed of 12345. Random random = new Random(12345L); //Gets a ThreadLocalRandom instance ThreadLocalRandom tlr = ThreadLocalRandom.current(); //Set the instance's seed. tlr.setSeed(12345L); Using the same seed to generate random numbers will return the sa...
Elm Reactor is the essential tool for prototyping your application. Please note, that you will not be able to compile Main.elm with Elm Reactor, if you are using Http.App.programWithFlags or Ports Running elm-reactor in a projects directory will start a web server with a project explorer, that all...
Useful information The very beginning of the text field text: let startPosition: UITextPosition = textView.beginningOfDocument The very end of the text field text: let endPosition: UITextPosition = textView.endOfDocument The currently selected range: let selectedRange: UITextRange? = textV...
Useful information The very beginning of the text field text: let startPosition: UITextPosition = textField.beginningOfDocument The very end of the text field text: let endPosition: UITextPosition = textField.endOfDocument The currently selected range: let selectedRange: UITextRange? = tex...
Selective imports may also be renamed. void main() { import std.stdio : fooln = writeln; fooln("Hello world"); }
Ubuntu Below are detailed instructions to install Caffe, pycaffe as well as its dependencies, on Ubuntu 14.04 x64 or 14.10 x64. Execute the following script, e.g. "bash compile_caffe_ubuntu_14.sh" (~30 to 60 minutes on a new Ubuntu). # This script installs Caffe and pycaffe. # CPU onl...
The JavaScript coding convention is to place the starting bracket of blocks on the same line of their declaration: if (...) { } function (a, b, ...) { } Instead of in the next line: if (...) { } function (a, b, ...) { } This has been adopted to avoid semicolon insertion ...
How To Install ANTLR in Eclipse (Last tested on Indigo and ANTLR IDE 2.1.2) Install Eclipse. Download ANTLR complete binaries jar that includes ANTLR v2. Extract to a temp directory. Copy the antlr-n.n folder to an appropriate permanent location, for example the same folder that Eclipse is in...
Lets say we have a class Classy that has property Propertua public class Classy { public string Propertua {get; set;} } to set Propertua using reflection: var typeOfClassy = typeof (Classy); var classy = new Classy(); var prop = typeOfClassy.GetProperty("Propertua"); prop.Se...
Now we want to install nginx to serve our application. sudo apt-get install nginx # on debian/ubuntu Then we create a configuration for our website cd /etc/nginx/site-available # go to the configuration for available sites # create a file flaskconfig with your favourite editor flaskconfig...
Audio stream types There are different profiles of ringtone streams. Each one of them has it's different volume. Every example here is written for AudioManager.STREAM_RING stream type. However this is not the only one. The available stream types are: STREAM_ALARM STREAM_DTMF STREAM_MUSIC STR...
OSX Implement the contract of the role-specific protocol (NSAccessibilityButton, NSAccessibilityImage, NSAccessibilityGroup, etc) within the NSAccessibility protocol that best matches the behavior of the GUI element being rendered. Linux / BSD For GNOME applications, the GNOME Accessibility Impl...
Installation Volley JCenter Gradle Import //in your project's app level build.gradle compile 'com.android.volley:volley:1.0.0' Create a subclass of Application public class AppController extends Application { public static final String TAG = AppController.class .getSimpleN...
This trick helps you select an element using the ID as a value for an attribute selector to avoid the high specificity of the ID selector. HTML: <div id="element">...</div> CSS #element { ... } /* High specificity will override many selectors */ [id="element&quo...
entry = tk.Entry(parent, width=10) entry.insert(0, "Hello, World!")
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...
Resolving scoped services during application startup can be difficult, because there is no request and hence no scoped service. Resolving a scoped service during application startup via app.ApplicationServices.GetService<AppDbContext>() can cause issues, because it will be created in the sc...
The first thing to do is to add the service to AndroidManifest.xml, inside the <application> tag: <application ...> ... <service android:name=".RecordingService" <!--"enabled" tag specifies Whether or not the service can ...
Add the I18N nuget package to your MVC project. In web.config, add the i18n.LocalizingModule to your <httpModules> or <modules> section. <!-- IIS 6 --> <httpModules> <add name="i18n.LocalizingModule" type="i18n.LocalizingModule, i18n" /> &...
Modifying the strings returned by the standard functions getenv(), strerror() and setlocale() is undefined. So, implementations may use static storage for these strings. The getenv() function, C11, §7.22.4.7, 4, says: The getenv function returns a pointer to a string associated with the matched...

Page 5 of 10