I want to make a simple macro with #define for returning the smaller of two numbers.
How can i do this in C ? Suggest some ideas, and see if you can make it more obfuscated too.
Hello all
I'm trying to find all the 6 digit numbers in a string that do not end in 00.
Something like that
/([0-9]{4})([^00])/ //i know this is wrong
so the string
asdfs dfg_123456_adsagu432100jhasj654321
will give me
results=[123456,654321] and not 432100
Thanks
Have a good day
Without relying on third party libraries or obscenely complex custom number generating things, which of those two languages makes the most 'random' random numbers?
not too important, just a program that simulates dice rolls (I'm still a little new at both languages)
Hi,
i am wrestling with my regex.
I want to allow only letters and numbers and a dot in a username, and 2 to 20 chars long
I thought of something like this
[0-9a-zA-Z]{2,20}
but then 21 chars is also ok, and that's not what i want
Hi,
I'm trying to get a report done and I have a small problem with the twocolums and the line numbering in listings.
The text is on two columns, the listings can be on the two columns as well.
If I put the number=left, the space between the columns is not sufficient and the text from the first column is written over.
Is there any way to ask the listings to put the line numbers "outside" ?
Thanks
I don't want to have to download and install eclipse on this machine, but for you who do have it, what is the first line on the Eclipse IDE? On the left after you enable line numbers in the left hand column, the first number is?
Hi All,
I need to create a larger file, which would be filled by strings and numbers of a certain length.
Eg File content would be like :
Dougan | 15 | Sapient
Patric | 25 | Patni.
IGHIGH | 10 | IHIUDWHKJDBHKJ
I need an outline as to how I can approach this in either c or c++..
Kindly let me know if more information is needed.
What is the simplest way to calculate the amount of even numbers in a range of unsigned integers?
An example: if range is [0...4] then the answer is 3 (0,2,4)
I'm having hard time to think of any simple way. The only solution I came up involved couple of if-statements. Is there a simple line of code that can do this without if-statements or ternary operators?
I already used some script to implement the shortcuts in my web page
but i was wondering if could be possible to associate some combination not syncronic like Ctrl+X but more like a sequence typing 1..2..3 or any other combination to execute a script...
lets assume this example:
you have a long list with numbers:
you could type 3..5...6, so you can go to the item 356 passing trough the item 3 then 35 then 356
more or less like when you type while selecting a select box
i hope it was clear, id not easy to explain...
I'm writing a .NET application that will make an RPC call to a Java application (via a message queue). The data sent in both directions will be large arrays of floating-point numbers. What is the best way to serialize them to send them across the wire? I'd like something more compact than text, but architecture-independent as the server may not be an x86 machine. The Java application can be changed as needed.
how does one use code to do this:
produce 15 random numbers that are not in any order, and that only occur once
eg.
1 4, 2, 5, 3, 6, 8, 7, 9, 10, 13, 12, 15, 14, 11
rand() or arc4rand() can repeat some, which is not what im after.
Thanks
Hi,
in C++, using printf I want to print a sequence of number, so I get, from a "for" loop;
1
2
...
9
10
11
and I create files from those numbers. But when I list them using "ls" I get
10
11
1
2
..
so instead of trying to solve the problem using bash, I wonder how could I print;
0001
0002
...
0009
0010
0011
and so on
Thanks
Hi all
There are a lot of numbers like 200 20.5 329.2...in a file. Now, I need replace every number A with A*0.8. Is there any simple method to replace original value with another based on original value?
Best Regards,
I have an ordered list in ie7 and the list-style-type decimal is not allowing space on two digit numbers
E.G 1. blah blah, blah
12.blah, blah, blah
anyone know of a answer?
Hello all,
How do I remove numbers from a string using Javascript?
I am not very good with regex at all but I think I can use with replace to achieve the above?
It would actually be great if there was something JQuery offered already to do this?
//Something Like this??
var string = 'All23';
string.replace('REGEX', '');
I appreciate any help on this.
$ch is a character.
I need to convert it into 2 numbers like that (example):
$ch = 'A' => ASCII code: 0x41
=> Binary: 0100 0001
=> {4, 1}
What is the easiest and fastest method to achieve this ?
I need a regular expression for a list of numbers in a text box with carriage returns and line feeds, but no other characters.
e.g.
1234
5678
5874
3478
I have this:
Regex(@"\d\r\n${0,}?");
... but it is accepting commas when I paste them into my text box:
e.g.
1234,
5678
5874,
3478
Can someone please tell me what I'm doing wrong?
Thanks
Hi I have a table test as below
NAME
---------
abc1234
XYZ12789
a12X8b78Y9c5Z
I try to find out the count of number of numbers and characters in the string as
select name,length(replace(translate(lower(name),'abcdefghijklmnopqrstuvwxyz',' '),' ','')) as char_count,
length(replace(translate(name,'1234567890',' '),' ','')) as num_count
from test6;
Its executing fine giving the output
NAME CHAR_COUNT NUM_COUNT
abc1234 4 3
XYZ12789 5 3
a12X8b78Y9c5Z 7 6
But my question is there any option by not giving the abcdefghijklmnopqrstuvwxyz
and 1234567890 manually
I need to compute imaginary exponential in C.
As far as I know, there is no complex number library in C. It is possible to get e^x with exp(x) of math.h, but how can I compute the value of e^(-j), where j = sqrt(-1)?
Is there a git command to add differences within a range of line-numbers to the index?
I want to be able to select lines in my editor and run a macro to add any changes in the selection to the index.
Created a UITextField for "Postal Code/ZIP" field with a keyboardType of UIKeyboardTypeDefault. I would like to use the default keyboard but want the numbers & symbols to be shown by default as apposed to letters.
Apple does this when you are entering addresses in the Contacts.app.
Anyone know how to get this accomplished?