code stringlengths 10 1.34M | language stringclasses 1
value |
|---|---|
// Copyright 2011 The Graphics-Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package detect
import (
"image"
"image/draw"
)
// integral is an image.Image-like structure that stores the cumulative
// sum of the preceding pixe... | Go |
// Copyright 2011 The Graphics-Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package detect
import (
"image"
)
// projector allows projecting from a source Rectangle onto a target Rectangle.
type projector struct {
// rx, ry... | Go |
// Copyright 2011 The Graphics-Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Package detect implements an object detector cascade.
The technique used is a degenerate tree of Haar-like classifiers, commonly
used for face dete... | Go |
// Copyright 2011 The Graphics-Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package detect
import (
"bytes"
"encoding/xml"
"errors"
"fmt"
"image"
"io"
"io/ioutil"
"strconv"
"strings"
)
type xmlFeature struct {
Rects... | Go |
// Copyright 2011 The Graphics-Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package graphics
import (
"code.google.com/p/graphics-go/graphics/interp"
"errors"
"image"
"image/draw"
)
// Scale produces a scaled version of t... | Go |
// Copyright 2011 The Graphics-Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package graphicstest
import (
"bytes"
"errors"
"fmt"
"image"
"image/color"
"os"
)
// LoadImage decodes an image from a file.
func LoadImage(pat... | Go |
// Copyright 2011 The Graphics-Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package graphics
import (
"code.google.com/p/graphics-go/graphics/interp"
"errors"
"image"
"image/draw"
"math"
)
// I is the identity Affine tra... | Go |
// Copyright 2012 The Graphics-Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package interp
import (
"image"
"image/color"
"math"
)
// Bilinear implements bilinear interpolation.
var Bilinear Interp = bilinear{}
type bilin... | Go |
// Copyright 2012 The Graphics-Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package interp
import (
"image"
"image/color"
)
// Interp interpolates an image's color at fractional co-ordinates.
type Interp interface {
// Int... | Go |
// Copyright 2012 The Graphics-Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Package interp implements image interpolation.
An interpolator provides the Interp interface, which can be used
to interpolate a pixel:
c := int... | Go |
// Copyright 2011 The Graphics-Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package convolve
import (
"errors"
"fmt"
"image"
"image/draw"
"math"
)
// clamp clamps x to the range [x0, x1].
func clamp(x, x0, x1 float64) fl... | Go |
// Copyright 2011 The Graphics-Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package graphics
import (
"code.google.com/p/graphics-go/graphics/interp"
"errors"
"image"
"image/draw"
)
// RotateOptions are the rotation param... | Go |
// Copyright 2011 Rob Thornton. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build linux bsd unix
package goncurses
// #include <form.h>
// #include <menu.h>
import "C"
// Form Driver Requests
type FormDriverReq C.int
const (
REQ_... | Go |
/* A simmple example of how to use the panel ncurses library */
package main
import . "goncurses.googlecode.com/hg/goncurses"
func main() {
stdscr, _ := Init()
defer End()
StartColor()
CBreak(true)
Echo(true)
stdscr.Keypad(true)
stdscr.Print("Hit 'tab' to cycle through windows, 'q' to qu... | Go |
/* This example show a basic menu similar to that found in the ncurses
* examples from TLDP */
package main
import . "goncurses.googlecode.com/hg/goncurses"
func main() {
stdscr, _ := Init();
defer End()
StartColor()
Raw(true)
Echo(false)
Cursor(0)
stdscr.Keypad(true)
InitPair(1... | Go |
/* This example show a basic menu similar to that found in the ncurses
* examples from TLDP */
package main
import . "goncurses.googlecode.com/hg/goncurses"
func main() {
stdscr, _ := Init();
defer End()
StartColor()
Raw(true)
Echo(false)
Cursor(0)
stdscr.Keypad(true)
// bu... | Go |
/* This simple example mirrors the "hello world" TLDP ncurses howto */
package main
/* Note that is not considered idiomatic Go to import curses this way */
import . "goncurses.googlecode.com/hg/goncurses"
func main() {
stdscr, _ := Init()
defer End()
Echo(false)
CBreak(true)
StartColor()
... | Go |
/* This example shows a scrolling menu similar to that found in the ncurses
* examples from TLDP */
package main
import . "goncurses.googlecode.com/hg/goncurses"
const (
HEIGHT = 10
WIDTH = 40
)
func main() {
stdscr, _ := Init();
defer End()
StartColor()
Raw(true)
Echo(false)
C... | Go |
/* This simnple example mirrors one in the TLDP ncurses howto. It demonstrates
* how to move a window around the screen. It is advisable not to */
package main
import "code.google.com/p/goncurses"
func main() {
stdscr, _ := goncurses.Init()
defer goncurses.End()
goncurses.Echo(false)
goncurses.CBreak(true)
g... | Go |
/* An example of using AddChar to show a non-standard character */
package main
import . "goncurses.googlecode.com/hg/goncurses"
func main() {
stdscr, _ := Init()
defer End()
stdscr.Print("A reversed color diamond: ")
stdscr.AddChar(ACS_DIAMOND | A_REVERSE)
stdscr.Refresh()
stdscr.GetCha... | Go |
/* This simple example mirrors the "hello world" TLDP ncurses howto */
package main
import "code.google.com/p/goncurses"
func main() {
stdscr, _ := goncurses.Init()
defer goncurses.End()
stdscr.Print("Hello, World!!!")
stdscr.Refresh()
stdscr.GetChar()
}
| Go |
/* A simmple example of how to use the panel ncurses library */
package main
import . "goncurses.googlecode.com/hg/goncurses"
func main() {
stdscr, _ := Init()
defer End()
var panels [3]*Panel
y, x := 2, 4
for i := 0; i < 3; i++ {
window, _ := NewWindow(10, 40 , y+i, x+(i*5))
... | Go |
/* This example show a basic menu similar to that found in the ncurses
* examples from TLDP. Errors are intentionally discarded */
package main
import . "goncurses.googlecode.com/hg/goncurses"
const (
HEIGHT = 10
WIDTH = 30
)
func main() {
var active int
menu := []string{"Choice 1", "Choice 2", "Ch... | Go |
/* This example mirrors the second example in the TLDP ncurses howto,
demonstrating some of the initilization options for ncurses;
In gnome, the F1 key launches help, so F2 is tested for instead */
package main
import . "goncurses.googlecode.com/hg/goncurses"
func main() {
stdscr, _ := Init()
defer E... | Go |
/* This example mirrors the second example in the TLDP ncurses howto,
demonstrating some of the initilization options for ncurses;
In gnome, the F1 key launches help, so F2 is tested for instead */
package main
import . "goncurses.googlecode.com/hg/goncurses"
func main() {
stdscr, _ := Init();
defer ... | Go |
/* This example demonstrates the use of the menu library, similar to that
* found in the ncurses examples from TLDP */
package main
import "code.google.com/p/goncurses"
const (
HEIGHT = 10
WIDTH = 30
)
func main() {
stdscr, _ := goncurses.Init()
defer goncurses.End()
goncurses.Raw(true)
goncurses.Echo(fal... | Go |
/* This example show a basic menu similar to that found in the ncurses
* examples from TLDP */
package main
import . "goncurses.googlecode.com/hg/goncurses"
const (
HEIGHT = 10
WIDTH = 30
)
func main() {
var active int
menu := []string{"Choice 1", "Choice 2", "Choice 3", "Choice 4", "Exit"}
stdscr, _ := Ini... | Go |
/* This example show a basic menu similar to that found in the ncurses
* examples from TLDP */
package main
import . "goncurses.googlecode.com/hg/goncurses"
func main() {
stdscr, _ := Init();
defer End()
StartColor()
Raw(true)
Echo(false)
Cursor(0)
stdscr.Keypad(true)
InitPair(1... | Go |
/* This example demonstrates reading a string from input, rather than a
* single character. Note that only the 'n' versions of getstr have been
* implemented in goncurses to ensure buffer overflows won't exist */
package main
import . "goncurses.googlecode.com/hg/goncurses"
func main() {
stdscr, _ := Init();
... | Go |
/* This example shows a basic multi-column menu similar to that found in the
* ncurses examples from TLDP */
package main
import . "goncurses.googlecode.com/hg/goncurses"
const (
HEIGHT = 10
WIDTH = 40
)
func main() {
stdscr, _ := Init();
defer End()
StartColor()
Raw(true)
Echo(fa... | Go |
/* This simnple example demonstrates some of the color facilities of ncurses */
package main
/* Note that is not considered idiomatic Go to import curses this way */
import . "goncurses.googlecode.com/hg/goncurses"
func main() {
stdscr, _ := Init()
defer End()
StartColor()
Raw(true)
Echo(tru... | Go |
// Copyright 2011 Rob Thornton. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build linux bsd unix
/* ncurses panel extension
The following functions have not been implemented because there are far more
effective manners by which they... | Go |
// Copyright 2011 Rob Thornton. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package goncurses
// #include <stdlib.h>
// #include <ncurses.h>
// #include "goncurses.h"
import "C"
import (
"errors"
"fmt"
"reflect"
"unsafe"
)
type Win... | Go |
// Copyright 2011 Rob Thornton. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package goncurses
// #include <ncurses.h>
import "C"
// Synconize options for Sync() function
const (
SYNC_NONE = iota
SYNC_CURSOR // Sync cursor in all sub... | Go |
// goncurses - ncurses library for Go.
// Copyright 2011 Rob Thornton. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/* ncurses library
1. No functions which operate only on stdscr have been implemented because
it makes little sense... | Go |
// Copyright 2011 Rob Thornton. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build linux bsd unix
package goncurses
/*
#include <ncurses.h>
#include <form.h>
#include <menu.h>
*/
import "C"
import (
"errors"
"syscall"
)
// Driver... | Go |
// Copyright 2011 Rob Thornton. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build linux bsd unix
/* ncurses menu extension */
package goncurses
/*
#cgo LDFLAGS: -lmenu
#include <menu.h>
#include <stdlib.h>
ITEM* menu_item_at(ITEM**... | Go |
// Copyright 2011 Rob Thornton. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build linux bsd unix
/* ncurses form extension */
package goncurses
//#cgo LDFLAGS: -lform
//#include <form.h>
import "C"
import (
"syscall"
"unsafe"
)
... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package spdy
import (
"compress/zlib"
"encoding/binary"
"io"
"net/http"
"strings"
)
func (frame *SynStreamFrame) read(h ControlFrameHeader, f *Framer) er... | Go |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package spdy
// headerDictionary is the dictionary sent to the zlib compressor/decompressor.
var headerDictionary = []byte{
0x00, 0x00, 0x00, 0x07, 0x6f, 0x70... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package spdy
import (
"encoding/binary"
"io"
"net/http"
"strings"
)
func (frame *SynStreamFrame) write(f *Framer) error {
return f.writeSynStreamFrame(fr... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package spdy implements the SPDY protocol (currently SPDY/3), described in
// http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3.
package spdy
... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package websocket
// This file implements a protocol of Hixie draft version 75 and 76
// (draft 76 equals to hybi 00)
import (
"bufio"
"bytes"
"crypto/md5"... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package websocket implements a client and server for the WebSocket protocol.
// The protocol is defined at http://tools.ietf.org/html/draft-ietf-hybi-thewebs... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package websocket
// This file implements a protocol of hybi draft.
// http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17
import (
"bufio"
"... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package websocket
import (
"bufio"
"fmt"
"io"
"net/http"
)
func newServerConn(rwc io.ReadWriteCloser, buf *bufio.ReadWriter, req *http.Request) (conn *Con... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package websocket
import (
"bufio"
"crypto/tls"
"io"
"net"
"net/url"
)
// DialError is an error that occurs while dialling a websocket server.
type DialE... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package idna
// This file implements the Punycode algorithm from RFC 3492.
import (
"fmt"
"math"
"strings"
"unicode/utf8"
)
// These parameter values are... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package idna implements IDNA2008 (Internationalized Domain Names for
// Applications), defined in RFC 5890, RFC 5891, RFC 5892, RFC 5893 and
// RFC 5894.
pac... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package dict implements the Dictionary Server Protocol
// as defined in RFC 2229.
package dict
import (
"net/textproto"
"strconv"
"strings"
)
// A Clie... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv4
import (
"syscall"
)
func ipv4HeaderPrepend(fd int) (bool, error) {
// TODO(mikio): Implement this
return false, syscall.EPLAN9
}
func setIP... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv4
import (
"errors"
"fmt"
"net"
"runtime"
"syscall"
"unsafe"
)
var (
errMissingAddress = errors.New("missing address")
errMissingHeader ... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv4
import (
"syscall"
)
func (c *genericOpt) sysfd() (int, error) {
// TODO(mikio): Implement this
return 0, syscall.EPLAN9
}
func (c *dgramOpt... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin freebsd linux netbsd openbsd windows
package ipv4
import (
"net"
"syscall"
)
// MulticastTTL returns the time-to-live field value for out... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv4
import (
"errors"
"net"
)
var (
errNoSuchInterface = errors.New("no such interface")
errNoSuchMulticastInterface = errors.New("no s... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv4
import (
"net"
"syscall"
"time"
)
// A Conn represents a network endpoint that uses the IPv4 transport.
// It is used to control basic IP-lev... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv4
import (
"net"
"os"
"syscall"
"unsafe"
)
// Linux provides a convenient path control option IP_PKTINFO that
// contains IP_SENDSRCADDR, IP_R... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv4
import (
"net"
"syscall"
)
func (c *dgramOpt) MulticastTTL() (int, error) {
// TODO(mikio): Implement this
return 0, syscall.EPLAN9
}
func ... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv4
import (
"syscall"
)
func setControlMessage(fd int, opt *rawOpt, cf ControlFlags, on bool) error {
// TODO(mikio): Implement this
return sysc... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin freebsd linux netbsd openbsd windows
package ipv4
import (
"bytes"
"net"
"syscall"
)
func setSyscallIPMreq(mreq *syscall.IPMreq, ifi *ne... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv4
import (
"net"
"os"
"syscall"
)
func ipv4ReceiveTOS(fd int) (bool, error) {
v, err := syscall.GetsockoptInt(fd, syscall.IPPROTO_IP, syscall.... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin freebsd linux netbsd openbsd
package ipv4
import (
"os"
"syscall"
)
func ipv4TOS(fd int) (int, error) {
v, err := syscall.GetsockoptInt(... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv4
import (
"fmt"
"net"
"sync"
)
type rawOpt struct {
mu sync.Mutex
cflags ControlFlags
}
func (o *rawOpt) lock() { o... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin freebsd netbsd openbsd
package ipv4
import (
"net"
"os"
"syscall"
)
func ipv4MulticastTTL(fd int) (int, error) {
v, err := syscall.Gets... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin freebsd linux netbsd openbsd
package ipv4
import (
"net"
"reflect"
)
func (c *genericOpt) sysfd() (int, error) {
switch p := c.c.(type) ... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin freebsd netbsd openbsd
package ipv4
import (
"net"
"os"
"syscall"
"unsafe"
)
func setControlMessage(fd int, opt *rawOpt, cf ControlFlag... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv4
import (
"net"
"reflect"
"syscall"
)
func (c *genericOpt) sysfd() (syscall.Handle, error) {
switch p := c.c.(type) {
case *net.TCPConn, *ne... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv4
import (
"net"
"syscall"
)
// A payloadHandler represents the IPv4 datagram payload handler.
type payloadHandler struct {
c net.PacketConn
r... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv4
import (
"net"
"syscall"
)
// A packetHandler represents the IPv4 datagram handler.
type packetHandler struct {
c *net.IPConn
rawOpt
}
func... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv4
import (
"os"
"syscall"
)
func ipv4SendSourceAddress(fd int) (bool, error) {
v, err := syscall.GetsockoptInt(fd, syscall.IPPROTO_IP, syscall.... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv4
import (
"syscall"
)
func setControlMessage(fd syscall.Handle, opt *rawOpt, cf ControlFlags, on bool) error {
// TODO(mikio): Implement this
... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package ipv4 implements IP-level socket options for the Internet
// Protocol version 4.
//
// The package provides IP-level socket options that allow
// man... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin freebsd linux netbsd openbsd windows
package ipv4
import (
"syscall"
)
// TOS returns the type-of-service field value for outgoing packets... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv4
import (
"syscall"
)
func (c *genericOpt) TOS() (int, error) {
// TODO(mikio): Implement this
return 0, syscall.EPLAN9
}
func (c *genericOpt... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv4
import (
"net"
"os"
"syscall"
"unsafe"
)
// Please refer to the online manual;
// http://msdn.microsoft.com/en-us/library/windows/desktop/ms... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package proxy
import (
"errors"
"io"
"net"
"strconv"
)
// SOCKS5 returns a Dialer that makes SOCKSv5 connections to the given address
// with an optional ... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package proxy provides support for a variety of protocols to proxy network
// data.
package proxy
import (
"errors"
"net"
"net/url"
"os"
)
// A Dialer ... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package proxy
import (
"net"
)
type direct struct{}
// Direct is a direct proxy: one that makes network connections directly.
var Direct = direct{}
func (d... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package proxy
import (
"net"
"strings"
)
// A PerHost directs connections to a default Dialer unless the hostname
// requested matches one of a number of ex... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
package main
// This program generates table.go and table_test.go.
// Invoke as:
//
// go run gen.go -version "xxx" >table.go
// go run... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package publicsuffix provides a public suffix list based on data from
// http://publicsuffix.org/. A public suffix is one under which Internet users
// can d... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package html
import (
"code.google.com/p/go.net/html/atom"
)
// A NodeType is the type of a Node.
type NodeType uint32
const (
ErrorNode NodeType = iota
T... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package html
import (
"strings"
)
func adjustAttributeNames(aa []Attribute, nameMap map[string]string) {
for i := range aa {
if newName, ok := nameMap[aa[... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package html
import (
"bufio"
"errors"
"fmt"
"io"
"strings"
)
type writer interface {
io.Writer
io.ByteWriter
WriteString(string) (int, error)
}
// R... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package html
// Section 12.2.3.2 of the HTML5 specification says "The following elements
// have varying levels of special parsing rules".
// http://www.whatwg... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package html
import (
"bytes"
"io"
"strconv"
"strings"
"code.google.com/p/go.net/html/atom"
)
// A TokenType is the type of a Token.
type TokenType uint... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package html
import (
"strings"
)
// parseDoctype parses the data from a DoctypeToken into a name,
// public identifier, and system identifier. It returns a ... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package html
import (
"bytes"
"strings"
"unicode/utf8"
)
// These replacements permit compatibility with old numeric entities that
// assumed Windows-1252 ... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package html
import (
"errors"
"fmt"
"io"
"strings"
a "code.google.com/p/go.net/html/atom"
)
// A parser implements the HTML5 parsing algorithm:
// http... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package html
// All entities that do not end with ';' are 6 or fewer bytes long.
const longestEntityWithoutSemicolon = 6
// entity is a map from HTML entity n... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Package html implements an HTML5-compliant tokenizer and parser.
Tokenization is done by creating a Tokenizer for an io.Reader r. It is the
caller's respons... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package atom provides integer codes (also known as atoms) for a fixed set of
// frequently occurring HTML strings: tag names and attribute keys such as "p"
/... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
package main
// This program generates table.go and table_test.go.
// Invoke as
//
// go run gen.go |gofmt >table.go
// go run gen.go -test |... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package spdy
import (
"compress/zlib"
"encoding/binary"
"io"
"net/http"
"strings"
)
func (frame *SynStreamFrame) read(h ControlFrameHeader, f *Framer) er... | Go |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package spdy
// headerDictionary is the dictionary sent to the zlib compressor/decompressor.
var headerDictionary = []byte{
0x00, 0x00, 0x00, 0x07, 0x6f, 0x70... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package spdy
import (
"encoding/binary"
"io"
"net/http"
"strings"
)
func (frame *SynStreamFrame) write(f *Framer) error {
return f.writeSynStreamFrame(fr... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package spdy implements the SPDY protocol (currently SPDY/3), described in
// http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3.
package spdy
... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package websocket
// This file implements a protocol of Hixie draft version 75 and 76
// (draft 76 equals to hybi 00)
import (
"bufio"
"bytes"
"crypto/md5"... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package websocket implements a client and server for the WebSocket protocol.
// The protocol is defined at http://tools.ietf.org/html/draft-ietf-hybi-thewebs... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package websocket
// This file implements a protocol of hybi draft.
// http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17
import (
"bufio"
"... | Go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.