Free CDN: jsDelivr+Github
CDN : Content Delivery Network
CDN : Content Delivery Network
$(window).height() gets the same value with $(document).height() , because I forgot to add <!DOCTYPE html> Source
Code
word responsive
StringBuilder: A mutable sequence of characters ```java StringBuilder sb = new StringBuilder();
Given the array prices where prices[i] is the price of the ith item in a shop. There is a special discount for items in the shop, if you buy the ith item, th...
Given an array arr, replace every element in that array with the greatest element among the elements to its right, and replace the last element with -1.
HasbMap based on hashtable. HashMap dont have natural order, but Tree Map has. such as: treeMap.keySet() is incresed set of number // treeMap.descending...
Create repositories ``` $ git init Turn an existing directory into a git repository
Parse XML TO Object xml2js
I fetch xml file from website and parse it to object, I got a error ` TypeError: Cannot read property ‘toString’ of undefined at Parser.parseString (pars...
http-proxy-middleware For node.js, redirect request to other port like “localhost: 3001”
request-promise-native
if we meet No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. If an opaque response...
1266. Minimum Time Visiting All Points On a plane there are n points with integer coordinates points[i] = [xi, yi]. Your task is to find the minimum time in...
There are many ways to reverse string, I list two solutions that are not that normal:
938. Range Sum of BST
771. Jewels and Stones
1290. Convert Binary Number in a Linked List to Integer
1221. Split a String in Balanced Strings
I had canceled my domain service about one year, and it charge me again at today. I canceled service last year and did the refund, how does it renew again???...
1295. Find Numbers with Even Number of Digits Given an array nums of integers, return how many of them contain an even number of digits.
1281. Subtract the Product and Sum of Digits of an Integer
A good website: Vogella.com
1365. How Many Numbers Are Smaller Than the Current Number
1342. Number of Steps to Reduce a Number to Zero
1108. Defanging an IP Address
The Bitwise Operators Java defines several bitwise operators, which can be applied to the integer types, long, int, short, char, and byte.
Syntax /pattern/modifiers
Start up Create a folder named: Jest-test Open Terminal and commond: npm init -y Install Jest: npm i -D jest (D for dependency) Open package.json, m...
Today, I want to create a jest example and simply name folder name as “jest” which made error in next step: npm init -y This commond will create a package h...
```python This is a script showcasing what are the different ways to find number 9-button on the calculator app on Android. These same principles can be used...
ADD: desired_caps['autoGrantPermissions'] = True Link
Downlaod different version of JAVA Link Check this to change version Link
install ARM translation: Link Download app APK, drag and drop the file
Inside /Users/feng/Library/Android/sdk/tools/bin Local that folder, then write command ./uiautomatorviewer to run uiautomatorviewer Notice: uiautomato...
Activity: Input in terminal: adb shell dumpsys activity | grep -i run Version: adb shell getprop ro.build.version.release
Input $ export JAVA_HOME=$(/usr/libexec/java_home) in terminal set Bin directory of JAVA_HOME : export PATH=${JAVA_HOME}/bin:$PATH
Default$ export ANDROID_HOME=/Applications/ADT/sdk My mac: $export ANDROID_HOME=/Users/feng/Library/Android/sdk Add this to the PATH environment vari...
Install JDK, Link Input javac in terminal to test if installation successful Install Android SDK Link Install ADB Open Android Studio, find Tools&...
1.pip install request bs4 Using BeautifulSoup get website script, then caught specific element text content by ID. Using smtplib send email How to get...
Recording a perfect website load testing service: Flood Flood can generate load test with unlimited concurrent users in free plan with few limitation. Consi...
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null brew install carthage
My backend check user register information, if user submit wrong data, backend will send back response status 404 and error message.
genymotion Need download Orical Virtual Box
1st step: curl https://bootstrap.pypa.io/get-pip.py > get-pip.py 2nd step: sudo python get-pip.py
I want to add React Router to my existing Class component, becasue I need to use nesting function, and there is a Hook useRouteMatch() I must use in class co...
I am using Datepicker in my website The Datepicker doesn’t have function to exclude special times for each day, so I add some code to help it recognize date;...
Algolia
Recording a well uisng load testing service: Flood The good thing about Flood is you can generate load test with unlimited concurrent users in free plan with...
If we just update parents components by setState(), it will not effect its child components;
I found a useful DatePicker component for React.js:
Day.jsx set min length of select
PayPal Developer setup:
Reference
source Using Object.assign() to copy and merge objects: Object.assign(target, source); find one or more source object to target object, and return target ...
```js // Using Date() function var d = Date(); // Converting the number value to string a = d.toString() // Printing the current date document.w...
I use setState(); in custom function, but appear error, thanks Fabien Sa help me to figure out this problem.
I try to update MongoDB collection by _id, but it is an ObjectID, I can’t use number _id which I got before to update it, finally, I find the answer: Quora
ThankDaniel Iwaniuk
Given an array A of non-negative integers, half of the integers in A are odd, and half of the integers are even. Sort the array so that whenever A[i] i...
Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums except n...
Given two arrays arr1 and arr2, the elements of arr2 are distinct, and all elements in arr2 are also in arr1. Sort the elements of arr1 such that the r...
resource
Chapter 3 The DOM D: Document O: Object User-defined objects; Native objects: like Array, Math and Date; Host objects: provided by the borwser; Ho...
Given a non-empty 2D array grid of 0’s and 1’s, an island is a group of 1’s (representing land) connected 4-directionally (horizontal or vertical.) You may a...
Update Ruby
This is the note of book: « DOM Scripting Web Design with JavaScript and the Document Object Model Second Edition »”
Add File System Module: var fs = require('fs');
var item = items[Math.floor(Math.random()*items.length)];
event.preventDefault():
Given an array A, we can perform a pancake flip: We choose some positive integer k <= A.length, then reverse the order of the first k elements of A. We w...
Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.
Resource
Learning Website: https://yoast.com
Three Principles: Single source of truth: * Easy to create universal apps; * A single state tree make it easier to debug or inspect;...
On an 8x8 chessboard, there can be multiple Black Queens and one White King.
In a deck of cards, every card has a unique integer. You can order the deck in any order you want.
I use PM2 to let my Node.js running forever
Here is some command I use to install Nginx on AWS
Follow the Dev Ed, learn 3 new stuffs
Run Git Bash as administrator Connect EC2 ` $ ssh ec2-user@public-ip-address -i ec2keypair.pem` Remove old directory $ rm -rf xx Clone new reposit...
React not support HTML 5 video:
Today, I add react-coverflow in my website, this Multi-item carousel is very beautiful and easily to use;
When user choose password recovery, back end server will send a email to customer email box. This email contain a password recovery form, customer can input ...
When user create a new account, the system will send a email with a comfirmation link. I add token in comfirmation link as params, when user click this link,...
My backend check user register input, If input data is wrong, it will send back status 404 error with “error detail” message;
DingDong
I add wordcloud2 in my blog
Popup form with animation, recording it for furture development.
I add a new word cloud on categroies page by using wordcloud2, but it shows errors in my tags apge, because I set all js files as document.load , it running ...
I post a demo website on Netlify today, Netlify is a free hosting for beginners who want to host a small website front end. Let me explain why it is suitable...
Today, I add a TagCloud function in my blog, here is the code:
Today, I spent large amount of time to check one mistake, I can not find any clues in “Styles” part of Chrome DevTools. Finally, I find it in “Computed”, le...
Given an array A of non-negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A.
Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements.
Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image.
1. Rmoving from end:
In Scratch, all programming logical lanaguage are blocks. User can drag blocks and pull them inside the frame. Scratch also have “If…else”, but it use “for...
How to write images url correctly in .md file?
O(n2) algorithms