Please comment below...
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 twitterCtx = new TwitterContext(...); | |
| var searchResponse = | |
| await | |
| (from search in twitterCtx.Search | |
| where search.Type == SearchType.Search && | |
| search.Query == "\"LINQ to Twitter\"" | |
| select search) | |
| .SingleOrDefaultAsync(); |
Please comment below...
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
| //Loop through each uploaded file | |
| foreach (string fileKey in HttpContext.Current.Request.Files.Keys) | |
| { | |
| HttpPostedFile file = HttpContext.Current.Request.Files[fileKey]; | |
| if (file.ContentLength <= 0) continue; //Skip unused file controls. | |
| //The resizing settings can specify any of 30 commands. | |
| //Destination paths can have variables like <guid> and <ext>, or | |
| //even a santizied version of the original filename, like <filename:A-Za-z0-9> | |
| ImageResizer.ImageJob i = new ImageResizer.ImageJob(file, "~/uploads/<guid>.<ext>", new ImageResizer.ResizeSettings( |
Please comment below...
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 List<Message> FetchAllMessages(string hostname, int port, bool useSsl, string username, string password) | |
| { | |
| // The client disconnects from the server when being disposed | |
| using(Pop3Client client = new Pop3Client()) | |
| { | |
| // Connect to the server | |
| client.Connect(hostname, port, useSsl); | |
| // Authenticate ourselves towards the server | |
| client.Authenticate(username, password); |
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
| <?xml version="1.0" encoding="utf-8" ?> | |
| <configuration> | |
| <startup> | |
| <supportedRuntime version=".NETFramework,Version=v4.6.2"/> | |
| </startup> | |
| </configuration> |
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
| <?xml version="1.0" encoding="utf-8" ?> | |
| <configuration> | |
| <startup> | |
| <supportedRuntime version=".NETFramework,Version=v4.5.2"/> | |
| </startup> | |
| <runtime> | |
| <AppContextSwitchOverrides value="Switch.System.IO.UseLegacyPathHandling=false" /> | |
| </runtime> | |
| </configuration> |
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 ContactInfo | |
| { | |
| [Required(ErrorMessage = "Your email address is invalid")] | |
| [Display(Name = "User Email")] | |
| public int Email { get; set; } | |
| [Required(ErrorMessage = "Your phone number is invalid")] | |
| [Display(Name = "User Phone")] | |
| public int Phone { get; set; } | |
| } |
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 | |
| { | |
| [Required(ErrorMessageResourceType = typeof(ModelResources), | |
| ErrorMessageResourceName = "FirstName_Required")] | |
| [StringLength(50, ErrorMessageResourceType = typeof(ModelResources), | |
| ErrorMessageResourceName = "FirstName_StringLength")] | |
| public sstring FirstName { get; set; } | |
| [Required(ErrorMessageResourceType = typeof(ModelResources), | |
| ErrorMessageResourceName = "LastName_Required")] |
OlderNewer