Questions tagged [parsing]
Parsing refers to breaking an artifact into its constituent elements and capturing the relationship between those elements. This tag isn't for questions about the self hosted Parse Platform (use the [parse-platform] tag) or parse errors in a particular programming language (use the appropriate language tag instead).
parsing
57,626
questions
0
votes
0
answers
37
views
Serde doesn't see untagged enum variant in input ("data did not match any variant of untagged ...") [duplicate]
Using Serde, I want to parse JSON data like this:
{
"data_type": "uint8",
"scales": [{
"encoding": "jpeg",
"key": "4.0x4....
0
votes
1
answer
23
views
Are Python class member functions argument type checked at parse time?
I'm not intending to change this in my implementation, it's to improve my understanding of porting this code:
In the extract from the track_holder.py module below, why does the TrackObject class have ...
1
vote
1
answer
18
views
Databricks Pyspark parse connection string
Is there an easy way to parse a connection string in this format?
HOST=HostName;Port=1234;ServiceName=Database;USer ID=User1;Password=Password123;
I need to parse out the host and port, database, ...
-2
votes
0
answers
34
views
How to force PHP to look at URL [closed]
Update: Alex in the comments below pointed to the source of the problem. Therefore, this question is answered, as far as I am concerned.
I have a page where I can choose a dropdown to modify the ...
3
votes
1
answer
66
views
Raku Actions Predicated on Parse Success?
Is there a way to configure Raku actions to only execute after a parse has completed successfully? For example, the program below outputs "Jane is telling us her age....", even with ...
0
votes
0
answers
16
views
prevent javaScript from parsing html [duplicate]
var text = "<script></script>";
var div = getElementById("wrap");
div.innerHTML = text;
how can I prevent JavaScript from parsing html tags? this code returns blank ...
-3
votes
2
answers
54
views
parse js string to python
I have a string with js code
[{label: ' ', name: 'Confirmed', width: 30, formatter: 'checkbox'},{label: 'ID', name: 'ID', width: 100, key:true},{label: 'E-mail', name: 'F250275', width: null,...
-2
votes
0
answers
18
views
Format data to show pretty
I often have to parse various data. As a rule, these are scripts written at short notice. Then I need to pass this data to a human. What ways do you know how to display the data in a nice and simple ...
0
votes
2
answers
60
views
Python Pandas extract csv column containing json
I want to learn Pandas framework, so I find free csv with Euro data from kaggle.com
https://www.kaggle.com/datasets/piterfm/football-soccer-uefa-euro-1960-2024/data
But there're plenty of columns ...
0
votes
0
answers
11
views
Eliminating shift/reduce conflict in bison parser
I am working on defining a bison grammar for http and am dealing with a number of shift/reduce conflicts with regards to how optional whitespace is handled at the end of the header field value. Here ...
-1
votes
2
answers
35
views
JQ extract parent folder
I have an s3 route and I have to split it in bucket, prefix and key using JQ.
"s3://bucket/folder1/folder2/folder3/key.txt" ->
{
bucket: bucket,
prefix: folder1/folder2/folder3,
...
0
votes
2
answers
53
views
How to use answers of parsers when nesting parsers (sequentially)
This is my Parser
data Parser a = MkParser (String -> Maybe (String, a))
This is a parser that parses if a particular predicate holds true.
satisfy :: (Char -> Bool) -> Parser Char
-- takes a ...
0
votes
0
answers
16
views
To share the profile of the user, I want profile page to show as a QR code on a page to share/print/download
I use code from an existing widget - changed it and now I get an error
Custom widget QRcodeWidge cannot be parsed
// Begin custom widget code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
import '...
0
votes
1
answer
29
views
Get parent parser from argparse's parser
I have certain python code which takes CLI arguments and handles them using argparse's parser. I have a parent parser as such:
verbose_quiet_parent_parser = argparse.ArgumentParser(add_help=False)
...
0
votes
0
answers
58
views
Can I prevent expressions matching prefixes of other alternate expressions in a parsing expression grammar?
I have a parsing expression grammar that parses assignments which resemble natural language - part of the Rockstar programming language (https://codewithrockstar.com/), and I'm using PeggyJS (https://...