How to parse a .txt file into .xml?

This is my txt file: In File Name: C:\Users\naqushab\desktop\files\File 1.m1 Out File Name: C:\Users\naqushab\desktop\files\Output\File 1.m2 In File Size: Low: 22636 High: 0 Total Process time: 1.859000 Out File Size: Low: 77619 Hi...
more »

2017-03-16 14:03 (2) Answers

Splitting Strings within an Array

I am writing a program in python that reads in a text file and executes any python commands within it. The commands may be out of order, but each command has a letter ID such as {% (c) print x %} I've been able to sort all the commands with in the d...
more »

2017-03-15 04:03 (5) Answers

Dart: Get enum from String?

Hi there I have the following class in the Google Maps dart library and want to parse a Google Style JSONs into Dart object oriented format. Within the lib (can NOT be changed!) I have the following Enum: part of google_maps.src; @jsEnum class Map...
more »

2017-03-10 18:03 (2) Answers

PowerShell XML Output

I'm having trouble getting the desired results in the correct format with this PowerShell query when run against an XML file exported from Task Scheduler. I will eventually have this run against all Task Scheduler exported jobs dumped to the same one...
more »

2017-03-10 05:03 (2) Answers

Counting the number of "0" in this factor

Consider the following factor x = factor(c("1|1","1|0","1|1","1|1","0|0","1|1","0|1")) I would like to count the number of occurrences of the character "0" in this factor. The only solution I've found so far is sum(grepl("0",strsplit(paste(sapply...
more »

2017-03-02 02:03 (2) Answers

std::setfill and std::setw for input streams?

Consider this code: int xx; std::cin >> std::setfill('0') >> std::setw(4) >> xx; When sending 12 to the standard input I am expecting the value of xx to be 1200 and when sending 12345 I am expecting it to be 1234. However, it se...
more »

2017-03-01 12:03 (2) Answers

Warning parser/current is loading parser/ruby22

I'm newbie in Ruby, while excecuting a command I got this error. warning: parser/current is loading parser/ruby22, which recognizes warning: 2.2-compliant syntax, but you are running 2.3.1. My Ruby version is 2.3.1 My parser version is 2.4.0.0. I...
more »

2017-02-27 10:02 (0) Answers

Issue With @JsonProperty on Method

I currently have my POJO class as such for deserializing a json source. public class OpenBuilding extends Building { @JsonProperty("BuildingPostCode") @Override public String getPostcode() { return super.getPostcode(); } } ...
more »

2017-02-24 11:02 (1) Answers

Why is there no inverse to object.ToString()?

It seems like a good design decision that the System.Object class, and hence all classes, in .NET provide a ToString() method which, unsurprisingly, returns a string representation of the object. Additionally in C# this method is implemented for nati...
more »

2017-02-22 16:02 (2) Answers

Python Morse Code: S.O.S

I am having trouble finishing this code. My original plan was to accept a long string as input , for example '... ---.. -. -.. .... . .-.. .--.' and then be able to use morse_code = [code_input.split(' ')] to separate them and run them individually b...
more »

2017-02-21 05:02 (2) Answers

PHP html simple dom parser returns null

I'm trying to parse some table data, but that table doesn't have class or fixed number so i'm trying to catch it by using the next_sibling() method. But if I find a standard table it returns null. Did I make a mistake in my code? <table class="p...
more »

2017-02-20 10:02 (1) Answers

Tokenizing a string in Ruby?

I need to tokenize a string based on a few rules in Ruby. Basically, I need to group the file into sections that fit either a variable name, keyword, integer, or operation. So, for example, the file: x:=5;if x > 5 then x:=3; else x:=6; end wo...
more »

2017-02-19 21:02 (1) Answers

read multiline strings with ruby, broken by "\"

in some RPM spec files (for instance), there are multiline strings which look like: %build export CFLAGS="%{optflags} -fomit-frame-pointer \ -W -Wall -Wno-unused-parameter -Wstrict-prototypes -Wpointer-arith -fPIE" export LDFLAGS="-pie" %configure -...
more »

2017-02-19 17:02 (2) Answers

Error in formula to neuralnet

This is actually a copy of a perfectly useful question whose answer was (partially) arrived at by the questioner. Original title: "Formulas with more than 512 characters for neuralnet model in R for text analysis". He eventually fixed the problem alt...
more »

2017-02-15 01:02 (2) Answers

PHP to Parse a HTML page and output a certain div

So I've been trying to embed a part of a website within my website due to security reasons I cannot disclose the website that I am trying to embed so for the purpose of this example I am going to use bbc.co.uk. The following is the php/html code: ...
more »

2017-02-12 18:02 (1) Answers

Find declared function from user input

I have a prompt in my "app", like irb that takes an input,I want it to parse the input and execute a function that I've defined. Similarly, my app takes an input through gets, and calls the function. For example, command = gets.gsub("\n","") take...
more »

2017-02-10 16:02 (1) Answers

Parsing simple query syntax

Let's say I have a query string like that: #some terms! "phrase query" in:"my container" in:group_3 or #some terms! or in:"my container" in:group_3 terms! "phrase query" or in:"my container" test in:group_3 terms! What is the best way to...
more »

2017-02-10 15:02 (2) Answers

Parse JSON with escaped JSON string using Jackson

I need to parse a JSON, which has an escaped JSON string as a value, into a Parcelable object. Reason I have kept it as String is that I have to deffer the parsing of this escaped JSON and the initialization of components related to it. I have succe...
more »

2017-02-09 15:02 (0) Answers

Parsing SOAP response PHP

I have a SOAP response that I am trying to parse, however I seem to be getting an error. SOAP response: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <ValidateNewUserResponse xmlns="urn:websitea.com/v2">...
more »

2017-02-08 10:02 (3) Answers

jsoup : How to search for date text from a webpage

Simply this is what I am trying to do : (I want to use jsoup) pass only one url to parse search for date(s) which are mentioned inside the contents of web page Extracts at least one date from the each page contents convert that date into standard ...
more »

2017-01-31 06:01 (1) Answers

Removing <head> issues, I need guide/assistance

So guys, i'm make a web parser it was good but i saw that some words inside <head> is screwing everything up (and <strong> in the body too). My code is This one here before nokogiri but I'm new at ruby programming and just started to know...
more »

2017-01-31 02:01 (1) Answers

Parse PHP into HTML style parameter

I want to make the style parse from the information given in the query. I have the bgcolor & text color that I want displayed listed in my table, and I have tested the MySQL query and it runs fine, but I've tried to get it to run here but it doe...
more »

2017-01-29 06:01 (0) Answers

How to Connect 2 Lists

I'm not sure wheter it's a simple thing or not. I've an XML File structered like this: <DEFTABLE> <CUBE NAME="FristCube" /> <OUT NAME="Line1" /> <OUT NAME="Line2" /> <IN NAME="LineX" /> <IN...
more »

2017-01-24 11:01 (3) Answers

Can i also put a scope through the filter?

i made a taskfilter and i need to edit the tekst of the titel if another button is selected, i tried a scope but that doen't work do you guys know of mayby somethiing else if scope does not works? the rule that i am talking about it $scope,infotitel...
more »

2017-01-23 11:01 (1) Answers

Can I use Scrapy for scraping and parsing only?

I'm new to Scrapy and I've searched around, but can't seem to find any answers specifically for what I want to do. I'd like to scrape content from a pre-defined list of webpages (my growing list of bookmarks) and submit relevant content to a MySQL da...
more »

2017-01-15 23:01 (0) Answers