Which is the configuration file format? Directory + plain text file, XML, SQLite

The software will need a configuration file to support the operation of the software. At present, the common configuration file format has pure text, XML, SQLite, custom binary format, how to choose it? 1 pure text - the text of the document format that never fails is one of the doctrines of the traditional Unix philosophy, which can be seen as a great power. Most of the Unix system software configuration files are used in a pure text format. For example, /etc/inittab, /etc/fstab, httpd.conf, etc.. 1.1 advantages (1) readability to configure
read(396) comment(2)

Method for realizing the details of the structure of the external interface in the C language development function library

1 modular design requirements library interface to hide implementation details as a function library, try to reduce the coupling with the caller, is the most basic design standards. C language, as a practitioner of classic program = data structure + algorithm, in the realization of the library functions, there must be a lot of structure definition and function interfaces need to manipulate these structures. At the same time, the modular design of the program requires the interface to minimize the exposure of the details, the interface parameters as far as possible the use of basic data types, as far as possible to avoid in the parameters of the definition of the structure in the library. 2 hidden structure of the two methods to the author's superficial understanding, there are two...
read(618) comment(0)

The root of all evil: implicit function statement in C language

1 what is the implicit function of C language in the C language, the function is not necessarily to be declared before the call. If there is no declaration, then the compiler will automatically follow an implicit declaration of the rules, to call the function of the C code to generate assembly code. Here is an example: Main int (argc int, argv char**) { X double = any_name_function (); Return 0; } Simply compile the source code, and there is no error, just in the link stage because of...
read(516) comment(0)

C/C++ language variable scope: local variables, global variables, file level variables

Variables in C/C++ language are divided into global variables and local variables. The basis for this partition is the range of variables or the scope of action. 1 local variables, local variables that are defined in the {} the variables in scope in this range. Although the common local variables are defined in the function body, they can also be used to add a pair of braces to limit the scope of the variable. As shown below: F void () { X float = 0; { Int a; } Don't look down upon this problem, which is the...
read(450) comment(1)

How to update the old OpenGL program to the new OpenGL (version 3.1 and above the Profile Core) Transition to Core Profile Introduction OpenGL:

Groups of IntroductionSignificant OpenGL features were marked as deprecated when the spec 3.2 was published in December 2009 in two resulting different OpenGL profiles:. Core Profile which, contain The...
read(261) comment(0)

Systemd start graphical interface process

1 start command isolate graphical.target2 systemctl startup procedure: File: /etc/systemd/system/graphical.target From: SYSTEMd package Content: [Unit] Interface Description=Graphical Documentation=man:systemd.special (7) Requires=multi-us...
read(713) comment(0)

OpenGL side by side learning ------2 classic camera model

Actual photographic procedure 1 set the scene and adjust the camera position 3 select lens focus Focus 4 press the shutter 5 enjoy the pictures in the computer window OpenGL camera model 0 determine the location of the film 1 establish scene world coordinate system 2 determine the position and direction of the camera in the world coordinate system. 3 establishing the physical world model in the world coordinate system 4 view transformation and model transformation 5 in the camera coordinate system to determine the visual range of focus projection transformation 6 call glEnd glBegin to take pictures OpenGL camera model with actual camera...
read(632) comment(0)

OpenGL ------2 OpenGL, side by side learning view settings

State management mechanism of OpenGL The viewport and viewport coordinates concept The test set the viewport 1 mobile viewport 2 multi viewport OpenGL viewport summary 1 state management mechanism from in front of the most simple example can be seen, we almost without any configuration on color and coordinate system, OpenGL has been able to render the. This is because the OpenGL itself manages a lot of state data needed for rendering, and automatically sets the default value when the initialization. For example, the default screen color is black, this is what we see is black because the client area of a window. Op...
read(668) comment(0)

OpenGL side by side learning ------1 VS2015 simple OpenGL code set

Use the VS setup wizard to set up the Win32 application framework Initialization window OpenGL rendering environment Windows platform developed under the OpenGL program, the most commonly used or the use of VS environment, glut is not commonly used. As the "OpenGL" side by side learning begins with the first article, first set the OpenGL in the VS environment to solve problems. 1 use the VS setup wizard, the Win32 application framework to establish this step no longer say, the mouse can be completed a few points. Compile and run after the completion of the project to ensure that the project can be automatically generated. 2 initialization window OpenG...
read(857) comment(0)

How to make software bind to computer hardware

Software binding computer hardware identification is a lot of software used in the anti copy method. How to determine the unique identity of the computer hardware, however, is not a simple matter. The following methods are often used and their advantages and disadvantages. 1 computer unique identification method 1.1 CPU serial number of the present existence of the CPU almost all support CPUID instruction. This directive can not only get the basic information such as CPU manufacturers, but also can get other information about the CPU hardware, including the CPU serial number. The first thing to note is that the CPU batch number and the CPU serial number are different things, the same model of the CPU has a phase...
read(1186) comment(1)

The design of communication protocol in the application layer of a few bad experience

Last year and this year were involved in two projects, these two projects are related to the communication aspects of the program design, or Ethernet communication, or serial communication. All communication must have a communication protocol, personally think that the design of the agreement is a very serious work, need to understand the business needs and master the basic knowledge of the protocol design. But from the two projects, the design of the agreement can be said to be bad to the extreme. The following is a critique of its poor design. 1 bad design one: message format, Baotou + data + package tail and UDP different, TCP communication is a stream of communication, no news...
read(948) comment(3)

How to distinguish between char p * char, const * P const, char const * * P?

Father of Bjarne C++ in his "C++ Programming Language The" which gives a help to remember the method: Read a statement from right to left. Encounter * read to pointer. Estimated C compiler is also in accordance with this method to resolve the. Char * * p1; To pointer to char / / pointer Char **p2 const; Pointer / / to...
read(596) comment(0)

A little complaint about C++

A period of time don't write c + + code, write up and feel some strange, especially for the realization of the C + + template is not the end in mind, various problems and errors, the efficiency of the bottom let me have some regret project had used in C + + and the use of the STL. However, after all, the project has been shaped, completely down and with pure C reconstruction in time and energy has been less feasible. Choose a language, just like the choice of a lover, even if it is not very satisfactory, or to adhere to the last. Fortunately, the choice of language is only on a project, with the end of the project and the end of the love is a lifetime, it should be more carefully chosen...
read(688) comment(1)

Using Apache forwarding module to realize the reverse proxy server

The problem has come to the company's LAMP server using VirtualHost's Apache function to deploy a number of independent domain name sites. The httpd.conf configuration file in this part is as follows: # omitted independent part 80# www.xxx.com Listen Xxx@126.com ServerAdmin /var/www/xxx "DocumentRoot" Www.xx ServerName...
read(736) comment(0)

How to download VS2015 offline installation package

Into the Microsoft VS official website, download only the option to install online, there is no offline installation of the package can be downloaded directly. Before the solution is to find the package to download ISO format. There's no need to be so much trouble. Online installation of this small program, also has the function to download the package without installation. That is to execute it on the command line, and add the /layout parameter. (the official website of the help note can be found, carefully read the official website does work. Left a question. VS2015 community version is free of charge, but the need to activate the network, how to activate the network does not have it? Hope to have the experience of the same...
read(1826) comment(1)

PuTTY+Xming achieve SSH X11 forwarding

requirement analysis Experimental environment Configuration steps 1 needs analysis Some Linux programs still can not completely leave the window environment, or to leave after the operation is not convenient. Where Oracle is such a program, the majority of its tools can be executed in the pure command line silence, such as OCI, DBCA, NetCA, etc., but the work is more convenient in the graphical interface. To this end, the need to use the XServer X11 and XClient cross network operating principle for remote display. And even more convenient is that the SSHD remote protocol fully supports the forwarding of the X11 protocol...
read(1533) comment(1)

Hard disk partition UUID

Unique IDentifier Universally, is a global unique naming standards. 1 UUID the origin of the name for an object, and the name of the time and space are unique, which is a very important issue in the field of computer. There have been a lot of mature solutions, such as IP address, MAC address, DNS domain name and so on. But there is a problem with these programs, and that is the need for a central management agency to approve and unify management. This will bring two issues: (1) the need for a certain fee; (2) the number of...
read(742) comment(0)

CPU Intel name of the micro architecture

1 the origin of some time ago to online bought Kingston system specified memory (DDR3 1600 low voltage version 1.35v), 8g x 2 = 16GB. Successfully installed on the Mini Mac, fast and stable operation. Today I think so much memory used in the home of the Mini Mac is a waste, so they transferred to the T410S ThinkPad notebook. So a variety of problems, the first is to use more than 600MB of memory, Linux system automatically restart; then a good Windows7 system can not start. In...
read(1283) comment(0)

Time related commands in CentOS system

Time is the most basic part of any system. This paper describes the CentOS system and the time of the relevant orders. Basic concept Hardware clock (Clock Hardware) Hardware clock, also called the real time clock (RealTimeClock), or BIOS clock, or CMOS clock. It is located on the main board of the actual hardware equipment, generally rely on battery to maintain operation. So, even if the machine is turned off, it will keep the record of the current time, generally not very accurate. System time (Time System) System time finger...
read(994) comment(0)

Non interactive use of sqlplus

Problems in the sqlplus interface Two non interactive methods of using sqlplus 1 through the external command file 2 through the standard input Use the pipe to do the follow-up Need to pay attention to the place Sqlplus has a simple script 1 sqlplus interface is Oracle database the most important official command line client software, is a necessary tool for DBA, almost all of the management tasks can be completed. However, the sqlplus interface is not very friendly, the input command does not have the history of the command log function; the default...
read(1210) comment(0)
401 data a total of 21 pagesOne Two Three Four Five ... Next page Shadowe
    personal data
    • visit950186 times
    • Integral:Twelve thousand five hundred and forty-two
    • Grade
    • Rank:555th name
    • original287
    • Reproduced:100
    • Translation:14
    • Comments:298
    Blog column
    Latest comments