FAQ Database Discussion Community


Cannot cin.ignore till EOF?

c++,delimiter,cin,flush,ignore
I wanted to ignore all characters in cin to flush cin in this answer: How to get rid of bad input one word at a time instead of one line at a time? But I found that the program seemed to hang awaiting input if I wrote: cin.ignore(std::numeric_limits<std::streamsize>::max()); It propperly...

Concat string as `“@gmail” to Usernames and ignore some lines

mysql,concat,ignore
I have a table Table1 with following fields Username NumberID CodeUser Company Username NumberID CodeUser Company user1 12453 245 G user2 25145T Y user3 1845Z /500 G user4 65421 3452 Y user5 13254 /076 Y I would have a query result which will show lines user1 and user4 Meaning to...

Ignore directory path in find (in shell) [duplicate]

shell,find,ignore
This question already has an answer here: exclude directory from find . command 17 answers I'm trying to find files in some dir and ignore some path. cd /some/dir && find . -type f ! -path ./media doesn't work. Where is a mistake? Any directory with the same name...

Copy a file's contents while ignoring characters between < and > in Java

ignore,strip-tags
I'm looking to write a program that reads from a html file and copies the contents but it ignores the html tags without using replaceAll. Also the stripping of html tags must be done in a different method. The file looks like this : <html> <head> <title>My web page</title> </head>...

Git ignore is not ignoring folder

git,github,ignore
i have the following .ignore file: user_resources/* With the project looking like this: However when i either delete or add a file to the folder it still pushes the changes of the folder. I have done git rm --cached -r user_resources/ But sadly it still does not work :S What...

how to ignore a RUN test

nunit,ignore
Assert.Ignore is used to ignore a test in Nunit. However, in my case I run tests, and if they have, for example, error code 2, I may choose to ignore the result for a while, but I still want it to be counted in the number of run test. But...

Why doesn't IF seem to work inside a WHILE loop? (Python 3.4)

python,if-statement,while-loop,calculator,ignore
I am writing the code for a calculator using python. loop = 1 while loop == 1: #loop calculator while loop is TRUE print ("""Options: Addition 1) Subtraction 2) Multiplication 3) Division 4) Quit 5) Reset Sum 6) """) #display calculator's options (' ') #spacer choice = input("option: ") #get...

MySQL show all lines except those with special character

mysql,character,lines,ignore
I have a table with following fields as example. I'm wondering how to ignore some lines WHERE the info has special character or is empty. Table1 with fields Username NumberID CodeUser: Username NumID CodeUser user1 12345 2454 user2 1452T /500 user3 45172 user4 3145Z /076 For this example I would...

How to get rid of .ignore file in Git?

git,file,bitbucket,ignore
I have create an ignore file , the list included .jar files . I then merged my branch to a development branch and even though I had resolved all my conflicts , I still had a lot of errors. Most of them had something to do with support.v4 (the import...

C++ ignore or substr?

c++,ignore
Having the following input: 10/10/2013 04:59:37 PM,7.21,6000,9050.00,LT XT 10/10/2013 10:04:14 AM,9.88,246,99946.56, I have used the getline fuction to read the whole line using substr(0,2); // i am able to read 10,2013, 04 I am unable to do substr from ',' onwards. I know using ignore function will work, is there...