| gitflow | git |
|---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require('fs') | |
| const separator = process.platform === 'win32' ? ';' : ':' | |
| const paths = process.env.PATH.split(separator).map(p => `${p}/yarn.js`) | |
| const yarnjsPaths = [ | |
| 'c:/Program Files (x86)/yarn/bin/yarn.js', | |
| 'c:/Program Files/yarn/bin/yarn.js', | |
| ].concat(paths) | |
| const yarnjsPath = yarnjsPaths.find(fs.existsSync) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void Main() | |
| { | |
| var thing = new MyClass<MyDerivedGeneric<ImplType>, ImplType>(); | |
| } | |
| public interface IBase { } | |
| public class ImplType : IBase { } | |
| public class MyGenericBase<T> where T : IBase { } | |
| public class MyDerivedGeneric<T> : MyGenericBase<T> where T : IBase { } | |
| public class MyClass<T, U> where T : MyGenericBase<U> where U : IBase { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public ActionResult Create(string cmsMenuId) | |
| { | |
| SelectList list = new SelectList(db.CmsMenus, "ID", "Name"); | |
| if (cmsMenuId != null) // or !string.IsNullOrEmpty(cmsMenuId) if it makes more sense | |
| { | |
| var selected = list.First(x => x.Value == cmsMenuId); | |
| selected.Selected = true; | |
| } | |
| ViewBag.CmsMenuId = list; |