Showing posts with label Knowledge. Show all posts
Showing posts with label Knowledge. Show all posts

Install Laravel in ubuntu varian

8:59 PM | , , , , , , , ,

Requirements

  • Apache, nginx, or another compatible web server.
  • Laravel takes advantage of the powerful features that have become available in PHP 5.3. Consequently, PHP 5.3 is a requirement.
  • Laravel uses the FileInfo library to detect files' mime-types. This is included by default with PHP 5.3. However, Windows users may need to add a line to their php.ini file before the Fileinfo module is enabled. For more information check out the installation / configuration details on PHP.net.
  • Laravel uses the Mcrypt library for encryption and hash generation. Mcrypt typically comes pre-installed. If you can't find Mcrypt in the output of phpinfo() then check the vendor site of your LAMP installation or check out the installation / configuration details on PHP.net.

Installation


  1. Download Laravel
  2. Extract the Laravel archive and upload the contents to your web server.
  3. Set the value of the key option in the config/application.php file to a random, 32 character string.
  4. Verify that the storage/views directory is writable.
    You can use chmod option like this
    #chmod a+w your_path/storage/views  -R
  5. Navigate to your application in a web browser. http://localhost/laravel/public
Read More

Change your Gnome 3 menu with cinnamon

3:18 PM | , , , ,

Cinnamon is a Gnome 3 fork that allow you to have a panel at the bottom with a classic Menu, this is useful for people that want to use Ubuntu with a classic Bottom Menu.


More info about Cinnamon can be found in here.
To install Cinnamon on Ubuntu 12.04 Precise Pangolin, use the following PPA:
sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-nightly
To install Cinnamon on Ubuntu 11.10 Oneiric Oncelot, use the following PPA:
sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-nightly
sudo apt-get update
sudo apt-get install cinnamon
and then restart your computer. Before login change your default desktop environment and choose cinnamon.
This is screenshoot of cinnamon menu.





Read More

How to Install Mate Desktop Environment 1.4

5:54 AM | , , , , , , ,


1- Add MATE repository:

- For Ubuntu 12.04 Precise Pangolin
sudo add-apt-repository "deb http://packages.mate-desktop.org/repo/ubuntu precise main"
- For Debian wheezy
vi /etc/apt/sources.list
and add:
deb http://packages.mate-desktop.org/repo/debian wheezy main
save and close
- For LinuxMint
You need to use the repository above for Ubuntu, then edit /etc/apt/preferences using command:
vi /etc/apt/preferences
and  at the bottom of the file add these lines:
Package: *
Pin: origin packages.mate-desktop.org
Pin-Priority: 700
2- Refresh and install
sudo apt-get update
sudo apt-get install mate-archive-keyring
sudo apt-get update
sudo apt-get install mate-desktop-environment
Wait for the installation














Is done.
Read More

Bikin Diagram di Komputer Pake Pencil

9:49 AM | , ,

Skripsi...skripsi..skripsi...
Susahnya jadi anak TI, kalo skripsi mesti harus bikin desain ERD lah, DFD, Diagram Kelas, dan diagram-diagram lain. Belum lagi harus bikin desain aplikasinya gimana.

Nah sekarang ane mau share info buat temen" yang lagi skripsi [termasuk ane juga].
Hemmm judul postingnya kok kayak orang galau gitu ya bikin diagram di komputer pake pensil? Sabar dulu gan, entar ane jelasin pencil yg kayak gimana yg bisa bikin diagram di komputer. Dengan pensil itu kita bisa bikin diagram pake Mozilla Firefox tanpa harus online.

Masa sih??? Ngarang dehhh. Firefox kan nama browser internet, gimana caranya? Yang ada juga paling harus online n' butuh koneksi dewa.


Yupz.. Firefox emang browser, tapi gak sekedar browser. Sekarang ini firefox bisa nggantiin fungsinya microsoft visio cukup kita instal add-on aja. Nah nama addon-nya itu teteret..teret...

apa???apa???
kasih tau gak ya??
ya udah gak usah share gak mutu...

Yupz... sabar... namanya "Pencil" ohhh jadi pencil itu nama plugin.


Oke sekarang kita instal deh itu pencil ke firefoxnya. Gimana caranya ikuti ane ya...
1. Syaratnya firefoxnya harus versi 4+ ( versi 4 ke atas )
2. Download add-on nya di sini

3. Lalu buka folder tempat download file tadi Pencil-1.3-4-fx.xpi , klik kanan 
    lalu pilih pilih open with firefox.
4. Instal add-on ikuti langkah" sesuai petunjuk si firefox

5. Restart firefox
6. Klik tombol bergambar pencil di pojok kanan bawah


7. Kalo belum muncul coba buka menu View > Toolbars > Add-on Bars
8. Tampilannya kurang lebih kayak gini gan

   
9. Nah kalo templatenya kurang bisa dicari di sini gan http://pencil.evolus.vn/en-US/Downloads/Stencils.aspx
10. Hasilnya kayak gini gan...



lumayan kan daripada lumanyun :)
Read More

Tips and Tricks About MySQL

2:47 PM | , , , , , , , ,


Hi guys, long time no post again about programming. Now I will share you about some tricks on mysql. I hope this was useful for you. Okay let's see the code

1. Reindexing an Auto Increment Id

ALTER TABLE yourtable ADD COLUMN id2 INT(11) UNSIGNED  NOT NULL AFTER `id`;     SET @a:=0;                                                                      UPDATE yourtable SET id2=@a:=@a+1 ORDER BY id;                                   ALTER TABLE yourtable DROP id;                                                  ALTER TABLE yourtable CHANGE id2 id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,   ADD PRIMARY KEY(id);

2. Make a zerofill on the field value

CREATE TABLE yourtable (x INT(8) ZEROFILL NOT NULL, y INT(8) NOT NULL);
INSERT INTO yourtable (x,y) VALUES
(1, 1),
(12, 12),
(123, 123),
(123456789, 123456789);
SELECT x, y FROM yourtable;

Read More

Make a Graphic with Java

9:18 PM | , , , , , , ,

Hey.. long time no see you ... Coz  I'm so very busy. Now I want to share about how to make a graphic in the Java. This is a screenshot picture of the program that we want to make.


How to make it in java ? This is the code ..


package tugas_1;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Shape;
import java.awt.geom.Area;
import java.awt.geom.Ellipse2D;
import java.awt.geom.RoundRectangle2D;
import javax.swing.JFrame;
import javax.swing.JPanel;

/**
 *
 * @author alircute
 * Game Programming Task
 * 21th March 2012
 */

public class Gambar extends JPanel {

    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        Graphics2D g2= (Graphics2D) g;
     
        //Make the window
        g2.setColor(Color.BLACK);
        g2.fillRect(400, 0, 400, 400);
        g2.setColor(Color.CYAN);
        g2.fillRect(400, 0, 400, 10);      
        g2.fillRect(400, 195, 400, 10);
        g2.fillRect(400, 390, 400, 10);
        g2.fillRect(400, 0, 10, 400);
        g2.fillRect(600, 0, 10, 400);
     
        //Make the moon
        g2.setColor(Color.yellow);
        Shape b1 = new Ellipse2D.Double(680, 60, 60, 70);      
        Shape b2 = new Ellipse2D.Double(670,70,45,45);
        Shape m1 = new Ellipse2D.Double(705, 80, 10, 20);
        Shape m3 = new Ellipse2D.Double(705, 85, 8, 15);
        Shape m2 = new Ellipse2D.Double(715, 80, 10, 20);
        Shape m4 = new Ellipse2D.Double(715, 85, 8, 15);      
        Area r11 = new Area(b2);
        Area a11 = new Area(b1);
        a11.subtract(r11);
        g2.fill(a11);
        g2.setColor(Color.BLACK);
        g2.draw(m1);
        g2.draw(m2);
        g2.setColor(Color.WHITE);
        g2.fill(m1);
        g2.fill(m2);
        g2.setColor(Color.BLUE);
        g2.fill(m3);
        g2.fill(m4);
        g2.setColor(Color.BLACK);
        g2.fillRect(700, 108, 20, 5);
     
        //Question mark
        g2.setFont(new Font("Times New Roman", 1, 24));
        g2.setColor(Color.WHITE);
        g2.drawString("?", 700, 50);
        g2.drawString("?", 670, 80);
        g2.drawString("?", 740, 80);
     
        //Make a people
        g2.setColor(Color.BLUE);
        g2.fillRoundRect(120, 250, 200, 300, 35, 35);
        g2.setColor(Color.yellow);
        g2.fillRoundRect(200, 220, 30, 50,35,35);
        g2.setColor(Color.GREEN);
        Shape kepala = new Ellipse2D.Double(155, 100, 120, 150);
        g2.fill(kepala);
        g2.setColor(Color.WHITE);
        g2.fillOval(185, 130, 20, 40);
        g2.fillOval(225, 130, 20, 40);
        g2.setColor(Color.BLACK);
        g2.fillOval(190, 150, 15, 20);
        g2.fillOval(225, 150, 15, 20);
        Shape mulut = new Ellipse2D.Double(190, 195, 50, 30);  
        Shape lidah = new Ellipse2D.Double(190, 205, 50, 30);
        g2.setColor(Color.RED);
        g2.fill(mulut);
        Area lidahnya = new Area(lidah);
        Area m = new Area(mulut);
        m.subtract(lidahnya);
        g2.setColor(Color.BLACK);
        g2.fill(m);
       
     
     
        //Make a notebook
        g2.setColor(Color.DARK_GRAY);
        g2.fillRoundRect(45, 295, 350, 250, 15, 15);
        g2.setColor(Color.DARK_GRAY);
        RoundRectangle2D rd=new RoundRectangle2D.Double(45, 545, 350, 20, 15, 15);
        g2.fill(rd);
             
        //Make an Apple Logo but I deliberate reserve it
        Shape e1 = new Ellipse2D.Double(200,320,40,40);
        Shape e2 = new Ellipse2D.Double(220,330,40,40);
        Shape e3 = new Ellipse2D.Double(160,370,45,45);
        Shape s1 = new Ellipse2D.Double(180, 360, 60, 70);
        Shape s2 = new Ellipse2D.Double(210, 360, 50, 70);
        Area d1 = new Area(e1);
        Area d2 = new Area(e2);
        Area r1 = new Area(e3);
        Area a2 = new Area(s2);
        Area a1 = new Area(s1);
        a1.subtract(r1);
        a1.add(a2);      
        d2.intersect(d1);
        a1.add(d2);      
        g2.setColor(Color.LIGHT_GRAY);
        g2.draw(a1);
        g2.fill(a1);
     
        g2.setFont(new Font("Arial", 1, 32));
        g2.setColor(Color.MAGENTA);
        g2.drawString("http://www.mabok-coding.com", 10, 650);
    }

 
   //The main method
    public static void main(String[] args) {
        Gambar gambarQ=new Gambar();
        gambarQ.setVisible(true);
        JFrame f=new JFrame("Alir Emang Oke");
        f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        f.getContentPane().add(gambarQ);
        f.setSize(800,800);
        f.setLocationRelativeTo(null);
        f.setVisible(true);
    }
}

You can download the source at http://www.4shared.com/rar/CqIe7nal/Java_Graphic2D.html

Read More

Installing NetBeans OpenGL Pack Plugin part-2

10:23 PM | , , , ,

Hi guys... nice to see you again. Four days ago I promised you to share about Installing Netbeans openGL Pack Plugin. Have you download plugins yet ? If you haven't you can download them at  http://plugins.netbeans.org/ and search on the catalogue (See http://newbiebehappy.blogspot.com/2012/02/installing-netbeans-opengl-pack-plugin.html   for detail information).

Okay, if you have been download them. Please open Netbean Application. I use Netbean 7.0 with Ubuntu 10.4 Operating System. After that click tools menu on the menu bar. So you will see the window as like below.















Browse plugins for JOGL that we have downloaded as like picture below. Don't forget to extract zip file first before do it.

Next , click install button to begin the instalation process as like picture below.















Netbean will search and download some plugins dependencies automatically if you connected the internet. Or you can download and install plugins dependecies manually.














Click "Next" and then accept the License Agreement. After installation you must  restart the Netbean IDE.






























After restart , netbean will configure the new plugins modul's for the first use like below.















You can try demo JOGL by click a new project, chose sample > JOGL demos and chose project that you want to open. This is one of JOGL demos that show three of turning gears.





Read More