//line hello.qtpl:14
193050
func (h *Hello) WriteBody(qq422016 qtio422016.Writer) {
	
	qw422016 := qt422016.AcquireWriter(qq422016)
	
	h.StreamBody(qw422016)
	
	qt422016.ReleaseWriter(qw422016)


}
299505
func greetings(p *profile.Profile, ui plugin.UI) {
	numLabelUnits := identifyNumLabelUnits(p, ui)
	ropt, err := reportOptions(p, numLabelUnits, pprofVariables)
	if err == nil {
		rpt := report.New(p, ropt)
		ui.Print(strings.Join(report.ProfileLabels(rpt), "\n"))
		if rpt.Total() == 0 && len(p.SampleType) > 1 {
			ui.Print(`No samples were found with the default sample value type.`)
			ui.Print(`Try "sample_index" command to analyze different sample values.`, "\n")
		}
	}
	ui.Print(`Entering interactive mode (type "help" for commands, "o" for options)`)
}
70003
func (p *HelloWorld) Init() error {
	p.Log.Debug("Loading config..")
	// Load config file.
	cfg := defaultConfig()
	found, err := p.Cfg.LoadValue(cfg)
	if err != nil {
		return err
	} else if !found {
		p.Log.Warnf("config not found")
	}

	p.Log.Info(cfg.Greeting)
	return nil
}
1343068
func (l *channelLink) forwardBatch(packets ...*htlcPacket) {
	// Don't forward packets for which we already have a response in our
	// mailbox. This could happen if a packet fails and is buffered in the
	// mailbox, and the incoming link flaps.
	var filteredPkts = make([]*htlcPacket, 0, len(packets))
	for _, pkt := range packets {
		if l.mailBox.HasPacket(pkt.inKey()) {
			continue
		}

		filteredPkts = append(filteredPkts, pkt)
	}

	errChan := l.cfg.ForwardPackets(l.quit, filteredPkts...)
	go l.handleBatchFwdErrs(errChan)
}
978088
func main() {
	// Imports the hello component declared above in order to make it loadable
	// in a page or usable in other components.
	//
	// Imported component can be used as URL or html tags by referencing them by
	// their lowercased names.
	// E.g:
	//  Hello   => hello
	//  foo.Bar => foo.bar
	app.Import(&Hello{})

	// Defines the component to load when an URL without path is loaded.
	app.DefaultPath = "/hello"

	// Runs the app in the browser.
	if err := app.Run(); err != nil {
		log.Print(err)
	}
}
565928
func Welcome(w http.ResponseWriter, r *http.Request) {
	if r.URL.Path != "/" {
		http.Error(w, "Invalid API endpoint", 404)
		return
	}
	w.Write([]byte("Welcome to tiedot"))
}
107227
func httpParseHeaderLine(line []byte) (k, v []byte, ok bool) {
	colon := bytes.IndexByte(line, ':')
	if colon == -1 {
		return
	}

	k = btrim(line[:colon])
	// TODO(gobwas): maybe use just lower here?
	canonicalizeHeaderKey(k)

	v = btrim(line[colon+1:])

	return k, v, true
}
968553
func (c *RedisClient) Hello() (HelloResponse, error) {

	vals, err := redis.Values(c.conn.Do("HELLO"))
	ret := HelloResponse{}
	if err != nil {
		return ret, err
	}

	if len(vals) < 3 {
		return ret, fmt.Errorf("disque: invalid HELLO response: %v", vals)
	}

	versionId := vals[0].(int64)
	if versionId != HelloVersionId {
		return ret, fmt.Errorf("disque: unsupported HELLo version: %d, expected %d", versionId, HelloVersionId)
	}

	ret.NodeId = string(vals[1].([]byte))
	ret.Nodes = make(nodeList, 0, len(vals)-2)
	for _, v := range vals {

		if arr, ok := v.([]interface{}); ok {
			if len(arr) != 4 {
				log.Println("Invalid HELLO entry: %v", arr)
				continue
			}

			prio, err := strconv.ParseInt(string(arr[3].([]byte)), 10, 32)
			if err != nil {
				log.Println("Invalid priority: %v", arr[3])
				continue
			}

			addr := ""
			host := string(arr[1].([]byte))

			//in a single node, it doesn't know its IP, we just take it from the client itself
			if host == "" {
				addr = c.node.Addr
			} else {
				addr = fmt.Sprintf("%s:%s", host, string(arr[2].([]byte)))
			}

			add, err := net.ResolveTCPAddr("tcp", addr)
			if err != nil {
				log.Printf("Invalid address given: %s", addr)
				continue
			}
			node := Node{
				Id:       string(arr[0].([]byte)),
				Addr:     add.String(),
				Priority: int(prio),
			}

			ret.Nodes = append(ret.Nodes, node)
		}

	}

	return ret, nil
}
619024
func HelloWorld(nextSlide func()) (title string, content tview.Primitive) {
	// We use a text view because we want to capture keyboard input.
	textView := tview.NewTextView().SetDoneFunc(func(key tcell.Key) {
		nextSlide()
	})
	textView.SetBorder(true).SetTitle("Hello, world!")
	return "Hello, world", Code(textView, 30, 10, helloWorld)
}
1139688
func main() {
	restful.Add(newUserService())
	log.Print("start listening on localhost:8080")
	log.Fatal(http.ListenAndServe(":8080", nil))
}
1154873
func helloWorld(t translator.Translator) {
	languages, err := t.Languages()
	if err != nil {
		fmt.Printf("Error retrieving languages: %s\n", err.Error())
		return
	}

	fmt.Printf("%d Supported Languages:\n", len(languages))
	fmt.Println("-----------------------")

	translations := make([]<-chan string, len(languages))
	for i, language := range languages {
		translations[i] = translate(t, "Hello World!", "en", language)
	}

	for n := range mergeChannels(translations) {
		fmt.Println(n)
	}
}
169993
func (p *provisionee) Hello(ctx context.Context, arg keybase1.HelloArg) (res keybase1.HelloRes, err error) {
	close(p.start)
	res, err = p.arg.Provisionee.HandleHello(ctx, arg)
	if err != nil {
		p.done <- err
	}
	return res, err
}
361996
func ParseRequestLine(line []byte) (r RequestLine, ok bool) {
	var i int
	for i = 0; i < len(line); i++ {
		c := line[i]
		if !OctetTypes[c].IsToken() {
			if i > 0 && c == ' ' {
				break
			}
			return
		}
	}
	if i == len(line) {
		return
	}

	var proto []byte
	r.Method = line[:i]
	r.URI, proto = split2(line[i+1:], ' ')
	if len(r.URI) == 0 {
		return
	}
	if major, minor, ok := ParseVersion(proto); ok {
		r.Version.Major = major
		r.Version.Minor = minor
		return r, true
	}

	return r, false
}
840031
func greet(c cli.Command) {
	greeting := c.Param("greeting")
	str := fmt.Sprintf("%s", greeting)
	str = styleByFlags(str, c)
	c.Println(str)
}
488311
func main() {

	swaggerSpec, err := loads.Embedded(restapi.SwaggerJSON, restapi.FlatSwaggerJSON)
	if err != nil {
		log.Fatalln(err)
	}

	var server *restapi.Server // make sure init is called

	flag.Usage = func() {
		fmt.Fprint(os.Stderr, "Usage:\n")
		fmt.Fprint(os.Stderr, "  todo-list-server [OPTIONS]\n\n")

		title := "Simple To Do List API"
		fmt.Fprint(os.Stderr, title+"\n\n")
		desc := swaggerSpec.Spec().Info.Description
		if desc != "" {
			fmt.Fprintf(os.Stderr, desc+"\n\n")
		}
		fmt.Fprintln(os.Stderr, flag.CommandLine.FlagUsages())
	}
	// parse the CLI flags
	flag.Parse()

	api := operations.NewTodoListAPI(swaggerSpec)
	// get server with flag values filled out
	server = restapi.NewServer(api)

	defer server.Shutdown()

	server.ConfigureAPI()
	if err := server.Serve(); err != nil {
		log.Fatalln(err)
	}

}
552437
func (s *server) SayHello(ctx context.Context, in *pb.HelloRequest) (*pb.HelloReply, error) {
	return &pb.HelloReply{Message: "Hello " + in.Name}, nil
	// return nil, errors.New("some error")
}
491491
func (s *hwServer) SayHello(ctx context.Context, in *hwpb.HelloRequest) (*hwpb.HelloReply, error) {
	return &hwpb.HelloReply{Message: "Hello " + in.Name}, nil
}