Search Results

Search found 89549 results on 3582 pages for 'large file support'.

Page 60/3582 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • Read whole ASCII file into C++ std::string

    - by Arrieta
    Hello, I need to read a whole file into memory and place it in a C++ std::string. If I were to read it into a char, the answer would be very simple: std::ifstream t; int lenght; t.open("file.txt", "r"); // open input file t.seekg(0, std::ios::end); // go to the end length = t.tellg(); // report location (this is the lenght) t.seekg(0, std::ios::beg); // go back to the beginning buffer = new char[length]; // allocate memory for a buffer of appropriate dimension t.read(buffer, length); // read the whole file into the buffer t.close(); // close file handle // ... do stuff with buffer here ... Now, I want to do the exact same thing, but using a std::string instead of a char. I want to avoid loops, i. e., I don't want to: std::ifstream t; t.open("file.txt", "r"); std::string buffer; std::string line; while(t){ std::getline(t, line); // ... append line to buffer and go on } t.close() any ideas?

    Read the article

  • Upload file using jquery dialog not working

    - by kandroid
    i want to upload file using jquery dialog. I have created a partial view and showing that partial view in the dialog. The problem is, when I directly browse the partial view and upload a file, it works perfect. BUT when I put the partial view inside a jquery dialog, it submits the form, but don't submits the file. So i have null value. I really dont understand what is the difference here!! Hope someone can help me to identify the problem. here is some codes; jquery codes: $('#UploadDialog').dialog({ autoOpen: false, width: 580, resizable: false, modal: true, open: function (event, ui) { $(this).load('@Url.Action("Upload","Notes")'); }, buttons: { "Upload": function () { $("#upload-message").html(''); $("#noteUploadForm").submit(); }, "Cancel": function () { $(this).dialog("close"); } } }); $(".uploadLink").click(function () { $('#UploadDialog').dialog('open'); }); return false; }); partial view: @using (Ajax.BeginForm("Upload", "Notes", null, new AjaxOptions { UpdateTargetId = "upload-message", InsertionMode = InsertionMode.Replace, HttpMethod = "POST", OnSuccess = "uploadSuccess" }, new { id = "noteUploadForm" , enctype="multipart/form-data"})) { <div> <div id="upload-message"></div> <div class="editLabel"> @Html.LabelFor(m => m.Notes.NoteTitle) </div> <div class="editText"> @Html.TextBoxFor(m => m.Notes.NoteTitle) </div> <div class="clear"></div> <div class="editLabel"> @Html.Label("Upload file") </div> <div class="editText"> <input type="file" name="file" />(100MB max size) </div> </div> }

    Read the article

  • Logic: Best way to sample & count bytes of a 100MB+ file

    - by Jami
    Let's say I have this 170mb file (roughly 180 million bytes). What I need to do is to create a table that lists: all 4096 byte combinations found [column 'bytes'], and the number of times each byte combination appeared in it [column 'occurrences'] Assume two things: I can save data very fast, but I can update my saved data very slow. How should I sample the file and save the needed information? Here're some suggestions that are (extremely) slow: Go through each 4096 byte combinations in the file, save each data, but search the table first for existing combinations and update it's values. this is unbelievably slow Go through each 4096 byte combinations in the file, save until 1 million rows of data in a temporary table. Go through that table and fix the entries (combine repeating byte combinations), then copy to the big table. Repeat going through another 1 million rows of data and repeat the process. this is faster by a bit, but still unbelievably slow This is kind of like taking the statistics of the file. NOTE: I know that sampling the file can generate tons of data (around 22Gb from experience), and I know that any solution posted would take a bit of time to finish. I need the most efficient saving process

    Read the article

  • basic file input using C

    - by user1781966
    So im working on learning how to do file I/O, but the book I'm using is terrible at teaching how to receive input from a file. Below is is their example of how to receive input from a file, but it doesn't work. I have copied it word for word, and it should loop through a list of names until it reaches the end of the file( or so they say in the book), but it doesn't. In fact if I leave the while loop in there, it doesn't print anything. #include <stdio.h> #include <conio.h> int main() { char name[10]; FILE*pRead; pRead=fopen("test.txt", "r"); if (pRead==NULL) { printf("file cannot be opened"); }else printf("contents of test.txt"); fscanf(pRead,"%s",name); while(!feof(pRead)) { printf("%s\n",name); fscanf(pRead, "%s", name); } getch(); } Even online, every beginners tutorial I see does some variation of this, but I can't seem to get it to work even a little bit.

    Read the article

  • Unable to establish the connection to the file in BlackBerry

    - by Vikas
    I have tried the example code on SO to read the contents from the file in the resource directory in BlackBerry. But I am having an issue with the FileConnection. I get the following error: File system error (1003) I tried the example from here. I want only the read functionality, the file I want to read is in CSV format as a .txt file placed in the /res/test.txt. public class FileDemo extends MainScreen { public FileDemo() { setTitle("My Page"); String str = readTextFile("file:///test.txt"); System.out.println("Contents of the file::::::: " + str); } public String readTextFile(String fName) { String result = null; FileConnection fconn = null; DataInputStream is = null; try { fconn = (FileConnection) Connector.openInputStream(fName); is = fconn.openDataInputStream(); byte[] data = IOUtilities.streamToBytes(is); result = new String(data); } catch (IOException e) { System.out.println(e.getMessage()); } finally { try { if (null != is) is.close(); if (null != fconn) fconn.close(); } catch (IOException e) { System.out.println(e.getMessage()); } } return result; } } Any suggestions/advice on a better approach or as to how I can get this working??

    Read the article

  • Java: CSV file read & write.

    - by battousai622
    Im reading in 2 csv file: store_inventory & new_acquisitions... I want to be able to compare the store_inventory csv file with new_acquisitions. 1) If the item names match just update the quantity in store_inventory. 2) If new_acquisitions has a new item that does not exist in store_inventory, then add it to the store_inventory. Heres what i have so far but its not very good. I added comments where i need to add taks 1) & 2). Any advice or code would be great, thanks. File new_acq = new File("/src/test/new_acquisitions.csv"); Scanner acq_scan = null; try { acq_scan = new Scanner(new_acq); } catch (FileNotFoundException ex) { Logger.getLogger(mainpage.class.getName()).log(Level.SEVERE, null, ex); } String itemName; int quantity; Double cost; Double price; File store_inv = new File("/src/test/store_inventory.csv"); Scanner invscan = null; try { invscan = new Scanner(store_inv); } catch (FileNotFoundException ex) { Logger.getLogger(mainpage.class.getName()).log(Level.SEVERE, null, ex); } String itemNameInv; int quantityInv; Double costInv; Double priceInv; while (acq_scan.hasNext()) { String line = acq_scan.nextLine(); if (line.charAt(0) == '#') { continue; } String[] split = line.split(","); itemName = split[0]; quantity = Integer.parseInt(split[1]); cost = Double.parseDouble(split[2]); price = Double.parseDouble(split[3]); while(invscan.hasNext()) { String line2 = invscan.nextLine(); if (line2.charAt(0) == '#') { continue; } String[] split2 = line2.split(","); itemNameInv = split2[0]; quantityInv = Integer.parseInt(split2[1]); costInv = Double.parseDouble(split2[2]); priceInv = Double.parseDouble(split2[3]); if(itemName == itemNameInv) { //update quantity } } //add new entry into csv file } Thanks again for any help. =]

    Read the article

  • What kinds of questions are Technical Support Incidents for?

    - by nevan
    Last year I received two "Technical Support Incidents" in the iPhone developer program, but when I went to renew I found that I would lose them. I have another two for this year, but I'm not really sure about the kind of problems that can be solved by using them. What kinds of questions are the best use of these Technical Support Incidents? What is the kind of problem I can use them for? What do you receive when you use them? Thanks.

    Read the article

  • What considerations need to be made when transitioning an application to support?

    - by Eric U.
    I will be taking on the role of support for a complex application that is transitioning from the development team. This application is a sharepoint solution that connects to several (7) web services. The development team is rolling off almost immediately and will be available only for small questions. I'm new to this role so I'm wondering what suggestions you have for me as I take on this large project. What are some considerations that should be made so that the transition to support is smooth and uninterupted? I've been reading the documentation but I can already see some gaps that need to be filled. The applicaiton is very (perhaps overly) configurable and there is lots of injected code. Stepping through the code is about the only way I can gain an understanding of what is actually happening. At this point I'm a little over whelmed and appreciate any suggestions or advice. Thanks!

    Read the article

  • How to save file and read

    - by Jessy
    Hello everyone, I create a program that place random image in grid layout format. The size of the grid layout is 6 x 6 = 36. Only 10 were filled with images (each image was different) and the rest were empty. freeimagehosting.net/uploads/bfb7e85f63.jpg How can I save it to a file and read it again, so it will display the same images with same placement on the grid? Here is the code that I used to save the images: //image file String []arrPic = {"pic1.jpg","pic2.jpg","pic3.jpg","pic4.jpg","pic5.jpg","pic6.jpg","pic7.jpg","pic8.jpg","pic9.jpg","pic10.jpg",,"pic11.jpg","pic12.jpg","pic13.jpg"}; ArrayList<String> pictures = new ArrayList<String>(Arrays.asList(arrPic)); ArrayList<String> file = new ArrayList<String>(); JPanel pDraw = new JPanel(new GridLayout(6,6,2,2)); ... //fill all grids with empty label for (int i =0; i<(6*6); i++){ JLabel lbl = new JLabel(""); pDraw.add(lbl); } ... //Choose random box to be filled with images for(int i=0; i<10; i++){ Boolean number = true; while(number){ int n = rand.nextInt(35); if(!(arraylist.contains(n))) number = false; arraylist.add(n); } //fill the grids with images for(int i=0; i<arraylist.size(); i++){ //select random image from arraylist int index = rand.nextInt (pictures.size()); String fileName = (String) pictures.get(index ); //find the image file icon = createImageIcon(fileName); //save the file in a new file file.add(fileName); //rescaled the image int x = rand.nextInt(50)+50; int y = rand.nextInt(50)+50; Image image = icon.getImage().getScaledInstance(x,y,Image.SCALE_SMOOTH); icon.setImage(image); //remove empty label and replace it with an image int one = (Integer) arraylist.get(i); pDraw.remove(one); final JLabel label; pDraw.add(label,one); }

    Read the article

  • Why might the Large Object Heap grow rather than throw an exception?

    - by Unsliced
    In a previous question I asked possible programatic ways of maximising the largest block allocatable on the LOH. I'm still seeing the problems, but now I'm trying to get my head around why the LOH seems to grow and shrink in size, yet I'm still seeing OutOfMemoryExceptions that tally with what others have reported as being due to LOH fragmentation. Why might one call to, for example, StringBuilder.EnsureCapacity throw an OutOfMemoryException for me, but another call from somewhere else result in the LOH expanding in size (according to the performance counters, it is growing and shrinking)?

    Read the article

  • Basic CHMOD restriction

    - by Marshall Mathews
    i have an uploads folder on my website. What i want to do is restrict users from accessing like i dont want them to go to www.mysite.com/uploads/ and see the files in there and it should show forbidden, but they should be able to download via my website, for example www.mysite.com/downloads.php?id=1 If thats not possible, how can i atleast not show them the directory index on /uploads How is it that file sharing websites does this? An htaccess with deny from all stops php from accessing the file as well Please tell me a solution if you would know, i googled and asked on irc a few days ago about this issue, its pretty confusing to me.

    Read the article

  • Is there any free live support solution that would ease implementation of a basic online help-desk?

    - by bogdan
    I'm looking for a free or inexpensive solution to give live online support to web visitors. I would like something based on Jabber/XMPP because it's an open protocol. This should work like this: The company would use 2-3 jabber accounts like Google Talk for providing support Online chat form that would connect to one of currently online jabber accounts Optionally give one proxy jabber account to the customers. This proxy would contact any of the currently online company accounts. Using this customers will see only one chat contact but they will speak with different people based on who is online at the moment. Currently I found only some expensive solutions like J-livesupport, Akeni. I would really appreciate if you will recommend something you successfully implemented.

    Read the article

  • Problem with large number of markers on the map...

    - by bobetko
    I am working on an Android app that already exists on iPhone. In the app, there is a Map activity that has (I counted) around 800 markers in four groups marked by drawable in four different colors. Each group can be turned on or off. Information about markers I have inside List. I create a mapOverlay for each group, then I attach that overlay to the map. I strongly believe that coding part I did properly. But I will attach my code anyway... The thing is, my Nexus One can't handle map with all those markers. It takes around 15 seconds just to draw 500 markers. Then when all drawn, map is not quite smooth. It is sort of hard to zoom and navigate around. It can be done, but experience is bad and I would like to see if something can be done there. iPhone seems doesn't have problems showing all these markers. It takes roughly about 1-2 seconds to show all of them and zooming and panning is not that bad. Slow down is noticeable but still acceptable. I personally think it is no good to draw all those markers, but app is designed by somebody else and I am not supposed to make any drastic changes. I am not sure what to do here. It seems I will have to come up with different functionality, maybe use GPS location, if known, and draw only markers within some radius, or, if location not known, use center of the screen(map) and draw markers around that. I will have to have reasonable explanation for my bosses in case I make these changes. I appreciate if anybody has any idas. And the code: ... for (int m = 0; m < ArrList.size(); m++) { tName = ArrList.get(m).get("name").toString(); tId = ArrList.get(m).get("id").toString(); tLat = ArrList.get(m).get("lat").toString();; tLng = ArrList.get(m).get("lng").toString();; try { lat = Double.parseDouble(tLat); lng = Double.parseDouble(tLng); p1 = new GeoPoint( (int) (lat * 1E6), (int) (lng * 1E6)); OverlayItem overlayitem = new OverlayItem(p1, tName, tId); itemizedoverlay.addOverlay(overlayitem); } catch (NumberFormatException e) { Log.d(TAG, "NumberFormatException" + e); } } mapOverlays.add(itemizedoverlay); mapView.postInvalidate(); ................................ public class HelloItemizedOverlay extends ItemizedOverlay<OverlayItem> { private ArrayList<OverlayItem> mOverlays = new ArrayList<OverlayItem>(); private Context mContext; public HelloItemizedOverlay(Drawable defaultMarker, Context context) { super(boundCenterBottom(defaultMarker)); mContext = context; } public void addOverlay(OverlayItem overlay) { mOverlays.add(overlay); populate(); } @Override protected OverlayItem createItem(int i) { return mOverlays.get(i); } @Override public int size() { return mOverlays.size(); } @Override protected boolean onTap(int index) { final OverlayItem item = mOverlays.get(index); ... EACH MARKER WILL HAVE ONCLICK EVENT THAT WILL PRODUCE CLICABLE ... BALOON WITH MARKER'S NAME. return true; } }

    Read the article

  • How to boot Windows XP using the image file(not the extracted image file)

    - by Nrew
    Is it possible to boot from an iso image file itself. Because when you burn it, it gets extracted. Because in linux you can just place the .iso file in a removable media and boot from it without extracting. Is it possible to make something like that in windows? What I'm saying is related to this: http://wintoflash.com/forum/viewtopic.php?f=5&t=312 Something like creating a flash drive which has the ability to install multiple os. They have something like this in pendrivelinux but I can't find it anymore. But that boot manager can only install linux. And other live cd's used in cleaning the system. That's why I'm asking if its possible to make a custom windows xp or windows 7 installer so that the image file alone can boot.

    Read the article

  • Convert swf file to mp4 file using FFMPEG

    - by user1624004
    I now want to show an html5 video on a html page. Now I have an sample.swf file, I want to convert it to .mp4 or .ogg or .webm file. I have tried: ffmpeg -i sample.swf sample.mp4 But I got this error: [swf @ 0000000001feef40] Could not find codec parameters for stream 0 (Audio: pcm_s16le, 5512 Hz, 1 channels, 88 kb/s): unspecified sample format Consider increasing the value for the 'analyzeduration' and 'probesize' options [swf @ 0000000001feef40] Estimating duration from bitrate, this may be inaccurate Guessed Channel Layout for Input Stream #0.0 : mono Input #0, swf, from 'sample.swf': Duration: N/A, bitrate: N/A Stream #0:0: Audio: pcm_s16le, 5512 Hz, mono, 88 kb/s Stream #0:1: Video: mjpeg, yuvj444p, 1024x768 [SAR 100:100 DAR 4:3], 16 fps, 16 tbr, 16 tbn File 'sample.mp4' already exists. Overwrite ? [y/N] y Invalid sample format '(null)' Error opening filters!

    Read the article

  • "No such file or directory" when the file is there

    - by Arlaud Agbe Pierre
    I'm trying to run XPDF on a linux (probably red hat) OVH shared server. I've managed to have ftp ssh access and put the 64 bits binaries onto a folder. The problem is : even though the files are there with the right permissions, if I try running it I'm getting a file not found problem (I'm thinking about a missing link..) Long story short : jurisedi@ssh1:~/xpdf$ file pdftotext pdftotext: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), stripped jurisedi@ssh1:~/xpdf$ ./pdftotext -ovh: jurisedi@ssh1:~/xpdf$: No such file or directory Any ideas ?

    Read the article

  • Thunderbird replacement with PGP support

    - by Robert
    Is there any good Thunderbird replacement with full PGP support ? To be more exact replacement for (Thb +Enigmail this is the tandem Im using now) Best way would be if PGP would be built in into application. Commercial software is also fine :) excluding M$ software. What I need: - PGP support - application much more stable than Thunderbird, - support for Gmail out of the box including support for labels, - better search functionality (search in THB is far away from perfection), - cross platform (I should be able to run it on windows and Linux). So do you guys have an experience with other mail clients which have PGP support ?

    Read the article

  • What would prevent a .BAT file from being run on a mapped drive?

    - by JBurace
    In WinXP SP3, I have a .BAT file on a mapped drive. When I try to run this .BAT file (or even right click-edit) it gives me: --------------------------- Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item. --------------------------- OK --------------------------- This happens with any .BAT file, no matter what is within the file. If the file is on my local computer (like C:) it will run just fine. If someone else runs it from another computer (on the same mapped drive), it runs just fine. I have full permissions on the drive; I can edit/delete/save/write/create in that folder and/or .BAT file and I've ruled out permissions being the issue. It seems like a security prevention, but I can't tell what it would be. It would have to be something on my PC, but I don't use any 3rd party software. What would cause this error?

    Read the article

  • Problem transferring file to FTP server - 503 Could not create file

    - by blntechie
    I try to transfer a file from SSIS package to a FTP server provided by my client. When I try connecting and transfer using a FTP tool (WinSCP) manually it works fine and file was transferred. But when i use the ftp command in command prompt and try to transfer using "send" command i get an error "553 could not create file". This also happens from SSIS package. I'm not in control of the FTP server but if anyone can provide a solution I can pass it to the admin or anything to be done from my end?

    Read the article

  • Why isn't pyinstaller making me an .exe file?

    - by Matt Miller
    I am attempting to follow this guide to make a simple Hello World script into an .exe file. I have Windows Vista with an AMD 64-bit processor I have installed Python 2.6.5 (Windows AMD64 version) I have set the PATH (if that's the right word) so that the command line recognizes Python I have installed UPX (there only seems to be a 32-bit version for Windows) and pasted a copy of upx.exe into the Python26 folder as instructed. I have installed Pywin (Windows AMD 64 Python 2.6 version) I have run Pyinstaller's Configure.py. It gives some error messages but seems to complete. I don't know if this is what's causing the problem, so the following is what it says when I run it: C:\Python26\Pyinstaller\branches\py26winConfigure.py I: read old config from C:\Python26\Pyinstaller\branches\py26win\config.dat I: computing EXE_dependencies I: Finding TCL/TK... I: Analyzing C:\Python26\DLLs_tkinter.pyd W: Cannot get binary dependencies for file: W: C:\Python26\DLLs_tkinter.pyd W: Traceback (most recent call last): File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 608, in get Imports return _getImports_pe(pth) File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 275, in _ge tImports_pe importva, importsz = datadirs[1] IndexError: list index out of range I: Analyzing C:\Python26\DLLs_ctypes.pyd W: Cannot get binary dependencies for file: W: C:\Python26\DLLs_ctypes.pyd W: Traceback (most recent call last): File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 608, in get Imports return _getImports_pe(pth) File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 275, in _ge tImports_pe importva, importsz = datadirs[1] IndexError: list index out of range I: Analyzing C:\Python26\DLLs\select.pyd W: Cannot get binary dependencies for file: W: C:\Python26\DLLs\select.pyd W: Traceback (most recent call last): File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 608, in get Imports return _getImports_pe(pth) File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 275, in _ge tImports_pe importva, importsz = datadirs[1] IndexError: list index out of range I: Analyzing C:\Python26\DLLs\unicodedata.pyd W: Cannot get binary dependencies for file: W: C:\Python26\DLLs\unicodedata.pyd W: Traceback (most recent call last): File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 608, in get Imports return _getImports_pe(pth) File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 275, in _ge tImports_pe importva, importsz = datadirs[1] IndexError: list index out of range I: Analyzing C:\Python26\DLLs\bz2.pyd W: Cannot get binary dependencies for file: W: C:\Python26\DLLs\bz2.pyd W: Traceback (most recent call last): File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 608, in get Imports return _getImports_pe(pth) File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 275, in _ge tImports_pe importva, importsz = datadirs[1] IndexError: list index out of range I: Analyzing C:\Python26\python.exe I: Dependent assemblies of C:\Python26\python.exe: I: amd64_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none I: Searching for assembly amd64_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_ none... I: Found manifest C:\Windows\WinSxS\Manifests\amd64_microsoft.vc90.crt_1fc8b3b9a 1e18e3b_9.0.21022.8_none_750b37ff97f4f68b.manifest I: Searching for file msvcr90.dll I: Found file C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21 022.8_none_750b37ff97f4f68b\msvcr90.dll I: Searching for file msvcp90.dll I: Found file C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21 022.8_none_750b37ff97f4f68b\msvcp90.dll I: Searching for file msvcm90.dll I: Found file C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21 022.8_none_750b37ff97f4f68b\msvcm90.dll I: Adding Microsoft.VC90.CRT\Microsoft.VC90.CRT.manifest I: Adding Microsoft.VC90.CRT\msvcr90.dll I: Adding Microsoft.VC90.CRT\msvcp90.dll I: Adding Microsoft.VC90.CRT\msvcm90.dll W: Cannot get binary dependencies for file: W: C:\Python26\python.exe W: Traceback (most recent call last): File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 608, in get Imports return _getImports_pe(pth) File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 275, in _ge tImports_pe importva, importsz = datadirs[1] IndexError: list index out of range I: Analyzing C:\Windows\WinSxS\Manifests\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e 3b_9.0.21022.8_none_750b37ff97f4f68b.manifest I: Analyzing C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.210 22.8_none_750b37ff97f4f68b\msvcr90.dll W: Cannot get binary dependencies for file: W: C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_ 750b37ff97f4f68b\msvcr90.dll W: Traceback (most recent call last): File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 608, in get Imports return _getImports_pe(pth) File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 275, in _ge tImports_pe importva, importsz = datadirs[1] IndexError: list index out of range I: Analyzing C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.210 22.8_none_750b37ff97f4f68b\msvcp90.dll W: Cannot get binary dependencies for file: W: C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_ 750b37ff97f4f68b\msvcp90.dll W: Traceback (most recent call last): File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 608, in get Imports return _getImports_pe(pth) File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 275, in _ge tImports_pe importva, importsz = datadirs[1] IndexError: list index out of range I: Analyzing C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.210 22.8_none_750b37ff97f4f68b\msvcm90.dll W: Cannot get binary dependencies for file: W: C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_ 750b37ff97f4f68b\msvcm90.dll W: Traceback (most recent call last): File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 608, in get Imports return _getImports_pe(pth) File "C:\Python26\Pyinstaller\branches\py26win\bindepend.py", line 275, in _ge tImports_pe importva, importsz = datadirs[1] IndexError: list index out of range I: could not find TCL/TK I: testing for Zlib... I: ... Zlib available I: Testing for ability to set icons, version resources... I: ... resource update available I: Testing for Unicode support... I: ... Unicode available I: testing for UPX... I: ...UPX available I: computing PYZ dependencies... I: done generating C:\Python26\Pyinstaller\branches\py26win\config.dat My Python script (named Hello.py) is the same as the example: #!/usr/bin/env python for i in xrange(10000): print "Hello, World!" This is my BAT file, in the same directory: set PIP=C:\Python26\Pyinstaller\branches\py26win\ python %PIP%Makespec.py --onefile --console --upx --tk Hello.py python %PIP%Build.py Hello.spec When I run Hello.bat in the command prompt several files are made, none of which are an .exe file, and the following is displayed: C:\My Filesset PIP=C:\Python26\Pyinstaller\branches\py26win\ C:\My Filespython C:\Python26\Pyinstaller\branches\py26win\Makespec.py --onefil e --console --upx --tk Hello.py wrote C:\My Files\Hello.spec now run Build.py to build the executable C:\My Filespython C:\Python26\Pyinstaller\branches\py26win\Build.py Hello.spec I: Dependent assemblies of C:\Python26\python.exe: I: amd64_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none Traceback (most recent call last): File "C:\Python26\Pyinstaller\branches\py26win\Build.py", line 1359, in main(args[0], configfilename=opts.configfile) File "C:\Python26\Pyinstaller\branches\py26win\Build.py", line 1337, in main build(specfile) File "C:\Python26\Pyinstaller\branches\py26win\Build.py", line 1297, in build execfile(spec) File "Hello.spec", line 3, in pathex=['C:\My Files']) File "C:\Python26\Pyinstaller\branches\py26win\Build.py", line 292, in _init _ raise ValueError, "script '%s' not found" % script ValueError: script 'C:\Python26\Pyinstaller\branches\py26win\support\useTK.py' n ot found I have limited knowledge with the command prompt, so please take baby steps with me if I need to do something there.

    Read the article

  • C++ file input/output search

    - by Brian J
    Hi I took the following code from a program I'm writing to check a user generated string against a dictionary as well as other validation. My problem is that although my dictionary file is referenced correctly,the program gives the default "no dictionary found".I can't see clearly what I'm doing in error here,if anyone has any tips or pointers it would be appreciated, Thanks. //variables for checkWordInFile #define gC_FOUND 99 #define gC_NOT_FOUND -99 // static bool certifyThat(bool condition, const char* error) { if(!condition) printf("%s", error); return !condition; } //method to validate a user generated password following password guidelines. void validatePass() { FILE *fptr; char password[MAX+1]; int iChar,iUpper,iLower,iSymbol,iNumber,iTotal,iResult,iCount; //shows user password guidelines printf("\n\n\t\tPassword rules: "); printf("\n\n\t\t 1. Passwords must be at least 9 characters long and less than 15 characters. "); printf("\n\n\t\t 2. Passwords must have at least 2 numbers in them."); printf("\n\n\t\t 3. Passwords must have at least 2 uppercase letters and 2 lowercase letters in them."); printf("\n\n\t\t 4. Passwords must have at least 1 symbol in them (eg ?, $, £, %)."); printf("\n\n\t\t 5. Passwords may not have small, common words in them eg hat, pow or ate."); //gets user password input get_user_password: printf("\n\n\t\tEnter your password following password rules: "); scanf("%s", &password); iChar = countLetters(password,&iUpper,&iLower,&iSymbol,&iNumber,&iTotal); iUpper = countLetters(password,&iUpper,&iLower,&iSymbol,&iNumber,&iTotal); iLower =countLetters(password,&iUpper,&iLower,&iSymbol,&iNumber,&iTotal); iSymbol =countLetters(password,&iUpper,&iLower,&iSymbol,&iNumber,&iTotal); iNumber = countLetters(password,&iUpper,&iLower,&iSymbol,&iNumber,&iTotal); iTotal = countLetters(password,&iUpper,&iLower,&iSymbol,&iNumber,&iTotal); if(certifyThat(iUpper >= 2, "Not enough uppercase letters!!!\n") || certifyThat(iLower >= 2, "Not enough lowercase letters!!!\n") || certifyThat(iSymbol >= 1, "Not enough symbols!!!\n") || certifyThat(iNumber >= 2, "Not enough numbers!!!\n") || certifyThat(iTotal >= 9, "Not enough characters!!!\n") || certifyThat(iTotal <= 15, "Too many characters!!!\n")) goto get_user_password; iResult = checkWordInFile("dictionary.txt", password); if(certifyThat(iResult != gC_FOUND, "Password contains small common 3 letter word/s.")) goto get_user_password; iResult = checkWordInFile("passHistory.txt",password); if(certifyThat(iResult != gC_FOUND, "Password contains previously used password.")) goto get_user_password; printf("\n\n\n Your new password is verified "); printf(password); //writing password to passHistroy file. fptr = fopen("passHistory.txt", "w"); // create or open the file for( iCount = 0; iCount < 8; iCount++) { fprintf(fptr, "%s\n", password[iCount]); } fclose(fptr); printf("\n\n\n"); system("pause"); }//end validatePass method int checkWordInFile(char * fileName,char * theWord){ FILE * fptr; char fileString[MAX + 1]; int iFound = -99; //open the file fptr = fopen(fileName, "r"); if (fptr == NULL) { printf("\nNo dictionary file\n"); printf("\n\n\n"); system("pause"); return (0); // just exit the program } /* read the contents of the file */ while( fgets(fileString, MAX, fptr) ) { if( 0 == strcmp(theWord, fileString) ) { iFound = -99; } } fclose(fptr); return(0); }//end of checkwORDiNFile

    Read the article

  • Create File Speedily From Individual Column

    - by neversaint
    I have a data that looks like this: -1 1:-0.394668 2:-0.794872 3:-1 4:-0.871341 5:0.9365 6:0.75597 1 1:-0.463641 2:-0.897436 3:-1 4:-0.871341 5:0.44378 6:0.121824 1 1:-0.469432 2:-0.897436 3:-1 4:-0.871341 5:0.32668 6:0.302529 -1 1:-0.241547 2:-0.538462 3:-1 4:-0.871341 5:0.9994 6:0.987166 1 1:-0.757233 2:-0.948718 3:-1 4:-0.871341 5:-0.33904 6:0.915401 1 1:-0.167147 2:-0.589744 3:-1 4:-0.871341 5:0.95078 6:0.991566 The first column is class, and next 6 columns are features. I want to create 6 files for individual features. For example feat1_file.txt will contain -1 1:-0.394668 1 1:-0.463641 ... 1 1:-0.757233 1 1:-0.167147 feat2_file.txt will contain -1 2:-0.794872 ... 1 2:-0.589744 and so on. I have a Perl code that does this but it is horribly slow. Is there a way to do it faster? Typically the input files will contain 100K lines. use strict; use Data::Dumper; use Carp; my $input = $ARGV[0] || "myinput.txt"; my $INFILE_file_name = $input; # input file name open ( INFILE, '<', $INFILE_file_name ) or croak "$0 : failed to open input file $INFILE_file_name : $!\n"; my $out1 = $input."_feat_1.txt"; my $out2 = $input."_feat_2.txt"; my $out3 = $input."_feat_3.txt"; my $out4 = $input."_feat_4.txt"; my $out5 = $input."_feat_5.txt"; my $out6 = $input."_feat_6.txt"; unlink($out1); unlink($out2); unlink($out3); unlink($out4); unlink($out5); unlink($out6); print "$out1\n"; while ( <INFILE> ) { chomp; my @els = split(/\s+/,$_); my $lbl = $els[0]; my $OUTFILE1_file_name = $out1; # output file name open ( OUTFILE1, '>>', $OUTFILE1_file_name ) or croak "$0 : failed to open output file $OUTFILE1_file_name : $!\n"; print OUTFILE1 "$lbl $els[1]\n"; close ( OUTFILE1 ); # close output file my $OUTFILE2_file_name = $out2; # output file name open ( OUTFILE2, '>>', $OUTFILE2_file_name ) or croak "$0 : failed to open output file $OUTFILE2_file_name : $!\n"; print OUTFILE2 "$lbl $els[2]\n"; close ( OUTFILE2 ); # close output file # Etc.. until OUTFILE 6 } close (INFILE);

    Read the article

  • ASP 3.0 Folder/File Permissions Settings (ASP Classic)

    - by ASP Pee-Wee
    Dear Stack Exchange, Hi, I have built a form input page in HTML that has an action to post to an ASP handler/processor .asp file. The form handler/processor .asp file contains only <% Insert VBScript Here % and no HTML output whatsoever. The .asp file was never intended to be a "web viewable" .asp file like an .asp home page file or html file would. It's supposed to be for my eyes only- not the public's however it does need to take info posted by the public and do something with it on it's end. I have used VBScript/ASP3.0 to build the form handler/processor file and would like to know how to keep someone from viewing the actual VBScript in the handler/processor .asp file. I am aware of obfuscation but I would like to know how to keep prying eyes from even being able to take a look at the obfuscated code in the handler/processor file. I realize that the server executes the .asp file first before outputting anything to the browser so I guess that my main concern is mostly that someone may could "download" the form handler/processor .asp file, then view it's contents on their machine. Assuming the form handler .asp file is where it is, behind the root, and is on a windows server (no htaccess approach) how could one protect it so that it could never be viewed or simply pulled down via anonymous ftp or something like that? Is there something like "script only" permissions that the system administrator could set up for a particular folder? Remember, with shared hosting I can't go above the root. If so, would the form still be able to post? How would any of you guys go about protecting the asp file in addition to obfuscation? Any help would be greatly appreciated. Thanks, ASP Pee-Wee

    Read the article

  • Two large, linked Excel files take 30 minutes to save, except in VMWare environment

    - by Gerald L
    I support some tax consultants who love to use Excel when they should probably be using Access. Anyway, they have created two Excel files, A and B. File B has cells linked to file A. File A is 27 MB and file B is 16 MB. One worksheet has roughly 1 million rows and there is another worksheet doing a whole bunch of SUMIF on the 1 million rows. Not the best idea, but whatever. Both Excel files open and recalculate within a reasonable amount of time (1-2 minutes). For a files that large, this is acceptable. Here is the problem: Once you change a cell, and save the file B, it takes a solid 30 minutes to save the file, and the processors are going full speed. I've tried this on 6 different machines, all running Windows XP SP3 with Office 2007 SP2 and all patches. The specs vary from one machine with 512 MB or RAM to a machine with 4 GB of RAM and quad processors. Same result every time. Here is the clincher: If I do this same save operation on a VMWare virtual machine, the file gets saved in 1 minute. I've tried this with my ESX servers at the office, my Mac Fusion at home, and VMWare workstation at the office. It does not matter how much RAM the virtual machine has... it saves in about 1 minute every time. Does anybody have any idea why this is happening and how to fix?

    Read the article

  • Error importing large MySQL dump file which includes binary BLOBs in Windows

    - by Daniel Magliola
    I'm trying to import a MySQL dump file, which I got from my hosting company, into my Windows dev machine, and i'm running into problems. I'm importing this from the command line, and i'm getting a very weird error: ERROR 2005 (HY000) at line 3118: Unknown MySQL server host '+?*á±dÆ-N+Æ·h^ye"p-i+ Z+-$?P+Y.8+|?+l8/l¦¦î7æ¦X¦XE.ºG[ ;-ï?éµ?º+¦¦].?+f9d릦'+ÿG?-0à¡úè?-?ù??¥'+NÑ' (11004) I'm attaching the screenshot because i'm assuming the binary data will get lost... I'm not exactly sure what the problem is, but two potential issues are the size of the file (2 Gb) which is not insanely large, but it's not trivially small either, and the other is the fact that many of these tables have JPG images in them (which is why the file is 2Gb large, for the most part). Also, the dump was taken in a Linux machine and I'm importing this into Windows, not sure if that could add to the problems (I understand it shouldn't) Now, that binary garbage is why I think the images in the file might be a problem, but i've been able to import similar dumps from the same hosting company in the past, so i'm not sure what might be the issue. Also, trying to look into this file (and line 3118 in particular) is kind of impossible given its size (i'm not really handy with Linux command line tools like grep, sed, etc). The file might be corrupted, but i'm not exactly sure how to check it. What I downloaded was a .gz file, which I "tested" with WinRar and it says it looks OK (i'm assuming gz has some kind of CRC). If you can think of a better way to test it, I'd love to try that. Any ideas what could be going on / how to get past this error? I'm not very attached to the data in particular, since I just want this as a copy for dev, so if I have to lose a few records, i'm fine with that, as long as the schema remains perfectly sound. Thanks! Daniel

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >