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
<?xml version="1.0" encoding="utf-8"?> | |
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:s="library://ns.adobe.com/flex/spark" | |
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" width="659" height="352" | |
creationComplete="SySMem();"> | |
<fx:Declarations> | |
<!-- Place non-visual elements (e.g., services, value objects) here --> | |
</fx:Declarations> | |
<fx:Script> | |
<![CDATA[ |
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
public function createpw(strHash:String = 'abchefghjkmnpqrstuvwxyz0123456789',lnHash:Number = 5):String | |
{ | |
var i:Number = 0; | |
var hash:String = ""; | |
var nLenght:Number = strHash.length; | |
while (i <= lnHash) | |
{ | |
var num:Number = Math.round(Math.random()*nLenght); | |
hash += strHash.charAt(num); | |
i++; |
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
<validator:StringMatchValidator id="passwordMatchValidator" | |
source="{password2}" | |
property="text" | |
matches="{password1.text}" /> | |
//And just add this class to your project for the actual checking of the password match. |
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
UPDATE jos_users SET `password` = CONCAT('%', CONCAT_WS(':', SHA2(CONCAT( UNIX_TIMESTAMP(`registerDate`) ,`password`),512),UNIX_TIMESTAMP(`registerDate`) )); |
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
public function verifyPassword($passwd){ | |
if(substr($this->password, 0, 1) == '#'){ | |
$saved_pw = explode(':', substr($this->password, 1) ); | |
$salt = $saved_pw[1]; | |
$data = $salt.md5($passwd); | |
$givenPasswd = hash('sha512', $data); //oude manier controle! | |
if($givenPasswd === $saved_pw[0]){ | |
//okay, sla ww op als sha512 ! | |
$salt = generateSalt(); |
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
<!-- static flattr button --> | |
<a href="https://flattr.com/submit/auto?user_id=YOURFLATTRUSERNAME&url={{url absolute="true"}}&title={{encode title}}&description={{excerpt}}&language=nl_NL&tags={{tags autolink="false" separator=","}}&hidden=0&category=text"> | |
<img src="https://flattr.com/_img/icons/flattr_logo_16.png" alt="Flattr Button"/> | |
</a> | |
<!-- end static flattr button --> |
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
$mongo_host = 'mongodb://10.10.10.10/'; //vul hier jou ip adres in van je MongoDB omgeving | |
$m = new MongoClient($mongo_host); | |
$db = $m->blog; //maak connectie met database | |
$collection = $db->visits; // maak connectie met de tabel / collection | |
//je kan nu bijvoorbeeld al alle records tellen met | |
$nr = $collection->count(); | |
echo "<p>aantal records in db : " . $nr . "</p>"; |
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
$m = new MongoClient(); // connect to local mongodb | |
$db = $m->products; //select 'mongo database' named products | |
$clothing_col = $db->clothing; //create a collection from the 'table' clothing | |
//create the aggregation | |
//create the Match on clothing-category | |
$ops = array( | |
array( | |
'$match' => array("category" => 'socks') | |
) |
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
$m = new MongoClient(); // connect to local mongodb | |
$db = $m->products; //select 'mongo database' named products | |
$clothing_col = $db->clothing; //create a collection from the 'table' clothing | |
//create the aggregation | |
//create the Match on clothing-category and brand | |
$ops = array( | |
array( | |
'$match' => | |
array('$and' => |
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
$m = new MongoClient(); // connect to local mongodb | |
$db = $m->products; //select 'mongo database' named products | |
$clothing_col = $db->clothing; //create a collection from the 'table' clothing | |
//create the aggregation | |
//create the Match on clothing-category = shoes or brand = nike | |
$ops = array( | |
array( | |
'$match' => | |
array('$or' => |
OlderNewer