Tutorial by Examples: edit

Editing or updating a resource is a common purpose for APIs. Edits can be achieved by sending either POST, PUT or PATCH requests to the respective resource. Although POST is allowed to append data to a resource's existing representation it is recommended to use either PUT or PATCH as they convey a m...
Extra care should be taken when accessing serialized fields in a ScriptableObject instance. If a field is marked public or serialized through SerializeField, changing its value is permanent. They do not reset when exiting playmode like MonoBehaviours do. This can be useful at times, but it can also...
Without a backup copy (not supported on Windows) perl -i -pe's/foo/bar/g' file.txt With a backup copy file.txt.bak perl -i.bak -pe's/foo/bar/g' file.txt With a backup copy old_file.txt.orig in the backup subdirectory (provided the latter exists): perl -i'backup/old_*.orig' -pe's/foo/bar/g' ...
NSAttributedString (and its mutable sibling NSMutableAttributedString) allows you to create strings that are complex in their appearance to the user. A common application is to use this to display a string and adding custom kerning / letter-spacing. This would be achieved as follows (where label ...
Firstly the classes from the jar need to be loaded. We'll use three methods for this process: loadClasses(File) readJar(JarFile, JarEntry, Map) getNode(byte[]) Map<String, ClassNode> loadClasses(File jarFile) throws IOException { Map<String, ClassNode> classes = new HashMap&...
Open index.ios.js or index.android.js and delete everything between the <View> </View>. After that, write <Text> Hello World! </Text> and run the emulator. You should see Hello World! written on the screen! Congrats! You've successfully written your first Hello World!
# example data DT = as.data.table(mtcars, keep.rownames = TRUE) Editing a column Use the := operator inside j to create new columns or modify existing ones: DT[, mpg_sq := mpg^2] Editing on a subset of rows Use the i argument to subset to rows "where" edits should be made: DT[1:...
[SerializeField] GameObject[] gameObjects; ProsConsGreat performanceObject collection is staticPortable codeCan only refer to GameObjects from the same scene
ShortcutDescriptionCtrl + amove to the beginning of the lineCtrl + emove to the end of the lineCtrl + kKill the text from the current cursor position to the end of the line.Ctrl + uKill the text from the current cursor position to the beginning of the lineCtrl + wKill the word behind the current cur...
Sometimes you will make a mistake with a lengthy macro, but would rather edit it than re-record it entirely. You can do this using the following process: Put the macro on an empty line with "<register>p. If your macro is saved in register a, the command is "ap. Edit the ma...
Why an Editor Window? As you may have seen, you can do a lot of things in a custom inspector (if you don't know what a custom inspector is, check the example here : http://www.riptutorial.com/unity3d/topic/2506/extending-the-editor. But at one point you may want to implement a configuration panel, ...
You can save the layout of your tabs and windows to standardize your work environment. The layouts menu can be found in the upper right corner of Unity Editor: Unity ships with 5 default layouts (2 by 3, 4 Split, Default, Tall, Wide) (marked with 1). In the picture above, aside from default layo...
To know the path of the directory your file is in you can use: Esc to enter command mode :pwd This will print the path to the directory at the bottom of the editor, like this I'm a ninja ~ ~ ~ ~ ~ /home/ubuntu/myfolder 1,5 All Now...
add_action( 'pre_get_posts', 'single_category_exclude' ); function single_category_exclude( $query ) { if( !$query->is_main_query() || is_admin() ) return; $query->set( 'cat', '-1' ); return; }
Create this class : public class InputFilterMinMax implements InputFilter { private int min, max; public InputFilterMinMax(int min, int max) { this.min = min; this.max = max; } public InputFilterMinMax(String min, String max) { this.min = Integer...
Save the session variable as a variable. $session = Yii::$app->session; $sess = $session['keys']; Then create or update the array value you want $sess['first'] = 'abc'; And finally save to the session variable $session['keys'] = $sess
void alertDialogDemo() { // get alert_dialog.xml view LayoutInflater li = LayoutInflater.from(getApplicationContext()); View promptsView = li.inflate(R.layout.alert_dialog, null); AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder( ...
The default editor that will be involked by any scripts or programs, usually vi or emacs. ~> $ echo $EDITOR vi
Editor templates are a good way to reuse Razor code. You can define editor templates as Razor partial views and then use them in other views. Editor templates usually exist in the Views/Shared/EditorTemplates/ folder, although they can also be saved to the Views/ControllerName/EditorTemplates/ fold...
EditableAttribute sets whether users should be able to change the value of the class property. public class Employee { [Editable(false)] public string FirstName { get; set; } } Simple usage example in XAML application <Window x:Class="WpfApplication.MainWindow" ...

Page 2 of 5