Search Results

Search found 30014 results on 1201 pages for 'go yourself'.

Page 40/1201 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • Why does A* path finding sometimes go in straight lines and sometimes diagonals? (Java)

    - by Relequestual
    I'm in the process of developing a simple 2d grid based sim game, and have fully functional path finding. I used the answer found in my previous question as my basis for implementing A* path finding. (http://stackoverflow.com/questions/735523/pathfinding-2d-java-game). To show you really what I'm asking, I need to show you this video screen capture that I made. I was just testing to see how the person would move to a location and back again, and this was the result... http://www.screenjelly.com/watch/Bd7d7pObyFo Different choice of path depending on the direction, an unexpected result. Any ideas?

    Read the article

  • Where should the partitioning column go in the primary key on SQL Server?

    - by Bialecki
    Using SQL Server 2005 and 2008. I've got a potentially very large table (potentially hundreds of millions of rows) consisting of the following columns: CREATE TABLE ( date SMALLDATETIME, id BIGINT, value FLOAT ) which is being partitioned on column date in daily partitions. The question then is should the primary key be on date, id or value, id? I can imagine that SQL Server is smart enough to know that it's already partitioning on date and therefore, if I'm always querying for whole chunks of days, then I can have it second in the primary key. Or I can imagine that SQL Server will need that column to be first in the primary key to get the benefit of partitioning. Can anyone lend some insight into which way the table should be keyed?

    Read the article

  • How would i go about showing the closest paragraph element to a unique link with jQuery?

    - by Nike
    The title is a bit rusty, sorry about that. Now let me explain what i'm trying to do. I have a few listed items, like this: <li> <a id="toggle" class="0"><h4>ämne<small>2010-04-17 kl 12:54</small></h4></a> <p id="meddel" class="0">text</p> </li> <li class='odd'> <a id="toggle" class="1"><h4>test<small>2010-04-17 kl 15:01</small></h4></a> <p id="meddel" class="1">test meddelande :) [a]http://youtube.com[/a]</p> </li> The function i'm trying to achieve, is that when a user clicks a "toggle" link (the h4 text), i want the paragraph element below it to fade in. I thought of the idea of giving both the toggle link and the paragraph the same class, and then somehow make it get the paragraph with the same class as the toggle link clicked, and show it? But i'm not entirely sure how to do that either, and tbh, it doesn't sound like the greatest idea, but maybe that's the only way? I don't know... Is there some way to just simply get the nearest paragraph (below the link) with the id "meddel" and fade it in? That sounds a bit easier... I hope you can at least give me a few hints. Thanks in advance, -Nike

    Read the article

  • In an ASP.NET MVC site, where would the JQuery code go?

    - by Maxim Z.
    I'm just getting started with ASP.NET MVC. I'm going to be using JQuery on the website I'm making, but I'm not really sure about one thing: where would JQuery code be placed? This concerns two things: Where do I import the JQuery JavaScript file? (I've been thinking that the Master page would be a good place to do this; am I right, or do I have to import it in each view?) Should all my JQuery code be referenced from the Master page (i.e., I store my code that uses JQuery in a separate .js file and reference it in a <script> tag)? Thanks in advance.

    Read the article

  • Zend Framework-Do images, mp3s, scripts, etc, just go in public folder?

    - by Joel
    I guess these are all questions that everyone must just know, because I'm not seeing this in the documentation :-D I understand that the public folder is the folder that the world has access to. I know it is the case with the css folder, but in migrating a traditional php website over, will my /images folder, /js folder /mp3s, etc Will those all just also be public folders that will be accessed via the layout or view.phtml pages? Thanks!

    Read the article

  • Where did Pylons beautiful error handling go? Using Nginx + Paster + Flup#fcgi_thread

    - by Tony
    I need to run my development through nginx due to some complicated subdomain routing rules in my pylons app that wouldn't be handled otherwise. I had been using lighttpd + paster + Flup#scgi_thread and the nice error reporting by Pylons had been working fine in that environment. Yesterday I recompiled Python and MySQL for 64bit, and also switched to Ngix + paster + Flup#fcgi_thread for my development environment. Everything is working great, but I miss the fancy error reports. This is what I get now, and it is a mess compared to what I got used to: http://drp.ly/Iygeg . And here are the pylons/nginx configs. Pylons: [server:main] use = egg:Flup#fcgi_thread host = 0.0.0.0 port = 6500 Nginx: location / { #include /usr/local/nginx/conf/fastcgi.conf; fastcgi_param PATH_INFO $fastcgi_script_name; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param QUERY_STRING $query_string; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param REMOTE_ADDR $remote_addr; fastcgi_pass_header Authorization; fastcgi_intercept_errors off; fastcgi_pass 127.0.0.1:6500; }

    Read the article

  • Zend Framework question (again) Do images, mp3s, scripts, etc, al just go in public folder?

    - by Joel
    I guess these are all questions that everyone must just know, because I'm not seeing this in the documentation :-D I understand that the public folder is the folder that the world has access to. I know it is the case with the css folder, but in migrating a traditional php website over, will my /images folder, /js folder /mp3s, etc Will those all just also be public folders that will be accessed via the layout or view.phtml pages? Thanks!

    Read the article

  • What is the way to go to fake my database layer in a unit test?

    - by Michel
    Hi, i have a question about unit testing. say i have a controller with one create method which puts a new customer in the database: //code a bit shortened public actionresult Create(Formcollection formcollection){ client c = nwe client(); c.Name = formcollection["name"]; ClientService.Save(c); { Clientservice would call a datalayer object and save it in the database. What i do now is create a database testscript and set my database in a know condition before testing. So when i test this method in the unit test, i know that there must be one more client in the database, and what it's name is. In short: ClientController cc = new ClientController(); cc.Create(new FormCollection (){name="John"}); //i know i had 10 clients before assert.areEqual(11, ClientService.GetNumberOfClients()); //the last inserted one is John assert.areEqual("John", ClientService.GetAllClients()[10].Name); So i've read that unit testing should not be hitting the database, i've setup an IOC for the database classes, but then what? I can create a fake database class, and make it do nothing. But then ofcourse my assertions will not work because if i say GetNumberOfClients() it will alwasy return X because it has no interaction with the fake database class used in the Create Method. I can also create a List of Clients in the fake database class, but as there will be two different instance created (one in the controller action and one in the unit test), they will have no interaction. What is the way to make this unit test work without a database?

    Read the article

  • WordPress > Activating plugin makes site go blank in one theme, not in another. Generated source ide

    - by Scott B
    Strangest thing. When I activate this specific plugin, the public side of the site goes blank (nothing but a white screen with blank view source). However, when I test the site with the wordpress default theme, the plugin does not conflict and the site works fine. The interesting thing is that I've compared the generated source (using FF's webmaster tools) with and without plugin activated and in each case they are identical. This led me to believe that perhaps the plugin was altering htaccess, however, that file is the same whether or not the plugin is active or not. How can I find out what is causing the problem with this plugin? The plugin is called "Crawl Rate Tracker".

    Read the article

  • Go for Zend framework or Django for a modular web application?

    - by dr. squid
    I am using both Zend framework and Django, and they both have they strengths and weakness, but they are both good framworks in their own way. I do want to create a highly modular web application, like this example: modules: Admin cms articles sections ... ... ... I also want all modules to be self contained with all confid and template files. I have been looking into a way to solve this is zend the last days, but adding one omer level to the module setup doesn't feel right. I am sure this could be done, but should I? I have also included Doctrine to my zend application that could give me even more problems in my module setup! When we are talking about Django this is easy to implement (Easy as in concept, not in implementation time or whatever) and a great way to create web apps. But one of the downsides of Django is the web hosing part. There are some web hosts offering Django support, but not that many.. So then I guess the question is what have the most value; rapid modular development versus hosting options! Well, comments are welcome! Thanks

    Read the article

  • ASP.NET MVC - Do stylesheets have to go in the Site.Master file?

    - by Darcy
    Hi all, I noticed that I cannot add stylesheets on any page. They must be added to the master page. I already have about 15 stylesheets in the master view, which seems like overkill, since only some of the pages use a certain stylesheet. I imagine I could reference the file via javascript (although, I can't think of how off the top of my head), but it would be really nice to not have to use any.

    Read the article

  • What parameters should I use in a Google Maps URL to go to a lat-lon?

    - by xpda
    I would like to produce a url for Google Maps that goes to a specific latitude and longitude. Now, I generate a url such as this: http://maps.google.com/maps?z=11&t=k&q=58 41.881N 152 31.324W The resulting map comes up with a round "A" balloon pointer, which seems to point to the nearest named object, and a green arrow, which points to the lat-lon. Sometimes, as in this example, the "A" pointer is centered and is far enough away that you cannot see the pointer to the lat-lon. (Zoom out to see both pointers in this example. The "A" pointer is in the center of Alaska, while the lat-long pointer is on Kodiak Island.) Are there some parameters I can use in the Google Maps URL that will produce a single pointer to a designated lat-lon? (This loads in a separate window. It is not embedded.)

    Read the article

  • where did the _syscallN macros go in <linux/unistd.h>?

    - by Evan Teran
    It used to be the case that if you needed to make a system call directly in linux without the use of an existing library, you could just include <linux/unistd.h> and it would define a macro similar to this: #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ type name(type1 arg1,type2 arg2,type3 arg3) \ { \ long __res; \ __asm__ volatile ("int $0x80" \ : "=a" (__res) \ : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ "d" ((long)(arg3))); \ if (__res>=0) \ return (type) __res; \ errno=-__res; \ return -1; \ } Then you could just put somewhere in your code: _syscall3(ssize_t, write, int, fd, const void *, buf, size_t, count); which would define a write function for you that properly performed the system call. It seems that this system has been superseded by something (i am guessing that "[vsyscall]" page that every process gets) more robust. So what is the proper way (please be specific) for a program to perform a system call directly on newer linux kernels? I realize that I should be using libc and let it do the work for me. But let's assume that I have a decent reason for wanting to know how to do this :-).

    Read the article

  • how to go back to previous screen in tableview?

    - by Rajendra Bhole
    Hi, My appliaction is viewbased application in which i have one button . On click of that button i will push to other screen that is table view screen on which what i want when i select any data from row in table view it will get back to previous view automatically instead of selecting the navigation back button generated automatically. Please help me out its urgent . Thanks in Advance

    Read the article

  • File Explorer using Java - how to go about it?

    - by user299988
    Hi, I am set to create a file explorer using Java. The aim is to emulate the behavior of the default explorer as closely as possible, whatever may be the underlying OS. I have done NO GUI programming in Java. I have looked-up Swing, SWT and JFace, and I am beginning my project with this tutorial: http://www.ibm.com/developerworks/opensource/library/os-ecgui1/ I would like to know your opinions about the best approach to tackle this problem. If you could comment on complexity of coding, portability and OS-independence, and efficiency, it would be great. Is there anything else I should know? Do some other ways exist? Thanks a lot!

    Read the article

  • UX Design Question: Should a multi step wizard save the form contents when the user clicks 'go back'

    - by Ashwin Prabhu
    I am developing a web application that collects data over multiple steps through a wizard. Steps are generally not interdependent, in that data input at each step has little or no effect on the consequent steps. However each step may have a set of validations which determine whether the user can progress to the next step by clicking 'continue' What should be the behavior when the user clicks previous? a Quickly move to the previous page, thus losing all the unsaved data in the form. Prompting the user with a warning is an option, but it can become irritating quite soon. b Move to the previous page saving all the data in the current step - without triggering validations, so that when the user comes back she sees the form in the same state that she left it in. c any other behaviour All opinions are welcome :)

    Read the article

  • Cheapest way to go for somebody who wants to accept payments, but won't be accepting hundreds of ord

    - by blockhead
    I have a client who lectures, and wants to sell spots to his lecture online. I would preferably like to set him up with a solution that allows me to collect billing information on his site. My experience with e-commerce is in using solutions like Authorize.net, however this does not seem cost effective since I can't imagine he's making a huge profit off of this. I'm afraid he would lose money in the cost of using Authorize.net (or any payment gateway for the matter). I could use google checkout or paypal express, but this would require me to leave his site (although with google checkout, it looks like, from a glance, that I could just submit to their form from my server, and likely with paypal as well, but I don't know if this is against their TOS). What is the most cost-effective solution for accepting credit card payments in this situation?

    Read the article

  • How would I go about sharing variables in a C++ class with Lua?

    - by Nicholas Flynt
    I'm fairly new to Lua, I've been working on trying to implement Lua scripting for logic in a Game Engine I'm putting together. I've had no trouble so far getting Lua up and running through the engine, and I'm able to call Lua functions from C and C functions from Lua. The way the engine works now, each Object class contains a set of variables that the engine can quickly iterate over to draw or process for physics. While game objects all need to access and manipulate these variables in order for the Game Engine itself to see any changes, they are free to create their own variables, a Lua is exceedingly flexible about this so I don't forsee any issues. Anyway, currently the Game Engine side of things are sitting in C land, and I really want them to stay there for performance reasons. So in an ideal world, when spawning a new game object, I'd need to be able to give Lua read/write access to this standard set of variables as part of the Lua object's base class, which its game logic could then proceed to run wild with. So far, I'm keeping two separate tables of objects in place-- Lua spawns a new game object which adds itself to a numerically indexed global table of objects, and then proceeds to call a C++ function, which creates a new GameObject class and registers the Lua index (an int) with the class. So far so good, C++ functions can now see the Lua object and easily perform operations or call functions in Lua land using dostring. What I need to do now is take the C++ variables, part of the GameObject class, and expose them to Lua, and this is where google is failing me. I've encountered a very nice method here which details the process using tags, but I've read that this method is deprecated in favor of metatables. What is the ideal way to accomplish this? Is it worth the hassle of learning how to pass class definitions around using libBind or some equivalent method, or is there a simple way I can just register each variable (once, at spawn time) with the global lua object? What's the "current" best way to do this, as of Lua 5.1.4?

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >