Tutorial by Examples: au

If you need to add custom headers to your volley requests, you can't do this after initialisation, as the headers are saved in a private variable. Instead, you need to override the getHeaders() method of Request.class as such: new JsonObjectRequest(REQUEST_METHOD, REQUEST_URL, REQUEST_BODY, RESP_L...
As we know we can declare an array with default values: int[] arr = new int[10]; This will create an array of 10 integers with each element of the array having value 0 (the default value of type int). To create an array initialized with a non-default value, we can use Enumerable.Repeat from the...
<svg width="900px" height="400px" viewBox="900 400"> <defs> <filter id="GaussianHardEdge" x="0%" y="0%" width="100%" height="100%"> <feGaussianBlur stdDeviation="5"/&gt...
<svg width="800px" height="600px"> <defs> <filter id="focus-blur" > <feDiffuseLighting result = "diffOut" diffuseConstant = "1" lighting-color="white"> <feSpotLight id="spotlight" x =...
select '123' * 2; To make the multiplication with 2 MySQL automatically converts the string 123 into a number. Return value: 246 The conversion to a number starts from left to right. If the conversion is not possible the result is 0 select '123ABC' * 2 Return value: 246 select 'A...
This project is a self-contained example done completely in the Interface Builder. You should be able to work through it in 10 minutes or less. Then you can apply the concepts you learned to your own project. Here I just use UIViews but they can represent whatever view you like (ie, button, label...
$ git show # equivalent to 'git show HEAD' 'HEAD' names the commit on which you based the changes in the working tree, and is usually the symbolic name for the current branch. Many (but not all) commands that take revision parameter defaults to 'HEAD' if it is missing.
This example shows how a label's width can automatically resize when the text content changes. Pin the left and top edges Just use auto layout to add constraints to pin the left and top sides of the label. After that it will automatically resize. Notes This example comes from this Stack...
Go to the GitHub website Open your repository Click Settings Under GitHub Pages, click "Launch Automatic Page Generator" Follow the instructions
Run the following command, replacing username with the username, to clone all of the GitHub repositories for that user to the current directory. curl "https://api.github.com/users/username/repos?page=1&per_page=100" | grep -e 'git_url*' | cut -d \" -f 4 | xargs -L1 git clone T...
You can launch an application in several ways, depending on how you create you app. If your app is divided in two files ui.R and server.R or if all of your app is in one file. 1. Two files app Your two files ui.R and server.Rhave to be in the same folder. You could then launch your app by running ...
Nobody wants to require or include every time a class or inheritance is used. Because it can be painful and is easy to forget, PHP is offering so called autoloading. If you are already using Composer, read about autoloading using Composer. What exactly is autoloading? The name basically says it al...
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
A default constructor is a type of constructor that requires no parameters when called. It is named after the type it constructs and is a member function of it (as all constructors are). class C{ int i; public: // the default constructor definition C() : i(0){ // member initial...
Quite often you have a file which was edited within DOS or Windows and you are viewing it under UNIX. This can look like the following when you view the file with vi. First line of file^M Next Line^M And another^M If you wish to remove the ^M, it can be that you delete each ^M by hand. Alter...
class SortDataObject extends DataObject { private static $db = array( 'Name' => 'Varchar', 'SortOrder' => 'Int' ); private static $default_sort = 'SortOrder DESC'; }
Sometimes we want to prepare a context for each test to be run under. The setUp method is run prior to each test in the class. tearDown is run at the end of every test. These methods are optional. Remember that TestCases are often used in cooperative multiple inheritance so you should be careful to...
public class ReAuthenticateDialogFragment extends DialogFragment { @BindView(R.id.et_dialog_reauthenticate_email) EditText mEditTextEmail; @BindView(R.id.et_dialog_reauthenticate_password) EditText mEditTextPassword; private OnReauthenticateSuccessListener mOnReauthenticat...
Autowiring is done using a sterotype annotation to specify what classes are going to be beans in the ApplicationContext, and using the Autowired and Value annotations to specify bean dependencies. The unique part of autowiring is that there is no external ApplicationContext definition, as it is all...
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController include OmniConcern %w[facebook twitter gplus linkedin].each do |meth| define_method(meth) do create end end end Note: In the part “%w[facebook twitter gplus linkedin]”, you should list ...

Page 14 of 37