BSE ALPHA 0.0.7

May 7th, 2010 Albertux No comments

BSE alpha (0.0.7)

BSE Search on:

Need other site ?
Need other options ?

http://BSE.AyalaSoft.net

if you don’t see “0.0.7″ at version number, press ctrl + r or f5 or clear your browser cache.

Remember is alpha

Categories: web Tags:

BEGIN MAYO;

May 7th, 2010 Albertux No comments
// Source code of 6 days
#include "mom.h"
#include <human.h>
#include <human/walk.h>
#include "beer.h"
...
void Mayo();
...
~April()  {
// April 29
// Some pics and video

// Me

// http://bse.ayalasoft.net testing on terminal

// map and video
...
std::cout << "The Magic Trip";
Walk();
...


View Larger Map

// On Chuchi's House
...
TV::Music("Luis Miguel && Vicente Fernandez"); // great time
...
// The way to the happiness:
for (i=0; i < CARTON.total; i++) {
    Albertux::Drink(can[i]);
}

...
// April End.
}
...
void Mayo() {
// May 1st
...
// Add Taringa on http://BSE.AyalaSoft.net
BSE::Add("Taringa");
...
// Upgrade Ubuntu 9.04 to 10.04 LTS
system("sudo mount -o loop ~/ubuntu-10.04-alternate-i386.iso /media/cdrom");
system("gksu \"sh /cdrom/cdromupgrade\"");
...

// Cowboy Store
...
struct  STORE  {
...






} ; // End of struct STORE
...
// Human* Albertux = new Cowboy();
...


...
// Mayweather vs Mosley (FIGHT)
// Mayweather Wins
...
// No more wasting time on facebook or twitter.
Albertux::Disable("twitter","facebook");
...
// May 2
...
// Lazy Sunday
...
// May 3

...
Walk();
...

...
// beer night
...

// May 4
...
// The return of the Handyman
...

...
void Work1() {
    Kill("furniture"); // Easy
    Dump("furniture"); // Easy
}
...



...
void ret_str(char* s)
{
    if(*s != '\0')
         ret_str(s+1);
 
    std::cout<<*(s);
}
...
std::cout<<ret_str("?reeB toG");
...


...
// When you think you had finished
void Work2() {
    Move("furniture"); // Hard work (furniture inlaid with marble)
}
...
// Thinking in Oklahoma
if (Albertux.work == handyman) { // never say never
    Albertux.location("Oklahoma");
}
...
 
// Cinco de Mayo
...
// ESL Conversation Clubs (Berryessa Branch && Dr. Roberto Cruz - Alum Rock Branch)
Albertux.walking=True;
Albertux.singing=True;
Albertux.speak="english";
// On Berryessa Chinese people
// On Dr. Roberto Cruz Mexican people
Albertux.like("one_girl"); // Next Wednesday maybe I see again
// I see again the Indian guy, I don't know his name
// Goto Home Depot. I need screwdrivers
...
}
...
// THE GLOBAL WARMING
// My notebook is hot, so I disarm an clean the heatsink
Albertux::Disarm("Voyager");
...






}
...
// My Uncle call me, he needs a guy to drive a truck
...
Albertux::help("Uncle"); // Driving on San Jose
Albertux::enable("Music");
...
// After 2 hrs, return to home. I don't have AS5 Thermal paste.
// Use the same paste that already had the processor.
Albertux::arm("Voyager");
...


...
// Maybe only Web developers understand the next lane:
// Like Apache: "It Works".
...
Categories: personal Tags:

BSE Pre-Alpha 0.0.4

April 29th, 2010 Albertux No comments

BSE Pre-Alpha 0.0.4

Another boring day, without job in San Jose, CA. Today in the library I decide check my abandoned projects.

Main page:

Search page:

Shadowbox integration (only on flickr images):

Please visit:
BSE (Beast Search Engine)

Next version: (Amazon, eBay and others)

Categories: web Tags:

Boring Days

April 29th, 2010 Albertux 2 comments

Boring Days

Berryessa Park Pics:

Look the face of the happiness:

Saludos (familia y amigos):

Jake, Zaira, sorry se me paso mencionarlas.
Samy (David Arreola se me paso una disculpa we)
Tekxy, El_happy (RealidadGeek) tmb se me olvio.

Me faltaron mandar saludos a algunos amigos, una disculpa si no los mencione.

Categories: personal Tags:

Two or more MySQL Connections PHP

April 27th, 2010 Albertux No comments

Two or more MySQL Connections on PHP

I made this simple php5 class:

<?php
/////////////////////////////////////////////////////
// Script: db.php
// Description: php5 class handle MySQL connections
// Author: Albertux (Alberto Isaac Ayala Esquvias)
// FeedBack: <albertoi7@gmail.com>
// Web: http://Albertux.AyalaSoft.com (Blog)
// Licence: GPLv3
////////////////////////////////////////////////////
class DB
{
	private $settings = array (
		'user' => 'root',
		'pass' => 'qwerty',
		'db' => 'phpmyadmin',
		'host' => 'localhost'
	);
 
	private $link; // The f**king connection
 
	public function __construct($settings = null)
	{
		if (!empty($settings))
			foreach ($settings as $key => $value)
				$this->settings[$key]=$value;
	}
 
	public function connect()
	{
		$this->link = mysql_connect(
			$this->settings['host'],
			$this->settings['user'],
			$this->settings['pass']
		) or die('<!-- Could not connect: ' . mysql_error().' -->');
 
		//echo '<!-- Connected successfully -->'; // debug
 
		mysql_select_db($this->settings['db']) or
		die('<!-- Could not select database -->');
	}
 
	public function query($sql, $type = MYSQL_BOTH) // select
	{
		$this->connect();
 
		$query = mysql_query($sql, $this->link);
 
		while ($row = @mysql_fetch_array($query,$type))
			$return[] = $row;
 
		@mysql_close($this->link);
 
		return $return;
	}
 
 
	public function exec($sql) // insert, update, delete
	{
		$this->connect();
 
		$query = mysql_query($sql, $this->link);
 
		$return = @mysql_insert_id();
 
		@mysql_close($this->link);
 
		return $return;
	}
 
	public function __toString() // $obj = new DB(); print $obj;
	{
		$r = "Settings: ";
		foreach($this->settings as $key => $value)
			$r.="$key => $value; ";
		return $r."\n";
	}
}
?>

Howto use:

$dbh = new DB();
print $dbh;
$result = $dbh->query("YOUR_SQL_QUERY_HERE");
print_r($result);
$dbhr = new DB(array("db"=>"other","host"=>"remotehost"));
print $dbhr;
$result2 = $dbhr->query("YOUR_SQL_QUERY_HERE");

Using framework ?

CodeIgniter:

http://www.gotphp.com/php/codeigniter-multiple-database-support

CakePHP:

http://bakery.cakephp.org/articles/view/master-slave-support-also-with-multiple-slave-support

Categories: web Tags: ,