Ubuntu :: How To Go From Decimal To Numerical Values
Nov 10, 2010
I get this:
0000000 1202 0 0 0 0 0 0 0
0000020 141 89 63 89 141 0 0 0
[code]....
How to go from decimal to numerical values?
View 4 Replies
ADVERTISEMENT
Mar 31, 2011
snappy title to grab attention. maybe not stupid, but bleeding difficult to use, talk about a non-obvious, non-intuitive interface; I want to enter a hex value, and have the calculator convert that to decimal. So, I use the pull-down, choose 'hexadecimal', enter the hex value, then change the pull down to 'decimal', expecting to see the decimal (base 10) value. What do I see? The display just adds the hexadecimal base to the end of the hex value I just wrote! Where's my decimal (base 10) number damn it? I can't for the life of me work it out.
View 4 Replies
View Related
Jul 4, 2011
i have a small script that takes the time in seconds(this is a very long number like 615.232145457577) and i convert it to minutes or hours by dividing by 60 or 3600 respectively. I would like to be able to get the result with maybe upto to 2 decimal values.
If i do echo "613.568787987975 / 3600" |bc -l
this gives: .17043577444110416666
How can i just get .17
View 3 Replies
View Related
Jan 18, 2010
what i am trying to do is to allow the user to key in data such as "23.23" or "24" , as it is the price of certain objectsHow am i able to design a check which will allow me to prevent users from typing in input such as "ab.21" or "rfrr" as this field is purely a numerical field. The problem i am facing is i tried using this search code.
Code:
echo "read this"
read this
[code]....
View 14 Replies
View Related
Aug 10, 2010
Can anyone specify the methods how to add decimal numbers in Linux
View 5 Replies
View Related
Apr 26, 2010
I have a file of words and want to encode them in a numeric form, based on position.This is best explained by example:
PEOPLE ==> 123152
Reading left to right:
P was first encountered at position 1 so it is encoded as 1.
E was first encountered at position 2 so it is encoded as 2.
[code]...
View 5 Replies
View Related
Jul 13, 2011
I have a file like:
ER- V67
ER+ V68
ER- V69
ER+ V70
[Code]....
I am using the code:
sort -k1
but it prints it by sorting the second column.
View 8 Replies
View Related
Mar 10, 2009
Using PHP 5.x. I would like to sort a set of values first numerically, then alphabetically. For example, here's my code so far:
Code:
<?php
print "<p style="font-family:verdana;font-size:10pt">
";
$myArray = array("1223:starfruit", "34112:oranges", "1223:zucchini", "321:apples", "34112:pears", "1223:tomatoes");
[code]....
I have fiddled with array_multisort but I can't seem to get my head around it or the many sort routines in PHP.
View 3 Replies
View Related
Mar 22, 2010
I have this .txt file
3183630 R
3574216 W
5264994 M
2656889 A
I want to sort it by the numerical order of column. After sort, I wish to get output like
2656889 A
3183630 R
3574216 W
5264994 M
anyone knows how to use sort to do that? or any other command?
View 6 Replies
View Related
Jun 19, 2010
I am using some "Numerical Recipes in C" routines in my C code.(I am using ludcmp() & lubksb().)These are used to find inverse of a matrix.After compiling my c code, I get following warning messages.I have not understood them at all. What is the meaning of these and why did they pop up and how to remove them?
Code:
nrutil.h:11: warning: 'sqrarg' defined but not used
nrutil.h:14: warning: 'dsqrarg' defined but not used
[code]....
View 7 Replies
View Related
Jan 3, 2011
I just received a spreadsheet. Column B contains thousands of rows that look like this:
Giant Red Pencil 0.99
Case 2.99
Green Box 1.49
Ruler 0.59
Spiral Ring 0.10
So each cell contains the item and price. I need the corresponding cells in column C to contain only the price like this:
0.99
2.99
1.49
0.59
0.10
How do I extract just the price from column B and put it in column C ?
View 2 Replies
View Related
Dec 9, 2010
I just noticed there doesn't seem to be a decimal point button on the calculator (gcalctool 5.32.0) when it is in programming mode. I'm using Fedora 14 (32-bit).
View 4 Replies
View Related
Dec 14, 2010
I have a script that creates a textfile with ip addresses and ports, but the ports are in hex format so they need to be converted.
Currently I have this code:
Code:
I'd like to have the second column in decimal instead of hex, like this:
Code:
Is there any way to do that with awk, preferably in a oneliner? Would printf be an option?
View 11 Replies
View Related
Jan 1, 2010
I want to count the digits in between the text in a file.
e.g.
write down the form
2.3 3.3 3.0 505.0 0.777E-07
22.3 3.3 5.0 503.0 1.777E-04
Then read this.
How can i do the counting of these digits present in between a text in a file?
View 9 Replies
View Related
Jan 13, 2011
I have a script in the works that reads an MP3 file and gets the track length. Trouble is, it gives me the total seconds, like this:
Sample Track.mp3 = 225.55 seconds
What I'd like to have is that 225.55 converted into minutes:seconds format (in this case, 3:45). How can I do this?
View 10 Replies
View Related
Apr 28, 2010
I just need to perform a simple operation of subtracting two numbers - that aren't whole numbers, i.e 200.56 - 67.24attempting to use expr i merely get "expr: non-numeric argument"
View 3 Replies
View Related
Aug 11, 2010
I'm writing an if statement where a variable is a number such as 14.05 (this is actually a temperature) and I want to compare it to a predefined value, sample code below:
Code:
I have all sorts of errors regardless of how I do this (double quotes, square brackets). The best idea I've had is stripping off the decimal place so it's a 4 digit number (e.g warning=1503 and DEV_TMP=1405) however this seems a little unnescessary and I'm sure there's an easier way of achieving the same thing.
View 11 Replies
View Related
Apr 21, 2011
Code:
#!/bin/bash
echo 'obase=2;10'|bc
[code]...
View 2 Replies
View Related
Jul 25, 2011
How would I rename all files with a leading decimal point recursivley? I some how got all my music files to have a decimal point.I tried the below and got a " sed argument to long".[CODE]find /media/MUSIC -type f -name "*.wma" | xargs -0 sed -i 's/.(.*)/1/'[CODE]
Another question, can i just use -type f with out -name ? I am sure that all the files got the decimal point added as the first character.
View 14 Replies
View Related
Feb 5, 2011
Getting half of a screen with big fonts
View 2 Replies
View Related
Feb 21, 2010
i'm trying to change the resolution on a small device i have been making.. it has the X86 and i have installed the lasted ubuntu 9.10..
the only problem is that the monitor i am going to use very soon supports 480x234 resolution or 320x240 resolution.. set this resolutions into my xorg so that i can finally see a clear images onto the new 7" monitor..
View 1 Replies
View Related
Apr 5, 2010
I am looking for comprehensive documentation of the SMART values that are reported in Palimpsest.For example, I am getting the following result:
Attribute: Reallocated Sector Count
Assessment: Warning
Normalized: 100
Worst: 100
Threshold: 36
Value: 1 sector
I would like to find a very thorough description of the meaning of these values, how they relate to each other, and how to interpret them.
View 2 Replies
View Related
Jun 26, 2011
I had installed ubuntu 10.10 long back but never really used it much due to academical commitments. I had installed ubuntu on a separate partition of 20 gb. I don't remember exactly what all values I had selected for various partition and I was very much confused while installation! I somehow managed to install it and this is what I got while booting my laptop! Apart from that my home and desktop size were very less.
I remembered myself giving 6 gb to swap (as I considered swap to be important). Here is what I get when I mount type in terminal!! I have downloaded the new ubuntu 11.04 and I want to start over again by totally formatting my 20 gb hard disk that I created!! Also I want to keep at least 30 gb for my new drive! What sizes exactly should I used for this installation for various file systems!
View 6 Replies
View Related
Apr 30, 2011
I've implemented a few custom system calls in my Ubuntu kernel, but I'm having some issues with the return values. Each function returns a variety of non-negative integers depending on which error is encountered. However, when I'm testing the system calls, the only negative value that gets returned to the user program is -1, regardless of what I have in the code.
Is there some special path I have to take to get the proper return values?
View 3 Replies
View Related
Dec 29, 2010
X programs specify parameter "-display dpy". I have failed with many guesses at dpy values. I find no definition in man pages and elsewhere. I know it is simple. I request examples.
View 5 Replies
View Related
Jan 16, 2010
I've been searching for the answer to my question for quite some time on google, no luck. Due to my searchings I've become very familiar with nice and renice.
I have a script I use for launching a game installed with wine. I cannot/wont run this game as root but I need to be able to use nice --7. As of now I can't I -- ofc -- get "permission denied"..
So how do I make the full range of niceness ( [-19;20] IIRC ) available for all users on my system -- or even just for 1 user?
View 1 Replies
View Related
Feb 15, 2010
My swap file is 5.8 gb and I have a swappiness of 60. Is there any reason to increase any of these values?
View 9 Replies
View Related
Jun 9, 2010
Is there an easy way to get a line from a text file into a variable in a bash script?
I have a file called outside_temp that has a single number, say, 63.2
I would like to make a variable in a BASH script have that value.
I know how to use the input redirection and reassignment of stdin using code...
View 1 Replies
View Related
Jun 17, 2010
I made some changes to the Nvidia Xserver settings and now I get no signal to my monitors. I also have grub configured to only display the main ubuntu kernel and windows so there are no recovery options. How do I restore Xserver to working or default values?
View 6 Replies
View Related
Jul 13, 2010
I have a script that runs lots and lots of root commands, copying files in /usr/...stuff like that, then i want to switch users back to the original user and run some gconf tweaks, I need to update a series of gconf values for a user after copying all the root files, but I noticed once your in root, any gconf values you change, change roots information, not the user who started the script useing sudo.
So i was wondering how you would run a script as root, then after your done with all the root commands, "un-root" to the current user who started the script and run the gconf edits:
I put together this so far. It a script that you run, it detects if it was started as root and if not it asks for root password and re-spawns its self exiting out the first instance, then the script runs, switches to the original user after all files are copyed over and starts to run the Military Time custom format update.
Code:
OUSER="`whoami`"
if [ "$(id -u)" != "0" ]; then
sudo -K
sudo bash $0
[Code]....
View 8 Replies
View Related