Tutorial by Examples: change

One more PCRE modifier that allows the use of duplicate named groups. NOTE: only inline version is supported - (?J), and must be placed at the start of the pattern. If you use /(?J)\w+-(?:new-(?<val>\w+)|\d+-empty-(?<val>[^-]+)-collection)/ the "val" group values will be ...
The change the definition of a db column, the query below can be used for example, if we have this db schema users ( firstname varchar(20), lastname varchar(20), age char(2) ) To change the type of age column from char to int, we use the query below: ALTER TABLE users CHANGE age...
In the Adobe technical white paper Adobe Acrobat 9 Digital Signatures, Changes and Improvements, especially its section "Allowed and disallowed changes", Adobe clarifies the allowed changes (as seen by Acrobat 9 and up) that can be made to a certified or signed document without invalidatin...
The following code is taken from he official AutoHotkey documentation: Function implementation: #Persistent OnClipboardChange("ClipChanged") return ClipChanged(Type) { ToolTip Clipboard data type: %Type% Sleep 1000 ToolTip ; Turn off the tip. } Label implementati...
The Repeat command, executed with the dot or period key (.), is more useful than it first appears. Once learned, you will find yourself using it often. Command:Description.Repeat the last change10.Repeat the last change 10 times So then, for a very simple example, if you make a change to line 1 by...
Given a DataFrame with MultiIndex columns # build an example DataFrame midx = pd.MultiIndex(levels=[['zero', 'one'], ['x','y']], labels=[[1,1,0,],[1,0,1,]]) df = pd.DataFrame(np.random.randn(2,3), columns=midx) In [2]: df Out[2]: one zero y x ...
Start with a standard DataFrame df = pd.DataFrame(np.random.randn(2,3), columns=['a','b','c']) In [91]: df Out[91]: a b c 0 -0.911752 -1.405419 -0.978419 1 0.603888 -1.187064 -0.035883 Now to change to MultiIndex, create a MultiIndex object and assign it to df....
You can use the archivesBaseName to set the name of apk. For example: defaultConfig { .... project.ext.set("archivesBaseName", "MyName-" + defaultConfig.versionName); } You will obtain this output. MyName-X.X.X-release.apk
array_flip function will exchange all keys with its elements. $colors = array( 'one' => 'red', 'two' => 'blue', 'three' => 'yellow', ); array_flip($colors); //will output array( 'red' => 'one', 'blue' => 'two', 'yellow' => 'three' )
We can just do simple replacement of separators from space to new line, as following example. echo $sentence | tr " " "\n" It'll split the value of the variable sentence and show it line by line respectively.
This implementation of IDatabaseInitializer drops and recreates the database if the model changes automatically. Usage: public class MyContext : DbContext { public MyContext() { Database.SetInitializer(new DropCreateDatabaseIfModelChanges<MyContext>()); } }
Sometimes you might have branches lying around that have already had their changes merged into master. This finds all branches that are not master that have no unique commits as compared to master. This is very useful for finding branches that were not deleted after the PR was merged into master. ...
let playerLayoutChangeListener = new android.view.View.OnLayoutChangeListener( { onLayoutChange : function ( v:View, left:number, top:number, right:number, bottom:number, oldLeft:number, oldTop:number, oldRight:number, oldBottom:number):any { if (left != oldLeft || top != oldTop ...
You can take a look at the full code in this working Plunker. In this example I use a shared service to handle the communication between the pages inside the tab (child pages) and the tab container (the component that holds the tabs). Even though you probably could do it with Events I like the shar...
Simple pull When you are working on a remote repository (say, GitHub) with someone else, you will at some point want to share your changes with them. Once they have pushed their changes to a remote repository, you can retrieve those changes by pulling from this repository. git pull Will do it, ...
Get Compressed Bitmap from Singleton class: ImageView imageView = (ImageView)findViewById(R.id.imageView); Bitmap bitmap = ImageUtils.getInstant().getCompressedBitmap("Your_Image_Path_Here"); imageView.setImageBitmap(bitmap); ImageUtils.java: public class ImageUtils { public ...
There is a signal WINCH ( WINdowCHange), which is fired when one resizes a terminal window. declare -x rows cols update_size(){ rows=$(tput lines) # get actual lines of term cols=$(tput cols) # get actual columns of term echo DEBUG terminal window has no $rows lines and is $cols chara...
context.globalAlpha=0.50 You can change the opacity of new drawings by setting the globalAlpha to a value between 0.00 (fully transparent) and 1.00 (fully opaque). The default globalAlpha is 1.00 (fully opaque). Existing drawings are not affected by globalAlpha. // draw an opaque rectangle co...
An observable is created from the TextChanged event of the TextBox. Also any input is only selected if it's different from the last input and if there was no input within 0.5 seconds. The output in this example is sent to the console. Observable .FromEventPattern(textBoxInput, "TextChan...

Page 6 of 10