Skip to content

Instantly share code, notes, and snippets.

View junjizhi's full-sized avatar
🏠
Working from home

Junji Zhi junjizhi

🏠
Working from home
View GitHub Profile
import 'package:flutter/material.dart';
import 'package:csv/csv.dart';
import 'dart:async' show Future;
import 'package:flutter/services.dart' show rootBundle;
class TableLayout extends StatefulWidget {
@override
_TableLayoutState createState() => _TableLayoutState();
}
pragma solidity ^0.4.10;
/**
* Base contract that all upgradeable contracts should use.
*
* Contracts implementing this interface are all called using delegatecall from
* a dispatcher. As a result, the _sizes and _dest variables are shared with the
* dispatcher contract, which allows the called contract to update these at will.
*
* _sizes is a map of function signatures to return value sizes. Due to EVM
@pdanford
pdanford / README.md
Last active April 13, 2024 18:19
Launching iTerm2 from macOS Finder

Launching iTerm2 from macOS Finder

(Based on info from Peter Downs' gitub but with modified behavior to open a new terminal window for each invocation instead of reusing an already open window.)

The following three ways to launch an iTerm2 window from Finder have been tested on iTerm2 version 3+ running on macOS Mojave+.

pdanford - April 2020


@jackiekazil
jackiekazil / rounding_decimals.md
Last active January 17, 2024 12:29
How do I round to 2 decimals in python?

How do I round to 2 decimals?

In python, you have floats and decimals that can be rounded. If you care about the accuracy of rounding, use decimal type. If you use floats, you will have issues with accuracy.

All the examples use demical types, except for the original value, which is automatically casted as a float.

To set the context of what we are working with, let's start with an original value.

Original Value

@hidsh
hidsh / open-finder.el
Last active October 18, 2017 22:12
Mac: open folder by Finder from Emacs
(defun open-finder-1 (dir file)
(let ((script
(if file
(concat
"tell application \"Finder\"\n"
" set frontmost to true\n"
" make new Finder window to (POSIX file \"" dir "\")\n"
" select file \"" file "\"\n"
"end tell\n")
(concat