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

SEARCH KEYWORD -- Program



  Lisp: It's Not About Macros, It's About Read

Note: the examples here only work with outlet lisp. Refer to your version of lisp/scheme’s documentation for how read works (and possibly other forms) I know it’s an old post by now, but something about the article Why I love Common Lisp and hate Java, part II rubbed me the wrong way. The examples just aren’t that good. The usage of macros is plain baffling, when a function would have been fine. The author admits this, but still does it. There’s a follow-up post wh...

   Lisp,Macro,Read,Java     2012-02-19 06:12:19

  Multitasking vs multiprogramming

As all these processing are the part of computer functions. You should not be confused between these processes.In computing, multitasking is a method by which multiple tasks are performed by the user also known as processes, share common processing resources such as a CPU. CPU is actively executing more than one task at a time. Multitasking solves the problem by scheduling the tasks instructions. Which task may be the one running at any...

   multitasking,multiprogramming,os,differe     2011-09-22 13:46:30

  The magic of go:linkname

When writing Go program, there is frequent need on using time.Sleep() function to pause the logic for some time. And if jumping to the definition of this function, can see below definition: // Sleep pauses the current goroutine for at least the duration d. // A negative or zero duration causes Sleep to return immediately. func Sleep(d Duration) I's strange that there is no function body defined here. What happened? The actual definition of the function body is residing at runtime/time.go&nb...

   TRICKS,GO:LINKNAME,GOLANG     2022-04-10 08:39:00

  Collection Of Puzzles For Programmers

Did you know that we have a nice collection of puzzles here on less than dot? Some are harder than others so there is something for everyone. You can pic any language you want, you will see that there are solutions in Ruby, Python, Visual Basic, SQL, JavaScript, C++ and other. Here is a partial list of what we have Friday the Thirteenths The goal is to identify all friday the thirteenths for a given timeframe Regular Pentagon Given a grid co-ordinate (x,y) as the centre point of a regu...

   Programming puzzle,Fibonacci,Prime,ASCII     2012-01-04 08:06:18

  Some useful Linux commands for teamwork

A small development team in the intranet will frequently transfer codes, share files. Here are some command we use frequently to release some of our work. They are not applicable to Windows users. 1. Output program execution output through GTalk. Sometimes we may need to send the program execution result and log to teammates for debugging using IM. These outputs are very troublesome to copy and send while in command line mode. So we could have a program called gpipe.py which can put GTalk as a p...

   Linux,NFS,GTalk,HTTP     2013-01-16 04:36:33

  How to reset root password in MySQL 8

The user password in MySQL is stored in the user table, the password reset is actually to change the value of record in this table. To change the password in case the password is forgotten, the idea is to bypass the authentication of MySQL and get into the system and update the record password value with SQL command. In MySQL 5, one can start MySQL service with --skip-grant-tables option, this option will tell the service to skip loading the grant tables when starting, hence the root user can lo...

   MYSQL,PASSWORD,MYSQL 8     2018-12-24 21:27:13

  Data as code

What is a good command line parser API? A good command line parser should consider below 5 aspects: Support convenient help information generation Support sub commands, for example, git has push,pull,commit sub commands. Support single character option, word option, flag option and option with parameter. Support default option, for example, if no -port is set, set it as 5037 Support usage model, for example, tar's -c and -x is mutually exclusive, they belong to different usage models. Here are...

   Command line,API     2013-08-08 22:40:36

  C++ Without Fear: Functions

A function is a group of related statements that accomplish a specific task. Understanding functions is a crucial step to programming in C++, as Brian Overland explains in this chapter from his book.The most fundamental building block in the programming toolkit is the function—often known as procedure or subroutinein other languages. A function is a group of related statements that accomplish a specific task. Once you define a function, you can execute it whenever you need ...

   C++,Feature,Function,Elaboration,Fear     2011-09-03 11:03:11

  What is good design?

Some quotes about good design from a Germany designer Dieter Rams in documentary "Objectified": Good design should be innovative Good design should make a product useful Good design is aesthetic design Good design will make a product understandable Good design is honest Good design is unobtrusive Good design is long-lived Good design is consistent in every detail Good design is environmentally friendly Good design is as little design as possible This brings up a question -- what...

   METRO,SIMPLICITY,GOOD DESIGN,PRINCIOPLE,UNIX PHILOSOPHY     2012-05-09 06:48:11

  Different ways to print "Hello world" in Java

This post is not about best practice to print "Hello world" in Java, it is about exploring different capabilities offered by Java. Also there are articles about printing "Hello world" in different programming languages, but this post is not about that. Standard literal The most commonly used way is to use System.out to print"Hello world". System.out.println("Hello world"); Enumeration An enumeration can define a set of values belonging to one category. For example, an enumeration for all months ...

   JAVA,FEATURE     2016-05-21 21:49:48