[Solved] C# how to check if a string contains 3 times the same letters in a row [closed]

Sometimes (rarely) regexes are the response to the question, especially if the question is like this. bool ism1 = Regex.IsMatch(“AABAC”, @”(.)\1\1″); // false bool ism2 = Regex.IsMatch(“AAABC”, @”(.)\1\1″); // true Matches any character (.) followed by the first match (\1) twice. 0 solved C# how to check if a string contains 3 times the same … Read more

[Solved] Generating random matrix in c [closed]

int main() { int random[3][3]; int i, o; srand(time(NULL)); for(o = 0; o<3; o++) for(i = 0; i<3; i++) random[o][i] = rand(); return 0; } That’ll do it. If you want a particular subset of data you can use the % operator on the output from rand(), for example: rand() % 10; // generates a … Read more

[Solved] How to group rows with same value in sql? [closed]

Try this DECLARE @temp TABLE(col1 varchar(20),col2 int, col3 varchar(20)) insert into @temp values (‘data1′, 123 , ’12/03/2009’),(‘data1′, 124 , ’15/09/2009’), (‘data2 ‘,333 ,’02/09/2010’),(‘data2 ‘,323 , ’02/11/2010’), (‘data2 ‘,673 , ’02/09/2014’),(‘data2′,444 , ’05/01/2010’) SELECT (CASE rno WHEN 1 THEN col1 ELSE ” END )AS col1, col2, col3 FROM ( SELECT ROW_NUMBER() OVER(PARTITION BY Col1 ORDER BY … Read more

[Solved] Formula for unmatched row cell and display value in one column

Native worksheet formulas simply do not handle string concatenation well. Even the new string functions that are being introduced such as TEXTJOIN function¹ and the updated CONCAT function² have difficulty with conditional concatenation beyond TEXTJOIN’s blank/no-blank parameter. Here are a pair of User Defined Functions (aka UDF) that will perform the tasks. Function udfUniqueList(rng As … Read more

[Solved] Set datagrid row background color WPF – Loop [closed]

I resolved this problem. So the problem is because I fill DataGrid again with Data. Instead that I don’t fill it I only get ID where I stopped from last time in that Table with some ID. Code for Button Continue: int postID; string fbGroupID; int listID = int.Parse(cmbSelectList.SelectedValue.ToString()); using (OleDbConnection connection = new OleDbConnection(conn)) … Read more