In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
-start to restore the content-
Today, I started to take notes based on the study of Linux C programming related videos. I hope I can stick to it.
1. The composition of the development environment
Editor: VI
Compiler: select GNU Candlestick + compiler gcc
Debugger: widely used gdb
Function library: glibc
System header file: glibc_header
2. Points for attention when installing Linux
You can install gcc/gdb automatically by selecting "Development tools" in "Program Development" during installation.
If you want to develop a graphical interface, you also need to choose GNOME/KDE software development.
3. IDE (integrated development environment: a tool that integrates editing, compilation, debugging and other functions)
Kylix: known as dephi under Linux
Kdevelop
RHIDE: similar to Turbo C++
4. Compiler: gcc (GNU CCompiler)
Is a multi-platform compiler launched by GNU. Here are the suffixes and interpretations of some source files supported by gcc.
C suffix c language source code file
The .h suffix is the header file contained in the program.
The .o suffix is the compiled object file
one
two
three
four
five
six
seven
eight
Example: gcc-o hello hello.c
Note: 1. Gcc compiles our source program
2. The-o option requires that the executable file that the compiler outputs to us is called hello
3. Hello.c is our source program
4. Execute. / hello and you can see the output of the program.
Check the gcc version number:
one
Gcc-version
5. Function library: glibc
Glibc is a C library that provides system access and calling functions, such as open,malloc,printf, etc.
View the version of glibc:
one
Ls / lib/libc-*
6. System header file: glibc_header
In the absence of system header files, many c programs that use system functions will not be compiled.
If users install less of these packages during installation, they will not be able to compile the c source program. At this time, you can quickly install Linux's C development language environment through the rpm package.
7. C program development process under Linux:
(1) use vi tool to edit and write source program
(2) saved as * .c
(3) use gcc to compile to binary executable file
(4). / a.out execution (when gcc does not specify an executable file name with the-o option)
(5) if there is a problem, you can use gdb to debug.
8. The first program: Hello.c
one
two
three
four
five
Int main (int args,char * * argv)
{
Printf ("Hello Linux\ n")
Return 0
}
9. C program composition
For a c program, the installation can be divided into three parts
Executable file; include file; library file
For example, the MySQL database installed with rpm:
(1) the executable file is placed under / usr/bin
(2) include files under / usr/include/mysql
(3) the library file is under / usr/lib/mysql
VMware tools is a tool that comes with virtual machine VMware Workstation. Its function is to enable users to drag files directly from the physical host to the virtual machine. If it is not installed, we will not be able to transfer files between the virtual machine and the physical machine. Here's how to install it all.
Whether you are using windows or linux, it is much more convenient to drag directly to windows when transferring files.
one
Open the terminal:
Graphical interface: it is available in the right-click menu, if not, it can be opened in the application > attachment > terminal.
Command line: it can be said that the command line runs directly on the terminal without opening it.
Then log in with the root user
Install vmware-tools
After I have installed it, go to virtual machine > install vmare tolls option, and then a dialog box will pop up with this compressed file: VMwareTools-10.0.5-3228253.tar.gz
Copy the file to the / tmp file:
Under the tmp directory:
First extract the copied file: tar zxf VMwareTools-10.0.5-3228253.tar.gz
Then, go to the extracted folder / tmp/vmware-tools-distrib: cd / tmp/vmware-tools-distrib
Run. / vmware-install.pl
After it's installed, finally, restart it.
2010-10-29 11:40:23 + 0800
->
Collection
Concat
Splice another object or array to an existing object or array
The basic ideas are as follows:
1) use JQ .getJSON () to read the JSON file, read the data read using .getJSON () to read the JSON file, read the data read using .getJSON () to read the JSON file, use .each () to loop through the data, and insert the option value as the current traversal value in the loop body.
2) the municipal level varies with the provincial level, and my approach is to read the JSON file again and use onchange () to monitor the changes in options.
3) match through KaTeX parse error: Expected 'EOF', got' #'at position 3: ("# matching province option.... (each) loop. If the match is successful, take out the" city "object in the JSON data, do another $. (each) traversal, and assemble the html code block (or insert it directly with append (), but in this case you must empty the corresponding html content at the beginning of the function).
4) insert the html code block assembled above into the html document using .html ().
My blog will soon be synchronized to Tencent Cloud + Community, and you are invited to join us: https://cloud.tencent.com/developer/support-plan?invite_code=2lv77fgyvl8gc
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.