Tutorial by Examples: change

Snippet public class Person : INotifyPropertyChanged { private string _address; public event PropertyChangedEventHandler PropertyChanged; private void OnPropertyChanged(string propertyName) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName))...
Snippet public class BugReport : INotifyPropertyChanged { public string Title { ... } public BugStatus Status { ... } } ... private void BugReport_PropertyChanged(object sender, PropertyChangedEventArgs e) { var bugReport = (BugReport)sender; switch (e.PropertyName) ...
As you use generic types with utility classes, you may often find that number types aren't very helpful when specified as the object types, as they aren't equal to their primitive counterparts. List<Integer> ints = new ArrayList<Integer>(); Java SE 7 List<Integer> ints = new A...
Parentheses are now forbidden around named parameters. The following compiles in C#5, but not C#6 5.0 Console.WriteLine((value: 23)); Operands of is and as are no longer allowed to be method groups. The following compiles in C#5, but not C#6 5.0 var result = "".Any is byte; T...
git add -A 2.0 git add . In version 2.x, git add . will stage all changes to files in the current directory and all its subdirectories. However, in 1.x it will only stage new and modified files, not deleted files. Use git add -A, or its equivalent command git add --all, to stage all ch...
Usually, you have to use git add or git rm to add changes to the index before you can git commit them. Pass the -a or --all option to automatically add every change (to tracked files) to the index, including removals: git commit -a If you would like to also add a commit message you would do: g...
git reset <filePath>
On StackExchange sites, code snippets may provide optional syntax highlighting. On sites like Stack Overflow the default language is derived from the tags used in the associated question (if applicable). In addition, a code snippet's syntax highlighting language may also be defined by adding an HTML...
To see the log with changes inline, use the -p or --patch options. git log --patch Example (from Trello Scientist repository) ommit 8ea1452aca481a837d9504f1b2c77ad013367d25 Author: Raymond Chou <[email protected]> Date: Wed Mar 2 10:35:25 2016 -0800 fix readme error link diff ...
When creating animations and other GPU-heavy actions, it's important to understand the will-change attribute. Both CSS keyframes and the transition property use GPU acceleration. Performance is increased by offloading calculations to the device's GPU. This is done by creating paint layers (parts of...
The working copy (WC) is your local and private workspace that you use to interact with the central Subversion repository. You use the working copy to modify the contents of your project and fetch changes committed by others. The working copy contains your project's data and looks and acts like a r...
To publish the changes you made in your working copy, run the svn commit command. IMPORTANT: Review your changes before committing them! Use svn status and svn diff to review the changes. Also, make sure you are in the correct path before performing a commit. If you updated many files across vari...
During a merge, you can pass --ours or --theirs to git checkout to take all changes for a file from one side or the other of a merge. $ git checkout --ours -- file1.txt # Use our version of file1, delete all their changes $ git checkout --theirs -- file2.txt # Use their version of file2, delete ...
When local changes are present, the git pull command aborts reporting : error: Your local changes to the following files would be overwritten by merge In order to update (like svn update did with subversion), you can run : git stash git pull --rebase git stash pop A convenient way coul...
Reachability uses NSNotification messages to alert observers when the network state has changed. Your class will need to become an observer. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reachabilityChanged:) name:kReachabilityChangedNotification object:nil]; Elsewher...
The following Go file can be compiled into a continuous external collector that will query a MSSQL server database that uses the StackExchange.Exceptional schema. It will query multiple servers/databases for all exceptions since UTC 00:00 to convert the raw entries into a counter. It also uses the b...
You can see what "hunks" of work would be staged for commit using the patch flag: git add -p or git add --patch This opens an interactive prompt that allows you to look at the diffs and let you decide whether you want to include them or not. Stage this hunk [y,n,q,a,d,/,s,e,?]? ...
VoiceOver works great most of the time, breezily reading aloud screens full of content and intuitively following the user. Alas, no general solution is perfect. Sometimes only you, the app developer, know where VoiceOver should be focused for an optimal user experience. Fortunately, VoiceOver listen...
In many cases, content within a single screen will update with new or different content. For example, imagine a form that reveals additional options based on the user’s answer to a previous question. In this case, a “layout change” notification lets you either announce the change or focus on a new e...
To show all staged and unstaged changes, use: git diff HEAD NOTE: You can also use the following command: git status -vv The difference being that the output of the latter will actually tell you which changes are staged for commit and which are not.

Page 1 of 10