Questions tagged [comma]

Comma ',' is used to indicate a separation of elements within a list, such as an array, or parameters accepted by a function.

-1
votes
0answers
33 views

C# Regex [delimiter inside quotes, quote inside quotes, unquoted return] [duplicate]

I am trying to create a Regex in C# for splitting a line into columns and then a csv file. There are few requirements based on the csv file format which are important. In case you are wondering for ...
0
votes
1answer
22 views

Program Freezes when taking trailing comma input from command line argument java

When ever I try to take input from command line. java A106_HelloJavaTest suzuki,yasuda, import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java....
-1
votes
2answers
33 views

Data type errors

I found strange thing about data type of integers with comma at the end of expression (see code below). Code a = -1, # strange legal syntax print('"a" has {} data type'.format(type(a))) if type(a)...
0
votes
0answers
21 views

Mysql query with a column with values separated by a comma [duplicate]

In one of my database table, I have a a column containing values separated by commas like '127,765,715,716'. Colums are : id, firstname, skills (with commas values). I need to write a query and to ...
1
vote
5answers
65 views

Adding comma in the output

The code: for x in range (1,10): print(x,end="") Output: 123456789 Question: How can I get the output with a comma like this 1,2,3,4,5,6,7,8,9 I tried ",".join(x) but it does not work. Can ...
3
votes
1answer
61 views

Change the color of commas in php

Here is my code: <?php $posttags = get_the_tags(); if ($posttags) { $tagstrings = array(); foreach($posttags as $tag) { $tagstrings[] ='<a href="' . get_tag_link($tag->term_id) ....
0
votes
0answers
13 views

How to import text file to the excel file in Java?

I have data like below as text file. I have imported it to the Excel however it didn't separate columns, but rows are okey. My code puts ',', but not separates it. Can you help me? 5C12 6.53 1.84 0....
0
votes
1answer
42 views

PySpark: How to specify column with comma as decimal

I am working with PySpark and loading a csv file. I have a column with numbers in European format, which means that comma replaces the dot and vice versa. For example: I have 2.416,67 instead of 2,...
2
votes
2answers
62 views

Split one line object to multiline object

Is there a command/shortcut in Atom or Vim so if I select this: { a: 1, b: 2, c: 3 } it is converted to this?: { a: 1, b: 2, c: 3 }
2
votes
2answers
35 views

Display specific values of array comma separated

I've been trying to display specific values of an array separated by a comma (except last one). Here is my array: "pure_taxonomies": { "domaine": [ { ...
0
votes
1answer
81 views

Text to columns in SQL

I am trying to perform a fairly simple function in SQL - commonly known as comma delimited function or 'Text to Columns'. I have the output that I would like, now I just need to format it differently. ...
0
votes
4answers
56 views

remove character in comma separated string php

This is my string: $codes = 60textone_13, 120texttwo_14, 60textthree_15, 90textfour_16, I've removed the last comma like: $implode_comma = implode(', ', $codes); I'm trying to remove "_number", so ...
0
votes
0answers
30 views

escaping comma in exploded array string [duplicate]

I am passing an array as a variable from javascript using AJAX, to then be exploded back to an array in php. But when a member of the array contains a comma the php explode interprets it as a ...
4
votes
2answers
37 views

Python - Difference between , and + when printing output

Quick and probably dumb question. When I need to join text and numerical values for output, I would typically use: number = 4 print("Two plus two =" + str(number)) But sometimes I see: number = 4 ...
0
votes
1answer
16 views

How to generate sendgrid json format from comma seperated list in php

I have following emails separated by comma:(these can be upto 1000 emails) $mylist ='example1@gmail.com , example2@gmail.com'; $myArray = explode(",", $mylist ); I tried to create array using ...
0
votes
0answers
13 views

Kibana string search for commas

just a small Kibana query around searching for a string which only contains commas. The string signifies nothing has been returned in a field we are expecting critical data. I have tried escaping ...
0
votes
1answer
52 views

Split one string with commas into columns

For example, I have the following table: | Block | | abcdefgh,12kjkjkj,231wewoxyz| How can I convert it into: | Block1 | Block2 | Block3 | | abcdefgh | 12kjkjkj | ...
1
vote
1answer
23 views

how to remove every other comma from a string

In the list below how would you remove every other comma to produce. ("a,1.50,b,2.00,c,2.50") -> ("a 1.50, b 2.00, c 2.50") I tried using a delimiter, but am unsure how to use it in this instance....
0
votes
2answers
41 views

MySQL - How to select rows in a table where id value is in a comma delimited field in another table?

I have been working on this problem for 3 days and am bleary eyed. I have an SQL "customers" table containing the customers name, address, email and a field called "venue" containing a comma delimited ...
1
vote
2answers
28 views

Find list of directories as comma separated string, with no trailing comma

I'm trying to generate a list of directories, as a comma separated string find . -type d -mindepth 1 | tr '\n' ',' This gives me a string with a trailing comma. dirA,dirB,dirc, I know I can tack ...
0
votes
0answers
21 views

how to handle comma in quoted numbers in sqoop import

I have raw data in csv format which contains a column of "Amount", value is like "123,456", after imported in sqoop, "123,456" is recognized as a string instead of 123456 as an integer. How can that ...
1
vote
1answer
32 views

Animated Counter on scroll [duplicate]

So, I found this cool pen Creative Animated Counter on Scroll but I want to know how to format the numbers so they have a comma if it's over a thousand. function visible(partial) { var $t = ...
0
votes
1answer
31 views

regex that matches only digits,digits with comma and parenthesis but not quotes

I am working on this regex which seems to work for most cases except one and i need help in figuring out how to make it to work with below scenarios My string is as below and the regex has to match ...
0
votes
0answers
16 views

handling commas and quotes in csv while importing in powershell

I am using a command Add-AzureRmNetworkSecurityRuleConfig wherein I need to give multiple ip in source address prefix. If I use hard coded value like "10.0.0.1","10.0.0.2" This works fine, however if ...
0
votes
2answers
28 views

How to comma seprate csv but not all cells

This question is not duplicate of the same question but matches some features. I my question i also want to convert few cells into list also but in that question it is not mentioned I am reading a ...
0
votes
2answers
30 views

SQL, split comma separated string values, but maintain correct order?

I am trying to extract data from a Postgresql database that has a column storing sequence information, by ordering id values and storing them in a comma separated string. The order the id values are ...
0
votes
1answer
22 views

Separate text with delimiter to use for csv in python

I have an address variable and the text is all there. However, I want to separate the text on the , delimiter. How do I do this? My address ="123 Any Address Street, Monroe, LA, 71201" variable has ...
40
votes
3answers
3k views

Why does return 0 or break not work with the comma operator?

I can write the code if(1) x++, y++; instead of if(1) {x++; y++;}, but in some cases it does not work (see below). It would be nice if you tell me about this. int x = 5, y = 10; if (x == 5) x++, ...
0
votes
1answer
69 views

Powershell Group-object array list

Two comma separated item added in array list and I would like to group them to count the total. $list_distinct = [System.Collections.ArrayList]@() $list_distinct.Add("Site A,Item A") $list_distinct....
0
votes
1answer
27 views

BCP ithe file with comma delimiters

I am getting a file with comma delimited format and need to BCP the data in to Sybase server but the problem here is the data in the few columns also has description separated by commas. when i give ",...
-1
votes
2answers
46 views

Format data to run ANOVA in R

I am trying to run a 3-way ANOVA in R, but my values for each variable are in one column and not separated by rows. Currently, my data frame looks something like this: Season Site Location ...
1
vote
2answers
32 views

Php mail - A message variable that contain array and conditions [duplicate]

I've been trying to send an e-mail that containt html code generated by php. The context is, I'm using php to generate a webpage, and I'm trying to send this webpage by e-mail by copying the code I ...
1
vote
4answers
44 views

R: Split character column and create two new ones

R users I have a data frame similar to this: a <- c("John, 3 years") b <- c("Mokobe, 11 years") c <- c("Ivan") df <- rbind(a,b,c) df [,1] a "John, 3 years" b "Mokobe, ...
0
votes
2answers
45 views

Avoid writing quotes to text file with comma present in string in Python

My code currently searches for files that end with any audio file extension, returns the file name and then stores the path + file name into a text file. Simple enough, it works, but when scrolling ...
0
votes
1answer
26 views

Select * works… But Selecting by Columns Does Not? [closed]

I'm getting beyond frustrated by this and I'm sure it's something simple. I have created a number of tables and for some reason I can pull the data from all of them using Select *, but I get an "...
0
votes
1answer
35 views

SQL Server 2 commas & 1 and [duplicate]

I'm making a view and in one column I will have some names concatenated together. Ideally in this one column I want the result to look something like the below: ResultA, ResultB, ResultC and ResultD ...
-4
votes
1answer
38 views

how to split a string contains comma and store into 3 variables? [duplicate]

how to split a string that contains comma and store into 3 variables. i have a string like this string s="abcdf5==,ftyuyt6g8*,yut5431"; now i want to split that by comma and store into 3 string ...
-1
votes
1answer
45 views

VBA Code to pull data into Tag Property

first time asking a question here I am trying to pull the names of worksheets in my workbook into the tag property of the workbook. Any suggestions how to do that? Compiling the list is not hard, but ...
0
votes
2answers
58 views

Python pandas preserving decimal commas in the output csv file

I'm using pandas library to do some operations on .csv file. Input file input.csv: A B 1,2 2,2 3,5 5,4 My code: import pandas as pd df = read_csv('input.csv', sep =';', ...
0
votes
1answer
25 views

Replace all dots with commas in numbers within a TXT file

Suppose that I have blocks of data of this type in a TXT file. On the left, I have the labels. On the right, I have the numbers. P100-CPAMT 2040.72 P100-CPPCT ...
0
votes
3answers
38 views

How do i replace last comma with a dot / period in wordpress?

I'm trying to replace: <?php the_title('' ', ' ); ?> with recurring commas: Title1, Title2, Title3, to be Title1, Title2, Title3. I can't seem to find any solution online, I've seen a lot of ...
-1
votes
2answers
45 views

Confusing comma operator in JavaScript. Why does it work in such manner?

Could anybody explain why the output of the code var a = [1,2]; console.log("Array item: " + a[a=a.toString(), 1]); console.log("String char: " + a[1]); looks like this? Array item: 2 ...
0
votes
2answers
45 views

Converting LIST in python to a desired output

I am a newbie to python. I am importing data from CSV file where we use COMMA as a decimal point separator. Once i print the output using python I get this format. X = ['6,34', '5,67', '7,64', '54,3',...
-3
votes
3answers
64 views

Replacing colon with comma

I have time entries of the form: 12:45:55:346 (hh:mm:ss:mss) And I want to convert it to the form: 12:45:55,346 (hh:mm:ss,mss) How shall I proceed, please?
0
votes
2answers
61 views

Reading Text file comma seperated on Matlab

I'm trying to read a comma separated text file that looks like the following: 2017-10-24,01:17:38,2017-10-24,02:17:38,+1.76,L,Meters 2017-10-24,02:57:31,2017-10-24,03:57:31,+1.92,H,Meters 2017-10-24,...
0
votes
0answers
54 views

how to split a string in java on commas but with certain criteria

Is it possible to split the string below on commas but only if the comma is not within ( ) AND not within another query which has commas in it. e.g. {ORDER_BY=TABLE1.ID, WHERE_CLAUSE=TABLE1.QUANTITY ...
3
votes
2answers
130 views

What are the mechanics of the comma operator/separator while setting an int in C#?

I was analyzing a code sample in the accepted answer of this stackoverflow question, which contains this block of code: public static void SplitFile(string inputFile, int chunkSize, string path) { ...
1
vote
1answer
57 views

SQL Server - Comma separated result

I am using a query below: SELECT DISTINCT DTL.DTL_ITEM_CRC DTL_ITEM_CRC, PWK.PWK_PROMN_WEEK_KEY PWK_PROMN_WEEK_KEY, HDR.HDR_VENDR_NBR HDR_VENDR_NBR, HDR.HDR_VENDR_NAME ...
0
votes
1answer
21 views

Split values separated by comma mysql

i have the following query that give me usernames separated by comma: SELECT GROUP_CONCAT(username SEPARATOR ',') FROM users WHERE id IN ( SELECT _user_id FROM _user_meeting WHERE meeting_id = @...
1
vote
1answer
30 views

With xlsxwriter: worksheet data_validation with strings converts a comma into \n

I'm trying to use xlsxwriter to create a drop down list of strings in some cells. In this list of strings I have 'Float [0,1]' but when I open the Excel file that is created, this string is splitted ...