I'm working on an open-source harm reduction application for opioid addicts.
One of the features in this application is the conversion (in mg/mcg) between common opioids, so people don't overdose by accident.
If you're morally against opioid addiction and wouldn't respond because of your morals, please consider that this application is...
Hi,
I found this code for alphanumeric check ("Letters, numbers, spaces or underscores") but I want to change so I will be able to write only letters or numbers. Can anyone tell me how to change this code:
function(value, element) {
return this.optional(element) || /^\w+$/i.test(value);}
Thanks!
Greg
...
My software needs to read a fixed-length handwritten number.
While I could use a general-purpose library like Tesseract, I am sure there is something smarter. Tesseract will probably misinterpret some of the 1 or 7 as I or l, whereas a software that expects only numbers would not.
Knowing that there are only numbers (American-English w...
I am making a simple text and script editor with code highlighting. For that I use a RichTextBox. But I don't know how to make it show the lines' numbers on the left side, like in VS or Notepad++. Is there any solution?
...
Is it possible to see of a string ends with a number which length is not known?
"String 1" -> 1
"String 4356" -> 4356
"String" -> nil
If so, how can I determine that number?
...
I have something like "ali123hgj". i want to have 123 in integer. how can i make it in java?
...
Hi folks,
I have some PHP code which allows me to sort a column into ascending and descending order (upon click of a table row title), which is good. It works perfectly for my D.O.B colum (with date/time field type), but not for a quantity column.
For example, I have quantites of 10, 50, 100, 30 and another 100.
The order seems to be...
Hi all,
I'm writing some coordinate transformations (more specifically the Joukoswky Transform, Wikipedia Joukowsky Transform), and I'm interested in performance, but of course precision. I'm trying to do the coordinate transformations in two ways:
1) Calculating the real and complex parts in separate, using double precision, as below:...
I am new to Mac Numbers. I would like to know if there is a way that one spreadsheet file can reference the values from a completely different spreadsheet file.
...
Given a integer number and its reresentation in some arbitrary number system. The purpose is to find the base of the number system. For example, number is 10 and representation is 000010, then the base should be 10. Another example: number 21 representation is 0010101 then base is 2. One more example is: number is 6 and representation os...
Hi everyone,
I'm using Eclise to develop a Blackberry Java application.Is possible to automatically increment version number on every build like its done in Visual Studio?
Thanks in advance.
...
Hello everyone,
how can i get order number of some element by javascript/jquery?
<ul>
<li>Anton</li>
<li class="abc">Victor</li>
<li class="abc">Simon</li>
<li>Adam</li>
<li>Peter</li>
<li class="abc">Tom</li>
</ul>
There is 3xli with abc class. Now I need to get order(sequence) number of Simon li.
Thanks in advance
...
Hello!
I've run into a little hurdle and wanted to see if somebody could help me!
I want to write an algorithm for an if statement that says:
if (for every 50 points)
{
//do something
}
I thought += 50 would do the trick, but nope.
Any ideas?
Thanks!
...
On a website I have a number of small PHP scripts to automate changes to the text of the site, depending on a figure that's calculated from a MySQL database. The site is for a fundraising group, and the text in question on the home page gives the total amount raised.
The amount raised is pulled from the database and rounded to the neare...
Hi,
I was puzzled with one of the question in Microsoft interview which is as given below:
A function should accept a range( 3 - 21 ) and it should print all the consecutive numbers combinations to form each number as given below:
3 = 1+2
5 = 2+3
6 = 1+2+3
7 = 3+4
9 = 4+5
10 = 1+2+3+4
11 = 5+6
12 = 3+4+5
13 = 6+7
14 = 2+3+4+5
15...
Hey all,
I've created a game which gives a score at the end of the game, but the problem is that this score is sometimes a number with a lot of digits after the decimal point (like 87.124563563566). How would I go about rounding up or down the value so that I could have something like 87.12?
Thanks!
...
I need help working with very big numbers. According to Windows calc, the exponent 174^55 = 1.6990597648061509725749329578093e+123. How would I store this using C (c99 standard).
int main(){
long long int x = 174^55; //result is 153
printf("%lld\n", x);
}
For those curious, it is for a school project where we are implementing the RS...
I have a file that contain list of numbers that looks like this:
10^-92
2 10^-14
10^-105
3 10^-20
To explain a bit further 10^-92 is essentially 1E-92 and 2 10^-14 is 2E^-14.
Is there a compact way to convert the number in above file into Perl number? At the end I want to sort these numbers numerically.
...
I tried to sort these number with Unix sort, but it doesn't seem to work:
2e-13
1e-91
2e-13
1e-104
3e-19
9e-99
This is my command:
sort -nr file.txt
What's the right way to do it?
...
Suppose I want to find 2nd bit in binary equivalent of 13 (binary : 1101). It should return 0.
...