Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 133 for slice (0.15 sec)

  1. src/cmd/asm/internal/lex/slice.go

    	"cmd/internal/src"
    )
    
    // A Slice reads from a slice of Tokens.
    type Slice struct {
    	tokens []Token
    	base   *src.PosBase
    	line   int
    	pos    int
    }
    
    func NewSlice(base *src.PosBase, line int, tokens []Token) *Slice {
    	return &Slice{
    		tokens: tokens,
    		base:   base,
    		line:   line,
    		pos:    -1, // Next will advance to zero.
    	}
    }
    
    func (s *Slice) Next() ScanToken {
    	s.pos++
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jun 29 22:49:50 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/io/ByteSourceTester.java

      public void testSlice_constrainedRange() throws IOException {
        long size = source.read().length;
        if (size >= 2) {
          ByteSource sliced = source.slice(1, size - 2);
          assertEquals(size - 2, sliced.read().length);
          ByteSource resliced = sliced.slice(0, size - 1);
          assertTrue(sliced.contentEquals(resliced));
        }
      }
    
      private void assertExpectedBytes(byte[] readBytes) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.6K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/io/ByteSourceTester.java

      public void testSlice_constrainedRange() throws IOException {
        long size = source.read().length;
        if (size >= 2) {
          ByteSource sliced = source.slice(1, size - 2);
          assertEquals(size - 2, sliced.read().length);
          ByteSource resliced = sliced.slice(0, size - 1);
          assertTrue(sliced.contentEquals(resliced));
        }
      }
    
      private void assertExpectedBytes(byte[] readBytes) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.6K bytes
    - Viewed (0)
  4. src/bytes/reader.go

    // a byte slice.
    // Unlike a [Buffer], a Reader is read-only and supports seeking.
    // The zero value for Reader operates like a Reader of an empty slice.
    type Reader struct {
    	s        []byte
    	i        int64 // current reading index
    	prevRune int   // index of previous rune; or < 0
    }
    
    // Len returns the number of bytes of the unread portion of the
    // slice.
    func (r *Reader) Len() int {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  5. tests/helper_test.go

    		if len(user.Pets) != len(expect.Pets) {
    			t.Fatalf("pets should equal, expect: %v, got %v", len(expect.Pets), len(user.Pets))
    		}
    
    		sort.Slice(user.Pets, func(i, j int) bool {
    			return user.Pets[i].ID > user.Pets[j].ID
    		})
    
    		sort.Slice(expect.Pets, func(i, j int) bool {
    			return expect.Pets[i].ID > expect.Pets[j].ID
    		})
    
    		for idx, pet := range user.Pets {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 8K bytes
    - Viewed (0)
  6. common-protos/k8s.io/api/discovery/v1beta1/generated.proto

      optional string addressType = 4;
    
      // endpoints is a list of unique endpoints in this slice. Each slice may
      // include a maximum of 1000 endpoints.
      // +listType=atomic
      repeated Endpoint endpoints = 2;
    
      // ports specifies the list of network ports exposed by each endpoint in
      // this slice. Each port must have a unique name. When ports is empty, it
    Plain Text
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Mon Mar 11 18:43:24 GMT 2024
    - 8K bytes
    - Viewed (0)
  7. tests/associations_has_one_test.go

    		t.Errorf("account's number should not be saved")
    	}
    }
    
    func TestHasOneAssociationForSlice(t *testing.T) {
    	users := []User{
    		*GetUser("slice-hasone-1", Config{Account: true}),
    		*GetUser("slice-hasone-2", Config{Account: false}),
    		*GetUser("slice-hasone-3", Config{Account: true}),
    	}
    
    	DB.Create(&users)
    
    	// Count
    	AssertAssociationCount(t, users, "Account", 2, "")
    
    	// Find
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 6.8K bytes
    - Viewed (0)
  8. common-protos/k8s.io/api/discovery/v1/generated.proto

      optional string addressType = 4;
    
      // endpoints is a list of unique endpoints in this slice. Each slice may
      // include a maximum of 1000 endpoints.
      // +listType=atomic
      repeated Endpoint endpoints = 2;
    
      // ports specifies the list of network ports exposed by each endpoint in
      // this slice. Each port must have a unique name. When ports is empty, it
    Plain Text
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Mon Mar 11 18:43:24 GMT 2024
    - 8K bytes
    - Viewed (0)
  9. callbacks/helper_test.go

    		expect clause.Values
    	}{
    		{
    			name: "Test convert slice of string value",
    			input: []map[string]interface{}{
    				{"name": "my name"},
    			},
    			expect: clause.Values{
    				Columns: []clause.Column{{Name: "name"}},
    				Values:  [][]interface{}{{"my name"}},
    			},
    		},
    		{
    			name: "Test convert slice of int value",
    			input: []map[string]interface{}{
    				{"age": 18},
    			},
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 05 02:22:57 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  10. src/main/webapp/js/admin/plugins/form-validator/sepa.js

    ="Z".charCodeAt(0)?b-"A".charCodeAt(0)+10:a}).join("");for(var b,c=a;c.length>2;)b=c.slice(0,9),c=(parseInt(b,10)%97).toString()+c.slice(b.length);return parseInt(c,10)%97===1},d=function(a){a=a.toUpperCase(),a=a.replace(/\s+/g,"");var c=a.slice(0,2),d=0,e="";for(d=0;d<b.length;++d)if(b[d][0]===c){e=b[d][2];break}if(""===e)return!1;var f=e.match(/(.{3})/g).map(function(a){var b,c=a.slice(0,1),d=parseInt(a.slice(1),10);switch(c){case"A":b="0-9A-Za-z";break;case"B":b="0-9A-Z";break;case"C":b="A-Za...
    JavaScript
    - Registered: Mon Apr 29 08:04:11 GMT 2024
    - Last Modified: Mon Jan 01 05:12:47 GMT 2018
    - 3.4K bytes
    - Viewed (0)
Back to top