Suppression du numéro de téléphone dans 'lightdb'
14
automate.php
|
@ -87,15 +87,15 @@
|
|||
// }
|
||||
|
||||
|
||||
// $req = new ModuleRequest('download/phone', array('subjects'=>array(1)));
|
||||
// $req->download();
|
||||
$req = new ModuleRequest('download/phone', array('subjects'=>array(1, 273)));
|
||||
var_dump( $req->download() );
|
||||
|
||||
|
||||
|
||||
/* [4] Analyse des performances de `lightdb`
|
||||
=========================================================*/
|
||||
$start = microtime(true);
|
||||
$db = new lightdb('test1', __ROOT__.'/tmp/');
|
||||
// $start = microtime(true);
|
||||
// $db = new lightdb('test1', __ROOT__.'/tmp/');
|
||||
|
||||
/* (0) Création des objets à insérer */
|
||||
// $object_10 = array();
|
||||
|
@ -207,9 +207,9 @@
|
|||
//
|
||||
// $stop = microtime(true);
|
||||
// var_dump('1000 lines deleted in '.($stop-$start).' sec.');
|
||||
//
|
||||
// $db->close();
|
||||
|
||||
$db->close();
|
||||
|
||||
var_dump('total execution time : '.(microtime(true)-$start).' sec');
|
||||
// var_dump('total execution time : '.(microtime(true)-$start).' sec');
|
||||
|
||||
?>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
var NotificationClass=function(a){this.container=a};NotificationClass.prototype={container:this.container,stack:[],types:["warning","info","success","error"],defaultTimeout:2E3,errorCodes:{}};NotificationClass.prototype.pushStack=function(a,c,b){if(!(a instanceof Array&&b instanceof Array&&c instanceof Element))return null;var e=-1,d;for(d in a)if(-1<b.indexOf(a[d])){e=d;break}if(-1==e)return a.push(c)-1;a[e]=c;return e};
|
||||
NotificationClass.prototype.hide=function(a){if(isNaN(a))return!1;a=parseInt(a);null!=this.stack[a]&&this.stack[a].element instanceof Element&&this.container.removeChild(this.stack[a].element);this.stack[a]=null};
|
||||
NotificationClass.prototype.hide=function(a){if(isNaN(a))return!1;a=parseInt(a);this.stack[a].element instanceof Element&&this.container.removeChild(this.stack[a].element);this.stack[a]=null};
|
||||
NotificationClass.prototype.show=function(a,c,b,e){a=-1<this.types.indexOf(a)?a:this.types[0];c="string"==typeof c?c:"";b="string"==typeof b.toString()?b:"...";null!=this.errorCodes[b]&&(b=this.errorCodes[b]);e="number"==typeof e?e:this.defaultTimeout;var d={element:document.createElement("div"),type:a,title:c,message:b,timeout:null};d.element.className="notification-element";d.element.setAttribute("data-"+a,"");d.element.innerHTML="<p><strong>"+c+":</strong> "+b+"<p>";this.container.appendChild(d.element);
|
||||
var f=this.pushStack(this.stack,d,[null]);d.element.id=f;var g=this;d.element.className="notification-element notification-visible";setTimeout(function(){d.element.className="notification-element"},500+e);d.timeout=setTimeout(function(){g.hide(f)},500+e+500);d.element.addEventListener("click",function(a){g.hide(f)},!1);return d.element};NotificationClass.prototype.warning=function(a,c,b){return this.show("warning",a,c,b)};
|
||||
NotificationClass.prototype.info=function(a,c,b){return this.show("info",a,c,b)};NotificationClass.prototype.success=function(a,c,b){return this.show("success",a,c,b)};NotificationClass.prototype.error=function(a,c,b){return this.show("error",a,c,b)};
|
||||
|
|
|
@ -85,7 +85,7 @@ NotificationClass.prototype.hide = function(id){
|
|||
|
||||
|
||||
/* (1) Suppression de l'élément */
|
||||
if( this.stack[id] != null && this.stack[id].element instanceof Element )
|
||||
if( this.stack[id].element instanceof Element )
|
||||
this.container.removeChild( this.stack[id].element );
|
||||
|
||||
/* (2) On supprime la notification de la pile */
|
||||
|
|
|
@ -123,7 +123,6 @@
|
|||
=========================================================*/
|
||||
$file['subject'] = array(
|
||||
'id' => $offset + $subject_id,
|
||||
'number' => $subject['number'],
|
||||
'name' => self::readableName($subject['username'], $subject['firstname'], $subject['lastname'])
|
||||
);
|
||||
|
||||
|
@ -142,7 +141,6 @@
|
|||
// On remplit les données qui iront dans le fichier pour ce contact
|
||||
array_push($file['contacts'], array(
|
||||
'id' => $offset + $miniData['uid'],
|
||||
'number' => $contact['number'],
|
||||
'name' => self::readableName($contact['username'], $contact['firstname'], $contact['lastname']),
|
||||
'sexe' => $miniData['sexe'],
|
||||
'age' => $miniData['age'],
|
||||
|
@ -166,7 +164,6 @@
|
|||
// On remplit les données qui iront dans le fichier pour ce contact
|
||||
array_push($file['contacts'], array(
|
||||
'id' => $offset + $ficheData['uid'],
|
||||
'number' => $contact['number'],
|
||||
'name' => self::readableName($contact['username'], $contact['firstname'], $contact['lastname']),
|
||||
'sexe' => $ficheData['sexe'],
|
||||
'age' => $ficheData['age'],
|
||||
|
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 430 KiB After Width: | Height: | Size: 430 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 129 KiB |
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 241 KiB After Width: | Height: | Size: 241 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
@ -1 +1 @@
|
|||
{"1":{"line":0,"hash":"95ad3f4b33bdef63dae17b5cafee1e39c6233314"},"69":{"line":1,"hash":"3d2eb540fa5b2c5e020f759a7627f899875df978"}}
|
||||
{"1":{"line":0,"hash":"95ad3f4b33bdef63dae17b5cafee1e39c6233314"},"69":{"line":1,"hash":"3d2eb540fa5b2c5e020f759a7627f899875df978"},"137":{"line":2,"hash":"a8529e83f05688e89e1318b443a036e97386105d"},"205":{"line":3,"hash":"0a296a89a05509be912fefda7fdcc2692a244208"},"273":{"line":4,"hash":"1b9c3317ae25f49f6cfdee6aa34fcbc381c3a7a7"}}
|
|
@ -1 +1 @@
|
|||
136
|
||||
340
|