This is default featured post 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured post 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured post 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured post 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured post 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Jumat, 29 Oktober 2010

Cursor dan Custom Cursor

cursor: auto

the default cursor

cursor: crosshair

a gunsight-style cross

cursor: default

the system's normal arrow pointer

cursor: pointer

the normal hand pointer that appears when you hover over a link

cursor: hand

a value that is only supported in IE. Don't use it, use pointer instead

cursor: wait

the waiting cursor, generally a watch or hourglass (non-animated, sadly)

cursor: text

the text-selecting 'I-beam' thing

cursor: help

an arrow with a question-mark

cursor: move

crosshair with arrows on the ends, useful for drag and drop applications

  

  

cursor: n-resize

an arrow pointing north

cursor: ne-resize

an arrow pointing north-east

cursor: nw-resize

an arrow pointing north-west

cursor: e-resize

an arrow pointing east

cursor: w-resize

an arrow pointing west

cursor: s-resize

an arrow pointing south

cursor: se-resize

an arrow pointing south-east

cursor: sw-resize

an arrow pointing south-west

Custom Cursors

Finally, if all of those cursors aren't enough for you, you can supply your own customcursors by uploading the cursor file and pointing to it from in your CSS, just like you would point to an image. Custom cursors work similarly to fonts in CSS: you supply a list ofcursors you'd like to use. The browser will try to download and use each cursor in order. If one is not available or unusable, it will fall back on the next one and so on until it reaches a generic cursor at the end of the list which is used if none of the others are available. You code it like this:

a.help {cursor: url(questionmark.svg), url(/cursors/questionmark.cur), help; }

This code will instruct the browser to first look for an SVG file called "questionmark.svg". If this doesn't work or the browser doesn't support SVG graphics, it will look for a .cur file, which is a common cursor format. If neither of these files end up being available, it will fall back to the normal help cursor.

Kamis, 28 Oktober 2010

PHP win32 Service

<?php


if ($argv[1] == 'run')

{

win32_start_service_ctrl_dispatcher('dummyphp1');

while (WIN32_SERVICE_CONTROL_STOP != win32_get_last_control_message())

{

# do your work here.

# try not to take up more than 30 seconds before going around the loop

# again

sleep(10);

}

}


if($argv[1]=="register")

{

win32_create_service(array(

'service' => 'dummyphp1', # the name of your service

'display' => 'sample dummy PHP service #1', # description

'params' => 'd:\w32service.php run', # path to the script and parameters

));

}

else if($argv[1]=="unregister"){

win32_delete_service('dummyphp1');

}

else

{

echo "dummy Service\n";

echo "-----------------------------------\n";

echo "register - register this service \n";

echo "unregister - unregister this service \n";

echo "run - run this service \n";

}

?>

Rabu, 27 Oktober 2010

Sumber Ilmu – Buku sekolah elektronik

Buku sekolah elektronik bisa di download di

http://www.diknas.info/category/bse-sd

Sumber bacaan Penggiat Startup Lokal

Ini ada website yang membahas dan menginformasikan kegiatan – kegiatan startup lokal dan juga info – info tentang perkembangan tren bisnis web yang sekarang mengarah ke social content alias web 2.0

http://dailysocial.net/

RPG Game Referrence


http://www.worldoflordcraft.com/guide/3.html


Selasa, 26 Oktober 2010

Web kereeen

www.temanmacet.com harus download nih semua podcast nya.

Prasyarat Android Market

Getting Started

Before you can publish software on the Android Market, you must do three things:


Source : http://market.android.com/publish/signup

Kamis, 21 Oktober 2010

PHP cURL function to get Data from Web

Source : http://davidwalsh.name/download-urls-content-php-curl


 

    function get_data($url)

    {     

        $userAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)";

        

        $ch = curl_init();

        $timeout = 5;

        

        curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);

        curl_setopt($ch, CURLOPT_URL,$url);

        curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);

        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,$timeout);

        curl_setopt($ch, CURLOPT_FAILONERROR, true);

        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

        curl_setopt($ch, CURLOPT_AUTOREFERER, true);

        curl_setopt($ch, CURLOPT_TIMEOUT, 10);

        

        $data = curl_exec($ch);

        curl_close($ch);

        return $data;

    }

Menggunakan Codeigniter untuk Aplikasi CommandLine (CLI)

Ada kalanya kita perlu menggunakan Command Line interface untuk melakukan suatu process. Tapi karena sudah terbiasa dengan Codeigniter, maka kita tentunya tidak mau kehilangan fungsi – fungsi maupub library yang sudah ada didalam codeigniter. Nah berikut ini caranya :

  1. Pastikan PHP telah bisa dipanggil dari Command Line. (Kalo di linux pasti udah bisa. Kalo di Windows harus setup Environment variabel dari Ctrl Panel->System->Advanced->Environment Variables :: cari Path modifikasi jadi ;LOKASI/PHP/PHP.exe)
  2. Buka http://codeigniter.com/wiki/CI_on_the_command_line/ . Download MY_URI.zip
  3. Extract MY_URI , letakan MY_URI.PHP ke application/libraries
  4. Dalam config.php ubah $config['uri_protocol'] = "CLI"
  5. Test dengan cara : php index.php nama_controller nama_fungsi

Selamat mencoba!

Jumat, 15 Oktober 2010

Javascript In Array Like PHP

    Array.prototype.in_array = function(p_val)

    {

        for(var i = 0, l = this.length; i < l; i++) {

            if(this[i] == p_val) {

                return
true;

            }

        }

        return
false;

    }


 

Sumber : http://snippets.dzone.com/posts/show/4653

Rabu, 13 Oktober 2010

Jumlah Maksimum Varchar di MSSQL Server

In SQL Server 2000 and SQL Server 7, a row cannot exceed 8000 bytes in size. This means that a VARBINARY column can only store 8000 bytes (assuming it is the only column in a table), a VARCHAR column can store up to 8000 characters and an NVARCHAR column can store up to 4000 characters (2 bytes per unicode character). This limitation stems from the 8 KB internal page size SQL Server uses to save data to disk.

To store more data in a single column, you needed to use the TEXT, NTEXT, or IMAGE data types (BLOBs) which are stored in a collection of 8 KB data pages that are separate from the data pages that store the other data in the same table. These data pages are arranged in a B-tree structure. BLOBs are hard to work with and manipulate. They cannot be used as variables in a procedure or a function and they cannot be used inside string functions such as REPLACE, CHARINDEX or SUBSTRING. In most cases, you have to use READTEXT, WRITETEXT, and UPDATETEXT commands to manipulate BLOBs.

To solve this problem, Microsoft introduced the VARCHAR(MAX), NVARCHAR(MAX), and VARBINARY(MAX) data types in SQL Server 2005. These data types can hold the same amount of data BLOBs can hold (2 GB) and they are stored in the same type of data pages used for other data types. When data in a MAX data type exceeds 8 KB, an over-flow page is used. SQL Server 2005 automatically assigns an over-flow indicator to the page and knows how to manipulate data rows the same way it manipulates other data types. You can declare variables of MAX data types inside a stored procedure or function and even pass them as variables. You can also use them inside string functions.

Microsoft recommend using MAX data types instead of BLOBs in SQL Server 2005. In fact, BLOBs are being deprecated in future releases of SQL Server.


 

Sumber : http://www.teratrax.com/articles/varchar_max.html

Senin, 11 Oktober 2010

Javasript multithreading example

Source : http://articles.sitepoint.com/article/multi-threading-javascript/2


 

function process()
{
var above = 0, below = 0;
for(var i=0; i<1000000; i++)
{
if(Math.random() * 2 > 1)
{
above ++;
}
else
{
below ++;
}
}
}


 


 

function test2()

{

var result2 = document.getElementById('result2');

var start = new Date().getTime();

var i = 0, limit = 100, busy = false;

var processor = setInterval(function()

{

if(!busy)

{

busy = true;

result2.value = 'time=' +

(new Date().getTime() - start) + ' [i=' + i + ']';

process();

if(++i == limit)

{

clearInterval(processor);

result2.value = 'time=' +

(new Date().getTime() - start) + ' [done]';

}

busy = false;

}

}, 100);

}

Rabu, 06 Oktober 2010

Using FooStack PHPunit for codeigniter

This is not a result. This just what i have try.

  1. I am using CI 1.7.2 standard folder.
  2. Put fooStack in system/application/libraries
  3. Put tests in system/application
  4. Make sure nothing is loaded automatically excep database in autoload.
  5. If Other libraries loaded then it will generate error. Example session shouldn't be loaded.


     


 

Create your Common Controller by Extending Codeigniter Controller

Sometimes we need to create a base controller of our own application. Here are steps to build and use your own controller based on Codeigniter controller

  1. Create a controller that extend code igniter controller
  2. Put your controller in same directory where Codeigniter main controller exist
  3. Edit Codeigniter.php, find code that load controller class
  4. Add same code to load your controller
  5. Use it by extend your own controller in same manner like it is CI base controller

Senin, 04 Oktober 2010

SuperFish Jquery Plugin Menu

Download : http://users.tpg.com.au/j_birch/plugins/superfish/#download

Sample Code:

//link to the CSS files for this menu type 
<link rel="stylesheet" type="text/css" media="screen" href="superfish.css" /> 
 
// link to the JavaScript files (hoverIntent is optional) 
<script type="text/javascript" src="hoverIntent.js"></script> 
<script type="text/javascript" src="jquery.bgiframe.min.js"></script> 
<script type="text/javascript" src="superfish.js"></script> 
 
// initialise Superfish 
<script type="text/javascript"> 
 
    
$(document).ready(function(){ 
        
$("ul.sf-menu").superfish().find('ul').bgIframe({opacity:false}); 
    }); 
 
</script>

Jumat, 01 Oktober 2010

Solved : message: Cannot open user default database. Using master database instead



Error message: Cannot open user default database. Using master database instead.

this mean user that used to access database don't have default database set in it's property.
Open MsSQL Server Management Studio->Security->Logins->user->properties you will get this dialog, then make sure you have default database selected fot he user.



php draft printing

  • A standard receipt printer such as the Epson TM-T88III receipt printer uses the parallel port.
  • To print to the parallel-port receipt printer, you print through port PRN (exactly the same as printing from DOS prompt).
  • From within PHP-GTK2, you need to first establish the connection with the printer by using $handle = fopen("PRN", "w");
  • Thereafter, to print anything to the printer, you just "write" to it like the file handle: fwrite($handle, 'text to printer');
  • There are newer receipt printer that uses USB. I believe you should be able to print to such printers through PRN too.

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More