Daily Archives

Articles indexed Saturday March 13 2010

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

  • Which data structure(s) to back a Final Fantasy ATB-style queue? (a delay queue)

    - by ZoFreX
    Situation: There are several entities in a simulated environment, which has an artificial notion of time called "ticks", which has no link to real time. Each entity takes it in turns to move, but some are faster than others. This is expressed by a delay, in ticks. So entity A might have a delay of 10, and B 25. In this case the turn order would go: A A B A A I'm wondering what data structure to use. At first I automatically thought "priority queue" but the delays are relative to "current time" which complicates matters. Also, there will be entities with larger delays and it's not unforseeable that the program will run through millions of ticks. It seems silly for an internal counter to be building higher and higher when the delays themselves stay relatively small and don't increase. So how would you solve this?

    Read the article

  • Google Maps in Drupal: reference to gmap object from JavaScript

    - by user280817
    Is there a way to obtain JavaScript references to the Google maps that are embedded into Drupal pages by the GMap module? I want to be able to manipulate the maps in these pages. I want to pan and zoom them. But I cannot find a reference to an embedded map object. I've dissected the relevant JavaScript objects Drupal.gmap and Drupal.settings.gmap with no success--unless I've overlooked something. The Drupal GMap module doesn't seem to explicitly provide references (within its API) to the GMap objects that it embeds into pages. It just generates themed text which is interpolated into the page. The technique of passing the HTML ID of the map container to either the GMap2 object constructor or the similar Drupal.gmap.getMap() function in order to obtain a map reference doesn't appear to work: Both simply return an instance to a new map, one having the same dimensions and basic characteristics of the original map, but apparently sans all of its overlays (which could contain markers). And I have to call setCenter() on it before I can use it, which initializes the structure, so I know it has no overlays.

    Read the article

  • How do I save a copy of the clipboard and then revert back to it?

    - by cksubs
    I'm reading words in a text box by simulating the key presses required to highligh and copy the text. When I'm done, I want the clipboard to be exactly how I found it. I was hoping I'd be able to do something like this: IDataObject clipboardBackup = Clipboard.GetDataObject(); Clipboard.Clear(); //Save other things into the clipboard here, etc// Clipboard.SetDataObject(clipboardBackup); But that doesn't seem to work. It looks like you can go the route of specifically trying for text, audio, pictures, etc. and then saving them accordingly. (I guess 'data object' is specialized like that in my example too, I was hoping it was generic.) I'd prefer not to use cases for every possible type of clipboard data, both to be more concise and to make sure I never lose the data regardless of format. Any tips for grabbing any and all of the clipboard and then restoring it?

    Read the article

  • jQuery Hover Problem - Hover Triggers on Mouse Move

    - by majman
    For reference: http://www.favsav.com/-public You'll notice that if you hover over a list item, the meta data slides up. If you leave your mouse still on top, and then move a smidgen to the left or right, it triggers again. There's some other silliness going on if you move around The code is pretty simple: $('li.post').hover(function(){ $(this).find('.meta').slideDown('fast'); }, function(){ $(this).find('.meta').slideUp('fast'); }) Any idea why things are behaving like this? This seems to only be happening in Firefox (i'm using 3.5.5 on OSX) UPDATE After restarting Firefox, all is well! Thanks for the input!

    Read the article

  • How to keep Hibernate mapping use under control as requirements grow

    - by David Plumpton
    I've worked on a number of Java web apps where persistence is via Hibernate, and we start off with some central class (e.g. an insurance application) without any time being spent considering how to break things up into manageable chunks. Over time as features are added we add more mappings (rates, clients, addresses, etc.) and then amount of time spent saving and loading an insurance object and everything it connects to grows. In particular you get close to a go-live date and performance testing with larger amounts of data in each table is starting to demonstrate that it's all too slow. Obviously there are a number of ways that we could attempt to partition things up, e.g. map only the client classes for the client CRUD screens, etc., which would have been better to get in place earlier rather than trying to work it in at the end of the dev cycle. I'm just wondering if there are recommendations about ways to handle/mitigate this.

    Read the article

  • HtmlForm.Action and .Net Framework 2.0/3.5 Query

    - by Brian
    Disappointingly, the members page for HtmlForm 2.0 is missing... My research seems to indicate that HtmlForm.Action is a property that was added in .Net Framework 3.5. However, I'm using VS2005 and my reference to System.Web (the namespace HtmlForm is under) is to a .Net Framework 2.0 runtime version. Further, my IIS status information also indicates I am using .Net Framework 2.0, when I force an error on my local IIS and read it. Despite this, I am able to use form1.Action successfully...but only on my local IIS. When I try it on vms and external servers, I get [MissingMethodException: Method not found: 'System.String System.Web.UI.HtmlControls.HtmlForm.get_Action()'.] errors. So, my question: 1) Why does it work on my local IIS? Does the fact that I have the 3.5 framework installed make a difference, here? 2) Why does it not work on other IIS? (I think this is because it's not part of .Net 2.0). I guess I just figure that if something is running on .Net Framework 2.0, the presence of 3.5 should not make a difference. Or maybe there's some other cause for these results.

    Read the article

  • Create list in existing site collection from a feature

    - by keysersoze
    I have created a feature, a publishing site, in Visual Studio to MOSS - this feature contains a masterpage, some page-templates, some site columns (grouped to match each page-template) and som custom list templates etc. I have also created a site collection, some sites and pages based on my feature. Now I have upgraded the code in my feature - I wanted a ListInstance to be created based on my custom list template. When I have upgraded my SharePoint (using WSPBuilder), the ListInstance and default data are visible if I create a new site collection, but existing site collection does not get the ListInstance and data. Is there anything I can do to update existing site collections to contain the ListInstance when upgrading?

    Read the article

  • do not highlight input value when tabbing over

    - by mkoryak
    This is a 2 part question: 1) click on one of the demo dropdowns on this page. when you tab over to the next input, the text is selected/highlighted in firefox. how can i prevent this from happening? 2) bonus: can you review my code that is hosted on google and tell me what i can improve?

    Read the article

  • SQL clone record with a unique index

    - by Milhous
    Is there a clean way of cloning a record in SQL that has an index(auto increment). I want to clone all the fields except the index. I currently have to enumerate every field, and use that in an insert select, and I would rather not explicitly list all of the fields, as they may change over time.

    Read the article

  • Is Samba Server what I'm looking for, and if so, what do I need? (currently on DD-WRT Micro)

    - by Anthony
    I am really confused as to what Samba actually does and how it works. Here's what I'm hoping it does: I set up a Samba server on my LAN, and everyone will be able to see each other's shared files and swap them. But some of the documentation makes it sound like it will just allow Mac/Linux computers to see Windows computers. Other bits of the documentation make it sound more like a local server, where a Linux machine would install Samba and they would see everyone and be visible to everyone, but that won't change if anybody else can see each other. While still other things I've read make it seem more like a file-server, where everyone sees each other but file transfers are not peer-to-peer but instead need a host disk for files to act as go between. So, assuming I'm even in the right ballpark of what Samba does in terms of my goal of total cross-visibility on the network, I am left with needing to know what I'd need to set up the server and whether it can be done and is worth it... DD-WRT's article on Samba is a bit ambiguous. One second it sounds as if I can run the server on micro as long as it's set up on a usb drive, but then it also sounds like micro can't run it at all, etc. If I can run it from a usb-connected drive, I still need to know if the files are actually stored on that drive. The dd-wrt article mentions: You can run a Samba server on your main computer and run a client on your router (thus gaining writable storage for the router) or you can use Samba to share a drive connected (typically by USB) to the router among all the computers connected to your network. That one part "to share a drive...among all the computers" makes it sound like the only benefit I get from Samba is a share drive that any OS on the network can see, but they still won't see each other. But I'm very hopeful I'm misreading this. If the computers can see each other but still need the disk, how much space is generally a good idea? I'm basing this on the idea that the drive is a temporary store point. Obviously I'd have to get a drive big enough to store everything people wanted to share if the drive is a full-on file server. If I do have this all wrong, is there any software that achieves what I have in mind? Something that connects to the main router to bridge all clients?

    Read the article

  • SQL Server 2005 Reporting Services - Configuration Manager & Management Studio Problems

    - by Nick
    When I open Reporting Services Configuration Manager on my server, an error message appears that says: Reporting Services Configuration Manager An unknown error has occurred in the WMI Provider. Error Code 800706B3 This error appears before I can even attempt to connect to an SSRS instance. In addition to this problem, I'm not able to connect to my SSRS instance via SSMS on my desktop. When I attempt to connect, I get the following error message: Microsoft SQL Server Management Studio Exception has been thrown by the target of an invocation. (mscorlib) Additional information: The operation could not be completed. (WinMgmt) Information about my environment: Server: Win Server 2K3 x64, SQL 2005 x64 SP3 Build 9.0.4053 Desktop: Windows 7 Enterprise x64 Steps I have already taken: I have installed the latest service pack on my server and workstation. I do not see any errors in my event logs.

    Read the article

  • Script to kill process at logoff doesn't execute until process is dead?

    - by robertc
    We have a program that, due to memory leaks in some of the screens, doesn't exit cleanly when the user quits. The problem is that this blocks the normal logoff procedure - you select logout and a few processes disappear but the user doesn't actually log off. Since I'm unable to fix the program, I thought I'd use a script run at logoff to kill the process. I've verified the script kills the process if I run it by double clicking and have added the script to Windows Settings - Scripts - Logoff on my machine in gpedit. Unfortunately it seems that the logoff scripts don't get run until all the processes have died, so it never runs. Is there a way to make the logoff scripts run at an earlier point in the process? Or is there a better approach to the issue?

    Read the article

  • Enhanced Explorer for Windows XP? [closed]

    - by iceman
    Possible Duplicate: Replacement for Windows Explorer? Is there a better explorer for Windows XP with Konqueror-like features (like dual panes), etc. Specially an enhanced integrated search option like in Vista? There are different products which cumulatively present something similar like xplorer2, Google Desktop Search or Windows Grep. But what about one integrated product?

    Read the article

  • Fixing Windows 7 explorer issues

    - by Cegorach
    OK, so here is the problem I'm hoping you guys can help me fix. On my Win7-Ult64 box, my explorer (among other things) has decided not to work. For example, if I try to use a program, say Chrome, to open a folder, I will get the message "Class not registered" (and its not program specific). In the same vein, when I go to Start-Rclick Computer-properties, nothing happens, but I can go to control panel-system properties and it will work. And other items in the control panel do nothing when I click them (and I have a feeling it is all tied together). I have already done multiple virus and spyware sweeps, so I know that isn't the problem. Any suggestions on what could be causing this/how to fix it (short of nuke and boot)?

    Read the article

  • How to get monitor resolution of 1680x1050 using ATI Radeon HD 2600 PRO in a dual monitor setup

    - by pratikk
    I have Sapphire ATI Radeon HD 2600 PRO graphics card in my Windows Server 2008 x64 machine. It has two outputs a VGA and a DVI. I have connected the DVI to my Dell 24" monitor with 1900x1200 resolution and it works 100%. The VGA I have connected to my second monitor a Samsung 22" with native resolution of 1680x1050. But the ATI driver and Catalyst control centre doesn't show this resolution as an option. If I choose a lower resolution like 1280x1024 it looks really bad and fuzzy. I searched in google and downloaded the powerstrip tool that allowed me to create a custom resolution of 1680x1050 and then this option shows up in Catalyst control centre and my 2nd monitor works fine now. But I don't want to pay for an application to choose a display resolution. Why doesn't ATI show me that option by default even though it has no problem in actually supporting the display at resolution. Is there a way to get 1680x1050 resolution using ATI drivers only ?

    Read the article

  • Multiple Out-of-Browser Applications in One Application

    - by Otaku
    I'm looking at a scenario where I need to create a single "master" Silverlight application and then add "child" applications for an out-of-browser Silverlight application. The scenario is something like this. A user will visit a gameboard web site and choose a game to play. Let's call it Checkers. He likes it, so then he installs the out-of-browser app to his desktop. He then finds Chess, and installs that too. For both games, while played on the site, he has stats (games played, win/loss records, etc.). For each game on the site, he navigates to a different page. But now he wants to play offline and view his stats and other cross-games information. He wants to have a single app to launch to play either game. From his single out-of-browser app, he sees that Go is also available, and he places a checkmark against it to download on his next connection. Does anyone have any experience at developing multiple out-of-browser Silverlight apps that reside within a single master app? What considerations need to be had for this type of design? How would this work in terms of install experience from different web pages?

    Read the article

  • What is array portability?

    - by bobo
    From this page: http://www.doctrine-project.org/documentation/manual/1_2/en/working-with-models#dealing-with-relations:creating-related-records You can see that it says $obj['property']; is the recommended way of referring to an object's property in Doctrine for array portability purposes. I never heard about this term before and google did not come up with useful result. What is that?

    Read the article

  • StructureMap : How to define default constructor by code ?

    - by cik
    Hi, I can't figure out how to define the default constructor (when it exists overloads) for a type in StructureMap (version 2.5) by code. I want to get an instance of a service and the container has to inject a Linq2Sql data context instance into it. I wrote this in my 'bootstrapper' method : ForRequestedType<MyDataContext>().TheDefault.Is.OfConcreteType<MyDataContext>(); When I run my app, I got this error : StructureMap Exception Code: 202 No Default Instance defined for PluginFamily MyNamespace.Data.SqlRepository.MyDataContext, MyNamespace.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null If I comment out all Linq2Sql generated contructors that I don't need, it works fine. Update : Oh, and I forgot to say that I would not use the [StructureMap.DefaultConstructor] attribute.

    Read the article

  • Is VB Really Case Insensitive?

    - by Otaku
    I'm not trying to start an argument here, but for whatever reason it's typically stated that VB is case insensitive and C languages aren't (and somehow that is a good thing). But here's my question: Where exactly is VB case insensitive? When I type... Dim ss As String Dim SS As String ...into the VS2008 IDE the second one has a warning of "Local variable 'SS' is already declared in the current block". In VBA VBE, it doesn't immediately kick an error, but rather just auto-corrects the case. Am I missing something here with this argument that VB is not case sensitive? (Also, if you know or care to answer, why would that be a bad thing?) EDIT: Why am I even asking this question? I've used VB in many of it's dialects for years now, sometimes as a hobbyist, sometimes for small business-related programs in a workgroup. As of the last 6 months I've been working on a big project, much bigger than I anticipated. Much of the sample source code out there is in C#. I don't have any burning desire to learn C#, but if there are things I'm missing out on that C# offers that VB doesn't (an opposite would be VB.NET offers XML Literals), then I'd like to know more about that feature. So in this case, it's often argued that C languages are case sensitive and that's good and VB is case insensitive and that is bad. I'd like to know A) how exactly is VB case insensitive because every single example in the code editor becomes case sensititive (meaning case gets corrected) whether I want it or not and B) is this compelling enough for me to consider moving to C# if VB.NET case is somehow limiting what I could do with code?

    Read the article

  • What's the best way to move "a child up" in a .NET XmlDocument?

    - by Mike
    Given an XML structure like this: <garage> <car>Firebird</car> <car>Altima</car> <car>Prius</car> </garage> I want to "move" the Prius node "one level up" so it appears above the Altima node. Here's the final structure I want: <garage> <car>Firebird</car> <car>Prius</car> <car>Altima</car> </garage> So given the C# code: XmlNode priusNode = GetReferenceToPriusNode() What's the best way to cause the priusNode to "move up" one place in the garage's child list?

    Read the article

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