[Solved] How do I run this code

[ad_1] That code won´t run without visual studio since it have code that must be run on the server. The only thing you can do is copy the code between HTML tag and save it to an HTML file. That will run but since you have logic on your server side your upper case wont … Read more

[Solved] to get folders from directory between the dates entered in two textboxes

[ad_1] If you want to filter the files you are gonna iterate through, you can use System.IO‘s FileInfo class instead if File. Then you filter the files by their CreationDate property: DateTime yourstartDate = new DateTime(); DateTime yourEndDate = new DateTime(); DirectoryInfo di = new DirectoryInfo(“any_directory”); List<FileInfo> fis = di.GetFiles().Where(x => x.CreationTime >= yourstartDate && … Read more

[Solved] Can anyone help me how to creat a c program prints the center of the words inside a sentance? [closed]

[ad_1] Here’s my solution: #include <stdio.h> int main() { char sentence [100]; int i,letter_count=0; printf(“Enter a sentence: “); fgets(sentence,100,stdin); for(i=0;sentence [i]!=’\0′;i++) { if(sentence [i]==’ ‘ || sentence [i+1]==’\0’) { if(letter_count%2==1) { printf(“%c “,sentence [i-letter_count/2-1]); } letter_count=0; } else { letter_count++; } } putchar(‘\n’); return 0; } 2 [ad_2] solved Can anyone help me how to … Read more

[Solved] Array comparison and sorting to list c#

[ad_1] Try this: // assuming you’ll already have the subjects of the emails var subjects = new List<string> { “ABC / Vesse / 11371503 /C report”, “Value/BEY/11371503/A report” }; var listOfItems = new List<Tuple<string, string, int, string>>(); subjects.ForEach(s => { var splits = s.Split(new[] {“https://stackoverflow.com/”}, StringSplitOptions.RemoveEmptyEntries).Select(x => x.Trim()).ToArray(); // Do proper error checking before the … Read more

[Solved] Deleted words from a string

[ad_1] Use String.Replace(): string x = @”documents\bin\debug”; string desiredString = x.Replace(@”\bin\debug”, String.Empty); Note: The key thing here is that you have to assign the string returned by the Replace() function to a variable. (From your comment on the question, it is the problem). This can either be another variable (as in the above example) or … Read more

[Solved] add only one property from each item to listbox [closed]

[ad_1] Your attempt at @SLaks suggestion was close, but you can’t add the list of users to the listbox in that manner. This should get you closer: protected void Button1_Click(object sender, EventArgs e) { users.Add(new User { connectionid = TextBox1.Text, nick = TextBox2.Text }); foreach (User u in users) { lbUsers.Items.Add(new ListItem(u.nick, u.connectionid)); } } … Read more