You are here |
dirkriehle.com | ||
| | | |
avelino.run
|
|
| | | | A linguagem Go é um projeto open source para tornar os programadores mais produtivos. Go foi desenvolvido para utilização maxima do CPU, tornando um processo simples para criar aplicação Multithreaded, o processo de utilização de maquinas na rede para processar determinado programa também é bem simples, assim tornando um software mais flexível e modular. Vamos montar um servidor HTTP em Go. package main import ( "http"; "io"; "fmt"; ) func HelloServer(c *http.Conn, req *http.Request) { io.WriteString(c, "hello, world!\n"); } func main() { fmt.Printf("http://localhost:8080/hello\n"); http.Handle("/hello", http.HandlerFunc(HelloServer)); err := http.ListenAndServe(":8080", nil); if err != nil { panic("ListenAndServe: ", err.String()) } } O HelloServer() é o que vai fazer a parte de renderização, o man() ele sobre o servidor HTTP na porta 8080, e caso o usuário tente processar um URL que não esteja no fmt ele vai cair no err onde vai processar o erro e apresentar o panic. Simples assim já temos um servidor HTTP. | |
| | | |
progcity.maynoothuniversity.ie
|
|
| | | | A new paper by Rob Kitchin titled 'Conceptualising smart cities' has been published in Urban Research and Practice. It consider how best to define smart cities and asks whether it is time to decentre and move beyond smart urbanism. Kitchin, R. (2022) Conceptualising smart cities. Urban Research and Practice 15(1): 155-159. doi: 10.1080/17535069.2022.2031143 | |
| | | |
opentrain.theyear199x.org
|
|
| | | | I don't know how it started, but we're celebrating #WOLOLODAY on twitter in Brazil. wololo 1. A word uttered by the priest units from the original Age of Empires game, usually when atte... | |
| | | |
csharp.christiannagel.com
|
|
| | The HttpClient class can be easily used in a way how it's not meant to be. While this class is disposable, using it with the using statement is often not the best choice. Disposing the HttpClient, the underlying socket is not immediately released. The HttpClient class is designed to be reused for multiple requests. Having... |