This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>Custom Button of Upload File</title> | |
| <style> | |
| .upload-btn { | |
| position: relative; | |
| width: 40px; |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <input type="file" /> | |
| <script> |
This file contains hidden or 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
| var url = { | |
| getQueryParameter: function (name, url) { | |
| if (!url) { | |
| url = window.location.href; | |
| } | |
| name = name.replace(/[\[\]]/g, "\\$&"); | |
| var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), | |
| results = regex.exec(url); | |
| if (!results) return null; | |
| if (!results[2]) return ''; |
This file contains hidden or 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
| select permission_name, state_desc, type_desc, U.name, OBJECT_NAME(major_id) | |
| from sys.database_permissions P | |
| JOIN sys.tables T ON P.major_id = T.object_id | |
| JOIN sysusers U ON U.uid = P.grantee_principal_id |
This file contains hidden or 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 class Human { | |
| private IHuman human; | |
| public Human(IHuman human) { | |
| this.human = human; | |
| } | |
| public void doSomeWork() { | |
| human.doWork(); | |
| } | |
| public static void main(String[] args) | |
| { |
This file contains hidden or 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
| var x = {a:1, b:2 }; | |
| var y = {a:5, c:3, d:5}; | |
| Object.leftJoin = function(leftObj, rightObj) { | |
| var acceptKeyList = Object.keys(leftObj); | |
| var returnObj = {}; | |
| for(var key of Object.keys(rightObj)) { | |
| if(acceptKeyList.indexOf(key) < 0) { | |
| Object.defineProperty(rightObj, key, { |
This file contains hidden or 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
| package com.test; | |
| import java.awt.image.BufferedImage; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import java.util.Date; | |
| import org.apache.pdfbox.pdmodel.PDDocument; | |
| import org.apache.pdfbox.pdmodel.PDPage; | |
| import org.apache.pdfbox.pdmodel.encryption.AccessPermission; |
This file contains hidden or 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
| # Reference: https://viewsby.wordpress.com/2013/01/07/get-response-time-with-curl/ | |
| curl -o /dev/null -s -w %{time_total}\\n 'http://www.google.com' |
This file contains hidden or 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
| package com.jsgao.bean; | |
| import java.security.InvalidKeyException; | |
| import java.security.Key; | |
| import java.security.KeyFactory; | |
| import java.security.KeyPair; | |
| import java.security.KeyPairGenerator; | |
| import java.security.NoSuchAlgorithmException; | |
| import java.security.NoSuchProviderException; | |
| import java.security.PrivateKey; |
This file contains hidden or 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
| package com.example; | |
| import org.json.JSONObject; | |
| public class ReturnException extends Exception { | |
| // Because Exception implements Throwable which implements Serializable. | |
| private static final long serialVersionUID = 1L; | |
| public ReturnException(){} |
NewerOlder