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
| $.get('url/to/controller/action/', function(partial_view) { | |
| $('#div_to_insert_partial_view').html(partial_view); | |
| }); |
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
| export PATH=$PATH:/cygdrive/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\ 10.0/Common7/IDE/ | |
| alias sln='devenv *.sln & disown' |
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
| $.post(link, { IsOkToDelete: confirmed }, function(data) { | |
| $.get('Home/IndexRelationship/', function(partialView) { | |
| $('#my_div').html(partialView); | |
| }); | |
| }); |
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
| $.post(link, { IsOkToDelete: confirmed }, function(data) { | |
| // data | |
| }); |
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 IEnumerable<Contact> Enumerable | |
| { | |
| get { return _contacts.ToEnumerable(); } | |
| } |
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 static IEnumerable<T> ToEnumerable<T>(this IEnumerable<T> list) | |
| { | |
| list = list ?? new List<T>(); | |
| foreach (var item in list) | |
| { | |
| yield return item; | |
| } | |
| } |
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 IEnumerable<Contact> Contacts | |
| { | |
| get | |
| { | |
| foreach (var contact in _contacts) | |
| { | |
| yield return contact; | |
| } | |
| } | |
| } |
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
| var addressBook = new AddressBook(); | |
| // add some contacts... | |
| ((IList<Contact>)addressBook.Contacts).Add(new Contact("Some", "One")); |
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 class AddressBook | |
| { | |
| public IEnumerable<Contact> Contacts | |
| { | |
| get { return _contacts; } | |
| } | |
| public AddressBook() | |
| { | |
| _contacts = new List(); |
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
| parameters.addEnvAndSystem("build.start.year", (new SimpleDateFormat("yyyy")).format(buildStartTime)); | |
| parameters.addEnvAndSystem("build.start.month", (new SimpleDateFormat("MM")).format(buildStartTime)); | |
| parameters.addEnvAndSystem("build.start.day", (new SimpleDateFormat("dd")).format(buildStartTime)); | |
| parameters.addEnvAndSystem("build.start.hour", (new SimpleDateFormat("HH")).format(buildStartTime)); | |
| parameters.addEnvAndSystem("build.start.minute", (new SimpleDateFormat("mm")).format(buildStartTime)); | |
| parameters.addEnvAndSystem("build.start.second", (new SimpleDateFormat("ss")).format(buildStartTime)); |