https://medium.com/@clairesimmonds/postgresql-decoding-deadlocks-183e6a792fd3
This file contains hidden or 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
class PostcodesRequest | |
require 'open-uri' | |
require 'nokogiri' | |
def postcode_file_name | |
page = Nokogiri::HTML(open('http://www.posti.fi/webpcode/unzip/')) | |
href = page.css('p').css('a') | |
text = href.text | |
splits = text.split('webpcode/') | |
names = splits[1].split('.dat') |
This file contains hidden or 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
string Serialize(object o) | |
{ | |
XmlWriterSettings Settings = new XmlWriterSettings() | |
{ | |
Indent = true, | |
IndentChars = " ", | |
NewLineHandling = NewLineHandling.None, | |
NewLineChars = "\n", | |
}; | |
var sb = new StringBuilder(); |
This file contains hidden or 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
/* | |
* ---------------------------------------------------------------------------- | |
* "THE BEER-WARE LICENSE" (Revision 42): | |
* Guoxun Yang and Zeljko Milojkovic wrote this file. As long as you retain this | |
* notice you can do whatever you want with this stuff. If we meet some day, and | |
* you think this stuff is worth it, you can buy us beer in return. | |
* ---------------------------------------------------------------------------- | |
*/ | |
using System; |
This file contains hidden or 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.Net.Sockets; | |
using System.Net; | |
using System.Text; | |
using System.Threading; | |
namespace UDPer | |
{ | |
class UDPer | |
{ |
This file contains hidden or 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
package com.zwr.speed; | |
import android.location.Location; | |
import android.location.LocationListener; | |
import android.location.LocationManager; | |
import android.os.Bundle; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.view.Menu; | |
import android.widget.TextView; |
This file contains hidden or 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
#duplicate{dst="transcode{vfilter={rotate{angle=270}:croppadd{croptop=120,cropbottom=0,cropleft=740,cropright=610}},live-caching=80,network-caching=0,vcodec=VP80,vb=4000,height=1080,width=1920,fps=15,acodec=none}:standard{access=http,mux=webm,dst=0.0.0.0:8090/main.webm}",dst="transcode{vfilter={rotate{angle=270}:croppadd{croptop=120,cropbottom=0,cropleft=740,cropright=610}},live-caching=80,network-caching=0,vcodec=h264,venc=x264{ultrafast},vb=4000,height=1080,width=1920,fps=15,acodec=none}:standard{access=http,mux=ts,dst=0.0.0.0:8090/main.mp4}",dst="transcode{vfilter={rotate{angle=270}:croppadd{croptop=120,cropbottom=0,cropleft=740,cropright=610}},live-caching=80,network-caching=0,vcodec=theo,vb=4000,height=1080,width=1920,fps=15,acodec=none}:standard{access=http,mux=ogg,dst=0.0.0.0:8090/main.ogg}"} |
This file contains hidden or 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
// GacUtil my own way. | |
// Since GacUtil is not distributed with .NET framework (after 1.1.), should yo uwant to install your assemblies to GAC, | |
// you are likely to need this code. | |
using System; | |
// Add reference: System.EnterpriseServices | |
namespace ZGacInst |
This file contains hidden or 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
; Full script for making an NSIS installation package for .NET programs, | |
; Allows installing and uninstalling programs on Windows environment, and unlike the package system | |
; integrated with Visual Studio, this one does not suck. | |
;To use this script: | |
; 1. Download NSIS (http://nsis.sourceforge.net/Download) and install | |
; 2. Save this script to your project and edit it to include files you want - and display text you want | |
; 3. Add something like the following into your post-build script (maybe only for Release configuration) | |
; "$(DevEnvDir)..\..\..\NSIS\makensis.exe" "$(ProjectDir)Setup\setup.nsi" | |
; 4. Build your project. |