Publications
To Establish Control of the Windows SDK Programming
I. Overview
Control is a child window, they are already defined window class, so there is no need to register, do not need to write the message processing function.
WM_CREATE message in the main window, create a child window can be.
Second, the instance
/ / Parameters: window handle, message, message parameters, message parameters
LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
/ / Handle messages of interest switch (message)
{
case WM_CREATE:
CreateWindow (TEXT ("BUTTON"), / / ??control class name "
TEXT ("& button (A)"),
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 10, 10, 100, 100, hwnd, (HMENU) 1000,
/ / ??control ID
((LPCREATESTRUCT) lParam) -> hInstance, / / ??instance handle
NULL);
return 0;
case WM_DESTROY:
/ / When the user closes the window, the window is destroyed, the end of the need,
send exit message to exit the message loop PostQuitMessage (0);
return 0;
}
/ / Other messages to the default processing functions provided by the return ::
DefWindowProc (hwnd, message, wParam, lParam);
}
typedef struct tagCREATESTRUCT {
LPVOID lpCreateParams;
HINSTANCE hInstance; / / instance handle HMENU hMenu;
The HWND hwndParent;
int cy;
int cx;
int y;
int x;
LONG style;
The LPCTSTR lpszName;
LPCTSTR lpszClass;
DWORD dwExStyle is;
} CREATESTRUCT, * LPCREATESTRUCT;
Fourth, control and collaboration of the parent windowThird, on the WM_CREATE message
The WM_CREATE lParam parameter will be passed into a set-up information structure pointer (LPCREATESTRUCT). The structure contains some useful information (when the window to create a parameter).
Ubuntu Install Firefox, and Create A Shortcut
We’ll see how to download Firefox for Ubuntu by following the steps below.
1) Download Firefox
2) tar-xvf firefox-3.6.3.tar.bz2
3) mv firefox / opt
4) cd / usr / share / applications
5) sudo touch firefox.desktop
6) the sudo nano firefox.desktop, editorial content
[Desktop Entry]
Name = Firefox
Comment = this is firefox
Exec = / opt / firefox / firefox
Icon = / opt/firefox/icons/mozicon128.png
Terminal = false
Type = Application
Categories = Application; Network;
Linux Network Configuration Commands
Under Linux NIC naming rules: eth0, eth1. First Ethernet card, and the second block. lo is the loopback interface, its fixed IP address is 127.0.0.1, mask 8. It represents your machine itself.
Ifconfig is the view card information
ifconfig [Interface]
The interface is optional, and if not this information is displayed for all network cards in the system. If you add this option to display the specified card information.
For example; ifconfig eth0

How to Apply Resource Limits Via limits.conf for a Docker Container
There are several ways in which resource limits can be applied to the docker container. Majorly below 3 ways can be used to set resource limits globally or individually for each container.
Setting Global limits for all containers
1. In docker 1.6 or later, we could set ulimit in /etc/sysconfig/docker as:
# vi /etc/sysconfig/docker
OPTIONS='--insecure-registry=172.30.0.0/16 --selinux-enabled --default-ulimit nproc=1024:2048'
This will set a soft limit of 1,024 and a hard limit of 2,048 child processes for all containers.
How to Configure Openfiles Limit for Docker Containers
The Ask
From the docker host (CentOS 7) is possible to see that the open files limit is set to 1024.
# ulimit -a | grep open
open files (-n) 1024
But the docker container has this limit set to 1048576
[root@e86ee2f0f6a0 /]# ulimit -a | grep open
open files (-n) 1048576
Is it possible to change this value for the docker containers?
The Answer
The open files limit is set by default to 1048576. This limit is not related to the host’s limit. There are 2 possible way how to change this limit: