Does anyone know of a regular expression for matching on a sequence of four numbers? I need a match on ascending (1234), descending (4321), or the same (1111).
I have some financial values stored as text in a mysql db. the significance of financial is that negative numbers are stored enclosed in paranthesis. is there a way to automatically get the numeric value associated with that text. (like '5' shoudl be retuned as 5 and '(5)' should be returned as -5)
I just started on the .net compact framework. I want to draw a Sudoku field on the screen. So I put down a PictureBox and defined a method for the Paint event:
private void pictureBoxPlayfield_Paint(object sender, PaintEventArgs e)
{
// use e.Graphics to draw the grid, numbers and cursor
}
This works, but you can see as the grid is drawn. So my question is, what is the right/better way to create such a custom control? Is there maybe a way to enable double buffering?
When I view the Sales report (Reports-Sales), it tells me I have 22 orders and made over $1000. When I view the orders (Sales-Orders), there are only 15 orders and I made a lot less.
Also, the dashboard only shows $737. Where are all these numbers coming from?
I'm using Magento 1.4.0.1.
Input:
hello world "22" bye world
I need a regex that will work in bash that can get me the numbers between the quotes. The regex should match 22.
Thanks!
I am reading a file by line and need to extract latitude and longitude from it.
This how lines can looks:
DE 83543 Rott am Inn Bayern BY Oberbayern Landkreis Rosenheim 47.983 12.1278
DE 21147 Hamburg Hamburg HH Kreisfreie Stadt Hamburg 53.55 10
What's for sure is, there are no dots surrounded by digits except for the ones representing the doubles.
Unfortunately there are Values without a dot, so it's probably best to check for numbers from the end of the String.
thanks for your help!
I have a that is generated from the diference of 2 numbers, but it return for exemple 0,07 for 7% and 0,5 for 50% i just want to fix to reach these goar, like 15,2% 13% and so on. How can I do that? do c# has something embeded on CLR to do that?
Are Java annotations used for adding functionality to Java code besides just adding documentation about what's going on in the code? What's the most advanced/complex functionality you could add to your code through an annotation?
I'm writing a Firefox addon that is triggered whenever a word is highlighted. However I need a script that detects when a word is highlighted, and I'm stuck. An example would be nytimes.com (when you're reading an article and you highlight a word, the reference icon pops up). However the nytimes.com script is super complex. I'm 16 and not much of a programmer, so that is definitely way out of my league.
Hi.
For some reason I need to enter my integer values to database as string, then I want to run a query on them and compare those integers as strings. Is there any way to beautify integer numbers (between 1 and 1 US billion as an example) so I can compare them as strings?
Thanks in advance.
In the tornado.web module there is a function called _time_independent_equals:
def _time_independent_equals(a, b):
if len(a) != len(b):
return False
result = 0
for x, y in zip(a, b):
result |= ord(x) ^ ord(y)
return result == 0
It is used to compare secure cookie signatures, and thus the name.
But regarding the implementation of this function, is it just a complex way to say a==b?
I'm building a little dialing program for my kids so that only 4 "safe" numbers are available for them to dial. I'd like to start the app, hand them the phone and have the app be the only thing running until they come back home.
Is there a way to keep the application running and prevent the iPhone from shutting down the app?
In a file 4th column contains a floating point numbers
dsfsd sdfsd sdfds 4.5 dfsdfsd
I want to delete the entire line if the number between -0.1 and 0.1 (or some other range).
Can sed or awk do that for me?
thanks
How can I counting the numbers of words in a text when begin the text in the linktext?
I must count the text of the title and alt attributes.
Example:
<div> Hello something open.<img src="somethin.jpg" alt="hello"> <a href="open.php" title="open">click</a>
lorem ipsum <a href="open.php">here></a>
the output:
click 6
here 9
Consider it that '_'s in a number doesn't change that number's value so 1000==1_000==10_00.
The Problem: given numbers like 1_244_23 1412_2 1_1111 etc..., how could I decide whether certain number appears in that collection? For example: 1244_23 yes, 11_111 yes, 1412_1 no.
How could using regex to solve this? I mean, if I could tell the regex engine just ignore these '_''s when matching then this problem becomes trivial? How could I do so?
What is the most complex expression you've seen/used ?
and what's the limit on the length of the expression that can be used ? I seem to recall something to that effect a while back but can't locate it now !!
hi. I am really having a problem about what to use as an alternative for web flow. I have read that not all functionalities should be handled by web flow. Only those which needs complex xstate management. For those easy stuffs like just login, editing or deleting records what will I use as an alternative for web flow?
I've seen some complex, enterprise tools for requirements like Rymatech's FeaturePlan -- is there something that enables collaboration and best practices for putting Business-Readable, Domain-Specific (or natural language) requirements and acceptance criteria in place?
Hi,
I only want a simple Splash Screen Example.
Get the Code, Insert my picture, add 2 lines of code to load and finish.
But all I can google is so complex, that is too much. I only want a form with a picture that goes more and more transparent until it hides automaticly and my window is shown.
I tried the "prettygoodsplashscreen" from Codeproject, but don't work for me.
Lang is c#.net 2.0
Hi!
Is there a method to build a balanced binary search tree?
Example:
1 2 3 4 5 6 7 8 9
5
/ \
3 etc
/ \
2 4
/
1
I'm thinking there is a method to do this, without using the more complex self-balancing trees. Otherwise I can do it on my own, but someone probably have done this already :)
I know WPF is more complex an flexible so could be thought to do more calculations. But since the rendering is done on the GPU, wouldn't it be faster than Winforms for the same application (functionally and visually)?
I mean when you are not running any games or heavy 3d rendering, the GPU isn't doing heavy work, right? Whereas the CPU is always busy.
Is this a valid assumption or is the GPU utilization of WPF a very minor operation in its pipeline?
Hi guys, I have such string in PHP:
$data = '1;3;5;7;9';
And cycle:
for ($i=0; $i < count($someArray); $i++)
{
// If $i == any number in $data
}
What is the faster way to compare $i from cycle with numbers in string. I have to check that cycle-counter is in string.
Dear all,
I need to generate a vector of random float numbers between [0,1] such
that their sum equals 1 and that are distributed non-uniformly.
Is there any python function that generates such a vector?
Best wishes