Search Results

Search found 19563 results on 783 pages for 'binary search'.

Page 131/783 | < Previous Page | 127 128 129 130 131 132 133 134 135 136 137 138  | Next Page >

  • Windows search is skipping folders

    - by natli
    I was trying to find where Electrum stored its wallet files, so I went to C:\ and entered wallet.dat in the search bar (top right), which is supposed to search through the entire C drive (right?), but it didn't find anything. Later, I manually found the wallet.dat file in C:\Users\Admin\AppData\Roaming\Electrum_SysFiles\1.1\C_\ElectrumPY. Searching for wallet.dat in C:\ still comes up empty. Why is this?

    Read the article

  • Search for text of register in function

    - by dotancohen
    I am writing a VIM function which should search for the text found in register a. In VIM I would start a search with / then press Ctrlr and finish off with a then Return. However this line in the function is not working: execute "/<c-r>a<Return>" It is throwing this error: E486: Pattern not found: <c-r>a<Return> How do I enter the literal Ctrlr into the function? Thanks.

    Read the article

  • HTTP Headers for Unknown Content-Length

    - by jocull
    I am currently trying to stream content out to the web after a trans-coding process. This usually works fine by writing binary out to my web stream, but some browsers (specifically IE7, IE8) do not like not having the Content-Length defined in the HTTP header. I believe that "valid" headers are supposed to have this set. What is the proper way to stream content to the web when you have an unknown Content-Length? The trans-coding process can take awhile, so I want to start streaming it out as it completes.

    Read the article

  • InternetReadFile() corrupting donwloads C

    - by Lienau
    I'm able to download text documents (.html, .txt, etc) but I can't download images or exe's. I'm pretty sure that this is because I'm using a char, and thoes files are binary. I know that in C# I would use a byte. But what data-type would I use in this case? char buffer[1]; DWORD dwRead; FILE * pFile; pFile = fopen(file,"w"); while (InternetReadFile(hRequest, buffer, 1, &dwRead)) { if(dwRead != 1) break; fprintf(pFile,"%s",buffer); } fclose(pFile);

    Read the article

  • Convert 2 bytes to a number

    - by Vaccano
    I have a control that has a byte array in it. Every now and then there are two bytes that tell me some info about number of future items in the array. So as an example I could have: ... ... Item [4] = 7 Item [5] = 0 ... ... The value of this is clearly 7. But what about this? ... ... Item [4] = 0 Item [5] = 7 ... ... Any idea on what that equates to (as an normal int)? I went to binary and thought it may be 11100000000 which equals 1792. But I don't know if that is how it really works (ie does it use the whole 8 items for the byte). Is there any way to know this with out testing? Note: I am using C# 3.0 and visual studio 2008

    Read the article

  • MinGW Doesn't Generate an Object File When Compiling

    - by Nathan Campos
    I've just bought a new laptop for me on the travel, then on my free time, I've started to test MinGW on it by trying to compile my own OS that is written in C++, then I've created all the files needed and the kernel.cpp: extern "C" void _main(struct multiboot_data* mbd, unsigned int magic); void _main( struct multiboot_data* mbd, unsigned int magic ) { char * boot_loader_name =(char*) ((long*)mbd)[16]; /* Print a letter to screen to see everything is working: */ unsigned char *videoram = (unsigned char *) 0xb8000; videoram[0] = 65; /* character 'A' */ videoram[1] = 0x07; /* forground, background color. */ } And tried to compile it with g++ G: g++ -o C:\kernel.o -c kernel.cpp -Wall -Wextra -Werror -nostdlib -nostartfiles -nodefaultlibs kernel.cpp: In function `void _main(multiboot_data*, unsigned int)': kernel.cpp:8: warning: unused variable 'boot_loader_name' kernel.cpp: At global scope: kernel.cpp:4: warning: unused parameter 'magic' G: But it don't create any binary file at C:/. What can I do?

    Read the article

  • Efficient heaps in purely functional languages

    - by Kim
    As an exercise in Haskell, I'm trying to implement heapsort. The heap is usually implemented as an array in imperative languages, but this would be hugely inefficient in purely functional languages. So I've looked at binary heaps, but everything I found so far describes them from an imperative viewpoint and the algorithms presented are hard to translate to a functional setting. How to efficiently implement a heap in a purely functional language such as Haskell? Edit: By efficient I mean it should still be in O(n*log n), but it doesn't have to beat a C program. Also, I'd like to use purely functional programming. What else would be the point of doing it in Haskell?

    Read the article

  • Turning Separate iPad/iPhone Targets into Universal App

    - by ckrames1234
    I, when I got my hands on the iPad SDK Beta, thought the universal binary would be to much work, so i opted for the separate targets. I realized halfway through making the iPad portion of my app, that making a universal application would be easy as pie. The issue is, I can't use Apple's option to convert my iPhone Target to Universal. The only thing that I would need to do in the Info.plist of the universal application would be to set a different MainWindow. How could I approach the problem? Is there a workaround to get Apple's way to work (maybe by deleting the existing iPad Target)? Is there a good way to do it manually? If any of you have experience on this subject, help would be much appreciated Thanks, Conrad Kramer

    Read the article

  • CORE Keygen Problem

    - by David Schiefer
    Hi, after fighting several versions of the CoreKeyGen created by some "minamoto" guy, a new version has appeared. This version is particularly sophisticated and seems to modify the actual binary itself, using a dylib known as libbassmod.dylib (this is in the keygen's mac os folder). Has anyone ever come across this & can give me advice on how to stop it? If so, how can I stop the keygen? it seems like the library can see what calls my app makes and stop them somehow, I'm not too sure.

    Read the article

  • Building elf within Eclipse within Windows

    - by BSchlinker
    Hey guys, I'm having trouble building an Elf file within Eclipse within Windows. It seems that everytime I build, a PE / portable executable for windows is created. I've gone into the Binary Parser section and checked Elf Parser while making sure that everything else is unchecked. However, I continue to end up with a PE which I cannot run on Linux. For clarification, I'm using the Linux GCC toolchain within Eclipse. I've attempted a reinstall of Cygwin -- still experiencing the same issues. Any ideas? Thanks

    Read the article

  • Erlang bit indexing

    - by GTDev
    I am currently trying to learn erlang and what I am trying to do is to perform an operation on specific indices of an array stored in a bit array or int. If there is a 0 in a position, the index into the array at that position is not used. So envision the following: Example the array is: [1, 3, 5, 42, 23] My bit array is: 21 = 10101 in binary so I'm using indicies 1,3,5 so I'm calling a function on [1, 5, 23] my function is of the form my_function(Array, BitArray) -> SubArray = get_subarray_from_bitarray(Array, BitArray), process_subarray(SubArray). And I need help with the get_subarray_from_bitarray(). I know erlang has special syntax around bit strings (something like <<) so is there an efficient way of indexing into the bit array to get the indicies?

    Read the article

  • InternetReadFile() corrupting downloads in C

    - by Lienau
    I'm able to download text documents (.html, .txt, etc) but I can't download images or exe's. I'm pretty sure that this is because I'm using a char, and those files are binary. I know that in C# I would use a byte. But what data-type would I use in this case? char buffer[1]; DWORD dwRead; FILE * pFile; pFile = fopen(file,"w"); while (InternetReadFile(hRequest, buffer, 1, &dwRead)) { if(dwRead != 1) break; fprintf(pFile,"%s",buffer); } fclose(pFile);

    Read the article

  • WIX: Using a temporary file during install

    - by madbadger
    Hello! I am writing a WIX installer and I have a following requirement: During installation, I need to pass an absolute path to a file (lets call it A) included in my installer to a COM component, which already exists on the hard drive and is a part of another program. I have already written an appropriate Custom Action which expects a path to the file A. I don't want to include A as a file installed in the Program Files folder and removed during the uninstallation process. Instead, I would like to put A only temporary on the hard drive, call my Custom Action which will cause the COM component to use the content of A, and then remove A from disk. Is there an easy way to accomplish this goal? I have tried to utilize the Binary Table and store A there, however I don't know how to reference A using absolute path. I know I could put A outside of MSI file but I would like to keep every file installer needs in a single MSI. Any help would be appreciated.

    Read the article

  • How to create real-life robots?

    - by Click Upvote
    Even before I learnt programming I've been fascinated with how robots could work. Now I know how the underlying programming instructions would be written, but what I don't understand is how those intructions are followed by the robot. For example, if I wrote this code: object=Robot.ScanSurroundings(300,400); if (Objects.isEatable(object)) { Robot.moveLeftArm(300,400); Robot.pickObject(object); } How would this program be followed by the CPU in a way that would make the robot do the physical action of looking to the left, moving his arm, and such? Is it done primarily in binary language/ASM? Lastly, where would i go if I wanted to learn how to create a robot?

    Read the article

  • Python: Unpack arbitary length bits for database storage

    - by sberry2A
    I have a binary data format consisting of 18,000+ packed int64s, ints, shorts, bytes and chars. The data is packed to minimize it's size, so they don't always use byte sized chunks. For example, a number whose min and max value are 31, 32 respectively might be stored with a single bit where the actual value is bitvalue + min, so 0 is 31 and 1 is 32. I am looking for the most efficient way to unpack all of these for subsequent processing and database storage. Right now I am able to read any value by using either struct.unpack, or BitBuffer. I use struct.unpack for any data that starts on a bit where (bit-offset % 8 == 0 and data-length % 8 == 0) and I use BitBuffer for anything else. I know the offset and size of every packed piece of data, so what is going to be the fasted way to completely unpack them? Many thanks.

    Read the article

  • Trying to figure out how to check a checksum

    - by rross
    I'm trying to figure out how to check a checksum. My message looks like this: 38 0A 01 12 78 96 FE 00 F0 FB D0 FE F6 F6 being the checksum. I convert the preceding 12 sets in to binary and then add them together. Then attempt a bitwise operation to apply the 2s complement. I get a value of -1562, but I can't convert it back to hex to check if the value is correct. Can someone point me in the right direction? my code: string[] hexValue = {"38", "0A", "01", "12", "78", "96", "FE", "00", "F0", "FB", "D0", "FE"}; int totalValue = 0; foreach(string item in hexValue) { totalValue += Int32.Parse(item, NumberStyles.HexNumber); } int bAfter2sC = ~totalValue + 1; Console.Write("answer :" + bAfter2sC + "\n");

    Read the article

  • Building Boost with LSB C++ Compiler

    - by Alex Farber
    I want to build my program with LSB C++ Compiler from the Linux Standard Base http://www.linuxfoundation.org/collaborate/workgroups/lsb. Program depends on the Boost library, built with gcc 4.4 version. Compilation fails. Is it possible to build the Boost library with LSB C++ Compiler? Alternatively, is it possible to build the Boost library with some old gcc version, what version is recommended? My final goal is to get my executable and third-party Boost libraries running on most Linux distributions. Generally, what can be done to get better binary compatibility for Linux distributions, developing C++ closed-source application depending on the Boost library?

    Read the article

  • C# Convert negative int to 11 bits

    - by Klemenko
    I need to convert numbers in interval [–1024, 1016]. I'm converting to 11 bits like that: string s = Convert.ToString(value, 2); //Convert to binary in a string int[] bits = s.PadLeft(11, '0') // Add 0's from left .Select(c => int.Parse(c.ToString())) // convert each char to int .ToArray(); // Convert IEnumerable from select to Array This works perfectly for signed integers [0, 1016]. But for negative integers I get 32 bits result. Do you have any idea how to convert negative integers to 11 bits array?

    Read the article

  • Why is TreeSet<T> an internal type in .NET?

    - by Justin Niessner
    So, I was just digging around Reflector trying to find the implementation details of HashSet (out of sheer curiosity based on the answer to another question here) and noticed the following: internal class TreeSet<T> : ICollection<T>, IEnumerable<T>, ICollection, IEnumerable, ISerializable, IDeserializationCallback Without looking too deep into the details, it looks like a Self-Balancing Binary Search Tree. My question is, is there anybody out there with the insight as to why this class is internal? Is it simply because the other collection types use it internally and hide the complexities of a BST from the general masses...or am I way off base?

    Read the article

  • Tree + Recursion..

    - by RBA
    Hi.. I came across an article on Binary Trees Search . It uses intensive Recursive Algorithms.. I am just so confused with these stuff.. Please guide my path so as I understand these problems at ease, or any good website to read about recursion first and then solving these problems.. Please share your experience on it.. Its very urgent, and I want to learn these concepts as soon as possible.. Thankss... Regards.

    Read the article

  • VB.NET encoding one character wrong

    - by Nick Spiers
    I have a byte array that I'm encoding to a string: Private Function GetKey() As String Dim ba() As Byte = {&H47, &H43, &H44, &H53, &H79, &H73, &H74, &H65, &H6D, &H73, &H89, &HA, &H1, &H32, &H31, &H36} Dim strReturn As String = Encoding.ASCII.GetString(ba) Return strReturn End Function Then I write that to a file via IO.File.AppendAllText. If I open that file in 010 Editor (to view the binary data) it displays as this: 47 43 44 53 79 73 74 65 6D 73 3F 0A 01 32 31 36 The original byte array contained 89 at position 11, and the encoded string contains 3F. If I change my encoding to Encoding.Default.GetString, it gives me: 47 43 44 53 79 73 74 65 6D 73 E2 80 B0 0A 01 32 31 36 Any help would be much appreciated!

    Read the article

  • Dictionary not deserializing

    - by Shadow
    I'm having a problem where one Dictionary in my project is either not serializing or not deserializing. After deserializing, the data I serialized is simply not in the object. Here's the relevant snip of the class being serialized: class Person : ISerializable { private Dictionary<Relation,List<int>> Relationships = new Dictionary<Relation,List<int>>(); public Person(SerializationInfo info, StreamingContext context) { this.Relationships = (Dictionary<Relation, List<int>>) info.GetValue("Relationships", typeof(Dictionary<Relation, List<int>>)); } public void GetObjectData(SerializationInfo info, StreamingContext context) { info.AddValue("Relationships", this.Relationships); } } Note, this is binary serialization. Everything else in the project serializes and deserialzes correctly.

    Read the article

  • Search like google

    - by Rajanikant
    I have a task to make a search module in which i have database users and tablename userProfile and i want to search profile when i entered text in text box for ex. if i entered "I am looking for MBA in delhi" or 'mba information in delhi' it will displayed all user registered expertise as mba and city in delhi . this will be like job portal or any social networking portal my database is -- phpMyAdmin SQL Dump -- version 2.8.1 -- http://www.phpmyadmin.net -- Host: localhost -- Generation Time: May 01, 2010 at 10:58 AM -- Server version: 5.0.21 -- PHP Version: 5.1.4 -- Database: users -- -- Table structure for table userProfile CREATE TABLE userprofile ( id int(11) NOT NULL auto_increment, name varchar(50) collate latin1_general_ci NOT NULL, expertise varchar(50) collate latin1_general_ci NOT NULL, city varchar(50) collate latin1_general_ci NOT NULL, state varchar(50) collate latin1_general_ci NOT NULL, discription varchar(500) collate latin1_general_ci NOT NULL, PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=3 ; -- -- Dumping data for table userProfile INSERT INTO userProfile VALUES (1, 'a', 'MBA HR', 'Delhi', 'Delhi', 'Fortune is top management college in Delhi, Best B-schools in India providing business studies and management training. FIIB is Delhi based most ranked ...'); INSERT INTO userProfile VALUES (2, 'b', 'MBA marketing', 'Delhi', 'Delhi', 'Fortune is top management college in Delhi, Best B-schools in India providing business studies and management training. FIIB is Delhi based most ranked ...'); and search.php page <?php include("config.php"); include("class.search.php"); $br=new search(); if($_POST['searchbutton']) { $str=$_POST['textfield']; $brstr=$br->breakkey($str); } ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Untitled Document</title> </head> <body> <table width="100%" border="0"> <form name="frmsearch" method="post"> <tr> <td width="367">&nbsp;</td> <td width="300"><label> <input name="textfield" type="text" id="textfield" size="50" /> </label></td> <td width="294"><label> <input type="submit" name="searchbutton" id="button" value="Search" /> </label></td> </tr></form> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> </table> </body> </html> and config.php is <?php error_reporting(E_ALL); $host="localhost"; $username="root"; $password=""; $dbname="users"; $con=mysql_connect($host,$username,$password) or die("could not connect database"); $db=mysql_select_db($dbname,$con) or die("could not select database"); ?> and class.search.php is <?php class search { function breakkey($key) { global $db; $words=explode(' ',$key); return $words; } function searchitem($perm) { global $db; foreach($perm as $k=>$v) { $sql="select * from users" } } } ?>

    Read the article

  • How to search Multiple Sites using Lucene Search engine API?

    - by Wael Salman
    Hope that someone can help me as soon as possible :-) I would like to know how can we search Multiple Sites using Lucene??! (All sites are in one index). I have succeeded to search one website , and to index multiple sites, however I am not able to search all websites. Consider this method that I have: private void PerformSearch() { DateTime start = DateTime.Now; //Create the Searcher object string strIndexDir = Server.MapPath("index") + @"\" + mstrURL; IndexSearcher objSearcher = new IndexSearcher(strIndexDir); //Parse the query, "text" is the default field to search Query objQuery = QueryParser.Parse(mstrQuery, "text", new StandardAnalyzer()); //Create the result DataTable mobjDTResults.Columns.Add("title", typeof(string)); mobjDTResults.Columns.Add("path", typeof(string)); mobjDTResults.Columns.Add("score", typeof(string)); mobjDTResults.Columns.Add("sample", typeof(string)); mobjDTResults.Columns.Add("explain", typeof(string)); //Perform search and get hit count Hits objHits = objSearcher.Search(objQuery); mintTotal = objHits.Length(); //Create Highlighter QueryHighlightExtractor highlighter = new QueryHighlightExtractor(objQuery, new StandardAnalyzer(), "<B>", "</B>"); //Initialize "Start At" variable mintStartAt = GetStartAt(); //How many items we should show? int intResultsCt = GetSmallerOf(mintTotal, mintMaxResults + mintStartAt); //Loop through results and display for (int intCt = mintStartAt; intCt < intResultsCt; intCt++) { //Get the document from resuls index Document doc = objHits.Doc(intCt); //Get the document's ID and set the cache location string strID = doc.Get("id"); string strLocation = ""; if (mstrURL.Substring(0,3) == "www") strLocation = Server.MapPath("cache") + @"\" + mstrURL + @"\" + strID + ".htm"; else strLocation = doc.Get("path") + doc.Get("filename"); //Load the HTML page from cache string strPlainText; using (StreamReader sr = new StreamReader(strLocation, System.Text.Encoding.Default)) { strPlainText = ParseHTML(sr.ReadToEnd()); } //Add result to results datagrid DataRow row = mobjDTResults.NewRow(); if (mstrURL.Substring(0,3) == "www") row["title"] = doc.Get("title"); else row["title"] = doc.Get("filename"); row["path"] = doc.Get("path"); row["score"] = String.Format("{0:f}", (objHits.Score(intCt) * 100)) + "%"; row["sample"] = highlighter.GetBestFragments(strPlainText, 200, 2, "..."); Explanation objExplain = objSearcher.Explain(objQuery, intCt); row["explain"] = objExplain.ToHtml(); mobjDTResults.Rows.Add(row); } objSearcher.Close(); //Finalize results information mTsDuration = DateTime.Now - start; mintFromItem = mintStartAt + 1; mintToItem = GetSmallerOf(mintStartAt + mintMaxResults, mintTotal); } as you can see that I use the site URL 'mstrURL' when I create the search object string strIndexDir = Server.MapPath("index") + @"\" + mstrURL; How can I do the same when I want to search multiple sites?? Actually I am using the code from http://www.keylimetie.com/blog/2005/8/4/lucenenet/

    Read the article

< Previous Page | 127 128 129 130 131 132 133 134 135 136 137 138  | Next Page >