Search Results

Search found 1439 results on 58 pages for 'joe schneider'.

Page 37/58 | < Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >

  • In game programming are global variables bad?

    - by Joe.F
    I know my gut reaction to global variables is "badd!" but in the two game development courses I've taken at my college globals were used extensively, and now in the DirectX 9 game programming tutorial I am using (www.directxtutorial.com) I'm being told globals are okay in game programming ...? The site also recommends using only structs if you can when doing game programming to help keep things simple. I'm really confused on this issue, and all the research I've been trying to do is very confusing. I realize there are issues when using global variables (threading issues, they make code harder to maintain, the state of them is hard to track etc) but also there is a cost associated with not using globals, I'd have to pass a loooot of information around very often which can be confusing and I imagine time-costing, although I guess pointers would speed the process up (this is my first time writing a game in C++.) Anyway, I realize there is probably no "right" or "wrong" answer here since both ways work, but I want my code to be as proper as I can so any input would be good, thank you very much!

    Read the article

  • Ruby on Rails: has_many through frustrations

    - by Joe Cairns
    I'm having a frustrating problem with a has_many through: namely the fact that the through models are not created until save. Unfortunately, I need to set data on these models prior to saving the parent. Here's the loose setup: class Wtf < ActiveRecord::Base belongs_to :foo belongs_to :bar end class Bar < ActiveRecord::Base has_many :wtfs has_many :foos, :through => :wtfs end class Foo < ActiveRecord::Base has_many :wtfs has_many :bars, :through => :wtfs def after_initialize Bar.all.each do |bar| bars << bar end end end Everything is fine except that I need to access the "wtf"'s prior to save: f = Foo.new = # f.bars = [list of bars] empty list here f.wtfs = [] f.save! = true now I get stuff f.wtfs = [list of stuff] I even went so far as to explicitly create the wtfs doing this: def after_initialize Bar.all.each do |bar| wtfs << Wtf.new( :foo => self, :bar => bar, :data_i_need_to_set => 10) end end This causes the f.wtfs to be populated, but not the bars. When I save and retrieve, I get double the expected wtfs. Anyone have any ideas?

    Read the article

  • How to Store and Retrieve Images Using SQL Server (Server Management Studio)

    - by Joe Majewski
    I am having difficulties when trying to insert files into a SQL Server database. I'll try to break this down as best as I can: What data type should I be using to store image files (jpeg/png/gif/etc)? Right now my table is using the image data type, but I am curious if varbinary would be a better option. How would I go about inserting the image into the database? Does Microsoft SQL Server Management Studio have any built in functions that allow insertions of files into tables? If so, how is that done? Also, how could this be done through the use of an HTML form with PHP handling the input data and placing it into the table? How would I fetch the image from the table and display it on the page? I understand how to SELECT the cell's contents, but how would I go about translating that into a picture. Would I have to have a header(Content type: image/jpeg)? I have no problem doing any of these things with MySQL, but the SQL Server environment is still new to me, and I am working on a project for my job that requires the use of stored procedures to grab various data. Any and all help is appreciated.

    Read the article

  • Creating Wiki Pages through code or CAML

    - by Joe Capka
    We are trying to create a site definition that includes a wiki page. Basically we are trying to figure out how to replicate the same process that happens when a user chooses to create a new page in a blank site, and the system says something along the lines of: "In order to create wiki pages on this site, there must be a default wiki page library and site assets library. Would you like to create those document libraries now?" When the user chooses yes, the system provisions those libraries as well as a few "howto" wiki pages. If anyone knows how to trigger that roll-out though code or CAML, we would appreciate the help.

    Read the article

  • Should I rebuild table indexes after a SQL Server 2000 to 2005 database migration

    - by Joe T
    I'm tasked with doing a SQL Server 2000 to 2005 migration. I will be doing a side-by-side migration. After restoring from a backup I plan to do the following: ALTER DATABASE <database_name> SET COMPATIBILITY_LEVEL = 90; DBCC CHECKDB(<database_name>) WITH NO_INFOMSGS DBCC UPDATEUSAGE(<database_name>) WITH NO_INFOMSGS exec sp_updatestats ‘resample’ Should I rebuild table indexes before using DBCC UPDATEUSAGE and sp_updatestats? Have I missed anything obvious that should be executed after a migration? All help would be warmly up-voted. Thanks

    Read the article

  • How can I get values from one table to another via similar values?

    - by Andrija
    I have a table called excel that has 3 columns, name, id, and full_name. The name part is the only one I have and I need to fill id and full_name. The other table that contains the data is called tim_pismena and has 2 columns that I need, id and pismeno_name (the actual names are not important, but i'm writing them just for clarity). In pseudooracle code :) the select that gets me the values from the second table would be done something like this: SELECT tp.id, tp.pismeno_name FROM tim_pismena tp WHERE upper(tp.naziv_pismena) LIKE IN upper('%(SELECT ime as FROM excel)%') and when used with an insert, the end result should be something like name id full_name Happy Joe 55 Very fun place Happy Joe, isn't it?

    Read the article

  • JavaScript constructors inside a namespace

    - by Joe
    I have read that creating a namespace for JavaScript projects helps to reduce conflicts with other libraries. I have some code with a lot of different types of objects for which I have defined constructor functions. Is it good practice to put these inside the namespace as well? For example: var shapes = { Rectangle: function(w, h) { this.width = w; this.height = h; } }; which can be called via: var square = new shapes.Rectangle(10,10);

    Read the article

  • Whats the difference between theese two java code snippets?

    - by Joe Hopfgartner
    I have this code i am doing for university. The first code works as expected, the second one provides different results. I can not see what they are doing differently?? first: public Mat3 getNormalMatrix() { return new Mat3(this.getInverseMatrix()).transpose(); } second: public Mat3 getNormalMatrix() { Mat4 mat = this.getInverseMatrix(); Mat3 bla = new Mat3(mat); bla.transpose(); return bla; }

    Read the article

  • How does Process Explorer enumerate all process names from an XP Guest account?

    - by Joe
    I'm attempting to enumerate all running process EXE names, and have stumbled when attempting this on the XP Guest account. I am able to enumerate all Process IDs using EnumProcesses, but when I attempt OpenProcess with PROCESS_QUERY_INFORMATION Or PROCESS_VM_READ, the function fails. I fired up Process Explorer under the XP Guest account, and it was able to enumerate all process names (though as expected, most other information from processes outside the Guest user-space was not present). So, my question is, how can I duplicate the Process Explorer magic to get the process names of services and other processes running outside the Guest account user-space?

    Read the article

  • AutoComplete textbox and "Hide Pointer While Typing" in windows

    - by Joe
    How can the "Hide Pointer While Typing" option be disabled by application? I'm having an issue with the cursor hiding and not getting it back without pressing escape or losing window focus. The application has been written in C# and uses WPF. A technology specific answer is not required because it'll likely be possible using any technology. Here's the scenario: A user can type in a TextBox and an AutoComplete list shows up below the box. Once the user starts typing though, he/she can no longer select an item from the drop down because there is no mouse cursor. I noticed that Firefox does not have this behavior. For example, while typing in a URL in the address bar the mouse cursor never disappears. There are other places I've seen this behavior so I know it must be possible. Any help is greatly appreciated!

    Read the article

  • modify class on runtime?

    - by joe doe2
    how can i modify the method in memory so it makes new objects with that modified method? for example i want to modify or add page_init handler on runtime for the next time the page loads? see this also for clarification: http://stackoverflow.com/questions/3005338/page-load-another-handler

    Read the article

  • Determining Best Table Structure for MySQL Performance

    - by Joe Majewski
    I'm working on a browser-based RPG for one of my websites, and right now I'm trying to determine the best way to organize my SQL tables for performance and maintenance. Here's my question: Does the number of columns in an SQL table affect the speed in which it can be queried? I am not a newbie when it comes to PHP or MySQL. I used to develop things with the common goal of getting them to work, but I've recently advanced to the stage where a functional program is not good enough unless it's fast and reliable. Anyways, right now I have a members table that has around 15 columns. It contains information such as the player's username, password, email, logins, page views, etcetera. It doesn't contain any information on the player's progress in the game, however. If I added columns for things such as army size, gold, turns, and whatnot, then it could easily rise to around 40 or 50 total columns. Oh, and my database structure IS normalized. Will a table with 50 columns that gets constantly queried be a bad idea? Should I split it into two tables; one for the user's general information and one for the user's game statistics? I know I could check the query time myself, but I haven't actually created the tables yet and I think I'd be better off with some professional advice on this important decision for my game. Thank you for your time! :)

    Read the article

  • Java - How to pass a Generic parameter as Class<T> to a constructor

    - by Joe Almore
    I have a problem here that still cannot solve, the thing is I have this abstract class: public abstract class AbstractBean<T> { private Class<T> entityClass; public AbstractBean(Class<T> entityClass) { this.entityClass = entityClass; }... Now I have another class that inherits this abstract: @Stateless @LocalBean public class BasicUserBean<T extends BasicUser> extends AbstractBean<T> { private Class<T> user; public BasicUserBean() { super(user); // Error: cannot reference user before supertype contructor has been called. } My question is how can I make this to work?, I am trying to make the class BasicUserBean inheritable, so if I have class PersonBean which inherits BasicUserBean then I could set in the Generic the entity Person which also inherits the entity BasicUser. And it will end up being: @Stateless @LocalBean public class PersonBean extends BasicUserBean<Person> { public PersonBean() { super(Person.class); } ... I just want to inherit the basic functionality from BasicUserBean to all descendants, so I do not have to repeat the same code among all descendants. Thanks!.

    Read the article

  • How to go 'back' 2 levels?

    - by Joe McGuckin
    From the list view of my app, I can view a list of records or drill down and edit/update a record. After updating, I want to go directly back to the list view, bypassing a couple of intermediate pages - but I don't simply want to link_to(:action => list) - there's pagination involved. I want to go back to the exact 'list' page I came from. What's the best way? Pass a hidden arg somewhere with the page number? Is there an elegant way to accomplish this?

    Read the article

  • Rails: id field is nil when calling Model.new

    - by Joe Cannatti
    I am a little confused about the auto-increment id field in rails. I have a rails project with a simple schema. When i check the development.sqlite3 I can see that all of my tables have an id field with auto increment. CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "created_at" datetime, "updated_at" datetime); but when i call Message.new on the console, the resulting object has an id of nil >> a = Message.new => #<Message id: nil, text: nil, created_at: nil, updated_at: nil> shouldn't the id come back populated?

    Read the article

  • ASP.NET MVC Colon in URL

    - by Joe Morgan
    I've seen that IIS has a problem with letting colons into URLs. I also saw the suggestions others offered here. With the site I'm working on, I want to be able to pass titles of movies, books, etc., into my URL, colon included, like this: mysite.com/Movie/Bob:The Return This would be consumed by my MovieController, for example, as a string and used further down the line. I realize that a colon is not ideal. Does anyone have any other suggestions? As poor as it currently is, I'm doing a find-and-replace from all colons (:) to another character, then a backwards replace when I want to consume it on the Controller end.

    Read the article

  • Do I have to hash twice in C#?

    - by Joe H
    I have code like the following: class MyClass { string Name; int NewInfo; } List<MyClass> newInfo = .... // initialize list with some values Dictionary<string, int> myDict = .... // initialize dictionary with some values foreach(var item in newInfo) { if(myDict.ContainsKey(item.Name)) // 'A' I hash the first time here myDict[item.Name] += item.NewInfo // 'B' I hash the second (and third?) time here else myDict.Add(item.Name, item.NewInfo); } Is there any way to avoid doing two lookups in the Dictionary -- the first time to see if contains an entry, and the second time to update the value? There may even be two hash lookups on line 'B' -- one to get the int value and another to update it.

    Read the article

  • SharePoint Returning a 401.1 for a Specific User/Computer

    - by Joe Gennari
    We have a SharePoint Services 3.0 site set up supporting about 300 users right now. This report is isolated and has never been duplicated. We have one AD user who cannot log into the SharePoint site with his account from his machine and is subsequently returned a 401.1 error. If any other user tries to log on with their account from his machine, it works okay. If he moves to another machine and logs on, it works okay. The only solution to this point has been to install FireFox on the machine. When he authenticates with FF, everything is okay. Remedies tried so far: Cleared cookies/cache Turned off/on Integrated Windows Authentication in IE Downgraded IE 8 to IE 6 Removed site from Intranet Sites zone Renamed the machine Disjoined/Rejoined Domain

    Read the article

< Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >