Search Results

Search found 4 results on 1 pages for 'ryder1211212'.

Page 1/1 | 1 

  • trying to pass file name from aspx page to console.exe

    - by ryder1211212
    i want to pass the value of a lable or textbox in an aspx page to a console.exe application such that the if the value is sample.doc it changes to that. i am calling from the aspx page with string f = TextBox1.Text; System.Diagnostics.Process.Start("C:/DocUpload/ConsoleApplication1.exe", f); i have tried converting to string then using the string vatiable inplace of sample.doc but no luck object FileName = System.IO.Path.Combine(ExecutableFileInfo.DirectoryName, "sample.doc"); any help or ideas will be welcomed. thank u

    Read the article

  • its a web app so i cant use saveasDialog need to save content of stringbuilder

    - by ryder1211212
    i am using C# and its a web app so i cant use saveasDialog i have a stringbuilder called builder and i would like to say the contents to a file in a specific location i would also like the name to be dynamic am using this FileInfo t = new FileInfo(@"C:\DocUpload\swDoc\" + lbfilename.text); TextWriter w = t.CreateText(); w.Write(builder.ToString()); w.Flush(); w.Close(); but for some reason it creats a corrupt file or none at all any suggestions is welcomed thanks alot

    Read the article

  • find word and score based on positions

    - by ryder1211212
    hey guys i have a textfile i have divided it into 4 parts. i want to search each part for the words that appear in each part and score that word exmaple welcome to the national basketball finals,the basketball teams here today have come a long way. without much delay lets play basketball. i will want to return national = 1 as it appears only in one part etc am working on determining text context using word position. am working with c# and not very good in text processing basically if a word appears in the 4 sections it scores 4 if a word appears in the 3 sections it scores 3 if a word appears in the 2 sections it scores 2 if a word appears in the 1 section it scores 1 thanks in advance so far i have this var s = "welcome to the national basketball finals,the basketball teams here today have come a long way. without much delay lets play basketball. "; var numberOfParts = 4; var eachPartLength = s.Length / numberOfParts; var parts = new List<string>(); var words = Regex.Split(s, @"\W").Where(w => w.Length > 0); // this splits all words, removes empty strings var wordsIndex = 0; for (int i = 0; i < numberOfParts; i++) { var sb = new StringBuilder(); while (sb.Length < eachPartLength && wordsIndex < words.Count()) { sb.AppendFormat("{0} ", words.ElementAt(wordsIndex)); wordsIndex++; } // here you have the part Response.Write("[{0}]"+ sb); parts.Add(sb.ToString()); var allwords = parts.SelectMany(p => p.Split(' ').Distinct()); var wordsInAllParts = allwords.Where(w => parts.All(p => p.Contains(w))).Distinct();

    Read the article

1