88 Matching Annotations
  1. Jun 2021
    1. I've seen (and fixed) Ruby code that needed to be refactored for the client objects to use the accessor rather than the underlying mechanism, even though instance variables aren't directly visible. The underlying mechanism isn't always an instance variable - it can be delegations to or manipulations of a class you're hiding behind a facade, or a session store with a particular format, or all kinds. And it can change. 'Self-encapsulation' can help if you need to swap a technology, a library, an object specification, etc.
    2. a principle I use is: If you have an accessor, use the accessor rather than the raw variable or mechanism it's hiding. The raw variable is the implementation, the accessor is the interface. Should I ignore the interface because I'm internal to the instance? I wouldn't if it was an attr_accessor.
    3. I have been wrapping instance variables in accessor methods whenever I can though.
    4. Also, Sandi Metz mentions this in POODR. As I recall, she also advocates wrapping bare instance variables in methods, even when they're only used internally. It helps avoid mad refactoring later.
  2. Apr 2021
  3. Mar 2021
    1. Beykat yi duñu dem tool altine.

      Les cultivateurs ne vont pas au champ le lundi.

      beykat bi -- farmer 👩🏾‍🌾 (from bey -- to farm/cultivate).

      yi -- the (indicates plurality).

      duñu -- do not/no one (?).

      dem v. -- to go, leave, etc.

      tool bi -- field, orchard.

      altine ji -- (Arabic) Monday.

  4. Feb 2021
    1. Things could go wrong in two places here. First, the validation could fail if Github sends us data we don’t understand. Second, we might not know the user signing in, meaning the “find user” logic has to error-out
    1. In the classroom, I delegate responsibilities to my students at a rate that astounds people. There is almost nothing that I will not allow my students to do, including teaching my lessons whenever possible. My students take full and complete ownership of the classroom, whether they like it or not, and as a result, they possess great ownership of their learning.
    2. They fail to understand the importance of autonomy when delegating responsibilities.
    3. They lack faith in the capacity of others.
  5. Jan 2021
    1. We recommend the Alpine image as it is tightly controlled and small in size (currently under 5 MB), while still being a full Linux distribution. This is fine advice for Go, but bad advice for Python, leading to slower builds, larger images, and obscure bugs.

      Alipne Linux isn't the most convenient OS for Python, but fine for Go

  6. Dec 2020
    1. Go is introducing publicly-visible API changes related to these issues in an upcoming major release, which risks making the vulnerabilities public without explicit public disclosure. 

      Whaaat ?!

  7. Nov 2020
    1. But what if you want a runtime with some features? what if you want, say, a runtime with very powerful coroutine support? The answer is: you write Go.
    1. In the past, I tried to create some proof of concepts with svelte, but I usually ended up missing some of the features that RxJS provides. Now that I know that they complement each other well, I will grab this combination more often
  8. Oct 2020
    1. Then at some moment I just stumbled upon limitations and inexpressiveness of templates and started to use JSX everywhere — and because JSX was not a typical thing for Vue I switched to React over time. I don’t want to make a step back.
  9. Sep 2020
    1. But if you’ve spent time building front ends with components, it’s hard to go back. Svelte lets us do that with a minimum of fuss or code bloat.
    1. El matrimonio igualitario Argentina, Uruguay, México, Brasil y Colombia son los únicos países de América Latina que han legalizado el matrimonio de parejas homosexuales, con todas las condiciones legales que tienen los matrimonios convencionales. De igual manera, Holanda, Bélgica, Suecia, Alemania, Sudáfrica, España, Inglaterra, Portugal y otras 12 naciones más han hecho lo propio.   Entretanto, sólo 11 países permiten la unión civil entre parejas del mismo sexo (no incluye todos los derechos legítimos maritales) entre estos Ecuador, Chile, Austria, Italia y Grecia. Cambio de identidad El proceso de cambio de género o sexo es un proceso quirúrgico y psicológico que contempla el cambio físico. En la actualidad, naciones como Venezuela, Colombia, Uruguay, Bolivia y Perú permiten que la transformación también sea legal, con el cambio del nombre y género en los documentos de identidad de las personas LGBTI. Sin embargo, en Brasil y Argentina, este tipo de decretos han sido desaprobados o son procesos difíciles por lo riguroso de los exámenes y requisitos que truncan el derecho al trámite. Igualdad en derechos patrimoniales Las garantías, protecciones legales en los matrimonios tras el fallecimiento y divorcio también son logros alcanzados en menos de 20 años por la comunidad LGBTI. Pero estos aún están condicionados dependiendo del país, por la diferencia entre permitir la unión civil (algunos derechos de cónyuges) o el matrimonio igualitario (derechos legítimos).   Adopción homoparental Uruguay, México, Canadá (el primer país en permitirlo en 1999) y algunos estados de EE.UU. han legalizado la adopción para personas unidas del mismo sexo. Asimismo, España, Holanda, Francia y otros permiten que las parejas no heterosexuales puedan tener hijos por medio de la adopción legal. Protección a víctimas de discriminación Hasta 1948 la homosexualidad era considerada una enfermedad mental, pero esto cambió lo que permitió la apertura de sistemas de protección a víctimas de discriminación y agresión. En la actualidad, existen programas de atención social y judicial para el seguimiento de los casos de hostigamiento y asesinatos contra los homosexuales. Además hay coberturas de salud gratuitas para tratar enfermedades como el sida y la programas de integración laboral en distintas áreas. Tags Día contra la Homofobia LGBTI Derechos Discriminación BBC - La Vanguardia - El Excelsior - La Semana Por: teleSUR- db - SB - JCM Noticias Relacionadas OLP exhorta a Oriente Medio a tomar medidas contra Guatemala Bolivia afirma que Venezuela frena dominación de EE.UU. Chavismo toma Caracas en cierre de campaña de Nicolás Maduro Rodríguez: Comicios en Venezuela definen futuro de América Lati googletag.cmd.push(function() { googletag.display('div-gpt-ad-1493942656293-0'); });//]]>--> por Taboolapor TaboolaEnlaces PatrocinadosEnlaces PatrocinadosEnlaces PromovidosEnlaces PromovidosTe RecomendamosHepatitis C | Search AdsSigns of Hepatitis C (Some May Surprise)Hepatitis C | Search AdsPeoplewhizOne Thing All Cheaters Have In Common, Brace YourselfPeoplewhizDID U KNOW ReviewsUnsold 2019 SUVs Going for Pennies on the Dollar: Great For SeniorsDID U KNOW ReviewsDownload Now on Google Play | Neverland CasinoSan Jose Woman Was Playing on This Free Slot Machine App, When All Of A Sudden She Won BigDownload Now on Google Play | Neverland CasinoGet it on Google Play | House Of FunCasinos Will Hate You For Doing This but They Can’t Stop YouGet it on Google Play | House Of FunFungus Clear SupplementsSurgeon: Nail Fungus? Do This Immediately (Watch)Fungus Clear SupplementsCCPA Notice window._taboola = window._taboola || []; _taboola.push({ mode: 'thumbnails-a', container: 'taboola-below-article-thumbnails', placement: 'Below Article Thumbnails', target_type: 'mix' }); window.fbAsyncInit = function() { FB.init({ appId : '1009084795820552', xfbml : true, version : 'v2.5' }); }; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/es_LA/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/es_LA/sdk.js#xfbml=1&version=v2.5&appId=1009084795820552"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); $(document).ready(function () { $("#comentNativos").addClass("coment"); $("#btn-face").addClass("activeComent"); $("#btn-cf").click(function () { // alert("btn-facebook"); $("#comentNativos").addClass("coment"); $("#btn-face").addClass("activeComent"); $(".fb_ltr").css({width: "940px"}); $("#comentFace").removeClass("coment"); $("#btn-nativo").removeClass("activeComent"); }); $("#btn-cn").click(function () { // alert("btn-nativo"); $("#comentFace").addClass("coment"); $("#comentNativos").removeClass("coment"); $("#btn-nativo").addClass("activeComent"); $("#btn-face").removeClass("activeComent"); }); }); Comentarios con facebook () Comentarios con teleSUR (0) Comentarios 0 Ingresa o Regístrate para poder comentar, usar el foro y más Ingresar Regístrate Nota sin comentarios. //]]>--> footer .legal{ font-size:15px; background:var(--bg-footer-legal,#1c2036); border-bottom: 2px solid #fff; opacity:.5; float:left; } footer .colFootRedes .wpFootSuscrip input[type="text"]:focus{ border: 2px solid #555; border-radius:5px; width:320px; height:46px; } footer .colFootRedes .wpFootSuscrip input[type="text"]{ border: 2px solid #555; border-radius:5px; width:320px; height:46px; } footer .colFooti h4{ color:transparent; cursor:context-menu; } .vivoFooter{ position:relative; } .vivoFooter h4{ position:absolute; margin-top: 6%; margin-left:8em; } footer .wpRedesFoot{ top:135px; border:none; } footer .wpRedesFoot a{ margin-top:-20px; } footer .wpRedesFoot a:hover{ opacity:0.5; } .vivoFooterBoton{ Width:25em; height:3.5em; border-radius:5px; border: none; color:#fff; margin-top:5px; background:#9a1212; transition:1s; font-weight:bolder; } .vivoFooterBoton:hover{ opacity:0.8; transition:1s; } .vivoFooterBoton a{ font-size:16px; } .colFoot img{ margin-left:3px; margin-bottom:-5%; } footer .colFoot{ font-size:12px; line-height:15px; } .colFooti a{ font-size:14px; line-height:15px; } footer .colFootRedes .wpFootSuscrip input[type="submit"]{ background:url("/https://www.telesurtv.net/arte/subNew.png"); background-repeat: no-repeat; width:9%; line-height:32px; margin-left:0px; color:transparent; } footer .colFooti{ color:transparent; font-size:0px; cursor:context-menu; } @media only screen and (max-width: 600px) { footer .wpRedesFoot a{ margin-right:-5px; } footer .colFootRedes .wpFootSuscrip input[type="text"]{ width:210px; } footer .colFootRedes .wpFootSuscrip input[type="text"]:focus{ width:210px; } footer .colFootRedes .wpFootSuscrip input[type="submit"]{ width:12%; color:transparent; } .vivoFooterBoton{ width:20em; margin-top:8px; margin-bottom:5px; } footer .colFooti{ margin-left:28%; margin-bottom:5%; } } Términos de uso Sobre teleSUR Acerca teleSUR Contactos Equipo Empleos Terminos de uso Cobertura satelital Canales Latinoamérica y el Caribe Mundo Deportes Cultura Opinión Programación Servicios Catálogo Multimedia Blog Videos teleSUR Inglés teleSUR Inglés
  10. Aug 2020
    1. Course as community onboarding

      I like this idea - as when joining a community figuring out the 'rules of engagement' can be hard, and also

      • who to go for what
      • what do I need to know to start
      • how does this community work

      For team on-boarding, project on-boarding, etc - it can also guide people towards other courses / resources that may be more ongoing or of other types

  11. Jul 2020
    1. Go cheatsheet

      Super useful cheatsheet for the Go programming language.

  12. Jun 2020
  13. May 2020
    1. Programming languages These will probably expose my ignorance pretty nicely.

      When to use different programming languages (advice from an Amazon employee):

      • Java - enterprise applications
      • C# - Microsoft's spin on Java (useful in the Microsoft's ecosystem)
      • Ruby - when speed is more important then legibility or debugging
      • Python - same as Ruby but also for ML/AI (don't forget to use type hinting to make life a little saner)
      • Go/Rust - fresh web service where latency and performance were more important than community/library support
      • Haskell/Erlang - for very elegant/mathematical functional approach without a lot of business logic
      • Clojure - in situation when you love Lisp (?)
      • Kotlin/Scala - languages compiling to JVM bytecode (preferable over Clojure). Kotlin works with Java and has great IntelliJ support
      • C - classes of applications (operating systems, language design, low-level programming and hardware)
      • C++ - robotics, video games and high frequency trading where the performance gains from no garbage collection make it preferable to Java
      • PHP/Hack - testing server changes without rebuilding. PHP is banned at Amazon due to security reasons, but its successor, Hack, runs a lot of Facebook and Slack's backends
  14. Mar 2020
    1. It won't let me go beyond this page. I'm sure I've answered the CAPTCHA correctly at least some of the 10+ times I've tried. What's going on?

      I can't even access their static website to find contact information for how to contact them about this problem!

  15. Feb 2020
    1. k6 does not run in Node.js because it would perform poorly while running larger tests.Javascript is not generally well suited for high performance. It's a Go program - to achieve maximum performance - embedding a JavaScript runtime for running tests written in JavaScript.
  16. May 2019
  17. Mar 2019
  18. Feb 2019
    1. Exploring the usage of the CASE software through various research and development funded initiatives, is an on‐going process with the results informing the development process of the system. Future directions in the context of CASE software design include: automatic “mind‐map” diagrams; user defined highlighting and layout preferences; user special‐interest groups; automated and peer‐reviewed scoring of annotations for display; automated abuse filtering; intelligent grouping of learners; and middleware applications to support improved integration with on‐line learning environments.
    1. seems

      Look at the seed he is sowing right there.

    2. our scholars arc nol compelled to restrict their competence to the knowledge of one or another author, but can master a multiple, diversified, almost boundless domain of culture.

      As an autodidact, he would know!

  19. Nov 2018
    1. Cobra既是一个用来创建强大的现代CLI命令行的golang库,也是一个生成程序应用和命令行文件的程序。下面是Cobra使用的一个演示:
    1. 在计算机科学领域,反射是指一类应用,它们能够自描述和自控制。也就是说,这类应用通过采用某种机制来实现对自己行为的描述(self-representation)和监测(examination),并能根据自身行为的状态和结果,调整或修改应用所描述行为的状态和相关的语义
  20. Oct 2018
    1. Channels by default are blocking on sending and receiving values, so they will be waited on


    1. Finally, we add the `xml:"sitemap"` syntax at the end for the parser to understand where it's looking when we go to unpack this with the encoding/xml package.

      最后,我们在末尾添加`xml:“sitemap”`语法,以便解析器在我们使用encoding / xml包解压缩它时的位置。

      type Sitemapindex struct {
          Locations []Location `xml:"sitemap"`
    1. Personally, I would test both. If the gains are insignificant by using value receivers where possible and you are using pointer receivers, sure, use all pointer receivers. If you can make sizeable gains by using value receivers where possible, however, I would personally use them.





    2. Now, we're modifying the struct itself via pointer. Now in the code we could do something like a_car.new_top_speed(500), and this would actually modify the object itself.


    1. between the func keyword and the name of the function, we pass the variable and type. We use c, short for car, and then car, which is in association with the car struct. In this case, the method gets a copy of the object, so you cannot actually modify it here, you can only take actions or do something like coming up with a calculation



      在这种情况下,该方法获取对象的副本,因此您无法在此实际修改它,您只能执行操作或执行类似计算的操作 通过把struct和method关联了起来,使得方法获取到了对象的副本

      func (c car) kmh() float64 {
          return float64(c.gas_pedal) * (c.top_speed_kmh/usixteenbitmax)
    2. In order to do this, we don't need to actually modify the a_car variable, so we can use a method on a value, called a value receiver:

      我们想把gas_pedal的值转化成某种实际的速度,为了做到这一点,我们不需要实际修改a_car变量,所以我们可以在值上使用一个方法,称为值 接收器

      func (c car) kmh() float64 {
          return float64(c.gas_pedal) * (c.top_speed_kmh/usixteenbitmax)
    3. Methods that just access values are called value receivers and methods that can modify information are pointer receivers.



    1. 可以使用内建函数 make 也可以使用 map 关键字来定义 Map:
      // 声明变量,默认 map 是 nil
      var map_variable map[key_data_type]value_data_type
      // 使用make 函数
      map_variable := make(map[key_data_type]value_data_type)
    1. /* 打印子切片从索引 0(包含) 到索引 2(不包含) */ number2 := numbers[:2] printSlice(number2) /* 打印子切片从索引 2(包含) 到索引 5(不包含) */ number3 := numbers[2:5] printSlice(number3)
      numbers := []int{0,1,2,3,4,5,6,7,8}

      len=2 cap=9 slice=[0 1]

      len=3 cap=7 slice=[2 3 4]

    2. 通过内置函数make()初始化切片s,[]int 标识为其元素类型为int的切片
      s := make([]int, len, cap)
    3. 初始化切片s,是数组arr的引用
      s := arr[:]
    1. /* 未定义长度的数组只能传给不限制数组长度的函数 */ setArray(array) /* 定义了长度的数组只能传给限制了相同数组长度的函数 */ var array2 = [5]int{1, 2, 3, 4, 5}
      func setArray(params []int) {
          fmt.Println("params array length of setArray is : ", len(params))
      func setArray2(params [5]int) {
          fmt.Println("params array length of setArray2 is : ", len(params))
    1. 注意:以上代码中倒数第二行的 } 必须要有逗号,因为最后一行的 } 不能单独一行,也可以写成这样:
      a = [3][4]int {
          {0, 1, 2, 3} ,
          {4, 5, 6, 7} ,
          {8, 9, 10, 11} ,    // 此处的逗号是必须要有的


      a = [3][4]int {
          {0, 1, 2, 3} ,
          {4, 5, 6, 7} ,
          {8, 9, 10, 11}}
    1. func getSequence() func() int { i:=0 return func() int { i+=1 return i } }

      闭包,A函数 返回一个函数,假设返回的函数为B,那么函数B,可以使用A函数中的变量

      nextNumber := getSequence()

      nextNumber 是 返回函数B类型,func() int,i是函数A中的变量,初始值 i=0

      执行nextNumber(),i+=1, reuturn i ==> 1

      再执行nextNumber(),i+=1,return i ==> 2

      再执行nextNumber(),i+=1,return i ==> 3

    1. for 循环的 range 格式可以对 slice、map、数组、字符串等进行迭代循环。
      for key, value := range oldMap {
           newMap[key] = value
    1. 以下描述了 select 语句的语法
      • 每个case都必须是一个通信
      • 所有channel表达式都会被求值
      • 所有被发送的表达式都会被求值
      • 如果任意某个通信可以进行,它就执行;其他被忽略。
      • 如果有多个case都可以运行,Select会随机公平地选出一个执行。其他不会执行。


      1. 如果有default子句,则执行该语句。
      2. 如果没有default字句,**select将阻塞,直到某个通信可以运行**;Go不会重新对channel或值进行求值。
    1. iota 表示从 0 开始自动加 1,所以 i=1<<0, j=3<<1(<< 表示左移的意思),即:i=1, j=6,这没问题,关键在 k 和 l,从输出结果看 k=3<<2,l=3<<3。
      package main
      import "fmt"
      const (
      func main() {
          fmt.Println("i=", i)
          fmt.Println("j=", j)
          fmt.Println("k=", k)
          fmt.Println("l=", l)


    1. 这种因式分解关键字的写法一般用于声明全局变量
      var (
          vname1 v_type1
          vname2 v_type2
    1. 以一个大写字母开头,如:Group1,那么使用这种形式的标识符的对象就可以被外部包的代码所使用(客户端程序需要先导入这个包),这被称为导出(像面向对象语言中的 public)
    2. main 函数是每一个可执行程序所必须包含的,一般来说都是在启动后第一个执行的函数(如果有 init() 函数则会先执行该函数)
  21. Aug 2018
  22. Jan 2018
  23. Nov 2017
  24. Oct 2017
  25. Sep 2017
  26. May 2017
    1. AlphaGo is going out on top. After beating Ke Jie, the world’s best player of the ancient Chinese board game Go, for the third time today at the Future of Go Summit in Wuzhen, Google’s DeepMind unit announced that it would be the last event match the AI plays.

      This makes me feel worse somehow than if it was going to continue to play. Seems like it is saying: well, tick the box for beating humans at Go...

    1. It inspired his work at Google, where he led the creation of the historical map platform Field Trip, and then, the Pokémon Go precursor, Ingress.

      I loved field trip for Glass!

    2. Niantic, the maker of Pokémon Go, is teaming up with the Knight Foundation in a multiyear commitment promoting civic engagement in communities. That means the two entities will pitch in time, money, and plenty of Pokémon to get citizens outside, exploring their towns in city-organized events.

      Very interesting development!

    1. The regulation of an entire burgeoning industry, and the interpretation of the Constitution in the digital age, could be impacted by the court’s decision in a case inspired by Pokémon.

      This is a really interesting case. How have I not heard of it?

    1. The diffusion and the public endorsement of data FAIRness has been rapid

      Good to see posts on this.

  27. Apr 2017
  28. Jan 2017
  29. Aug 2016
  30. Apr 2016
  31. Dec 2015