ChangeLog γζΈγιγ«γγδ½Ώγγγθ±θͺγγΎγ¨γγΎγγγ
γ»γ¨γγ©εΌη¨γ§γγ
| (def user-info ["robert8990" 2011 :name "Bob" :city "Boston"]) | |
| ;= #'user/user-info | |
| (let [[username account-year & extra-info] user-info, | |
| {:keys [name city]} (apply hash-map extra-info)] | |
| (format "%s is in %s" name city)) | |
| ;= "Bob is in Boston" | |
| ;; This example is equal to below. | |
| (let [[username account-year & {:keys [name city]}] user-info] | |
| (format "%s is in %s" name city)) |
| (let [a (inc (rand-int 6)), | |
| b (inc (rand-int 6))] | |
| (println (format "You rolled a %s and b %s" a b)) | |
| (+ a b))) | |
| (defn hypot | |
| [x, y] | |
| (let [x2 (* x x), | |
| y2 (* y y)] |
| import java.util.List; | |
| /** | |
| * Created with IntelliJ IDEA. | |
| * User: ayato | |
| * Date: 5/24/14 | |
| * Time: 4:22 PM | |
| * To change this template use File | Settings | File Templates. | |
| */ | |
| public class ClassPerformance { |
| execute: (form_id, success_proc, fail_proc) -> | |
| $form_obj = $(form_id) | |
| _url = $form_obj.attr('action') | |
| _type = $form_obj.attr('method') | |
| _data = new FormData($form_obj[0]) | |
| $.ajax | |
| type: _type | |
| url: _url | |
| processData: false |
| ;; package | |
| (require 'package) | |
| (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) | |
| (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) | |
| (package-initialize) | |
| (require 'cl) | |
| (defvar installing-package-list | |
| '( | |
| anything |
| package ex; | |
| import javax.servlet.Servlet; | |
| import javax.servlet.ServletException; | |
| import javax.servlet.http.HttpServlet; | |
| import javax.servlet.http.HttpServletRequest; | |
| import javax.servlet.http.HttpServletResponse; | |
| import java.io.IOException; | |
| import java.io.PrintWriter; | |
| import java.nio.charset.StandardCharsets; |
| Set<String> keys = map.keySet(); | |
| for (String key : keys) { | |
| //some condes | |
| } | |
| //βγβγ«γͺγ£γ | |
| Set<String> keys = map.keySet(); | |
| String[] keyarray = keys.toString().split(","); | |
| for(int i=0; i<keyarray.length; i++){ |
| package database.util; | |
| import com.sun.org.apache.xerces.internal.dom.PSVIAttrNSImpl; | |
| import java.sql.Connection; | |
| import java.sql.DriverManager; | |
| import java.sql.SQLException; | |
| /** | |
| * Created with IntelliJ IDEA. |
| public class GenericTest { | |
| public static void main(String[] args) { | |
| GenericTest test = new GenericTest(); | |
| System.out.println(test.join("Hello,", "world")); | |
| System.out.println(test.join(1, 2)); | |
| System.out.println(test.join("Hello", 99999)); | |
| } | |
| public <T> String join(T obj1, T obj2){ | |
| return obj1.toString() + obj2.toString(); |