Posts

Showing posts from August, 2018

server responses statusu codes meaning

Status Codes With URLs and verbs, the client can initiate requests to the server. In return, the server responds with status codes and message payloads. The status code is important and tells the client how to interpret the server response. The HTTP spec defines certain number ranges for specific types of responses: 1xx: Informational Messages All HTTP/1.1 clients are required to accept the  Transfer-Encoding  header. This class of codes was introduced in HTTP/1.1 and is purely provisional. The server can send a  Expect: 100-continue  message, telling the client to continue sending the remainder of the request, or ignore if it has already sent it. HTTP/1.0 clients are supposed to ignore this header. 2xx: Successful This tells the client that the request was successfully processed. The most common code is  200 OK . For a  GET  request, the server sends the resource in the message body. There are other less frequently used codes: 202  Accepted: the request was accepted b

odometer.js---smoothly transitioning number

Image
Odometer is a Javascript and CSS library for smoothly transitioning numbers. Github here Step1: link css theme  http://github.hubspot.com/odometer/themes/odometer-theme-digital.css there are 7 themes file here link js file here http://github.hubspot.com/odometer/odometer.js Step2: set the  innerHTML ,  innerText , or use jQuery's  .text()  or  .html()  methods to change their contents, and the animation will happen automatically. More info here See the Pen xJQXpQ by Yifang Di ( @diyifang ) on CodePen .

jQuery-canvas-sparkles.js---a jquery plugin for sparkling example

Image
The jquery-canvas-sparkles is a small plugin for making DOM elements sparkle. The official github  here As soon as I noticed that,I felt like a fairy story is a relavent thought. Here I made an example of this plugin. I will write down how I made this with plugin. Step1: link the jquery library and  jquery-canvas-sparkles.js Step2: two div tags included in the magic box.(HTML) Style the elements inside.(CSS) When hovering the fairy, the  wand animates from left to right top. Step3: apply the plugin with sparkle()  (JS) When mouseover fairy,the magic box starts sparkles. color:the sparkles' color count:how many stars show in the element overlap:how far over the edge speed:how fast the sparkles move minSize:the minmum size of star mazSize:the maxmun size of star derection:the direction of star moving [up/down/both] Three events: start.sparkle:start  stop.sparkle:stop resize.sparkle:resize the canvas size and change the position of sparkl

Remove all node_module folders recursively

Remove all node_module folders (or any type of folder/file) find . - name "node_modules" - exec rm - rf '{}' + That will delete the folder and files even if there is a space in the name. That saved me about 5GB over several hundred node projects which I had not touched in a while. If I need the node modules back, I can simply run  npm install Written by  S.Lacy reproduce  https://coderwall.com/p/guqrca/remove-all-node_module-folders-recursively