System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
/* Exercise: Loops and Functions #43 */ | |
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func Sqrt(x float64) float64 { | |
z := float64(2.) |
System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does | |
import hudson.model.*; | |
import hudson.util.*; | |
import jenkins.model.*; | |
import hudson.FilePath.FileCallable; | |
import hudson.slaves.OfflineCause; | |
import hudson.node_monitors.*; | |
for (node in Jenkins.instance.nodes) { |
package tokenizer | |
/* | |
#cgo CFLAGS: XXX CHANGE ME XXX | |
#cfo LDFALGS: XXX CHANGE ME XXX | |
#include <mecab.h> | |
struct mecab_t {} | |
*/ | |
import "C" | |
import "errors" |
#Android and CI and Gradle (A How-To) | |
There are tech stacks in this world that make it dead simple to integrate a <abbr title="Continuous Integration">CI</abbr> build system. <br> | |
The Android platform is not one of them. | |
Although Gradle is getting better, it's still a bit non-deterministic, and some of the fixes you'll need will start to feel more like black magic than any sort of programming. | |
But fear not! It can be done! | |
Before we embark on our journey, you'll need a few things to run locally: |
public class ImageViewBindingAdapter { | |
@BindingAdapter("bind:imageUrl") | |
public static void loadImage(view: ImageView, url: String) { | |
Glide.with(view.context).load(url).into(view) | |
} | |
} |
// ref : https://gist.github.com/cmelchior/1a97377df0c49cd4fca9 | |
private void initGson() { | |
Type tokenInt = new TypeToken<RealmList<RealmInt>>(){}.getType(); | |
Type tokenString = new TypeToken<RealmList<RealmString>>(){}.getType(); | |
Type tokenDate = new TypeToken<Date>(){}.getType(); | |
mGson = new GsonBuilder() | |
.setDateFormat("yyyy-MM-dd'T'HH:mm:ss.ssssss") | |
.setExclusionStrategies(new ExclusionStrategy() { | |
@Override |
package com.carlosedurdo.database; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.concurrent.atomic.AtomicInteger; | |
import io.realm.Realm; | |
import io.realm.RealmObject; | |
/** |
local pressedKeyTable = {} | |
-- TODO: Consider about consumed per keys is necessary or not. | |
local consumed = false | |
local keyCodeTable = {} | |
keyCodeTable[0x66] = true -- EISUU | |
keyCodeTable[0x68] = true -- KANA | |
eventtap = hs.eventtap.new({ hs.eventtap.event.types.keyDown, hs.eventtap.event.types.keyUp }, function(event) | |
local keyCode = event:getKeyCode() | |
if keyCodeTable[keyCode] == true then |