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

SEARCH KEYWORD -- Shutdown



  C program to shutdown or turn off computer

C Program to shutdown your computer :- This program turn off i.e shutdown your computer system. Firstly it will asks you to shutdown your computer if you press 'y' the your computer will shutdown in 30 seconds, system function of "stdlib.h" is used to run an executable file shutdown.exe which is present in C:\WINDOWS\system32 in windows-xp. You can use various options while executing shutdown.exe for example -s option shutdown the computer after 30 seconds, if you wish to shutdown immediately th...

   C,Windows,Shutdown,Command,Code     2011-10-10 07:08:31

  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

  Socket programming tips in Solaris

I sponsored a topic in stackoverflow.com, and hoped the programmers can share the socket programming tips in different UNIX flavors. But unfortunately, the responders are few. So I can only share my socket programming tips in Solaris at here (the Chinese version can be found there): 1. Use the following link options: "-lresolv -lnsl -lsocket";2. Solaris doesn't provide socket options: SO_SNDTIMEO and SO_RCVTIMEO(Why does Solaris OS define SO_SNDTIMEO and SO_RCVTIMEO socket options...

   C,Solaris,socket,     2014-05-09 23:01:03

  TikTok confirms to sue US government

TikTok confirmed on Saturday to sue US government and US president Donald Trump over Trump administration's executive order on potentially banning TikTok in US. This Chinese short video app is the most downloaded app on App Store and PlayStore over past few months and has gained extremely high popularity among American youths. The parent company ByteDance claimed that the government's ban is illegal and hurts the interests of America people. "Even though we strongly disagree with the administra...

   BYTEDANCE,TIKTOK,US GOVERNMENT     2020-08-22 22:27:29

  How-to: Remotely shut down your computer

Think of this scenario; You are lying in bed and just finished watching a movie that you were streaming from a computer downstairs. You want to sleep, but you need to head downstairs to turn the computer off. Save some time, and do it from the computer upstairs.There are a number of ways that you can restart or shutdown remote computers. You could use a remote desktop connection, but there are quicker ways and we will look at them today.This article will show you various methods you ca...

   Windows,Shutdown,Remote control,Cmd     2011-10-10 06:18:44

  Networking Terminologies

Portmaps sudo apt-get install -y portmap Portmap is a part of ONC RPC (Open Network Computing Remote Procedure) collection of software for implementing remote procedure calls between Computer Programs. It is widely used by NFS (Network File System) and NIS. Portmap is a server that converts RPC program number to DARPA protocol port number. It must be used in order to make RPC calls. Network Infomation Service (NIS) sudo apt-get install -y nis NIS is a client server directory service provi...

   Linux,Network programming,Network file system     2012-02-16 06:22:30

  Something you may not know about Shell

Shell is also called command line interface, it is the interface between *nix users and computer. Shell is a program which provides service to access OS kernel services. This article is to introduce some not so well known but useful and interesting knowledge about shell. Wiki shell was born almost at the same time as Unix. The first UNIX shell was written by Ken Thompson in 1971 and its name is Thompson sh. It's older than Linux kernel. The default Shell in most *nix and MacOS is bash, bash was...

   Linux, Unix,Shell,Command     2012-11-24 07:19:47

  Create customized GitHub profile page

How long have you been using GitHub? Have you ever wondered whether one can customize his profile page with some fancy looking? Indeed GitHub allows developers to customize profile page through a secret repository. The secret is to create a repository with the same name as your GitHub username. And you will be granted into the work of customizing your own profile page. In this post, we will show a simple walk through on how to create it. Create secret repository As indicated by the term secret r...

   GITHUB,CUSTOMIZED PROFILE,SECRET REPOSITORY     2020-10-18 03:02:42

  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