- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 3
64 Posted Topics
Hi everyone, I need some help with the lookat matrix... This is my code [CODE] Matrix Matrix::CreateLookAt(Vector3 eye, Vector3 target, Vector3 up) { Vector3 forward = target - eye; forward.normalize(); Vector3 side = Vector3::cross(forward, up); side.normalize(); up = Vector3::cross(side, forward); Matrix m; // Defaults to identity matrix m.m11 = side.x; … | |
Re: does this work? [code=sql]SELECT COUNT(x.*) AS countx, COUNT(y.*) AS county, COUNT(z.*) AS countz, (countx+county+countz) AS total FROM mytable1 AS x, mytable2 AS y, mytable3 AS x[/code] Edit: No. but the following works [code=sql]SELECT countx+county+countz AS total FROM (SELECT COUNT( * ) AS countx FROM table1) AS x, (SELECT COUNT( * … | |
Hi, I am trying out a template architecture for php websites. What I am doing now is there is a .php file for processing "display" data and one or more .tpl template to do the layout and formatting. The interface between the .php and the .tpl is of course the … | |
Hi, I have a table `Categories` with fields (category_id, category, parent_category_id) I want to write in a single query to replace the parent_category_id with the corresponding category_name. [CODE] // OBJECTIVE: To return all category names and parent category names // if category is root (no parent), parent category name is … | |
Hi, Without first knowng what public class variables the class has, how can i display a list of all the variables in that class along with the values? [CODE]print_r(new MyClass());[/CODE] will display the public variables and values, plus some other unwanted entries, but I cannot do anything with them. I … | |
Hi, This came from my network course, hope someone can explain what the hertz in this situation refers to and how to arrive at the result: "The minimum bandwidth required for a TV channel to be used as a 60Mbps (approx) network link is 6Mhz, assuming signal to noise ratio … | |
Re: I have am working on a project and have some funny usage for references. Just my two cents: [CODE] class Vector { public: float v[3]; float &x, &y, &z; // we can access the x, y, z values in both ways. // note that a union clause can achieve the … | |
Hi folks, I have a mathematic Vector3 class that looks like [CODE] class Vector3 { public: union { struct { float x; float y; float z; // btw, if declared like // float x, y, z; // will there be a difference in packing order? }; float v[3]; }; // … | |
Hi, I am currently trying to do a website with both chinese and englis text, and I have problems displaying chinese text. I uploaded a set of identical website files to 2 different servers and domains, and one displays chinese character but has messed up layout, the other does not … | |
Hi, I am working on my web site and I ran into a peculiar problem... it seems that UTF-8 .php is creating some layout problems for me. Is this possble? I am creating the website in 2 version fully identical, except that one in chinese and the other in english. … | |
Hi, I made uploaded 1 set of website sites to different domains (and server) using filezilla. The code is all manually typed using Notepad++. Now, one site jttech.com.hk show the chinese text, but the other sandbox.desk.vuox.com shows ???????? see [url]http://sandbox.desk.vuox.com/index.php[/url] and [url]http://jttech.com.hk/[/url] top right corner, the language selector. Anyone knows … | |
Hi, I would like to learn how a VPN works, but all I could google up were phrases like "VPN creates a private [I]tunnel/road/connection [/I] between two points/LAN, [I]piggybacked [/I]on the internet, and making both LAN appear like a single one." However, the above does not explain anything useful at … | |
Hi, I need some help on how to use the define a tab loop and making it work correctly in Flash AS3 CS4 FP9. Greatly appreciate any hinting or clue on how to solve this mind bogging issue. Thanks!! If you do not wish to read the details, my short … | |
Hi, May I ask what is the correct syntax to achieve the following function pointer pattern? I keep getting error C2064: term does not evaluate to a function taking 0 arguments Thank you. [CODE] class Apple { public: Apple(int i) { if(i == 1) { juicer = &Apple::one; } else … | |
Re: [QUOTE=yieldfried;1139730]Hi can i connect remotly to a wierless connection like cdma gsm[/QUOTE] Much like you have a WiFi adapter to connect to WiFi signals, you need wireless CDMA/GSM modem and this is a piece of hardware you have to accquire. As for sending data through the modem, it depends on … | |
Hi all, (sorry, I am not sure of the technical terms and jargon) I am currently using MySQL for an "inheritance pattern" (please advice on the correct terminology) where I have a "base table" with auto_increment and "sub_type table" that has id that reference the base id. I see the … | |
Re: [QUOTE=death_oclock;1104752]Thanks, the "working directory" option was the one I was looking for.[/QUOTE] You can also set the Environment and turn on Merge Environment so that you don't have to copy all the .dll to your working directory. In Environment type in: [CODE] Path=$(PATH);c:\my\dll\directoy\;d:\another\dll\directory;[/CODE] | |
Hi there, I'm so frustrated now =( I have read the forums and this [URL="http://www.goingware.com/tips/member-pointers.html"]http://www.goingware.com/tips/member-pointers.html[/URL] But i still cannot get this to work: [CODE]class FileParser { public: void load(char* file) { MyDocumentClass _mDoc; _mDoc.LoadFile(file); // is this correct syntax? parse(_mDoc, &(FileParser::saveElement)); // or is this correct? parse(_mDoc, &(this->saveElement)); } private: … | |
Hi, I have a Win32 + OpenGL sort of graphics engine I wrote myself for a simulation software project (still in progress). The problem is that this software must also have a linux version. Now this software is using MDI and Docking windows and what not so I am not … | |
Re: Actually I think the lowest part would the LIKE clause... isn't it? | |
Re: [QUOTE=ytregnn;1102760] I use an external network card (Philips SNN6500) and they have something called "Philips Wireless Network Manager" but I've only used the usual Window XP "Connect to a network". For some reason I can't find any network at all in this, it just says "It's not possible to configurate … | |
Re: [QUOTE=sonisuhas;1101126]how does the ramdomize function works?? does it have some formulae to bring out its output?[/QUOTE] afaik, a sequence of digits e.g. 8532054032548682364893584362054... is stored in ... (somewhere) ...; Before the call the rand() function, you supply it with a "seed" which sorts of put a finger at one digit … | |
Re: Look at PHP session_start() [url]http://php.net/manual/en/function.session-start.php[/url] | |
Hi, I am playing around and trying to understand template singleton class and I accidentally created something that I am surprise it even runs. What I don't understand is when did Apple and Orange instances get created? Could you also comment on the good and bad of the Singleton class … | |
Hi, This is a very convoluted problem I spent hours debugging to find that when I call std::vector<object>::push_back(Object()) destructor of previous Object is called. Is this the behaviour of std::vectors or is something wrong with my code? [CODE]#include <iostream> #include <vector> class Manager; class Entity { friend class Manager; private: … | |
Hi, I am trying to set up a redirect 301 and have tried several methods which appears to be all wrong. Can anyone advice exactly how redirect 301 works? [CODE]redirect 301 http://newdomain.com/ redirect 301 / http://newdomain.com/ redirect 301 http://olddomain.com/ http://newdomain.com/ redirect 301 http://www.olddomain.com/ http://newdomain.com/ redirect 301 /^(.*)$ http://newdomain.com/$1[/CODE] Ideally, [url]http://olddomain.com[/url] … | |
Hi matlab experts, I didn't think daniweb has a matlab forum so I went over to another math forum to ask for matlab help. but i think it's either I am too stupid for the mathematicians or they are too smart to realize that it is NOT obvious what i … | |
hi, just want to ask, is it possible to restrict friend acess to a single class member function only? in other words, if class A grant class B friend access to class A member function, then class B can call that class A function. *note: this is suppose to be … | |
Hi, I am trying to implement a Data Manager class (singleton) that initializes data, keep track of memory usage and acts as a data pool for other classes to share the data. My problem lies with the sharing. After considering serveral factors, I want to share data in the form … | |
Hi, I have the following functions [CODE]void LoadData(char* file, float* data1, float* data2) { // read data size and contents from file data1 = new float[dataSize1]; data2 = new float[dataSize2]; // store data data1[0] = 1.0f; data1[1] = 2.0f; // etc ... } void ComputeData() { float *data1 = NULL; … | |
Hi all, How about this? In this example, what is the correct way to initialise Secret mission? [CODE]class Secret { private: int data; public: Secret(int _data) { data = _data; } }; class Mission { public: Secret mission; Mission(); { } };[/CODE] the only way i know of is using … | |
Hi all, Maybe you can help me with this... in the code [CODE]float dot(const Vec3& v) const { return (x * v.x) + (y * v.y) + (z * v.z);}[/CODE] What is the purpose of the keyword const? Why in the case of [CODE]Vec3 operator=(const Vec3& v) const { x … | |
Hi all, Hope you can help. Thanks. I want to set up a network where: 1. a single host computer gets wireless internet connection from a office wireless access point. 2. the host computer broadcasts the wireless internet connection. 3. client computers can log on to the broadcasted wireless internet … | |
Re: Go look at some cool flash sites and try to replicate it. If you are not already a flash professional, I am sure you will start to learn new classes to get the job done. Sometimes, you will realise that third party API and classes help you accomplish your task … | |
Re: What do you mean by properly and what is it showing now? you will need to use the date() function and its formatting string. [url]http://sg.php.net/manual/en/function.date.php[/url] | |
Re: Assuming it is in AS3, basically, addEventListener to each of the buttons and listen for MouseEvent.MOUSE_OVER. then use the handler to set a global flag to indicate that button has been rolled over. Finally, check that the flag matches the required flag value before you allow the user to proceed. … | |
Hi, I have an xml document with the following line: [CODE]<title><![CDATA[HOME & DÉCOR]]></title>[/CODE] this xml document fails in IE7 and IE8 reporting invalid charcter at the E acute. However, FF3 is able to display it correctly. Some online sources suggest that IE is correct in identifying the invalid character. Can … | |
Hi, Seen many tutorials teaching how to make 404 redirect to an existing page or do a custom 404 page. How can I do the converse i.e. any file access in the root directory will return a 404? for example the following files exist, but I want to display 404 … | |
Hi, I have tried to find out on this, but I cannot be sure. Anyone knows for certain fopen and file_get_contents (or any similar functions) will generate an entry in the target domain's website traffic stats? I know this could be traffic analyser specific, so for a start, will it … | |
Hi, I am setting up a cron using php. I have a file which I want to update by doing file_put_contents() on it via cron and via web browser (manual). everything via web brower works fine, but cron gives a "permission denied". I am overwriting the file each time it … | |
In a data/view architecture or template engine, should HTML forms be part of view or data? I tried several methods to separate HTML form design and form names (variables) but seem like a chicken and egg problem. is it common that the view designer must know all the form names … | |
Re: or you can do a fopen HTTP POST from the email_order.php [CODE] $fp = fsockopen($host, 80); // send headers fputs($fp, "POST /cgi-bin/webscr HTTP/1.1\r\n"); fputs($fp, "Host: https://www.paypal.com/ \r\n"); fputs($fp, "Referer: www.yourdomain.com \r\n"); fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n"); fputs($fp, "Content-length: ". strlen($data) ."\r\n"); fputs($fp, "Connection: close\r\n\r\n"); fputs($fp, $data); // get the output $result = … | |
Hi everyone, Say I have a MovieClip that has nested MovieClips for example [CODE]person_mc > body_mc > toe_mc > toe_nail_mc > leg_mc > hand_mc[/CODE] Then, I want to export this person_mc and use AS3 to move the body parts _mc around. How do I reference the body parts? Ideally, I … | |
Re: [CODE]// create the XML data $xmlData = CreateSomeXMLFromSQL(); // tell the browser its XML header("content-type: text/xml"); echo $xmlData;[/CODE] | |
Oops, seems like I am asking too much question in this forum.... hehe.. So now in the first frame, I put (using the GUI tools) a textfield in flash CS4 and give it an instance name "Status". What I want to do is to update this status from other classes … | |
Hi all, Need some advice here: I wrote some code to recieve KeyboardEvents but when I "Test Movie" inside the flash program, many keys are being captured by the flash program instead of my swf test movie. Most notably, all alphabets are trapped only numbers are detected within the swf. … | |
Re: [CODE]// get number of colors $val = $_GET['val']; // $val starts from 1 for($i = 1; $i <= $val; $i++) { $color = $_GET["col".$val]; echo $color; }[/CODE] After a second thought, i'm not sure if i understood you question. Because there's no dynamic arrays involved. If you really want dynamic … | |
Re: You should post your entire query and let use know the structure of your table you are querying. this might be the case that certain values are not accepted by the table structure definition. | |
Re: I don't think you can do that. The entrance page will not be able to be AJAX-loaded. The entrance page will need to "host" the AJAX call. Unless of cos, you use a dummy entrance page for every URL request. so you HTML-load the dummy, then AJAX-load the actual page. … | |
Re: the most correct way to do it is probably through the use of a 301 .htaccess redirect. create a file known as an .htacess file with the filename ".htaccess" using notepad (or any ascii text editor). This file should be in the root folder of your website such as public_html. … |
The End.