MongoDB Installation and Use in Windows

As a representative of non-relational database, MongoDB is very suitable for storing some unstructured data. With the purpose of understanding and research, I tried to install it on Windows machine and found that there are still many points to share in the middle. Installation of MongoDB I thought the installation was a very simple task, but I got stuck in downloading the installation package during the execution. The download page

HTTP packet capture tool of Charles

Introduction to Charles Charles is an HTTP proxy server that allows Charles to monitor all data sent and received by a browser when it connects to Charles’ proxy to access the Internet. It allows a developer to view all HTTP traffic connected to the Internet, these include requests, responses and HTTP headers (containing cookies and caching information). Charles main features. Support SSL proxy. Can intercept and analyze SSL requests. Support for traffic control.

Linux terminal/graphic interface and desktop environment

Command Line Interface (CLI), Terminal, Shell, TTY Command Line Interface (CLI) Command line interface, in layman’s terms, is the kind of interface that you have seen with characters all over the screen. Command line interface (English: Command-line Interface, abbreviation: CLI) is the most widely used user interface before the popularity of graphical user interface, it usually does not support the mouse, the user through the keyboard input commands, the computer receives the command, to be executed.

Linux file permissions viewing and modification

Linux is a multi-user, multi-tasking system, often with multiple people working on a single machine at the same time. To protect everyone’s privacy, the role of “file owner” is quite important. When a Linux user logs on to the system, he or she carries a User ID (UID) and a Group ID (GID), which are equivalent to his or her business cards. When you need to access a file or

Linux Package Management System

Introduction to Package Management Systems There was a time when software was distributed via FTP or mailing lists (i.e., patch packages with source code distributed via mailing lists) (eventually these distribution methods evolved, thanks to the rapid growth of the Internet, into one of the common software distribution sites of today). (There is only one very small file (usually in a tar file) that contains

Linux user and user group management

There are only two levels of Linux users: root and non-root, and some users in Linux, such as apache, mysql, nobody, ftp, etc., are also non-root users, i.e. normal users. And these illusions are caused by another concept: user groups A user must belong to at least one user group A user can belong to more than one user group The reason for the existence of user groups is still

Python Multithreading and Multiprocessing

In the process of learning Python, I have come across knowledge points related to multi-threaded programming, which I have not been able to understand thoroughly before. Today I’m going to spend some time to sort out the details as clearly as possible. The difference between threads and processes Processes (process) and threads (thread) are basic operating system concepts, but they are rather abstract and not easy to grasp. The most

Python logical judgment True/False trap

The definitions of True and False in Python are defined in different versions of Python as follows. Python 2: None, 0, and the empty string are all counted as False, all others are True Python 3: None, 0, the empty string, the empty list, and the empty dictionary are all considered False, and all other values are True However, in actual use, the above definition and actual performance are not consistent.

IE conditional comments in HTML

IE’s market share is declining rapidly, but there are still many PCs in China using the Win 7 operating system. For the PC version of web development at present, fewer and fewer people are concerned about it. For developing web pages, there are still some methods and techniques that need to be understood. IE conditional comments are a special kind of HTML comments, which can only be understood by IE5.0

String Hashing Algorithm Compendium

What is a hash ? Hash is the transformation of an input of arbitrary length (also called pre-image) into an output of fixed length by a hashing algorithm, and that output is the hash value. This transformation is a compressed mapping, i.e., the space for the hash value is usually much smaller than the space for the input, and different inputs may be hashed into the same output, and it is not possible to uniquely determine the input value from the hash value.

Python Date and Time Processing Explained

Python’s time processing module is used more often in everyday use, but when using it, you basically have to look up the information, which is still a bit of a hassle, so comb through it to make it easier to use in the future. Time-related concepts Second At the 13th International Conference on Weights and Measures in 1967, it was decided to use the second, defined in atomic time, as

Dropbox account password storage practices

As we all know, storing plaintext passwords is a very bad thing. If a database stores a plaintext password, if the data is leaked, then the user account is in danger. Because of this, back in 1976, industry came up with a set of standards for storing passwords securely using a one-way hashing mechanism (starting with Unix Crypt). Unfortunately, while this approach prevents you from reading the password directly, all the hashing mechanism does is prevent an attacker from brute-force cracking it in an offline environment, where the attacker simply traverses a list of possible passwords containing the correct password, hashes each possible password and then compares it to the obtained password (the one stored using the hashing mechanism).

Android applications: apk file decompilation

APK file introduction Each application that needs to be installed to the android platform is compiled and packaged as a separate file with the suffix .apk (Android application package), which contains the binary code, resources, configuration files, etc. of the application. The apk file is actually a zip archive that can be unzipped by an unzip tool (change the suffix to .zip and then unzip it with the unzip file.)

Hive SQL CURRENT_DATE causes datediff error

The datediff function in Hive SQL returns the number of days between 2 dates. One of the more interesting pitfalls found during use is that 1 2 3 4 5 6 7 8 SELECT customer_id, COUNT(DISTINCT date(createdate)) - 1 AS frequency , datediff(MAX(createdate), MIN(createdate)) AS recency , datediff(CURRENT_DATE, MIN(createdate)) AS T , CASE WHEN COUNT(DISTINCT createdate) - 1 = 0 THEN 0 ELSE SUM(totaltakeoff) / COUNT(DISTINCT createdate) END AS monetary_value FROM orderdb.

Computer C drive space space cleaning method

The current computer in hand is a solid state drive + mechanical hard drive. The real capacity of the 128G solid state drive is 117G, which is not enough to use, so here is some experience of cleaning up the C disk space. Clean up the C drive using the tool Tools you can use: 360, CCleaner, Dism The advantage of the tools is that they can quickly help you analyze which files can be deleted and automatically delete them for you.

Use progressive JPEG to enhance user experience

Today I learned that there are two ways to save JPEG files they are Baseline JPEG (standard) and Progressive JPEG (progressive). Both formats have the same size and image data, and their extensions are the same, the only difference is that they are displayed differently. Differences between Baseline JPEG and Progressive JPEG Baseline JPEG This type of JPEG file is stored in a top-to-bottom scan, saving each line sequentially in the JPEG file.

How to choose a Linux distribution for your desktop/server

Linux is a pre-integrated Linux operating system and various application software for the average user. Linux distributions usually contain applications including desktop environments, office packages, media players, databases, etc. These operating systems usually consist of the Linux kernel, as well as a large library of functions from the GNU Project, and an X Window-based graphical interface. Some distributions do not come with X Window pre-installed due to capacity size, and

Session, Cookie, LocalStorage and SessionStorage

What is Session? In the field of computer science, and especially in networking, session is a persistent network protocol that creates an association between the user (or user agent) side and the server side, thus serving as a mechanism for exchanging packets, and session is a very important part of network protocols (e.g. telnet or FTP). In transport protocols that do not contain a session layer (e.g. UDP) or that

Ubuntu Server 20.04 WordPress environment installation and configuration

The blog was previously deployed on Ali cloud and was about to expire, so I migrated the server to Tencent cloud for the Double 11 event. At the same time, we intend to change the operating system for deployment, and replace the original CentOS 7.4 with Ubuntu 20.04 LTS. The rest of the environment is basically the same, still using Nginx + MariaDB + phpMyAdmin + Let’s Encrypt as before,

Private Git server build: Gogs/Gitea

Git is a version control system developed by Linux Torvalds and is being used by a large number of developers around the world today. Many companies like to use GitHub, which is based on Git version control, and GitHub is now the largest code hosting site in the world. Many large companies are now migrating their code to GitHub. GitHub is a great service, but it has some limitations, one of which is that it doesn’t offer private hosting of code as a free service.