Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 47 for 2014 (0.07 sec)

  1. src/container/list/example_test.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 list_test
    
    import (
    	"container/list"
    	"fmt"
    )
    
    func Example() {
    	// Create a new list and put some numbers in it.
    	l := list.New()
    	e4 := l.PushBack(4)
    	e1 := l.PushFront(1)
    	l.InsertBefore(3, e4)
    	l.InsertAfter(2, e1)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 08 04:08:51 UTC 2014
    - 549 bytes
    - Viewed (0)
  2. src/crypto/des/example_test.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 des_test
    
    import "crypto/des"
    
    func ExampleNewTripleDESCipher() {
    	// NewTripleDESCipher can also be used when EDE2 is required by
    	// duplicating the first 8 bytes of the 16-byte key.
    	ede2Key := []byte("example key 1234")
    
    	var tripleDESKey []byte
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 08 04:08:51 UTC 2014
    - 697 bytes
    - Viewed (0)
  3. src/encoding/base32/example_test.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.
    
    // Keep in sync with ../base64/example_test.go.
    
    package base32_test
    
    import (
    	"encoding/base32"
    	"fmt"
    	"os"
    )
    
    func ExampleEncoding_EncodeToString() {
    	data := []byte("any + old & data")
    	str := base32.StdEncoding.EncodeToString(data)
    	fmt.Println(str)
    	// Output:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 27 16:54:36 UTC 2021
    - 1.6K bytes
    - Viewed (0)
  4. src/encoding/gob/example_test.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 gob_test
    
    import (
    	"bytes"
    	"encoding/gob"
    	"fmt"
    	"log"
    )
    
    type P struct {
    	X, Y, Z int
    	Name    string
    }
    
    type Q struct {
    	X, Y *int32
    	Name string
    }
    
    // This example shows the basic usage of the package: Create an encoder,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 02 00:13:47 UTC 2016
    - 1.4K bytes
    - Viewed (0)
  5. src/database/sql/example_test.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 sql_test
    
    import (
    	"context"
    	"database/sql"
    	"fmt"
    	"log"
    	"strings"
    	"time"
    )
    
    var (
    	ctx context.Context
    	db  *sql.DB
    )
    
    func ExampleDB_QueryContext() {
    	age := 27
    	rows, err := db.QueryContext(ctx, "SELECT name FROM users WHERE age=?", age)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 28 14:05:09 UTC 2020
    - 8.5K bytes
    - Viewed (0)
  6. src/sync/example_test.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 sync_test
    
    import (
    	"fmt"
    	"os"
    	"sync"
    )
    
    type httpPkg struct{}
    
    func (httpPkg) Get(url string) {}
    
    var http httpPkg
    
    // This example fetches several URLs concurrently,
    // using a WaitGroup to block until all the fetches are complete.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 23 17:45:47 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  7. src/os/exec/example_test.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 exec_test
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"io"
    	"log"
    	"os"
    	"os/exec"
    	"strings"
    	"time"
    )
    
    func ExampleLookPath() {
    	path, err := exec.LookPath("fortune")
    	if err != nil {
    		log.Fatal("installing fortune is in your future")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 06:18:48 UTC 2022
    - 3.5K bytes
    - Viewed (0)
  8. src/net/http/example_test.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 http_test
    
    import (
    	"context"
    	"fmt"
    	"io"
    	"log"
    	"net/http"
    	"os"
    	"os/signal"
    )
    
    func ExampleHijacker() {
    	http.HandleFunc("/hijack", func(w http.ResponseWriter, r *http.Request) {
    		hj, ok := w.(http.Hijacker)
    		if !ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 19 16:12:45 UTC 2021
    - 5.4K bytes
    - Viewed (0)
  9. src/go/doc/example_test.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 doc_test
    
    import (
    	"bytes"
    	"fmt"
    	"go/ast"
    	"go/doc"
    	"go/format"
    	"go/parser"
    	"go/token"
    	"internal/diff"
    	"internal/txtar"
    	"path/filepath"
    	"reflect"
    	"strings"
    	"testing"
    )
    
    func TestExamples(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 10 16:17:51 UTC 2022
    - 9.6K bytes
    - Viewed (0)
  10. src/net/url/example_test.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 url_test
    
    import (
    	"encoding/json"
    	"fmt"
    	"log"
    	"net/url"
    	"strings"
    )
    
    func ExamplePathEscape() {
    	path := url.PathEscape("my/cool+blog&about,stuff")
    	fmt.Println(path)
    
    	// Output:
    	// my%2Fcool+blog&about%2Cstuff
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 7.2K bytes
    - Viewed (0)
Back to top