Profile

Sabtu, 26 Maret 2011

Check for open mdi child, with focus (C#)


This code snippet shows you how to check if is your MDI container has a specific MDI child open or not.
The sample below looks though each of the mdi children in the container for a instance of the form you want to open.If an instance is found, the form is brought to the front (focused).If an instance of the form is not found, the code opens a new instance of the form.

Snippet

private void CheckMdiChildren(Form form)
{
foreach (Form frm in this.MdiChildren)
{
if (frm.GetType() == form.GetType())
{
frm.Focus();
return;
}http://www.blogger.com/img/blank.gif
}

form.MdiParent = this;
form.Show();
}

Usage:
MyForm form = new MyForm();
CheckMdiChildren(form);



Senin, 24 Januari 2011

Handle Barcode Sacnner Input in Browser via jQuery

Handle Barcode Sacnner Input in Browser via jQuery

B/S(Browser/Server) architecture applications dominate the enterprise market. It is important to enable other input devices, such as barcode scanner(reader). This tutorial shows how to deal with barcode scanner in browser.

1. How does barcode scanner work ?
When you plug a barcode scanner into a comptuer, it will be recognized as an input device, similar as keyboard. Wherever you can input text via keyboard, so can barcode scanner. It can be understood as that, barcode scanner read text from a barcode tag, then type them one by one for you.

For example, suppose there is a barcode "1234". when you scan it with barcode scanner, it likes you type via keyboard,"1","2","3","4","ENTER". Yes, there will be a "enter" stroke which automatically added by scanner after it finished read the barcode.

2. Capture barcode in Action.
First of all, put a input filed to accept barcode:

input name="barcode" id="barcodeinput" type="text"

Then listen the keypress event, get the barcode value when there is a "enter" key stroke:


$("#barcodeinput").keypress(function(e){
//key code 13 is "enter",
if(e.keyCode==13){
//print out the barcode
alert($("#scaninput").val(););
//clear the input field for next scan
$("#scaninput").val('');
//kill the "enter" event
return false;
}
});



Notice:
Because the "enter" keystroke, IE will submit the form. To stop it, use "return false".



source: http://www.ke-cai.net/2009/06/handle-barcode-sacnner-input-in-browser.html

Kamis, 06 Januari 2011

Add currency indonesian rupiah

1. Login into admin panels
2. select Menu :System > Localisation >Currencies.
3. Click INSERT in Currency page
4. Input all data

Tutorial Membuat Toko Online dengan Opencart–Install bahasa indonesia

Setelah Selesai Instalasi Aplikasi Opencart, kemudian Login ke admin panel.
Selanjutya Download file modul bahasa indonesia di web resmi opencart.

Berikut langkah-langkah instalasinya:

1. Ekstrak file Language Indonesia.zip

2. Copy folder indonesia ke direktori catalog/language/

3. Login ke halaman admin.

4. Masuk ke menu System > Localisation > Languages.

5. Pada halaman Language, klik tombol Insert.

6. Masukan data-data sebagai berikut :

* Language Name: Indonesia
* Code: ID
* Locale: id_US.UTF-8,id_US,id-gb,indonesia
* Image: id.png
* Directory: indonesia
* Filename: indonesia
* Status: Enabled
* Sort Order: 1 atau 2
7. lanjut klik tombol Save.

8. Pada halaman catalog sudah terdapat pilihan bahasa Indonesia.

Selamat mencoba Good Luck...

Selasa, 21 Desember 2010

Bikin TCPDF font

Filed under: CentOS, Fedora, Joomla, LAMP, oscommerce, php, Tips, Tricks | Tags: create pdf with php, create php fonts, Create TCPDF PHP Fonts, pdfPHP, tcpdf fonts |

TCPDF supports TrueTypeUnicode (UTF-8 Unicode), OpenTypeUnicode, TrueType, OpenType, Type1, CID-0 and Core (standard) fonts.

You will find font creation utility at fonts/utils of TCPDF… copy desired font to fonts/utils/svnlabs.ttf

* For TrueTypeUnicode

# cd /var/www/html/tcpdf/fonts/utils

# ttf2ufm -a -F svnlabs.ttf

# php -q makefont.php svnlabs.ttf svnlabs.ufm

* For embedded fonts to tcpdf PDF file.. copy the resulting svnlabs.php, svnlabs.z and svnlabs.ctg.z to fonts folder

Uses:


……..

$pdf->SetFont(‘svnlabs’,'I’,8);

……….

?>

http://sandeepverma.wordpress.com/2009/12/10/create-tcpdf-php-fonts/

Rabu, 29 September 2010

Fatal error: Method Varien_Object::__tostring() cannot take arguments in C:\wamp\www\magento\lib\Varien\Object.php on line 488

Fatal error: Method Varien_Object::__tostring() cannot take arguments in C:\wamp\www\magento\lib\Varien\Object.php on line 488


File: /lib/Varien/Object.php (Line 484)

Change from

public function ___toString(array $arrAttributes = array(), $valueSeparator=',')

To this

public function __invoke(array $arrAttributes = array(), $valueSeparator=',')

File /app/code/core/Mage/Core/Controller/Request/Http.php (Line 274)

Change from

$host = split(':', $_SERVER['HTTP_HOST']);

To this

$host = explode(':', $_SERVER['HTTP_HOST']);



from http://www.magentocommerce.com/boards/viewthread/50022/

Setting curl (magento)

On “xampp-win32-1.6.2-installer.exe” you will Have 4 php files to edit:

C:\xampp\apache\bin\php.ini
C:\xampp\php\php.ini
C:\xampp\php\php4\php.ini
C:\xampp\php\php4\php4.ini

Open the files one at a time With “Notepad++” Press Ctrl F And search\Find “cUrl”, You will See “;extension=php_curl.dll” all you have to do is REMOVE THE ” ; ” from all 4 files Make them:
extension=php_curl.dll And Restart The Xampp Server. Now Curl Support will be on.



From http://www.menyhart.net/blog/developer-stuff/enabling-curl-on-xampp/

Rabu, 04 Agustus 2010

create .ctp on netbean IDE

how to create template file cakePHP (.ctp) on netbean IDE
try this way:

right click and then select new > Empty file > yourfilename.ctp

Finish.

Good luck...

Selasa, 03 Agustus 2010

netbean + cakePHP

How to associate the .ctp file with .php file use IDE netbean ?
try this way :

tools -> option -> miscellaneous -> Files tab


add new file extension " ctp"
and then associated to php.

Good luck ......

Minggu, 01 Agustus 2010

Download Cakephp manual format PDF

“Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility.”

Manual for CakePHP is available here – http://manual.cakephp.org/ in HTML format.

Download cakephp manual pdf format visit : http://arafatbd.net/post-item/22/cakephp-manual-in-pdf-format/comment-page-1/#comment-1593

.....

Rabu, 21 Juli 2010

Bangun Usaha dengan modal dengkul?........

Judul catatan ini memang nampak nyeleneh, namun hal demikian bukanlah perkara yang mustahil, Banyak sekali peluang usaha yang berkeliaran di sekeliling kita, tergantung dari kreatifitas dan cara mengemas sesuatu yang biasa menjadi nampak luar biasa. baru saja siang tadi saya saksikan tayangan televisi swasta yang menggugah dan merangsang semangat untuk bangkit dan terus ber eksplorasi peluang usaha, berawal dari hobi dan kecintaan terhadap kupu- kupu, hewan yang cantik dan beraneka corak, menjadi inspirasi seorang ibu rumah tangga memulai usaha pembuatan replika kupu - kupu, hanya dengan peralatan yang sederhana di dukung citarasa seni yang biasa saja, dia bisa menyulap bulu angsa menjadi wujud kupu kupu yang cantik, hasil karyanya cukup digemari bahkan sampai ke manca negara, keuntungan puluhan juta rupiah diraup setiap bulanya...

Sebuah pelajaran yang cukup berharga bisa kita peroleh dari kisah suksesnya, "Mengemas hal yang biasa menjadi nampak luar biasa", tentunya harus didukung pula dengan semangat pantang menyerah dan ber do'a.

Sabtu, 05 September 2009

ngedadak gak bisa chat Yahoo Messenger di Linux Ubuntu

Wah.... beberapa hari yang lalu sempat kebingungan YM ku ngak mau konek di ubuntu, apa gerangan yang terjadi, sempat tak obrak-abrik Gudang informasi alias tanya sama Mbah Google nyaris tidak nemu solusi....( nyarinya gak sabar kalee....!!!), ketika tenggelam dalam kalut dan kepanikan...( cieee...h) tiba-tiba muncul bisikan gaib...( tanya temen..!?!>), singkat cerita akhirnya dapet juga solusi ternyata menurut informasi Yahoo lagi migrasi server... sehingga settingan protokol servernya berubah menjadi "cn.scs.msg.yahoo.com", setelah saya ganti setingan protokol lama wal- hasil bisa konek seperi biasanya.

bagi anda yang punya masalah sama dengan saya, silakan ganti setting protokol servernya pake
"cn.scs.msg.yahoo.com"

Semoga bermanfaat.....