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

SEARCH KEYWORD -- head



  Algorithm : Delete middle node from singly linked list

Questions about singly linked list are frequently asked during technical interviews. Today we will share with you one algorithm question about singly linked list. Here is the problem description. Assuming the only information you are giving is there is a pointer to a middle node of a singly linked list, no other information about the linked list is given. Please delete this node and don't affect the structure of the linked list. Initially you may think this question is easy if you know the hea...

   ALGORITHM,C,LINKED LIST     2015-10-30 05:21:25

  Algorithm : Reverse singly linked list

Questions about singly linked list are the lovers of interviewers during interviews given the characteristic that singly linked list is one-directional list and it's difficult to get the previous node of one node without some buffering tricks.  In this post, we will demonstrate one of the most frequently asked question about singly linked list -- Reversing the singly list. Given the first node of a singly linked list, reverse the singly linked list. For example : A->B->C->D After ...

   ALGORITHM,INTERVIEW,C     2015-10-31 11:38:35

  git reset vs git revert

When maintaining code using version control systems such as git, it is unavoidable that we need to rollback some wrong commits either due to bugs or temp code revert. In this case, rookie developers would be very nervous because they may get lost on what they should do to rollback their changes without affecting others, but to veteran developers, this is their routine work and they can show you different ways of doing that. In this post, we will introduce two major ones used frequently by develo...

   GIT,GIT RESET,GIT REVERT     2019-02-02 08:26:39

  Ways to undo wrong Git operations

While using Git to version code, programmers would inevitably perform some invalid operations which are not expected. Sometimes it's difficult to deal with this kind of awkward situations. If the programmer chooses to undo the operation, the programmer needs to bear the risk of deleting something which is not supposed to be deleted if the undo is done improperly. If the programmer leaves it as is, the file needs to be updated again manually with a new commit. In this post, we will try to pr...

   GIT,GIT COMMIT,GIT RESET     2018-07-07 03:28:21

  JavaScript showModalDialog method

In JavaScript, showModalDialog()  method creates a simple modal dialog box which is a simple html page but when a modal dialog opens, user can't switch to another page until it closes the modal dialog box. Syntax:  window.showModalDialog( url, arguments, feature options); Where url is the URL of page which is to be opened in modal window and arguments are those arguments which we are passing to the modal window and feature options are the attributes set for the modal windo...

   JavaScript,JS,showModalDialog,Example     2011-07-27 10:51:47

  The header element in HTML 5

Currently HTML5 is exciting and anyone who want to builds web pages is looking forward to implementing HTML5 new tags into their sites. Definitely HTML5 tags are very rich in functions that make life much easier for both webmasters and end users Within the HTML5 specfication we can see that there have been a significant number of new tags added, one of these the <header> element is what we’ll be covering here. We will talk about when to use it, when not to use it. As we ar...

   HTML5,Header     2012-05-03 09:12:58

  A simple example of git bisect command

git bisect is a very powerful command for finding out which commit is a bad commit when bug occurs.  The rationale behind this command is that it pin locates the bad commit by divide and conquer. It divides the commit history into two equal parts, then determines whether the bad commit is at the first half or at the other half. This process will continue until the bad commit is located. Here is a really good example created by bradleyboy, this is a simple git repository which demonstr...

   GITHUB,GIT,GIT BISECT     2019-07-12 10:31:51

  Write HTML easily with Emmet and Haml

Writing HTML codes is very boring and tedious as it has many tags and it's static. One solution is to use template, filling content based on other's skeleton. One another solution is high speed writing. We can write HTML codes with Emmet and Haml. These two ways have similar functions but with different characteristics. Haml is based on Ruby, so when working on Ruby/Rails projects, we recommend to use Haml, otherwise we recommend to use Emmet. 1. Emmet Emmet is a editor plugin, the official webs...

   HTML,Emmet,Haml     2013-06-11 19:46:02

  Interaction between JavaScript and Frameset

ou want to change more than one frame at a time? OK, well here is how to do make the trick work for you! The first thing you will need is a frameset to get you started. Again, I will use a frameset with two frames. Here is the code for the frameset page: <HTML> <HEAD> <TITLE>Frames Example 5</TITLE> </HEAD> <FRAMESET cols=\"20%,80%\"> <FRAME SRC=\"page1.htm\" name=\"left_frame\"> <FRAME SRC=\"page2.htm\" name=\"right_frame\"> </FRAMESET> <...

   interaction,javascript,html,frameset,fra     2011-03-22 12:50:47

  How to undo git changes?

When using git for version control, there is frequent need on undoing commits due to some unexpected changes. This post will introduce how to undo changes with git command in different cases. Undo commit A common undo case is that some commit needs to be reverted as the commit contains error. In this case, the code is already committed. The command to revert the commit is git revert HEAD This command will add new a commit to the existing head to undo the previous commit. It will not change the p...

   GIT,GIT RESET,GIT REVERT,GIT CHECKOUT     2019-12-28 02:21:47