A list of puns related to "String figure"
Sometimes this can be obvious but for example I'm trying to parse a rawtext Adobe Illustrator Action file into JSON and the data looks like this:
/version 3
/name [ 11
436f6c6f725069636b6572
]
/isOpen 1
/actionCount 1
/action-1 {
/name [ 9
53657420436f6c6f72
]
/keyIndex 7
/colorIndex 2
You might be furiously typing "That's hexadecimal! It's obvious!" and very true, but only for /key [value]
pairs enclosed in square brackets. The syntax looks to be /name [ hexadecimalLength/2 hexadecimalValue ]
, but there are certain other strings in the file I'm not sure about specifically further down:
/parameter-2 {
/key 1718185068
/parameter-3 {
/key 1954115685
/parameter-4 {
/key 1919247406
Clearly not hexadecimal and fully numeric, and while they can be decoded from hex without errors:
Hexadecimal: "436f6c6f725069636b6572" ==> "ColorPicker"
Hexadecimal: "54657374" ==> "Test"
Hexadecimal: "52656374616e676c6520546f6f6c" ==> "Rectangle Tool"
Unknown: "1953460076" ==> "βSFv"
Unknown: "2003072104" ==> " β₯!β¦"
It's clearly not correct. So my main question is: What is the process here? It'd be great to be told what this is but I feel that doesn't address the underlying issue: I don't know what to do when this happens. If you're given an encoded string and you don't recognize the encoding, what's the first thing you're supposed do? What's the second? Is there a reference for figuring out which encoding this is? Any nifty sites I could paste the above in and be given a list of compatible encodings, any documentation I can cross-reference, or am I just supposed to see a string and know what the encoding is from experience?
Google, as helpful as it often can be, is so flooded with tangential articles and questions based on the word "encoding" that I don't know where to go from here.
Hello there! So for my SL Physics IA, I am measuring how the diameter of a guitar string affects its frequency at a constant tension. That said, I'm struggling with how to make sure all strings are the same tension - how can I tie a guitar string so that it hits a certain tension, and make sure all of them are identical? I've tried researching this and have come up with nothing, so as a last effort before I switch topics I figured I would ask here.
One idea I had was to make sure all strings are stretched over the same distance, are the same length, and have the same amount of excess length at the ends. However, as mass is a factor in force of tension, even this wouldn't be exactly controlled. Would this be good enough for me to conduct the experiment and mention somewhere that it's "not exact, but the closest I can get it", or would that not be a good idea considering how a "controlled tension" is a big part of my aim.
EDIT: Thank you all for the responses! While it's true that I overrated luck and underplayed my own talents, I still want to emphasize that there is still luck involved in my achievements. I was lucky that I never had bad luck. I was never grievously hurt, never in crippling debt, had great parents etc.
Also for everyone that says I had really great networking skills, I reread my post and realized I made a huge omission. I was able to get job 2 because job 1 needed me to quit. That was how I was able to get into job 2. Granted I had to still pass the interview but there was still an element of luck involved here.
I was congratulating myself and feeling proud at how I was a "self made" man because I did this without help from my parents (tuition, moved out at 18, didn't give me a car etc). However looking deeper it was further from the truth. My parents moved to Canada when I was young and it gave me a greater opportunities. And although my parents didn't give me tuition money, a car or paid for my cost of living knowing that I could always fall back and stay at home if I needed was a huge mental and morale safety net. It also propelled me to take greater risks like a 30k/yr salary while renting in Toronto.
I managed to get my first job by underbidding on the salary for 30k/yr. They were so shocked that they offered 35k instead. Then a string of luck got me to 6 figures.
Job 1 (2015): 35k/yr. My first job was in advertising and it was mostly data entry stuff.
Job 1.5 (2015): 45k/yr. A few months in my company got bought up, parent company offered +10k/yr for everyone to stay on. 1 month later my office was closed down and got a huge severance, auto pay out on annual bonuses.
Job 2 (2016-2020): 50k/yr - 60k/yr My manager in job 1 hooked me up with people in Job 2 (EDIT) because company of Job 1 wanted me to quit rather than to stay on and relocate to Quebec. Stayed on for a few years until this company was sold off in pieces. Start off with the same data entry stuff, but picked up a couple of projects along the way.
Job 3 (2020-2021): 75k/yr. Still in the advertising industry and the work is similar to things from Job 1, but at a different company.
Job 4 (2021): 97k/yr. Not quite 6 figures, but they offer 4% matching (also for the clickbait). Again this was just luck that a client from Job 2 needed someone to take over as they were bringing things in house and needed someone with experience. I was able to negotiate
... keep reading on reddit β‘Anyone able to point me to a similar example of this or provide a resource? I feel overwhelmed, like there's too many things going on at once and I have no idea how to proceed.
I know how to open the file as input, but how do I read into the vector of strings while being aware of all those parameters?
Help would very much be appreciated.
Here's the code:
import java.util.*;
import java.io.*;
public class parser
{
public static void main(String[]args) throws FileNotFoundException
{
File file = new File("TokensFromLex.txt");
Scanner in = new Scanner(file);
String input = in.nextLine();
System.out.println(input);
if (input=="Parsing the program:"){
System.out.println("works");
}
else{
System.out.println("does not work");
}
}
}
---------------------------------------------------------------------------------------------
The program prints out:
Parsing the program:
does not work
-----------------------------------------------------------------------------------------------
the text from the other file:
Parsing the program:
PROGRAM
sumTotal = (sum + 47 ) / total;
ageNumbers = age + 3 - 5 * (D / C);
Total = (sum + 47 ) /;
END
********************
PROGRAM_KEYWORD
IDENT
ASSIGN_OP
LEFT_PAREN
IDENT
ADD_OP
INT_LIT
RIGHT_PAREN
DIV_OP
IDENT
SEMICOLON
IDENT
ASSIGN_OP
IDENT
ADD_OP
INT_LIT
SUB_OP
INT_LIT
MULT_OP
LEFT_PAREN
IDENT
DIV_OP
IDENT
RIGHT_PAREN
SEMICOLON
IDENT
ASSIGN_OP
LEFT_PAREN
IDENT
ADD_OP
INT_LIT
RIGHT_PAREN
DIV_OP
SEMICOLON
END_KEYWORD
END_OF_FILE
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
static char s[256];
static char i = 0;
if (Serial.available()) {
s[i] = Serial.read();
if (s[i] == '\n') {
s[i] = '\0';
Serial.printf("%s\n", s);
i = 0;
}
}
}
Figured I'd turn a game that I play into a learning experience with its base64 components, but there's something about this string that I can't figure out.
Here's the original string on its own (let me know if I need to reformat this)
WZ1ZBUl03NCm51bWJlci0+aXNfcG93ZXJfb249IjAuMDAwMDAwIg0KbnVtYmVyLT5kdD0iMC4wNDAwMDAiDQpudW1iZXItPmhlcm9fYnJ1dGFsPSIxLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMzlfLT5tPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMzlfLT5wPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMzhfLT5tPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMzhfLT5wPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMzdfLT5tPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMz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AwMCINCmFycmF5LT5pbXBOdW1fMjRfLT5tPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMjRfLT5wPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMjNfLT5tPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMjNfLT5wPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMjJfLT5tPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMjJfLT5wPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMjFfLT5tPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMjFfLT5wPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMjBfLT5tPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMjBfLT5wPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMTlfLT5tPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMTlfLT5wPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMThfLT5tPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMThfLT5wPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMTdfLT5tPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMTdfLT5wPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMTZfLT5tPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fMTZfLT5wPSIwLjAwMDAwMCINCmFycmF5LT5pbXBOdW1fM
... keep reading on reddit β‘I have 2 strings -
worda = "laughter"
wordb = "slaughter"
the difference is the "s"
or
worda = "moth"
wordb = "mouth"
the difference is the "u"
or
worda = "moss"
wordb = "most"
the difference is the 4th character
i want to be able to catalog and count similarities between strings by iterating through them. I'm trying to do this all with loops, and i want to make it all readable code rather than a crazy one-liner.
i get a hiccup when the variations come early in the words... i think it's because in my first version of the program i just used zip() and then compared character by character. in the slaughter/laughter case, even though they are similar the count gets thrown off on the first loop and there was no way to recover it.
That's the background for what I'm trying to do. I guess the basic question is, "How do I iterate through 2 strings to count the number of similarities?"
Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.