denisT
@denist
New Member
Joined: Feb 14, 2024
Topics: 218 / Replies: 11426
Reply
RE: Fast search through text file

// #1.5 var word = line.TrimStart().Split(null, 2)[0].ToLower();

2 years ago
Forum
Reply
RE: Struct initialization problem? Or

( global miauuStr struct miauuTestStr ( defaultLayer = layerManager.getLayer 0, numMarks = 0, numMarksArr = #(0,1,2,3,4,5,6,7,8,9), visSta…

2 years ago
Forum
Reply
RE: Struct initialization problem? Or

miauu: The struct is used in about 50 dialogs and some of its variables are used in other 2 structs. hmm… is it a library? why one structure use…

2 years ago
Forum
Reply
RE: Struct initialization problem? Or

also this approach helps to “synch” both struct and rollout developments, because you define and update them together.

2 years ago
Forum
Reply
RE: Struct initialization problem? Or

very unlikely you will use the same structure with multiple dialogs, so it’s better to put the rollout inside the structure. inside the rollout’s bod…

2 years ago
Forum
Reply
RE: Struct initialization problem? Or

global miauuStr ( struct miauuTestStr ( defaultLayer = layerManager.getLayer 0, numMarks = 0, visState = false, dialog = ( rollout dia…

2 years ago
Forum
Reply
RE: Fast search through text file

Dictionary is always a pair <key, value> … key is usually something simply ‘hashable’ (string, index, etc…) for quick search, but the value can …

2 years ago
Forum
Reply
RE: Fast search through text file

miauu: (Array.IndexOf(words, word) > -1) is the c# equivalent of findItem. yes. it’s similar to findItem but has some extra options. Anyway…

2 years ago
Forum
Reply
RE: Fast search through text file

public void ProcessString(string str , String[] words) { data = new Dictionary<string, int>(); var spaces = new char[]{‘ ‘,’ ‘}…

2 years ago
Forum
Reply
RE: Fast search through text file

( cs_assembly = ( local source = @” using System; using System.IO; using System.Collections.Generic; public class TextProcessor { pu…

2 years ago
Forum
Reply
RE: Fast search through text file

Haha … I specially modified the code to work with a file

2 years ago
Forum
Reply
RE: Fast search through text file

here is C# version with dynamic assembly: ( cs_assembly = ( local source = @” using System; using System.IO; using System.Collections.Gener…

2 years ago
Forum
Reply
RE: Fast search through text file

words = #( “alpha”, “beta”, “gama”, “delta”, “epsilon”, “zeta”, “eta”, “theta”, “iota”, “kappa”, “lambda”, “mu”, “nu”, “xi”, “omicron”, “pi”, “…

2 years ago
Forum
Reply
RE: Fast search through text file

but it’s faster than your Python example!

2 years ago
Forum
Reply
RE: Fast search through text file

miauu: denisT: it’s very fast… I don’t see the reason to get it faster It is the same as this one: Fast search through text file What I h…

2 years ago
Forum
Page 8 / 777