Hi guys, I have written a program which currently accumalates different pairs and their frequency from an excel spreadsheet. (1280 pairs) Want I want to achieve is from the top 20/30 pairs, if I can find pairs that link e.g. Pair 1 [1,33] and Pair 100 [1,232] so i would expect that to be a link. With that link i want to be able to merge it so the the value becomes e.g. [33,1,232] before continue to find any more. My find outcome should be a set of 10 numbers which are linked together by thier pairs. Anyone one have …

Member Avatar
Member Avatar
+0 forum 3

Hello, I have a string which consists of tokens enclosed in square brackets []. I need to identify these and process the string to replace them with some other derived values. I am unable to get list of tokens via Pattern matching. Below is my code snippet. String str = "test [text1] text [text2]"; Pattern p = Pattern.compile("(\\[\\w+\\])"); Matcher m = p.matcher(str); if (m.find()) { System.out.println(m.group()); } This returns the output: [text1] My input string can contain any combination of tokens i.e. [text] can be anywhere in the string. Could anyone please let me know what am I missing in …

Member Avatar
Member Avatar
+0 forum 2

hello, I need some help and maybe pointing the right direction. (website/tec/forum/something which could emulate this) I want to do a project where a user can send a SMS(texting) message to a database/sever which then sends a message back to the phone if any results are found on the database. The information i wish to use will be names, ages and possibly places. It will of course need a way for names and ages to be added and stored to the data base, which also needs to be through SMS messaging. Also if any results are found the retuning message …

Member Avatar
+0 forum 0

This method read the Database and Returns the Username and Password. tblPassword has only one user name and a password. using (SqlConnection dataConnection = new SqlConnection("Data Source=isukoon-pc\\sqlexpress;Initial Catalog=AdsManager;Integrated Security=True")) using (SqlCommand dataCommand = new SqlCommand("select username from tblPassword", dataConnection)) using (SqlCommand data2Command = new SqlCommand("select password from tblPassword", dataConnection)) { dataConnection.Open(); Uname = Convert.ToString(dataCommand.ExecuteScalar()); Pword = Convert.ToString(data2Command.ExecuteScalar()); } Then I compare those two values with textbox values. if (textboxusername.Text == Uname && textboxpwd.Text == Pword) { var form = new MasterAds(); form.Show(); this.Hide(); } This is not worked for me. Even I had used String.Compare(); and got the same result. …

Member Avatar
Member Avatar
+0 forum 4

Array1 = array(000,400,000,500) Array2 = array(300,400,450,500) if the values of Array1 matches with Array2 values then the matching values of Array2 should be replaced with 000 i.e. Array2 = array(300,000,450,000) somebody help me. thanks in advance

Member Avatar
Member Avatar
+0 forum 2

BEGIN { via["AIRTEL_WHITE"] = 0 via["AIRTEL_WAP"] = 0 via["_321_44"] = 0 via["_321_555"] = 0 count=0 } { for(var in via) { if($5 ~ /var/) { count++ via[var] = via[var]++; } #print $5 } } END{ for(var in via) { if(via[var] != 0) { print var "->" via[var] } } print "Completed: " count } Hello friends. I wrote a code to match the array values with the fifth field of my input file (sample record given below). `http://124.153.10131/sms/airtel_321_44?msisdn=919571774414&sessionid=13443642111972521&circleid=RJ& ` I wanted the number of times the array values matched with the above field which is $5 in the input file. …

Member Avatar
Member Avatar
+0 forum 5

hey, Iv been looking around for an easy way to check if a string matches exactly and not just in a few characters I.E B != "ABC" B == B Frederick != F So only if the entire string matches will my condition be met. currently im using : String[] splitstring = linetoscan.split("[ ]+"); //split entire input by spaces for(int j=0;j<splitstring.length;j++) { if(splitstring[j].contains("F")) { System.out.println("match found"); } } I read that the pattern matcher can be used, but seems a lot of conversion has to be done to compare a string to a pattern of characters? is pattern matcher the …

Member Avatar
Member Avatar
+0 forum 2

I have this Regular Expression in C#: Regex myRegex = new Regex(@"^[a-zA-Z]{1}\s(! | && | \|\| | -> | <->){1}\s[a-zA-Z]{1}$"); if (myRegex.IsMatch(expression)) { validated = true; } else { validated = false; } and I would like to match the following types of Strings: A && B A -> B A || B The Problem is it is evaluating to false. Any Insight on why it is failing and how it can be corrected will be highly apreciated. :)

Member Avatar
Member Avatar
+0 forum 1

May i know how to matching 2 array keywords? e.g I have 1st array keyword like kfc,mcd,fastfood,etc 2st array keyword like kfc,mcd If i want to get the matching keywords among these 2 arrays, how to i write the matching code? Thank advance for your help.

Member Avatar
Member Avatar
+0 forum 5

Hi ,There I hope you can help me with this I need a Java algorithm to help me find how much % is string A relevant to String B Example : String A => Java ,C++ ,C# ,Assembly String B => java ,c++ then Result should be => 50% relevant it's the most simplified example I've searched every little site on google but they are all 0% relevant to what I want Thanks in advance :)

Member Avatar
Member Avatar
+0 forum 13

Hello, i have the following query. I have a txt file with data like this: [CODE]1 observational study 1.1 cohort study 1.1.1 retrospective cohort study 1.1.2 prospective cohort study 1.2 cross-sectional study[/CODE] And another file with data like this: [CODE]cross-sectional survey 12345.txt retrospective study 2345.txt ...[/CODE] I want to do an appropriate string matching. To be more specific i want to read each line of the second file and find the one that is similar (or looks kinda the same) from the first file. So for the first line of the second file the "cross-sectional survey" will be assigned to …

Member Avatar
Member Avatar
+0 forum 4

Hello! I wonder if anyone used google-diff-match-patch for fuzzy string comparisons, i.e., for finding a closest/most similar string? Can anyone explain and give some examples? Also, in genera, what would be the best matching algorithm in Python. I tried Levenshtein, but matches are not so good, and I tried difflib.get_close_matches but this one, although better, is so very slow. Thanks, PM

Member Avatar
Member Avatar
+0 forum 2

Hi, I am new to the perl scripting and need your help regarding one issue. I have a piece in my perl script which looks something like below - if ($rec{user} =~ /Major |Minor |Low |High /oxi ) { print "Reject" . $_ . "\n"; next; } Now the list present in if loop is going to increase to 150 names so I want to place them in a file & read from a file instead. Also, $rec{user} can be something like "post//. new major thrwad" and it still has to be rejected. And also some of the names in …

Member Avatar
Member Avatar
+0 forum 10

Is it the boost library? Regex in particular? I have searched and searched, but this is all I could come up with. If this is the correct library, then how do I get it to work in Dev-C++? I managed to add all the boost .h files to my Dev-C++ include files folder, so now it will compile when I #include a boost header file. Does it even work in Dev-C++ though? I couldn't get it installed properly in Visual Studio. I think the path name was not quite right (to include the boost root directory). Also, how do you …

Member Avatar
Member Avatar
+0 forum 1

Hi people, I'm trying to match strings from a pattern containing[B] wildcards[/B]. Basically I need to be able to go through a stack of strings, and see which of them matches my pattern. Fx [B]My*.txt[/B] will match only one of these. [U]MyFile.txt[/U] [I]MyFile.php[/I] I'm aiming to end up with a function like this, which returns all matching strings. [CODE]std::vector<std::string> matchStrings(const std::string& pattern, const std::vector<std::string>& stringsToMatch);[/CODE] I've been thinking a lot about this, and wrote many different codes to do this, but I cannot think of a way that works in all scenarios. I'd also like it to be efficient. If …

Member Avatar
Member Avatar
+0 forum 9

Hi all, I need a perl script that can open files (given in command line arguments) and extract/print out any dates or times found in it. The format of the dates and times can be any reasonable format. The problem I have is I don't know how to print out the matching part of the file once i find it. Any ideas? -Skyrim

Member Avatar
Member Avatar
+0 forum 7

Hi, I am very new to perl pgming. I have a weblog which has a standard format as the below example IP | remoteUser | authUser | Date/Time | Request | Status | Bytes For example, 74.6.72.229 - - [27/Jan/2007:00:00:36 -0500] "GET /~jking/ralph.html HTTP/1.0" 404 215 the fields are seperated by space. I need to find what are the missing pages in the website. I tried writing the below code. I am not able to match the index of the status array with the uri array. could some one please tel me how to do this. [CODE] foreach $logfile ("sample.log") …

Member Avatar
Member Avatar
+0 forum 3

I have been searching the web for this but cant find it anywhere, i want to search my mysql database with php but i want it to find records if just one of the search term word are met. eg. Search term from form = "one two three" My database has a record with a field that equals "one two" i want it to select this field by matching each word individually. What would the query look like? Hope i conveyed my message accross.

Member Avatar
Member Avatar
+0 forum 2

Hi all, I'm learning python and hope someone can help me with a sort of tricky search/parse problem. I have a tab deliminited file like this: 2 1 863.8 300.2 0.0131 0.0759 0.1727 0.0879 1.5821 3 1 874.5 289.5 0.0574 0.1292 0.4447 0.2258 1.1846 3 2 874.5 289.5 0.0573 0.0527 1.0857 0.1684 1.1760 4 1 844.3 319.7 0.1306 1.3513 0.0967 1.3976 2.2659 4 2 849.2 314.8 0.1350 1.3332 0.1013 1.3773 1.9990 4 3 846.0 318.0 0.1546 1.4675 0.1053 1.5399 2.1172 2 :PAD_999) ... 1 :PAA_888) 3 :PAB_978) ... 1 :PAA_888) 4 :PCA_098) ... 1 :PAA_888) I would like to search …

Member Avatar
Member Avatar
+0 forum 7

The End.