Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- arguments



  Can two new objects point to the same memory address in GoLang?

Do you have any idea what the output will be for below GoLang snippet? package main import ( "fmt" ) type obj struct{} func main() { a := &obj{} fmt.Printf("%p\n", a) c := &obj{} fmt.Printf("%p\n", c) fmt.Println(a == c) } Many people would think that a and c are two different object instances which have different memory addresses. Hence a == c will be false. But if you try to run the above program, you would see below output 0x5781c8 0x5781c8 true To get to know the reason wh...

   GO,GOLANG,VARIABLE ESCAPE,ZEROBASE     2019-04-06 01:19:52

  Is Facebook becoming Tencent like?

Recently there is news that Facebook is developing a Reader application which is to compete with Flipboard and Pulse. This reminds me a few movements of Facebook in the past few months. First they built a copy of Snapchat named Poke which failed badly at last. Then they launched a new feature on Instagram named Video on Instagram which allows users to shoot and share short videos up to 15 seconds. This feature is to compete with Vine from Twitter. It seems Instagram wins over Vine on this. You c...

   Facebook,Tencent,Copy     2013-06-24 01:17:27

  GO AHEAD, SELL MY DATA

More and more I see articles popping up that bash social networks for "violating" our privacy and selling our information to advertisers. Inevitably, Facebook has been at the center of many of these "scandals". Today on HN I came across this interviewwith Disconnect co-founder Casey Oppenheim and I just don't get it.In it, he bashes Facebook (and other online advertisers) for using our information in order to serve up targeted ads. He points out that many of the " “free” service...

   Social network,Facebook,Privacy,Data,Ads     2011-10-19 14:12:08

  How-to: Remotely shut down your computer

Think of this scenario; You are lying in bed and just finished watching a movie that you were streaming from a computer downstairs. You want to sleep, but you need to head downstairs to turn the computer off. Save some time, and do it from the computer upstairs.There are a number of ways that you can restart or shutdown remote computers. You could use a remote desktop connection, but there are quicker ways and we will look at them today.This article will show you various methods you ca...

   Windows,Shutdown,Remote control,Cmd     2011-10-10 06:18:44

  Python basics summary

Python is recommended by many people as the first language to be learned now. Even in some universities, it is the primary language to be taught to CS/CE students. To master this languages, we should understand some basics of it. Here we summarize some basics about this language. These basics include : string replacement with regular expression, traverse a directory, sort a list, remove duplication, dictionary ordering, dictionary, list, string conversion, date object manipulation, command line ...

   Python,Summary     2013-09-23 10:04:42

  Reducing Code Nesting

"This guy’s code sucks!" It’s something we’ve all said or thought when we run into code we don’t like. Sometimes it’s because it’s buggy, sometimes it’s because it conforms to a style we don’t like, and sometimes it’s because it just feels wrong. Recently I found myself thinking this, and automatically jumping to the conclusion that the developer who wrote it was a novice. The code had a distinct property that I dislike: lots of ...

   Code nesting,Readability,Maintainability,Reduction     2012-01-02 08:13:46

  Scala Macros

This is the home page of project Kepler, an ongoing effort towards bringing compile-time metaprogramming to Scala. Our flavor of macros is reminiscent of Lisp macros, adapted to incorporate type safety and rich syntax. Unlike infamous C/C++ preprocessor macros, Scala macros: 1) are written in full-fledged Scala, 2) work with expression trees, not with raw strings, 3) cannot change syntax of Scala. You can learn more about our vision of metaprogramming from our talks. We propose to enrich Scala ...

   Scala,Macro,Efficiency,Maintainebility     2012-02-01 00:12:15

  Should a startup focus on good user experience or ship something out quickly?

For a startup, there are always arguments about whether to build a good experience or instead ship something workable out quickly. These two seem contradict with each other and it is usually hard to decide for many startup founders. But in order to win over competitors and gain large portion of market shares as soon as possible, founders must think fast and make their life change decisions. So how should we decide whether we should focus on good user experience or we should ship out the product...

   User experience,Startup     2014-01-20 06:48:28

  JavaScript's Two Zeros

JavaScript has two zeros: -0 and +0. This post explains why that is and where it matters in practice. The signed zero Numbers always need to be encoded to be stored digitally. Why do some encodings have two zeros? As an example, let’s look at encoding integers as 4-digit binary numbers, via the sign-and-magnitude method. There, one uses one bit for the sign (0 if positive, 1 if negative) and the remaining bits for the magnitude (absolute value). Therefore, -2 and +2 are encoded as f...

   JavaScript,zeros     2012-03-24 05:21:49

  Update & Delete Kubernetes resources in one-line command

It recently troubles me that my GKE cluster is managing more and more resources and causing difficulties in maintenance, one of which involves how to delete resources properly. Next, I will explain step by step the difficulties I encountered in my work and how I finally used the combination of bash commands and kubectl to implement the edition of Kubernetes objects through one-line command. In general The following are the basic operations that almost every Kubernetes user takes. Check ðŸ‘...

   KUBERNETES     2020-11-01 04:16:47