Search Results

Search found 40999 results on 1640 pages for 'duplicate files'.

Page 158/1640 | < Previous Page | 154 155 156 157 158 159 160 161 162 163 164 165  | Next Page >

  • Memory Allocation - Arduino

    - by Joey Arnold Andres
    I'm new to this low level stuff. I'm currently learning arduino. I'm currently using an Arduino Mega 2560 and in our course we are practicing memory management. I'm a pro at memory management in pc but somehow I'm having crazy problems here in arduino. For instance: The arduino have 8192B, I'm trying to overflow it with uint_16 so I made an array of 8192/16 which is 512. so I did uint16_t A[512+1]; Well I expected that to cause an overflow. What is wrong with my concept?

    Read the article

  • C++ ofstream cannot write to file....

    - by user69514
    Hey I am trying to write some numbers to a file, but when I open the file it is empty. Can you help me out here? Thanks. /** main function **/ int main(){ /** variables **/ RandGen* random_generator = new RandGen; int random_numbers; string file_name; /** ask user for quantity of random number to produce **/ cout << "How many random number would you like to create?" << endl; cin >> random_numbers; /** ask user for the name of the file to store the numbers **/ cout << "Enter name of file to store random number" << endl; cin >> file_name; /** now create array to store the number **/ int random_array [random_numbers]; /** file the array with random integers **/ for(int i=0; i<random_numbers; i++){ random_array[i] = random_generator -> randInt(-20, 20); cout << random_array[i] << endl; } /** open file and write contents of random array **/ const char* file = file_name.c_str(); ofstream File(file); /** write contents to the file **/ for(int i=0; i<random_numbers; i++){ File << random_array[i] << endl; } /** close the file **/ File.close(); return 0; /** END OF PROGRAM **/ }

    Read the article

  • Help Me Understand C++ Header files and Classes

    - by JamesW
    OK, So I am trying to transition from intermediate Delphi to C++ Object Oriented programing. I have read Ivar Horton's book on visual C++ 2010. I can pull off the simple console applications no problem. I get the language itself (kinda). Where I am struggling is with headers and classes. I also understand what header files and classes do in general. What I am not getting is the implementation when do I use a header or a class? Do I need to create classes for everything I do? Do my actual work functions need to be in header files or in CPP files? I'm lost on the proper uses of these and could use some real world guidance from more experienced programmers. I am trying to transition to windows applications using the MFC if that is helpful.

    Read the article

  • Lines-of-code counting for many C# solutions

    - by Eric
    I am currently researching a solution for counting lines of code in C#. I pretty much need a combination of the following two tools: http://richnewman.wordpress.com/2007/07/01/c-and-vbnet-line-count-utility/ http://www.locmetrics.com/index.html My problem is that I need to recursively scan a folder containing a lot of visual studio solutions. So can't really use the first tool without any major work on its code, as it's only able to scan a single solution at a time. But I also need to split the results for each solution, preferably even the contained projects. This disqualifies the second tool I found. I also found NDepend which suffers from the same problem. Do you know of any free tools that do what I need? I am unable to find anything suitable.

    Read the article

  • Parsing Complex Text File with C#

    - by David
    Hello, I need to parse a text file that has a lot of levels and characters. I've been trying different ways to parse it but I haven't been able to get anything to work. I've included a sample of the text file I'm dealing with. Any suggestions on how I can parse this file? I have denoted the parts of the file I need with TEXTINEED. (bean name: 'TEXTINEED context: (list '/text '/content/home/left-nav/text '/content/home/landing-page) type: '/text/types/text module: '/modules/TEXTINEED source: '|moretext| ((contents (list (list (bean type: '/directory/TEXTINEED ((directives (bean ((chartSize (list 600 400)) (showCorners (list #f)) (showColHeader (list #f)) (showRowHeader (list #f))))))) (bean type: '/directory/TEXTINEED ((directives (bean ((displayName (list "MTD")) (showCorners (list #f)) (showColHeader (list #f)) (showRowLabels (list #f)) (hideDetailedLink (list #t)) (showRowHeader (list #f)) (chartSize (list 600 400))))))) (bean type: '/directory/TEXTINEED ((directives (bean ((displayName (list "QTD")) (showCorners (list #f)) (showColHeader (list #f)) (showRowLabels (list #f)) (hideDetailedLink (list #t)) (showRowHeader (list #f)) (chartSize (list 600 400)))))))) Thanks!

    Read the article

  • Declaring STL Data Structures such as Vector in the .h

    - by sc_ray
    I am trying to declare a private Data Structure such as the Vector in my C++ header file which I want to eventually use within the method implementation of my .cpp. An example would be my header "SomeClass.h" where I have: class SomeClass { private: Vector<T> myVector; public: void AddTtoMyVector(T add); } And in my .cpp which is "SomeClass.cpp", I have the following: #include "SomeClass.h" SomeClass::AddTtoMyVector(T add) { myVector.Push_back(add); } Would the syntax here work? Or is there a different way of declaring and populating such structures?

    Read the article

  • Perl - Check if contents of one file exist in another and print to output file explaination in descr

    - by golwalkar.rohan
    Requirement:- File1 has contents like - ABCD00000001,\some\some1\ABCD00000001,Y,,5 (this indicates there are 5 file in total in unit) File2 has contents as ABCD00000001 So what i need to do is check if ABCD00000001 from File2 exist in File1 - if yes{ print the output to Output.txt till it finds another ',Y,,X'} else{ No keep checking} Anyone? Any help is greatly appreciated.

    Read the article

  • IIS 7 Can't read data from ASP.Net application services tables

    - by vikp
    Hi, I'm working on deploying a web application written in C# with ASP.Net Application services databases. The application runs fine on the development machine. Windows Server 2003 has been built to test the application. The database has been scripted across using MS SQL Server GUI. ASP.Net application services tables were created using an utility. The connection strings are stored in the web.config and connectionStrings.config. The application connects to the database successfully, but then it times out after 10 seconds.

    Read the article

  • crunching multiple js files during development

    - by Yaron Naveh
    I'm writing a backbone.js app. I have multiple js, css and html template files. I also have a script to crunch them into a single file so it is faster to download. How should I work during development: Add a listener to the file system and after every change compile the files so I can see it in a browser. This implies a 1-2 seconds overhead before I can see what I did, which is annoying for html fine-tuning. Somehow browse using the multiple files during development and only crunch before going to production. This means I need to have a separate index.html for dev and prod. What's your take?

    Read the article

  • Java Can't Find File when Running through Eclipse

    - by derekerdmann
    When I run a Java application that should be reading from a file in Eclipse, I get a java.io.FileNotFoundException, even though the file is in the correct directory. I can compile and run the application from the command line just fine; the problem only occurs in Eclipse, with more than one project and application. Is there a setting I need to change in the run configurations or build paths to get it to find the file correctly?

    Read the article

  • Extract some data from a lot of xml files

    - by LifeH2O
    I have cricket player profiles saved in the form of .xml files in a folder. each file has these tags in it <playerid>547</playerid> <majorteam>England</majorteam> <playername>Don</playername> the playerid is same as in .xml (each file is of different size,1kb to 5kb). These are about 500 files. What i need is to extract the playername, majorteam, and playerid from all these files to a list. I will convert that list to XML later. If you know how can i do it directly to XML i will be very thankful.

    Read the article

  • create zip files with arabic characters

    - by fatiDev
    i have the following situation i have to modify an existing files and return a zip containing this modified files , i'm in web application context what i done up to now is : ///////////////// modifying the existing file with poi librairy FileInputStream inpoi = new FileInputStream("file_path"); POIFSFileSystem fs = new POIFSFileSystem(inpoi); HWPFDocument doc = new HWPFDocument(fs); Range r = doc.getRange(); r.replaceText("<nomPrenom>","test"); byte[] b = doc.getDataStream(); //////////////////////// create the zip file and copy the modified files into it ZipOutputStream out = new ZipOutputStream(new FileOutputStream("my.zip")); out.putNextEntry(new ZipEntry("file")); for (int j = 0; j < b.length; j++) { out.write(b[j]); } the created zipped file can't be read correctly with word given that the original file is wrotten in arabic

    Read the article

  • Why '.png' files produced by ImageMagick are so much bigger than '.jpg' & '.gif' files?

    - by Nick Gorbikoff
    Hello. I'm using ImageMagick to convert some files from one format to another. I was always under the impression that .png files were supposed to be as big/small as .jpg if not smaller, and definitely smaller than .gif. However when I run convert photo.jpg photo.png The files I'm getting out is about 6 times bigger than the original jpg. Original jpg is a regular photo about 300x500 px, 52 kb. Output is a proper png of the same dimensions, but size is about 307 kb? Does anyoone know what the hack is going on? Am I doing something wrong? P.S.: I tried both on Debian and Windows with the same results.

    Read the article

  • PHP - upload.class image and $_FILES

    - by Ockonal
    Hello, I'm using class.upload.php to upload pictures onto the server. Here is my form: <form action="<?="http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];?>" method="post" enctype="multipart/form-data"> <table style="width: 100%; padding-top: 20px;"> <tr> <td>Image file:</td> <td><input type="file" name="image_file" /></td> </tr> <tr> <td>&nbsp;</td> <td align="right"><input type="submit" name="add_new" value="Add image" /><td></td> </tr> </table> </form> In php code I do: if( array_key_exists('add_new', $_POST) ) { echo 'add new is in array'; echo '<pre>'; print_r($_POST); print_r($_FILES); echo '</pre>'; $handle = new Upload($_FILES['image_file']); ... } Here is an output of print_r: Array ( [image_file] => somefile.png [add_new] => Add image ) Array ( ) As you can see second array is empty ($_FILES), so image doesn't upload. Why? operating system : Linux PHP version : 5.2.12 GD version : 2.0.34 supported image types : png jpg gif bmp open_basedir : /home/httpd/vhosts/kz-gbi.ru/httpdocs:/tmp

    Read the article

  • How to stop GHC from generating intermediate files?

    - by unknown
    When compiling a haskell source file via ghc --make foo.hs GHC always leaves behind a variety of intermediate files other than foo.exe. These are foo.hi and foo.o. I often end up having to delete the .hi and .o files to avoid cluttering up the folders. Is there a command line option for GHC not to leave behind its intermediate files? (When asked on #haskell, the best answer I got was ghc --make foo.hs && rm foo.hi foo.o.

    Read the article

  • How may I scroll with vim into a big file ?

    - by Luc M
    Hello, I have a big file with thousands of lines of thousands of characters. I move the cursor to 3000th character. If I use PageDown or <CTRL>-D, the file will scroll but the cursor will come back to the first no-space character. There's is an option to set to keep the cursor in the same column after a such scroll ? I have the behavior with gvim on Window, vim on OpenVMS and Cygwin. Regards

    Read the article

  • ignoring folders in mercurial

    - by damian
    Caveat: I try all the posibilities listed here: http://stackoverflow.com/questions/254002/how-can-i-ignore-everything-under-a-folder-in-mercurial. None works as I hope. I want to ignore every thing under the folder test. But not ignore srcProject\test\TestManager I try syntax: glob test/** And it ignores test and srcProject\test\TestManager With: syntax: regexp ^/test/ It's the same thing. Also with: syntax: regexp test\\* I have install TortoiseHG 0.4rc2 with Mercurial-626cb86a6523+tortoisehg, Python-2.5.1, PyGTK-2.10.6, GTK-2.10.11 in Windows

    Read the article

  • link with static library vs individual object files

    - by dododo
    For a reason i want to unpack a static lib (libx.a) into individual object files (a.o b.o c.o), and specify these object files (a.o b.o c.o) in the linker input list instead of libx.a, with other linker options remaining the same. However, i have noticed the above change has resulted in quite some difference in the output executable. Basically, (a.o b.o c.o) method will result in larger output size. So what's the difference between the two methods (libx.a and individual object files)? And is there a way to work around? The GNU binutil (for and ar ld) version i'm using is 2.16.1 Thanks.

    Read the article

  • Database over 2GB in MongoDB

    - by configurator
    We've got a file-based program we want to convert to use a document database, specifically MongoDB. Problem is, MongoDB is limited to 2GB on 32-bit machines (according to http://www.mongodb.org/display/DOCS/FAQ#FAQ-Whatarethe32bitlimitations%3F), and a lot of our users will have over 2GB of data. Is there a way to have MongoDB use more than one file somehow? I thought perhaps I could implement sharding on a single machine, meaning I'd run more than one mongod on the same machine and they'd somehow communicate. Could that work?

    Read the article

  • Unable to open a file for writing

    - by asdasdas
    I am trying to write to a file. I do a file_exists check on it before I do fopen and it returns true (the file does exist). However, the file fails this code and gives me the error every time: $handle = fopen($filename, 'w'); if($handle) { flock($handle, LOCK_EX); fwrite($handle, $contents); } else { echo 'ERROR: Unable to open the file for writing.',PHP_EOL; exit(); } flock($handle, LOCK_UN); fclose($handle); Is there a way I can get more specific error details as to why this file does not let me open it for writing? I know that the filename is legit, but for some reason it just wont let me write to it. I do have write permissions, I was able to write and write over another file.

    Read the article

  • VBScript - copy files modified in last 24 hours

    - by Martin North
    Hi, I'm trying to copy files from a directory where the last modified date is within 24hours of the current date. I'm using a wildcard in the filepath as it changes every day I'm using; option explicit dim fileSystem, folder, file dim path path = "d:\x\logs" Set fileSystem = CreateObject("Scripting.FileSystemObject") Set folder = fileSystem.GetFolder(path) for each file in folder.Files If DateDiff("d", file.DateLastModified, Now) < 1 Then filesystem.CopyFile "d:\x\logs\apache_access_log-*", "d:\completed logs\" WScript.Echo file.Name & " last modified at " & file.DateLastModified end if next Unfortunately this seems to be copying all files, and not just the recently modified ones. Can anyone point me in the right direction? many thanks Martin.

    Read the article

< Previous Page | 154 155 156 157 158 159 160 161 162 163 164 165  | Next Page >