start new:
tmux
start new with session name:
tmux new -s myname
import csv | |
import sqlite3 as lite | |
import subprocess | |
from itertools import chain | |
from time import time | |
import sys | |
#import logging | |
#logging.basicConfig(level=logging.DEBUG) | |
# |
function dex-method-count() { | |
cat $1 | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"' | |
} | |
function dex-method-count-by-package() { | |
dir=$(mktemp -d -t dex) | |
baksmali $1 -o $dir | |
for pkg in `find $dir/* -type d`; do | |
smali $pkg -o $pkg/classes.dex | |
count=$(dex-method-count $pkg/classes.dex) | |
name=$(echo ${pkg:(${#dir} + 1)} | tr '/' '.') |
public class HelloJNI { | |
static { | |
System.loadLibrary("hello"); // loads libhello.so | |
} | |
private native void sayHello(String name); | |
public static void main(String[] args) { | |
new HelloJNI().sayHello("Dave"); | |
} |
public class DisposableManager { | |
private static CompositeDisposable compositeDisposable; | |
public static void add(Disposable disposable) { | |
getCompositeDisposable().add(disposable); | |
} | |
public static void dispose() { | |
getCompositeDisposable().dispose(); |
package com.example.playground; | |
import android.arch.lifecycle.Lifecycle; | |
import android.arch.lifecycle.LifecycleObserver; | |
import android.arch.lifecycle.OnLifecycleEvent; | |
import android.support.annotation.NonNull; | |
import android.util.Log; | |
import java.lang.ref.WeakReference; | |
import java.util.Map; |
package fr.gstraymond.search | |
data class Trie(private val char: Char, | |
private val indices: MutableList<Int> = mutableListOf(), | |
private val children: MutableList<Trie> = mutableListOf()) { | |
fun add(word: String, | |
index: Int) { | |
val first = word.first() | |
val trie = findOrCreate(first) |
macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.
Instead of tmux-256color
, use screen-256color
which comes with system. Place this command into ~/.tmux.conf
or ~/.config/tmux/tmux.conf
(for version 3.1 and later):
import Foundation | |
import SwiftUI | |
public extension View { | |
@available(iOS, obsoleted: 15.0, message: "SwiftUI.View.task is available on iOS 15.") | |
@_disfavoredOverload | |
@inlinable func task( | |
priority: _Concurrency.TaskPriority = .userInitiated, | |
@_inheritActorContext _ action: @escaping @Sendable () async -> Swift.Void | |
) -> some SwiftUI.View { |