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
/* | |
* Copyright The Dragonfly Authors. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
{ | |
"ignoreSslErrors": true, | |
"localToRemoteUrlAccessEnabled": true, | |
"webSecurityEnabled": false | |
} |
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
#!/usr/bin/env python | |
# Unity indicator for evolution-less clock and date display | |
# author: phil ayres | |
# 24 Oct 2011 | |
import gobject | |
import gtk | |
import appindicator | |
import os, sys | |
import time |
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
import redis.clients.jedis.Jedis; | |
import java.util.BitSet; | |
Jedis redis = new Jedis("localhost"); | |
public int uniqueCount(String action, String... dates) { | |
BitSet all = new BitSet(); | |
for (String date : dates) { | |
String key = action + ":" + date; | |
BitSet users = BitSet.valueOf(redis.get(key.getBytes())); |
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
import redis.clients.jedis.Jedis; | |
import java.util.BitSet; | |
Jedis redis = new Jedis("localhost"); | |
public int uniqueCount(String action, String date) { | |
String key = action + ":" + date; | |
BitSet users = BitSet.valueOf(redis.get(key.getBytes())); | |
return users.cardinality(); | |
} |
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
/*jslint undef: true, nomen: true, eqeqeq: true, plusplus: true, newcap: true, immed: true, browser: true, devel: true, passfail: false */ | |
/*global window: false, readConvertLinksToFootnotes: false, readStyle: false, readSize: false, readMargin: false, Typekit: false, ActiveXObject: false */ | |
var dbg = (typeof console !== 'undefined') ? function(s) { | |
console.log("Readability: " + s); | |
} : function() {}; | |
/* | |
* Readability. An Arc90 Lab Experiment. | |
* Website: http://lab.arc90.com/experiments/readability |
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
#compdef go | |
_arguments "1:commands:((\ | |
build\:'compile packages and dependencies' \ | |
clean\:'remove object files' \ | |
doc\:'run godoc on package sources' \ | |
env\:'print Go environment information' \ | |
fix\:'run go tool fix on packages' \ | |
fmt\:'run gofmt on package sources' \ | |
get\:'download and install packages and dependencies' \ |
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 main | |
import "fmt" | |
func main() { | |
fmt.Println("Hello, 世界") | |
} |
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
//正确 | |
long creditCardNumber = 1234_5678_9012_3456L; | |
long socialSecurityNumber = 999_99_9999L; | |
float pi = 3.14_15F; | |
long hexBytes = 0xFF_EC_DE_5E; | |
long hexWords = 0xCAFE_BABE; | |
long maxLong = 0x7fff_ffff_ffff_ffffL; | |
byte nybbles = 0b0010_0101; | |
long bytes = 0b11010010_01101001_10010100_10010010; |
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 static void viewTable(Connection con) throws SQLException { | |
String query = "select COF_NAME, SUP_ID, PRICE, SALES, TOTAL from COFFEES"; | |
try (Statement stmt = con.createStatement()) { | |
ResultSet rs = stmt.executeQuery(query); | |
while (rs.next()) { | |
String coffeeName = rs.getString("COF_NAME"); |
NewerOlder