Search Results

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

Page 12/74 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Rookie PHP question

    - by Thomas
    I am hacking together a theme for wordpress and I am using the following code to pull out data from a custom field with several values: <?php $mykey_values = get_post_custom_values('services'); foreach ( $mykey_values as $key => $value ) { echo "<span>$value, </span>"; } ?> I use a comma to seperate the results, but I don't want a comma after the last result. How do I get around this?

    Read the article

  • Looking for a good text parsing library for C#

    - by Chris Stewart
    Has anyone run across a quality library that will parse, line by line, CSV, tab-delimited, and Excel files? I've started to do it manually but have noticed some of the intricacies in parsing a comma-delimited file. Such as situations where a cell has a comma in it as part of the data (blah,\"LastName, Jr.\",blah,blah).

    Read the article

  • How to write the content of a dictionary to a text file?

    - by codemonkie
    I have a dictionary object of type Dictionary and trying to use StreamWriter to output the entire content to a text file but failed to find the correct method from the Dictionary class. using (StreamWriter sw = new StreamWriter("myfile.txt")) { sw.WriteLine(dictionary.First()); } I can only retrieve the first element and it is bounded by a square bracket plus a comma separator in between as well: [Peter, Admin] and would be nice to have [Peter Admin] (without the comma)

    Read the article

  • Pyton, print delimited list

    - by Mike
    Consider this Python code for printing a list of comma separated values for element in list: print element + ",", What is the preferred method for printing such that a comma does not appear if element is the final element in the list. ex a = [1, 2, 3] for element in a print str(element) +",", output 1,2,3, desired 1,2,3

    Read the article

  • Python, print delimited list

    - by Mike
    Consider this Python code for printing a list of comma separated values for element in list: print element + ",", What is the preferred method for printing such that a comma does not appear if element is the final element in the list. ex a = [1, 2, 3] for element in a print str(element) +",", output 1,2,3, desired 1,2,3

    Read the article

  • Rails validates_format_of

    - by squids
    Hi, I want to use validates_format_of to validate a comma separated string with only letters (small and caps), and numbers. So. example1, example2, 22example44, ex24 not: ^&*, < , asfasfsdafas<#%$# Basically I want to have users enter comma separated words(incl numbers) without special characters. I'll use it to validate tags from acts_as_taggable_on. (i don't want to be a valid tag for example. Thanks in advance.

    Read the article

  • Javascript toFixed localized?

    - by Marco Demaio
    Do you know if toFixed is a localized function? I mean will this: var n = 100.67287; alert(n.toFixed(2)); show "100.67" on english US OS/browsers and "100,67" (with comma) on Italian OS/browsers (Italian or any other local system that uses comma as decimal separator). Thanks!

    Read the article

  • Multi valued profile property mapping to AD in Sharepoint

    - by keeno
    I'm trying to map my skills and responsibilities profile sections to one of the custom properties in Active Directory (extensionattribute1 , 2, etc). I'm entering comma seperated values in AD and it's importing the values fine but sees the comma seperated values as one value on import. i.e. 'C#,asp.net,javascript' rather than 'C#', 'asp.net', 'Javascript'. Any ideas. I'm almost there it's just not spliting the values correctly on import. thanks in Advance

    Read the article

  • Space as grouping separator in printf

    - by blekione
    I know how to use comma in printf as grouping separator to print value in format like 1,000,000.00 to print it that way I'm using command System.out.printf ("%,.2f", value); but how to use space as grouping separator to format value like 1 000 000.00 I tried to find solution but solutions with using DecimalFormat look at now to complicate for me (beginner level). Is there as easy way as in example with comma to do it?

    Read the article

  • SQL - Stored Procedure with Select Statement using IN (@Variable_CommaDelimitedListOfIDS)

    - by GigaPr
    Hi I am creating a stored procedure to which i want to pass as variable a comma delimited list of Ids I want to use the Ids into a select statement something like Create Procedure up_TEST @Ids VARCHAR(MAX) AS SELECT * FROM ATable a WHERE a.Id IN(@Ids) Obviously i get the error that @Ids is a varchar and not an INT but how can i convert the comma delimited list I am using SQL Server 2008 Thanks

    Read the article

  • JQuery: Get SRC for each image that has specific atrtibute

    - by adbox
    Hey Guys, I am wokring on a dialog, where in execution I want to round up all items that have a specific attribute and place an attribute value of their's into a comma delited list. This is as far as I have gotten, which isnt far. buttons: { 'Hook': function(){ $('.grid_pic:has(border=3)').(loop through id's, grab src, build variable with srcs comma delimeited) } Any ideas?

    Read the article

  • Problem in importing the CSV file containing multiple commas in a sigle field

    - by kakaajee
    Hi Experts, I am having an issue with importing a large(60MB) CSV file in MYSQL DB. The problem arises when an address field has multiple comma seperated values e.g. home no, street no, town etc. I tried to use BigDump for it but, the problem did not solved because of a single field containing multiple comma separated values. Any idea, suggestion or solution from experts how to handle it? Please reply, because I am sick of it. Thanks

    Read the article

  • Services - Separate Sites or One Site - Impact on SEO

    - by Lynda
    I have a client who is a lawyer that specializes in Criminal Defense and DUI, however, he does not show up well in Google. In researching the sites that rank better have much more content for those specialties than his site does and my thought it that he needs to add more quality content to rank better for those searches. On his site he mentions his specialties, but also he has various personal things on his sites that reflect his interest. These are clearly separated from the business portion. My questions are should he 1) separate his personal information into a new domain and 2) should he have a separate URL for each of his specialties? OR would one URL work as long as everything is clearly separated? I read once that for legal services to rank well you should make a separate site for each specialty and have that site focus solely on that service.

    Read the article

  • ETL Software Research Question

    - by WernerCD
    Where I work, we use an in-house ETL solution that's homegrown and has been around for 5-10 years. I'm still new to my data analysis job, but I was wondering about the ETL tools that are out there. This is a new area for me. My situation, and job, is basically digging in a set of databases (DB2, SQL2005, Citrix, Ancient Cobol Database with a SQL Wrapper on top, MySQL, etc). Gather the desired information. combine the different datasets into one set. output into a file of choice (CSV, Tab Separated, Pipe Separated, XLS, etc). FTP to customer. I guess what my real question is, given my job, what are some good ETL suites that I can look at and compare to my in-house tools? This is more to research some other options. Ultimately, I'd either suggest a new solution or get options/ideas to improve our current app.

    Read the article

  • How to generate Visa checkout token? [on hold]

    - by Muhammad Junaid
    I am on process of creating a Visa checkout plugin but stuck in generating token Here are the token requirment: Format: Alphanumeric; maximum 100 characters in the form of token: x:UNIX_UTC_Timestamp:SHA256_hash, where UNIX_UTC_Timestamp is a UNIX Epoch timestamp SHA256_hash is an SHA256 hash of the following unseparated items: Your shared secret Timestamp from the transaction; exactly the same as UNIX_UTC_Timestamp Resource path (API name). This HTTPS request's query string Note: The query string includes one or more parameters in name-value pair format, whose names are separated from values by equal signs (=); an empty value may be omitted but the name and equal sign must be present. The initial question mark (?) is not included. Note: All parameters must be present. The parameters must be in lexicographic sort order (UTF-8, uppercase hex characters) with parameters separated from each other by an ampersand (&). Note: The query string must be URL encoded (excepting the following characters, per RFC 3986: hyp You can find on Google "visa checkout developer updating 1 px image"

    Read the article

  • Why are UUID / GUID's in the format they are?

    - by Xeoncross
    Globally Unique Identifiers (GUID) are a grouped string with a specific format which I assume has a security reason. A GUID is most commonly written in text as a sequence of hexadecimal digits separated into five groups, such as: 3F2504E0-4F89-11D3-9A0C-0305E82C3301 Why aren't GUID/UUID strings just random bytes encoded using hexadecimal of X length? This text notation contains the following fields, separated by hyphens: | Hex digits | Description |------------------------- | 8 | Data1 | 4 | Data2 | 4 | Data3 | 4 | Initial two bytes from Data4 | 12 | Remaining six bytes from Data4 There are also several versions of the UUID standards. Version 4 UUIDs are generally internally stored as a raw array of 128 bits, and typically displayed in a format something like: uuid:xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx

    Read the article

  • Generic Content Player?

    - by Jantire
    The general idea on the web appears to be that video/audio are to be separated with plain text. By separated, I mean you have a place that plays video/audio and a place that you read text. This is because it is widely understood that they are vastly different. However, audio and video are just another way of communication, just like text. So why do we separate the two even if they are nearly the same thing? Correct me if I'm wrong but, most tutorials are either plain text how-to's (wiki-style) or visual/auditory instructional videos (YouTube). Why aren't the two combined? Or, if it's already been done can someone reply with the link? This might be bordering off-topic and if it is off-topic then please point me to the right place so it won't be. This might also appear to be an obvious question, however I'm not sure if this subject has really been deeply thought-out by more than a few individuals.

    Read the article

  • Looking into CSS3 Multiple backgrounds

    - by nikolaosk
    In this post I will be looking into a great feature in CSS3 called multiple backgrounds.With CSS3 ourselves as web designers we can specify multiple background images for box elements, using nothing more than a simple comma-separated list. This is a very nice feature that can be useful in many websites.In this hands-on example I will be using Expression Web 4.0.This application is not a free application. You can use any HTML editor you like.You can use Visual Studio 2012 Express edition. You can download it here.Before I go on with the actual demo I will use the (http://www.caniuse.com) to see the support for CSS 3 Multiple backgrounds from the latest versions of modern browsers.Please have a look in this link All modern browsers support this feature. I am typing this very simple HTML 5 markup with an internal CSS style.<!DOCTYPE html><html lang="en">  <head>    <title>Sold items</title>        <style>                #box{        border:1px solid #afafaf;        width:260px;        height:290px;        background-image:url(shirt.png), url(sold.jpg);        background-position: center bottom, right top;        background-repeat: no-repeat, no-repeat;    </style>    </head>  <body>    <header>                <h1>CSS3 Multiple backgrounds</h1>    </header>           <div id="box">              </div>        <footer>        <p>All Rights Reserved</p>      </footer>     </body>  </html>  Let me explain what I do here, multiple background images are specified using a comma-separated list of values for the background-image property.A comma separated list is also used for the other background properties such as background-repeat, background-position .So in the next three lines of CSS code         background-image:url(shirt.png), url(sold.jpg);        background-position: center bottom, right top;        background-repeat: no-repeat, no-repeat; we have 2 images placed in the div element. The first is placed center bottom in the div element and the second is placed at right top position inside the div element.Both images do not get repeated.I view the page in IE 10 and all the latest versions of Opera,Chrome and Firefox.Have a look at the picture below. Hope it helps!!!!

    Read the article

  • CodeGolf: Brothers

    - by John McClane
    Hi guys, I just finished participating in the 2009 ACM ICPC Programming Conest in the Latinamerican Finals. These questions were for Brazil, Bolivia, Chile, etc. My team and I could only finish two questions out of the eleven (not bad I think for the first try). Here's one we could finish. I'm curious to seeing any variations to the code. The question in full: ps: These questions can also be found on the official ICPC website available to everyone. In the land of ACM ruled a greeat king who became obsessed with order. The kingdom had a rectangular form, and the king divided the territory into a grid of small rectangular counties. Before dying the king distributed the counties among his sons. The king was unaware of the rivalries between his sons: The first heir hated the second but not the rest, the second hated the third but not the rest, and so on...Finally, the last heir hated the first heir, but not the other heirs. As soon as the king died, the strange rivaly among the King's sons sparked off a generalized war in the kingdom. Attacks only took place between pairs of adjacent counties (adjacent counties are those that share one vertical or horizontal border). A county X attacked an adjacent county Y whenever X hated Y. The attacked county was always conquered. All attacks where carried out simultanously and a set of simultanous attacks was called a battle. After a certain number of battles, the surviving sons made a truce and never battled again. For example if the king had three sons, named 0, 1 and 2, the figure below shows what happens in the first battle for a given initial land distribution: INPUT The input contains several test cases. The first line of a test case contains four integers, N, R, C and K. N - The number of heirs (2 <= N <= 100) R and C - The dimensions of the land. (2 <= R,C <= 100) K - Number of battles that are going to take place. (1 <= K <= 100) Heirs are identified by sequential integers starting from zero. Each of the next R lines contains C integers HeirIdentificationNumber (saying what heir owns this land) separated by single spaces. This is to layout the initial land. The last test case is a line separated by four zeroes separated by single spaces. (To exit the program so to speak) Output For each test case your program must print R lines with C integers each, separated by single spaces in the same format as the input, representing the land distribution after all battles. Sample Input: Sample Output: 3 4 4 3 2 2 2 0 0 1 2 0 2 1 0 1 1 0 2 0 2 2 2 0 0 1 2 0 0 2 0 0 0 1 2 2 Another example: Sample Input: Sample Output: 4 2 3 4 1 0 3 1 0 3 2 1 2 2 1 2

    Read the article

  • Export list as .txt (Python)

    - by Nimbuz
    My Python module has a list that contains all the data I want to save as a .txt file somewhere. The list contains several tuples like so: list = [ ('one', 'two', 'three'), ('four', 'five', 'six')] How do I print the list so each tuple item is separated by a tab and each tuple is separated by a newline? Thanks

    Read the article

  • Syntax Error in MySql StoredProc

    - by karthik
    I am using the below stored proc in mysql to generate the insert statements. I am getting the following error : Script line: 4 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\’”\’,',’ifnull(‘,column_name,’,””)’,',\’”\’)')) INTO @S' at line 12 What would be the syntax problem in that ? DELIMITER $$ DROP PROCEDURE IF EXISTS `InsGen` $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `InsGen`(in_db varchar(20),in_table varchar(20),in_file varchar(100)) BEGIN declare Whrs varchar(500); declare Sels varchar(500); declare Inserts varchar(2000); declare tablename varchar(20); set tablename=in_table; select tablename; # Comma separated column names – used for Select select group_concat(concat(‘concat(\’”\’,',’ifnull(‘,column_name,’,””)’,',\’”\’)')) INTO @Sels from information_schema.columns where table_schema=’test’ and table_name=tablename; # Comma separated column names – used for Group By select group_concat(‘`’,column_name,’`') INTO @Whrs from information_schema.columns where table_schema=’test’ and table_name=tablename; #Main Select Statement for fetching comma separated table values set @Inserts=concat(“select concat(‘insert into “, in_db,”.”,tablename,” values(‘,concat_ws(‘,’,”,@Sels,”),’);’) from “, in_db,”.”,tablename,” group by “,@Whrs, ” INTO OUTFILE ‘”, in_file ,”‘”); PREPARE Inserts FROM @Inserts; EXECUTE Inserts; END $$ DELIMITER ;

    Read the article

  • Checking inherited attributes in an 'ancestry' based SQL table

    - by Brendon Muir
    I'm using the ancestry gem to help organise my app's tree structure in the database. It basically writes a childs ancestor information to a special column called 'ancestry'. The ancestry column for a particular child might look like '1/34/87' where the parent of this child is 87, and then 87's parent is 34 and 34's is 1. It seems possible that we could select rows from this table each with a subquery that checks all the ancestors to see if a certain attribute it set. E.g. in my app you can hide an item and its children just by setting the parent element's visibility column to 0. I want to be able to find all the items where none of their ancestors are hidden. I tried converting the slashes to comma's with the REPLACE command but IN required a set of comma separated integers rather than one string with comma separated string numbers. It's funny, because I can do this query in two steps, e.g. retrieve the row, then take its ancestry column, split out the id's and make another query that checks that the id is IN that set of id's and that visibility isn't ever 0 and whala! But joining these into one query seems to be quite a task. Much searching has shown a few answers but none really do what I want. SELECT * FROM t1 WHERE id = 99; 99's ancestry column reads '1/34/87' SELECT * FROM t1 WHERE visibility = 0 AND id IN (1,34,87); kind of backwards, but if this returns no rows then the item is visible. Has anyone come across this before and come up with a solution. I don't really want to go the stored procedure route. It's for a rails app.

    Read the article

  • Query to MySQL from c# returns System.Byte[]

    - by karthik
    I am using the below SP to return the value of Generated Insert statement and it works fine when executed in Query browser. When i try to get the value from C#, it give's me "System.Byte[]" as return value. When i try to get the value from MySql query browser, it give's me return value as : 'insert into admindb.accounts values("54321","2","karthik2","karthik2","1");' I guess the problem is with the single quotes of the returned value. Is it so ? DELIMITER $$ DROP PROCEDURE IF EXISTS `admindb`.`InsGen` $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `InsGen`( in_db varchar(20), in_table varchar(20), in_ColumnName varchar(20), in_ColumnValue varchar(20) ) BEGIN declare Whrs varchar(500); declare Sels varchar(500); declare Inserts varchar(2000); declare tablename varchar(20); declare ColName varchar(20); set tablename=in_table; # Comma separated column names - used for Select select group_concat(concat('concat(\'"\',','ifnull(',column_name,','''')',',\'"\')')) INTO @Sels from information_schema.columns where table_schema=in_db and table_name=tablename; # Comma separated column names - used for Group By select group_concat('`',column_name,'`') INTO @Whrs from information_schema.columns where table_schema=in_db and table_name=tablename; #Main Select Statement for fetching comma separated table values set @Inserts=concat("select concat('insert into ", in_db,".",tablename," values(',concat_ws(',',",@Sels,"),');') as MyColumn from ", in_db,".",tablename, " where ", in_ColumnName, " = " , in_ColumnValue, " group by ",@Whrs, ";"); PREPARE Inserts FROM @Inserts; EXECUTE Inserts; END $$ DELIMITER ;

    Read the article

  • Regular Expression Newbie

    - by Registered User
    I need to parse strings inputs where the columns are separated by columns and any field that contains a comma in the data is wrapped in quotes (commas separated, quoted text identifiers). For this project I need to remove the quotes and any commas that occur between pairs of quotes. Basically, I need to remove commas and quotes that are contained in fields while preserving the commas that are used to separate the fields. Here's a little code I put together that handles the simple scenario: // Sample input 1: This works and covers 99% of the records that I need to parse. string str1 = "[email protected],2010/03/27 12:2:02,,some_first_name,some_last_name,,\"This Address Works, Suite 200\",Some City,TN,09876-5432,9795551212x123,XYZ"; str1 = Regex.Replace(str1, "\"([^\"^,]*),([^\"^,]*)\"", "$1$2"); Console.WriteLine(str1); // Outputs: [email protected],2010/03/27 12:2:02,,some_first_name,some_last_name,,This Address Works Suite 200,Some City,TN,09876-5432,9795551212x123,XYZ Although this code works for most of my records, it doesn't work when a field contains more than one commas. What I would like to do is modify the code so that it remove each instance of a comma contained within the column no matter how many commas there are in the field. I don't want to hard code only handling 2 commas, or 3 commas, or 25 commas. The code should just remove all the commas in the field. Below is an example of what my code doesn't handle properly. // Sample input 2: This doesn't work since there is more than 1 comma between the quotes. string str2 = "[email protected],2010/03/27 12:2:02,,some_first_name,some_last_name,,\"i,l,k,e, c,o,m,m,a,s, i,n ,m,y, f,i,e,l,d\",Some City,TN,09876-5432,9795551212x123,XYZ"; str2 = Regex.Replace(str2, "\"([^\"^,]*),([^\"^,]*)\"", "$1$2"); Console.WriteLine(str2); // Desired output: [email protected],2010/03/27 12:2:02,,some_first_name,some_last_name,,i like commas in my field,Some City,TN,09876-5432,9795551212x123,XYZ Any help would be appreciated for this Regular Expression newbie.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >