Jump to content

  • Log In with Google      Sign In   
  • Create Account


Uthman

Member Since 11 Jan 2000
Offline Last Active Sep 02 2013 08:13 PM

Topics I've Started

simple sql question

23 December 2012 - 08:55 PM

Q1: Regarding indexing foreign keys on InnoDB

Is this required? Is it a best practice?

 

Q2: If the answer to Q1 is `Yes`, what about if I have two FK's and I only ever reference them at the same time--should I create individual indices along with the group index, or would the group index suffice?

 

EG: Table name = Object

Object has two FK's: User1, User2

 

I only ever access the table while searching using WHERE User1='' AND User2=''.

 

Any incites from gd's sql gurus would be much appreciated and ++thanks in advance.


visited this site daily

17 May 2012 - 08:17 PM

by a show of hands, how many of you frequented this site daily, back in the year? and how many of you have entries on it? =)

Android WebView

01 February 2012 - 03:28 PM

I'm programming a small Android app. It's basically an HTML5 jQueryMobile application displayed in an Android WebView. I noticed that jQM's rounded corner CSS for input elements gets all funky and pixelated in the WebView (even when zoom is disabled). This artification is also present when I view my pages within Android's default browser.

When I view my pages on a regular machine or even on Firefox mobile / opera mini, they render properly. Here are some screenshots taken from my device. The one on the left is from the web view.

Is there any way to get the webview to render the CSS properly / get better quality?

Posted Image

electric field due to a line of charge

31 March 2011 - 10:29 PM

Hi guys,

I've been working on this problem for a while now. Basically what I want to do is calculate the electric field at an arbitrary point due to an arbitrary line of charge.

All physics classes, books and sites I've visited on the internet set this problem up in the exact same way -- the line of charge is restricted to an axis (usually the x-axis) and the point is floating over it. For my simulation, the finite line of charge might be anywhere, and the point might be anywhere in 3D. To overcome this, my previous solution was to rotate my frame of reference into a more favorable configuration so that I could solve the integral using the standard textbook method. This seemed to work, but I felt that I could save a lot of cycles by figuring out how to do the integration directly.

I have attempted to do this for a 2D example. Here, I parameterize my line as a function of time, letting time range from 0 to 1. Then I integrate with respect to t. On paper, everything looks like it should work. But when I plug in values, the results don't add up. Please see this picture for an example. The first solution is using the textbook method and setup for solving. I get Ex=-0.2163 and Ey=0.3121. When I use my method, the answers come out as Ex=-0.0270 and Ey=0.03901.

What am I doing wrong?? I should be able to do the 't' thingy because we do the exact same thing with theta for curves... I based my work off of these examples.

Posted Image

Quaternion Rotation

22 March 2011 - 02:54 PM

Hi Gamedev,

I've been stuck on this issue for a while and wanted to know if anyone could give me some direction...

Given an arbitrary line and a point in R3, how would I compute the quaternion that rotates the plane such that one of the components drops out (say Z), and furthermore orient it such that the line resides along one of the axes (say X)? I want to eventually do some integration over the line, but the setup is horribly disgusting in it's current form, so I'm trying to simplify the computations by changing my frame of reference ahead of time:

Posted Image

Thanks in advance for any assistance '=T

PARTNERS