Hello to all, I have a ruby script with a very long hash with more than 300 associations. The script looks like below: #!/usr/bin/env ruby Array_A = [] myHash = { "x1" => "2", "x2" => "0", "x3" => "1", . . . "X350" => "1" } myHash.keys.each do |z| Array_A << "This is key " + z end puts myHash.values.join("|") puts Array_A.join("|") But since the hash is very large, for reading purposes I'd like to put the hash at the end of the script and the each.do loop and puts command first, something like below. Is there a way …

Member Avatar
Member Avatar
+0 forum 8

Is there a data type that can allow a user to input a 25 digit number... because the largest data type for numbers that i know is long long int and uintmax_t which can only store 18 numbers (i'm not sure about this)... because my problem should allow a user to input 25 numbers... If a larger data type is impossible, is there another way??? (I'm a beginner to c++ and i'm really sorry if this question sounds stupid) :)

Member Avatar
Member Avatar
+0 forum 5

I have a large data set (12,000 rows X 14 columns); the first 4 rows as below: x1 y1 0.02 NAN NAN NAN NAN NAN NAN 0.004 NAN NAN NAN NAN x2 y2 NAN 0.003 NAN 10 NAN 0.03 NAN 0.004 NAN NAN NAN NAN x3 y3 NAN NAN NAN NAN NAN NAN NAN NAN NAN NAN NAN NAN x4 y4 NAN 0.004 NAN NAN NAN NAN 10 NAN NAN 30 NAN 0.004 I need to remove any row with "NAN" in columns 3-14 and then output the rest of the dataset. I wrote the following code: #!usr/bin/perl use warnings; …

Member Avatar
Member Avatar
+0 forum 4

How to read **550 MB** XML file in php? I couldn't put data in php file like: $xml =<<<EOT <?xml version="1.0" encoding="utf-8"?> <data> ..... ... </data> EOT; In addition, when i did from command line, it "**kill**" the process. *Any idea ?*

Member Avatar
Member Avatar
+0 forum 7

WinXP how to transfer large file to several (1.4mb) floppies

Member Avatar
Member Avatar
+0 forum 8

Hello fellows, I have some files which consists a setup program worth 11.1 gb in size. I want to burn these files into multiple dvds. For example, 3 dvds having size of 4.7gb OR 2 dvds one can be 8.5gb in size and another one can be 4.7gb in size. Moreover, i want to burn these in continuous manner. So that during installation when dvd1 is finished, the pc will ask for next dvd in order to continue. I tried using winrar to create the archive in 4.3gb sizes but in this case, during installation, i will have to first …

Member Avatar
Member Avatar
+0 forum 3

I created a hashing method to make a=1, b=2, c=3...etc. To me it doesn't seem too efficient. Does this look efficient or is there a recursive method or smaller method to do the same thing? /** * Changes String to int * @param key: String * @return (result % arraySize): int */ public int hashFunc (String key) { int result = 0; String inputString = key.toString().toLowerCase(); // changes String to lowercase char [] characters = inputString.toCharArray(); // makes String an Array for (int i = 0; i < characters.length; i++) // loop { char currentChar = characters[i]; // gets current …

Member Avatar
Member Avatar
+0 forum 7

I am new to this but i have downloaded and installed GMP library. The problem is that i have no clue on how to use it! Want to get a number larger than 18*10^18 (unsigned long long) but i dont know how! I am confused with all the mpz and mpf... and there is no any proper index out there (as far as i have searched)! Also i need the same with float and negative float numbers... any help? thx in adv.

Member Avatar
Member Avatar
+0 forum 3

Hello I am getting error as **segmentation fault** when my file contains large number of line(approx. 44000. However if I run the same program with lesser number of lines, it works fine. I am not getting the reason for this error and how to rectify it. int main() { FILE *fp,*file,*f1; int **phone; int count = 0; f1 = fopen("phones.txt","r"); //open files which has phones int noOfLines = count_lines(); // get no of lines in phone.txt //printf("%d\n",noOfLines); //int phone[30][noOfLines]={0}; // variable-sized object may not be initialized phone = (int**) calloc(30,sizeof(int*)); // create array using malloc int i; for (i=0;i<30;i++) phone[i] …

Member Avatar
Member Avatar
+0 forum 1

I am trying problem 16 from project euler, i want to add a00 integers 50 decimal places each.So i searched and found BigIntegerLibrary, but can't find any good reference material on what are the varoius functions and operators in the library. Please provide me some decent material on how to use the library......

Member Avatar
Member Avatar
+0 forum 1

Question: Does anyone have any recommendations that are likely to keep a large database healthy/speedy? I'm designing a database that is going to retrieve around thirty million data points a year, up to around three hundred million to a billion in a few years time when all of the sensors come on line. The structure of the table containing all of the data is: +--------------+----------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+----------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | feed_id | int(11) | NO | MUL …

Member Avatar
Member Avatar
+0 forum 1

I am trying to implement a program for finding the remainder on division of 2 numbers n2/n1 such that n1 is of the order of 2^32(having a few digits) and n2 is the order of 2^65536(having about 20000 digits) So far I have stored them in an array digit by digit. How to find the remainder? Could someone suggest any quick/fast /efficient algorithm or iplementation for the same. Thanks

Member Avatar
Member Avatar
+0 forum 1

Hi All, I'm copying a long text from word and pasting into a html textarea and from here I send it to MySQL database. If the submited text is too long nothing happens. Any ideas on how to submit a large amount of text from a webpage to a MySQL database? Thanks in advance. Regards

Member Avatar
Member Avatar
+0 forum 1

hi guys, I have been using python since last 1yr. For my work I have to use large data that are at least of size 3000 to 30000 or even more quite a time. Since many months I have been using matrices. But when the size of the Matrix is even 3000X3000 it takes lot of time to build it. I want to know if this is normal or its me who is doing a mistake. I am really bugged by the time factor as I have to wait a lot to get even one single result. I shall be …

Member Avatar
Member Avatar
+0 forum 5

Hi, I am still new to C# and am working on an annotator: 1. Input some Chinese Text. 2. Click Button. 3. Output some Chinese Text - each word that's found in the dictionary get's a span-html-class around for later implementing it in a website. Here it the code for clicking the button: [CODE] private void annobutton_Click(object sender, EventArgs e) { while (pos < inputBox.TextLength) { if (inputBox.Text.Substring(pos).Length < len) { textpart = inputBox.Text.Substring(pos, inputBox.Text.Substring(pos).Length); } else { textpart = inputBox.Text.Substring(pos, len); } if (!dict.ContainsKey(textpart) && len >= 1) { len--; } else if (dict.ContainsKey(textpart) && len >= 1) { …

Member Avatar
Member Avatar
+0 forum 11

how to send mp3,avi(large) files via socket...small files with size less than 100kb is possible but how to send large file..

Member Avatar
Member Avatar
+0 forum 11

I've found out from experience and Apple Care that I can no longer print documents or .jpgs that are taller than my 23" portrait/vertical oriented monitor or any other for that matter. Preview has been crippled in Snow Leopard so that it will not recognize that the image/document is taller/longer and then spread that out into 2 to 10 or more pages. Apple senior advisor told me to try iPhoto, so I did while he was on the phone. No luck. Tried Photoshop CS4 to no avail. I finally just used a 3rd party application called SnapNDrag to take selected …

Member Avatar
Member Avatar
+0 forum 3

I want to download 2 large files which is better 1-downloading each file alone or 2-download both at same time please say 1 or 2 and reason

Member Avatar
Member Avatar
+0 forum 9

I would like to make a LUDICROUSLY high number calculator in Python. I am thinking 60 numbers and a decimal point. So numbers could be in a format like these: 60 numbers, 30 numbers decimal point 30 numbers (30nums.30nums), or decimal point 60 numbers (.60nums). E.g. 999,999,999,999,999,999,999,999,999,999.999999999999999999999999999999 But, I am wondering if Python has anything that would support such large numbers (including math functions)? If not, I think I can program the whole process myself, but I'd prefer not to. :) Any ideas welcome! - [B][I]WolfShield[/I][/B]

Member Avatar
Member Avatar
+0 forum 4

I just took almost all the graphics on my website that are used often in the design and put them into a CSS sprite. Because of the varying sizes this created large area of the new image file that had nothing in them. The result of this was a new CSS sprite that was about 80KB when all the original images together were only about 48KB. I can tell how the webpage is actually loading slower now. Is it worth keeping the sprites to minimize HTTP requests? Does size matter more or the amount the server is contacted to download …

Member Avatar
+0 forum 0

Working with large int numbers. Broken up as char for each digit, total of 3 arrays, n1, n2, and sum. I have everything completed, the math works fine, the arrays work fine, the shuffling to the right side of the array works fine. I just have two issues, that both are in the print department: 1. I know that I can use a count variable to right justify these numbers like the professor wants, i just cannot for the life of me figure out how to implement it or how to do it a different way. 2. On the 3rd …

Member Avatar
Member Avatar
+0 forum 10

Hi everyone! I've built prime testers and prime listers before, but they only work sufficiently fast for values <= 1e6. I was thinking about all the prime tester projects they have going on, how do they test very large numbers for primality? I'm talking numbers on the order 1e12, 1e13, or perhaps even larger (I don't know the currently feasible upper limit). Are there special numerical methods, algorithms, or tests to check large numbers? If so, please share. I'm very interested in how this works. Thanks! To get started, I'll list my own prime lister (I don't know if something …

Member Avatar
Member Avatar
+0 forum 9

Hi, Since I starting dabbling in many areas of the tech world, I think I've lost some of the basic networking concepts I should already know. So I'm running into a problem: I came into a job with a network in place. After some issues, we had replaced some equipment to handle the users. Here's what we have so far: DSL modem -> Linksys E3000 -> 2X Access Points (Small business grade) The problem comes into play when a large amount of users join the network. When it's ~50 users, the network is ok, sometimes needs a reboot, but generally …

Member Avatar
+0 forum 0

May I know how to find the largest number in an array?

Member Avatar
Member Avatar
+0 forum 22

Yes, it's yet another thread about implementing three basic operations (addition, subtraction and multiplication) on abnormally large numbers (> 100 digits). I've stored each digit inside an array of [icode]int[/icode]s, as the following piece of code illustrates [code=C] while((ch = getchar()) != EOL) a[len_a++] = ch - CHR; [/code] Now, when it comes to adding them, I add the [i](len_number - k)[/i]th digits of both numbers, compute their reminder and their quotient, and store the reminder on the [i]k[/i]th place of the [icode]sum[/icode] array. The following piece of code works nicely for, say, 132 and 32, but when I try …

Member Avatar
Member Avatar
+0 forum 7

Hi, I'm writing a script where user upload any video file and my script converts the video in flv format. Since video files are very heavy in size (I want to give upload limit of 10MB), it takes much time to upload. I observed, when we upload any file to youtube, it does the job very quickly. Any suggestion to make the upload process quick? I know youtube has very fast servers, but still I think there is more than servers.

Member Avatar
Member Avatar
+0 forum 4

I am trying to extract data from a 1.5 GB text file. The problem occurs when the program tries to open the large text file. It works perfectly on smaller files. Does anyone know how to successfully open a file of this size? Or, is there a better way to extract the data? The objective is to go line by line, searching for a specific value in the first column of the data text file...and extracting the entire line...writing it to a new file. Here is what I have: [CODE] #include <iostream> #include <fstream> #include <string> using namespace std; const …

Member Avatar
Member Avatar
+0 forum 1

I am trying to extract data from a 1.5 GB text file. The problem occurs when the program tries to open the large text file. It works perfectly on smaller files. Does anyone know how to successfully open a file of this size? Or, is there a better way to extract the data? The objective is to go line by line, searching for a specific value in the first column of the data text file...and extracting the entire line...writing it to a new file. Here is what I have: [CODE] #include <iostream> #include <fstream> #include <string> using namespace std; const …

Member Avatar
+0 forum 0

I want to print a float number with it's digits extending to 20000 digits after the decimal i.e. if the number is 10/3, it should print 3.333333333333333333333333333...20000 or more times. So, how do I print something like that? Also, do tell the solution for C and C++ as well... The code I used was: [CODE] #include<iostream> #include<math.h> #include<conio.h> using namespace std; int main(){ printf("%f",(sqrt(2))); getch(); return 0; } [/CODE] It gave me output: 1.414214

Member Avatar
Member Avatar
+0 forum 5

Dear all, I am writting a code for high dimensional chebyshev interpolation. Since it is high dimensional, I MUST use extremely large arrays. Something like this: [CODE] #define DIM (int)2 #define TOTAL_STEPS (int)30 int main(){ double *a_data; long long a_dim; /** length of matrix a_data **/ int n; /** # of given points **/ int grid_length; grid_length = TOTAL_STEPS; n = pow( grid_length, DIM); /** Length of array is here **/ a_dim = n * pow(n + 1, DIM); /** which is 730620900 **/ /** Allocate memory **/ a_data = (double*) malloc( a_dim * sizeof(double)); if(NULL == a_data) printf("no memory"); …

Member Avatar
Member Avatar
+0 forum 6

The End.