Note: "Forked" from Latency Numbers Every Programmer Should Know
| Event | Nanoseconds | Microseconds | Milliseconds | Comparison |
|---|---|---|---|---|
| L1 cache reference | 0.5 | - | - | - |
| Branch mispredict | 5.0 | - | - | - |
| L2 cache reference | 7.0 | - | - | 14x L1 cache |
| Mutex lock/unlock | 25.0 | - | - | - |
| DROP TABLE IF EXISTS Table2; | |
| DROP TABLE IF EXISTS Table1; | |
| CREATE TABLE Table1 | |
| ( | |
| -- Other columns | |
| [Id] INT PRIMARY KEY, | |
| [Modified] DATETIME2 | |
| ) |
Note: "Forked" from Latency Numbers Every Programmer Should Know
| Event | Nanoseconds | Microseconds | Milliseconds | Comparison |
|---|---|---|---|---|
| L1 cache reference | 0.5 | - | - | - |
| Branch mispredict | 5.0 | - | - | - |
| L2 cache reference | 7.0 | - | - | 14x L1 cache |
| Mutex lock/unlock | 25.0 | - | - | - |
| ls *.<file-ext> | entr pandoc *.<file-ext> -o <output-name> |
| If the commit you want to fix isn’t the most recent one: | |
| git rebase --interactive $parent_of_flawed_commit | |
| If you want to fix several flawed commits, pass the parent of the oldest one of them. | |
| An editor will come up, with a list of all commits since the one you gave. | |
| Change pick to reword (or on old versions of Git, to edit) in front of any commits you want to fix. | |
| Once you save, Git will replay the listed commits. |
| git fetch origin pull/2/head | |
| git checkout -b pullrequest FETCH_HEAD | |
| OR | |
| git fetch origin pull/<#>/head:<local_branch_name> |
| brew rm FORMULA | |
| brew rm $(join <(brew leaves) <(brew deps FORMULA)) | |
| Run the last line a until `echo $(join <(brew leaves) <(brew deps FORMULA))` returns nothing OR until the last line informs you that `This command requires a keg argument`. |
| var jq = document.createElement('script'); | |
| jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
| document.getElementsByTagName('head')[0].appendChild(jq); | |
| // ... give time for script to load, then type. | |
| jQuery.noConflict(); | |
| // Include latest version | |
| javascript:if(!window.jQuery||confirm('Overwrite\x20current\x20version?\x20v'+jQuery.fn.jquery))(function(d,s){s=d.createElement('script');s.src='http://code.jquery.com/jquery.js';(d.head||d.documentElement).appendChild(s)})(document); | |
| // Include specific version |
| CREATE TABLE cast_info AS | |
| SELECT DISTINCT ci.movie_id, ci.person_id, cn.name AS char_name, rt.role, ci.note, ci.nr_order | |
| FROM imdb.ex x, imdb.cast_info ci, imdb.role_type rt, imdb.char_name cn | |
| WHERE x.id = ci.movie_id | |
| AND ci.role_id = rt.id | |
| AND ci.person_role = cn.id; |
| brew update | |
| brew versions FORMULA | |
| cd `brew --prefix` | |
| git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions" | |
| brew install FORMULA | |
| brew switch FORMULA VERSION | |
| git checkout -- Library/Formula/FORMULA.rb # reset formula | |
| ## Example: Using Subversion 1.6.17 | |
| # |
| using System; | |
| using System.Collections; | |
| using System.Windows; | |
| using System.Windows.Controls.Primitives; | |
| using System.Windows.Media; | |
| namespace NCore.Helpers { | |
| public class VisualStateHelper { | |
| public static void HookEvent<T>( DependencyObject onElement, string inVisualStateGroup, EventHandler<VisualStateChangedEventArgs> setHandler) where T : DependencyObject { | |
| T button = VisualStateHelper.FindSimpleVisualChild<T>(onElement); |