This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//this code is able to load a FLV file, change stuff in his byteArray, and play the resulting FLV | |
//this could be helpfull to secure a web player for example, by obfuscating the flv sent by the server | |
import flash.net.NetConnection; | |
import flash.net.NetStream; | |
import flash.net.URLRequest; | |
import flash.utils.ByteArray; | |
public var ns:NetStream; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private function tryTimer():void{ | |
var delay:uint=40;// <--- change this | |
var t = new Timer(delay); | |
var tNormal:uint=0 | |
var tReal:uint=0 | |
var lastDate:Date = new Date(); | |
t.addEventListener(TimerEvent.TIMER, function():void{ | |
var today:Date = new Date(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//passer une fonction en paramètre, exemples 1/2 | |
function funct_1(){ | |
alert('toto') | |
} | |
function directCall(f) | |
{ | |
if (!f){ | |
alert('f not set'); | |
}else{ | |
f(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//passer une fonction en parametre, exemples 2/2 | |
function doubler(x) | |
{ | |
if (!x) alert('x not set'); | |
else alert(x*2); | |
} | |
function callParam(f,a) | |
{ | |
f(a); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//this function convert the string representation of some XML | |
//into a DOM object. | |
function StringToXMLDom(string){ | |
var xmlDoc=null; | |
if (window.DOMParser) | |
{ | |
parser=new DOMParser(); | |
xmlDoc=parser.parseFromString(string,"text/xml"); | |
} | |
else // Internet Explorer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function delayed(){ | |
alert('toto'); | |
} | |
//affiche toto dans 5 secondes | |
setTimeout(delayed,5000); | |
//affiche titi dans 7 secondes | |
setTimeout(function(){ | |
alert('titi') | |
},7000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* see http://ggendre.posterous.com/css-mask-without-javascript for details */ | |
.mask { | |
position:fixed !important; | |
position:absolute; | |
left: 0; | |
top: 0; | |
width:100%; | |
height:100%; | |
overflow: hidden; | |
padding:0 !important; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<noscript> | |
<link rel="stylesheet" type="text/css" href="css/noscript.css" /> | |
</noscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT user.* | |
FROM user, | |
(SELECT id_user | |
FROM user | |
GROUP BY id_user | |
HAVING count( * ) >1 | |
) doublons | |
WHERE user.id_user = doublons.id_user; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT user.* | |
FROM user, (SELECT * FROM user) AS doublons | |
WHERE user.nom = doublons.nom | |
AND user.prenom = doublons.prenom | |
AND user.id!=doublons.id |
OlderNewer