Search Results

Search found 2442 results on 98 pages for 'dan ryan'.

Page 16/98 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Create a thread in xna Update method to find path?

    - by Dan
    I am trying to create a separate thread for my enemy's A* pathfinder which will give me a list of points to get to the player. I have placed the thread in the update method of my enemy. However this seems to cause jittering in the game every-time the thread is called. I have tried calling just the method and this works fine. Is there any way I can sort this out so that I can have the pathfinder on its own thread? Do I need to remove the thread start from the update and start it in the constructor? Is there any way this can work. Here is the code at the moment: bool running = false; bool threadstarted; System.Threading.Thread thread; public void update() { if (running == false && threadstarted == false) { thread = new System.Threading.Thread(PathThread); //thread.Priority = System.Threading.ThreadPriority.Lowest; thread.IsBackground = true; thread.Start(startandendobj); //PathThread(startandendobj); threadstarted = true; } } public void PathThread(object Startandend) { object[] Startandendarray = (object[])Startandend; Point startpoint = (Point)Startandendarray[0]; Point endpoint = (Point)Startandendarray[1]; bool runnable = true; // Path find from 255, 255 to 0,0 on the map foreach(Tile tile in Map) { if(tile.Color == Color.Red) { if (tile.Position.Contains(endpoint)) { runnable = false; } } } if(runnable == true) { running = true; Pathfinder p = new Pathfinder(Map); pathway = p.FindPath(startpoint, endpoint); running = false; threadstarted = false; } }

    Read the article

  • Can I include a robots meta tag outside of the head in HTML snippets indeded to be SSIed?

    - by Dan
    I have a number of files in my site which are not intended for independent viewing, but rather to be AJAXed into content within the site. They obviously don't meet HTML standards (no body, head, etc.) as independent entities. I would like to prevent search engines from indexing these pages, but do not have access to /robots.txt (which would be much more ideal). My question is, could I include the following at the top of these partial HTML files and get the desired results? <meta name="robots" content="noindex, noarchive"> I guess there are two parts to this question. Will this cause any rendering issues in any browsers? Will search engines (at least Google & Bing) interpret this as intended?

    Read the article

  • I have a library and several small programs that use it: how should I structure my git repositories?

    - by Dan
    I have some code that uses a library that I and others frequently modify (usually only by adding functions and methods). We each keep a local fork of the library for our own use. I also have a lot of small "driver" programs (~100 lines) that use the library and are used exclusively by me. Currently, I have both the driver programs and the library in the same repository, because I frequently make changes to both that are logically connected (adding a function to the library and then calling it). I'd like to merge my fork of the library with my co-workers' forks, but I don't want the driver programs to be part of the merged library. What's the best way to organize the git repositories for a large, shared library that needs to be merged frequently and a number of small programs that have changes that are connected to changes in the library?

    Read the article

  • Keyring no longer prompts for password when SSH-ing

    - by Lie Ryan
    I remember that I used to be able to do ssh [email protected] and have a prompt asks me for a password to unlock the keyring for the whole GNOME session so subsequent ssh wouldn't need to enter the keyring password any longer (not quite sure if this is in Ubuntu or other distro). But nowadays doing ssh [email protected] would ask me, in the terminal, my keyring password every single time; which defeats the purpose of using SSH keys. I checked $ cat /etc/pam.d/lightdm | grep keyring auth optional pam_gnome_keyring.so session optional pam_gnome_keyring.so auto_start which looks fine, and $ pgrep keyring 1784 gnome-keyring-d so the keyring daemon is alive. I finally found that SSH_AUTH_SOCK variable (and GNOME_KEYRING_CONTROL and GPG_AGENT_INFO and GNOME_KEYRING_PID) are not being set properly. What is the proper way to set this variable and why aren't they being set in my environment (i.e. shouldn't they be set in default install)? I guess I can set it in .bashrc, but then the variables would only be defined in bash session, while that is fine for ssh, I believe the other environment variables are necessary for GUI apps to use keyring.

    Read the article

  • How can I find which "command" corresponds to opening a gnome-panel menu, for use in a keyboard shortcut?

    - by Ryan Jendoubi
    There are many questions and answers here and around the web on setting basic keyboard shortcuts in GNOME. Most of them are either for launching applications, or Compiz settings, or for changing defaults for other things for which Ubuntu provides defaults shortcuts. What I want to know though is how to refer to a gnome-panel menu item in a custom keyboard shortcut. I'm using Ubuntu 11.10 with GNOME Classic, and the old GNOME 2 / Ubuntu 10.04 keyboard shortcuts for the main menus (Alt-F1) and the "Me Menu" (Super+S) don't seem to work. So my question is two-fold. Primarily I'd like to know how to set those shortcuts. But a second-order question is how I could have found this out myself: is there some program I can use to see what signals or commands are fired off when I click on various things, in this case gnome-panel menu items? I'm interested in the broader question because I've sometimes wanted to set shortcuts for specific menus or menu items in GNOME 2, so a way to find out what command I need there would be useful. Give a man a rod, as they say :-) I've had a look at a good lot of keyboard shortcut and menu related items here to no avail. One somewhat relevant question is this one, but it's just a "how do I do it" question, and applies to Unity, not GNOME, although it would be great if whatever investigatory method answers this question might also apply under different desktops, like Unity. The answer to this question is essentially how I was doing it in 10.04 / GNOME 2, although the questioner's query isn't exactly addressed - how to get directly to "Broadcast" with a key combination. Again, it would be great if an answer delving into how such menus work and how they interact with the rest of the system would be applicable to pinpoint menu items.

    Read the article

  • Wireless very slow. Changed mode from Infracstructure to Ad-hoc

    - by Dan
    This is my first time using Linux so go easy on me :) I downloaded and installed Mint 11 couple of days ago and I was having trouble connecting to internet with wifi. Actually it says it connects but does not load any webpages. I tried to get help from this model of laptop owners (Asus G73SW) who uses mostly Ubuntu but they said they never had any problem right from install. So I decided to try out Ubuntu 11.04. Same thing. BUT now I get internet after going into Network Connection edit and changing the Mode from Infracstructure to Ad-Hoc. I get load pages but very slow. And if I'm not mistaken, as I was writing this paragraph, I might have been disconnected. However the wifi bar is full. Please help me this newb because I really want to keep using Ubuntu but I might just have to go back to W7 if nothing can be done. Thank you!

    Read the article

  • How do you stop yourself from programming?

    - by dan
    Lately I've started earning enough off my software to not have to do consulting to support myself. So I work full time designing and writing my own software products. The problem is that there are no boundaries between my work and my life any more. When I mostly did consulting, I was weary enough of work at the end of the workday to go home and do other things. But now, I sit down to program in the morning, and before I know it it's 11pm and I'm still writing software and not bored or tired at all. I have to force myself to go to sleep. I feel happy and fulfilled, but objectively, I know I need more balance and variety in my life. Any tips or suggestions on how to pull yourself away from the console?

    Read the article

  • Is it best to try to work at a company where your software directly makes the company money?

    - by Ryan Hayes
    I was told once that the best place to work as a developer is a company where the software you write is what makes the company money, whether it be software production or software services like consulting. This is opposed to a company where the software you write is just to support some other part of the business that makes the money, like manufacturing or finance. I know there are always exceptions, but in general, are employees treated better if they are on the front lines of profit generation, as opposed to being just another cost center? cost center (n.) - A cost center is part of an organization that does not produce direct profit and adds to the cost of running a company. Examples of cost centers include research and development departments, marketing departments, help desks and customer service/contact centers.

    Read the article

  • I am trying to figure out the best way to understand how to cache domain objects

    - by Brett Ryan
    I've always done this wrong, I'm sure a lot of others have too, hold a reference via a map and write through to DB etc.. I need to do this right, and I just don't know how to go about it. I know how I want my objects to be cached but not sure on how to achieve it. What complicates things is that I need to do this for a legacy system where the DB can change without notice to my application. So in the context of a web application, let's say I have a WidgetService which has several methods: Widget getWidget(); Collection<Widget> getAllWidgets(); Collection<Widget> getWidgetsByCategory(String categoryCode); Collection<Widget> getWidgetsByContainer(Integer parentContainer); Collection<Widget> getWidgetsByStatus(String status); Given this, I could decide to cache by method signature, i.e. getWidgetsByCategory("AA") would have a single cache entry, or I could cache widgets individually, which would be difficult I believe; OR, a call to any method would then first cache ALL widgets with a call to getAllWidgets() but getAllWidgets() would produce caches that match all the keys for the other method invocations. For example, take the following untested theoretical code. Collection<Widget> getAllWidgets() { Entity entity = cache.get("ALL_WIDGETS"); Collection<Widget> res; if (entity == null) { res = loadCache(); } else { res = (Collection<Widget>) entity.getValue(); } return res } Collection<Widget> loadCache() { // Get widgets from underlying DB Collection<Widget> res = db.getAllWidgets(); cache.put("ALL_WIDGETS", res); Map<String, List<Widget>> byCat = new HashMap<>(); for (Widget w : res) { // cache by different types of method calls, i.e. by category if (!byCat.containsKey(widget.getCategory()) { byCat.put(widget.getCategory(), new ArrayList<Widget>); } byCat.get(widget.getCatgory(), widget); } cacheCategories(byCat); return res; } Collection<Widget> getWidgetsByCategory(String categoryCode) { CategoryCacheKey key = new CategoryCacheKey(categoryCode); Entity ent = cache.get(key); if (entity == null) { loadCache(); } ent = cache.get(key); return ent == null ? Collections.emptyList() : (Collection<Widget>)ent.getValue(); } NOTE: I have not worked with a cache manager, the above code illustrates cache as some object that may hold caches by key/value pairs, though it's not modelled on any specific implementation. Using this I have the benefit of being able to cache all objects in the different ways they will be called with only single objects on the heap, whereas if I were to cache the method call invocation via say Spring It would (I believe) cache multiple copies of the objects. I really wish to try and understand the best ways to cache domain objects before I go down the wrong path and make it harder for myself later. I have read the documentation on the Ehcache website and found various articles of interest, but nothing to give a good solid technique. Since I'm working with an ERP system, some DB calls are very complicated, not that the DB is slow, but the business representation of the domain objects makes it very clumsy, coupled with the fact that there are actually 11 different DB's where information can be contained that this application is consolidating in a single view, this makes caching quite important.

    Read the article

  • What are the dos and dont's when leaving a job? [closed]

    - by john ryan
    I'm going to resign from my current employer (manufacturing sector), where I've been working for 2.6 years as an IT Application Developer. It's the first company I've worked in after I graduated from college. I don't have any problem with the company, I just realized that I want to learn new technologies and get out of my comfort zone and move to the IT industry. I already got a job offer from another company. My IT manager has told me that I am one of the best players in our group, that our group is enough to support our company and that it would be unacceptable if anyone of us resigned. They will counter the offer, but I'm set on leaving. My problem is that I don't know what are the essential dos and don'ts when resigning from a current employer. For example I'm expecting a lot of inquiries on why I'm leaving from people in the company, what do I need to say?

    Read the article

  • Wireless connects but can not connect to internet

    - by Dan
    I'm using Ubuntu 11.04 and I'm having trouble connecting to internet via wifi. Ethernet cable works though. So when I log on it auto logs on to my wifi connection at home but after about a minute or so it gives me a popup: network disabled something about .local domain and something about Avahi network (sorry if you need more on what the popup says I will reboot and look at it again). I am using Atheros wireless card. My laptop is Asus G73SW and on the forum at notebookreview.com G73SW Owner's Lounge people said they had no problem with connecting via wifi from install. Please help me because I would love to keep using this beautiful OS.

    Read the article

  • Java is very slow on my laptop

    - by Ryan McClure
    I have 1.6.0_30 JRE on my 11.10 install. I have 3 GB of RAM and an Intel Core2 Duo CPU T6600 @ 2.20GHz × 2. Whenever I use my Java to play a game, the Java runs at about 4-5 FPS. When I used Windows, I found that I could get around 40 FPS. I'm not too terribly worried about this, but are there settings that I can tweak that I don't know about? If not, why is it that JRE Java can't do as much on Ubuntu as it can on Windows? Also, this may be related but I'm not too sure--My fan runs very fast when running a Java application. Is there a correlation?

    Read the article

  • Why aren't web frameworks simple, elegant and fun like programming languages? [on hold]

    - by Ryan
    When I think of pretty much any programming language - like C, C++, PHP, SQL, JavaScript, Python, ActionScript, Haskell, Lua, Lisp, Java, etc - I'm like awesome I would love to develop a computer application using any of those languages. But when I think of web frameworks(I do mostly PHP) - like Cake, CI, Symfony, Laravel, Zend, Drupal, Joomla, Wordpress, Rails, Django, etc - I'm like god no. Why aren't there web frameworks that provide me with simple, fun and powerful constructs like a programming language?

    Read the article

  • What's the best way to compare blocks in a matching game that can be multiple colors?

    - by Ryan Detzel
    I have a match 3-4 game and the blocks can be one of 7 colors. There are an addition 7 blocks that are a mix of the original 7 colors so for example there is a red and blue block and there is also a red/blue block which can be matched with either the red or the blue. My original thought is just to use binary operations so. int red = 0x000000001; int blue = 0x000000010; int redblue = 0x000000011; Then just do an & operation so see if they match. Does this sound like a decent plan or am I over complicating it? edit: Better yet so it's more readable. int red = 1; int blue = 2; int red_blue = 3; int yellow = 4; int red_yellow = 5; maybe as defines or static vars?

    Read the article

  • Adsense ads are not a good fit for my site

    - by Ryan Grush
    I run an academic network for college students to communicate at particular universities and we run Google Adsense. The site pulls in a decent amount for a side project but our CTR is horrible <0.2% and our RPM is equally low. The problem lies in the fact that Google pegs us as an education site (which we are) but shows our users ads for U of Phoenix, Devry U and other for-profit universities. All of our users are students of the more higher-caliber institutions and therefore have no use for these ads. I've known about this problem for some time but I don't know what to do to show more relevant ads instead (i.e. Spring Break, school apparel, poker, sports, etc). What would be the best way to change this?

    Read the article

  • Automatically revert to laptop screen when external monitor unplugged

    - by Ryan
    I regularly use an external monitor with my laptop, so when I use it, I usually have the laptop screen disabled when the monitor is connected, and this seems to cause problems when the monitor is disconnected. If the monitor is connected while the laptop screen is disabled, I can't get the X session to show up at all: I can Ctrl+Alt+F1 to open a terminal, and that works fine.. ..but Ctrl+Alt+F7 does nothing. The display is blank, and stays blank. The same thing happens whether I put the computer to sleep with the monitor connected, or if I disconnect while the computer is still awake. Rebooting the computer fixes the issue, as does killing Xorg and starting it again, but both of those are sub-optimal since I lose my current session. I'm currently using the open source graphics driver (xserver-xorg-video-ati). This question looks like it might answer my question, but unfortunately hwinfo is no longer available in the apt repository. Is there a way with current tools to automatically detect when the external monitor is disconnected and switch to the laptop display?

    Read the article

  • Accented characters representation in the URL

    - by Dan
    We have support for various languages in our website, including Spanish, French and Swedish. For now, the links in the site are NOT encoded before sent to the browser, sending the real accented chars (if such exists, i.e. href="www.(dot)example(dot)com/héllo.html") and not their HEX representation. This works & looks good on all browsers, including Chrome, FF and IE. However, we care great deal about SEO. We got this tip that encoding the links before sending them to the browser (so instead of linking to http://www.example.com/héllo, we will link to http://www.example.com/h%E9llo) will improve the way search engines will 'understand' the links and the keywords in the URL. This involves some work at our side, so we wanted to know if there's truth in that tip, but couldn't find anything addressing this issue.

    Read the article

  • HDMI Audio stops after TV turned off

    - by Ryan
    After the 12.04 Update my HDMI audio stops working anytime I turn off my 2nd monitor(plasma TV). Graphics card is a Radeon 6800 which has DVI out to 1st monitor, HDMI out to receiver which the TV gets it's Audio/Video. Audio is always via my receiver sound. Things work fine as long as it boots with the TV and Receiver on. Turn off the TV and BART's HDMI audio will go away, and the HDMI option vanishes from the sound menu. I had an occasional HDMI issue with 11.10 but turning on/off the TV would fix the sound. How can I hardcode things so that it always uses HDMI out of audio? I suspect the TV is sending a signal upon that 12.04 is now listening for. Turning the TV back on does NOT resolve this, and I'd suggest having the ability to override this new "feature" via sound menu.

    Read the article

  • Contract / Project / Line-Item hierarchy design considerations

    - by Ryan
    We currently have an application that allows users to create a Contract. A contract can have 1 or more Project. A project can have 0 or more sub-projects (which can have their own sub-projects, and so on) as well as 1 or more Line. Lines can have any number of sub-lines (which can have their own sub-lines, and so on). Currently, our design contains circular references, and I'd like to get away from that. Currently, it looks a bit like this: public class Contract { public List<Project> Projects { get; set; } } public class Project { public Contract OwningContract { get; set; } public Project ParentProject { get; set; } public List<Project> SubProjects { get; set; } public List<Line> Lines { get; set; } } public class Line { public Project OwningProject { get; set; } public List ParentLine { get; set; } public List<Line> SubLines { get; set; } } We're using the M-V-VM "pattern" and use these Models (and their associated view models) to populate a large "edit" screen where users can modify their contracts and the properties on all of the objects. Where things start to get confusing for me is when we add, for example, a Cost property to the Line. The issue is reflecting at the highest level (the contract) changes made to the lowest level. Looking for some thoughts as to how to change this design to remove the circular references. One thought I had was that the contract would have a Dictionary<Guid, Project> which would contain ALL projects (regardless of their level in hierarchy). The Project would then have a Guid property called "Parent" which could be used to search the contract's dictionary for the parent object. THe same logic could be applied at the Line level. Thanks! Any help is appreciated.

    Read the article

  • How was 20Q made?

    - by Dan the Man
    Ever since I was a kid, I've wondered how they made the 20Q electronic game. In this game, which is it's on device, you think of an object, thing, or animal (e.g. a potato or a donkey), once you mentally choose your thing, the device goes through a series of questions such as: Is it larger than a loaf of bread? Is it found outdoors? Is it used for recreation? For each of the questions you can answer yes, no, maybe, or unknown. The way I've always thought of it to work was with immense, nested conditionals (if statements). But, I don't think that would be very likely as it would be terribly difficult to understand while coding it. I'm not looking for a discussion as SE doesn't allow it; I'm looking for concrete knowledge or solutions.

    Read the article

  • Creating a portfolio of projects [closed]

    - by Ryan
    As I pursue the path of becoming a programmer, I would like to build up a portfolio of projects I worked on at my current job so that I can eventually get programming work elsewhere (either as an employee, contractor, one man consulting shop, etc). Some of these were things I coded myself, others I was instrumental in the architecture, design and functionality (ie, not as a programmer but more of a BA). How do I show the work that I have done to others on the projects that I have produced for the company I work at? This is all internal software, so it's not something that the outside world would be able to use, and some of our products contain proprietary financial market tools and it would not be prudent to share those with the outside world. My guess is that screenshots would definitely be out of the question, as well as functional descriptions of the software.

    Read the article

  • Does having a Google "stop word" in a domain name have less SEO benefit than not having it?

    - by Dan
    Let me explain. Let's say my keyword I want to optimize is "green giraffes". But the domain greengiraffes.com (singular, plural, no hyphen, hyphen, etc.) is not available. I know that the search results for "green giraffes" and "about green giraffes" are essentially the same because "about" is a "stop word". Does that therefore also mean that the domain name "aboutgreengiraffes.com" is as good as "greengiraffes.com" in terms of SEO value? Are all stop words equal in that regard, or a shorter one (such as "e" or "z") is better?

    Read the article

  • What is this chargeback scam? [on hold]

    - by Dan Friedman
    We have a scammer that is buying our e-Books and then performing chargebacks. Our e-Books don't have DRM, so if they wanted to resell them, they would only need to buy each book once. But instead, they keep buying the same books over and over again and then performing hundreds of chargebacks. We have created some additional rules in our fraud protection tools to block certain aspects, even though all the info looks legit, and are hopeful this will slow them down. But my question is: What is the scam? If they aren't getting any product and they only get chargebacks for something they already purchased, then they can't get additional money from the credit card company, so then what's their motivation?

    Read the article

  • Best way to redirect users back to the pretty URL who land on the _escaped_fragment_ one?

    - by Ryan
    I am working on an AJAX site and have successfully implemented Google's AJAX recommendation by creating _escape_fragment_ versions of each page for it to index. Thus each page has 2 URLs: pretty: example.com#!blog ugly: example.com?_escaped_fragment_=blog However, I have noticed in my analytics that some users are arriving on the site via the "ugly" URL and am looking for a clean way to redirect them to the pretty URL without impacting Google's ability to index the site. I have considered using a 301 redirect in the head but fear that Googlebot might try to follow it and end up in an endless loop. I have also considered using a JavaScript redirect that Googlebot wouldn't execute but fear that Google may interpret this as cloaking and penalize the website. Is there a good, clean, acceptable way to redirect real users away from the ugly URL if for some reason or another they end up arriving at the site that way?

    Read the article

  • Could someone explain in detail simplex /or perlin noise?

    - by Ryan Szemplinski
    I am really interested in perlin/simplex noise but I am having a difficult time understanding it. I am not very good at math but I am willing to learn because it interests me greatly. If someone is willing to dedicate there time into this I would be immensely appreciative of this. To be more concise, an explanation of functions and some calculation inside the functions would be nice to understand. Thanks in advance!

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >