I stumbled across this C code today. Can anyone tell me what the 'where' keyword means:
*y = sy + exit->y + (where * (entry->y + esy - exit->y));
Edit:
Ah.. my bad. It is just a variable name. VC++ highlighted it as though it was a keyword though.
...
I'm talking about the performance increase here. From all I know you can echo variables in double quotes ("), like so:
<?php
echo "You are $yourAge years old";
?>
But single quotes will just return You are $yourAge years old. But what about performance differences? I've always gone by the rule that single quotes are faster because t...
Is it possible to update the same view with new data? Using UPDATE after CREATE didn't seem to work.
Have only 1 table. Want the view to be a subset of that table. After using the view, I would like the same view to hold a different subset of the data from the only table.
Was thinking I can create the view, drop it, then create it ...
I am trying to do the following:
<?php foreach($sqlResult as $row): ?>
<tr>
<?php foreach($formdata['columns'] as $column): ?>
<td><?php echo $row->$column['name']; ?></td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
This does not work.
$row is returned by my mysql query, it has the following :...
How can I instantiate an anonymous object while passing the propertynames and values as string?
new With { .SomeProperty = "Value" }
new With { ".SomeProperty" = "Value" } //something like this? :)
...
Yesterday I asked a question on how to re-write sql to do selects and inserts in batches. I needed to do this to try and consume less virtual memory, since I need to move millions of rows here.
The object is to move rows from Table B into Table A. Here are the ways I can think of doing this:
SQL #1)
INSERT INTO A (x, y, z)
SELEC...
I want to specifically invoke the base class method; what's the most concise way to do this? For example:
class Base
{
public:
bool operator != (Base&);
};
class Child : public Base
{
public:
bool operator != (Child& child_)
{
if(Base::operator!=(child_)) // Is there a more concise syntax than this?
return true;
/...
Hi,
I've got a problem when I'm calling a static var from another class. I get this pretty syntax error where php is unexpected the '.'
Here is where I'm calling it :
private $aLien = array(
"menu1" => array("Accueil","statique/".Variable_init::$langue."/accueil.html",0,0), //This line
"menu2" => array("Infos Pratiques","stat...
In x86 GNU Assembler there are different suffixes for memory related operations. E.g.:
movb, movs, movw, movl, movq, movt(?)
Now my question is the following:
Does the suffix has ANY effect on how the processor is getting the data out of main memory or will always be one or more 32-bit (x86) chunks loaded into the cache ?
What are t...
Hi, i asked some time ago on an account i cant remember how to manipulate basic pointers and someone gave me a really good demo
for example
char *ptr = "hello" (hello = a char array)
so now *ptr is pointing at h
ptr++ = moves the ptr to point at the next element, to get its value i do *ptr and that gives me e
ok so far i hope :D ...
Possible Duplicate:
How does foreach work when looping through function results?
If I have functionality like the following - will ReturnParts() get called for each iteration in a foreach loop, or will it get called just the once?
private void PrintParts()
{
foreach(string part in ReturnParts())
{
// Do So...
Hi, on one of my web pages I want my manager user to view all activities assigned to them (personally). In order to do this, I need something like this:
$sql = "SELECT * FROM activities WHERE manager = $_SESSION['SESS_FULLNAME']";
Now obviously this syntax is all wrong, but because I am new to this stuff, is there a way I can call up ...
I'm trying to enter values into a database table using a form and a PHP function. The PHP seems to be fine as the SQL statement it creates looks okay, but the database always throws up an error. This is the SQL statement that my code has generated (with arbitrary values):
INSERT INTO Iteminfo ('itemName', 'itemSeller', 'itemCategory', '...
here is the relevent code snippet:
public static Rand searchCount (int[] x)
{
int a ;
int b ;
int c ;
int d ;
int f ;
int g ;
int h ;
int i ;
int j ;
Rand countA = new Rand () ;
for (int l= 0; l<x.length; l++)
{
if (x[l] = 0)
a++ ;
els...
This is probably pretty simple, but I can't figure out how to do it:
I have this code:
$.post("/admin/contract", {
'mark_paid' : true,
'id' : id
},
In pseudo code, how can I do this:
$.post("/admin/contract", {
'mark_paid' : true,
...
I know it's a really simple question, but I have no idea how to google it.
how can I do
print '<a href="%s">%s</a>' % (my_url)
So that my_url is used twice? I assume I have to "name" the %s and then use a dict in the params, but I'm not sure of the proper syntax?
just FYI, I'm aware I can just use my_url twice in the params, but t...
Hello,
I would like to know if is there any easy way to test actionscript by using some kind of application like ruby's irb or javasctip spidermonkey where you can just open up your terminal and type the code straight away.
This would be a good time saver when speaking of actionscript, since to test some syntaxes, classes, etc. you woul...
I just came across a SQL statement that uses AS to alias tables, like this:
SELECT all, my, stuff
FROM someTableName AS a
INNER JOIN someOtherTableName AS b
ON a.id = b.id
What I'm used to seeing is:
SELECT all, my, stuff
FROM someTableName a
INNER JOIN someOtherTableName b
ON a.id = b.id
I'm assuming there's no difference ...
I am a java programer, I found that the Java is very gd at doing string. If I want to do this objective c, how can I do in objective c:
System.out.println("This is a "+123+" test");
...
I'm reading a bit of C code in an OS kernel that says
x & ~(uint32_t)CST_IEc;
What does the ~() mean?
...