Parsing refers to the action by software of breaking an artifact into its constituent elements and capturing the relationship between those elements.

learn more… | top users | synonyms (1)

0
votes
1answer
12 views

Parsing a string (e.g. “Name: John, CallName: Peter”) to get the values of certain attributes

I have written a small method that extracts certain information from a string. An example of such a string is ...
0
votes
1answer
18 views

Creating objects from parsed file [on hold]

I'm newbie in Python but I want to know some tricks to make my code look cute. I know that syntax of Python allows to do this, but I don't know how. Suppose I have file with lines of format "x y z" ...
4
votes
1answer
51 views

Parse prospero-Parameters

Prospero is a URI Scheme. There you have fields and values. Would you guys check this code and give common suggestions or even testcases for junit-Tests? Sorry Docu is in German. ...
1
vote
1answer
48 views

Mapping/parsing database table data to output data

I have currently implemented this simple example of a database to output for a REST API to show the way information is being parsed, mapped and serialized starting from database data converting it to ...
5
votes
3answers
60 views

Windows forms set saved groupbox location settings

I have a Windows form that when a user moves some groupboxes around, before the application exits, it saves those X and Y coordinates into a MySQL database (with a bit of added text to identify which ...
4
votes
1answer
25 views

Finding the next XML element

I am looking for a better way to do a while cycle with the variable update. The background is that I'm writing a StAX-line XML reader in JavaScript and want to ...
11
votes
5answers
850 views

Finding longest word in a string

I was working on a problem from Coderbyte. The challenge was to write a function that takes in a string and returns the longest word in the string. If two words are the same size then it asks to ...
12
votes
3answers
2k views
6
votes
2answers
76 views

Parse floats from a string

While fixing some old code I came up with a class that parses floats from a string. This is used for parsing svg files in xml format. Floats can be separated by comma, space or anything at all in ...
7
votes
3answers
62 views

Parsing dates from an OCR application

I wrote this code to parse dates from the output of the OCR, which means that the obtained date can be literally anything, so I put some restrictions in place: Date is the the format of: ...
11
votes
4answers
158 views

Improving the readability and efficiency of parser code

Recently, I had a test and I wrote this code, but they didn't like my code because it was "deplete and nested". In order to improve my skills, what would be good ways to make this more readable and ...
2
votes
0answers
34 views

Text parsing and calculator (calculate Java heap memory)

I'm writing small tool, which must execute jmap -heap, write output to log, then takes some data from log and calculate used memory. I added some ...
3
votes
2answers
67 views

Parsing arguments for cd command

This file manager has a code snippet that handles an argument of the "cd" console command. It converts the argument to a valid path, expands ~ and environment variables into the corresponding values: ...
5
votes
1answer
50 views

Parsing .obj 3D meshes

I have a legacy code parsing .obj 3D mesh files. However, it seems to me a bit ugly: ...
3
votes
0answers
45 views

Python API for TreeStructInfo - new simple config format

I've created a simple (300 SLOC) API for a new configuration format (I'm not the author of it). Unfortunately, the specification is only in Polish at the moment, but you can see how it looks here. ...
9
votes
3answers
103 views
+150

Ugly workaround to get the vbext_ProcKind of a procedure is breaking encapsulation

This is a follow up to Extending the VBAExtensibility Library. It turns out that code had a really nasty bug. Anytime vbeProcedure.StartLine got called, I was ...
4
votes
1answer
73 views

Reading and Parsing JSON from a Game Server

This is my naive (but currently working) attempt at reading JSON commands from a Java game server in Objective-C. I am afraid I might be doing something wrong, so hopefully this question will be a ...
3
votes
1answer
52 views

Dirty XML-to-JSON parser

I have that XML-to-JSON function based on ElementTree. It looks very simple but until now it does what it's supposed to do: give a JSON description of the ...
3
votes
1answer
67 views

Deserialize an email header into key-value pairs

I've created a function that will deserialize an email header into a list of key-value pairs. I've run numerous tests using MS Office Outlook 2010 and MS Office 14.0 Object Library, all of which were ...
3
votes
3answers
314 views

Parsing and formatting a time two ways (perfectionistic approach)

I'm still not satisfied by the readability of the code. The wanted behavior which would be self descriptive would sound like: "I've two fields; one is for the date and one for the hour. This two ...
5
votes
1answer
61 views

JavaScript path parsing

I was attempting to do some contribution to the underscore-contrib library, and I ended up writing a function that will parse a JavaScript path to later on expose through an API if the path exists or ...
14
votes
2answers
484 views

Lexer+Parser code for my “Reedoo” programming language

I've been working on my own programming language, as a hobby for the past couple of months now, called Reedoo. It is implemented in pure C++ 11 and uses only the libraries that come with C++; no ...
1
vote
0answers
22 views

XML data-parsing design that doesn't sacrifice efficiency [closed]

I have the following method signature ...
9
votes
1answer
65 views

Yet Another Fraction

A recent question inspired me to implement a Fraction class. I decided to write this one in vba, because I like writing tools for the poor souls that still have to ...
8
votes
2answers
83 views

Fixing double arithmetic errors

I am trying to account for the errors in double arithmetic in a C# program I am writing, and came up with this first solution that seems to work well for most cases: ...
2
votes
2answers
64 views

Histogram of length of words in text

This my first real program in python. I welcome harsh criticism. I tried to make it as efficient as possible. Trying to balance speed and readability as well. My program takes a file of text and ...
10
votes
5answers
928 views

Using TryXXX pattern to avoid exceptions

I have been using the TryXXX and GetXXX pattern lately to give clients a choice whether to trap an exception or to read a boolean. An example of this concept would be ...
1
vote
0answers
49 views

A function for parsing words from a string without using whitespace

I'm trying to parse words from a badly garbled text file that contains many repeats. It's about 100k characters in length and was formed from joining many substrings in alphabetical order. I'm ...
3
votes
1answer
23 views

Implementation of *nix ipcalc

I posted a JS subnetting calc before, but I wanted to try a CLI version, so I made this. The parts I'm most worried about are: structure (could I refactor the layout better?) Did I goof any math? ...
4
votes
3answers
243 views

Parsing dates from a webpage

I have two inputs (TextBox) on my front end. The following code parses them from their string representation to aDateTime object. If it fails, it then sets ...
1
vote
0answers
25 views

Extracting country data from HTML tables

I am trying to optimize/improve my coding skills in python The rationale behind this code is to extract some data from files and store them in a dictionary. I tried to comments lines to improve ...
11
votes
2answers
260 views

Markdown to HTML

...
4
votes
2answers
115 views

Serializing data from two URLs in the same object efficiently

This is a follow-up to: Serializing JSON data coming from two URLs in the same object I have two URLs (urlA and urlB) and they ...
2
votes
1answer
121 views

Java Query String Parser

I have written a Query String Parser to Parse a given query string. Is there any enhancement I can do? ...
5
votes
1answer
90 views

Parsing Valve Key-Value files

Introduction Valve recently launched the Dota 2 Workshop Tools, which allows players to create their own maps with custom gamemodes, similar to Warcraft 3 in capabilities. Ability and unit ...
4
votes
2answers
66 views

Evaluating algebra expression using an auxiliary VB class compiled on the fly and consumed in a C# project

I want to create algebra evaluator but I don't want to write my own parser because it takes much time to learn. I don't like algebra expression in C# because it does not look natural compared to VB ...
10
votes
2answers
122 views

Parsing of a (Linux) netlink hotplug uevent packet

The netlink service is used, among other things, to notify userspace about hotplug events (e.g. "a device has been connected"). These events come in the form of packets, which follow the following ...
1
vote
0answers
23 views

Infix epression evaluation

I'm looking for some feedback on my OCaml implementation of some methods to translate infix expressions to postfix and then evaluate them. I'm very new to OCaml, coming from C#/Java and JavaScript ...
5
votes
1answer
94 views

MP4 Parser: Reducing code duplication

I'm developing an MP4 parser. Each class represents each box in MP4 file, and every box class derives from base box class. The problem is that below code is duplicated on every box class: ...
8
votes
2answers
242 views

Serializing JSON data coming from two URLs in the same object

I have two URLs (urlA and urlB) and both the URL gives me a JSON response back in the same JSON format. Below is my JSON string ...
6
votes
1answer
57 views

Splitting plain text dictionary data to multiple files, round 2

This is a continuation of my earlier question. I have a plain text file with the content of a dictionary (Webster's Unabridged Dictionary) in this format: ...
7
votes
2answers
109 views

Splitting plain text dictionary data to multiple files

I have a plain text file with the content of a dictionary (Webster's Unabridged Dictionary) in this format: ...
4
votes
2answers
250 views

Infix to Postfix Converter Program

This is my homework. Kindly help me check it? The instructions are: Implement an infix expression to postfix expression converter. You are to implement the infix to postfix algorithm presented ...
12
votes
3answers
300 views

SQLConnect - A library for connecting Objective-C/Swift applications to Microsoft SQL Server

The complete SQLConnect library can be found here. The file from which the following method belongs can be found here. At some point I may or may not open questions for reviewing other aspects of ...
4
votes
1answer
62 views

Is this a good algorithm to unflat js objects?

I am dealing with a scenario where I get data in the following form: ...
4
votes
2answers
121 views

Parse text file function

This method takes a text file of my work schedule and parses it. It works, but is kind of kludgey, and I'm looking for feedback and suggestions. My first attempt at a file parser, and my first look ...
2
votes
1answer
67 views

Parsing XML to send data into several files

My code works for the most part. (The problems are on the html side not the python side) however I feel it could run quicker or more efficiently. Due to the size of the XML document it parses it's ...
3
votes
2answers
79 views

More efficient conversion of tab-formatted nested data structure to json

I have data that looks like the "Input" below and need to convert it into JSON. My solution works by parsing the text to find a level for each data point. Then I use a recursive structure to build a ...
10
votes
3answers
420 views

Parsing ARP cache in C

How can I make this better? ...
6
votes
2answers
131 views

Simple CSS Parser

I wrote a very simple CSS parser and would appreciate some general feedback regarding the security, code style etc... Basically, this does the following: Take user's uploaded CSS file Save it to ...