//Technical
How to print a number with commas as thousands separators in JavaScript
function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, “,”); } This is all you really need to know. The regex uses 2 lookahead assertions: a positive one to look for any point in the string that has a multiple of 3 digits in a row after it, and a negative assertion to make sure that point only has..
Xem thêm- 65 lượt xem
- 0 Bình luận
Sự khác biệt giữa JDK, JRE và JVM là gì?
Tìm hiểu JDK, JRE và JVM là gì? JVM JVM viết tắt (Java Virtual Machine) nó là tạo ra môi trường máy ảo để thực thi mã java bytecode. JVM có sẵn trong nhiều phần cứng và nền tảng phần mềm. Nó gồm 4 nhiệm vụ chính: – Load code..
Xem thêm- 77 lượt xem
- 0 Bình luận
How to Create CSS3 Speech Bubbles Without Images
Credit: https://www.sitepoint.com/pure-css3-speech-bubbles/ I remember my creating my first image-less speech bubble many years ago. It required a long-winded JavaScript function to inject elements into the DOM, some horrendous CSS, looked fairly awful, and didn’t work well in IE5. CSS3 is starting to change our lives for the better. It’s now possible to create a great..
Xem thêm- 63 lượt xem
- 0 Bình luận
List diffirences between Java and C++
List diffirences between Java and C++ Java C++ Java is a true and complete object oriented language. C++ is an extension of C with object oriented behavior. C++ is not a complete object oriented language as that of Java. Java does not provide template classes. C++ offers Template classes. Java supports multiple inheritance using interface…
Xem thêm- 60 lượt xem
- 0 Bình luận
How can I make Java print quotes, like “Hello”?
System.out.print(“\”Hello\””); The double quote character has to be escaped with a backslash in a Java string literal. Other characters that need special treatment include: Carriage return and newline: “\r” and “\n” Backslash: “\\” Single quote: “\’” Horizontal tab and form feed: “\t” and “\f”
Xem thêm- 40 lượt xem
- 0 Bình luận
PHP isset() vs empty() vs is_null()
Credit: https://techtalk.virendrachandak.com/php-isset-vs-empty-vs-is_null/ PHP has different functions which can be used to test the value of a variable. Three useful functions for this are isset(), empty() and is_null(). All these function return a boolean value. If these functions are not used in correct way they can cause unexpected results. isset() and empty() are often viewed as functions that are opposite,..
Xem thêm- 107 lượt xem
- 0 Bình luận
CSS Font-Size: em vs. px vs. pt vs. percent
One of the most confusing aspects of CSS styling is the application of the font-size attribute for text scaling. In CSS, you’re given four different units by which you can measure the size of text as it’s displayed in the web browser. Which of these four units is best suited for the web? It’s a..
Xem thêm- 73 lượt xem
- 0 Bình luận
Absolute, Relative, Fixed Positioning: How Do They Differ?
Short answer: Yes, there is one more, “static”, which is the default. Yes, they majorly differ. Each of them is incredibily useful and which you should use of course depends on the desired result. Also, don’t forget about float, which is an important part of positioning. Medium answer: I’m not going to do a “long answer” because there..
Xem thêm- 67 lượt xem
- 0 Bình luận
What is Ajax
What is AJAX? AJAX = Asynchronous JavaScript and XML. In short; AJAX is about loading data in the background and display it on the webpage, without reloading the whole page. Examples of applications using AJAX: Gmail, Google Maps, Youtube, and Facebook tabs. You can learn more about AJAX in our AJAX tutorial. What About jQuery and..
Xem thêm- 59 lượt xem
- 0 Bình luận