Skip to content

Instantly share code, notes, and snippets.

public class Employee {
private String id;
private String firstName;
private String lastName;
private String address;
private int age;
//setter getter are hidden
}
//MainDota.java
public class MainDota {
public static void main(String[] args) {
Hero hero1 = new Hero();
hero1.setId(1);
hero1.setName("Huskar");
hero1.setAbility(EnumAbility.STRENGTH.getAbility());
Hero hero2 = new Hero();
hero2.setId(2);
//ExampleController.java
@Controller
public class ExampleController {
@RequestMapping(value = Routes.MTS.HOME, method = RequestMethod.GET)
public String home(ModelMap modelMap) {
modelMap.put("menu", "home");
return Routes.MTS.VIEW_HOME;
}
@RequestMapping(value = Routes.SADARIAH.HOME, method = RequestMethod.GET)
public String home(ModelMap modelMap) {
package com.qbiel.conn;
import org.apache.log4j.Logger;
import com.jcraft.jsch.*;
public class SftpConn {
//log4j
static Logger logger = Logger.getLogger(SftpConn.class);
private static final String HOST = "127.0.0.1";
private static final int PORT = 22;
private static final String USER = "adil";
package com.qbiel.service;
import java.io.File;
import java.util.Vector;
import com.jcraft.jsch.ChannelSftp;
import com.jcraft.jsch.ChannelSftp.LsEntry;
import com.jcraft.jsch.SftpException;
import com.qbiel.conn.SftpConn;
public class ServiceSftp {
//Desa.Java
@Entity
@Table(name="desa")
public class Desa {
@Id @Column(name="ID")
private int id;
@Id @Column(name="NAME")
private String name;
@OneToMany(fetch = FetchType.EAGER, mappedBy = "desa")
private Set<Clan> clans = new HashSet<Clan>();
/*
* Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
<wizard class="form-horizontal" id="timeline">
<step title="Welcome">
<label for="title">Title (required):</label>
<input type="text" name="title" id="title" class="form-control"
required placeholder="Your Timeline Title" ng-model="currEL.title" />
<ul ng-show="$$prevSibling.step.title.$dirty && $$prevSibling.step.title.$invalid" class="ng-error-list">
<li ng-show="$$prevSibling.step.title.$error.required">An eventline, definitely, needs a title. Don't you think?</li>
</ul>
<!-- TODO: maybe use errors like this for every step -->
<!-- <errors> -->
@adilkurniaramdan
adilkurniaramdan / angular-google-map piece of code
Created December 16, 2014 15:14
angular-google-map piece of code
angular.extend $scope,
rad:150
circles: []
markers: []
clickedMarker:
id: 0
title: ""
map:
control: {}
center:
class : DjpWs.class
public String ProsesXmlLengkap(String AlamatFileXML, String NPWP) {
String respon = null;
String pathKeystoreLocation = sCtx.getInitParameter("keystoreLocation");
String passwordKeystore = sCtx.getInitParameter("passwordKeystore");
logger.info("[ProsesXMLLengkap] Processing file [" + NPWP + "]");
try {
String AlamatWrapped = sCtx.getInitParameter("pathWrapped");
logger.debug("[ProsesXMLLengkap] Parent direcory wrapped XML " + AlamatWrapped);