Search Results

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

Page 9/166 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Column-oriented DBMS and JOIN operations

    - by André
    From some of the research I've done on NoSQL, column-oriented databases (like HBase or Cassandra) seem to solve the problem of costly JOIN operations, but I don't get how this approach solves this problem. Can anyone explain it to me and/or link me to interesting documentation regarding this area? Thanks

    Read the article

  • automate operations within a Virtualbox machine

    - by samb
    Hi, I'm Having some trouble in a vm that seems to occur only once in a hundred during shutdown/reboot. To help the debug, I'm thinking to write a script that runs on my desktop, which starts the vm and automate operations for a huge number of times (keyboard key pressed) whithin it. (VirtualBox preferred). It's just exactly how a script using the expect lib would do with a program in command line. I'm not sure it's possible, but anyway, if anyone has an idea... Cheers

    Read the article

  • Approximate timings for various operations on a "typical desktop PC" anno 2010

    - by knorv
    In the article "Teach Yourself Programming in Ten Years" Peter Norvig (Director of Research, Google) gives the following approximate timings for various operations on a typical 1GHz PC back in 2001: execute single instruction = 1 nanosec = (1/1,000,000,000) sec fetch word from L1 cache memory = 2 nanosec fetch word from main memory = 10 nanosec fetch word from consecutive disk location = 200 nanosec fetch word from new disk location (seek) = 8,000,000 nanosec = 8 millisec What would the corresponding timings be for your definition of a typical PC desktop anno 2010?

    Read the article

  • Meaning of message "operations coalesced during safepoint"

    - by elec
    A java app runs with the following flag: -XX:+PrintSafepointStatistics, and then produces the following line on the standard output console: 2 VM operations coalesced during safepoint Anyone cares to explain what this mean ? More generally - is there a Java reference manual somewhere detailling all JVM flags, their use and, most importantly, the expected output, with relevant explanations ?

    Read the article

  • File Operations in Android NDK

    - by EnderX
    I am using the Android NDK to make an application primarily in C for performance reasons, but it appears that file operations such as fopen do not work correctly in Android. Whenever I try to use these functions, the application crashes. How do I create/write to a file with the Android NDK?

    Read the article

  • C: performance of assignments, binary operations, et cetera...

    - by Shinka
    I've heard many things about performance in C; casting is slow compared to normal assignments, functional call is slow, binary operation are much faster than normal operations, et cetera... I'm sure some of those things are specific to the architecture, and compiler optimization might make a huge difference, but I would like to see a chart to get a general idea what I should do and what I should avoid to write high-performance programs. Is there such a chart (or a website, a book, anything) ?

    Read the article

  • C#: Perform Operations on GPU, not CPU (Calculate Pi)

    - by Alex
    Hello, I've recently read a lot about software (mostly scientific/math and encryption related) that moves part of their calculation onto the GPU which causes a 100-1000 (!) fold increase in speed for supported operations. Is there a library, API or other way to run something on the GPU via C#? I'm thinking of simple Pi calculation. I have a GeForce 8800 GTX if that's relevant at all (would prefer card independent solution though). Any hints are appreciated!

    Read the article

  • Effect of suffixes in memory to cache operations

    - by tur1ng
    In x86 GNU Assembler there are different suffixes for memory related operations. E.g.: movb, movs, movw, movl, movq, movt(?) Now my question is the following: Does the suffix has ANY effect on how the processor is getting the data out of main memory or will always be one or more 32-bit (x86) chunks loaded into the cache ? What are the effects beside the memory access?

    Read the article

  • Effect of suffixes in memory operations

    - by tur1ng
    In x86 GNU Assembler there are different suffixes for memory related operations. E.g.: movb, movs, movw, movl, movq, movt(?) Now my question is the following: Does the suffix has ANY effect on how the processor is getting the data out of main memory or will always be one or more 32-bit (x86) chunks loaded into the cache ? What are the effects beside the memory access?

    Read the article

  • CSG operations on implicit surfaces with marching cubes

    - by Mads Elvheim
    I render isosurfaces with marching cubes, (or perhaps marching squares as this is 2D) and I want to do set operations like set difference, intersection and union. I thought this was easy to implement, by simply choosing between two vertex scalars from two different implicit surfaces, but it is not. For my initial testing, I tried with two spheres, and the set operation difference. i.e A - B. One sphere is moving and the other one is stationary. Here's the approach I tried when picking vertex scalars and when classifying corner vertices as inside or outside. The code is written in C++. OpenGL is used for rendering, but that's not important. Normal rendering without any CSG operations does give the expected result. void march(const vec2& cmin, //min x and y for the grid cell const vec2& cmax, //max x and y for the grid cell std::vector<vec2>& tri, float iso, float (*cmp1)(const vec2&), //distance from stationary sphere float (*cmp2)(const vec2&) //distance from moving sphere ) { unsigned int squareindex = 0; float scalar[4]; vec2 verts[8]; /* initial setup of the grid cell */ verts[0] = vec2(cmax.x, cmax.y); verts[2] = vec2(cmin.x, cmax.y); verts[4] = vec2(cmin.x, cmin.y); verts[6] = vec2(cmax.x, cmin.y); float s1,s2; /********************************** ********For-loop of interest****** *******Set difference between **** *******two implicit surfaces****** **********************************/ for(int i=0,j=0; i<4; ++i, j+=2){ s1 = cmp1(verts[j]); s2 = cmp2(verts[j]); if((s1 < iso)){ //if inside sphere1 if((s2 < iso)){ //if inside sphere2 scalar[i] = s2; //then set the scalar to the moving sphere } else { scalar[i] = s1; //only inside sphere1 squareindex |= (1<<i); //mark as inside } } else { scalar[i] = s1; //inside neither sphere } } if(squareindex == 0) return; /* Usual interpolation between edge points to compute the new intersection points */ verts[1] = mix(iso, verts[0], verts[2], scalar[0], scalar[1]); verts[3] = mix(iso, verts[2], verts[4], scalar[1], scalar[2]); verts[5] = mix(iso, verts[4], verts[6], scalar[2], scalar[3]); verts[7] = mix(iso, verts[6], verts[0], scalar[3], scalar[0]); for(int i=0; i<10; ++i){ //10 = maxmimum 3 triangles, + one end token int index = triTable[squareindex][i]; //look up our indices for triangulation if(index == -1) break; tri.push_back(verts[index]); } } This gives me weird jaggies: It looks like the CSG operation is done without interpolation. It just "discards" the whole triangle. Do I need to interpolate in some other way, or combine the vertex scalar values? I'd love some help with this. A full testcase can be downloaded HERE

    Read the article

  • Unary NOT/Integersize of the architecture

    - by sid_com
    From "Mastering Perl/Chapter 16/Bit Operators/Unary NOT,~": The unary NOT operator (sometimes called the complement operator), ~, returns the bitwise negation, or 1's complement, of the value, based on integer size of the architecture Why does the following script output two different values? #!/usr/local/bin/perl use warnings; use 5.012; use Config; my $int_size = $Config{intsize} * 8; my $value = 0b1111_1111; my $complement = ~ $value; say length sprintf "%${int_size}b", $value; say length sprintf "%${int_size}b", $complement; Output: 32 64

    Read the article

  • Boolean Not operator in VBScript

    - by Lumi
    Consider the following two conditionals (involving bitwise comparisons) in VBScript: If 1 And 3 Then WScript.Echo "yes" Else WScript.Echo "no" If Not(1 And 3) Then WScript.Echo "yes" Else WScript.Echo "no" Prints first yes, then no, right? cscript not.vbs Wrong! It prints yes twice! Wait a second, the Not operator is supposed to perform logical negation on an expression. The logical negation of true is false, as far as I know. Must I conclude that it doesn't live up to that promise? How and why and what is going on here? What is the rationale, if any?

    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

  • Help translating Reflector deconstruction into compilable code

    - by code poet
    So I am Reflector-ing some framework 2.0 code and end up with the following deconstruction fixed (void* voidRef3 = ((void*) &_someMember)) { ... } This won't compile due to 'The right hand side of a fixed statement assignment may not be a cast expression' I understand that Reflector can only approximate and generally I can see a clear path but this is a bit outside my experience. Question: what is Reflector trying to describe to me? Update: Am also seeing the following fixed (IntPtr* ptrRef3 = ((IntPtr*) &this._someMember)) Update: So, as Mitch says, it is not a bitwise operator, but an addressOf operator. Question is now: fixed (IntPtr* ptrRef3 = &_someMember) fails with an 'Cannot implicitly convert type 'xxx*' to 'System.IntPtr*'. An explicit conversion exists (are you missing a cast?)' compilation error. So I seemed to be damned if I do and damned if I dont. Any ideas?

    Read the article

  • using Spring JdbcTemplate for multiple database operations

    - by Joel Carranza
    I like the apparent simplicity of JdbcTemplate but am a little confused as to how it works. It appears that each operation (query() or update()) fetches a connection from a datasource and closes it. Beautiful, but how do you perform multiple SQL queries within the same connection? I might want to perform multiple operations in sequence (for example SELECT followed by an INSERT followed by a commit) or I might want to perform nested queries (SELECT and then perform a second SELECT based on result of each row). How do I do that with JdbcTemplate. Am I using the right class?

    Read the article

  • Asynchronous operations performance

    - by LicenseQ
    One of the features of asynchronous programming in .NET is saving threads during long running operation execution. The FileStream class can be setup to allow asynchronous operations, that allows running (e.g.) a copy operation without virtually using any threads. To my surprise, I found that running asynchronous stream copy performs not only slower, but also uses more processing power than synchronous stream copy equivalent. Is there any benchmark tests were done to compare a synchronous vs asynchronous operation execution (file, network, etc.)? Does it really make sense to perform an asynchronous operation instead of spanning separate thread and perform synchronous operation in server environment if the asynchronous operation is times slower than the synchronous one?

    Read the article

  • good methods for boolean operations on overlapping polygons

    - by BenjaminGolder
    What is the best open source library for performing boolean operations (union, intersect, subtract) on shapefiles? What do you like to use? OGR looks like it probably has this capability, though I'm having trouble finding the particular commands in their documentation. Shapely definitely does this, and is easy to understand. PostGIS appears to also have some commands for this. But there must be more, and I'm having trouble finding them. I don't have much experience with any of the, and would appreciate any opinions on these or other libraries. Thanks!

    Read the article

  • Multi-threading mechanisms to run some lengthy operations from winforms code and communication with

    - by tmarouda
    What do I want to achieve: I want to perform some time consuming operations from my MDI winforms application (C# - .NET). An MDI child form may create the thread with the operation, which may take long time (from 0.1 seconds, to even half hour) to complete. In the meantime I want the UI to respond to user actions, including manipulation of data in some other MDI child form. When the operation completes, the thread should notify the MDI child that the calculations are done, so that the MDI child can perform the post-processing. How can I achieve this: Should I use explicit threading (i.e., create explicit threads), thread pools? Or simply just propose your solution. Should I create foreground or background threads? And how does the thread communicates with the GUI, according the solution you propose? If you know of a working example that handles a similar situation, please make a note.

    Read the article

  • iPhone: NSOperationQueue running operations serially

    - by Greg Maletic
    I have a singleton NSOperationQueue that handles all of my network requests. I'm noticing, however, that when I have one particularly long operation running (this particular operation takes at least 25 seconds), my other operations don't run until it completes. maxConcurrentOperationCount is set to NSOperationQueueDefaultMaxConcurrentOperationCount, so I don't believe that's the issue. Any reason why this would be happening? Besides spawning multiple NSOperationQueues (a solution that I'm not sure would work, nor am I sure it's a good idea), what's the best way to fix this problem? Thanks.

    Read the article

  • C# Generic Arrays and math operations on it

    - by msedi
    Hello, I'm currently involved in a project where I have very large image volumes. This volumes have to processed very fast (adding, subtracting, thresholding, and so on). Additionally most of the volume are so large that they event don't fit into the memory of the system. For that reason I have created an abstract volume class (VoxelVolume) that host the volume and image data and overloads the operators so that it's possible to perform the regular mathematical operations on volumes. Thereby two more questions opened up which I will put into stackoverflow into two additional threads. Here is my first question. My volume is implemented in a way that it only can contain float array data, but most of the containing data is from an UInt16 image source. Only operations on the volume can create float array images. When I started implementing such a volume the class looked like following: public abstract class VoxelVolume<T> { ... } but then I realized that overloading the operators or return values would get more complicated. An example would be: public abstract class VoxelVolume<T> { ... public static VoxelVolume<T> Import<T>(param string[] files) { } } also adding two overloading operators would be more complicated: ... public static VoxelVolume<T> operator+(VoxelVolume<T> A, VoxelVolume<T> B) { ... } Let's assume I can overcome the problems described above, nevertheless I have different types of arrays that contain the image data. Since I have fixed my type in the volumes to float the is no problem and I can do an unsafe operation when adding the contents of two image volume arrays. I have read a few threads here and had a look around the web, but found no real good explanation of what to do when I want to add two arrays of different types in a fast way. Unfortunately every math operation on generics is not possible, since C# is not able to calculate the size of the underlying data type. Of course there might by a way around this problem by using C++/CLR, but currently everything I have done so far, runs in 32bit and 64bit without having to do a thing. Switching to C++/CLR seemed to me (pleased correct me if I'm wrong) that I'm bound to a certain platform (32bit) and I have to compile two assemblies when I let the application run on another platform (64bit). Is this true? So asked shortly: How is it possible to add two arrays of two different types in a fast way. Is it true that the developers of C# haven't thought about this. Switching to a different language (C# - C++) seems not to be an option. I realize that simply performing this operation float []A = new float[]{1,2,3}; byte []B = new byte[]{1,2,3}; float []C = A+B; is not possible and unnecessary although it would be nice if it would work. My solution I was trying was following: public static class ArrayExt { public static unsafe TResult[] Add<T1, T2, TResult>(T1 []A, T2 []B) { // Assume the length of both arrays is equal TResult[] result = new TResult[A.Length]; GCHandle h1 = GCHandle.Alloc (A, Pinned); GCHandle h2 = GCHandle.Alloc (B, Pinned); GCHandle hR = GCHandle.Alloc (C, Pinned); void *ptrA = h1.ToPointer(); void *ptrB = h2.ToPointer(); void *ptrR = hR.ToPointer(); for (int i=0; i<A.Length; i++) { *((TResult *)ptrR) = (TResult *)((T1)*ptrA + (T2)*ptrB)); } h1.Free(); h2.Free(); hR.Free(); return result; } } Please excuse if the code above is not quite correct, I wrote it without using an C# editor. Is such a solution a shown above thinkable? Please feel free to ask if I made a mistake or described some things incompletely. Thanks for your help Martin

    Read the article

  • Coordinate geometry operations in images/discrete space

    - by avd
    I have images which have line segments, rays etc. I am representing these line segments using Bresenham algorithm (means whatever coordinates I get using this algorithm between two points). Now I want to do operations such as finding intersection point between two line segments, finding the projection of one vector onto other etc... The problem is I am not working in continuous space. The line segments are being approximated using Bresenham algorithm. So I want suggestions on what are the best and most efficient ways to do this? A link to C++ library or implementation would also be good enough. Please suggest some books which deal with such problems.

    Read the article

  • RESTful services and update operations

    - by Igor Brejc
    I know REST is meant to be resource-oriented, which roughly translates to CRUD operations on these resources using standard HTTP methods. But what I just wanted to update a part of a resource? For example, let's say I have Payment resource and I wanted to mark its status as "paid". I don't want to POST the whole Payment object through HTTP (sometimes I don't even have all the data). What would be the RESTful way of doing this? I've seen that Twitter uses the following approach for updating Twitter statuses: http://api.twitter.com/1/statuses/update.xml?status=playing with cURL and the Twitter API Is this approach in "the spirit" of REST? UPDATE: PUT - POST Some links I found in the meantime: PUT or POST: The REST of the Story PUT is not UPDATE PATCH Method for HTTP

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >