Skip to content

Instantly share code, notes, and snippets.

View TopekoX's full-sized avatar
🐧
Making Love with Code...

Ucup TopekoX TopekoX

🐧
Making Love with Code...
View GitHub Profile
public class Hello{
public static void main(String[] args){
System.out.println("Hello Git");
}
}
/**
*=========================================================
* Program ini dibuat oleh Ucup Timposu
* URL: www.timposu.com
* email : ucup.timposu@gmail.com
* Silahkan kode Java ini dipelajari / disebarkan
* secara bebas...
*==========================================================
*/
@TopekoX
TopekoX / DemoVariabelLokal.java
Created September 22, 2015 09:30
Demo Variabel lokal java
class DemoVariabelLokal{
// membuat method lokal test
void test(){
int umur=0; //mendeklarasikan variabel lokal dengan nama umur dan memasukan nilai 0 ke dalamnya
umur = umur + 20; //memasukan nilai umur yang sudah ada ditambah dengan 20
System.out.println("Umur saya : " + umur);
}
public static void main(String[] args){
@TopekoX
TopekoX / web.xml
Created October 15, 2017 04:42
web.xml for Servlet 3.1
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
</web-app>
@TopekoX
TopekoX / pom.xml for build tomcat 8 maven.xml
Last active October 15, 2017 06:25
Tomcat 8 integration with Maven
<build>
<finalName>belajar</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.6.4</version>
<configuration>
<container>
<containerId>tomcat8x</containerId>
@TopekoX
TopekoX / pom_xml_build_java_8_maven.xml
Last active October 17, 2017 03:10
Build java 8 maven
<project>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
@TopekoX
TopekoX / root-context.xml
Created October 16, 2017 07:08 — forked from quynguyen3490/root-context.xml
Spring MVC Config - Put 3 files in WEB-INF
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<!-- Root Context: defines shared resources visible to all other web components -->
</beans>
@TopekoX
TopekoX / eclipse_spring_gitignore
Created October 18, 2017 05:49
gitignore spring eclipse
.DS_Store
# Eclipse Ignore
.classpath
.project
.settings
# Maven Ignore
target
# login root
su
systemctl start postgresql
su - postgres
psql
# edit password postgres
\password postgres
# create user & database
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.timposu</groupId>
<artifactId>spring-hibernate</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>Spring Hibernate Example</name>
<properties>