You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!

Author Search Results: 'Loccie'

We found 1,059 matches.


<< < > >>

Viewing 1-30 of 1,059 matches. 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 92236

1.

None

Topic: Search same pattern several times.

Posted: 11/04/09 03:57 PM

Forum: Programming

At 11/4/09 01:27 PM, GustTheASGuy wrote: It's a pattern to match comma-separated words, as it obviously doesn't have the FROM. Are you incapable of reading a short regexp?
You added FROM and it works, take the item at 1 and split it.

I did the second one first but I was looking to get an array that already had the info I wanted. Anyway, I tried what you said and then I tried using only string functions; the string functions were a lot faster according to microtime, so I'll use those. Thanks for the regex anyway.


2.

None

Topic: Search same pattern several times.

Posted: 11/04/09 12:42 PM

Forum: Programming

At 11/4/09 12:10 PM, Craige wrote:
At 11/4/09 10:55 AM, Loccie wrote: This doesn't seem to work at all.
Paste a print_r of Gusts' expression, please. He should be close.

Right, sorry. I totally forgot that.

/(\w*(,\w*)*)/

Array
(
    [0] => SELECT
    [1] => SELECT
)

I also tried:

/FROM (\w*(,\w*)*)/

Array
(
    [0] => FROM Music_Artists,Music_Pictures
    [1] => Music_Artists,Music_Pictures
    [2] => ,Music_Pictures
)

3.

None

Topic: Search same pattern several times.

Posted: 11/04/09 10:55 AM

Forum: Programming

This doesn't seem to work at all.


4.

None

Topic: Search same pattern several times.

Posted: 11/04/09 10:25 AM

Forum: Programming

preg_match("/FROM (\w*),/", $query, $tables);

This is what I have now. I'd like to extract all the tables from the query. With this code, it only returns the first.
Example:

SELECT * FROM table1,table2

This will return table 1, but not table2. How do I make it repeat the search for all the patterns? Or should I forget about regex and use string functions to extract the tables?


5.

None

Topic: Guitar Hero / Flash Hero Help

Posted: 07/05/09 03:51 PM

Forum: Programming

Flash forum.


7.

None

Topic: PHP globals: the class version

Posted: 06/08/09 10:07 AM

Forum: Programming

So inside your function it no longer knows your class? Did you create this function before you wrote your class? I mean like this:

include 'myFunctions.php';
include 'myClasses.php';

If so that could be the problem.


8.

None

Topic: Changing the status of Variables?

Posted: 05/25/09 06:36 PM

Forum: Flash

You are declaring your variables local, in the enterframe event. What you want to do is declare them global. So outside of any function.

var pistol;
var subgun;

onClipEvent (load)
{
pistol = true;
subgun = false;
}

9.

None

Topic: Where to find a programming guide?

Posted: 05/21/09 10:57 PM

Forum: Programming

At 5/21/09 10:15 PM, zNelson24 wrote: I went to functionX.com to learn a little C#, and they also have Javascript.

Many of the tutorial authors might assume you have some programming experience already, you might want to get a book. I learned a little Javascript taking modern world in high school.

Java, not Javascript.


10.

None

Topic: Make flash with Mac

Posted: 05/19/09 07:47 PM

Forum: Flash

You guys do release that almost every at Adobe uses a Mac and that Adobe is a lot closer to Mac then it is to Windows?

OP: It is the same like the Windows version but you have to download the dmg files instead. Once installed it will work like it does on your Windows, but usually faster.


11.

None

Topic: as3 scripters here

Posted: 05/15/09 07:17 PM

Forum: Flash

At 5/15/09 06:37 PM, AlexisGOAR wrote:
At 5/15/09 06:29 PM, Loccie wrote:
At 5/15/09 05:18 PM, AlexisGOAR wrote: here's a script for a game I'm making, and some explanation for newbies to understand.
Needs more comments.
the comments are in the scrippt in the // comments//

Are you kidding me? I was being sarcastic...

Not only did you fuck up the positioning of your comments (Write them above or under the line you want to explain, not both.) but you also managed to write more comments than actual code. I really hope you don't do that in all your code.

Even if it's to 'help newbies' you have to much comments. I don't think anyone will wonder what aimer_mc.gotoAndStop(1) does. If they do they need to learn the Flash interface and some English lessons.

//The function's action are://

*The function's statements are:


12.

None

Topic: as3 scripters here

Posted: 05/15/09 06:29 PM

Forum: Flash

At 5/15/09 05:18 PM, AlexisGOAR wrote: here's a script for a game I'm making, and some explanation for newbies to understand.

Needs more comments.


13.

None

Topic: Security question

Posted: 05/07/09 01:10 PM

Forum: Programming

At 5/7/09 09:26 AM, DFox wrote: Preventing "JavaScript" injections has nothing to do with removing javascript:. Just worry about turning brackets into entities (htmlentities()), that way a JavaScript tag can never be interpreted...

I don't know what I was thinking, htmlentities() is so obvious. Thanks.

At 5/7/09 12:52 PM, Deja-Vu wrote: Run the text through at least strip_tags() and htmlentities()

I don't understand the need for strip_tags(). I mean, don't all the tags get converted by htmlentities() to normal text?


14.

None

Topic: Security question

Posted: 05/07/09 08:36 AM

Forum: Programming

I just wrote a little BB coding system and I'm going to add security to it now. I wanted to know if removing 'javascript:' is enough. This should prevent javascript injections right? SQL injections should be blocked already since I'm using prepared statements.


15.

None

Topic: wtf is "NAN" ???

Posted: 05/05/09 06:55 PM

Forum: Flash

At 5/5/09 06:47 PM, Veranan wrote:
At 5/5/09 06:44 PM, evan210 wrote: Not a Number.
/thread.
uhh now i know what it stands for but how do i fix my score counter??

Unless we can mind read or guess the answer you're going to have to post the code. (Include the code were you change the lives!)


16.

None

Topic: Help with AS

Posted: 05/05/09 06:34 PM

Forum: Flash

Oh, sorry.

this.play();

Instead of:

this.nextFrame();

17.

None

Topic: Programming first -> Art later?

Posted: 05/05/09 05:52 PM

Forum: Flash

I usually program first. This is however a bad habit, you should always design first. It will make the programming more structured.


18.

None

Topic: Help with AS

Posted: 05/05/09 05:49 PM

Forum: Flash

Go to the properties panel of your door and give it an instance name. Then write the code like this on the frame where your door movieclip is:

thatInstanceName.onRelease = function()
{
	this.nextFrame();
}

"thatInstanceName" is the name you gave in your properties panel.


19.

None

Topic: my guy can not die

Posted: 05/05/09 05:37 PM

Forum: Flash

At 5/5/09 04:10 PM, piggy123 wrote:
At 5/5/09 06:36 AM, Yambanshee wrote: is your code being looped on a enterframe function then?
no thats the whole code

I think that I know your problem. When you enter this frame AS checks the if statement like expected but then no longer looks at it. You'll need an onenterframe.


20.

None

Topic: bind_result msqli

Posted: 05/05/09 01:11 PM

Forum: Programming

For those that are interested, I fixed the problem.

if ($stmt = $dbc->prepare($query)) {
	$amount = mysqli_num_fields($stmt->result_metadata());
	$fieldMeta = mysqli_fetch_fields($stmt->result_metadata());
	
	$fields = array();
	for($i=0; $i < $amount; $i++)
	    $fields[$i] = $fieldMeta[$i]->name;
	
	$result = array();
	$args = array($stmt);
	for ($i=0; $i < $amount; $i++) {
	    $result[$i] = '';
	    $args[$i+1] = &$result[$i];
	}

	$stmt->execute();
	call_user_func_array(mysqli_stmt_bind_result,$args);
	
	while ($stmt->fetch())
	{
		echo $result[0] . "-" . $result[1];
	}
}

21.

None

Topic: bind_result msqli

Posted: 05/05/09 04:54 AM

Forum: Programming

At 5/3/09 10:23 AM, Relish wrote:
I believe this would come in handy to you!

$meta = $stmt->result_metadata(); // Where $stmt is your prepared query.
while ($field = $meta->fetch_field())
{
$params[] = &$row[$field->name];
}

call_user_func_array(array($stmt, 'bind_result'), $params);

Thumbs up to you for using MySQLi :)

Thanks for the reply. I've tried this and something seems to be wrong in my code.

if ($stmt = $dbc->prepare($query)) {
	//SELECT id,name FROM pages
	echo $query;
	
	$stmt->execute();
	$meta = $stmt->result_metadata();
	
    while ($field = $meta->fetch_field())
    {
        $params[] = &$fetch[$field->name];
    }

    call_user_func_array(array($stmt, 'bind_result'), $params);
	
	while ($stmt->fetch()) {
		//Shows the hyphen but not the data
		echo $name . "-" . $id . "<br />";
	}
}

22.

None

Topic: Left 4 Dead web template

Posted: 05/04/09 05:01 PM

Forum: Programming

At 5/4/09 04:42 PM, kiwi-kiwi wrote: I can see it, I don't like that shade of green.
Plus the green in the site doesn't go with the red in the header (in my opinion at least).

I think this is 100% the template he downloaded with as only changes another header and different colours for the shoutbox.


23.

None

Topic: Speed test of code

Posted: 05/03/09 05:09 AM

Forum: Programming

Yes, that seems to work. Thanks.


24.

None

Topic: Speed test of code

Posted: 05/02/09 09:29 PM

Forum: Programming

How can I test how fast certain code is executed in PHP? For example the time it takes to run a certain loop.


25.

None

Topic: bind_result msqli

Posted: 04/26/09 10:49 AM

Forum: Programming

A normal bind_result is written like this:

$stmt->bind_result($column1,$column2);

Now instead of writing $column1,$column2, I want to have all the items of an array over there. In this array are the column names as strings. Below is something I tried but it obviously doesn't work. Is what I'm trying even possible?

$bind =  "";

foreach ($columnArray as $item)
{
	$bind .= $$item . ",";`
}

$stmt->bind_result($bind);

26.

None

Topic: Php Oop

Posted: 04/24/09 04:22 AM

Forum: Programming

Thanks for the help. I'll use different classes instead of one container class with lots of methods in it. When I see a good use for the nested methods I'll certainly give it a try. Also thank you for the link with the OOP tips!


27.

None

Topic: Php Oop

Posted: 04/22/09 06:19 AM

Forum: Programming

I've used OOP in other languages and just started learning it in php as well. What I like to know is if the following is possible and if it is how and if it's good practice.

$myGeneralObject->aSubObject->method();

So you have one masterclass and in that class you have different classes for each part of your website. So an object for your members, one for your pages, etc...


28.

None

Topic: JS setTimeout

Posted: 02/11/09 02:43 AM

Forum: Programming

Thanks, the anonymous function works. Do you mind explaining why? It seems weird that such a thing is required.


29.

None

Topic: JS setTimeout

Posted: 02/10/09 08:50 AM

Forum: Programming

alert(Frame);
	setTimeout("FrameEffect1("+Frame+")",100);
}

function FrameEffect1(test)
{
alert(test);
}

This doesn't work. The first alert displays HTMLdivElement or something similar but the second alert in the function does not show. If I replace Frame with the number 10 in the setTimeout the second alert does show.

The code is correct I assume. The Frame element itself also exists since it gets alerted the first time. So why doesn't it work as an argument in this function?


30.

None

Topic: Xml Vs Mysql

Posted: 02/01/09 05:52 AM

Forum: Programming

I think I already know the answer but I just want to make sure. What is the best of the following to store the content of every page?

1: MySQL to store data and php(MySQLi) to output it on the pages.

2: XML to store the data and XSLT to display it.


All times are Eastern Standard Time (GMT -5) | Current Time: 01:51 PM

<< < > >>

Viewing 1-30 of 1,059 matches. 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 92236