Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
use std::collections::HashMap;
use std::fmt;
use std::io;
use std::num::ParseFloatError;
use std::rc::Rc;
/*
Types
*/
@ksco
ksco / chai.json
Last active May 6, 2022 15:09
中文左右拆字字库
{
"卧": "臣卜",
"项": "工页",
"功": "工力",
"攻": "工攵",
"荆": "茾刂",
"邪": "牙阝",
"雅": "牙隹",
"期": "其月",
"欺": "其欠",

Strings

String.prototype.*

None of the string methods modify this – they always return fresh strings.

  • charAt(pos: number): string ES1

    Returns the character at index pos, as a string (JavaScript does not have a datatype for characters). str[i] is equivalent to str.charAt(i) and more concise (caveat: may not work on old engines).

int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
@dockimbel
dockimbel / eval2.red
Created April 3, 2018 10:12
Test script for Red/View Android backend
Red [
Title: "Red Android bridge demo"
Author: "Nenad Rakocevic"
File: %eval2.red
Config: [type: 'dll libRed?: no libRedRT?: yes export-ABI: 'cdecl]
Tabs: 4
Needs: 'View
Rights: "Copyright (C) 2013-2017 Nenad Rakocevic. All rights reserved."
License: {
Distributed under the Boost Software License, Version 1.0.
@Integ
Integ / unwxapkg.py
Last active March 26, 2024 02:51 — forked from feix/unwxapkg.py
A useful tool for unpack wxapkg file with python3 surport.
# coding: utf-8
# py2 origin author lrdcq
# usage python3 unwxapkg.py filename
__author__ = 'Integ: https://github.com./integ'
import sys, os
import struct
class WxapkgFile(object):
@thimslugga
thimslugga / guacamole install on ubuntu 16.04
Last active October 6, 2022 17:58 — forked from cyrex562/guacamole install on ubuntu 16.04
guacamole install on ubuntu 16.04
# install required packages
apt -y update && apt-get -y dist-upgrade
add-apt-repository ppa:webupd8team/java
apt -y update
apt -y install libcairo2-dev libjpeg-turbo8-dev libpng12-dev libossp-uuid-dev libfreerdp-dev libpango1.0-dev libssh2-1-dev libtelnet-dev \
libvncserver-dev libpulse-dev libssl-dev libvorbis-dev libwebp-dev git build-essential autoconf libtool oracle-java8-installer tomcat8 \
tomcat8-admin tomcat8-common tomcat8-docs tomcat8-user maven postgresql-server-dev-9.5 postgresql-common postgresql-9.5 libpulse-dev \
libvorbis-dev freerdp ghostscript wget pwgen
# create directories & files

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?