This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Drawing; | |
using System.Globalization; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Windows.Forms; | |
namespace Spy | |
{ |
This file contains 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 'dart:math' as math; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(TestApp()); | |
class TestApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, |
This file contains 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
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Font | |
:set guifont=Source\ Code\ Pro:h14 | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Hide pointless junk at the bottom, doesn't work in .vimrc for some reason? | |
:set laststatus=0 | |
:set noshowmode "don't show --INSERT-- | |
:set noruler "don't show line numbers/column/% junk |
This file contains 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
/* | |
erica sadun, ericasadun.com | |
Core Geometry | |
*/ | |
import Foundation | |
import QuartzCore |
This file contains 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
# Demo of a "tool" for pyqtgraph that, when attached to a plot item it adds a menu | |
# action that, when toggled, checks for new data periodically and auto pans the X axis. | |
# The new-data-checking period is dynamically adjusted depending on the range being | |
# displayed | |
# | |
# Snippet adapted from the taurus_pyqtgraph.autopantool module to be used without taurus. | |
# See: | |
# https://github.com/taurus-org/taurus_pyqtgraph/blob/master/taurus_pyqtgraph/autopantool.py | |
This file contains 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
pragma solidity ^0.4.18; | |
contract D { | |
uint public n; | |
address public sender; | |
function callSetN(address _e, uint _n) public { | |
_e.call(bytes4(keccak256("setN(uint256)")), _n); // E's storage is set, D is not modified | |
} | |
function callcodeSetN(address _e, uint _n) public { |
This file contains 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
In this post, .net platform has this pinvoke mechanism where it is allowed that you call into the Native windows . | |
this is extremely useful when you have some 3rd party libraries or if you try to program against with the low-level windows APIS. | |
One of the typic application htat utilize the Lowe-level windows apis are those Native win32 applications. Where you creat a message pump with the necessary WNDCLASSEX to represent/register the window message pump and message handler process. What you will deal with the win32 applications include the following. | |
RegisterClassEx, CreateWindowEx, GetMessage(), TranslateMesage(), and DispatchMessage(...). | |
to be able to use the Window API, you have to declare tons of Structure and PInvoke Method, while you can find help from the Pinvoke.Net. | |
First, we will introduce some of the win32/user32 functions and their relative structure definitions. |
This file contains 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
<body> | |
<style>pre { white-space: inherit }</style> | |
<pre id="log"></pre> | |
<div id="ports" style="visibility: hidden; height: 0; width: 0;"></div> | |
<iframe src="about:blank" name="x" id="x" style="display: none;"></iframe> | |
</body> | |
<script> | |
var electrum = { | |
logbreak: function() { e = document.createElement('br'); document.getElementById('log').appendChild(e); }, | |
log: function(s) { e = document.createElement('span'); e.innerText = s+" "; document.getElementById('log').appendChild(e); }, |
This file contains 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
//: Playground - noun: a place where people can play | |
import UIKit | |
import PlaygroundSupport | |
extension UIView { | |
func asCircle(){ | |
self.layer.cornerRadius = self.frame.width / 2; | |
self.layer.masksToBounds = true | |
} |
This file contains 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
#!/bin/bash | |
set -eux | |
HOME_DIR=`realpath ~` | |
MT_DIR="$HOME_DIR/.wine32/drive_c/Program\ Files/MetaTrader\ 5" | |
f='' | |
cd ~/tmp | |
rm -rf mql-zmq | |
git clone https://github.com/dingmaotu/mql-zmq |
NewerOlder