SEARCH KEYWORD -- FUNCTIONAL PROGRAMMING
About C++ comma operator precedence
When learning programming language, we will always have one topic about the operator precedence. Since there are many operators can be used in one expression, there should be some rules regarding which operation can happen first so that the compiler or interpreter can handle them correctly. One rule of programming with expression is using as much as brackets as you can to avoid unexpected results. Here we refer one problem we see online about the comma operator in C++. The following program has ...
comma,precedence 2012-11-12 10:25:00
A simple tutorial on GoLang connecting to Clickhouse
Go, also known as Golang, is a statically-typed, concurrent programming language created by Google. ClickHouse is a high-performance, column-oriented database management system that can be used for real-time data analysis. This tutorial will provide a deep dive into how to connect to ClickHouse from a Go program, including how to perform common database operations such as SELECT and INSERT statements. Before proceeding, it is assumed that you already have Go and ClickHouse installed on your mach...
GOLANG,CLICKHOUSE,TUTORIAL 2023-02-11 07:05:36
JavaScript interview questions
This post will cover the JavaScript questions I have encountered and have seen during my programming career. They will mainly focus on vanilla JavaScript though there are lots of excellent frameworks out there and many people are using them in their daily work. this keyword this keyword is an very important but easy to confuse concept in JavaScript since it is always referring to the calling object of the function. 1. What will be the output of below code snippet? function User(name) { this....
JAVASCRIPT,ALGORITHM,THIS,CLOSURE 2019-03-09 07:05:46
OT Railway System Development: How to Use PLC to Implement Land Based Railway Track Fixed Block Sign
Figure-00: Railway fixed block signaling system over view diagram, version v1.3 (2024) Project Design Purpose: This project aims to use Programmable Logic Controllers (PLC) with train detection sensors and train control signals to develop an automated OT system for railway track fixed block signaling control. The system will include a digital equivalent simulation to explain the logic of the track fixed block Automatic Train Control (ATC) mechanism for demonstration and training purposes. In th...
How small should a function be?
"The well-designed functions are often relatively small, large function design is often a mess or there is a lot of room for optimization."Maybe you think there is no need to discuss the size of functions, because the nature of the function design is cohesive, its size is only its manifestations. But it is necessary to discuss about the size of function because the statement above .First let's understand the concept of minimum code processing unit : a basic operation (assignment, comparison, etc...
Function size,Optimization 2012-12-18 13:58:07
10 design flaws of JavaScript
JavaScript's design took only ten days. Moreover, the designer didn't want to design it initially, he just wanted to complete the task assigned by company. It is now a very powerful client side programming language used in almost all the websites. It's an excellent language, but it also has some flaws. 1. Not suitable for large projects JavaScript doesn't have namespace, it's hard to be modular, there is no standard for putting codes in multiple source files. It allows defining functions with th...
JavaScript, Design flaw, Object 2012-11-29 11:39:35
Tips of Drafting an R Markdown Document
When presenting the data summary and exploratory analysis, we used to copy a lot of tables, charts from Rstudio to PowerPoint, which makes the presentation preparation painful. It becomes essential for data scientists to make use of better reporting tools, such as R markdown, Jupyter notebook to prepare the analysis presentation in a more efficient and organized way. Of course, we want this to be reproducible! In this post, I would like to share some tips of using the right tools to draw tables,...
R PROGRAMMING 2020-11-01 23:09:45
OT Power Grid System Development
Use PLC to Remote Control Circuit Breaker in Power Grid System Figure-00: Project Overview Diagram, version v0.0.2 (2024) Project Design Purpose: The objective of this project is to demonstrate how to utilize Programmable Logic Controllers (PLC) to remotely monitor and control circuit breakers within a power (grid/supply) system. Using a Schneider Electric circuit breaker, sensor, closer and PLC, the project will cover the physical hardware connections and provide a step-by-step guide for desig...
Understand JavaScript prototype
For an front end programming language like JavaScript, if we want to understand its OOP feature, we need to understand its objects, prototype chain, execution context, closure and this keyword in deep. If you have a good understanding on these concepts, you should be confident that you can handle this language well. The inheritance in JavaScript is not class inheritance like Java, but it adopts another mechanism-- prototype inheritance. The key to prototype inheritance is the prototype chain mec...
JavaScript, prototype, __proto__ 2013-02-02 02:34:09
Writing Java codes conforming to coding standard
Recently, I was doing some cleanup to one of my current Java project. I find there are many codes which are not conforming to the Java coding standard. So I list them here and hope that people can improve your codes and write maintainable codes. Format source code and manage imports in Eclipse Eclipse provides functions of auto-formatting and imports management, you can use following shortcuts to use these functions. Ctrl+Shift+F --> Format source code Ctrl+Shift+O -- Manage imports an...
Java, Code standard,Style 2012-09-18 12:50:28
RECENT
- How Artificial Intelligence Is Helping Fight Environmental Challenges
- How to Deal with Accusations of Negligence as a Business
- Google's Business Operations in China Amid Antitrust Scrutiny
- Deploying DeepSeek-R1 Locally with a Custom RAG Knowledge Data Base
- Balancing Convenience and Security in the Digital World
- My AI Learning Journey: Exploring the Future of Technology
- Power Grid Simulation System 02 : FDI Power Outage Attack Case Study
- Be Careful When Using Cursor to Help Build Application
- Calculating Token Count for Claude API Using Go: A Step-by-Step Guide
- Understanding Cursor and WindSurf's Code Indexing Logic
- more>>