Search Results

Search found 22224 results on 889 pages for 'point of sale'.

Page 28/889 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • What is the point of heightmaps?

    - by Jake Petroules
    I've been pondering this question awhile now... many 3d engines support advanced terrain rendering using quadtrees, LOD... all the features you expect. But every engine I've seen loads height data from heightmaps... grayscale bitmaps. I just can't understand how this is useful - each point in a heightmap can have one of 256 values. But what if you wanted to model Mt. Everest? with detail of 1 meter, or even greater? That's far outside the range of 256. Of course I understand that you can implement your own terrain format to achieve this, but I just can't see why heightmaps are so widely used despite their great limitations.

    Read the article

  • Python continue from the point where exception was thrown

    - by James Lin
    Hi is there a way to continue from the point where exception was thrown? eg I have the following psudo code unique code 1 unique code 2 unique code 3 if I want to ignore the exceptions of any of the unique code statements I will have to do it like this: try: #unique code 1 except: pass try: #unique code 2 except: pass try: #unique code 3 except: pass but this isn't elegant to me, and for the life of me I can't remember how I resolved this kind of problem last time... what I want to have is something like try: unique code 1 unique code 2 unique code 3 except: continue from last exception raised

    Read the article

  • C# Windows CE 5.0 error: Can't find entry point ExitWindowsEx in PInvoke DLL coredll

    - by JackN
    I need to programatically shutdown a Windows CE 5.0 tablet using Microsoft.NET SDK CompactFramework v2.0. I tried using the solution here but got the error message Can't find entry point ExitWindowsEx in PInvoke DLL coredll Is there a way to add ExitWindowsEx to my build? Do I need a different coredll? [Flags] public enum ExitFlags { Reboot = 0x02, PowerOff = 0x08 } [DllImport("coredll")] public static extern int ExitWindowsEx(ExitFlags flags, int reserved); private static void buttonShutdown_Click(object sender, EventArgs e) { ExitWindowsEx(ExitFlags.PowerOff, 0); } private static void buttonRestart_Click(object sender, EventArgs e) { ExitWindowsEx(ExitFlags.Reboot, 0); }

    Read the article

  • Loss of precision - int -> float or double

    - by stan
    I have an exam question i am revising for and the question is for 4 marks "In java we can assign a int to a double or a float". Will this ever loose infromation and why? I have put that because ints are normally of fixed length or size - the precision for sotring data is finite, where storing information in floating point can be infinite, essentially we loose infromation because of this Now i am a little sketchy as to whetehr or not i am hitting the right areas here. I very sure it will loose precision but i cant exactly put my finger on why. Can i getsome help please Thanks

    Read the article

  • rails migration. modify starting point for auto_increment

    - by railsnew
    I have a table already created. I am looking for a rails migration where I can modify the starting point of the auto_increment number for id column of my table. Let's say I want it to start from 1000. I googled a bit and came across this: it says: :options "string" pass raw options to your underlying database, e.g. auto_increment = 10000. Note that passing options will cause you to lose the default ENGINE=InnoDB statement Can this be used for something I want? and how will the migration look since i am changing the column and not creating new one...

    Read the article

  • Decimal point removed from decimals in a Serialized XML

    - by MiguelM
    I'm using XmlSerializer with classes created from a xsd using xsd.exe. It has worked fine for months. Now I'm receiving reports that in some cases the created xml file has all decimals serialized without a decimal point, e.g. 123.45 is serialized as 12345. I haven't been able to reproduce the problem, but I'm suspecting it may be related to localization. This is my first C# project, so I may be overlooking something basic. Could localization cause this problem? How can I make the serialization process locale independent? Any idea of something else that could cause this problem?

    Read the article

  • In .net, how do I choose between a Decimal and a Double

    - by Ian Ringrose
    We were discussing this the other day at work and I wish there was a Stackoverflow question I would point people at so here goes.) What is the difference between a Double and a Decimal? When (in what cases) should you always use a Double? When (in what cases) should you always use a Decimal? What’s the diver factors to consider in cases that don’t fall into one of the two camps above? (There a lot of questions that overlap this question, but they tend to be asking what someone should do in a given case, not how to decide in the general case)

    Read the article

  • Is it better to use GL_FIXED or GL_FLOAT on Android.

    - by Timmmm
    I would have assumed that GL_FIXED was faster, but the iPhone docs actually say to use GL_FLOAT because GL_FIXED has to be converted to GL_FLOAT. Is it the same on Android? I suppose it varies by phone, but what about recent popular ones (Nexus One, Droid/Milestone, etc.)? Bonus points: This appears to be completely undocumented (e.g. search google for GL_FIXED!) but where is the 'point' in GL_FIXED? I.e. how much is (GL_FIXED)1 worth?

    Read the article

  • Can a pointer ever point to itself?

    - by eSKay
    This question was mentioned here. My doubt is: If a pointer variable has the same address as its value, is it really pointing to itself? For example - in the following piece of code, is a a pointer to itself? #include<stdio.h> int main(){ int* a; int b = (int)&a; a = b; printf("address of a = %d\n", &a); printf(" value of a = %d\n", a); } If a is not a pointer to itself, then the same question poses again: Can a pointer point to itself? Also, how is a self pointing pointer useful?

    Read the article

  • Floating point Endianness?

    - by cake
    Hi I'm writing a client and a server for a realtime offshore simulator, and, as I have to send a lot of data through a socket, I'm using binary data to maximize the ammount of data I can send. I already know about integers endianness, and how to use htonl and ntohl to circumvent endianness issues, but my application, as almost all simulation software, deals with a lot of floats. My question is: Is there some issue of endianness whean dealing with binary formats of floating point numbers? I know that all the machines where my code will run use IEEE implementation of floating points, but is there some endianness issue when dealing with floats? Since I only have access to machines with the same endian, I cannot test this by myself. So, I'll be glad if someone can help me with this. Thanks in advance.

    Read the article

  • how to write floating value accurately to a bin file.

    - by user319873
    Hi I am trying to dump the floating point values from my program to a bin file. Since I can't use any stdlib function, I am thinking of writting it char by char to a big char array which I am dumping in my test application to a file. It's like float a=3132.000001; I will be dumping this to a char array in 4 bytes. Code example would be:- if((a < 1.0) && (a > 1.0) || (a > -1.0 && a < 0.0)) a = a*1000000 // 6 bit fraction part. Can you please help me writting this in a better way.

    Read the article

  • whats the point of using template?

    - by netrox
    I am under the impression that if I set it as a template in Dreamweaver, any changes made should be saved to a new filename. I've copied the "template" that I made and sometimes I forget to save it as a different file name and it would overwrite previous web content. I just don't get the point of "save as template" if it works just like a document... it doesn't force me to save as a different filename. Common sense in me thinks that the software should evaluate like this, "if this is a template, always save as a different filename when it's modified so nothing is changed to the template, but rather a new file is created with the new content following that template." Am I missing something? Am I always doomed to using Save As...?

    Read the article

  • Implementing zoom on a fixed point, javascript/canvas

    - by csiz
    I want to implement zooming on the mouse pointer with the mouse wheel. That is scaling the image while the point under the mouse pointer stays fixed. Here is my code, which doesn't work very well var scala = 1 + event.wheelDelta / 1000; canvas.context.translate(-canvas.mouse.x * ( scala - 1 ) / canvas.scale,-canvas.mouse.y * ( scala - 1 ) / canvas.scale); canvas.context.scale(scala,scala); canvas.scale *= scala; //canvas.scale is my variable that is initially set to 1. //canvas.mouse is my variable that represents the mouse position relative to the canvas

    Read the article

  • Find most right and left point of a horizontal circle in 3d Vector environment

    - by Olivier de Jonge
    I'm drawing a 3D pie chart that is rendered with in 3D vectors, projected to 2D vectors and then drawn on a Graphics object. I want to calculate the most left and right point of the circle The method to create a vector, draw and project to a 2d vector are below. Anyone knows the answer? public class Vector3d { public var x:Number; public var y:Number; public var z:Number; //the angle that the 3D is viewed in tele or wide angle. public static var viewDist:Number = 700; function Vector3d(x:Number, y:Number, z:Number){ this.x = x; this.y = y; this.z = z; } public function project2DNew():Vector { var p:Number = getPerspective(); return new Vector(p * x, p * y); } public function getPerspective():Number{ return viewDist / (this.z + viewDist); } }

    Read the article

  • What's a good way to add a large number of small floats together?

    - by splicer
    Say you have 100000000 32-bit floating point values in an array, and each of these floats has a value between 0.0 and 1.0. If you tried to sum them all up like this result = 0.0; for (i = 0; i < 100000000; i++) { result += array[i]; } you'd run into problems as result gets much larger than 1.0. So what are some of the ways to more accurately perform the summation?

    Read the article

  • C: Reading file with a starting point

    - by Shinka
    A simple question but I can't find the answer in my book. I want to read a binary file to seed a random number generator, but I don't want to seed my generator with the same seed each time I call the function, so I will need to keep a variable for my position in the file (not a problem) and I would need to know how to read a file starting a specific point in the file (no idea how). The code: void rng_init(RNG* rng) { // ... FILE *input = fopen("random.bin", "rb"); unsigned int seed[32]; fread(seed, sizeof(unsigned int), 32, input); // seed 'rng'... fclose(input); }

    Read the article

  • Javascript function returning number with two decimals...?

    - by muzzledBYbrass
    I have a function to return points along a line and my return comes back with two decimal points...? For example, a return of my variable px will be something like -88.4029.032940598. vx is the x vector and mult is the distance of the line plus distance to calculate the point. Here is the operation that is returning these values: var mult = parseFloat(mag + theUnit); var px = coord_one.x_point + (vx * mult); console.log(px); Never have seen this before- I appreciate any and all help!

    Read the article

  • How can I add floats together in different orders, and always get the same total?

    - by splicer
    Let's say I have three 32-bit floating point values, a, b, and c, such that (a + b) + c != a + (b + c). Is there summation algorithm, perhaps similar to Kahan summation, that guarantees that these values can be summed in any order and always arrive at the exact same (fairly accurate) total? I'm looking for the general case (i.e. not a solution that only deals with 3 numbers). Is arbitrary precision arithmetic the only way to go? I'm dealing with very large data sets, so I'd like to avoid the overhead of using arbitrary precision arithmetic if possible. Thanks!

    Read the article

  • How many double numbers are there between 0.0 and 1.0?

    - by polygenelubricants
    This is something that's been on my mind for years, but I never took the time to ask before. Many (pseudo) random number generators generate a random number between 0.0 and 1.0. Mathematically there are infinite numbers in this range, but double is a floating point number, and therefore has a finite precision. So the questions are: Just how many double numbers are there between 0.0 and 1.0? Are there just as many numbers between 1 and 2? Between 100 and 101? Between 10^100 and 10^100+1? Note: if it makes a difference, I'm interested in Java's definition of double in particular.

    Read the article

  • check compiler with break point

    - by KareemSaad
    When I tried to focus on compiler in code i made break point on code if (!IsPostBack) { using (SqlConnection Con = Connection.GetConnection()) { if (Request.QueryString["Category_Id"] != null && DDlProductFamily.SelectedIndex < 0) { SqlCommand Com = new SqlCommand("SelectAllCtageories_Front", Con); Com.CommandType = CommandType.StoredProcedure; Com.Parameters.Add(Parameter.NewInt("@Category_Id", Request.QueryString["Category_Id"])); SqlDataAdapter DA = new SqlDataAdapter(Com); DA.Fill(dt); DataList1.DataSource = dt; DataList1.DataBind(); } but I cannot check condition although I had the value of query string List item

    Read the article

  • How to configure a specific service operation to be accessible through a different End Point

    - by pradeeptp
    I have single service contract that has 2 service operations. Let me call these operations as X1 and X2. How do I configure X1 to be accessible through HTTP and X2 to be accessible through TCP/IP. If I configure the service contract to be accessibel to TCP/IP end point then both X1 and X2 will be accessible through TCP/IP. Same is the case if I configure the same service contract with HTTP protocol. I could have two different service contracts for achieving what I want, but I want to know if I could achieve the same through a single service contract.

    Read the article

  • Point IIS at debug folder

    - by mtmurdock
    I am working on an asp.net mvc web service and an Android app that need to be able to communicate with one another. However, when running a web service/web site in Visual Studio it can only be accessed by that machine. So what I want to do is point IIS at my project's bin/debug folder, thus exposing my dev environment to my local network. I know this is possible because my work machine is set up this way, I just don't know how it is done. How do I configure IIS to load a web app from the debug directory of my Visual Studio project?

    Read the article

  • PHP Parse Error unexpected '{'

    - by Laxmidi
    Hi, I'm getting a "Parse error: syntax error, unexpected '{' in line 2". And I don't see the problem. <?php class pointLocation {     var $pointOnVertex = true; // Check if the point sits exactly on one of the vertices     function pointLocation() {     }                   function pointInPolygon($point, $polygon, $pointOnVertex = true) {         $this->pointOnVertex = $pointOnVertex;                  // Transform string coordinates into arrays with x and y values         $point = $this->pointStringToCoordinates($point);         $vertices = array();          foreach ($polygon as $vertex) {             $vertices[] = $this->pointStringToCoordinates($vertex);          }                  // Check if the point sits exactly on a vertex         if ($this->pointOnVertex == true and $this->pointOnVertex($point, $vertices) == true) {             return "vertex";         }                  // Check if the point is inside the polygon or on the boundary         $intersections = 0;          $vertices_count = count($vertices);              for ($i=1; $i < $vertices_count; $i++) {             $vertex1 = $vertices[$i-1];              $vertex2 = $vertices[$i];             if ($vertex1['y'] == $vertex2['y'] and $vertex1['y'] == $point['y'] and $point['x'] > min($vertex1['x'], $vertex2['x']) and $point['x'] < max($vertex1['x'], $vertex2['x'])) { // Check if point is on an horizontal polygon boundary                 return "boundary";             }             if ($point['y'] > min($vertex1['y'], $vertex2['y']) and $point['y'] <= max($vertex1['y'], $vertex2['y']) and $point['x'] <= max($vertex1['x'], $vertex2['x']) and $vertex1['y'] != $vertex2['y']) {                  $xinters = ($point['y'] - $vertex1['y']) * ($vertex2['x'] - $vertex1['x']) / ($vertex2['y'] - $vertex1['y']) + $vertex1['x'];                  if ($xinters == $point['x']) { // Check if point is on the polygon boundary (other than horizontal)                     return "boundary";                 }                 if ($vertex1['x'] == $vertex2['x'] || $point['x'] <= $xinters) {                     $intersections++;                  }             }          }          // If the number of edges we passed through is even, then it's in the polygon.          if ($intersections % 2 != 0) {             return "inside";         } else {             return "outside";         }     }               function pointOnVertex($point, $vertices) {         foreach($vertices as $vertex) {             if ($point == $vertex) {                 return true;             }         }          }                   function pointStringToCoordinates($pointString) {         $coordinates = explode(" ", $pointString);         return array("x" => $coordinates[0], "y" => $coordinates[1]);     }           } $pointLocation = new pointLocation(); $points = array("30 19", "0 0", "10 0", "30 20", "11 0", "0 11", "0 10", "30 22", "20 20"); $polygon = array("10 0", "20 0", "30 10", "30 20", "20 30", "10 30", "0 20", "0 10", "10 0"); foreach($points as $key => $point) { echo "$key ($point) is " . $pointLocation->pointInPolygon($point, $polygon) . "<br>"; } ?> Does anyone see the problem? Thanks, -Laxmidi

    Read the article

  • Comparison of phrases containing the same word in Google Trends

    - by alisia123
    If I compare three phrases in google trends : house sale house white house I get the following numbers: house - 91 sale house - 3 white house - 2 The question is: Is "sale house" and "white house" already included in the number 91? It is an important question, because if it is true, than: house_except_sale_house + sale_house = 91 sale_house = 3 Which means I have to compare 88 and 3, if I compare "house" and "sale house"

    Read the article

  • No Program Entry Point TASM Error

    - by Nathan Campos
    I'm trying to develop a simple kernel using TASM, using this code: ; beroset.asm ; ; This is a primitive operating system. ; ;********************************************************************** code segment para public use16 '_CODE' .386 assume cs:code, ds:code, es:code, ss:code org 0 Start: mov ax,cs mov ds,ax mov es,ax mov si,offset err_msg call DisplayMsg spin: jmp spin ;**************************************************************************** ; DisplayMsg ; ; displays the ASCIIZ message to the screen using int 10h calls ; ; Entry: ; ds:si ==> ASCII string ; ; Exit: ; ; Destroyed: ; none ; ; ;**************************************************************************** DisplayMsg proc push ax bx si cld nextchar: lodsb or al,al jz alldone mov bx,0007h mov ah,0eh int 10h jmp nextchar alldone: pop si bx ax ret DisplayMsg endp err_msg db "Operating system found and loaded.",0 code ends END Then I compile it like this: C:\DOCUME~1\Nathan\Desktop tasm /la /m2 beroset.asm Turbo Assembler Version 4.1 Copyright (c) 1988, 1996 Borland International Assembling file: beroset.asm Error messages: None Warning messages: None Passes: 2 Remaining memory: 406k C:\DOCUME~1\Nathan\Desktop tlink beroset, loader.bin Turbo Link Version 7.1.30.1. Copyright (c) 1987, 1996 Borland International Fatal: No program entry point C:\DOCUME~1\Nathan\Desktop What can I to correct this error?

    Read the article

< Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >