Some rooms have three operations: one is continuous room occupancy, and the other is continuous room vacancy, the third is to ask how long the longest consecutive room is.Idea: it is obviously the question of the Line Segment tree. lazy thought is used in the middle. A difficult question, which requires careful consideration. The key to this question is that after lazy is used to update down, the information of the parent node needs to be changed based on the information of the child node. That
[Root_start_block_pos];
function log
function Getint4d ($data, $pos)
{
$value = Ord ($data [$pos]) | (Ord ($data [$pos +1]) if ($value gt;=4294967294)
{
$value =-2;
}
return $value;
}
Class Oleread {
var $data = ';
function Oleread () {
}
function Read ($sFileName) {
Check if file exist and is readable (Darko Miljanovic)
if (!is_readable ($sFileN
data item structure is saved in the Linux list, which can be accessed by the Hlist_entry macro through Hlist_head members to the node data that is its owner.2> Interface:Hlist_entry (Ptr,type,member)Ptr:ptr is a pointer to the Hlist_head member in the data structure that stores the address value of the linked list in the data structure.? Type: Is the type of the data structure.Member: Change the variable name of the Hlist_head member in the data item type definition.Implementation of 3GT;HLIST_
by the Hlist_entry macro through Hlist_head members to the node data that is its owner.2> Interface:Hlist_entry (Ptr,type,member)Ptr:ptr is a pointer to the Hlist_head member in the data structure that stores the address value of the linked list in the data structure.? Type: Is the type of the data structure.Member: Change the variable name of the Hlist_head member in the data item type definition.Implementation of 3>HLIST_ENTRY macro#define Hlist_entry (PTR, type, member) \Container_of (PTR, t
previous blog "the byte alignment of the little secrets in C language". I will not explain it too much here, if you do not understand it, you can go back and read it again. Through (unsigned long) ( (type *) 0)-> member), we get the offset of the member variable member, and PTR is the pointer to member, because of the different pointer types, we need to first convert (char *) before computation. Therefore, we use PTR to subtract the offset of member to get the pointer of the host struct. This i
the Hlist_entry macro The Hlist_head members are able to access the node data of all of its people.2> Interface:Hlist_entry (Ptr,type,member)Ptr:ptr is a pointer to the Hlist_head member in the data structure that stores the address value of the linked list in the data structure.Type: Is the kind of the data structure.Member: Variable name of the Hlist_head member in the data item type definition.Implementation of 3>HLIST_ENTRY macro#define Hlist_entry (PTR, type, member)Container_of (PTR, type
)Ptr:ptr is a pointer to the Hlist_head member in the data structure that stores the address value of the linked list in the data structure.Type: Is the kind of the data structure.Member: Variable name of the Hlist_head member in the data item type definition.Implementation of 3GT;HLIST_ENTRY macro#define Hlist_entry (PTR, type, member)Container_of (PTR, type, member)HLIST_ENTRY macro calls the Container_of macro, see the usage of the CONTAINER_OF macro:2. Traversal operations1>function: It's ac
Function
Function prototypes
Description
constructor function
String (const char *s);
Class with C-style string S.
string (int N,char c);
Initialize with n characters c
Default constructor
Copy constructor
accessing elements
const char operator[] (int n) const;
Operator[] and at () both return the position of the nth character in the current string, but the at function provides a
payment terminal of the-m36--------------------the phone number and the outside setting of the letter Café If you are sure that the-m36-mobile payment terminal-the golden suit-is correct, please adjust the dial-up time (generally to 30-40) or adjust the modem parameters of DTMF on, DTMF off time (both to the same, generally adjusted to 80/100) and send level.In the process of using the-m36-mobile payment terminal-the golden costume-the letter Café special help
Describes the iterate over functions of a list:
1. # define list_for_each (Pos, head )/
For (Pos = (head)-> next; prefetch (POS-> next), pos! = (Head );/
Pos = pos-> next)
There seems to be nothing to say about this traversal loop
following command to create a dynamic library libpos.so with the source program POS_CONF.C (see Program 1), the detailed creation process is referred to in the article [1].# gcc-c POS_CONF.C# Gcc-shared-fpci-o libpos.so POS_CONF.O#include void Pos (){printf ("/root/test/conf/lib/n");}Program 1:POS_CONF.CThen compile the MAIN.C (see Program 2) to generate the target program POS with the following command.#
Recursive functions for calculating four mixed operational expressions Second Edition
Updated on 2007-08-28 by BILLOW3 (qq:41965573)
Note: This article in the publication of a little typesetting, if there is due to typographical code work is not normal, please write to tell us
#include #pragma warn-8060//mask compile-time possibly incorrect assignment warningAnsistring __fastcall Calc (String sexp){Computes a four mixed operation expression with no variables (supports rounding int and round r
constructor of the String class:String (const char *s); Initialize with C string sstring (int N,char c); Initialize with n characters cIn addition, the string class supports both the default constructor and the copy constructor, such as String s1;string s2= "Hello", which is the correct notation. A Length_error exception is thrown when a constructed string is too long to be expressedCharacter manipulation of the string class:const char operator[] (int n) const;const char at (int n) const;Char op
addition, the string class also supports default constructors and copy constructors, such as String s1;string s2= "Hello," which is the correct notation. A Length_error exception is thrown when the constructed string is too long to be expressed;
Character operations for string classes:
const char operator[] (int n) const;
const char at (int n) const;
Char operator[] (int n);
char at (int n);
Operator[] and at () both return the position of the nth character in the current string, but the at f
some macros commonly used in hlist:#define HLIST_HEAD_INIT { .first = NULL }#define HLIST_HEAD(name) struct hlist_head name = { .first = NULL }#define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL)#define INIT_HLIST_NODE(ptr) ((ptr)->next = NULL, (ptr)->pprev = NULL)
Only the hlist_add_before operation functions are listed below. The operation methods of other hlist linked list operation functions are similar. The parameter next in this function cannot be blank. It adds n nodes before next. The imp
I often use the string class in my daily work. When I have a bad memory, I often want to query it. To facilitate future queries, take a summary on the Internet:
Constructor of the string class:String (const char * s); // use the C string s to initialize string (int n, char C); // use n characters for C Initialization
String character operations:Const char operator [] (int n) const;Const char at (int n) const;Char operator [] (int n );Char at (int n );OPERATOR [] and at () both return the pos
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.