I'm a n00b when it comes to JavaScript and the DOM... once I've opened up an HTML file in a shadowbox, how do I make a link so that the parent window changes?
I'm working through a problem where I want to select a different static content file based on the incoming Host header. The simple example is a mapping from URLs to files like this:
www.example.com/images/logo.gif - \images\logo.gif
skin2.example.com/images/logo.gif - \images\skin2\logo.gif
skin3.example.com/images/logo.gif -…
I am attempting to implemented an FPS-style camera by updating three vectors: EYE, DIR, UP. These vectors are the same that are used by gluLookAt (since gluLookAt is specified by the position of the camera, the direction it is looking at, and an up vector).
I have already implemented the left-right and up-down strafing…
What is the best way to solve programming questions when you are givien a question to write a program, in an exam for example where you have no computer to test it. Is there a certain technique that people use to help them solve these type of written problems? Or is it all down to knowlegde of the language?
I have this code:
Private Const MOUSEEVENTF_LEFTDOWN = &H2
Private Const MOUSEEVENTF_LEFTUP = &H4
Dim WindowHandle As Long = FindWindow(vbNullString, "Ultima Online")
SendMessage(WindowHandle, MOUSEEVENTF_LEFTDOWN, 0, 0)
SendMessage(WindowHandle, MOUSEEVENTF_LEFTUP, 0, 0)
I know it is getting the…
This is something I've never been able to figure out.
You've got a button offscreen you want to animate in. We'll call it 'btn.'
You've got a hit area that serves as the proximity sensor to trigger btn's animation. We'll call it 'hitZone' (as to not cause confusion with the hitArea property of display…
I'm using a BorderHighlighter on my JXTreeTable to put a border above each of the table cells on non-leaf rows to give a more clear visual separator for users.
The problem is that when I expand the hierarchical column, all cells in the hierarchical column, for all rows, include the Border from the…
I have a general question about the way that database indexing works, particularly in mysql. Let's say I have a table with a million rows with a column "ClientID" that is distributed relatively equally among 30 values. Thus, this column is very low cardinality (30) relative to the primary key (1…
This questions involves 2 different implementations of essentially the same code.
First, using delegate to create a Comparison method that can be used as a parameter when sorting a collection of objects:
class Foo
{
public static Comparison<Foo> BarComparison = delegate(Foo foo1, Foo…
Hi! I'm very new to C#, so please forgive me if I've overlooked something here. I've created a database using Visual Studio (add new item service-based database) called LoadForecast.mdf. I then created a table called ForecastsDB and added some fields.
My main question is this: I've created…
I have a couple of lists of items:
specials = ['apple', 'banana', 'cherry', ...]
smoothies = ['banana-apple', 'mocha mango', ...]
I want to make a new list, special_smoothies, consisting of elements in smoothies that start with the elements in specials. However, if specials is blank,…
Do I need to pay the $30 just to play around in the sandbox for Website Payments Pro? I'm trying to get Active Merchant working in Rails, and it's giving me an error "invalid merchant configuration"... after digging around a bit it says I need to "accept the billing agreement" and/or…
hi I'm a fresh newbie to mongodb
Q1
using
query=new BasicDBObject();
query.put("i", new BasicDBObject("$gt",13));
and
query=new QueryBuilder().put("i").Greaterthan(13).get()
is there any difference inside of the system?
Q2
I've created a class
class findkv extends…
In goofing around with some F# (via MonoDevelop), I have written a routine which lists files in a directory with one thread:
let rec loop (path:string) =
Array.append
(
path |> Directory.GetFiles
)
(
path
|>…
I'm seeing very poor performance while using the managed DirectDraw wrappers for WindowsMobile.
Microsoft.WindowsMobile.DirectX.Direct3D
I would appear the biggest bottle neck is calling Device.Present() after building up the scene.
When using the…
I'm working on a new website using highchart. But i have a little issue with how it looks / is setup.
I'm wondering if its possible to remove the "Tokyo, New York, Berlin, London" on the right side of the image? I would like to add a discription my…
Hello id like to get the current element firing this event inside the event,
Ideally I need the id, selected value and class, Thanks in advance
$(document).ready(function () {
$("#positions select").live("change", function () {
var id…
Is there a simple way to change the default error values in the jQuery validation plugin?
I just want to rewrite the error messages to be more personal to my app--I have a lot of fields, so I don't want to set the message individually for field…
I've been looking all over for decent instructions on how to get hgwebdir working on IIS but I haven't found much of worth.
There's this "step by step" on the Mercurial wiki, but it's not very good.
There's also this and this, but again, I…
I have a library function that sets up my forms, and submits data. They're long, and they work, so I'll spare you reading my code. :)
I simply need a way for my functions to determine how to handle the data.
Until now, the function did…
I am looking to export from Filemaker using column names (instead of positions). Currently I export the following XSL stylesheet that exports by position with:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet…
What the best way to store CSPC and UPC codes are in Rails? I used integers with SQLite, but had overflow issues when moving to production. I've since switch to strings, but am not sure if a better generic datatype (needs to…
I have two views that I would like to combine into one.
The first view shows all items of X where company ID = Y. This is to give preferential sort to the client first, and then everyone else.
So I created a second view,…
I'm currently using StructureMap to inject instances of NHibernate ISessions using the following code:
ObjectFactory.Initialize(x =>
{
x.ForRequestedType<ISession>()
.CacheBy(InstanceScope.PerRequest)…