[Solved] Text change when background colour changes using Javascript

Simply have the text in an array, ( get it from some elements using jquery – however you want it) iterate through it and change the content inside the div using html() function when you are changing the color. Simple modification of your code would be something like function changeColorAndText(element, curNumber){ curNumber++; if(curNumber > 4){ … Read more

[Solved] Split text file every 120,000 Lines?

Just another way using Enumerable.GroupBy and “integer division groups”: int batchSize = 120000; var fileGroups = File.ReadLines(path) .Select((line, index) => new { line, index }) .GroupBy(x => x.index / batchSize) .Select((group, index) => new { Path = Path.Combine(dir, string.Format(“FileName_{0}.txt”, index + 1)), Lines = group.Select(x => x.line) }); foreach (var file in fileGroups) File.WriteAllLines(file.Path, file.Lines); … Read more

[Solved] ms sql query on count occurence of words in text column

You could create a table-valued function to parse words and join it to your query against qQuestion. In your schema, I recommend using varchar(8000) or varchar(max) instead of text. Meanwhile, the following should get you started: create function [dbo].[fnParseWords](@str varchar(max), @delimiter varchar(30)=’%[^a-zA-Z0-9\_]%’) returns @result table(word varchar(max)) begin if left(@delimiter,1)<>’%’ set @delimiter=”%”+@delimiter; if right(@delimiter,1)<>’%’ set @delimiter+=’%’; … Read more