This file contains hidden or 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
var DB = require('mongodb').Db; | |
var Server = require('mongodb').Server; | |
var x = "" ; | |
new DB('simple_tutorial',new Server('127.0.0.1',27017)).open( | |
function(err,db){ | |
db.collection('documents',function(err,collection){ | |
collection.insert({age:21,name:'eyad'},function(err,doc){ | |
collection.findOne({age:21},function(err,resaults){ | |
console.log('age is :' + resaults.age); |
This file contains hidden or 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
<?php | |
require_once 'conf.php'; | |
require_once 'classes/DB.php'; | |
function E_error_log ($error,$den,$file=__FILE__,$line=__LINE__){ | |
$Error= date("Y/d/m h:i:s A ",time())." Error : ". $error." on file : {$file} , line : {$line} \n" ; | |
$con=fopen($den, "a"); | |
fwrite($con, $Error); | |
fclose($con); | |
if(DEVMOD){ | |
echo $error ; |
This file contains hidden or 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
.data | |
wmsg : .asciiz "welcome \nstudent : Mohmmad Eyad Arnabeh \nNum : 345 \n" | |
getmsg : .asciiz "Please Enter a statment : \n" | |
msg0 : .asciiz "your sentence is : " | |
msg1 : .asciiz "Please Enter a character :\n" | |
msg2 : .asciiz "your char is :\n" | |
msg3 : .asciiz "not found \n" | |
msg4 : .asciiz "\nFound!\n" | |
msg5 : .asciiz "\nFound time : \n" | |
msg6 : .asciiz "\nChoose an option :\n |