First, the background: I'm writing a Ruby app that uses SendGrid to send mass emails. SendGrid uses a custom email header (in JSON format) to set recipients, values to substitute, etc. SendGrid's documentation recommends splitting up the header so that the lines are shorter than 1,000 bytes.
My question, then, is this: given a long JS...
I am currently trying to convert a VB6 program into C#. There was extensive use of string splitting into structure. For example,
Dim Sample AS String
Sample = "John Doe New York Test Comment"
Public Type Struct1
Name As String * 15
Address As String * 10
Comment As String * 20
End Type
Dim dataStruct As Struct1
Se...
I have written a query in Powershell interrogating a F5 BIG-IP box through it's iControl API to bring back CPU usage etc.
Using this code (see below) I can return the data back into a CSV format which is fine. However the $csvdata variable contains all the data. I need to be able to take this variable and for each line split each colu...
I can add the table in the backend or the front end, but if I add to the front end, it doesn't update on others computers. If I add it to the backend, it didn't show on the front end either. Probably because it is not linked. How would i link the new table AFTER I already split the databse?
Thanks!
...
I have a list a vertices and a list of triangles. I'd like to split this single mesh into, say 5, randomly shaped meshes. When the 5 randomly shaped meshes are in place the sphere should all line up and look like 1 solid mesh.
I need a algorithm to do this programmatically, not a tool to do it form me. Any pointers would be great!
...
Hi,
Is there any inbuilt way in C# to split a text into an array of words and delimiters?
What I want is:
text = "word1 + word2 - word3";
string[] words = text.Split(new char[] { '+', '-'});
//Need list '+', '-' here?
Any ideas? Obviously I can just process the text by hand... :)
...
HI,
I want to split a string into each single character. Eg:
Splitting : "Geeta" to "G", "e", "e" , "t", "a"
How can I do this? I want to split a string which don't have any separator
Please help.
...
Intention is to take a current line which contains commas, store trimmed values of all space and store the line into the array.
Why does this not work?
String[] currentLineArray = currentInputLine.replace("\\s", "").split(",");
...
Hi Guys
I have (yet another) powershell query. I have an array in powershell which i need to use the remove() and split commands on.
Normally you set an array (or variable) and the above methods exist. On the below $csv2 array both methods are missing, i have checked using the get-member cmd.
How can i go about using remove to ge...
xml:
<mode>1</mode>
<mode>2</mode>
<mode>3</mode>
<mode>4</mode>
<mode>5</mode>
<mode>6</mode>
<mode>7</mode>
<mode>8</mode>
<mode>9</mode>
<mode>10</mode>
<mode>11</mode>
<mode>12</mode>
i need to separate it on parts (for ex. on 4):
xslt:
<xsl:variable name="vNodes" select="mode"/>
<xsl:variable name="vNumParts" select="4"/>
<xsl:...
I want to split certain text using JavaScript. The text looks like:
9:30 pm
The user did action A.
10:30 pm
Welcome, user John Doe.
11:30 am
Messaged user John Doe
Now, I want to split the string into events. i.e.:
9:30 pm
The user did action A.
would be one event. I'm using RegEx for this:
var split = journals.split(/\d*\d:/);
...
I'm working with a file with about 2G. I want to read the file line by line to find some specific terms.
Whitch class can I better use: FileReader or FileInputStream?
And how can I find the specific words efficiently. I'm just using the split() method, but may be can I use the java.util.regex.Pattern class in combination with java.util.r...
how to split the numeric values from alphanumeric string value using java script?
for example,
x = "example123";
from this i need 123
thanks.
...
Hello,
I have a very large database of articles, of varying lengths. The articles have HTML elements in them. I have to insert some ads (simple <script> elements) in the body of each article when it is displayed (I know, I hate ads that interrupt my reading too).
Now, the problem is that each ad must be inserted at about the same posit...
Dear reader,
I'm faced with a bit of an issue. The scenario is that I have a multi-line text box and I want to put all that text into one single string, without any new lines in it. This is what I have at the moment:
string[] values = tbxValueList.Text.Split('\n');
foreach (string value in values...
I'm working on a project that involves parsing a large csv formatted file in Perl and am looking to make things more efficient.
My approach has been to split() the file by lines first, and then split() each line again by commas to get the fields. But this suboptimal since at least two passes on the data are required. (once to split by l...
I want to split a 400k line long log file from a particular line number.
For this question, lets make this an arbitrary number 300k.
Is there a linux function that allows me to do this?
I know split lets me split the file in equal parts either by size or line numbers but that's not what I want. I want to the first 300k in one file and...
Hey there. I'm trying to create a Regex javascript split, but I'm totally stuck. Here's my input:
9:30 pm
The user did action A.
10:30 pm
Welcome, user John Doe.
***This is a comment
11:30 am
This is some more input.
I want the output array after the split() to be (I've removed the \n for readability):
["9:30 pm The user did actio...
Okay, so I'm using perl to read in a file that contains some general configuration data. This data is organized into headers based on what they mean. An example follows:
[vars]
# This is how we define a variable!
$var = 10;
$str = "Hello thar!";
# This section contains flags which can be used to modify module behavior
# All modules r...
In JavaScript, if I run the following code:
<script type="text/javascript">
var nameStr = 'Chris Kate Steve';
var names = nameStr.split(/[ ]/);
var names2 = nameStr.split(' ');
for (var i in names)
{
alert(i);
}
for (var i in names2)
{
alert(i);
}
</script>
It will alert:
0
1
2
index
input
For the f...