Search Results

Search found 4214 results on 169 pages for 'binary serializer'.

Page 111/169 | < Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >

  • Efficiently check string for one of several hundred possible suffixes

    - by Ghostrider
    I need to write a C/C++ function that would quickly check if string ends with one of ~1000 predefined suffixes. Specifically the string is a hostname and I need to check if it belongs to one of several hundred predefined second-level domains. This function will be called a lot so it needs to be written as efficiently as possible. Bitwise hacks etc anything goes as long as it turns out fast. Set of suffixes is predetermined at compile-time and doesn't change. I am thinking of either implementing a variation of Rabin-Karp or write a tool that would generate a function with nested ifs and switches that would be custom tailored to specific set of suffixes. Since the application in question is 64-bit to speed up comparisons I could store suffixes of up to 8 bytes in length as const sorted array and do binary search within it. Are there any other reasonable options?

    Read the article

  • Stripe suppression algorithm needed

    - by maximus
    I have images with text. There are dark stripes in image that still exists in binary image too. That makes characters connected with that stripe - it can be vertical or horizontal (or at some angle) I need to remove them from image at first, and then to binarize. I've seen bandpass filter in ImageJ program that have some options like - suppress horizontal stripes, and it works good, but it also apply a bandpass filtering. So any idea please how to do it. I think it should be done in frequency domain.

    Read the article

  • How do I embed an expect script that takes in arguments into a bash shell script?

    - by fzkl
    I am writing a bash script which amongst many other things uses expect to automatically run a binary and install it by answering installer prompts. I was able to get my expect script to work fine when the expect script is called in my bash script with the command "expect $expectscriptname $Parameter". However, I want to embed the expect script into the shell script instead of having to maintain two separate script files for the job. I searched around and found that the procedure to embed expect into bash script was to declare a variable like VAR below and then echo it.: VAR=$(expect -c " #content of expect script here ") echo "$VAR" 1) I don't understand how echoing $VAR actually runs the expect script. Could anyone explain? 2) I am not sure how to pass $Parameter into VAR or to the echo statement. This is my main concern. Any ideas? Thanks.

    Read the article

  • Reading file resource in Unix and MacOS

    - by Sanjeev
    Hi, I am writing my first wxWidgets application which aims to be cross-platform. The program uses dll file for plugins and in Windows, reads dll resource part for information regarding plugin name, author name etc. I have never used Unix or MacOS (little Linux though) and am wondering whether compiling binary for these other OSes will require changes to the code written for Windows. For instance, is there a DLL equivalent in Unix and MacOS? Are there any provisions of compiling resource strings and files into a such files? Thanks, Sanjeev

    Read the article

  • uploading a i-phone application to apple store??

    - by hemant
    i have been trying to uplaod an application to apple store for 2 days now..first they said the provisioning profile was not right due to which i had to make a new one and upload it again now after that problem was solved while uploading the new binary it said the version was same with the previous minor version(1.0 - which someone else uploaded in my company)..then i changed the version to 1.1 by changing it in target info properties..then i cleaned all targets quite the xcode,restarted the xcode and build the project again..it succeeded and now wen i uploaded it it still says the same error version same with the previous minor version is there any other way of changing the version number though in my info.plist file it is showing version:1.1??

    Read the article

  • excel import query error

    - by pmms
    mysql_connect("localhost","root",""); mysql_select_db("hitnrunf_db"); $result=mysql_query("select * from jos_users INTO OUTFILE 'users.csv' FIELDS ESCAPED BY '""' TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' "); header("Content-type: text/plain"); header("Content-Disposition: attachment; filename=your_desired_name.xls"); header("Content-Transfer-Encoding: binary"); header("Pragma: no-cache"); header("Expires: 0"); print "$header\n$data"; in the above code in query string i.e string in side mysql_quey we are getting following error Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\wamp\www\samples\mysql_excel\exel_outfile.php on line 8 in query string '\n' charter is not identifying as string thats why above error getting

    Read the article

  • How to setup RAM disk drive using python or WMI?

    - by Ming Xie
    Hi, The background of my question is associated with Tesseract, the free OCR engine (1985-1995 by HP, now hosting in Google). It specifically requires an input file and an output file; the argument only takes filename (not stream / binary string), so in order to use the wrapper API such as pytesser and / or python-tesser.py, the OCR temp files must be created. I, however, have a lot of images need to OCR; frequent disk write and remove is inevitable (and of course the performance hit). The only choice I could think about is changing the wrapper class and point the temp file to RAM disk, which bring this problem up. If you have better solution, please let me know. Thanks a lot. -M

    Read the article

  • Anyone using NoSQL databases for medical record storage?

    - by Brian Bay
    Electronic Medical records are composed of different types of data. Visit information ( date/location/insurance info) seems to lend itself to a RDMS. Other types of medical infomation, such as lab reports, x-rays, photos, and electronic signatures, are document based and would seem to be a good candidate for a 'document-oriented' database, such as MongoDB. Traditionally, binary data would be stored as a BLOB in a RDBMS. A hybrid approach using a traditional RDBMS along with a 'document-oriented' database would seem like good alternative to this. Other alternative would be something like DB2 purexml. The ultimate answer could be that 'it depends', but I really just wanted to get some general feedback/ideas on this. Is anyone using the NoSql approach for medical records?

    Read the article

  • IA-32: Pushing a byte onto a stack isn't possible on Pentium, why?

    - by Tim Green
    Hi, I've come to learn that you cannot push a byte directly onto the Intel Pentium's stack, can anyone explain this to me please? The reason that I've been given is because the esp register is word-addressable (or, that is the assumption in our model) and it must be an "even address". I would have assumed decrementing the value of some 32-bit binary number wouldn't mess with the alignment of the register, but apparently I don't understand enough. I have tried some NASM tests and come up that if I declare a variable (bite db 123) and push it on to the stack, esp is decremented by 4 (indicating that it pushed 32-bits?). But, "push byte bite" (sorry for my choice of variable names) will result in a kind error: test.asm:10: error: Unsupported non-32-bit ELF relocation Any words of wisdom would be greatly appreciated during this troubled time. I am first year undergraduate so sorry for my naivety in any of this. Tim

    Read the article

  • Updated iphone application not live yet

    - by Vishal Mali
    Hi All, 3 weeks back we uploaded an application on the iTunes(V1.0). On Thursday we updated that application with new build (V1.2). I clicked the "Update" button on itunesconnect.apple.com and followed uploaded the new binary and new contents. On the next day the Description and price tag are updated successfully, but the build version number and screens shots are still from the previous version. And the amazing thing we noticed is that application status is "Waiting for Review" from last 2 days... :( I tried to play with release date, but still application status is "Waiting for Review". Its been 2 days that there is no activity happening from apple... :( Please help me in this scenario..... Thanks in advance. Regards, Vishal.

    Read the article

  • Lua API for TokyoTyrant

    - by jideel
    Hi SO folks, I didn't managed to find an Lua client/api for TokyoTyrant. Such Api exists for TokyoCabinet, but not for TT. And Perl and Ruby API exists for TT. TT provides a native binary protocol, a memcached-compatible protocol, and an HTTP-oriented protocol. So my questions are : 1/ Do you think using the memcached (using luamemcached) or the HTTP protocol (using luaSocket) is "enough" for most / simple usage, and so a native Lua api is not necessary ? (the app is a simple uuid storage/distributor) ? 2/ Does it make sense to not use TokyoTyrant, but only TokyoCabinet, and use Lua at the application level to provide network and concurrent access to TC, using, say, Copas (Copas is , from their website, "a dispatcher based on coroutines that can be used by TCP/IP servers." ? Thanks.

    Read the article

  • Error in Jaclplus component

    - by Aruna
    Hi, I am working on Joomla 1.5 and our site is using the Bluehost server.Till March 9th, 2010 our site was working perfectly.And on March 10th,2010 , the following error was shown in the site as Warning: Unexpected character in input: '' (ASCII=28) state=1 in /home1/tcscoinc/public_html/tcsrnd/administrator/components/com_jaclplus/jac lplus.class.php on line 73 Parse error: syntax error, unexpected T_STRING in /home1/tcscoinc/public_html/tcsrnd/administrator/components/com_jaclplus/jac lplus.class.php on line 73 For time being, i have just renamed the file jaclplus.class.php to make the site to function. As we are using Jaclplus component and we have purchased the Jaclplus component from Byos Tech , i have checked in the membership details.And we found that our Membership has been expired on 03/10/2010 . I have asked them but they had replied that it may not be a problem on membership. Please anyone share what can be the reason for the error.I am not able to open that file(jaclplus.class.php) since its a binary file.

    Read the article

  • Ho to get PHP setrawcookie value back?

    - by user250343
    The IETF recommends to use base64 encoding for binary cookie values. http://tools.ietf.org/html/draft-ietf-httpstate-cookie-07 So I use setrawcookie(..) but I don't know what variable to use to get the cookie back because $_COOKIE[..] still uses the URL decoding that matches setcookie(..). This replaces "+" with " " in the output. <?php var_dump($_COOKIE['TEST']); $binary_string = ""; for($index = 0; $index < 256; $index++){ $binary_string .= chr($index); } $encoded_data = base64_encode($binary_string); var_dump($encoded_data); $cookie_set = setrawcookie('TEST', $encoded_data, time() + 3600); ?

    Read the article

  • feof() in C file handling

    - by Neeraj
    I am reading a binary file byte-by-byte,i need determine that whether or not eof has reached. feof() doesn't works as "eof is set only when a read request for non-existent byte is made". So, I can have my custom check_eof like: if ( fread(&byte,sizeof(byte),1,fp) != 1) { if(feof()) return true; } return false; But the problem is, in case when eof is not reached, my file pointer is moved a byte ahead. So a solution might be to use ftell() and then fseek() to get it to correct position. Another solution might be to buffer the byte ahead in some temporary storage. Any better solutions?

    Read the article

  • How do I get source file information with dumpbin /symbols when compiling with VS 2005?

    - by Thomas Dartsch
    I have a tool which uses the output of dumpbin /symbols to do some dependency analysis with our C/C++ libraries. When we compiled the libs with VS 6.0, the dumpbin COFF SYMBOL TABLE contained entries like 000 00000008 DEBUG notype Filename | .file x:\mydir\mysource.c allowing me to get the relationship between sources and defined/used symbols, which is essential for my tool. When we compile with VS 2005, these entries are missing. When I look at the libs with a hex editor, it seems that there is no filename information at all included in the binary files, so it seems not to be a dumbin problem but is compilation related. So I'm looking for a way to get the Filename entries back into my libraries when compiling with VS 2005.

    Read the article

  • iPhone - how to store documents consisting of multiple images?

    - by Joe Strout
    My iPhone (actually, iPad) app creates documents that consist of several images, plus a bit of metadata. What's the best practice for storing these sorts of documents on disk? I see two main options: Create a folder for each document, and store my images as separate PNG files within the folder (plus another little file for the metadata). Create a single file which contains all images and metadata. But I'm not sure how to easily do option 2. I think I can convert my images in PNG format to/from NSData, but then what? I'm still a newbie at Cocoa, but I believe I saw something about stuffing mixed data into some NSSomethingOrOther and having this write itself out to disk, and read itself back in later. Does this ring a bell with anyone? And, will it work with large binary blobs of data like my images? Or would you recommend I simply go with option 1?

    Read the article

  • Plain-English tutorial on artificial neural networks?

    - by Stuart
    I've Googled, StackOverflowed, everything, and I cannot seem to find a tutorial I can understand. I understand the concept of genetic algorithms, and how to implement them, (Though I haven't tried) but I cannot grasp the concept of neural networks. I know vaguely how they work... And that's about it. Could someone direct me to a tutorial that could help someone who has not even graduated middle school yet? Sure, I'm several years ahead of the majority of people my grade, but I don't understand summation, (which I apparently need if I don't want a simple binary output) vectors, and other things that I apparently should know. Is there a simple, bare-bones tutorial for neural networks? After I learn the basics, I'll proceed to more difficult ones. Preferably, they would be in Java. Thanks!

    Read the article

  • Safe non-tamperable URL component in Perl using symmetric encryption?

    - by Randal Schwartz
    OK, I'm probably just having a bad Monday, but I have the following need and I'm seeing lots of partial solutions but I'm sure I'm not the first person to need this, so I'm wondering if I'm missing the obvious. $client has 50 to 500 bytes worth of binary data that must be inserted into the middle of a URL and roundtrip to their customer's browser. Since it's part of the URL, we're up against the 1K "theoretical" limit of a GET URL. Also, $client doesn't want their customer decoding the data, or tampering with it without detection. $client would also prefer not to store anything server-side, so this must be completely standalone. Must be Perl code, and fast, in both encoding and decoding. I think the last step can be base64. But what are the steps for encryption and hashing that make the most sense?

    Read the article

  • Pylons importing Psycopg2 error

    - by resopollution
    Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Python/2.6/site-packages/psycopg2/__init__.py", line 60, in <module> from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID ImportError: dlopen(/Library/Python/2.6/site-packages/psycopg2/_psycopg.so, 2): Symbol not found: _PQbackendPID Referenced from: /Library/Python/2.6/site-packages/psycopg2/_psycopg.so Expected in: flat namespace in /Library/Python/2.6/site-packages/psycopg2/_psycopg.so Psycopg2 was working fine before, but now I get this error. Any ideas on this issue much appreciated. EDIT: so after dealing with so many psycopg2 errors everytime I set up my mac, I've decided to use VMWareFusion running Ubuntu instead.

    Read the article

  • Cabal: Odd Error Message + Lack of Documentation

    - by voxcogitatio
    So I recently installed cabal (from the default binary of ArchLinux). I then tried to upgrade cabal as a user: cabal upgrade Cabal --user --prefix=$USER Resolving dependencies... cabal: fromFlag NoFlag. Use fromFlagOrDefault What I've already done: Googled the error message. Turned up the cabal source and little else. Looked at haskell-wiki on cabal-install. Looked through this guide. So basically I'm wondering: What's up with the error message? Could anyone point me in the direction of a cabal tutorial?

    Read the article

  • Generic Text Only printer driver mangles control codes

    - by Terry
    If an escape character (or most other characters < 0x20) is sent to the generic / text only printer it gets printed as a period. Using the code in the WinDDK is it possible to 'correct' this behaviour so that it passes it through unmodified? The general scenario for this is that some application ('user app') outputs a document to a windows printer. My application requires this data in plain text form and so what I do is run a generic / text only printer that talks to a virtual com port. This generally works fine except where the 'user app' outputs binary data to the print queue without using the correct mechanism (which seems to work fine on some printer drivers, such as the Epson POS ones, but not the generic / text only one). I've tried changing the print processor selection without success and also tried looking at the gtt files to see if I could readily map in these characters as though they were printable, but the minidriver tool won't let me do that. Any suggestions?

    Read the article

  • HTTP header for sending PDF, problem in Firefox

    - by David
    In windows when i save a pdf with firefox adobe reader plugin ocurs this problem. The file saved is: http://www.example.com/opendocument.php_doc=._docs_doc01 My headers are: header('Content-type: application/pdf'); //header('Content-Disposition: inline; filename=doc01.pdf'); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize($pdf)); Original call is: http://www.example.com/opendocument.php?doc=./docs/doc01.pdf I'm not interest on attachment header. I must open into the website, not download o external window. Any idea?

    Read the article

  • Copy Structure To Another Program

    - by Steven
    Long story, long: I am adding a web interface (ASPX.NET: VB) to a data acquisition system developed with LabVIEW which outputs raw data files. These raw data files are the binary representation of a LabVIEW cluster (essentially a structure). LabVIEW provides functions to instantiate a class or structure or call a method defined in a .NET DLL file. I plan to create a DLL file containing a structure definition and a class with methods to transfer the structure. When the webpage requests data, it would call a LabVIEW executable with a filename parameter. The LabVIEW code would instantiate the structure, populate the structure from the data file, then call the method to transfer the data back to the website. Long story, short: How do you recommend I transfer (copy) an instance of a structure from one .NET program to a VB.NET program? Ideas considered: sockets, temp file, xml file, config file, web services, CSV, some type of serialization, shared memory

    Read the article

  • XAMPP or MAMP on Mac OS X 10.6.2 (Snow Leopard)

    - by Steve
    I just bought a new MacBook Pro which comes with Snow Leopard 10.6.2 (Mac OS X 10.6.2). I am used to using XAMPP as my local development server on XP. Since Mac OS X is based on Unix, I was thinking on activating/installing all the necessary stuff as I would normally do on Linux. However, I am not quite ready to be playing around with the system at this point so having an external package would be a nice temporary solution I think. The question is whether I should go with MAMP or XAMPP. Does anybody have any suggestions? The Pro and Cons I suppose. As far as I know, Mac OS X comes with Apache2 and PHP5. Would MAMP or XAMPP modify the existing Apache and PHP installation? Any comments on how I should proceed? PS: Eventually I would use the default installation of Apache and PHP, and install a binary package of MySQL but time for development is an essence and I don't have time to familiarize myself with Mac OS X.

    Read the article

  • Bit manipulation, permutate bits

    - by triktae
    Hi. I am trying to make a loop that loops through all different integers where exactly 10 of the last 40 bits are set high, the rest set low. The reason is that I have a map with 40 different values, and I want to sum all different ways ten of these values can be multiplied. (This is just out of curiosity, so it's really the "bitmanip"-loop that is of interest, not the sum as such.) If I were to do this with e.g. 2 out of 4 bits, it would be easy to set all manually, 0011 = 7, 0101 = 5, 1001 = 9, 0110 = 6, 1010 = 10, 1100 = 12, but with 10 out of 40 I can't seem to find a method to generate these effectively. I tried, starting with 1023 ( = 1111111111 in binary), finding a good way to manipulate this, but with no success. I've been trying to do this in C++, but it's really the general method(if any) that is of interest. I did some googling, but with little success, if anyone has a good link, that would of course be appreciated too. :)

    Read the article

< Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >