Search Results

Search found 46051 results on 1843 pages for 'question mark'.

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

  • Raycasting tutorial / vector math question

    - by mattboy
    I'm checking out this nice raycasting tutorial at http://lodev.org/cgtutor/raycasting.html and have a probably very simple math question. In the DDA algorithm I'm having trouble understanding the calcuation of the deltaDistX and deltaDistY variables, which are the distances that the ray has to travel from 1 x-side to the next x-side, or from 1 y-side to the next y-side, in the square grid that makes up the world map (see below screenshot). In the tutorial they are calculated as follows, but without much explanation: //length of ray from one x or y-side to next x or y-side double deltaDistX = sqrt(1 + (rayDirY * rayDirY) / (rayDirX * rayDirX)); double deltaDistY = sqrt(1 + (rayDirX * rayDirX) / (rayDirY * rayDirY)); rayDirY and rayDirX are the direction of a ray that has been cast. How do you get these formulas? It looks like pythagorean theorem is part of it, but somehow there's division involved here. Can anyone clue me in as to what mathematical knowledge I'm missing here, or "prove" the formula by showing how it's derived?

    Read the article

  • Question on refactoring and code design

    - by Software Engeneering Learner
    Suppose, I have a class with a constant static final field. Then I want in certain situations that field to be different. It still can be final, because it should be initialized in constructor. My question is, what strategy I should use: add this field value into the constructor create 2 subclasses, replace original field usage with some protected method and override it in subclasses Or create some composite class that will held instance of my class inside and somehow change that value? Which approach should I use and why?

    Read the article

  • C# XNA - Sky Sphere Question

    - by Wade
    I have been banging my head against the wall trying to get a sky sphere to work appropriately in XNA 4.0. I have the sphere loading correctly, and even textured, but i would like something a little more dynamic that can support a day/night cycle. My issue is that, while i know a good amount of C# and XNA, i know next to nothing about HLSL. (I could make an ambient light shader if my life depended on it...) I also have not been able to find a tutorial on how to build a sky sphere like this. Of course i don't expect to be able to make an amazing one right off the bat, i would like to start small, with a dynamic coloring sky i'll work out the clouds and sun later. My first question: Does anyone know of any good tutorial sites that could help me get a decent grasp around HLSL? Second: Does anyone have a good example of or know where to find one of a gradient sky using XNA and C#?

    Read the article

  • SDL to SFML simple question

    - by ultifinitus
    Hey! I've been working on a game in c++ for about a week and a half, and I've been using SDL. However, my current engine only needs the following from whatever library I use: enable double buffering load an image from path into something that I can apply to the screen apply an image to the screen with a certain x,y enable transparency on an image (possibly) image clipping, for sprite sheets. I am fairly sure that SFML has all of this functionality, I'm just not positive. Will someone confirm my suspicions? Also I have one or two questions regarding SFML itself. Do I have to do anything to enable hardware accelerated rendering? How quick is SFML at blending alpha values? (sorry for the less than intelligent question!)

    Read the article

  • Question about Target parameter of Matrix.CreateLookAt

    - by manning18
    I have a newbie question that's causing me a little bit of confusion when experimenting with cameras and reading other peoples implementations - does this parameter represent a point or a vector? In some examples I've seen people treat it like a specific point they are looking at (eg a position in the world), other times I see people caching the orientation of the camera in a rotation matrix and simply using the Matrix.Forward property as the "target", and other times it's a vector that's the result of targetPos - camPos and also I saw a camPos + orientation.Forward I was also just playing around with hard-coded target positions with same direction eg 1 to 10000 with no discernible difference in what I saw in the scene. Is the "Target" parameter actually a position or a direction (irrespective of magnitude)? Are there any subtle differences in behaviors, common mistakes or gotchas that are associated with what values you provide, or HOW you provide this paramter? Are all the methods I mentioned above equivalent? (sorry, I've only recently started and my math is still catching up)

    Read the article

  • Question about the no-endorsment clause on the BSD license

    - by Earlz
    I'm developing a non-free library and I want to use Bcrypt.Net in it. The clause in question: Neither the name of BCrypt.Net nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. To what extent does this mean I can't use the name of Bcrypt.Net? For instance, could I say "the only ASP.Net authentication library capable of using Bcrypt" or can I even include "supports Bcrypt for password hashing" in promotional materials? Note: I do not actually modify any of Bcrypt.Net's code

    Read the article

  • OpenGL fovx question

    - by Nick
    To boil my question down to the simplest form, I fear I am oversimplifying how mat4 perspective works. I am using mat4.perspective(45, 2, 0.1, 1000.0) (the binding is WebGL fwiw). With a fovy of 45, and an aspect ratio of 2, I expect to have a fovx of 90. Thus, if I position my camera at (0, 0, 50), looking towards the origin, I expect to see a cube positioned at (50, 0, 0) (45 degrees) right at the very periphery of my screen, half on, half off,. Instead, a cube at (50, 0, 0) is totally off screen, and my actually periphery occurs at about (41.1, 0, 0). What am I missing here? Thanks, nick

    Read the article

  • Monkey Hunter algorithm - Interview question [closed]

    - by Estefany Velez
    Question asked in an Interview: You are a hunter in the forest. A monkey is in the trees, but you don't know where and you can't see it. You can shoot at the trees, you have unlimited ammunition. Immediately after you shoot at a tree, if the monkey was in the tree, he falls and you win. If the monkey was not in the tree, he jumps (randomly) to an adjacent tree (he has to). Find an algorithm to get the monkey in the fewest shots possible. SOLUTION: The correct answer according to me was in the comments, credit to @rtperson: You could eliminate this possibility by shooting each tree twice as you sweep left, giving you a worst case of O(2n). EDIT: ...that is, a worst case of O(2n-1). You don't need to shoot the last tree twice.

    Read the article

  • Simple question about a cocos2d based game template

    - by Zishan
    I am learning a cocos2d based Game template tutorial from here and now I am at this point of the tutorial. My question is, how can i run 30 different scenes in 30 different levels of 5 chapter? Now I am using this switch (gameData.selectedLevel) { case 1: [SceneManager goChapter1Level1Scene]; break; (... snip a whole lot of lines...) case 30: [SceneManager goChapter5Level6Scene]; break; default: break; } in the "- (void) onPlay: (CCMenuItemImage*) sender" method. But it work only for 6 levels scene of chapter1. Other 4 chapters levels are show as same as 1st chapter levels scene. they are not show their own level scene. can any one please teach me, how can I do this stuff using this game template?

    Read the article

  • Interview question: How would you implement Google Search?

    - by ripper234
    Supposed you were asked in an interview "How would you implement Google Search?" How would you answer such a question? There might be resources out there that explain how some pieces in Google are implemented (BigTable, MapReduce, PageRank, ...), but that doesn't exactly fit in an interview. What overall architecture would you use, and how would you explain this in a 15-30 minute time span? I would start with explaining how to build a search engine that handles ~ 100k documents, then expand this via sharding to around 50M docs, then perhaps another architectural/technical leap. This is the 20,000 feet view. What I'd like is the details - how you would actually answer that in an interview. Which data structures would you use. What services/machines is your architecture composed of. What would a typical query latency be? What about failover / split brain issues? Etc...

    Read the article

  • ASP.NET Membership - Change password without asking the old (WITH Question and Answer)

    - by djsolid
    I have received many comments and questions about how you can do what is described in this post when you site requires question and answer. The solution is definiterly not the best and should be used with EXTREME caution because in a high traffic website can cause problems but I write it down anyway. We will use reflection in order to solve our problem. And this is the code But this code changes the only instance of MembershipProvider meaning if you access somewhere else from your application the property RequiresQuestionAndAnswer until you set back it’s original value you will get false instead of true. So again be VERY careful. Hope you find it useful!

    Read the article

  • Question about Web Programming certificate program

    - by user134226
    I am currently attending St. John's University with a major of Computer Science. I am entering my senior year next year and stumbled upon this certificate program for web development from Hunter College: http://www.hunter.cuny.edu/ce/certificates/computer/web-programming So the question is, would it be beneficial for me to complete this program or to just attend a few elective courses in the summer at a school such as NYU? Would this certificate be good for my resume? The only language I have learned so far is Java and classes I have taken in the field so far are: Programming Fundamentals 1 and 2, Data Security and Cryptography, Networking: Data Communications and Introduction to Data Structures Hope some of you can help me out, thanks

    Read the article

  • Music Rhythm Game Difficulty Question

    - by David Dimalanta
    I have curious question about music rhythm based genre while I'm making a code for the game. Is it really better if I set a random pattern encountered on every music played or there is a specific pattern depending on the music and the difficulty? I have observed the Guitar Hero 3 game for the game console where the difficulty is set on the number of strings used and possible number of combo (e.g. two-string combo). Compared to the Tap Tap Revenge for the Android and iPhone, the difficulty based on the number of BPM (Beat per Minute), meaning, number of targets spawn and must be hit.

    Read the article

  • Multithreading synchronization interview question: Find n words given m threads

    - by rplusg
    I came across this question: You are given a paragraph , which contain n number of words, you are given m threads. What you need to do is , each thread should print one word and give the control to next thread, this way each thread will keep on printing one word , in case last thread come, it should invoke the first thread. Printing will repeat until all the words are printed in paragraph. Finally all threads should exit gracefully. What kind of synchronization will use? I strongly feel we cannot take any advantage of threads here but interviewer is trying to understand my synchronization skills? No need of code, just put some thoughts. I will implement by myself.

    Read the article

  • Move subdomain into subdirectory SEO question

    - by JMC
    I have read this article: http://www.mattcutts.com/blog/subdomains-and-subdirectories/ But I'm not 100% clear if moving my subdomain website into a subdirectory on the main domain would change anything related to SEO. I inherited this structure: Informational site related to our specific industry lives at: http://website.com StoreFront where we sell product related to our industry lives at: http://store.website.com The informational site gives a lot of good information on how to use the products we sell. The storefront is primarily used for the ecommerce function of selling the products, but there is a lot of info specific to the products on that site. Question: Is our main domain http://website.com getting page rank credit for the product info contained at http://store.website.com? Would there be a benefit to changing the structure?

    Read the article

  • Using disqus for a website (question on SERP and backlink)

    - by Homunculus Reticulli
    I am building a website and am trying to decide between writing my own commenting system and using disquss. One of the main deciding factors is that (obviously), I want comments left on my page to be show on SERPS. However, I remeber reading somewhere that disqus loads comments into a page using AJAX - and therefore the comments are "invisible" as far as Googlebot and other SE crawlers are concerned. Could someone confirm or refute this? The other question I have is about whether (as a commenter), When I place a comment on another website using disqus (including any links I may add to my comment), do the lionks in my comment count as a backlink (in other words are they "dofollow" or "nofollow" links)?

    Read the article

  • GUI question : representing large tree

    - by Peter
    I have a tree-like datastructure of some six levels deep, that I would like to represent on a single webpage (can be tabs, trees; ....) In each level both childnodes and content are possible. Presenting it like a real tree would be not very usable (too big). I was thinking in the lines of hiding parts of the tree when you drill down and presenting a breadcrumbs or the like to keep you informed as to where you are... I guess my question boils down to : any ideas / examples ? Tx!

    Read the article

  • ETL Software Research Question

    - by WernerCD
    Where I work, we use an in-house ETL solution that's homegrown and has been around for 5-10 years. I'm still new to my data analysis job, but I was wondering about the ETL tools that are out there. This is a new area for me. My situation, and job, is basically digging in a set of databases (DB2, SQL2005, Citrix, Ancient Cobol Database with a SQL Wrapper on top, MySQL, etc). Gather the desired information. combine the different datasets into one set. output into a file of choice (CSV, Tab Separated, Pipe Separated, XLS, etc). FTP to customer. I guess what my real question is, given my job, what are some good ETL suites that I can look at and compare to my in-house tools? This is more to research some other options. Ultimately, I'd either suggest a new solution or get options/ideas to improve our current app.

    Read the article

  • Question about SEO and Domains

    - by jasondavis
    This is my first post on here as I am mainly on Stackoverflow and Serverfault. I have been programming for at least 10 years now, have made hundreds of websites but I have just recently started getting into Design and the SEO side of sites, sad that I have been overlooking these for so many years. I have pretty good knowledge from all my years of SEO but I have never really looked into it until now. My question, I would like to build a site that targets many different key words for the search engines, for an example. Let's say I built a site about Outdoor activities called outdoorreview.com and I planned on having many sections hunting fishing Hiking camping cycling climbing etc... For best Search Engine results, how could I get the most search engine traffic to all these ares? Also how should I structure the way to get to them, outdoorreview.com/Hiking/ or hiking.outdoorreview.com ?

    Read the article

  • Question about mod_rewrite rule for redirecting failing pages

    - by SimpleCoder
    I'm setting up a mod_rewrite rule that redirects failing pages to a custom Page Not Found page. This is with Wordpress. I'm using the guide here: http://httpd.apache.org/docs/2.2/rewrite/rewrite_guide_advanced.html#redirect404. My rule so far looks like this: RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.+) http://example.com/?page_id=254 [R] This works. It seems to be a combination of the first and second suggestion that worked, since the -U flag did nothing. My question is, out of curiosity why the following happens: When I change REQUEST_FILENAME to REQUEST_URI (as the second example suggests), the page loads, but none of the style sheets load. All of my formatting is gone, and this happens on every page. Can anyone think of why this might happen?

    Read the article

  • SEO Question - allintitle with or without quotes

    - by Aaron
    I'm trying to learn more about implementing basic SEO strategies and have been spending a lot of time refining my keywords using Google Analytics combined with manually checking them using Google's allintitle operator. However, I'm unclear on whether I should be using quotes with my allintitles. Example: allintitle: seo tips and tricks for beginners 191 results allintitle: "seo tips and tricks for beginners" 70 results My thought is that it would be more accurate to use it without quotes because that way you get a more well rounded idea of all those you are competing with. So, my question is does Google give more weight to exact matches in the title tag or does that not really matter? If someone searched for: seo tips and tricks for beginners, would they be more likely to see the ones that have that exact phrase in their title tag or does that not have any impact?

    Read the article

  • Question about metacity issue from previous post

    - by Alex Poulos
    Yesterday I had an issue with my 12.04 - 12.04 Does anyone know how to fix this? all of a sudden - my Terminal shortcut doesnt work and windows only appear in top left corner and some configuration causing an issue with metacity making it crash - I was walked through the problem, and found out that by creating another user account and logging onto it - the problem wasn't present anymore on that account but still was present on my old account. So my question is - was the problem just something in my old Home folder? - also - can most issues that occur like this be solved by making a new account and backing up the "Home" folder?

    Read the article

  • How would you answer this job-interview question?

    - by ahmed
    One of the five people who interviewed me asked a question that resulted in an hour-long discussion: "Explain how you would develop a frequency-sorted list of the ten thousand most-used words in the English language." My initial response was to assail the assumptions underlying the problem. Language is a fluid thing, I argued. It changes in real time. Vocabulary and usage patterns shift day-to-day. To develop a list of words and their frequencies means taking a snapshot of a moving target. Whatever snapshot you take today isn't going to look like the snapshot you take tomorrow or even five minutes from now. Thanking you advance for your answers and consideration.

    Read the article

  • Java 2D World question

    - by Munkybunky
    I have a 2D world background made up of a Grid of graphics, which I display on screen with a viewport (800x600) and it all works. My question is I have the following code to convert the mouse co-ordinates to world co-ordinates then World co-ordinates to grid co-ordinates then grid co-ordinates to screen co-ordinates. //Add camerax to mouse screen co-ords to convert to world co-ords. int cursorx_world=(int)camerax+(int)GameInput.mousex; int cursorx_grid=(int)cursorx_world/blocksize; // World Co-ords / gridsize give grid co-ords int cursorx_screen=-(int)camerax+(cursorx_grid*blocksize); So is there anyway I can convert straight from mouse screen co-ords to screen co-ordinates?

    Read the article

  • PHP efficiency question [closed]

    - by Ron
    Hello everyone. I am working on website and I am trying to make it fast as much as possible - especially the small things that can make my site a little bit quicker. So, my to my question - I got loop that run 5 times and in each time it echo something, If I'll make variable and the loop will add the text I want to echo into the variable and just in the end I'll echo the variable - will it be faster? loop 1 (with the echo inside the loop) for ($i = 0;$i < 5;$i++) { echo "test"; } loop 2 (with the echo outside [when the loop finish]) $echostr = ""; for ($i = 0;$i < 5;$i++) { $echostr .= "test"; } echo $echostr; I know that loop 2 will increase a bit the file size and therefore the user will have to download more bytes but If I got huge loop will it be better to use second loop or not? Thanks.

    Read the article

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