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
| // @import url("webessentials.css"); | |
| body { | |
| } |
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 app = new List<Func<AppFunc, AppFunc>>(); | |
| app | |
| .Use(Favicon.Middleware()) | |
| .Use(IeEdgeChromeFrameHeader.Middleware()) | |
| .Use(RemovePoweredBy.Middleware()) | |
| .Use(CrossDomainRules.Middleware()) | |
| .Use(QueryParser.Middleware()) | |
| .Use(JsonBodyParser.Middleware()) | |
| .Use(UrlEncoded.Middleware()) |
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
| namespace Api | |
| { | |
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using System.Net; | |
| using System.Threading; | |
| using System.Threading.Tasks; |
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
| namespace Nancy.Hosting.Owin | |
| { | |
| using System; | |
| using Nancy.Bootstrapper; | |
| class NancyOwinEngineWrapper : INancyEngine | |
| { | |
| private readonly INancyEngine engine; | |
| private readonly Action<NancyContext> contextCallback; |
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
| <site name="WebSite1" id="1" serverAutoStart="true"> | |
| <application path="/"> | |
| <virtualDirectory path="/" physicalPath="C:\PathToWebSite" /> | |
| </application> | |
| <bindings> | |
| <binding protocol="http" bindingInformation=":1151:localhost" /> | |
| <binding protocol="http" bindingInformation="*:1151:pswin8mac.local" /> | |
| </bindings> | |
| </site> |
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
| // in view did load | |
| UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissKeyboard)]; | |
| tapGestureRecognizer.cancelsTouchesInView = NO; | |
| [self.tableView addGestureRecognizer:tapGestureRecognizer]; | |
| - (void)dismissKeyboard { | |
| [self.view endEditing:YES]; | |
| } |
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 SqlService { | |
| public string ConnectionStirng { get; private set; } | |
| public SqlService() | |
| :this("defaultConnectionString") | |
| { | |
| } | |
| public SqlService(stirng connectionString) { |
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 store = new DocumentStore() { ... }; | |
| store.Initialize(); | |
| using(var session = store.OpenSession().AsDynamic()) { | |
| session.posts.insert(name: "...."); | |
| session.posts.insert(name: "....", content: "..." ); | |
| session.posts.insert(name: "...."); | |
| session.save(); |
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 GenericFacebookClient : FacebookClient { | |
| public T Get<T>(string path) { | |
| return (T)base.Api(HttpMethod.Get, path, null, typeof(T)); | |
| } | |
| public T Get<T>(string path, object parameters) { | |
| return (T)base.Api(HttpMethod.Get, path, parameters, typeof(T)); | |
| } |
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 User | |
| { | |
| public string id { get; set; } | |
| public string name { get; set; } | |
| public Location location { get; set; } | |
| } | |
| public class Location | |
| { | |
| public string id { get; set; } |