[Solved] How are going to read a text file and auto save in c # [closed]

read all text string fileText = File.ReadAllText(“filePath”); if (fileText.Contains(“apple”)) { Messagebox.Show(“This word is exist”); } else { Messagebox.Show(“The word does not exist!”); File.AppendAllText(@”filePAth”, “The word does not exixt in the text file” + Environment.NewLine); } 1 solved How are going to read a text file and auto save in c # [closed]

[Solved] Set a tr id in jQuery [closed]

http://api.jquery.com/html/ The html() function gets the html string. Then when you pass it in to $(), JQuery is creating html elements that are the same as your content and are not part of the DOM. Instead you should just use: $(‘#id’).prop(‘id’, ‘id’ + cnt); 0 solved Set a tr id in jQuery [closed]

[Solved] Extract the particular portion from a String

Here’s one way: public static void main(String[] args) { String s = “abc,xyz,lmn,ijk”; char[] ch = s.toCharArray(); int counter = 0; int place = 2; for (int i = 0; i < ch.length-2; i++) { if(ch[i] == ‘,’) { counter++; } if(counter == place && ch[i] != ‘,’) { System.out.print(ch[i]); } } } It prints … Read more

[Solved] Scala, Akka, Lagom, Play, Reactive and Microservices [closed]

The question is a bit too broad to answer it here. But Jonas BonĂ©r, the creator of Akka, explores the relationship between Microservices and Reactive Systems in his free ebook “Reactive Microservices Architecture“, why don’t you read that for a start. Akka is a library/tookit, it’s more low-level and doesn’t guide you towards using certain … Read more

[Solved] strncmp don’t work as it should

strcmp & strncmp functions return 0 if strings are equal. You should do: if (strncmp(frase1, frase3, 4) == 0) … i.e.: char *str1 = “Example 1”; char *str2 = “Example 2”; char *str3 = “Some string”; char *str4 = “Example 1”; if (strncmp(str1, str2, 7) == 0) printf(“YES\n”); // “Example” <-> “Example” else printf(“NO\n”); if … Read more

[Solved] Redirect to URL with variable inside php

<?php if(isset($_POST[‘action’]) && $_POST[‘action’]!=””) { if(isset($_POST[‘username’]) && $_POST[‘username’]!=””) { header(‘Location: some_other_page.php?username=”.$_POST[“username’]); exit; } } ?> <form action=’index.php’ method=’post’> <input name=”username” type=”text” value=”” placeholder=”Insert username here”> <input type=”submit” value=”Go” name=”Go”> <input type=”hidden” name=”action” value=”do_redirect”> </form> 1 solved Redirect to URL with variable inside php

[Solved] C Program for reading test results [closed]

When using if statements and you want to compare a result you should use == instead of =. With = you are assigning a value to a variable and == compares between to values. You can also not compare two things at the same time like: if (result = 70<=100) You need to check if … Read more

[Solved] Make table for pi using C coding language [closed]

Width and precision specifiers can be replaced by an *, that makes printf look for the value in the arguments. printf(“%5.3f”, M_PI); is equivalent to printf(“%*.*f”, 5, 3, M_PI); but now 5 and 3 can be replaced with expressions calculated at runtime. The rest of your exercise should be trivial. 1 solved Make table for … Read more

[Solved] How to split an integer into two integers that when multiplied they give the result of the first number [duplicate]

Every integer is divisible by itself and by 1. If the integer is composite, it will have at least one other pair of divisors (which may be the same, as in the case of 4, which is divisible by 1,4 and 2,2). lim = int(math.sqrt(num)) for i in range (1, lim): if num%i==0: print(i, int(num/i)) … Read more