Skip to content

Instantly share code, notes, and snippets.

@beachandbytes
beachandbytes / rtorrent.rc
Created March 28, 2015 14:21
rTorrent config. Currently moves completed downloads to folders based on label (But only if label is applied before download finishes)
# rtorrent config file ß
directory = /home/hd4/accountname/torrents/data
session = /home/hd4/accountname/.config/rtorrent/sessP5,5,load_start="~/torrents/watch/*.torrent"
port_range = 57657-57657
encryption = allow_incoming,enable_retry,try_outgoing
dht = off
peer_exchange = no
check_hash = no
execute = {sh,-c,rm -f /home/hd4/accountname/.config/rtorrent/session/rpc.socket}
scgi_local = /home/hd4/accountname/.config/rtorrent/session/rpc.socket
> head(bl2)
[[1]]
V1
1 0.9
2 1.0
3 2.2
4 2.4
5 2.6
6 3.8
foreach(i=unique(CCR$ID)) %do% {
row <- subset(CCR, ID == i)
CCR$OldEmployerRate[CCR$ID==i] <- ECR$Rate[ECR$EID == row$EID]
}
within(Wages, {
TotalWages <- sum(Wages$TotalWages[Wages$ID == ID && Wages$Year <= Year])
})
PreviousQuarters <- c(clientResults$ClaimsPaid[clientResults$YearQuarter == QuarterDates[1]],
clientResults$ClaimsPaid[clientResults$YearQuarter == QuarterDates[2]],
clientResults$ClaimsPaid[clientResults$YearQuarter == QuarterDates[3]])
var newResult = (from client in ctx.Audit().Where(z => batches.Contains(z.BatchID) || batches.Count == 0)
group client by new
{
client.BatchID,
client.PrevBatchID,
client.BatchNo ,
client.PrevBatchNo ,
} into clientGroup
select new Clients
{
CID | CName | EID | EName
1 Test 1 Fred
1 Test 2 Jon
1 Test 3 Rick
2 Rock 1 Sam
2 Rock 2 Jay
2 Rock 3 Faz
@beachandbytes
beachandbytes / gist:6619083
Last active December 23, 2015 10:09
Adds Toggle Line Numbers to Tools Menu I want to not add it to the toolbar instead of the tools menu.
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.ComponentModel.Design;
using Microsoft.VisualStudio.Shell;
using EnvDTE;
using EnvDTE80;
namespace None.TLN
{
SELECT *
FROM (
SELECT
P.club,
memberCount.members,
titleCount.titles,
SUM(O.Price * P.qnty) AS sales
FROM
purchase P
JOIN offer O ON
SELECT
P.club
,memberCount.members
,SUM(O.Price * P.qnty) [sales]
FROM purchase P
INNER JOIN offer O ON O.club = P.club AND P.title = O.title
INNER JOIN (
SELECT M.club,COUNT(*) [members]
FROM members M
GROUP BY M.club