Programming :: Maximum Digits In The GMP?

Mar 27, 2011

how much big number can be managed by gmp library under plain GCC environment? (does GMP cover infinite length of integer?)

View 1 Replies


ADVERTISEMENT

Programming :: Getting Number Of Digits In Uint64_t?

Jul 7, 2011

I'm having a hard time trying to get the number of digits in a uint64_t variable. The reason I'm using this is I want to make sure I get x amount of digits inside of a variable before I use it, but since the higher the digits, the better the program is.I currently use the following code, and it works, but my loop will never exit because the length is always 0:

Code:

/**
* numbdigits()
* number: The number to evaluate [in]
*
* Returns the number of digits found in a number.

[code]....

getrand() returns a uint64_t as well (and works). The only way the while() loop ends without my intervention is if I do curd += numdigits(val) instead...but, that gives a false value as well.

View 7 Replies View Related

Programming :: Replace All Digits With Symbol In String?

Aug 29, 2010

I am trying to replacee all digits with a symbol (say, big U here) in a string by

[code]...

The result become 'UsUoUmUeUtUhUiUnUgU' instead of 'somethingUUU' as expected. Looks like my string contains some 'hidden digits' in between the letters. Does anyone have an idea about that?

View 2 Replies View Related

Programming :: Data Validation - Input Contains Digits And Certain Alphabets

Apr 8, 2010

I am having a huge problem checking the data I input to make sure it is correct. What I am trying to achieve is when I input a value, it will check if the input is all digits and if it is not, check to see if it contains certain alphabets. Thus for example, if I were to input in data such as "11A" , the program will then inform me "There is an important alphabet in the program." This would be my expected output. Here is the program I have wrote...

Code:
int test(string r ){ const int arraySize = 10;
char array2[arraySize2] ={'A','B','E','F','G','H','J','K','N','O','P','Q','R','S','T','U','W','Y','Z'};
for(int cntr = 0; cntr <r.length(); cntr++)
if(!isdigit(r[cntr])){ for(int new1 =0; new1<arraySize2;new1++)
for(int cntr1 = 0; cntr1 <r.length(); cntr1++)
if(array2[new1] == r[cntr1]){ return 2; //will return2 when it finds the same
// char in the array and the string r. } else{ return 3;
//will return 3 when there is a char
//in the string which isnt in the array
} } else { return 1; // will return 1 when string is all digit.
} int main() { string r = "11D"; test(r);
if(test(r) == 1) { cout << "ALL ARE DIGITS" << endl;
} if (test(r)== 2) {
cout << "There is an important alphabet in the program." << endl;
} if (test(r)== 3) { // testRoman(r);
cout << "There is an Alphabet in the String which is not in the Array" << endl;
} }

So, the problem I am facing is when I input in data such as 11 or A , the prog will come out the right input. But if I were to put in data such as "11A" , the output coming out will be "ALL ARE DIGITS". The problem which causes this seems to be in the return statement , as once as it finds the first char which is a digit, it will then return 1 and not continue checking the rest of the string. Is there a way I can stop or continue a loop if it has met the condition I stated? What I can do or any other way available for me to check my input?

View 4 Replies View Related

Programming :: Rename Files Recursively, Only Keeping Last X Digits Plus Extension?

Nov 29, 2009

My problem is this:I have a number of directories, all containing files of different name lenghts, including letters, numbers and possibly spaces. I want to recursively rename all of these files, so that only the _last_ 5 digits (not counting the extension) remain. In other words: I want to cut off all but the last 5 digits and not touch the extension.

I've tried to read up on tr, rename (perl version), sed, cut etc. and browsed through some threads here, but so far couldn't quite figure out how to do it.

If someone could point me to the right (standard) CLI tools and syntax.

View 2 Replies View Related

Programming :: Maximum Ports Per Process?

Dec 8, 2010

I'm trying to build a multi-threaded server "C" program connecting to multiple clients. For various design reasons, I thought of having one port number per client. What is the maximum number of ports my process can handle

View 5 Replies View Related

Programming :: Maximum Heap Size For A Process?

Mar 15, 2011

Is there any maximum limit to the heap memory allocation?My program is in PERL and i am using a solaris system. when i did "pmap pid" (pid = my process id) it is showing a number of heap memory allocated and all of them with GB sizes. This single process is eating up most of the physical memory.Is it normal and is there any way to get the heap memory size down

View 3 Replies View Related

Programming :: Restrict The Perl Array Maximum Size?

Feb 9, 2010

How to restrict the maximum size of an array variable in perl such that Ishould not be able to have array elements beyond the maximum size?

View 7 Replies View Related

Programming :: Finding Maximum Length File In A Directory Recursively Using Shell Scripting?

Nov 8, 2010

I want to find maximum length file in a given directory. It should search recursivley. I want this to be done using ls and simple looping constructs.

View 6 Replies View Related

Software :: How To Get File Permission As Digits

Jun 28, 2010

I am trying to write a program that gets file permission. I understand linux has ls -l can view file permission, but it has too many information that I have to process those strings in my program. Is there an easier command just return me the permission digits like:
$ getperm /home/file
0440
$

View 1 Replies View Related

General :: Bash Script - Read File Name With Two Digits?

Jun 20, 2011

I have many files with name in order of number. e.g)

u0101.asc
u0102.asc
u0103.asc

[code]...

I am trying to read file using for loop.

for ((date=01; date<=31; date++))
do
echo ${date}
done

but '01' is read(print) as '1' How can I make it read from '1' to '01'?

View 6 Replies View Related

General :: Count The Numerical Digits In Between The Text Using A Command Or A Script?

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

General :: Set Fans On Maximum?

Dec 24, 2010

How can I set my processor fan to 100% in linux?

View 1 Replies View Related

Ubuntu :: How To Use The Maximum Bandwidth

Sep 1, 2011

When connected to a Wireless network, how can I use the maximum bandwidth in the network as I am finding that my network speed is degrading day by day as more users are logging onto the network. Btw, I am using Natty Narhwal.

View 1 Replies View Related

General :: What Is The Maximum No Of Processes That Can Be Run

Jul 23, 2010

I want to know what is the maximum no of processes that can be run in Linux ,as it is a multitasking so what is the limit of this.

some one told me that 8192 but why this not 10000 or 500 why 8192.

View 8 Replies View Related

CentOS 5 :: Maximum Requests Per Second?

Aug 6, 2009

Is there a maximum requests per second that CentOS can handle? For example, a site like wikipedia gets at least 30,000 requests per second, so could CentOS handle that many requests? Some people told me that CentOS cannot and i would need to get a custom kernel.

View 10 Replies View Related

Fedora :: Maximum Amount Of Ram A 32bit OS?

Feb 14, 2009

I will be upgrading my RAM soon. What is the maximum amount of ram a 32bit OS can see?

View 14 Replies View Related

Fedora :: Maximum Settings But Low Sound In F12

Apr 6, 2010

I hava a ASUS P5GC-MX/1333 and I want to install the driver from my Realtek audio, because, in windows 7 the volume is very loud, but in fedora even in the maximum is very low.

View 10 Replies View Related

Fedora :: How To Set Screen Resolution At Maximum

Apr 30, 2010

MY current screen resolution is 1200X800 but from my monitor manual I can see that it support these resolution also 1366X768, 1280X960, 1280X1024 but there is no such option to change in my fedora 12. How can I change that?

View 14 Replies View Related

General :: Maximum Number Of Partitions With EFI?

Jul 5, 2011

I was wondering what is the maximum number of partition on an GPT-partitionned drive under Linux. The GPT partition table can contain up to 128 partitions, but the device nodes for /dev/sda? (as described here, block device of major number 8) only allow /dev/sda1 up to /dev/sda15. Does that means that there cannot be more that 15 partitions on a drive, even on a GPT-partitionned drive?

View 2 Replies View Related

Ubuntu :: Can Increase The Maximum Volume

Jan 22, 2010

I used to have Windows on my laptop, until I got the blue screen, so I just installed ubuntu. Well everything was ALOT louder on Windows, and I was wondering if there was a way to increase the maximum volume. I have to turn the volume almost all the way up to watch a movie. On Windows 1/4 volume was plenty. I searched, but alot of the answers I saw were that it was hardware limitations, which cant be the case, since it was a ton louder on Windows

View 5 Replies View Related

Ubuntu :: Maximum The CPU Usage For A Process?

Apr 2, 2010

How can I maximum the CPU usage for a process? And also use both cores if possible.

View 5 Replies View Related

Ubuntu :: Maximum Number Of Users?

Jan 7, 2011

How many users is it possible to set on Ubuntu 10.10? I have an Edubuntu LTSP system for a school (10 clients) and I wish to setup an user for each student/teacher (about 200).

View 2 Replies View Related

Ubuntu :: Volume Maximum At Start Up?

Aug 3, 2011

I have a dual boot with windows 7 and ubuntu 11.04, I have installed this a couple times, so its not the first time it happens. My laptop is an acer 5678zg i think its called. I previously had 32 bit ubuntu and 64 bit now, same issueWhen I boot up ubuntu, my volume is sat at maximum which is really annoying since I have the sound through hdmi pass through via onkyo receiver and loudspeakers. Even when I turn volume down, the volume meter is not at top, but at where it was last time, but the volume is still at top and decreases to whatever volume I had at last time at first click on volume down.

View 9 Replies View Related

Hardware :: Mkpart With Maximum Size Available?

Feb 2, 2010

how to mkpart with maximum size available?

mkpart primary 0 3001G

I have 3TB raid disk. I cannot install centos using GPT partition. I need to use parted and mkpart to format it.

View 1 Replies View Related

General :: Maximum Date Value From A File?

May 10, 2011

I am facing a problem in finding out the maximum value of a field using awk .. The field is of date format i.e. (MM/DD/YYYY) ..

The contents of the file is :

2/2/2011 XYZ
2/2/2011 XYZ1
2/3/2011 ABC
2/4/2011 ABC

[Code]....

I need to find the maximum of the first column i.e. my output should be 2/12/2011 ..

I was using the below awk script : awk 'n < $0 {n=$0} {print n}{print $0}' <source_file having the above data>

But the output I am getting is 2/9/2011 instead of 2/12/2011 ...

what could be reason for this output and how can I get my desired result ..?

View 3 Replies View Related

Debian :: Laptop Brightness Gets Set To Maximum On Boot

Jun 10, 2010

My laptop brightness gets set to maximium each boot.

Just wondering if this is the case for other laptop users. I have a Lenovo Thinkpad SL500 (GeForce 9300M GS) and am running Testing.

Ideally I'd like it to remember my last setting (which is usually the lowest). It'd be nice not having to turn it down each time I reboot/power-on.

It actually starts off at a low setting but during the boot process (before gdm and just after the "Waiting for /dev" line I believe) it suddenly gets set to max.

View 3 Replies View Related

Debian Hardware :: CPU Frequency Always Maximum After Boot

Aug 1, 2014

I have both cpufrequtils and acpi-whatevercpu, normally processor would be correctly controlled by the ondemand governor and have two steps for frequency, 1.4 and 3.5GHz. Now I've noticed my frequency is always at 3.5GHz, cpufreq-info gives me the hint:

Code: Select allguiu@guiu-desktop:~$ cpufreq-info --cpu 0
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org.

[Code].....

This isn't really a big issue. Normally the processor will sit at +-28°C at low load levels at maximum frequency, with the proper governor it will drop to +-20°C (room temperature) and lower. So I still would like to get proper management of frequencies for more hardware life, and better energy efficiency, not to mention quieter fans. Documentations on cpufrequtils is very broad, and apart from that I don't know where to look for this. Debian wiki page mentions about a file that can be used to configure this but there isn't much documentation.

Ps: I previously had this issue where acpi-cpufreq driver wouldn't load at all, this is due to setting on bios resulting in different frequencies than stock, trying to get default frequencies allowed the driver to work.

View 6 Replies View Related

Debian Hardware :: Can't Display Maximum Resolution

Jun 29, 2010

I have a brand new computer with an ATI Radeon HD5850 video card I have a LCD monitor with a native resolution of 1920x1080. I installed Debian Testing 2.6.32-5-amd64

Because I have several machine, I use a KVM (switch keyboard) in the middle. This KVM is quite old but still work correctly only problem is that it don't forward the EDID information. Until now it wasn't a problem, and by specifying the correct parameters of the monitor in /etc/X11/xorg.conf , I always succeed to reach the 1920x1080 resolution

In installed the proprietary drivers from ATI Catalyst 10.6 (last version)

since I have 2 problems :
first in the console I used framebuffer in 1280x1024x32. Before installation of the ATI drivers, it was ok, now the screen is completely black !! on every tty (I didn't investigate much on this trouble yet)

Second problem:
I can't reach the native resolution of my monitor ! No matter what I'm doing, the best the driver propose is 1600x1200 !!

I made a lot of test and modification in xorg.conf but without success, it always goes back to this resolution and never propose something higher For information, if I connect the monitor directly to the video card (removing the KVM), everything is OK and the resolution is automatically set to 1920x1080

/etc/X11/xorg.conf
Section "ServerLayout"
Identifier "aticonfig Layout"
Screen 0 "aticonfig-Screen[0]-0" 0 0
EndSection

[Code].....

View 3 Replies View Related

Fedora :: Maximum Number Of Files In Ext3 ?

May 26, 2010

Is there a limit to the number of files ext3 can support?

Reason I'm asking is because on one of my internal drives, I have around 750,000 files. The drive is 500Gb and currently using 150Gb... I noticed recently that when I try to copy a new directory or file, the transfer rate is extremely slow at times. It is sataII and sometimes it gets as low as 500kb/s (yes, kb!)

Would somebody please shed some light?

I noticed it might be related to the process gvfsd-metadata

I'm using Fedora 12 64-bit

The transfer is from an ext3 to ext3 filesystem.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved