This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
sys.path.append(os.path.dirname(os.path.realpath('__file__')) + "/python") | |
from com.ziclix.python.sql import zxJDBC | |
cnx = zxJDBC.connect("jdbc:mysql://localhost/yourdb", "username", "password", "org.gjt.mm.mysql.Driver") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public dft_teman() { | |
initComponents(); | |
btnAct.addActionListener(new ActionListener() { | |
@Override | |
public void actionPerformed(ActionEvent e) { | |
String isi = plcTxt.getText(); | |
System.out.println(isi); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void btnProcessMouseClicked(java.awt.event.MouseEvent evt) { | |
// TODO add your handling code here: | |
int strUsia = Integer.parseInt(txtUsia.getText()); | |
int thnLahir = 2017-strUsia; | |
String a = "Nama saya" + txtNama.getText()+ ", Saya biasa di panggil " + txtNickname.getText() + ", Alamat saya " + txtAlamat.getText() + ", nomor hp saya " + txtNohp.getText() + "" | |
+ " dan lahir pada tahun " + thnLahir; | |
plcTxt.setText(a); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package digital_scale; | |
/** | |
* | |
* @author riyos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tkinter | |
from tkinter import * | |
from sqlite import con, exe | |
con = con | |
exe = exe | |
import datetime | |
head = tkinter.Tk() | |
Label(ndas, text="Title").grid(row=0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sqlite3 | |
con = sqlite3.connect("alpha.db") | |
exe = con.cursor() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymysql | |
db = pymysql.connect(host="localhost", user="root", passwd="psswrd", db="movie") | |
kusi = db.cursor() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sqlite3 | |
import pymysql | |
"""sqlite""" | |
con = sqlite3.connect("alpha.db") | |
exe = con.cursor() | |
"""MySQL""" | |
db = pymysql.connect(host="localhost", user="root", passwd="psswrd", db="movie") | |
kusi = db.cursor() |