Tutorial by Examples: dis

Add the readonly attribute to prevent user input. A readonly field can't be edited <input class="form-control" type="text" placeholder="Readonly input here…" readonly> Add the disabled attribute to disable an input field. A disbled field can't be edited either...
To disable synchronization context you should call the ConfigureAwait method: async Task() Foo() { await Task.Run(() => Console.WriteLine("Test")); } . . . Foo().ConfigureAwait(false); ConfigureAwait provides a means to avoid the default SynchronizationContext capturi...
To install PHP on Ubuntu, first install the Redis server: sudo apt install redis-server then install the PHP module: sudo apt install php-redis And restart the Apache server: sudo service apache2 restart
Assuming a default server running on localhost with the default port, the command to connect to that Redis server would be: $redis = new Redis(); $redis->connect('127.0.0.1', 6379);
The Redis PHP module gives access to the same commands as the Redis CLI client so it is quite straightforward to use. The syntax is as follow: // Creates two new keys: $redis->set('mykey-1', 123); $redis->set('mykey-2', 'abcd'); // Gets one key (prints '123') var_dump($redis->get('m...
This document explains how to get Google Access tokens and use them to get Google Analytics data to be displayed in our websites. Example: A live example is available in https://newtonjoshua.com note: Use the same gmail account for all the below steps. STEP 1: Set Up Google Analytics Foll...
This document explains how to display your GitHub feeds/timeline on your website. Example: A live example is available at: https://newtonjoshua.com GitHub timeline: GitHub provides the public timeline for any user in Atom format. You can view your timeline at: https://github.com/{{GitHub...
A very useful and logical follow-up to histograms and density plots would be the Empirical Cumulative Distribution Function. We can use the function ecdf() for this purpose. A basic plot produced by the command plot(ecdf(rnorm(100)),main="Cumulative distribution",xlab="x") wo...
In a test you can disable animations by adding in setUp: app.launchEnvironment = ["animations": "0"] Where app is instance of XCUIApplication.
def createDissolvedGDB(workspace, gdbName): gdb_name = workspace + "/" + gdbName + ".gdb" if(arcpy.Exists(gdb_name): arcpy.Delete_management(gdb_name) arcpy.CreateFileGDB_management(workspace, gdbName, "") else: arcpy.CreateFi...
When in the SBT console, to list all definable settings for a project: settings Or, to get a subproject's (for example, named webapp) settings: project webapp settings The first line above navigates into the specific subproject. To show the value of a specific setting (for instance, organi...
Open Jenkins default config file and add in JAVA_ARGS next key -Djenkins.install.runSetupWizard=false In Ubuntu 16 default file places in /etc/default/jenkins Create groovy file by path $JENKINS_HOME/init.groovy.d/basic-security.groovy In Ubuntu 16 Jenkins home directory places in /var/li...
The file editor that ships with WordPress is a security risk. If an attacker gains admin access to your WordPress website they will be easily able to insert malicious code into theme and plugin files. It is also a risk with clients who don't know what they're doing. Once misplaced colon in the file ...
There are three equality operators: ==, ===, and isequal. (The last is not really an operator, but it is a function and all operators are functions.) When to use == == is value equality. It returns true when two objects represent, in their present state, the same value. For instance, it is obviou...
Sub DisplayExcelVersions() MsgBox "The version of Excel is " & Application.Version MsgBox "The version of the VBE is " & Application.VBE.Version End Sub The use of the Application.Version property is useful for ensuring code only operates on a compatible...
This will disable the SSH server side service, as if needed this will insure that clients cannot connect via ssh Ubuntu sudo service ssh stop Debian sudo /etc/init.d/ssh stop Arch Linux sudo killall sshd
If you don't want to extend Application and keep your toast messages thread safe, make sure you show them in the post execute section of your AsyncTasks. public class MyAsyncTask extends AsyncTask <Void, Void, Void> { @Override protected Void doInBackground(Void... params) { ...
here countInstance is a static class variable class StaticTest{ static countInstance : number= 0; constructor(){ StaticTest.countInstance++; } } new StaticTest(); new StaticTest(); console.log(StaticTest.countInstance);
One day I had a conversation with a friend of mine who uses Laravel PHP framework in his job. When I told him that Django has its own all-included HTML CRUD system, for interacting with the database, called Django admin, his eyes popped off! He told me: "It took me months to build an Admin inte...
There are two kinds of persistent storage modes in Redis: AOF and RDB. To temporarily disable RDB execute the following commands on the Redis command line: config set save "" to temporarily disable AOF execute the following from the Redis command line: config set appendonly no The...

Page 13 of 18