… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
2 Months Ago
… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
… a current index for each string - it's going to be… Reply by JamesCherrill
2 Months Ago
… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
… a current index for each string - it's going to be… any other than those 4 string methods : length() charAt() substring() equals… in arrays and start to compare each indexs? but then it… Reply by Adam_35
2 Months Ago
… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
…'t work if the first string has consecutive duplicated characters, so… Reply by JamesCherrill
2 Months Ago
… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
… outOfBounds error public static boolean compare(String s,String t) { if (s.equals…; } private static boolean stringChar(String s, String t, int i, int j… Reply by Adam_35
2 Months Ago
… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
… every character of str1 and compare it to str2, if equal… is "j" and compare it , if not then (recursively… Reply by Adam_35
2 Months Ago
… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
Hi Adam That's what I thought at first, but consider the sample data str1=abbcd and str2=abbcccd when processing the first b in str1 you will consume all the b's in str2, then move on to the second b in str1 and find no match... Reply by JamesCherrill
2 Months Ago
… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
> but i get outOfBounds error When you get an exception ALWAYS post th ecomplete message and the line where it was thrown. Knowing the exact line, and the index value, will make it easy to see what the problem is. and a tiny point, but it … Reply by JamesCherrill
2 Months Ago
… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
…... public static boolean isTrans(String s,String t) { if (s…); } private static boolean stringChar(String s, String t, int i) { if… Reply by Adam_35
2 Months Ago
… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
string up into blocks of repeated (1 or more) chars and compare… } public static RepeatedChar from(String s, int startIndex) { …and comparing them boolean isDup(String str1, String str2) { int i1… Reply by JamesCherrill
2 Months Ago
… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
… > java.lang.StringIndexOutOfBoundsException: > String index out of range: 5… (in java.lang.String) That's a start. Almost…parameter in a call to String's substring method. Now if…in your code where the String method was called, and that… Reply by JamesCherrill
2 Months Ago
… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
…true.. public static boolean isTrans(String s,String t) { if (s.equals… t); } private static boolean stringChar(String s, String t) { if (s.length… Reply by Adam_35
2 Months Ago
… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
… as I can tell, you compare the lengths of the two…. After that you strip each string of all occurrences of any… of that letter. Then you compare the two stripped strings and… Reply by AssertNull
2 Months Ago
… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
> i don't want to make an entire class just for comparing those strings i need to include this in a single class within my project.. It's a common beginner mistake to avoid defining a small class because it seems somehow too complicated. Just look … Reply by JamesCherrill
2 Months Ago
… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
… using other of the 4 string methods i've mentioned or… Reply by Adam_35
2 Months Ago
… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
sorry i qouted accidently the whole texts... my eyes are tired hehe Reply by Adam_35
2 Months Ago
… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
… here.... private static boolean stringChar(String s, String t, char j) { if… Reply by Adam_35
2 Months Ago
… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
Perhaps you can search the string s for the character …function provided by Java's String class? It will return …would be 4. For a string that did NOT contain '…a character is in a string, that function will do …/docs/api/java/lang/String.html#indexOf-int- Reply by AssertNull
2 Months Ago
… doing this... public static boolean compare (String s, String t) { boolean result; if… false; } private static int stringSum(String s, int i) { if (i… Discussion Thread by Adam_35 in Software Development
> Perhaps you can search the string s for the character j using the indexOf function provided by Java's String class? sadly no ;( i can't use that function im limited by only 4 : length() charAt() equals() substring() Reply by Adam_35
2 Months Ago
Hi, I am trying to write a simple script that reads a file for two time stamps and then finds the delta. However, I can't get passed converting the time strings to datetime objects. I haven't done any coding since college and I everything I've read says … Discussion Thread by long5001 in Software Development
… if I also want to compare this delta to an integer… the job. How do I compare the time object delta vs… Reply by long5001
1 Month Ago
Hi, I am trying to write a simple script that reads a file for two time stamps and then finds the delta. However, I can't get passed converting the time strings to datetime objects. I haven't done any coding since college and I everything I've read says … Discussion Thread by long5001 in Software Development
… d_minutes = int(d_float / 60) # Convert string to float laborFloat = float(l… laborTime = int(math.floor(laborMinutes)) # Compare elapsed time to stated time… Reply by long5001
1 Month Ago
…stdlib.h> #include <string.h> #include <… = xroot; subsets[xroot].rank++; } } /////////////////////////////////////////////////////////////////////////// // Compare two edges according to their… Discussion Thread by Sherwin_4 in Computer Science
1 Month Ago
…stdlib.h> #include <string.h> #include <… = xroot; subsets[xroot].rank++; } } /////////////////////////////////////////////////////////////////////////// // Compare two edges according to their… Discussion Thread by Sherwin_4 in Computer Science
write the program for dev c++ to show total value if number1=0,number2=8,value=number1+number2 Reply by Seif_2
1 Month Ago
…stdlib.h> #include <string.h> #include <… = xroot; subsets[xroot].rank++; } } /////////////////////////////////////////////////////////////////////////// // Compare two edges according to their… Discussion Thread by Sherwin_4 in Computer Science
#include<iostream> using namespace std; int main() ( int number1=0, number2=8, value(0); value=number1+number2; cout<<number1<<"+"<<number2<<"="<<value<<endl; system("pause");… Reply by Seif_2
1 Month Ago
…stdlib.h> #include <string.h> #include <… = xroot; subsets[xroot].rank++; } } /////////////////////////////////////////////////////////////////////////// // Compare two edges according to their… Discussion Thread by Sherwin_4 in Computer Science
#include<iostream> using namespace std; int main() ( int number1=0,number2=8,value(0); value=number1+number2; cout<<number1<<"+"<<number2<<"="<<value<<endl; system("pause"); … Reply by Seif_2
1 Month Ago
… playerSkill = 9; int playerScore = 1; string playerName = ""; int zombieCount… Discussion Thread by hegindra in Software Development
c++
… playerAlive; int playerSkill; int playerScore; string playerName; int zombieCount; int zombiesKilled… goes above the main function. Compare it to your lines 20… Reply by AssertNull
1 Month Ago
… to do so (ie "compare your lines 20 to 25… a point by having "string" in C and C… and pointing out that "string" has meaning in C… a C++ thread as a compare/contrast. I don't want… Discussion Thread by AssertNull in Programming
1 Month Ago
… to do so (ie "compare your lines 20 to 25… a point by having "string" in C and C… and pointing out that "string" has meaning in C… a C++ thread as a compare/contrast. I don't want… Discussion Thread by AssertNull in Programming
Markdown syntax is not as flexible as BBSCode but it is much easier to use, especially for edits-after-the-fact - as anyone who had to do word processing in the pre-wysiwyg days can confirm. If you need to reference line numbers in code that you are … Reply by Reverend Jim
1 Month Ago
… <iostream> #include <string> #include <iomanip>…, complexTotal, highestRent; bool zeroPayment = false; string complexName, noPay; // Create and open… Discussion Thread by Lindsey_4 in Software Development
c++
… tell. 1. `double highestRent` 2. `string complexWithHighestRent` Initialize highestRent to 0… line 56. On line 71, compare `total` with `highestRent`. If `total… Reply by AssertNull
2 Weeks Ago
Guys & My Ladies, This LOGIN.php was working lastnight and so I don't know why not now. The ELSE at 53 gets triggered even though I┬áhave typed the right password! What do you think of line 16 ? ... if($numrows >1) I tried the … Discussion Thread by UI in Web Development
… and the value: bool(true) string(5) "Hello" resource… from the result set and compare it with the one submitted… Reply by cereal
1 Week Ago