Search Results

Search found 2221 results on 89 pages for 'equal'.

Page 23/89 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Manually updating HTML5 local storage?

    - by hustlerinc
    I'm just starting out HTML5 game developement (and game dev in general) and watching all the videos and tutorials available something has crossed my mind. Everyone keep saying I should set the cookie's (or cached files) to be expired after a certain amount of time. So that when it reaches that time the browser automatically downloads all assets again, even if it's the same asset's. Wouldn't it be possible to manually define the version of the game? For example the user has downloaded all the files for 1.01 of the game, when updating I change a simple variable to 1.02. When the user logs in it would compare his version to the current and if they are not equal only then it downloads the files? This could even be improved to download only specific files depending on what needs to be updated? Would this be possible or am I just dreaming? What are the possible downsides of this approach?

    Read the article

  • What is the term that means "keeping the arguments for different API calls as similar as possible"?

    - by larson4
    There is a word which I can never remember... it expresses a design goal that API calls (or functions or methods or whatever) should be as similar as reasonably possible in their argument patterns. It may also extend to naming as well. In other words, all other things being equal, it is probably bad to have these three functions: deleteUser(email) petRemove(petId,species) destroyPlanet(planetName,starName) if instead you could have deleteUser(userId) deletePet(petId) deletePlanet(planetId) What is the word for this concept? I keep thinking it's "orthogonal" but it definitely isn't. Its a very important concept, and to me it's one of the biggest things that makes some APIs a joy to work with (because once you learn a few things you can pretty much use everything without looking at doco), and others a pain (because every function is done inconsistently).

    Read the article

  • What does Visual studio debugger do, when condition should give error

    - by zacharmarz
    I'm debugging some code and I need to break everytime, when character in string (const char *) is equal to something. So I put there breakpoint and attach condition like: s[0] == 'e'. But code I'm debugging is in CRT and there is possibility, that s == 0 is true. So "addressing empty pointer" should give some kind of error. Yes - I could give there condition s != 0, but it would not be such fun :) And I'm curious, what will debugger do when trying to evaluate this condition? How it will behave internally? Obviously it's not giving any error nor stopping on this breakpoint when s == 0 Thanks for your answer.

    Read the article

  • rel="Canonical": Ranking Benefits ? & specifying for PDF?

    - by Miak
    I think I understand the basic case for using rel="canonical": to tell google which is the preferred URI when the same page/content may be accessed via more than one URI. This helps you avoid duplicate content penalties. But what else does it do? Does it also affect search ranking? i.e. will the page I specify in the canonical be ranked higher than the others? (if all else equal). And in the case of PDF documents, I understand that you can now specify rel="canonical" for them too, using HTTP headers (i.e. in htaccess). Again, this would obviously help avoid dupilcate content penalties if the PDF content is the same as the HTML page or if it can be accessed in more than one place. But does it affect ranking? or are there any other benefits to doing this.

    Read the article

  • Lightweight Ubuntu

    - by Nick Berardi
    Just to start off, I know of lubuntu but it really doesn't meet what I am looking for. Basically what I am looking for is the standard Desktop Ubuntu install, but with out all the word processing, multimedia, and games installed. I have seen posts out about how to get the desktop environment running on Ubuntu server, but they seem complicated, and never seem to equal the standard Desktop install. So my question is, is there anyway to tell the standard Desktop install not to install all the applications? Or is there a distro available that leaves all the applications out, and just has the standard desktop look and feel? What I really want this for is, is for development purposes to run on a VM to do Mono development.

    Read the article

  • Brightness fn key adjustment problems

    - by npCoder
    My brightness function key controls work after setting grub boot parameter to "acpi_osi=" but using them I cannot adjust the brightness higher than around 70% (there is empty bar left over and I can't adjust higher) unless I go to Brightness & Lock settings manually than I can use the slider to adjust it higher... I primarily use intel_backlight to adjust my backlight and I am running Linux kernel 3.14.1 on Ubuntu 14.04 LTS on an ASUS X550LA Laptop when I try: cd /sys/class/backlight/intel_backlight cat max_brightness 937 cat brightness 811 It seems that I can only adjust to a maximum of 811 using the fn brightness controls If I instead do cd /sys/class/backlight/acpi_video0 cat max_brightness 10 cat brightness 4 cat actual_brightness 10 With the FN keys actual_brightness is not equal to the value returned from brightness on acip_video0 (which is always 4) but on intel_backlight actual_brightness = brightness The adjustment problem seemingly arises because both intel_backlight and acpi_video0 are trying to adjust brightness

    Read the article

  • How to divide hex grid evenly among n players?

    - by manabreak
    I'm making a simple hex-based game, and I want the map to be divided evenly among the players. The map is created randomly, and I want the players to have about equal amount of cells, with relatively small areas. For example, if there's four players and 80 cells in the map, each of the players would have about 20 cells (it doesn't have to be spot-on accurate). Also, each player should have no more than four adjacent cells. That is to say, when the map is generated, the biggest "chunks" cannot be more than four cells each. I know this is not always possible for two or three players (as this resembles the "coloring the map" problem), and I'm OK with doing other solutions for those (like creating maps that solve the problem instead). But, for four to eight players, how could I approach this problem? As always, any and all help is appreciated. :)

    Read the article

  • Permissions depending on parameters passed to application

    - by Engineiro
    I have a java app that writes to a very important table I have. This is sudo protected, but this app takes a parameters for where the output should go. The default is the REAL DEAL but the "output" parameter takes priority over the default, so if a user provides a path that they have write permission for, say: /home/username/mystuff then I would like for users to be allowed to write to these directories. The app is launched in a shell script, so I am wondering if I can check that the string does not equal /path/to/real/deal and not empty (since /path/to/real/deal is the default) and allow users to write to places they have permissions for. My impression of linux permissions is that it is tied to the application itself and cannot be conditionally approved, but I wonder if there is some bash fu or alternative method I can perform to get me my desired result. Using Ubuntu 10.04.4 LTS

    Read the article

  • Compare a variable that can have numeric or string as value

    - by Tarun
    I have a variable named Seconds_Behind_Master from one of my scripts. The problem is that this variable can either have a numeric value or can also take a string NULL as its value. Now, when I try to execute this script in shell it gets executed but gives a warning like this: [: Illegal number: NULL I believe it is due to the fact that in this case the value is NULL but when it compares it with numeral value 60 it gives this warning. How can I rectify it? Here is the piece of code: Seconds_Behind_Master=$Show_Slave_Status | grep "Seconds_Behind_Master" | awk -F": " {' print $2 '} if [ "$Seconds_Behind_Master" -ge "60" ]; then echo "replication delayed greater than or equal to 60." else if [ "$Seconds_Behind_Master" = "NULL" ]; then echo "Delay is Null." fi fi

    Read the article

  • Does it make a difference if I declare variables inside or outside a loop in Java?

    - by Puckl
    Does it make a difference if I declare variables inside or outside a loop in Java? Is this for(int i = 0; i < 1000; i++) { int temporaryValue = someMethod(); list.add(temporaryValue) } equal to this (with respect to memory usage)? int temporaryValue = 0; for(int i = 0; i < 1000; i++) { temporaryValue = someMethod(); list.add(temporaryValue) } And what if the temporary variable is for example an ArrayList? for(int i = 0; i < 1000; i++) { ArrayList<Integer> array = new ArrayList<Integer>(); fillArray(array); // do something with the array }

    Read the article

  • Partitioning set into subsets with respect to equality of sum among subsets

    - by Al.Net
    let say i have {3, 1, 1, 2, 2, 1,5,2,7} set of numbers, I need to split the numbers such that sum of subset1 should be equal to sum of subset2 {3,2,7} {1,1,2,1,5,2}. First we should identify whether we can split number(one way might be dividable by 2 without any remainder) and if we can, we should write our algorithm two create s1 and s2 out of s. How to proceed with this approach? I read partition problem in wiki and even in some articles but i am not able to get anything. Can someone help me to find the right algorithm and its explanation in simple English?

    Read the article

  • Circular movement - eliminating speed ups near Y = 0

    - by Fibericon
    I have a basic algorithm to rotate an enemy around a 200 unit radius circle with center 0. This is how I'm achieving that: if (position.Y <= 0 && position.X > -200) { position.X -= 2; position.Y = 0 - (float)Math.Sqrt((200 * 200) - (position.X * position.X)); } else { position.X += 2; position.Y = (float)Math.Sqrt((200 * 200) - (position.X * position.X)); } It does work, and I've ensured that at no point does either X or Y equal NaN. However, when Y approaches 0, it seems to go significantly faster. This surprises me, because the Y values are locked to the X, which is being incremented by a steady amount. What can I do to smooth the speed?

    Read the article

  • Set modified date = created date or null on record creation?

    - by User
    I've been following the convention of adding created and modified columns to most of my database tables. I also have been leaving the modified column as null on record creation and only setting a value on actual modification. The other alternative is to set the modified date to be equal to created date on record creation. I've been doing it the former way but I recent ran into one con which is seriously making me think of switching. I needed to set a database cache dependency to find out if any existing data has been changed or new data added. Instead of being able to do the following: SELECT MAX(modified) FROM customer I have to do this: SELECT GREATEST(MAX(created), MAX(modified)) FROM customer The negative being that it's a more complicated query and slower. Another thing is in file systems I believe they usually use the second convention of setting modified date = created date on creation. What are the pros and cons of the different methods? That is, what are the issues to consider?

    Read the article

  • Custom vs. browser-native scrollbars

    - by vemv
    Including customizable, JavaScript-based scrollbars (and scrolling functionality in general, i.e. bind the control to the mouse scroll wheel) in your webapp can be a great temptation. However all solutions I could find were developed by individuals (which can equal lack of formal or future support). In addition I fail to remember any mainstream site using them. In my particular case, no-JavaScript or IE6/odd-browser environments are not intended to be supported. Should custom scrollbars be avoided nowadays? If not, what's the best option one can choose?

    Read the article

  • Segment subdomains with Google Analytics?

    - by andrewpthorp
    So, when a website has multiple subdomains: www.example.com foo.example.com bar.example.com What is the best way to use Google Analytics to segment the data? I would prefer have access to 'All Data', 'Data from foo.example.com', and 'Data from bar.example.com'. I tried setting up 3 different views, and setting a filter on the foo/bar views that says: Include only traffic from the ISP domain that are equal to foo.example.com. However, I am not seeing any data collected into that View. I do, however, see all data in the 'All Data' view, but I can't figure out how to segment the data. I am including the analytics.js in the application.haml layout, which is always loaded in this app. Thanks!

    Read the article

  • Depth Map resolution shifting

    - by user3669538
    the problem is with shadow mapping as you can see, actually it works fine but in a certain condition that the Depth Map size must be equal to the size of rendering buffer, I use an infinite directional light so if the window is 800x600 the depth map must be 800x600, and when i change the size of the shadow map to be 900x600 it starts to be shifted and when it's size be 1024x1024 it also shifts till it disappears the GLSL shadow function float calcShadow(sampler2D Dmap, vec4 coor){ vec4 sh = vec4((coor.xyz/coor.w),1); sh.z *= 0.9; return step(sh.z,texture2D(Dmap,sh.xy).r); } here's the result when it's the same size as the window Colored result & Depth Map and here's the shifted result, as you can notice the depth map is exactly as the previous one with the addition of white space to the right. Colored result http://goo.gl/5lYIFV Depth Map http://goo.gl/7320Dd

    Read the article

  • update(100) behaves slightly different than 10 times update(10) - is that a problem? [on hold]

    - by futlib
    While looking into some test failures, I've identified an curious issue with my update logic. This: game.update(100); Behaves slightly different from: for (int i = 0; i < 10; i++) game.update(10); The concrete example here is a rotating entity. It rotates by exactly 360 degrees in the first case, but only by about 352 in the second. This leads to slight variations in how things move, depending on the frame rate. Not enough to be noticeable in practice, but I did notice it when writing tests. Now my question is: Should this be fully deterministic, i.e. the outcome of update(1) * n should equal update(n) exactly? Or is it normal to have some variance and I should make my test assertions more generous?

    Read the article

  • Print Screen key doesn't work if a drop-down menu is active

    - by wim
    On 11.10, I don't get a screengrab when pressing the Print Screen button on my keyboard if I have activated a drop down menu. For example, in nautilus, I can click the File menu and press the print screen button, nothing happens. Deactivating the drop down menu and all other things being equal, it works. Is that normal? Often when using this thing I'm actually needing to show some of those menu options. Currently I use the workaround to grab after a delay of a few seconds, but I'm used to the print screen button working no matter what's in focus and would prefer it that way.

    Read the article

  • What is w componet [duplicate]

    - by Tifa
    This question already has an answer here: What does the graphics card do with the fourth element of a vector as the final position? 3 answers What is the W component on graphics programming. I read a blog about opengl that says that w must be equal to either 0 or 1 here. But the book I am currently reading has put w component to more than 1 value. So im kinda confuse what does it really do. The book I am reading is OpenGL es a quick start guide.

    Read the article

  • C# Winforms Transparent Control allowing Clickthrough

    - by Erik Karlsson
    I have a problem, a bit related to: http://stackoverflow.com/questions/855826/c-winforms-transparent-control-allowing-clickthrough Contrary to him i would like to capture mouseevents on my program, while still retaining a "window" to whats behind my program. color.transparent doesnt work, and transparencykey just delivers mouse events to whatever is underneath. Using a panel with transparent backcolor or with a backcolor equal to transparencykey does not give the desired effect. Plz help me :)

    Read the article

  • Get coords of an oval in Tkinter

    - by Baddie
    I can't seem to figure out how to reterive the x,y position of an oval created on a Tkinter canvas using Python via c.create_oval(x0, y0, x1, y2) I understand that Tkinter creates the oval inside the box specified by x0,y0,x1,y2 and if I can get those coordinates that would also work. I need the coordinates to move the oval by an offset equal to the mouse coords and the actual oval.

    Read the article

  • Workaround for the WaitHandle.WaitAll 64 handle limit?

    - by James
    My application spawns loads of different small worker threads via ThreadPool.QueueUserWorkItem. I have never had any issues before, however, as my application is coming under more load i.e. more threads being created, I am now beginning to get this exception: WaitHandles must be less than or equal to 64 - missing documentation What is the best alternative solution to this?

    Read the article

  • Using PInvoke vs .NET provided functions

    - by Jonathan Shepherd
    From version to version of .NET the more function that's equal to P/Invoke is added to .NET Now there are 2 questions in my mine. 1) Which one is prefer other the other in term of speed, normally I use .Net function but in tight loop I don't really know which one is going to be faster. 2) Is there any website that provide the list of counter-parts?

    Read the article

  • mysql update where some field is max

    - by Syom
    The table videos has the following fields: id | average | name How can i write the query, to update the name of video, which have the max average, or the second by size average!!! i can do that with two queries, by selecting the max(average) from the table, and then update the name, where ite average equal to max or to second value, but i want to do that in one query. i think the query must look like this UPDATE videos SET name = 'something' WHERE average = MAX(average) Any suggestions?

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >