public coid setTotal(BigDecimal total) {
this.total = atotal;
}
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 HttpContextBase FakeHttpContext() | |
| { | |
| var context = new Mock<HttpContextBase>(); | |
| var request = new Mock<HttpRequestBase>(); | |
| var response = new Mock<HttpResponseBase>(); | |
| var session = new Mock<HttpSessionStateBase>(); | |
| var server = new Mock<HttpServerUtilityBase>(); | |
| var user = new Mock<IPrincipal>(); | |
| var identity = new Mock<IIdentity>(); |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Web; | |
| using System.Diagnostics; | |
| using System.Web.Caching; | |
| using System.IO; | |
| namespace CoffeeScriptHandler |
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
| /* | |
| *string items might look like so | |
| {'IVSet':[{'InterviewerId':'dd','InterviewType':'dd','ScheduledDate':'dd'}], | |
| 'FullName':'fsd','EmailAddress':'sdf','Phone':'sdf','notes_md':''} | |
| */ | |
| [HttpPost] | |
| public ActionResult Edit(int id, string items) | |
| { | |
| Candidates candidate = _db.Candidates.Where(cd => cd.CandidateId == id).Single(); | |
| var decoded = System.Web.Helpers.Json.Decode(items); |
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
| locals.ps1 | |
| vs2010.ps1 |
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
| // doesn't detect Never() | |
| public static IObservable<bool> IsAlive_Merge<T>(this IObservable<T> source, TimeSpan timeout, IScheduler sched) | |
| { | |
| return source.Select(_ => true) | |
| .Merge(source.Select(_ => false).Throttle(timeout, sched)) | |
| .DistinctUntilChanged(); | |
| } | |
| // Delay detection of Alive till timespan has expired | |
| public static IObservable<bool> IsAlive_Buffer<T>(this IObservable<T> source, TimeSpan timeout, IScheduler sched) |
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
| <UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll"> | |
| <ParameterGroup> | |
| <OutputFilename ParameterType="System.String" Required="true" /> | |
| </ParameterGroup> | |
| <Task> | |
| <Reference Include="System.Core" /> | |
| <Reference Include="System.Xml" /> | |
| <Reference Include="WindowsBase" /> | |
| <Using Namespace="System" /> | |
| <Using Namespace="System.IO" /> |
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
| html { | |
| font-size: 100%; | |
| overflow-y: scroll; | |
| -webkit-text-size-adjust: 100%; | |
| -ms-text-size-adjust: 100%; | |
| } | |
| body{ | |
| font-family: helvetica, arial, freesans, clean, sans-serif; | |
| color: #333; |
| One | Many | |
|---|---|---|
| Synchronous | T/Try[T] | Iterable[T] |
| Asynchronous | Future[T] | Observable[T] |