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

SEARCH KEYWORD -- Reset



  CSS Tools: Reset CSS

The goal of a reset stylesheet is to reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on. The general reasoning behind this was discussed in a May 2007 post, if you're interested. Reset styles quite often appear in CSS frameworks, and the original "meyerweb reset" found its way into Blueprint, among others. The reset styles given here are intentionally very generic. There isn't any default color or background set for the bod...

   CSS,Cross browser compatibility,Reset,Partial reset     2011-12-05 02:44:11

  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

  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

  New function signal.NotifyContext in GoLang 1.16

os/signal package in GoLang may not be frequently used but it provides some good features like Shutdown() which can be used to gracefully shutdown a running HTTP server. func (srv *Server) Shutdown(ctx context.Context) error With this function, there is no need to use third party library to gracefully shutdown HTTP server. How is it being used? package main import ( "context" "fmt" "net/http" "os" "os/signal" "time" ) func main() { server := http.Server{ Addr: ":8080", } http.Handl...

   GOLANG,NOTIFYCONTEXT,GRACEFUL SHUTDOWN     2021-06-19 01:07:10

  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

  ByteBuffer in Java

ByteBuffer is introduced in java.nio since Java 1.4. It provides a way of representing raw structured data such as from a file or from network. It enables fast access of underlying data compared to traditional ways like byte[] Prior to Java 1.4, if you want to represent a structured raw data, you need to create a byte[] and then having a set of checks to delimit the byte array to get the expected tokens. There are three ways to create a ByteBuffer: Wrapping an exiting array by calling ByteBuffe...

   JAVA,BYTEBUFFER,ALLOCATION     2015-07-08 03:17:44

  Frequently used Git commands

Git configuration git config --global user.name "robbin" git config --global user.email "fankai@gmail.com" git config --global color.ui true git config --global alias.co checkout git config --global alias.ci commit git config --global alias.st status git config --global alias.br branch git config --global core.editor "mate -w" # Configure Editor to use textmate git config -l #List all configurations User's git configuration file : ~/.gitconfig Frequently used Git commands Check、add...

   Git,Command     2013-03-11 19:41:06

  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

  Java Concurrency Basics: CountDownLatch and CyclicBarrier

CountDownLatch CountDownLatch can be used in synchronizing behavior among threads, it makes one or more threads wait for some actions in other threads to be completed. It has a property count which defines how many countDown() need to be called before other threads which called await() to be waked up.  When a thread calls CountDownLatch.await(), the thread will be blocked until the value of count becomes 0. The initial value of count can be specified when creating the CountDownLatch instanc...

   JAVA,JAVA CONCURRENCY,COUNTDOWNLATCH,CYCLICBARRIER     2018-03-25 07:02:40

  Call of Duty Elite Has Amazing Security

I had tried to register for Elite yesterday, and the servers were being funny, so I wasn't sure if I'd registered. I just now tried to reset my password, and I got the following:Hello JoshForgot your password? These things happen. Access your account with the password below:{Actual Unencrypted Password}Really? They're storing hundreds of thousands of passwords in plain text??EDIT: Not sure what the downvotes are for, surely it's not because huge companies like Steam and Sony never get hacked, an...

   Game,Elite,Call of duty,Defect     2011-11-15 12:42:50