Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 68 for Clip (0.06 sec)

  1. src/image/jpeg/writer.go

    	if b.Dx() >= 1<<16 || b.Dy() >= 1<<16 {
    		return errors.New("jpeg: image is too large to encode")
    	}
    	var e encoder
    	if ww, ok := w.(writer); ok {
    		e.w = ww
    	} else {
    		e.w = bufio.NewWriter(w)
    	}
    	// Clip quality to [1, 100].
    	quality := DefaultQuality
    	if o != nil {
    		quality = o.Quality
    		if quality < 1 {
    			quality = 1
    		} else if quality > 100 {
    			quality = 100
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 17.1K bytes
    - Viewed (0)
  2. src/log/slog/handler_test.go

    			wantJSON: `{"time":"2000-01-02T03:04:05Z","level":"INFO","msg":"message","a":"one","b":2}`,
    		},
    		{
    			name:     "empty key",
    			attrs:    append(slices.Clip(attrs), Any("", "v")),
    			wantText: `time=2000-01-02T03:04:05.000Z level=INFO msg=message a=one b=2 ""=v`,
    			wantJSON: `{"time":"2000-01-02T03:04:05Z","level":"INFO","msg":"message","a":"one","b":2,"":"v"}`,
    		},
    		{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 02 13:57:53 UTC 2023
    - 19.6K bytes
    - Viewed (0)
  3. src/image/jpeg/scan.go

    		case 3:
    			dst, stride = d.blackPix[8*(by*d.blackStride+bx):], d.blackStride
    		default:
    			return UnsupportedError("too many components")
    		}
    	}
    	// Level shift by +128, clip to [0, 255], and write to dst.
    	for y := 0; y < 8; y++ {
    		y8 := y * 8
    		yStride := y * stride
    		for x := 0; x < 8; x++ {
    			c := b[y8+x]
    			if c < -128 {
    				c = 0
    			} else if c > 127 {
    				c = 255
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 25 00:46:29 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  4. src/cmd/internal/moddeps/moddeps_test.go

    }
    
    // run runs the command and requires that it succeeds.
    func (r runner) run(t *testing.T, args ...string) {
    	t.Helper()
    	cmd := testenv.Command(t, args[0], args[1:]...)
    	cmd.Dir = r.Dir
    	cmd.Env = slices.Clip(r.Env)
    	if r.Dir != "" {
    		cmd.Env = append(cmd.Env, "PWD="+r.Dir)
    	}
    	out, err := cmd.CombinedOutput()
    	if err != nil {
    		t.Logf("> %s\n", strings.Join(args, " "))
    		t.Fatalf("command failed: %s\n%s", err, out)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 22:16:54 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  5. src/log/slog/logger_test.go

    	return &c2
    }
    
    func (c *captureHandler) WithGroup(name string) Handler {
    	c.mu.Lock()
    	defer c.mu.Unlock()
    	var c2 captureHandler
    	c2.r = c.r
    	c2.attrs = c.attrs
    	c2.groups = append(slices.Clip(c.groups), name)
    	return &c2
    }
    
    func (c *captureHandler) clear() {
    	c.mu.Lock()
    	defer c.mu.Unlock()
    	c.ctx = nil
    	c.r = Record{}
    }
    
    type discardHandler struct {
    	disabled bool
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 10 21:25:30 UTC 2023
    - 19.5K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/writebarrier.go

    				// writes to pointer-containing types will do this.
    				if d := off % ptrSize; d != 0 {
    					off -= d
    					size += d
    				}
    				if d := size % ptrSize; d != 0 {
    					size += ptrSize - d
    				}
    				// Clip to the 64 words that we track.
    				min := off
    				max := off + size
    				if min < 0 {
    					min = 0
    				}
    				if max > 64*ptrSize {
    					max = 64 * ptrSize
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:09:14 UTC 2023
    - 23.5K bytes
    - Viewed (0)
  7. api/go1.21.txt

    pkg slices, func BinarySearchFunc[$0 interface{ ~[]$1 }, $1 interface{}, $2 interface{}]($0, $2, func($1, $2) int) (int, bool) #60091
    pkg slices, func Clip[$0 interface{ ~[]$1 }, $1 interface{}]($0) $0 #57433
    pkg slices, func Clone[$0 interface{ ~[]$1 }, $1 interface{}]($0) $0 #57433
    pkg slices, func Compact[$0 interface{ ~[]$1 }, $1 comparable]($0) $0 #57433
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 07 09:39:17 UTC 2023
    - 25.6K bytes
    - Viewed (0)
  8. platforms/documentation/docs/src/docs/css/base.css

        font-family: "Ubuntu Mono", courier, monospace;
        text-shadow: none;
    }
    
    .signature .literal {
        color: #04598D;
        padding-left: 0.1em;
    }
    
    .sr-only {
        border: 0;
        clip: rect(0, 0, 0, 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }
    
    /*
     * Code highlighting
     */
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat May 25 05:15:02 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  9. src/cmd/go/internal/modload/query.go

    	if len(mainModuleMatches) > 0 && len(results) == 0 && modOnly == nil && errors.Is(err, fs.ErrNotExist) {
    		return nil, nil, &QueryMatchesMainModulesError{
    			Pattern: pattern,
    			Query:   query,
    		}
    	}
    	return slices.Clip(results), modOnly, err
    }
    
    // modulePrefixesExcludingTarget returns all prefixes of path that may plausibly
    // exist as a module, excluding targetPrefix but otherwise including path
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 11 22:29:11 UTC 2023
    - 44.7K bytes
    - Viewed (0)
  10. src/path/filepath/path_test.go

    		var extra []string
    		for _, path := range absTests {
    			if strings.Contains(path, "$") {
    				continue
    			}
    			path = vol + path
    			extra = append(extra, path)
    		}
    		tests = append(slices.Clip(tests), extra...)
    	}
    
    	err = os.Chdir(absTestDirs[0])
    	if err != nil {
    		t.Fatal("chdir failed: ", err)
    	}
    
    	for _, path := range tests {
    		path = strings.ReplaceAll(path, "$", root)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 22 16:38:19 UTC 2024
    - 47.1K bytes
    - Viewed (0)
Back to top