Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 5,679 for switch (0.55 sec)

  1. association.go

    			return association.Error
    		}
    
    		// set old associations's foreign key to null
    		switch rel.Type {
    		case schema.BelongsTo:
    			if len(values) == 0 {
    				updateMap := map[string]interface{}{}
    				switch reflectValue.Kind() {
    				case reflect.Slice, reflect.Array:
    					for i := 0; i < reflectValue.Len(); i++ {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu May 04 11:30:45 GMT 2023
    - 21.2K bytes
    - Viewed (0)
  2. internal/logger/target/testlogger/testlogger.go

    	tb := t.current.Load()
    	var logf func(format string, args ...any)
    	if tb != nil {
    		tbb := *tb
    		tbb.Helper()
    		switch t.action.Load() {
    		case errorMessage:
    			logf = tbb.Errorf
    		case fatalMessage:
    			logf = tbb.Fatalf
    		default:
    			logf = tbb.Logf
    		}
    	} else {
    		switch t.action.Load() {
    		case errorMessage:
    			logf = func(format string, args ...any) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 4K bytes
    - Viewed (0)
  3. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSet.java

      @JsMethod(name = "of")
      static <E> ImmutableSet<E> jsOf(E... elements) {
        return copyOf(elements);
      }
    
      @JsMethod
      public static <E> ImmutableSet<E> copyOf(E[] elements) {
        checkNotNull(elements);
        switch (elements.length) {
          case 0:
            return of();
          case 1:
            return of(elements[0]);
          default:
            return create(elements);
        }
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 23 18:43:40 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  4. src/cmd/cgo/gcc.go

    		} else {
    			n.Type = conv.Type(types[i], pos)
    			switch n.Kind {
    			case "iconst":
    				if i < len(ints) {
    					if _, ok := types[i].(*dwarf.UintType); ok {
    						n.Const = fmt.Sprintf("%#x", uint64(ints[i]))
    					} else {
    						n.Const = fmt.Sprintf("%#x", ints[i])
    					}
    				}
    			case "fconst":
    				if i >= len(floats) {
    					break
    				}
    				switch base(types[i]).(type) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
  5. internal/s3select/sql/stringfuncs.go

    	for i, r := range pattern {
    		if i > 0 && prev == escape {
    			switch r {
    			case percent, escape, underscore:
    				s = append(s, r)
    				prev = r
    				if r == escape {
    					prev = runeZero
    				}
    			default:
    				return false, errMalformedEscapeSequence
    			}
    			continue
    		}
    
    		prev = r
    
    		var ok bool
    		switch r {
    		case percent:
    			if len(s) == 0 {
    				hasLeadingPercent = true
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 4.2K bytes
    - Viewed (0)
  6. internal/hash/checksum.go

    	// ChecksumSHA256 indicates a SHA256 checksum.
    	ChecksumSHA256
    	// ChecksumSHA1 indicates a SHA-1 checksum.
    	ChecksumSHA1
    	// ChecksumCRC32 indicates a CRC32 checksum with IEEE table.
    	ChecksumCRC32
    	// ChecksumCRC32C indicates a CRC32 checksum with Castagnoli table.
    	ChecksumCRC32C
    	// ChecksumInvalid indicates an invalid checksum.
    	ChecksumInvalid
    	// ChecksumMultipart indicates the checksum is from a multipart upload.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  7. tests/scanner_valuer_test.go

    	if len(data) > 0 && data[0] == 'x' {
    		// needed to test failures
    		return nil, errors.New("Should not start with 'x'")
    	}
    
    	// prepend asterisks
    	return append([]byte("***"), data...), nil
    }
    
    type Num int64
    
    func (i *Num) Scan(src interface{}) error {
    	switch s := src.(type) {
    	case []byte:
    		n, _ := strconv.Atoi(string(s))
    		*i = Num(n)
    	case int64:
    		*i = Num(s)
    	default:
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Jun 07 07:02:07 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  8. .github/bot_config.yml

             * It has an added advantage since you can you easily switch to different hardware accelerators (cpu, gpu, tpu) as per the task.
             * All you need is a good internet connection and you are all set.
    Others
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Oct 17 11:48:07 GMT 2023
    - 4K bytes
    - Viewed (0)
  9. cmd/last-minute_gen.go

    	if err != nil {
    		err = msgp.WrapError(err)
    		return
    	}
    	for zb0001 > 0 {
    		zb0001--
    		field, err = dc.ReadMapKeyPtr()
    		if err != nil {
    			err = msgp.WrapError(err)
    			return
    		}
    		switch msgp.UnsafeString(field) {
    		case "Total":
    			z.Total, err = dc.ReadInt64()
    			if err != nil {
    				err = msgp.WrapError(err, "Total")
    				return
    			}
    		case "Size":
    			z.Size, err = dc.ReadInt64()
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jul 05 21:45:49 GMT 2022
    - 17.2K bytes
    - Viewed (0)
  10. cni/pkg/nodeagent/netns_linux.go

    		defer func() {
    			err := threadNS.Set() // switch back
    			if err == nil {
    				// Unlock the current thread only when we successfully switched back
    				// to the original namespace; otherwise leave the thread locked which
    				// will force the runtime to scrap the current thread, that is maybe
    				// not as optimal but at least always safe to do.
    				runtime.UnlockOSThread()
    			}
    		}()
    
    		return toRun()
    	}
    
    	var wg sync.WaitGroup
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed Jan 31 10:05:36 GMT 2024
    - 2.7K bytes
    - Viewed (0)
Back to top