Hey guys,

That newsletter reminder that's said (it's been awhile i didn't visit) was a good thing.

So here i am.
I see, it change alot from my last visit.
Great work Dani and the gang.

So yeah, i didn't code since 2012.
My carreer path is been a rollercoaster from business to geek and vice versa.

It look like 2014 is going to pull me on the geek side again.
Beeing hire by an engineer firm to supervise the technicians on the road.

So i'll try to visit more on my free time and help out if i can.

Again, great work guys.


i did add variables for the form and change the code accordingly, it work great.

but still, i don't think it's the optimal way to do it.

this.tagNom = this.id+"nom";
"<tr><td>Nom: </td><td><input type='text' id='"+this.tagNom+"'/></td>"+
this.nom = document.getElementById(this.tagNom).value;

and so on ...

if you guys have any better way of doing this, like integrate an id ancor maybe in the affForm function, so i can get rid of the form variables.

thx guys

Hey guys it's been a long time i've wrote here.

I decided to take a course in JS OOP, my problem is the program doesn't do the difference between objects. Exemple the program work only if i pop 1 object, if i pop a second one, it screws my functions. I want you guys to take a look at it and point me in the right direction.

cut-paste and try it, works fine with 1 object.

I thought that function were linked with the objects when put in the constructor, but it doesn't seem like it. I think the form ids overlap. So i thought a way around this would be to create a link between the form ids and the objects. But this means more variables.

All 2 cents and more :P are welcome.

Here's the html/ script test file, i can't modify this file.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml">
    <title>Exemple d'utilisation de la classe Etudiant</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <div id="conteneur" style="width: 100%;">
      <h1 style="text-align: center;">Exemple d'utilisation de la classe Etudiant</h1>
      <p style="position: absolute; top: 10px; right: 30px;">Nombre étudiants: <span id="nbEtud">0</span></p>
      <form method="post" action="#" onsubmit="return false;">
          <div id="premier">
          <div id="second">
          <div id="bas" style="">
            <p><button onclick="afficherEtudiant(0, 'premier');">Afficher premier etudiant</button>
            <button onclick="afficherEtudiant(1, 'second');">Afficher deuxieme etudiant</button>
            <button onclick="calculerEtudiant(0);">Calculer la note premier etudiant</button>
            <button onclick="calculerEtudiant(1);">Calculer la note deuxieme etudiant</button>
            <a href="http://validator.w3.org/check?uri=referer"><img
                alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
    <script type="text/javascript" src="classeEtudiant_tp1.js">

  <script type="text/javascript">
    /* ...

copy that @pritaeas, thx

@GliderPilot is right, this sounds like a html/css problem.

have a fixed position for header and content also ?
fixed height ?

maybe try a new approach like float: left for header and content and clear:both for the footer.

and some problematic code would help us help you :)

maybe you want to read on VMware

we use it on our servers, basicly it splits the physical resources and create virtual machines with the fragmented resources.

now whats the programming behind it, sorry have no idea.

i kept reading on sql injections after answering a guy on the subject and end up on this page: http://php.net/manual/en/pdo.prepared-statements.php

which i think is great for optimisation and i will probably apply on this portal im working on, but ...
what do you guys think about this prebuild template like versus sql injections ?
would you trust this prepared statement for security or you will still apply some security measures?

thx for your input

check this out, just to re enforce @Zagga point.


it depends on how your map is done
is it an image or you've done it with a canvas or svg ?

if it's a simple image would use a JS with DOM
break the image down, do image of all stores in a different color and change the image with onfocus <img src="" id="store" alt="" />

my 2 cents, helping you get started, but i'm sure there's more qualified people here.

so far i have 2 returns now.

cisco spa122 => admin GUI not responding, even on the lan at
linksys pap2t => phone jack ligne cuts, can't access

i've talk to our supplier and he didn't seem supprised, so i guest my software thinking side panic for nothing. So i'm supposed to return them to cisco for RMA.

thx for the reply thu, appreciated

thx @phppennyauction, i'll straighten that up.

and ... since i was doing a redo, i'm also going html5.
What do you think of the microdata that helps machine on accurate informations ?
Would the attributs itemscope, itemtype and so on, help on SEO or it's a waste of time ?

mine is here: ../var/html/www/robots.txt

why am i reading this, i'm a backend programmer.

i'm redoing my resume site.
now after reading all this, i can't tell what to do with multiple contents.

since the tag title is very important
should i create multiple pages with different titles
or i can change the content dynamically and keep the same title?

is it important that the title reflects the content or it just doesn't matter, seo wise ?

Here's a great link i fund on SEO.

I'm no SEO guy, but this site his worth mentionned.
Though of sharing with you guys who aren't in SEO, but need to do some.


Hey guys,

This question is pointed at the guys working with voip.

Here's the story,
One of my client brought me an ATA device telling me there is no more dial tone.
I check the hardware and no physical damage.
So i tried to enter the admin section.
Did to access the device and get the ip, but the line cut.
The 2 phone lines are basicly dead.
So i get the ip from the router and connect on it via the GUI, suprisingly it work.
The original setup configuration from our company wasn't change.

My 1st though was, since the GUI admin was working, i must be an hack.
I've check the net and i found a kill idle, but that shouldn't affect the admin section.

So my 2nd though, my device is dead.

What do you guys think, my device is dead by natural cause :P or dead by hack ?
If you guys find anything on firmware hack, let me know, i'm still looking.
Of course 1 ATA doesn't require to go underground.

thx guys.


you sure your doing this for an hospital ?
usually health sector are very pointy.

lets say they're upgrading from paper to digital.
didn't they have patient records on paper, you can base your DB structure on it ?

i'm certain they would have insurance references in there somewhere, patient number or card number, dates of prescriptions and visits ...

foreach (glob("somefolder/*/*") as $filename) {
    //code for want you want to do with the results

Get a third party hosting solution, like godaddy or someting like that and share the admin access with him.

Nah! i don't have any code yet, i'm still at the designing part.

yeah i'll be using mysqli, but i was refering to MySQL engin

Simple exemple:

a query that ORDER BY something ASC
a quicksort or bubble sort

or do a complex query to pin point a specific data
a dicotomic search

yes i understand some manipulations can only be done in code, but i'm refering to data manipulations that can be parse in ethier the code engin or the db engin.

So which one i pick for performance?

i know howto calculate the order of an algorythm theoretically, but i don't how to put an order on a db query. i'll do a search on that.

thx for the input

Hey, been awhile.

I'm working on a portal for distributors, some type of JIT (just in time) implementation.

Now i've been reading alot on DB so i can implement the right database and the right data structure.
Now i see, i can do alot more then i'm use to do.

My question:

Is it better to pre-organized the data in the DB engin (i'm using MySQL) with more complex queries or just throw a simple query and manage the data in the PHP engin ?

i'm lookin for a best performance with the possibility of high traffic intranet.

i need your input on MySQL engin vs PHP engin, taking out all other variables.


wheres your code, its hard to fix something we cant see


you should have a query to the student table where the WHERE clause match the 1st table variable you previously queried, then use the variable to add the student in the select drop list option name.

oups !

wrong link but you got the idea :P

heres the one you re looking for: http://www.w3schools.com/tags/ref_entities.asp

you need to use the charset entitites like: é is é

you have a complete liste of entities here: http://www.w3schools.com/tags/ref_symbols.asp

you can use entitites names or number doesnt matter and it will show the accents in all browsers


nice function, help me indirectly
this means i should go over php lib


you need to have access to the database outside the script

check if you have access to phpMyAdmin or a direct console access

and if you have no idea if you have access to one of those, check with your network admin

@iamthwee is right

check out this tuts: http://net.tutsplus.com/tutorials/php/object-oriented-php-for-beginners/

after going through you'll see you can access variables or function outputs very easy


thx, the reuters APIs looks very complete, they even have the analytic tools integrated, i wouldn't have to program the oscillators and so on.

but, it's a personnal project and i'm not ready to pay 200$ some per month to get access to that API, well... not just yet, i'll keep the link in my pocket for future use.

thx for the inputs guys

hey guys, finally have some time to think about a personnal project.

i want to create a stock screener, with some cross checks on data like oscillator, MACD, volume and moving average.

my 1st step was to look around and see if they're was any finance API out there that would make my life easier.

i have found this hidden API from Google: http://www.google.com/ig/api?stock=AAPL which return an XML that i can parse. So far it was great, but the API seems to be stuck on the DOW. i tried to get some data from the TSE, DAX and the FTSE with different combinaison like Google use it. example: ../api?stock=TSE:TV but, nop doesn't work

i found the company that does the coding for TSE http://www.quotemedia.com/ which also offers snippets and some kind of data acces, but i just need the raw data, not the neat graphics and ... i'm stuck on the TSE.

i really like the Google API, but im affraid it gonna go in october 2012, plus i'm stuck on the US market.

any suggestions on APIs ?

i didn't look into yahoo API yet, any good ?


you should read this: http://www.php.net/manual/en/mysqli.quickstart.dual-interface.php

you wrote your code like if you were using mysql procedural scripting, but you're using mysqli witch is more object oriented.

1) in your connection you need to pass the db name
2) mysqli_fetch_array( $sql ) should be mysqli_fetch_assoc($sql)
3)$result would be an object of multiple arrays, so you need run through the arrays of arrays to find your data.

exemple of mysqli function return a string which you can use in your div:

public function tableau(){
        $db = new mysqli($this->host, $this->user, $this->pass, $this->data) or die($error);

        $query = $db->query("SELECT * FROM employes") or die($error);
        if($query->num_rows > 0){
            while($row = $query->fetch_assoc()){
                foreach($row as $key => $value)
                    $this->text .= $value.";";

                $this->text .= "|";


        return $this->text;
    }//End tableau