splitting

splitting files for P2P application

I have to implement a middleware system for file sharing, and it has to split the files not unlike what happens on bittorrent, where it sends and receives separate pieces simultaneously from varios sources. How do i do that? Is it a library or i have to implement the file splitting myself? ...

HTTP reponse splitting

Hi, im trying to handle this possible exploit and wondering what is the best way to do it? should i use apache's common-validator and create a list of known allowed symbols and use that? ...

Splitting rows in SQL

Can someone please let me know how to get the different segments of the three rows that are intersecting in different ways using SQL? The three rows in #t2 represent sets A,B, C - I am looking for A I B, A I C, B I C, A I B I C, A' , B', C' etc., (7 possible segments with 3 rows as in a Venn diagram) where I is the Intersection. I am lo...

How do I split a string with any whitespace chars as delimiters?

What regex pattern would need to pass to the java.lang.String.split() method to split a string with all whitespace characters (' ', '\t', '\n', etc.) as delimiters? ...

c++ file io & splitting by separator

I have a file with data listed as follows: 0, 2, 10 10, 8, 10 10, 10, 10 10, 16, 10 15, 10, 16 17, 10, 16 I want to be able to input the file and split it into three arrays, in the process trimming all excess spaces and converting each element to integers. For some reason I can't find...

Is there a way to split strings with String.split() and include the delimiters?

I'm trying to split a string with all non-alphanumeric characters as delimiters yet Java's String.split() method discards the delimiter characters from the resulting array. Is there a way to split a string like the "\W" regex pattern does, yet keep the delimiters? ...

Svn repository split problem

I want to split a directory from a large Subversion repository to a repository of its own, and keep the history of the files in that directory. I tried the regular way of doing it first svnadmin dump /path/to/repo > largerepo.dump cat largerepo.dump | svndumpfilter include my/directory >mydir.dump but that does not work, since the di...

Biztalk Splitting a file and the use of

Hi! In Biztalk 2006 I have a custom pipeline that split a file into many files, before each file get mapped. In the send pipeline I use "Use Temporary file for writing". My question is: When splitting messages and use "Use Temporary file for writing", will every one of the splitted files be moved to the out folder from the temp folder a...

Splitting a string of text from textbox using VB.NET

I want to add a text box on a web page in order for users to add space delimited tags. When the user submits the page how do I take the tags out of the text box and add each as a record in a SQL database? I want to use VB.NET. ...

How to split-output sounds to speaker and earphone?

OS: win xp motherboard: ASUS A8N-E (with sound card built-in) I have a speaker and an earphone. When using mp3 player and media player at the same time, all of the sounds will output to all sound output devices(speaker and earphone). Is it possible to let the mp3 only output in speaker while the media player only output in earphone? ...

Is There A Built-In Way to Split Strings In C++?

well is there? by string i mean std::string ...

Scanner vs. StringTokenizer vs. String.Split

I just learned about Java's Scanner class and now I'm wondering how it compares/competes with the StringTokenizer and String.Split. I know that the StringTokenizer and String.Split only work on Strings, so why would I want to use the Scanner for a String? Is Scanner just intended to be one-stop-shopping for spliting? ...

How do I handle every ASCII character (including regex special characters) in a Perl regex?

I have the following code in Perl: if (index ($retval, $_[2]) != -1) { @fs = split ($_[2], $_[1]); $_[2] is the delimiter variable and $_[1] is the string that the delimiter may exist in. ($_[0] is used elsewhere) You may have guessed that this code is in a subroutine by those variable names. Anyway, onto my question, when my del...

Split a text into single words

Hello! I would like to split a text into single words using PHP. Do you have any idea how to achieve this? My approach: function tokenizer($text) { $text = trim(strtolower($text)); $punctuation = '/[^a-z0-9äöüß-]/'; $result = preg_split($punctuation, $text, -1, PREG_SPLIT_NO_EMPTY); for ($i = 0; $i < count($result); $i...

Splitting a String (especially in Java with java.util.regex or something else) ...

Does anyone know how to split a string on a character taking into account its escape sequence? For example, if the character is ':', "a:b" is split into two parts ("a" and "b"), whereas "a\:b" is not split at all. I think this is hard (impossible?) to do with regular expressions. Thank you in advance, Kedar ...

Java string - get everything between (but not including) two regular expressions?

In Java, is there a simple way to extract a substring by specifying the regular expression delimiters on either side, without including the delimiters in the final substring? For example, if I have a string like this: <row><column>Header text</column></row> what is the easiest way to extract the substring: Header text Please note ...

Splitting /proc/cmdline arguments with spaces

Most scripts that parse /proc/cmdline break it up into words and then filter out arguments with a case statement, example: CMDLINE="quiet union=aufs wlan=FOO" for x in $CMDLINE do »···case $x in »···»···wlan=*) »···»···echo "${x//wlan=}" »···»···;; »···esac done The problem is when the WLAN ESSID has spaces. Users expect to set wlan='...

hub4com source code

Anyone know where to find the source code for hub4com? i've got to read the contents of a com port and spit it out to 4 (or more) virtual com ports, so several apps can get the incomming data. ...

Text area text to be split with conditions

I have a text area where a user can enter free flow text. I want to separate out lines/occurrences in my Java class based on the below conditions: When the user does not press the enter key, I want to get substrings (texts) of 10 characters each. When the user does press enter, I want to separate that part out and start again counting t...

VBScript howto split a quoted delimited AND spaced separate values?

I have the following string: "C:\Program Files\Application\Path\executable.exe" -- "/flag" I am trying to split the string so that I get: array(0) = C:\Program Files\Application\Path\executable.exe I don't care about the rest of the array since I am just concerned about the file path not the args. ...