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

SEARCH KEYWORD -- comment style



  Maybe we need //Comment comment

Do we need comment in our programs? Depends, if we can write a program which can clearly tell s the reader what the program does, then we had better to avoid unnecessary comments. However, if the program we develop is complex enough and it involves some uncommon logic which needs more explanation, then we have to add comment and make sure the comment we add can correctly tell the readers what we do. The worst scenarios is not you forget or you don't want to add comment, it's that you add comment...

   comment,programming     2014-07-23 04:38:04

  Art of code comment

Note : This post is just for fun. Please be careful about these tricks. Code comment is to provide complementary comment to abstract codes. We will introduce two comment styles while we are debugging our codes. we should avoid these styles in production codes. 1. if else style Only execute eatKfc() //* eatKfc(); /*/ eatMcdonalds(); //*/ Only execute eatMcdonalds() /* eatKfc(); /*/ eatMcdonalds(); //*/ Execute both //* eatKfc(); //*/ eatMcdonalds(...

   Comment,Style     2013-08-19 04:19:40

  The war with spam comment

Spam comments are annoying and notorious. They are either malicious data from hackers to exploit the loopholes of the site or advertisements posted by robots. These kinds of comments have their own features and patterns, if we are careful enough, we can find ways to block most of them although it's not so easy. To block the comment with malicious executable codes such as JavaScript, we should remember one rule : never trust user input. So wherever there are user inputs, we need to check the vali...

   Spam comment,Block,Filter     2013-11-29 20:29:43

  golangci-lint to enable comment check for exported functions

golangci-lint is a command line tool which aggregates a list of different go linters to check whether the source code is in correct condition from different aspects. It is built to run during the CI pipeline so that there is no obvious coding issues before compiling and building the program. It is easy to run it with just below command $ golangci-lint run -v INFO [config_reader] Config search paths: [./ /Users /] INFO [config_reader] Used config file .golangci.yml INFO [lintersdb] Active 10 li...

   EXPORTED COMMENT,GOLINT,REVIVE,GOLANGCI-LINT,GOLANG     2022-04-15 20:21:34

  Do you have this kind of comments in your source code?

Writing runnable code is the essential skill of a programmer, writing understandable comment is also a skill a programmer should acquire. There is some famous saying that bad comment is worth than no comment. Usually your code will be maintained by other people, if you provide them some difficult to understand or misguided comments, this will be nightmare to them. While at some other time, programmers may put some funny comments in their codes which may make others laugh. Today we...

   COMMENT,HUMOR     2016-08-01 10:25:14

  how to do online promotion to increase the traffic to your blog.

So many seo trics we can do to increase traffic to our blog, One of them is, by doing an online promotion. This trick is often done by the bloggers to increase traffic on their blogs.a very simple thing to do, but carry a big impact on traffic increases and the popularity of a blog on the internet. If you haven't already to do it for your blog, I think you should do it now, because it is more important than you are installing a lot of meta tags in your blogger.I have written some tips for doing ...

   Website,Promotion,SEO,Advice,Practice     2011-10-26 09:14:12

  Get the 48×48 or 256×256 icon of a file on Windows

Getting the 16×16 and 32×32 icons on Windows is relatively easy and is often as simple as one call to ExtractIconEx. However, getting the extra large (48×48) and jumbo (256×256) icons introduced respectively by XP and Vista is slighly more complex. This is normally done by: Getting the file information, in particular the icon index, for the given file using SHGetFileInfoRetrieving the system image list where all the icons are storedCasting the image list to an IImageList interf...

   File icon,File extension,Association,Large icon,Windows     2012-03-23 09:35:17

  JavaScript-style object literals in PHP

The object literal notation in JavaScript looks like: var fido = {name: "Fido", barks: true}; or var fido = {}; fido.name = "Fido"; fido.barks = true; From assoc arrays to objects In PHP you would call that an associative array. $fido = array( 'name' => "Fido", 'barks' => true ); And you can easily make it an object too: $fido = (object)$fido; echo gettype($fido); // "object" Or if you want to start with a blank object and add stuff to it: $fido = (object)array(); or $fido...

   PHP,JavaScript,Object,Function call,Self vs this     2011-11-30 11:11:45

  What should video website do besides buying copyright?

Several major video sites in China seem to be designed by the same team, they look the same from the main interface to advertising scheme. The question is whether video sites really do not need to improve their products and user experience in addition to smashing the money to buy the copyright to attract users, is there no other choice? After reading this article, perhaps we can somehow have different views.The Web 2.0 era's video siteIn Web 1.0 era, the main way for users to obtain information...

   Video site, Copyright,User experience     2013-03-06 03:15:39

  Jack Ma speaks within the company's intranet post PDD earnings report

On November 28th, PinDuoDuo(PDD) released its financial report for the third quarter of 2023, ending on September 30th. The revenue for the third quarter was 688.4 billion RMB, showing a year-on-year growth of 93.9%. The net profit, according to the U.S. General Accounting Standards, reached 15.54 billion RMB, with a net profit margin of 22.6%. PDD attributed its overall positive performance to the accelerated recovery of the consumer market and the vigorous implementation of its "high-qual...

   PDD,JACK MA,ALIBABA     2023-11-29 06:02:09