Search Results

Search found 1839 results on 74 pages for 'comma separated'.

Page 3/74 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Counting comma seperated values in php,how to?

    - by Jay
    Hey folks, I have a variable holding values separated by a comma (Implode), I'm trying to get the total count of the values in that variable however, count() is just returning 1. I've tried converting the comma separated values to a properly formatted array which still spits out1. So heres the quick snippet where the sarray session equals to value1,value2,value3: $schools = $_SESSION['sarray']; $result = count($schools); Any help would be appreciated.

    Read the article

  • Create comma seperated values in perl

    - by Mike
    Let's say I have a list of elements @list=(1,2,3); #desired output 1,2,3 And I want to print them as comma seperated values. And most importantly, I do not want the last element to have a comma after it. What is the cleanest way to do this in Perl?

    Read the article

  • Data Validation of a Comma Delimited List

    - by Brad
    I need a simple way of taking a comma seperated list in a cell, and providing a drop down box to select one of them. For Example, the cell could contain: 24, 32, 40, 48, 56, 64 And in a further cell, using Data Validation, I want to provide a drop-down list to select ONE of those values I need to do this without VBA or Macros please. Apolgies, I want this to work with Excel 2010 and later. I have been playing around with counting the number of commas in the list and then trying to split this into a number of rows of single numbers etc with no joy yet.

    Read the article

  • Export to csv, string w/ comma in it, splits it up

    - by Brad
    This code exports data into a csv file, which is opened within Excel. When a string has a comma within it, it messes up the order of the data. I need help modifying my code below to resolve any data that contains a comma within it, to not to create a new column. I am assuming it will pass each string within double quotes, so any comma within those quotes, then it will make an exception. Any help is appreciated. $result = mysql_query("select lname, fname, email, dtelephone, etelephone, contactwhen, comments, thursday, friday, saturday, sunday, monday FROM volunteers_2010"); $csv_output .= "Last Name,First Name,Email,Telephone (Day),Telephone (Evening),Contact When,Comments,Thursday,Friday,Saturday,Sunday,Monday,Comments\n"; $i = 0; if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_assoc($result)) { $csv_output .= $row['Field'].", "; $i++; } } $csv_output .= "\n"; $values = mysql_query("SELECT lname, fname, email, dtelephone, etelephone, contactwhen, comments, thursday, friday, saturday, sunday, monday FROM volunteers_2010 WHERE venue_id = $venue_id"); while ($rowr = mysql_fetch_row($values)) { for ($j=0;$j<$i;$j++) { $csv_output .= $rowr[$j].", "; } $csv_output .= "\n"; }

    Read the article

  • Newline-separated xargs

    - by porneL
    Is it possible to make xargs use only newline as separator? (in bash on Linux and OS X if that matters) I know -0 can be used, but it's PITA as not every command supports NUL-delimited output.

    Read the article

  • Make a animation path separated by clicks

    - by Tomáš Zato
    I have a long text on powerpoint slide. Instead of separating it on multiple slides, I made an animation that moves it up using animation path, so that text hidden at bottom appears while text on top goes off screen. However, I need more move animations to reaveal more text (the text takes more than 2 screens). This means, I need two (or more) animation paths (of the same length) and I want them to move obejct from position, where the last path has left it. Instead, multiple animations always operate with objects original position. That's useless. You can download test document, where I made an example of what I want: animation test.pptx

    Read the article

  • XSL - How to match consecutive comma-separated tags

    - by PocketLogic
    I'm trying to match a series of xml tags that are comma separated, and to then apply an xslt transformation on the whole group of nodes plus text. For example, given the following partial XML: <p>Some text here <xref id="1">1</xref>, <xref id="2">2</xref>, <xref id="3">3</xref>. </p> I would like to end up with: <p>Some text here <sup>1,2,3</sup>.</p> A much messier alternate would also be acceptable at this point: <p>Some text here <sup>1</sup><sup>,</sup><sup>2</sup><sup>,</sup><sup>3</sup>.</p> I have the transformation to go from a single xref to a sup: <xsl:template match="xref""> <sup><xsl:apply-templates/></sup> </xsl:template> But I'm at a loss as to how to match a group of nodes separated by commas. Thanks.

    Read the article

  • Efficient way in Python to add an element to a comma-separated string

    - by ensnare
    I'm looking for the most efficient way to add an element to a comma-separated string while maintaining alphabetical order for the words: For example: string = 'Apples, Bananas, Grapes, Oranges' addition = 'Cherries' result = 'Apples, Bananas, Cherries, Grapes, Oranges' Also, a way to do this but while maintaining IDs: string = '1:Apples, 4:Bananas, 6:Grapes, 23:Oranges' addition = '62:Cherries' result = '1:Apples, 4:Bananas, 62:Cherries, 6:Grapes, 23:Oranges' Sample code is greatly appreciated. Thank you so much.

    Read the article

  • Classic asp comparison of comma separated lists

    - by Reiwoldt
    Hello, I have two comma separated lists:- 36,189,47,183,65,50 65,50,189,47 The question is how to compare the two in classic ASP in order to identify and return any values that exist in list 1 but that don't exist in list 2 bearing in mind that associative arrays aren't available. E.g., in the above example I would need the return value to be 36,183 Thanks

    Read the article

  • Comma Separated values in Oracle

    - by Vabs
    I have a column with comma separated values like 6,7,99.3334. I need write a PL SQL procedure that will give me these values separately. The Length of the column is 40. Can anyone help me with this?

    Read the article

  • Efficient way in Python to remove an element from a comma-separated string

    - by ensnare
    I'm looking for the most efficient way to add an element to a comma-separated string while maintaining alphabetical order for the words: For example: string = 'Apples, Bananas, Grapes, Oranges' subtraction = 'Bananas' result = 'Apples, Grapes, Oranges' Also, a way to do this but while maintaining IDs: string = '1:Apples, 4:Bananas, 6:Grapes, 23:Oranges' subtraction = '4:Bananas' result = '1:Apples, 6:Grapes, 23:Oranges' Sample code is greatly appreciated. Thank you so much.

    Read the article

  • @synthesize comma separated list

    - by Frooditz Furs
    Hi, I've read apple's Objective-C doc and am curious about using @synthesize. I've seen classes with a long list of @synthesizes and I've seen classes with one @synthesize then a long comma-separated list of ivars. So what's the difference between: @synthesize ivar1; @synthesize ivar2; @synthesize ivar3; and @synthesize ivar1, ivar2, ivar3; ????

    Read the article

  • Comma separated variable in MySQL

    - by ryan
    I want to create a stored procedure in MySQL and one of the input parameters will need to be a comma separated list of integers. How do I loop through each integer and run an update statement on it? I've googled it but can't seem to find anything that will work for MySQL.

    Read the article

  • MySQL: select words as rows even som are "new line" separated in one field

    - by Tillebeck
    Hi I have a table with a field where words are written separated with new lines. So a select on this single field from to rows will output 3 lines for first row and 2 lines for second row: Row1 designationer nye kolonier mindre byer Row2 udsteder bopladser I would like to do a select that select all these lines as if they had been rows in the table like: SELECT do_the_split(field) FROM table so the result would be more like: Row1 designationer Row2 nye kolonier Row3 mindre byer Row4 udsteder Row5 bopladser is there any way to do this in MySQL? BR. Anders

    Read the article

  • Disallow using comma operator

    - by RiaD
    I never use the comma operator. But sometimes, when I write some recursions, I make a stupid mistake: I forget the function name. That's why the last operand is returned, not the result of a recursion call. Simplified example: int binpow(int a,int b){ if(!b) return 1; if(b&1) return a*binpow(a,b-1); return (a*a,b/2); // comma operator } Is it possible get a compilation error instead of incorrect, hard to debug code?

    Read the article

  • C# How to place a comma after each word but the last in the list

    - by user576712
    I totally new to C# and learning as I go. I am stuck on issue which I'm hoping an experienced programmer can help. I have added a CheckedListBox to my form and added a collection of 6 items to it. I need all but the last item selected to have a comma placed beside it, so my question is: how can I tell C# NOT to place a comma beside the last item selected? foreach (object itemChecked in RolesCheckedListBox.CheckedItems) { sw.Write(itemChecked.ToString() + ","); } Thanks for any help received! Dan

    Read the article

  • Join collection of objects into comma-separated string

    - by Helen Toomik
    In many places in our code we have collections of objects, from which we need to create a comma-separated list. The type of collection varies: it may be a DataTable from which we need a certain column, or a List<Customer>, etc. Now we loop through the collection and use string concatenation, for example: string text = ""; string separator = ""; foreach (DataRow row in table.Rows) { text += separator + row["title"]; separator = ", "; } Is there a better pattern for this? Ideally I would like an approach we could reuse by just sending in a function to get the right field/property/column from each object.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >