convert a string to a new string where each character in the new string is "(" if that character appears only once in the original string, or ")" if that charac
I've been using the idiom below for some time now. And it seems to be the most wide-spread, at least on the sites I've visited. Is there a better/different way
When typing the following code ... (easily testable with W3schools' editor) <?php $basecss = '.class { margin-bottom:0 } /*1234567890'; $basemincss = ".
Here is a simplified JSON payload that I want to be able to change (the original one is much longer) { "request": { "jsonRequest": { "Alpha": {
Say I have three example strings text1 = "Patient has checked in for abdominal pain which started 3 days ago. Patient was prescribed idx 20 mg every 4 hours." t
TimeTemp displays as such 168@06:43:23AM stationTime displays opening and closing times of service area stations as such 6AM-10AM I’ve separated TimeTemp
Language: Scala I'm working on some tail recursion questions in Scala. (GOAL) A function that counts the number of ones in a list. The function takes a list of
I want to split 600 columns (listed in a vector) at a delimiter (in this case a /) into 2 new columns for each one (also listed as vectors). I've worked out bas
I'm working on an exercise to calculate the length of a string using pointers. Here's the code I've written below: int main() { std::string text = "Hello W
Requirement: I am receiving an email with a template and I need to filter out some text from the email. I am converting all the email body text as a string. ema
East_Seed_1="MIA"; East_Seed_8="ATL"; for i=1:7 s=rand; if s<MIA_prob_vs_ATL s=1; I want to create an algorithm that, gi
I have the following array: Array ( [0] => James [1] => Mike [2] => Liam [3] => Shantel [4] => Harry ) Arra
Consider the custom toString() implementation of a bean: @Override public String toString() { String.format("this is %s", this.someField); } This yields
I'm building a rather long file path, like so: file_path = f"{ENV_VAR}/my_dir/{foo['a']}/{foo['b']}/{bar.date()}/{foo['c']}.json" This is a s
I need a JavaScript method to allows me to convert the first letter of every word in a string to a capital letter like this: mike tyson wayne to Mike Tyson Wayn
I want to remove backslash from a string, I tried result.replace('\\','') but nothing changed. Anyone has an idea how I can remove it? result = '[(\'company_ids
Faced this question in an interview, which basically stated Find if the given two strings are anagrams of each other in O(N) time without any extra space I tr
I am new to swift. Is there a simple way to convert the following string to dictionary format. Example: input = "Name: Jack\\n Area: Place\\n FavColor: Blue\\n"
There is a need that I have a taken a output in a string such as string is "Initial: [818 v1] any other string or words here" and here I want to take 818 from t
I have two lists: a list of about 750K "sentences" (long strings) a list of about 20K "words" that I would like to delete from my 750K sentences So, I have to l