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

SEARCH KEYWORD -- gdb



  The internals of slice in GoLang

There are 3 components of slice:a) Pointer: Points to the start position of slice in the underlying array;b) length (type is int): the number of the valid elements of the slice;b) capacity (type is int): the total number of slots of the slice. Check the following code: package main import ( "fmt" "unsafe" ) func main() { var s1 []int fmt.Println(unsafe.Sizeof(s1)) } The result is 24 on my 64-bit system (The pointer and int both occupy 8 bytes). In the next example, I will use gdb to poke t...

   GOLANG,SLICE     2019-06-30 02:55:22

  Use Delve to debug GoLang program

If you don't know how to debug program, you are not a real programmer. gdb can be used to debug go program, but according to golang website, delve is a better option.   Note that Delve is a better alternative to GDB when debugging Go programs built with the standard toolchain. It understands the Go runtime, data structures, and expressions better than GDB. Below is a simple go program. package main type Person struct { Name string Age int } func main() { var me Person me.Nam...

   GOLANG,DEBUG,DELVE     2018-11-09 23:28:43

  Why do I need a debugger?

  When I begin to learn a new programming language, I will try and master the debugger for it as early as possible. For example, in 2013, while I touched the Go, there seems only gdb for use. Although gdb itself is not a good choice (From Debugging Go Code with GDB): As a consequence, although GDB can be useful in some situations, it is not a reliable debugger for Go programs, particularly heavily concurrent ones. But at that time there was no other choice. So after delve&nb...

       2017-07-21 22:53:16

  Use DTrace to diagnose gdb issues

A few days ago, I installed the newest 64-bit gdb program (version 7.7.1) on Solaris 10 (X86_64 platform) to debug programs. After playing with the gdb a day, I found 2 issues about gdb:(1) The "set follow-fork-mode child" command doesn't take effect. By default, after the parent process forks the child process, the gdb will track the parent process, so this command can make gdb begin to follow the child process. But this command works OK on Linux.(2) The gdb can't parse the 32-bit application c...

   DTrace, debug, gdb, UNIX     2014-06-28 05:11:20

  Free jQuery UI themes

jQuery UI is a jQuery User Interface library, it provides many frequently used components and functions. It consists of datepicker, slider, progress bar and drag and drop support etc. Also it has many themes, you can use ThemeRoller to customize your own theme. But with ThemeRoller, we can still find the shadow of jQuery UI. If you want some highly customized, free and high quality jQuery themes such as Bootstrap, Windows-Metro, then the following themes may suit you. 1. jQuery UI Bootstrap jQu...

   jQuery UI, Theme     2012-10-20 10:59:20

  Linux Command Line tips that every Linux user should know t

Below is the collection of Linux command line tips which I’ve found useful for Linux users. To get more information about the command mentioned below just open your terminal and type man <command>.Things a Linux user must learnLearn bash: No need to refer a lengthy bash guide or something else. Just read the complete man page of bash (man bash).Learn vim: You might be using Emacs or Eclipse for your work all the time but nothing can compete vim.Learn ssh: Learn the basics of passw...

   Linux,Unix,Command line,Tips     2012-03-21 09:27:03

  Use pdb to help understand python program

  As I have mentioned in Why do I need a debugger?: (3) Debugger is a good tool to help you understand code. So when I come across difficulty to understand vfscount.py code in bcc project, I know it is time to resort to pdb, python's debugger, to help me. The thing which confuses me is here: counts = b.get_table("counts") for k, v in sorted(counts.items(), key=lambda counts: counts[1].value): print("%-16x %-26s %8d" % (k.ip, b.ksym(k.ip), v.val...

       2017-08-22 22:42:37

  Time-saving tips Linux users should know

As a programmer or system administrator, we have more chances of working on *nix platforms. It's tough experience when first start use *nix as we need to face a black screen without knowing what's behind it. Now, if we can have some resources to rely on, then we will find the beautify of *nix. They are fast, efficient and most importantly sexy. Below are some great tips for helping Linux users get used to Linux. This list is a bit long. So be patient. To get more information on a command mention...

   Linux,Tips     2013-09-03 22:30:48

  10 Best Android Apps of 2016

The year 2016 has been gone with all its good and bad memories. But in the field of information technology, this year was another boost in which the field rapidly grew and explores some more essentials for the ease of users. In the field of mobile apps, specially users of Android OS, the year 2016 was awesome because in this year, they got many useful apps created by the highly qualified app developers of the world.Experts of Android OS rounded up a lot of apps created in the year 2016 and they ...

   MOBILE APP DEVELOPMENT COMPANY,CUSTOM MOBILE APP DEVELOPMENT COMPANY     2017-01-10 14:07:32

  Why Math.min() > Math.max() is true in JavaScript

...

   JAVASCRIPT,MATH.MIN(),MATH.MAX(),COMPARISON     2022-05-02 05:27:07