Search Results

Search found 4126 results on 166 pages for 'bitwise operations'.

Page 65/166 | < Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >

  • Recommended textbook for machine-level programming?

    - by Norman Ramsey
    I'm looking at textbooks for an undergraduate course in machine-level programming. If the perfect book existed, this is what it would look like: Uses examples written in C or assembly language, or both. Covers machine-level operations such as two's-complement integer arithmetic, bitwise operations, and floating-point arithmetic. Explains how caches work and how they affect performance. Explains machine instructions or assembly instructions. Bonus if the example assembly language includes x86; triple bonus if it includes x86-64 (aka AMD64). Explains how C values and data structures are represented using hardware registers and memory. Explains how C control structures are translated into assembly language using conditional and unconditional branch instructions. Explains something about procedure calling conventions and how procedure calls are implemented at the machine level. Books I might be interested in would probably have the words "machine organization" or "computer architecture" in the title. Here are some books I'm considering but am not quite happy with: Computer Systems: A Programmer's Perspective by Randy Bryant and Dave O'Hallaron. This is quite a nice book, but it's a book for a broad, shallow course in systems programming, and it contains a great deal of material my students don't need. Also, it is just out in a second edition, which will make it expensive. Computer Organization and Design: The Hardware/Software Interface by Dave Patterson and John Hennessy. This is also a very nice book, but it contains way more information about how the hardware works than my students need. Also, the exercises look boring. Finally, it has a show-stopping bug: it is based very heavily on MIPS hardware and the use of a MIPS simulator. My students need to learn how to use DDD, and I can't see getting this to work on a simulator. Not to mention that I can't see them cross-compiling their code for the simulator, and so on and so forth. Another flaw is that the book mentions the x86 architecture only to sneer at it. I am entirely sympathetic to this point of view, but news flash! You guys lost! Write Great Code Vol I: Understanding the Machine by Randall Hyde. I haven't evaluated this book as thoroughly as the other two. It has a lot of what I need, but the translation from high-level language to assembler is deferred to Volume Two, which has mixed reviews. My students will be annoyed if I make them buy a two-volume series, even if the price of those two volumes is smaller than the price of other books. I would really welcome other suggestions of books that would help students in a class where they are to learn how C-language data structures and code are translated to machine-level data structures and code and where they learn how to think about performance, with an emphasis on the cache.

    Read the article

  • What is the need of collection framework in java?

    - by JavaUser
    Hi, What is the need of Collection framework in Java since all the data operations(sorting/adding/deleting) are possible with Arrays and moreover array is suitable for memory consumption and performance is also better compared with Collections. Can anyone point me a real time data oriented example which shows the difference in both(array/Collections) of these implementations. Thx

    Read the article

  • Python vs. Java performance (runtime speed)

    - by Bijan
    Ignoring all the characteristics of each languages and focusing SOLELY on speed, which language is better performance-wise? You'd think this would be a rather simple question to answer, but I haven't found a decent one. I'm aware that some types of operations may be faster with python, and vice-versa, but I cannot find any detailed information on this. Can anyone shed some light on the performance differences?

    Read the article

  • NSOperation inside NSOperationQueue not being executed

    - by Martin Garcia
    I really need help here. I'm desperate at this point. I have NSOperation that when added to the NSOperationQueue is not being triggered. I added some logging to see the NSOperation status and this is the result: Queue operations count = 1 Queue isSuspended = 0 Operation isCancelled? = 0 Operation isConcurrent? = 0 Operation isFinished? = 0 Operation isExecuted? = 0 Operation isReady? = 1 Operation dependencies? = 0 The code is very simple. Nothing special. LoadingConflictEvents_iPad *loadingEvents = [[LoadingConflictEvents_iPad alloc] initWithNibName:@"LoadingConflictEvents_iPad" bundle:[NSBundle mainBundle]]; loadingEvents.modalPresentationStyle = UIModalPresentationFormSheet; loadingEvents.conflictOpDelegate = self; [self presentModalViewController:loadingEvents animated:NO]; [loadingEvents release]; ConflictEventOperation *operation = [[ConflictEventOperation alloc] initWithParameters:wiLr.formNumber pWI_ID:wiLr.wi_id]; [queue addOperation:operation]; NSLog(@"Queue operations count = %d",[queue operationCount]); NSLog(@"Queue isSuspended = %d",[queue isSuspended]); NSLog(@"Operation isCancelled? = %d",[operation isCancelled]); NSLog(@"Operation isConcurrent? = %d",[operation isConcurrent]); NSLog(@"Operation isFinished? = %d",[operation isFinished]); NSLog(@"Operation isExecuted? = %d",[operation isExecuting]); NSLog(@"Operation isReady? = %d",[operation isReady]); NSLog(@"Operation dependencies? = %d",[[operation dependencies] count]); [operation release]; Now my operation do many things on the main method, but the problem is never being called. The main is never executed. The most weird thing (believe me, I'm not crazy .. yet). If I put a break point in any NSLog line or in the creation of the operation the main method will be called and everything will work perfectly. This have been working fine for a long time. I have been making some changes recently and apparently something screw things up. One of those changes was to upgrade the device to iOS 5.1 SDK (iPad). To add something, I have the iPhone (iOS 5.1) version of this application that use the same NSOperation object. The difference is in the UI only, and everything works fine. Any help will be really appreciated. Regards,

    Read the article

  • Built-in precedence for Expression Trees?

    - by jdk
    I'm unable to find the .NET FCL built-in concept of precedence to leverage while constructing Expression Trees. Ref System.Linq.Expressions Namespace. Is this something that must be handled manually in code, or is it somehow implicit and I'm not recognizing it, maybe through helper methods or classes? I want to apply it to math operations to ensure 3 + 5 * 10 results in 53 instead of 80.

    Read the article

  • High speed matrix manipulation in c#?

    - by Donnie
    I'm working on some image manipulation code in c# and need to do some matrix operations (specifically 2D convolution). I have the code written in matlab which uses the conv2 function ... is there a library for C# / .NET that does good high-speed matrix manipulations? I'd be fine if it requires some specific GPU and does the matrix math on-GPU if that's what it takes.

    Read the article

  • ToolStripMenuItems and Drag and Drop

    - by Paul
    I need to implement "Drag and Drop" operations for the ToolStripMenuItems. Everything works fine only with ToolStripMenuItems on the first level. I mean I can't move menu item from a submenu to other one. But I can move submenu to top-level menu. I noticed that DragEnter event isn't arise for submenus. Initialization is the same for all menu-items. What is wrong? :(

    Read the article

  • implement bank using python programming

    - by prajakta
    Write software for a bank. The program should be menu driven with the facility for bank employees to perform various operations. It should be written using all concepts of Object Oriented programming. You should be able to save your data in a file and read it back (because the bank people will shut down their computers when they go home :p ) Guidelines: The program may select to implement classes like Bank, Account, Savings Account, Fixed Deposit account, Customer, Depositor, Borrower, Transaction, etc.

    Read the article

  • How do I use an Entity Framework 4 model without a real database?

    - by Ivan
    I don't need any data to be stored. I'd like an application to start, create an Entity Framework entities container based on the model I've designed but having no data records in it, then generate some data (from user input and other input sources), work with it and discard all the data on close, without propagating any data operations made with EF contect to a real database hosted on server or in a file. How do I implement such a pattern? I use Entity Framework 4 and Visual Studio 2010.

    Read the article

  • Pointers to threads

    - by viswanathan
    Suppose i have pointer to a thread like this CWinThread *m_pThread = AfxBeginThread(StartThread, this, THREAD_PRIORITY_NORMAL, 0, 0); Now in my StartThread function assume i did all operations and the function returned like this UINT CClassThread::StartThread(LPVOID pVoid) { return true; } Will my m_pThread be invalid when the return statement is executed?

    Read the article

  • how to save poiner in C

    - by JosiP
    Hi In my app, for debugging i want to save pointer, before i do other operations on it eg: void foo(...) { /* suppose ptr1 points to one of my strcuts */ ptr1 = NULL; /* before that ptr1=NULL i want to save value of that pointer - how to do it ? */ } thx for any help

    Read the article

  • Re-adjusting a binary heap after removing the minimum element

    - by BeeBand
    After removing the minimum element in a binary heap, i.e. after removing the root, why is the last leaf then assigned to the root and sifted down? Why not take the lesser child of what used to be the root and just keep sifting up all the children? Isn't this the same amount of operations, so why is the "sift down" method preferred?

    Read the article

  • Simple 3D Editor/Viewer

    - by mnn
    I'm looking for an application, which could be able to load bunch of points in space, render them and be able to simple 3D operations (select such point, rotate & move viewport). The source has to be available, as I want to use it as basis for my own application.

    Read the article

  • Problem in databinding a dictionary in ListView combo-box column.

    - by Ashish Ashu
    I have a listview of which itemsource is set to my custom collection, let's say MyCollection. The code below is not full code , it's just a code snippets to explain the problem. class Item : INotifyPropertyChanged { Options _options; public Options OptionProp { get { return _options; } set { _options = value; OnPropertyChanged ("OptionProp");} } string _Name; public string NameProp { get { return _Name; } set { _Name = value; OnPropertyChanged ("NameProp");} } } class Options : Dictionary<string,string> { public Options() { this.Clear(); this.Add("One" , "1" ); this.Add("Two" , "2" ); this.Add("Three" , "3" ); } } MyCollection in my viewModel class viewModel { ObservableCollection<Item> **MyCollection**; KeyValuePair<sting,string> **SelectedOption**; } The listview Item Source is set to my MyCollection. <ListView ItemSource = MyCollectoin> I Listview contains two columns of which I have defined a datatemplats in the listview. First column is a combo-box of which Itemsource is set to Options ( defined above ) Second column is a simple textblock to display Name. Problem 1. I have defined a datatemplate for first column in which I have a combo box , I have set the Itemsource =**MyCollection** and SelectedItem = SelectedOption of the combo-box. User can perform following operations in the listview: Add ( Add the row in the listview ) Move Up ( Move row up in the listview ) Move Down ( Move down the item in the listview ) .Now when I add the row in the listview , the combo-box selected index is always comes to -1 (first column). However the combo box contains options One, Two and Three. Also, I have initialized the SelectedOption to contain the first item, i:e One. problem 2. . Let suppose, I have added a single row in a listview and I have selected Option "one" in the combo box manually. Now when I perform Move Up or Move Down operations the selected index of a combo box is again set to -1. In the Move Up or Move Down operation , I am calling MoveUp and MoveDown methods of the Observable collection. Probelm 3 How to serialize the entire collection in XML. Since I can't serialize the Dictionary and KeyValue Pair. I have to restore the state of the listview.

    Read the article

  • Value object or not for 3d points ?

    - by Stefano Borini
    I need to develop a geometry library in python, describing points, lines and planes in 3d space, and various geometry operations. Related to my previous question. The main issue in the design is if these entities should have identity or not. I was wondering if there's a similar library out there (developed in another language) to take inspiration from, what is the chosen design, and in particular the reason for one choice vs. the other.

    Read the article

  • Database time data retrieval, time based queries

    - by Raphael Pineda
    I am new to time manipulation or time arithmetic operations and am currently developing a navigation system with Web server based information and currently I have this Database that contains a table peek hours whose columns are id, start_time, end_time , edge_id, day_of_the_week, edge_weight ------------------------------------------------------------------------ | Peek Hours | ------------------------------------------------------------------------ | | | | | | | | id | start_time | end_time | edge_id | day_of_the_week | edge_weight | | | | | | | | ------------------------------------------------------------------------ I am using PHP as a webservice and so based on the current time i want to get all the records that would fit this equation start_time< current_time < end_time

    Read the article

  • Expose subset of a class - design question

    - by thanikkal
    Suppose i have a product class with about close to 100 properties. Now for some operations (Say tax calculation) i dont really need this bulky product type, rather only a subset that has price related properties. I am not sure if i should create different snap shots(class) of products that just has the properties that i am interested in. what would be the ideal approach so that i don't unnecessarily pass around unsought fluff? Thanks in advance.

    Read the article

  • How can I access x:Name from Code Behind?

    - by viky
    I have a datagrid in which I am using DataGridTemplateColumn and DataGridTextColumn. I want to access these columns at runtime so I have assigned x:Name property to them. But I was not getting that value in code behind, so I looked for DataGrid and then read objects by iterating through DataGrid.Columns. How can I read x:Name property from that object in C#? I need this to perform some specific operations with particular columns at runtime.

    Read the article

  • What are the limitations of assembler? (NASM)

    - by citronas
    Is there a technical limitation of what kind of programs I can write with assembler (NASM)? For now I've only seem some program that do arithmetic operations, like adding two numbers. Is it possible to write complex assembler programs, that provide a GUI, access the file system, plays sounds et cetera? I know I wouldn't write such programs, but I'm curious, if there are technical limitations on what kind of programs I can write with assembler.

    Read the article

  • What transaction manager should I use for JBDC template When using JPA ?

    - by Sajid
    I am using standard JPA transaction manager for my JPA transactions. However, now I want to add some JDBC entities which will share the same 'datasource'. How can I make the JDBC operations transactional with spring transaction? Do I need to swith to JTA transaction managers? Is it possible to use both JPA & JDBC transactional service with same datasource? Even better, is it possible to mix these two transactions?

    Read the article

  • SQL Server Merge statement issue

    - by George2
    Hello everyone, I am learning and using SQL Server 2008 new Merge statement, merge statement will compare/operate source table and destination table row by row ("operate" I mean operations performed for when matched or not-matched conditions). My question is whether the whole merge process will be one transaction or each row comparison/operation will be one transaction? Appreciate if any document to prove it. thanks in advance, George

    Read the article

< Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >