Skip to content

Instantly share code, notes, and snippets.

@eyadof
eyadof / Bonian_hm.s
Created May 13, 2012 17:34 — forked from mamprogr/Bonian_hm.s
bonian home work
.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
<?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 ;
@eyadof
eyadof / MongoNDr.js
Created October 5, 2012 20:03
MongoDB Node.js Driver
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);