Chapter 16
Arrays
So far in this manual, you have written programs which work with few variables. For example, consider a program which stores the details of a student and prints it out. You would create a class to represent the student. Each instance of this class stores the details of a student, therefore, you would create a variable which references a student object. What if there were four students? You would create four variables which reference four student objects. What if there were a hundred students, or even thousand? In such cases creating hundreds of variables is absurd.
A better solution would be to use a list which keeps track of the students. Zen provides a class known as an array which is similar to lists. Arrays are not a fundamental type is Zen. In this chapter you will learn about arrays, their declaration and initialization. Finally, we will learn a variation of arrays known as multdimensional arrays.
Interestingly, Zen actually includes classes which implement the full fledged behavior of lists. A particular list known as array list, which internally stores the values using arrays, is a fundamental type. It is treated specially by Zen.
+++ title = “Understanding Arrays” weight = 1 +++
An array is an object which stores a fixed number of values of the same type. It is a linear data structure, which means the values are stored in a sequence. Each value stored in an array is known as an element, item, or value.
You can store any type of value that you can store in a variable. However, you can store only one type of value once you create it. For example, if you have an array of integers, you cannot store strings in it. The type of values an array can store is known as its component type.
You can store a list of items of the same reference type in an array. Each element in an array is stored in a slot. Each slot in an array is assigned a number known as index. You can access an element with its index. An index is always positive and lesser than the size of the array.
Assume your array can store ten elements. The index number begins at 0 and ends
at 9. The first element is at index 0, the second at index 1, and so on. In any
given array, the minimum valid index is always 0 and the maximum valid index
is always n - 1
, where n
is the size of the array.
If you are new to programming, you may think in an array of ten elements, the 5th index would refer to the fifth element. This is wrong. An index numbers starts at zero, the first element is at zeroth index, the first element is at the second index, and so on. Which means the fifth index actually refers to the sixth element. Most beginners find this concept very confusing. You need to learn and practiceto grasp this concept well. In fact, most experienced programmers make mistakes with indexes, too.
Since indexes start from zero in Zen, they are also known as zero based indexes. Most programming languages use zero based indexes. Therefore, we recommend you to get used to counting from zero instead of one. If you notice the loops we designed in the earlier chapters, most of the loop control variables start from 0. With enough practice, counting from 0 becomes a habit.
When it comes to class types, an array can hold instances of the class or any
of its subclasses. Which goes to say, if you have an array of the Object
class,
you can store any object in Zen.
Further, an array itself is an object, which means you can store an array inside another array. You will learn more about this later in this chapter.
+++ title = “Working with Arrays” weight = 2 +++
In order to work with arrays you need follow these steps.
- Declare a variable to reference the array object.
- Create a new array object.
- Assign the reference of the array object to the array variable.
- Store information in the newly created array.
Declaring Array Variables
Before you start working with an array, you need to create a variable that can store a reference to the array object. You have already learnt how to create variables. Therefore, we will not waste any time revisiting the topic. You just need to know that arrays are objects, which means their reference can be stored in variables like any other object.
Creating Array Objects
After you declare the array variable, you need to create an array object and
assign its reference to the variable. You can create arrays in two different ways.
The first technique is to use the array()
function and the other is to use one
of the many constructors defined in the Array
class.
An array has a fixed size that is set when your create it. You cannot change
the size of an array after you create it. You can determine the size of an
array by using the size
property of an array object.
Using the array() Function
The array()
function accepts a list of expressions separated by commas. The
list of expressions is enclosed within parentheses. The commas separate the values
of the array elements. The array will large enough to hold the number of elements
you specify in the array initializer. With this technique, you do not have to use
the new operator.
The main advantage of this technique is, when you know the initial values of your array you do not have to write multiple statements for allocating and initializing your array.
For example, to store the days of the week you would create an array like this.
// DaysOfWeek.zen
function main(... arguments)
var daysOfWeek = array(
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday')
printf('The second day of the week is %s.\n', daysOfWeek[1])
In this example, you create an array . It consists of the days in a
week. A print statement prints the second day of the week. Notice that we used
1
as the index to access 'Monday'
. This is because array indexes start from
zero.
Using the New Operator to Allocate Array Objects
Arrays are objects in Zen. Therefore, you can use the new operator to create a
new instance of the Array
class.
Here is the general syntax of the new operator when allocating an array.
new Array(size)
Here, the size
indicates the capacity of the array, that is, the number of
elements it can store.
Here is an example of allocating an array capable of storing 7 object references.
var objects = new Array(7)
In this example, the declaration and allocation is combined in the same statement. It allocates an array with 7 slots, where you can store seven references.
When you create an array object using the new operator, you are basically creating empty slots where you can store references to objects. You should remember that allocating an array does not allocate objects in the slots. You must manually allocate objects and store their references in the array later.
In fact, when you create an array, Zen automatically initializes the slots to
null reference. The keyword null
refers to a null object and can be used
stored in any reference variable. Unlike C and C++, the null reference is not
equivalent to 0 or the null character (\0
).
You can create arrays with specific components like this:
new Array(type, size)
Here, the type indicates the component type of the array.
Take a look at this example where the allocated array can store only integers.
var marks = new Array(Integer, 10)
An array size can be zero or more. If you specify a negative size, Zen throws
the NegativeArraySizeException
.
Here is an example of allocating a negative sized array.
// NegativeArraySizeExample.zen
function main(... arguments)
var daysOfWeek = new Array(-1)
When you run this example, Zen throws an exception like this.
Exception in thread 'main' zen.core.NegativeArraySizeException: -1
at NegativeArraySizeExample.main(NegativeArraySizeExample.zen:4)
+++ title = “Initializing Array Objects” weight = 3 +++
When you create an array using the Array
class, each slot in an array contains
a default value, which is null
. Therefore, you must assign a value to each slot
before using it. There are two ways in which you can accomplish this, that is,
manually initialize each slot or specify a default value to the makeArray
function.
You will learn these techniques in this section.
Once you have allocated an array, you can access a specific element in the array
using the index enclosed in square brackets, known as the subscript operator.
An index starts at zero and extend to n - 1
, where n
is the size of the array.
Here is the general form of accessing an element in an array using the subscript operator.
identifier[index]
The identifier represents the name of the array variable. The index indicates the element slot which you want to access.
Here is an example which creates an array of three integers and assigns their respective slots.
var marks = new Array(3)
marks[0] = 40
marks[1] = 63
marks[2] = 55
Here is another version of the days of the week program we saw in the previous section.
// DaysOfWeekManual.zen
function main(...arguments)
var daysOfWeek = new Array(String, 7)
daysOfWeek[0] = 'Sunday'
daysOfWeek[1] = 'Monday'
daysOfWeek[2] = 'Tuesday'
daysOfWeek[3] = 'Wednesday'
daysOfWeek[4] = 'Thursday'
daysOfWeek[5] = 'Friday'
daysOfWeek[6] = 'Saturday'
printf('The fourth day of the week is %s.\n', daysOfWeek[3])
In this example, you create an array of String. It consists of the days in a
week. The array is manually initialized by assigning each slot. A print statement
prints the fourth day of the week. Notice that we used 3
as the index to access
'Wednesday'
. This is because array indexes start from zero.
In some situations, when you create an array using the Array
class, you may
want each slot in the array to contain a default value other than null
.
In such cases, you can use the makeArray()
function
which accepts a default value.
Here is an example an integer array whose slots are initialized to 0
.
// DefaultArrayValue.zen
function main(...arguments)
var marks = makeArray(Integer, 10, 0)
serialize(marks, System.out)
+++ title = “Accessing Array Elements” weight = 4 +++
After you have an array with initial values, you can read, modify, and test the values in each slot. The value in a slot is accessed using the subscript operator. You can write expressions like this using the subscript operator.
identifier[index] = value
Whenever you try to access an element with an index, Zen makes sure that you
are specifying a valid index. The index should always be greater than or equal
to zero and lesser than the size of the array, known as the arrays boundaries.
Unlike C and C++, in Zen you cannot access a slot outside the array’s boundaries.
In case you try to access an element outside the arrays boundaries, Zen will
throw and InvalidArrayIndexException
.
Here is an example which triggers an InvalidArrayIndexException
.
// InvalidDayOfWeek.zen
function main(...arguments)
var daysOfWeek = new Array(String, 7)
daysOfWeek[0] = 'Sunday'
daysOfWeek[1] = 'Monday'
daysOfWeek[2] = 'Tuesday'
daysOfWeek[3] = 'Wednesday'
daysOfWeek[4] = 'Thursday'
daysOfWeek[5] = 'Friday'
daysOfWeek[6] = 'Saturday'
printf('The seventh day of the week is %s.\n', daysOfWeek[7])
This example produces the following output.
Exception in thread 'main' zen.core.InvalidArrayIndexException: The specified index 7 is invalid for an array of size 7.
at InvalidDayOfWeek.main(InvalidDayOfWeek.zen:12)
Since the size of the array is 7
, the last valid index is 6
. In this example,
the program tried to access the slot at index 7
, which is invalid index.
This is why Zen throws an InvalidArrayIndexException
.
Every array object exposes a property called size
. You can use this to determine
the size of an array. Note that this property is immutable, which means the runtime
will throw an exception if you try to modify it.
+++ title = “Understanding Multidimensional Arrays” weight = 5 +++
In Zen all arrays are objects, which means you can store an array inside another array. Such an arrangment of arrays allows you to create multidimensional arrays.
The two dimensional array is very common compared to other higher dimensional arrays. A common use of a two dimensional array is to represent data in grids, such as cartesian planes and matrices.
Here is an example of a two dimensional array.
var matrix = new Array(Integer, 5, 10)
This example allocates an array with 5 slots in the first dimension. After which, 5 arrays of size 10 are created and assigned in each of those slots. Which means, there are 50 slots in the array, organized in two dimensions.
Here is an example program, which prints the layout of the two dimensional array.
// TwoDimensionalArrayExample.zen
function main(...arguments)
var matrix = new Array(Integer, 5, 10)
var k = 0
for var i in range(0, matrix.size)
for var j in range(0, matrix[i].size)
matrix[i][j] = k
k += i
for var i in range(0, matrix.size)
for var j in range(0, matrix[i].size)
printf('%d\t', matrix[i][j])
print()
This example produces the following output.
0 1 2 3 4 5 6 7 8 9
10 11 12 13 14 15 16 17 18 19
20 21 22 23 24 25 26 27 28 29
30 31 32 33 34 35 36 37 38 39
40 41 42 43 44 45 46 47 48 49
Zen allows you allocate memory for the first n
dimensions. You can allocate
other dimensions later.
Here is an example which demonstrates this technique.
var array = new Array(Integer, 3)
array[0] = new Array(Integer, 4)
array[1] = new Array(Integer, 8)
array[2] = new Array(Integer, 2)
In this example, you allocate memory for the first dimension of the array. Then you manually allocate the second dimension. The main advantage of this technique is that it allows you to create different sized arrays in a given dimension. Arrays with such layout are known as jagged arrays.
Here is a modified version of the earlier program which prints the layout of an unevenly distributed multidimensional array.
// JaggedArrayExample.zen
function main(...arguments)
var array = new Array(Integer, 3)
array[0] = new Array(Integer, 4)
array[1] = new Array(Integer, 8)
array[2] = new Array(Integer, 2)
var k = 0
for var i in range(0, array.size)
for var j in range(0, array[i].size)
array[i][j] = k
k += i
for var i in range(0, array.size)
for var j in range(0, array[i].size)
printf('%d\t', array[i][j])
print()
The output of this program is shown here.
0 1 2 3
4 5 6 7 8 9 10 11
12 13
Unevenly distributed multidimensional arrays are not very common. This is usually not how multidimensional arrays are designed. However, irregular arrays are useful in some cases.
+++ title = “Iterating Over Array Elements” weight = 6 +++
So far, you have learnt how to access array elements manually. In most cases, you will automate this process with a loop. You will often encounter code which iterates over the elements of an array. You will learn about this technique in this section.
Traversing with While Loop
Here is an example of iterating through the elements of an array using a while loop.
// ArrayTraversing.zen
function main(...arguments)
var daysOfWeek = array(
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday')
var i = 0
while i < daysOfWeek.size
print(daysOfWeek[i])
i += 1
Here, the loop control variable i
serves two purposes here. One, it is used to
control the repetition of the loop and the other is to automate the generation of
indexes. As you can see, i varies from zero to daysOfWeek.length - 1
, which is
indicated by i < daysOfWeek.length
. Since array indexes start from zero and
end at n - 1
, where n is the length of the array, this allows you to use the
variable i
as an array index. Thus, the elements of the array are read in a
strictly linear fashion, from the start to end.
Here is an example program which shows how i
varies in the while loop.
// IndexGenerationExample.zen
function main(...arguments)
var daysOfWeek = array(
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday')
var i = 0
while i < daysOfWeek.size
print(i)
i += 1
This program generates the following output.
0
1
2
3
4
5
6
Traversing with For Loop
The for loop is designed to iterate through a collection of objects, such as arrays and lists.
The general form of the enhanced for statement is shown here.
for var identifier in iterable
statement
Here, var
is optional and its inclusion indicates an inline declaration of a
variable. The variable identified by the specified identifier
is referred to
as the iteration variable. Its importance is explained shortly. The iterable
part represents an expression that must evaluate to an object whose type extends
the Iterable
class or at least implements the getIterator()
function.
The for statement first evaluates the expression specified by the iterable part and retreives an iterator for the given iterable. In other words, the iterable specifies a the iterator source whose elements are supposed to be processed. In each iteration, an element from the iterable is retrieved through the iterator and stored in the iteration variable. The loop repeats until all elements in the collection have been processed. Further, you can force the loop to stop with break, throw, and return statements as usual.
An iterable is an object that returns an iterator. Iterable objects can be seamlessly
traversed with for statements. Interestingly, iterators are iterable objects, too!
Iterators return a reference to themselves in their respective getIterator()
functions. Which means iterators can be used directly in for loops without being
wrapped with decorator objects.
In fact, the range()
function returns an instance of the IntegerRangeIterator
class. To the state the obvious, this class extends the Iterator
class which
makes its instances iterators. If iterators were not iterables, you would not be
able to use the range()
function with for loops directly.
There are various types of objects in Zen that can be used with the for statement. In this section, we will show you to loop through an array. Please refer the Zen API documentation for more information.
Here is an example of iterating through the elements of an array using the for loop.
// TraversingArray2.zen
function main(...arguments)
var daysOfWeek = array(
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday')
for var dayOfWeek in daysOfWeek
print(dayOfWeek)
This example is simpler than the example shown earlier, which used an index. You can always use the for loop whenever you do not need an index or your iteration is always strictly linear. In all other cases, you need to use the while statement.
Here is another example of iterating through the elements of an array using the for statement.
// ArrayTraversing3.zen
function main(...arguments)
var daysOfWeek = array(
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday')
for var i in range(0, daysOfWeek.length)
print(daysOfWeek[i])
This example produces the following output.
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
In this example, we created an array of strings, which stores the days of a week.
We use a combination of the for loop and range()
function to iterate over the
array elements and print them on the console.
+++ title = “Iterating Over Multidimensional Arrays” weight = 7 +++
You can either use the for statement or the while statement for traversing multidimensional arrays. You need to remember that multidimensional arrays consist of arrays of arrays. When you use loops to iterate over multidimensional arrays, the easiest way is to use nested loop statements. This is important when iterating over a multidimensional array, because each iteration retrieves the next array dimensions, until you reach the last dimension.
In general, you will have k
depth of nested loop statements, to iterate over an
array of k
dimensions, because you will have k - 1
array objects, here 1
represents the last dimension where values are stored.
For example, you will need two for statements nested to iterate over an array of 2 dimensions. You will use the outer loop to retrieve an array object and the inner loop to retrieve the values.
Similarly, you will need three for statements nested to iterate over an array of 3 dimensions. You will use the outer loops to retrieve the array objects, each loop statement unwraps a dimension. You will use the inner-most loop to retrieve the values.
// Traversing2DArray.zen
function main(...arguments)
var matrix = array(
array(10, 20, 30),
array(40, 50, 60),
array(70, 80, 90))
for var i in range(0, matrix.length)
var row = matrix[i]
for var j in range(0, row.length)
printf('%d\t', row[j])
print()
The output of this example is shown here.
10 20 30
40 50 60
70 80 90
In this example, a two dimensional array is used to represent a matrix. The first dimension contains the rows of the matrix. Each row is simply the second dimension of the array.
Like we said earlier, the outer most loop unwraps a dimension. In this example, the outer most loop unwraps a dimension which gives us the matrix row. Then we iterate over the row and print the elements.
Notice how print()
and printf()
are used. The print()
method prints
a newline character whenever it prints something. Whereas, the printf()
method
does not print any newline character. With this concept in mind, we print a new
line only at the end of a row. Thus, we format the output to represent a matrix.
Here is another example of traversing a two dimensional array using a while loop.
// Traversing2DArray2.zen
function main(...arguments)
var matrix = array(
array(10, 20, 30),
array(40, 50, 60),
array(70, 80, 90))
var i = 0
while i < matrix.length
var row = matrix[i]
var j = 0
while j < row.length
printf('%d\t', row[j])
j += 1
print()
i += 1
The output of this example is shown here.
10 20 30
40 50 60
70 80 90


CRIME STORY A film review by Chuck Dowling Copyright 1997 Chuck Dowling
Crime Story (1993) ***1/2 out of ***** - Cast: Jackie Chan. Directed by: Kirk Wong. Running Time: 103 minutes.
Being released officially for the first time in the US, "Crime Story" won't disappoint most fans of Jackie Chan... mainly those of us who first gained knowledge of him when "Rumble in the Bronx" was released to theaters in 1995.
"Crime Story" isn't as light in its tone as "Rumble in the Bronx" was, but that's not much of a distraction. The plot involves a wealthy real estate developer being kidnapped by corrupt police officials, and Detective Jackie Chan hunts them down. Chan's character's name actually is Jackie Chan in this one, although I wonder if that was also the character's name in the film's initial release.
Now fans probably can care less about the plot, as I do, because it's usually just an excuse to fill time between the action sequences. But the plot is compelling enough, and easy to follow. And the action sequences and stuntwork are, as always, incredible. There isn't as much hand-to-hand fighting as in other Chan films, but there are plenty of excellently staged shoot-outs and car chases.
There are a couple of drawbacks. The guy who's been taken hostage is just as crooked in his own way as the men who kidnapped him, so who really cares if he gets rescued? Also, the main villain is this big fat guy, so you pretty much know there's not going to be a fantasic fight sequence between these two at the end. Also, I wish Dimension/Miramax Films could spend just a tiny bit of money and get some actors to dub the voices convincingly. Sometimes, ridiculous dubbing works for the film when it's a comedy, like Chan's "My Lucky Stars". But when the tone of the film is meant to be serious, as "Crime Story" is, some effort should be made to make the dubbed voices seem appropriate.
"Crime Story" has nothing tremendously special, but it is still better than most American action movies these days. I only wish Chan's films could be re-released a little quicker here in the US. [R]
-- Chuck Dowling Visit Chuck's Movie Reviews at http://users.southeast.net/~chuckd21/ Over 1,600 movies rated and/or reviewed! Movie news, film related links, and reader's reviews.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


The Golang operation EXCEL library for columns and cell supports data validation (drop-down list, numeric text length check)
completed function
1. Cell, column support drop-down list selection
2. Cell, column support range check
3. Open Excel support cell, column data check read
Items to pay attention to
1. Excel data validation supports setting the length of the check character to 255,
2. Excel is not supported as a check condition by selecting cells in the workbook
1. remise
Recently used in Golang development projects used excel import, export. Data export is no problem, just write excel on the line. However, importing templates has encountered some problems.
Questions are as follows:
1. The data in db is defined as a string. If the field is filled with numbers, the field is a number when the data is acquired. The backend conversion is required.
2. Enumerate the type fields, fill in too difficult. Users need to know the corresponding value
3. The field range value, fill in more difficult, (such as user, type, etc.)
3 can not limit the length of the field to fill in the content
4. Cannot limit the range of numbers
Why not directly put an excel file, the data in the project is imported, the export field is not fixed, you need to import according to the personal configuration real field, export
2. Golang EXCEL Class Library Selection
After the Internet search found two more use now more golang operation excel class library
In most cases, xlsx is selected, and xlsx is more in star and fork than excelle. However, excelize is more active in recent activity and the document is more detailed (in Chinese)
3. Use EXCEL data validation
In the use of xlsx, there is no problem with basic functions, but when doing advanced functions, it is found that many advanced functions do not have time, and some implementations are too rude. The data verification function is not implemented at all. Originally wanted to copy excelize the code, and found that they did not achieve, still lying in the todo list. Helplessness can only be implemented on xlsx itself.
Now it’s simple and crude to implement the list of excel data validation, rang validation (time, date need to be converted to numbers, now unimplemented) has confirmed that available data validation has list (display dorp box), rang (number, decimal, text length ), User input will be prompted for incorrect content.
An example of a test code for data validation is at data validation test code You can go test to view the production excel content.
4. Need to prepare for the development of EXCEL
Excel is a zip file described by openxml. The files in the office are all similar. Microsoft has published the document.
tool: Open xml sdk 2.0 tool, can view the openxml code of excel file, provide verification, documentation, generate code function (not golang)


Geode’s DataSerializable
interface gives you quick serialization of your objects.
Data Serialization with the DataSerializable Interface
Geode’s DataSerializable
interface gives you faster and more compact data serialization than the standard Java serialization or Geode PDX serialization. However, while Geode DataSerializable
interface is generally more performant than Geode’s PdxSerializable
, it requires full deserialization on the server and then reserialization to send the data back to the client.
You can further speed serialization by registering the instantiator for your DataSerializable
class through Instantiator
, eliminating the need for reflection to find the right serializer. You can provide your own serialization through the API.
The recommended way to register your custom Instantiator
is by specifying it in the serialization-registration
element of cache.xml.
For more information, see the online Java documentation for DataSerializable
and DataSerializer
.
Example cache.xml:
The following provides an example of how to register an instantiator using cache.xml.
<serialization-registration>
<instantiator id="30">
<class-name>com.package.MyClass</class-name>
</instantiator>
</serialization-registration>
In addition to speeding standard object serialization, you can use the DataSerializable
interface to serialize any custom objects you store in the cache.
Serializing Your Domain Object with DataSerializer
You can also use DataSerializer
to serialize domain objects. It serializes data in the same way as DataSerializable
but allows you to serialize classes without modifying the domain class code.
See the JavaDocs on DataSerializable and DataSerializer for more information.


Middendorp annoyed by Khune's medical update
Cape Town - Kaizer Chiefs coach Ernst Middendorp says he is frustrated that the medical team gave the all clear for Itumeleng Khune to return to action.
Middendorp stated last week that Khune wouldn't be available for selection ahead of the Telkom Knockout semi-final against Maritzburg United, which Chiefs went on to lose, but a day after the coach's statement Chiefs' media department contradicted him and declared the goalkeeper as fully fit.
The German tactician has grown irritated by this and insists there is a big difference between being fully recovered from an injury and being fully fit to play.
"Let me give you an example, I went for surgery - nobody knows; a knee operation. Okay, that was now last Tuesday - 14 days ago," said Middendorp, according to KickOff.
"Excellent work done; I had now, after two weeks, a final meeting with the specialist on Monday and he said, '100%, medically you're fit.'
"But, he said, 'Now, be careful. Step by step, building it up. Don't turn around; don't kick the ball. Just be careful step by step.'
"Medically I'm fit, but not in a way that I can run around and do stuff. This is the same thing that has happened with certain players.
"I know, it's really something I'm not happy about [the club] pumping it into the public. Most of the time this 'medically fit' piece of expression is forgotten.
"If you read it, 'the player is fit', but he's not - by far. He comes just out of a situation where he joined the training and put himself in a physically good condition to be competitive at a certain time, and in the moment he is not.
"I don't see it coming now with a view to the next game, and that is the only thing I'm interested in."
- TeamTalk Media


Gunnar Grosch
Gunnar is Cloud Evangelist at Opsio based in Sweden. He has almost 20 years of experience in the IT industry, having worked as a front and backend developer, operations engineer within cloud infrastructure, technical trainer as well as several different management roles. Gunnar’s favorite subjects are serverless and chaos engineering.
Talk: Performing chaos in a serverless world
The principles of chaos engineering have been battle-tested for years using traditional infrastructure and containerized microservices, but how do they work with serverless functions and managed services? Join as we move from talking about principles to performing real chaos in a serverless world!
Back to the agenda


BOXES BOXES!!! and more BOXES
- Webpages are broken into boxes. This even includes elements that do not look rectangle. You can take any website and start sectioning it out into boxes to understand the layout. Many times there are boxes inside of boxes.


Hamster Is Bringing Konami's Hyper Sports To The Switch eShop Next Week
On your marks, get set, go!
by Liam DoolanHamster is next week releasing Konami's 1984 title Hyper Sports on the Switch eShop for $7.99 / £6.29. The title arrives on 28th November and will allow up to four players to participate in seven events. These sports include swimming, skeet shooting, long horse, archery, triple jump, weight lifting, and pole vaulting.
As with all Arcade Archives releases, this one will faithfully reproduce the "atmosphere" at the time fo the original release and allow players to compete against high scores from all over the world.
This next Hamster title follows on from this week's release In The Hunt – known in Japan as Kaitei Daisensō – which is one of Irem's most-loved shooters and was originally released in 1993. Below are some screens of Hyper Sports:
Will you be adding Hyper Sports or In The Hunt to your Switch HOME Menu? Comment below.
[via japanesenintendo.com, gonintendo.com]


Hello! My name is Raphael.  Here are some things we can talk about if we ever meet:
- technology
- making things
- Europe
- TV sitcoms
- Olin College
- robots
- the Midwest
- art
- hiking
- sports
- chick flicks
- guitar
- food
What does your list look like?


Algae blooms occur when an abundance of nutrients cause a rapid increase in the populations of cyanobacteria in a body of water. This process is known as eutrophication, and is typically caused by runoff from chemical manufacturing or farming. The primary elements that cause this are Phosphorous and Nitrogen, which are typically found in waste products from chemical manufacture and fertilizers used in industrial or large scale farming. An algae blooms has two major stages, each with their own negative effects.
The most obvious part of an cyanobacterial bloom is the bloom itself, as many cyanobacteria produce toxins that negatively affect mammals such as dogs, cats, and humans. These toxins can range from slow acting toxins such as microcysting, to immediately effective neurotoxins such as Anatoxin-A.
Because these toxins can have extremely negative effects on people, never go into water that is affected by an algae bloom.
After a cyanobacterial bloom dies down, the resulting biomass will decompose, with nearly all the cyanobacteria dying simultaneously. This causes two effects: firstly, the death of cyanobacterial cells causes them to immediately release the toxin into the surrounding area; although most of the extremely potent toxins have relatively short biological half-lives, this still is quite dangerous. Secondly, the resulting dead biomass will decompose, pulling extremely large amounts of oxygen out of the body of water, often resulting in mass suffocation of fish and other water-breathing animals.
When dealing with a problem that affects an entire lake, it is important to ensure that the entire ecosystem surrounding it is taken into account. Because of this, it is likely unfeasible to use herbicides or other chemical solutions due to either cost and volume of material that is needed to be effective, or because it would have significant negative impacts on benign and native plant life. Furthermore, physical removal is out of the question for all but the absolute smallest of lakes, as the amount of algae that can be infesting a body can measure in the hundreds of tons of solid matter, meaning that it is impossible to remove all of it by hand. Because of these constraints, we came to a new solution: use existing forms of life that naturally can consume cyanobacteria to clean for us, allowing a constant, passive reduction in the overall amount of harmful algae.
After doing significant amounts of research, we came to the conclusion that the Daphnia genus would be the best candidate for this for two main reasons: They are present in nearly every freshwater resevoir, therefore eliminating the issue of invasive species introduction, and they are capable of surviving on cyanobacteria regardless of their toxins. Added to this is the benefit of easy production, with Daphnia being extremely easy to breed and acclimate to new conditions - meaning that they are perfect for use in a variety of locations, from warm areas such as Texas to significantly colder areas such as the northern United States and Canada.


Here you'll learn about the wonderful person known as Wade.
I am a 16 year old sophomore at JCS.  I have many hobbies that I'll discuss on another page, but here I-ll give an overview. I enjoy the outdoors, wildlife photography, travel and old music. There are many interesting things to learn about me and I hope you enjoy!


{% extends "index.html" %} {% block body %}
membrANM is a suite of tools for investigating the global structural dynamics of transporters and other membrane proteins.
membrANM can be used for
membrANM tutorial files can be obtained from Getting membrANM.
Reference
Lezon TR, Bahar I
Constraints Imposed by the Membrane Selectively Guide the Alternating Access Dynamics of the Glutamate Transporter GltPh
2012 Biophys J 102(6):1331-1340.
Zhang Y, Zhang S, Xing J, Bahar I
Normal mode analysis of membrane protein dynamics using the vibrational subsystem analysis
2021 J Chem Phys 154(19):195102.


|
assessmentDuration()
|
Compute the average and total time for the surveys |
|
isInterviewTooShortForTheHouseholdSize()
|
Check that the duration relative to the household size of each interview is more than a threshold |
|
assessmentDurationOutliers()
|
Report the outlier durations for the surveys |
|
enumeratorIsLazy()
|
Check the enumerators who pick up less than X answers per specific question |
|
surveyOtherValues()
|
List of other distinct values (not missing) per fields other with count |
|
isInterviewCompleted()
|
Check that all interviews were completed |
|
isInterviewWithConsent()
|
Check that all surveys have consent |
|
surveyOutliers()
|
Report the outlier values for all numerical field |
|
surveyBigValues()
|
Report the values greater than a specified value per specified fields |
|
surveySmallValues()
|
Report the values lower than a specified value per specified fields |
|
surveyMissingValues()
|
Report the percentage of missing values (NA) per fields |
|
surveyDistinctValues()
|
Number of distinct values (not missing) per fields |
|
enumeratorErrorsDashboard()
|
Create a dashboard dislplaying the number of errors by enumerators |


interface ConfigurationWithOptionsContainer
Helper interface to mark objects that will have ConfigurationWithOptions in them.
abstract val configurationWithOptions: ConfigurationWithOptions


Bread curd fire roll. Stuffing with rolls deep fried till crisp.
Cute mini rings tarts with an oreo crust, green peas ganache filling and fresh tomato and capcicum on top.
Chunks of paneer marinated in spices and grilled in a tandoor. It is severed with spring onions and with red sauce.
Veggie Fingers a mixed vegetable mixture shaped into fingers, dipped in refined flour batter, rolled in breadcrumbs and deep fried.
It is one such ingredient that you can easily find in dairy shops and grocery shops as well, however, nothing can beat the fresh paneer made at home.
This Mili Juli Sabzi is a very similar recipe to mix veg sabzi, but has some good amount of influence from South parts of India.
Soya chunks and vegetables coated with spicy yogurt, strung onto satay sticks, shallow fried and cooked in a tasty gravy.
These are delicious melt in the mouth paneer kofta in a creamy, rich, mild and lightly sweet onion tomato based gravy.
It is plain tawa roti. In other words we can say it chapatti.It is made up of multigrain atta.
This is Tandoori roti. It is made in tandoor and served with the amul butter.
This is our special Naan. Filled with Potato, garlic and green chilli.
This is our best seller Parantha filled with Coriander and paneer. And served with amul butter.
It is filled with chocolate and gem.It is crunchy and so yummy in taste.
It is filled with chocolate and gem.It is crunchy and so yummy in taste.
This is our special Naan. Filled with Potato, garlic and green chilli.
This is our best seller Parantha filled with Coriander and paneer. And served with amul butter.


Selected range start
Selected range end
NOTE:
We set the
gsAction
in xp.js to " " instead of "" so that the mouse cursor will switch to hand when hovering over the dates.
Copyright© 2003-2007 Idemfactor Solutions, Inc. All rights reserved.


Middendorp Distances Himself From Chiefs History
by Soccer LadumaKaizer Chiefs coach Ernst Middendorp stopped short of distancing himself from the club’s current trophy drought, though he was already in charge when the Glamour Boys failed to beat TS Galaxy in the Nedbank Cup final last season.
Read: Rulani: If Anyone Is Still Questioning
Middendorp is again edging ever closer to bringing a trophy to Naturena, having led Chiefs to victory over their bitter rivals Orlando Pirates to progress to the semifinals of the Telkom Knockout later this month.
But the German born mentor said he was not getting carried away, and neither was he thinking too much about the past.
“I have nothing to do with the past five years. I came in during the December 2018 and I have only been here for 11 months,” Middendorp, who is in his second stint as Chiefs coach, told reporters after the Pirates win.
“We certainly had some changes to make and there was a clear target to do better, much better. We worked on it, and at the moment I am not dreaming, but thinking already about Chippa United (tomorrow night).”
Read: Defiant Rulani: The Reality Is This...
Post Selfie’s On Soccer Laduma’s Social Media App & Earn Airtime and more! Download Now


Kasino is a Scorecard for the card game of Kasino as it is played in Denmark. Kasino is probably only of interest for Danes. Nevertheless, an english version is supplied. Both versions contains the full rules of Kasino.
If you would like to localize Kasino to another language, Drop me a mail.
Kasino runs on any Palm OS 2.0 or better device.
Changelog:
v1r2 (2003-06-03) Added backup bit to databases. Databases will now be backed up to your desktop PC during hotsync. v1r1 (2002-11-26) Initial release


后台管理模板
网站功能
滑动图管理
滑动图管理
添加滑动图
资讯管理
资讯管理
新建资讯
资讯分类管理
新建资讯分类
用户管理
Tables
Table Dynamic
admin
Profile
50%
Settings
Help
Log Out
6
John Smith
3 mins ago
Film festivals used to be do-or-die moments for movie makers. They were where...
John Smith
3 mins ago
Film festivals used to be do-or-die moments for movie makers. They were where...
John Smith
3 mins ago
Film festivals used to be do-or-die moments for movie makers. They were where...
John Smith
3 mins ago
Film festivals used to be do-or-die moments for movie makers. They were where...
See All Alerts


"JOAH" Jehovah his brother; i.e., helper. (1.) One of the sons of Obed-edom (1 Chronicles 26:4), a Korhite porter. (2.) A Levite of the family of Gershom (1 Chronicles 6:21), probably the same as Ethan (42). (3.) The son of Asaph, and “recorder” (q.v.) or chronicler to King Hezekiah (2 Kings 18:18, 26, 37). (4.) Son of Joahaz, and “recorder” (q.v.) or keeper of the state archives under King Josiah (2 Chronicles 34:8).
"JOAH" Jehovah his brother; i.e., helper. (1.) One of the sons of Obed-edom (1 Chronicles 26:4), a Korhite porter.
(2.) A Levite of the family of Gershom (1 Chronicles 6:21), probably the same as Ethan (42).
(3.) The son of Asaph, and “recorder” (q.v.) or chronicler to King Hezekiah (2 Kings 18:18, 26, 37).
(4.) Son of Joahaz, and “recorder” (q.v.) or keeper of the state archives under King Josiah (2 Chronicles 34:8).


Konn - Assistant Director
A Gun & A Ring - Best Boy (1st Assistant Lighting & Grip)
The Life of Daniel Video Short - Producer
Adae - Cofounder/Developer
Imagemoji - Fullstack Developer
Mixed Results - Junior Front End Developer
CareShare - Bitmaker Labs Final Project


Motorbike convoy follows Harry Dunn’s last ride
Hundreds of bikers paid tribute to British teenager Harry Dunn by tracing the route he took before he was killed in a collision.
A motorbike convoy paid tribute to British teenager Harry Dunn by tracing the route he was riding before he was killed in a head-on collision.
Hundreds of bikers followed Harry’s last ride through Brackley and his home village of Charlton in Northamptonshire on Sunday.
The grieving parents of Mr Dunn, who was killed in the crash 12 weeks ago, watched with hundreds of spectators, many showing support for the family’s campaign for the US suspect involved in the crash to face trial in the UK.
Anne Sacoolas, the wife of an American intelligence officer, is believed to have been driving on the wrong side of the road when she allegedly hit the 19-year-old’s motorbike outside RAF Croughton on August 27.
She claimed diplomatic immunity after the incident and returned to the US, sparking an international controversy.
Mr Dunn’s parents, Tim Dunn and Charlotte Charles, watched the convoy with supporters of the campaign Justice4Harry – who were wearing green T-shirts and ribbons in his memory.
They said in a statement: “Today has been unbelievably emotional for us and we have been overwhelmed by the love and support all the participants have shown us.
“Harry would have been so proud to know that he was at the centre of all this attention as we continue our campaign.
“We cannot thank the millions of people supporting us all around the world enough.
“Each and every one of you is a member of Team Harry.”
Their adviser and spokesman, Radd Seiger, said: “Today’s incredible bike event not only shows how much love Harry Dunn’s family have from members of the public, but support for their campaign too.
“The campaign is now an unstoppable force and we will get justice for Harry and for his family.”
Two days earlier, Mr Dunn’s parents expressed frustration that the Crown Prosecution Service (CPS) has not yet decided whether to charge Mrs Sacoolas.
They said they were “absolutely on (their) knees” after being “strongly” led to believe they could expect the decision this week, following discussions between Mr Seiger and Chief Constable Nick Adderley.
But in a statement released on Friday, Mr Dunn’s parents said the chief constable had told Mr Seiger there had been no decision, and a timeline of when to expect one had not been set out.


RequirementsHandler
1.7
Type
:: ( Name | =
"ReqHandler"
)
1.7
S
:: ( Name | =
"JS"
or =
"NoOp"
) , required
1.7
Script
:: Text


A +ListTextField maps text to a list of strings. Normally used as a single line text field and takes a list of delimiters as argument:
(gui '(+SetEAdr +E/R +ListTextField) '(to : home obj) '(", " "," " ") 60)
The example above creates a text field connected to the 'to' property of the current object. Entering e-mail addresses in this field, separated by a comma followed by a space, just a comma or just a space will map the addresses to a list:
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>--><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>See also gui, +TextField and input fields.


TABLE OF INTERACTIONS WITH
ANGIOTENSIN II RECEPTOR ANTAGONISTS
or ANGIOTNESIN RECEPTOR BLOCKERS (ARBs)
From the French ANSM drug interactions document of September 2016, pp. 17-18
ANGIOTENSIN II RECEPTOR ANTAGONISTS or ANGIOTENSIN RECEPTOR BLOCKERS (ARBs) CLASS CODE: C09CA0-001 |
ACETYLSALICYLIC ACID RxNorm: 1191 ATC: A01AD05 B01AC06 N02BA01 |
For anti-inflammatory doses of acetylsalicylic acid (>=1 g per dose and/or >= 3 g per day) or for analgesic or antipyretic doses (>= 500 mg per dose and/or <=3 gr per day): Acute renal insufficiency with dehydrated patients, due to decrease of the glomerular filtration following a decrease of the synthesis of the renal prostaglandins. Furthermore, reduction of the antihypertensive effect. |
Precaution for use Hydrate the patient and monitor renal function at the beginning of treatment. |
ANGIOTENSIN II RECEPTOR ANTAGONISTS or ANGIOTENSIN RECEPTOR BLOCKERS (ARBs) CLASS CODE: C09CA0-001 |
ALISKIREN RxNorm: 325646 ATC: C09XA02 |
Risk of hyperkalemia, of renal insufficiency, of increase of mortality from cardiovascular disease |
Contraindication - for patients with diabetes or renal insufficiency Not recommended -in other cases |
ANGIOTENSIN II RECEPTOR ANTAGONISTS or ANGIOTENSIN RECEPTOR BLOCKERS (ARBs) CLASS CODE: C09CA0-001 |
NON STEROIDAL ANTI-INFLAMMATORY DRUGS CLASS CODE: M01A-002 |
Acute renal insufficiency with patients at risk (older patient, dehydration, treatment with diuretics, changes in renal function), due to decrease of the glomerular filtration (inhibition of the vasodilater prostaglandins due to the non steroidal anti-inflammatories.) These effects are generally reversible. In addition, reduction of the antihypertensive effect. |
Precaution for use Hydrate the patient and monitor renal function at the beginning of treatment and regularly while these substances are administered together. . |
ANGIOTENSIN II RECEPTOR ANTAGONISTS or ANGIOTENSIN RECEPTOR BLOCKERS (ARBs) CLASS CODE: C09CA0-001 |
POTASSIUM SPARING DIURETICS (ALONE OR IN COMBINATION) CLASS CODE: C0E-004 |
Risk of hyperkalemia (potentially lethal) especially in case of renal insufficiancy (addition of the hyperkaliemia inducing effects)/ |
Not recommended --if the combination of these durgs is justified, strict testing of the kaliemia and of renal function Precaution for use --for the spironolactone in doses between 12.5 mg and 50mg per day, and for the eplerenone used in the treatment of cardiac insufficiency, as well as in the case of hypokaliemia, strict testing of the kaliemia and of the renal function. |
ANGIOTENSIN II RECEPTOR ANTAGONISTS or ANGIOTENSIN RECEPTOR BLOCKERS (ARBs) CLASS CODE: C09CA0-001 |
POTASSIUM LOWERING DIURETICS CLASS CODE: C03 |
Risk of abrupt arterial hypotension and/or acute renal insufficiency at the beginning of or at an increase of the dosage of a treatment with an angiotensin II antagonist in cases where there is pre-existing fluid depletion. |
Precaution for use With arterial hypertension, where there has been pre-existing diuretic treatment that has caused fluid depletion, it is necessary: -either to stop the diuretic before beginning the treatment with the angiotensin II antagonist, and reintroduce a potassium lowering diurectic later if necessary; -or to administer initial reduced doses of the angiotensin II antagonist and increase the dosage progressively. |
ANGIOTENSIN II RECEPTOR ANTAGONISTS or ANGIOTENSIN RECEPTOR BLOCKERS (ARBs) CLASS CODE: C09CA0-001 |
EPLERENONE RxNorm: 298869 ATC: C03DA04 |
Increase of the risk of hyperkalemia, especially with older patients |
Precaution for use Strict testing of the kalemia and of the renal function during the administration of these substances together. |
ANGIOTENSIN II RECEPTOR ANTAGONISTS or ANGIOTENSIN RECEPTOR BLOCKERS (ARBs) CLASS CODE: C09CA0-001 |
ANGIOTENSIN CONVERTING ENZYME INHIBITORS (ACE INHIBITORS) CLASS CODE: C09AA |
In indications where the administration of these substances together is possible, increased risk of degradation of renal function, even acute renal insufficiency, and increase of the hyperkalemia as well as hypotension and fainting or loss of consciousness. |
Take into account |
ANGIOTENSIN II RECEPTOR ANTAGONISTS or ANGIOTENSIN RECEPTOR BLOCKERS (ARBs) CLASS CODE: C09CA0-001 |
LITHIUM RxNorm: 6448 ATC: D11AX04 |
Increase of the plasma concentrations of lithium that can reach toxic values (decrease of the renal excretion of the lithium) |
Not recommended If the use of an angiotensin II antagonist is indispensable, strict monitoring of the plasma concentrations of lithium and adjustment of the dosage |
ANGIOTENSIN II RECEPTOR ANTAGONISTS or ANGIOTENSIN RECEPTOR BLOCKERS (ARBs) CLASS CODE: C09CA0-001 |
POTASSIUM RxNorm: 8588 ATC: A12BA |
Hyperkalemia (potentially lethal) especially when there is renal insufficiency (addition of the hyperkalemia inducing effects). |
Not recommended Avoid administering these substances together unless there is pre-existing hypokelimia. |


{% if not is_a_return_visitor %}
Welcome to Disco/graph, an interactive visualization of relationships between artists, bands and labels, based on data from the Discogs.com database.
Use the search box in the right corner to look for a musical entity or click on the Disco/graph link in the left corner to find a random artist.
When the graph appears, click and drag the nodes around. Double-click on any node with a plus-sign to reveal more connections, or use the roles selector in the bottom right corner to show new types of connections.
You can also click on any selected entity's name in the lower left-hand corner to open their Discogs.com profile, or the little eye icon next to their name to pull up a graph of their musical proclivities


Netflix announce new musical drama series ‘The Eddy’ from ‘La La Land’ director
Ooh la la
Netflix have announced The Eddy, a new musical drama series from Academy Award winner Damien Chazelle, the writer and director of La La Land.
The Eddy is set in “contemporary multicultural Paris” and revolves around “a club, its owner, the house band, and the chaotic city that surrounds them,” according to a press release.
- Read more: ‘La La Land’ – Film Review
The original eight-episode series was filmed on location in France and premieres exclusively on Netflix. The Eddy features dialogue in French, English and Arabic. No release date has been confirmed yet.
As well as Chezelle, the series was directed by Cannes’ Caméra d’Or winner Houda Benyamina (Divines), Laila Marrakchi (Marock), and Emmy winner Alan Poul (Tales of the City). Five-time BAFTA, Tony and Olivier Award-winning writer, Jack Thorne (Wonder) wrote several episodes.
Six-time Grammy Award winner Glen Ballard (Alanis Morissette’s ‘Jagged Little Pill’, Michael Jackson’s ‘Bad’), wrote all the band’s songs.
‘The Eddy’
In other Netflix news, yesterday (November 21) a new teaser trailer for season 5 of the platform’s drama Better Call Saul was released. Watch the clip below.
The latest trailer hints at Jimmy’s descent into the criminal world more as he fully adopts his Saul Goodman persona. A picture of someone in jail holding his business card can also be seen.
The popular Netflix show and prequel to Breaking Bad is due to return to screens in February.


Select a clinic
Rheumatology - Chapel Allerton Hospital - Leeds TH - RR8
CHAPELTOWN ROAD LEEDS WEST YORKSHIRE England LS7 4SA
|
First appointment approximately |
108 Days |
|
Distance from LS1 6AE |
1 Mile |
|
9 out of 10 patients start treatment in approximately |
14 Weeks |
Rheumatology /Urgent Management Restricted Service-Bradford T Hospitals NHFS Trust-RAE
LITTLE HORTON LANE BRADFORD WEST YORKSHIRE England BD5 0NA
|
First appointment approximately |
Limited availability |
|
Distance from LS1 6AE |
8 Miles |
|
9 out of 10 patients start treatment in approximately |
16 Weeks |
Rheumatology GCA Triage
LIGHTWOOD HOUSE LANE SHEFFIELD SOUTH YORKSHIRE England S8 8BG
|
First appointment approximately |
9 Days |
|
Distance from LS1 6AE |
32 Miles |
|
9 out of 10 patients start treatment in approximately |
16 Weeks |


not everyone is fortunate to be given bending. Even though it is normal in our world, it is the opposite in the Avatar the Last Airbender's world. People who cannot bend tend to be lower class citizens and tend to be the forgetten people. Obviously not everyone, who cannot bend, is forgotten as some learn to fight and utilise their fighting techniques to outmatch those who bend. Some strong fighters include Suki, Sokka, and Ty Lee. Suki and Sokka are extremely skilled fighters who commonly use fans and swords to protect and attack. Ty Lee uses her knowledge of chi blocking to gain the upperhand on her opponents. This form usually leaves the opponent paralyzed or unable to bend for a while.
Although this group are not all the fighting type. One should never underestimate these fighters.


Employee Details
Please Fill the Form
Enter Employee ID :
Enter Name :
Date Of Birth :
Gender :
Male
Female
Department :
Development
Testing
Sales
Quality Analyst
Employee ID
Name
Date Of Birth
Gender
Department


|
|
Boost.Python
|
The main iterface to the library is via the templated class
container_suite
, an object of which adds a number
of Python functions to an extension class via a single
def
call. Support is provided for all of the
standard container templates [1] via
container-specific header files, as shown in the following
example:
#include <boost/python/suite/indexing/container_suite.hpp> #include <boost/python/suite/indexing/vector.hpp> #include <boost/python/class.hpp> #include <boost/python/module.hpp> #include <vector> BOOST_PYTHON_MODULE(example) { class_< std::vector<int> > ("vector_int") .def (indexing::container_suite< std::vector<int> >()); }
The container_suite
object achieves this using the
def_visitor interface, which
provides a hook for the def
function to install
multiple Python methods in one call. If the container element
type (int
in the example above) is a user-defined
type, you would have to expose this type to Python via a
separate class_
instance.
[1] Automatic operation with the standard containers works properly if your compiler supports partial template specializations. Otherwise, refer to the compiler workarounds section.
The container_suite.hpp
header is summarized below:
#include <boost/python/suite/indexing/algo_selector.hpp> #include <boost/python/suite/indexing/visitor.hpp> #include <boost/python/return_by_value.hpp> #include <boost/python/return_value_policy.hpp> namespace boost { namespace python { namespace indexing { typedef return_value_policy<return_by_value> default_container_policies; template<class Container, int Flags = 0, class Algorithms = algo_selector<Container> > struct container_suite : public visitor<Algorithms, default_container_policies, Flags> { typedef Algorithms algorithms; template<typename Policy> static visitor<Algorithms, Policy, Flags> with_policies (Policy const &policy) { return visitor <Algorithms, Policy> (policy); } }; } } }
Some important points to note about container_suite
:
vector.hpp
or set.hpp
), so
these must be included separately to add support each type
of container.
indexing::visitor
template, using a return_by_value
return
policy. This is a reasonable default, and follows the
Boost.Python idiom of passing a default-constructed object
to the def
function.
with_policies
static function template
generates different instances of the
indexing::visitor
template, with
client-provided policies.
Flags
allows client code
to disable unneeded features in order to reduce code
size. Details are provided below.
The container indexing suite includes support for many of the
standard C++ container templates, but note that the support code
for each is in a separate header file. These header files (in
the boost/python/suite/indexing subdirectory) are:
vector.hpp
, deque.hpp
,
list.hpp
, set.hpp
and
map.hpp
. These correspond in the obvious way to the
standard headers vector
, deque
,
etc. The header files for the container_proxy
and iterator_range
templates
provide their own support implicitly.
container_suite
static member function
with_policies
as in the following example:
class_< std::list<heavy_class> > ("list_heavy_class") .def (indexing::container_suite< std::list<heavy_class> > ::with_policies (my_policies));
It can be tempting to use return_internal_reference
if the container elements are expensive to copy. However, this
can be quite dangerous, since references to the elements can
easily become invalid (e.g. if the element is deleted or
moved). The Boost.Python code for
return_internal_reference
can only manage the
lifetime of the entire container object, and not those of the
elements actually being referenced. Various alternatives exist,
the best of which is to store the container elements indirectly,
using boost::shared_ptr
or an equivalent. If this
is not possible,
container_proxy
may provide a
solution, at least for vector-like containers.
The container_suite
object typically adds more than
one function to the Python class, and not all of those functions
can, or should, use exactly the same policies. For instance, the
Python len
method, if provided, should always
return its result by value. The library actually uses up to
three different sets of policies derived from the one provided
to the with_policies
function. These are:
default_call_policies
for result conversion.
void
) use the second option. The third option
applies only to the slice version of __getitem__
,
which generates a Python list by applying the return conversion
policies to each element in the list.
The container_suite
template has an optional
Flags
parameter that allows client code to disable
various optional features of the suite. This can lead to
significant savings in the size of object files and executables
if features such as sorting or Python slice support are not
needed. The Flags
parameter (an integer) can be any
bitwise combination of the following values (defined in the
boost::python::indexing
namespace by visitor.hpp
):
| Flag | Effect |
|---|---|
disable_len |
omits the Python __len__ method |
disable_slices |
omits slice support code from __getitem__ ,
__setitem__ and __delitem__ . |
disable_search |
omits the container search methods count and __contains__ |
disable_reorder |
omits the container reordering operations
sort and reverse |
disable_extend |
omits the extend method |
disable_insert |
omits the insert method |
Note that some containers don't support some of the optional
features at all, in which case the relevant flags are
ignored. The value minimum_support
may be passed as
a flag value to disable all optional features. A simple example
is provided in test_vector_disable.cpp
The container_suite
template relies on seven main
support templates, five of which are suitable for specialization
or replacement by client code. The following diagram shows the
templates [2] and their dependencies, with
the replaceable ones highlighted in grey. For full details,
refer to the specific section on each component – what
follows here is an overview.
| Diagram 1. Overview of class dependencies |
The visitor
template, which implements the def_visitor interface, decides what
Python methods to provide for a container. It takes two template
parameters, Algorithms
and Policy
(the
CallPolicies for the Python
methods on the container). The Algorithms
argument
must provide implementations for the Python methods that the
container supports, as well as a matching
ContainerTraits
type. This type provides various
compile-time constants that visitor
uses to decide
what Python features the container provides. It also provides a
value_traits
typedef, which has similar
compile-time constants related to the values stored in the
container. If the visitor
instance decides to
provide Python slice support for the container, it instantiates
the slice_handler
template, which also takes
Algorithms
and Policy
parameters. In
such cases, the Algorithms
argument must supply a
SliceHelper
type and factory function.
The high-level container_suite
template uses the
algo_selector
template to determine what types to
use in the instantiation of visitor
. The
algo_selector
template has partial specializations
for all of the STL container templates.
[2] Note that Algorithms
and
ContainerTraits
don't represent individual
templates in the diagram, but groups of related
templates. For instance, there are actually templates called
list_algorithms
and assoc_algorithms
,
among others.
A ValueTraits
class provides simple information
about the type of value stored within a container that will be
exposed to Python via the container_suite
interface. It controls the provision of some operations that are
dependant on the operations supported by container elements (for
instance, find
requires a comparison operator for
the elements). A ValueTraits
class also provides a
hook called during initialization of the Python class, which can
be used for custom processing at this point.
The following table lists the static constants required in a
ValueTraits
class:
| Static constant | Type | Meaning |
|---|---|---|
equality_comparable
|
bool |
Whether the value supports comparison via
operator== .
|
lessthan_comparable
|
bool |
Whether the value supports comparison via
operator< .
|
A ValueTraits
class should provide the following
member function template, which will be called during execution
of the def
call for the container suite:
template <typename PythonClass, typename Policy> static void visitor_helper (PythonClass &, Policy const &);
In order to include a custom ValueTraits
class into
the container suite, it is easiest to supply it as a
specialization of the template
indexing::value_traits
for the container's element
type. The existing ContainerTraits
classes all
make use of
value_traits<container::value_type>
, and so
will use a specialization for the value type if available. The
default, unspecialized, version of value_traits
sets both of the static constants to true
and has
an empty implementation of visitor_helper
.
As an example, if a user defined type does not have any
comparison operations, then there will probably be compile-time
errors caused by an attempt to provide the Python
find
or sort
methods. The solution is
to write a specialized version of
indexing::value_traits
that disables the
appropriate features. For example:
namespace boost { namespace python { namespace indexing { template<> struct value_traits<my_type> : public value_traits<int> { static bool const equality_comparable = false; static bool const lessthan_comparable = false; }; } } }
In this example, there is no need to perform any processing in
the visitor_helper
function, and deriving from an
unspecialized version of the template (e.g.
value_traits<int>
) exposes an empty
visitor_helper
.
namespace boost { namespace python { namespace indexing { template<typename T> struct value_traits { static bool const equality_comparable = true; static bool const lessthan_comparable = true; template<typename PythonClass, typename Policy> static void visitor_helper (PythonClass &, Policy const &) { } }; } } }
A ContainerTraits
class serves three
purposes. Firstly, it identifies what facilities the container
supports in principle (i.e. either directly or via some support
code). Secondly, it identifies the types used to pass values
into and out of the supported operations. Thirdly, it provides a
hook for additional code to run during initialization of the
Python class (i.e. during the def
call for the
suite).
Note that a ContainerTraits
class can be any class,
derived from the existing implementations or not, as long as it
meets the requirements listed in the following sections.
ContainerTraits
class should define. Note that these
must be compile-time constants, since parts of the library
use these constants to select between template specializations.
The constants must at least be convertible to the type shown in
the second column.
| Static constant | Type | Meaning | Influence |
|---|---|---|---|
has_copyable_iter
|
bool
|
Whether copies of an iterator are independant [3] |
Required for len and __iter__
|
is_reorderable
|
bool
|
Whether it is possible to re-order the contents of the container. |
Required for reverse and sort
|
has_mutable_ref
|
bool
|
Whether container elements can be altered via a reference |
Determines is_reorderable for most containers.
|
has_find
|
bool
|
Whether find is possible in principle (via member function or otherwise) |
__contains__ ,
index ,
count ,
has_key
|
has_insert
|
bool
|
Whether it is possible to insert new elements into the container. |
insert ,
extend ,
slice version of __setitem__
|
has_erase
|
bool
|
Whether it is possible to erase elements from the container. |
__delitem__ ,
slice version of __setitem__
|
has_push_back
|
bool
|
Whether container supports insertion at the end. |
append
|
has_pop_back
|
bool
|
Whether container supports element deletion at the end. | Currently unused |
index_style
|
index_style_t
|
Type of indexing the container supports [4] |
__getitem__ ,
__setitem__ ,
__delitem__ ,
__iter__ ,
extend ,
index ,
count ,
has_key
|
| [3] | For example, copies of stream iterators are not independant. All iterator copies refer to the same stream, which has only one read and one write position. |
| [4] |
index_style_none , no indexing at all
(e.g. list )index_style_linear , continuous integer-like
index type (e.g. vector )index_style_nonlinear , indexing via other
types (e.g. map ).
|
The following table lists the type names that must be defined in
a compatible implementation of ContainerTraits
.
The large number of types is supposed to provide flexibility for
containers with differing interfaces. For example,
map
uses the same type for searching and "indexing"
(i.e. find
and operator[]
) so
key_type
and index_type
would have to
be the same. In contrast, searching a vector
would
typically use a different type to that used for indexing into a
vector.
| Type name | Meaning |
|---|---|
container
|
The type of the C++ container. |
size_type
|
The type used to represent the number of elements in the container. |
iterator
|
The container's iterator type. This should be a non-const iterator unless the container itself is const. |
index_type
|
The type used to represent indexes extracted from a
__getitem__ call (and others). For
index_style_linear , this should be a
signed type, so that negative indices can be
processed. For index_style_nonlinear , this
will most likely be the same type as
key_type .
|
index_param
|
The type to use when passing index_type into
a function.
|
value_type
|
The type to use when copying a value into or out of the container. |
value_param
|
The type to use when passing value_type into
a function.
|
key_type
|
The type used for search operations like find
and count .
|
key_param
|
The type to use when passing key_type into a
function.
|
reference
|
The type to use when returning a reference to a container element. |
value_traits_
|
Traits for the container elements. See the ValueTraits section for information about the requirements on this type. |
ContainerTraits
class should provide a static member
function template as follows:
template <typename PythonClass, typename Policy> static void visitor_helper (PythonClass &, Policy const &);
Typically, the implementation would just forward the call to the
equivalent function in the value_traits_
class.
It may be possible to mix your own ContainerTraits
class with one of the existing Algorithms
implementations, thus saving yourself a fair bit of work. The
easiest way to do this would be to specialize the
algo_selector
template for your container type,
using public deriviation to get the implementation from one of
the existing Algorithms
templates. For example,
assuming that default_algorithms
is suitable for
your container:
namespace boost { namespace python { namespace indexing { template<> struct algo_selector<my_container> : public default_algorithms<my_container_traits> { }; } } }
Alternatively, you could select the algorithms and traits using
the visitor
template directly, as described in the
compiler workarounds section.
The following block of code shows a simplistic implementation of
ContainerTraits
for the container
std::map<std::string, int>
. The actual
implementation used by the suite relies on template
metaprogramming techniques, whereas this example is designed to
show only the essential elements of a
ContainerTraits
implementation.
#include <map> #include <string> #include <boost/python/suite/indexing/suite_utils.hpp> // Include suite_utils to get index_style_t struct simple_map_traits { // Traits information for std::map<std::string, int> typedef std::map<std::string, int> container; typedef container::size_type size_type; typedef container::iterator iterator; typedef int value_type; typedef int & reference; typedef std::string key_type; typedef std::string index_type; typedef int value_param; typedef std::string const & key_param; typedef std::string const & index_param; static bool const has_copyable_iter = true; static bool const has_mutable_ref = true; static bool const has_find = true; static bool const has_insert = true; static bool const has_erase = true; static bool const has_pop_back = false; static bool const has_push_back = false; static bool const is_reorderable = false; static boost::python::indexing::index_style_t const index_style = boost::python::indexing::index_style_nonlinear; struct value_traits_ { // Traits information for our value_type static bool const equality_comparable = true; static bool const lessthan_comparable = true; }; template<typename PythonClass, typename Policy> static void visitor_helper (PythonClass &, Policy const &) { // Empty } };
Example usage of the simple_map_traits
:
#include "simple_map_traits.hpp" #include <boost/python/suite/indexing/container_suite.hpp> #include <boost/python/module.hpp> #include <boost/python/class.hpp> BOOST_PYTHON_MODULE(test_simple) { using namespace boost::python; typedef std::map<std::string, int> container_t; typedef indexing::map_algorithms<simple_map_traits> algorithms_t; class_<container_t> ("map") .def (indexing::container_suite<container_t, algorithms_t>()); }
The Algorithms
requirements are designed to provide
a predictable interface to any container, so that the same
visitor
code can expose any supported container to
Python. An implemention of Algorithms
does this by
providing functions and typedefs with fixed names. The exact
interfaces to the functions can vary to some extent, since the
def
function calls used internally by the
visitor
deduce the function type
automatically. However, certain points should be confomed to:
container &
as first parameter.
ContainerTraits
.
The block of code below shows the definition of the
default_algorithms
class template, which is the
basis for all current implementations of
Algorithms
. The typedefs that it defines are
primarily for convenience within the implementation itself,
however container
, reference
and
slice_helper
are also required by the
slice_handler
template, if slices are
supported. Note that default_algorithms
derives all
of the type information from its ContainerTraits
template argument, which allows the same implementation to be
used for various container types.
namespace boost { namespace python { namespace indexing { template<typename ContainerTraits, typename Ovr = detail::no_override> class default_algorithms { typedef default_algorithms<ContainerTraits, Ovr> self_type; public: typedef ContainerTraits container_traits; typedef typename ContainerTraits::container container; typedef typename ContainerTraits::iterator iterator; typedef typename ContainerTraits::reference reference; typedef typename ContainerTraits::size_type size_type; typedef typename ContainerTraits::value_type value_type; typedef typename ContainerTraits::value_param value_param; typedef typename ContainerTraits::index_param index_param; typedef typename ContainerTraits::key_param key_param; typedef int_slice_helper<self_type, integer_slice> slice_helper; static size_type size (container &); static iterator find (container &, key_param); static size_type get_index (container &, key_param); static size_type count (container &, key_param); static bool contains (container &, key_param); static void reverse (container &); static reference get (container &, index_param); static void assign (container &, index_param, value_param); static void insert (container &, index_param, value_param); static void erase_one (container &, index_param); static void erase_range(container &, index_param, index_param); static void push_back (container &, value_param); static void sort (container &); static slice_helper make_slice_helper (container &c, slice const &); template<typename PythonClass, typename Policy> static void visitor_helper (PythonClass &, Policy const &); }; } } }
For containers that support Python slices, the
visitor
template will instantiate and use
internally the slice_handler
template. This
template requires a type called slice_helper
and a
factory function called make_slice_helper
from its
Algorithms
argument. More details are provided in
the section SliceHelper.
The existing indexing::algo_selector
template uses
partial specializations and public derivation to select an
Algorithms
implementation suitable for any of the
standard container types. Exactly how it does this should be
considered an implementation detail, and uses some tricks to
reuse various existing Algorithms
implementations. In any case, client code can specialize the
algo_selector
template for new container types, as
long as the specialized instances conform to the requirements
for Algorithms
as already given.
A new implementation of Algorithms
could derive
from any one of the existing implementation templates, or be
completely independant. The existing implementation templates
are listed in the following table. They each take one template
parameter, which should be a valid ContainerTraits
class, as specified in a previous
section.
| Template name | Description |
|---|---|
default_algorithms
|
Uses standard iterator-based algorithms wherever
possible. Assumes that the container provides
begin and end end member
functions that return iterators, and some or all of
size , insert , erase
and push_back , depending on what functions get
instantiated.
|
list_algorithms
|
Similar to the above (in fact, it derives from
default_algorithms ) except that it uses
container member functions reverse and
sort instead of the iterator-based
versions. Defined in
boost/python/suite/indexing/list.hpp .
|
assoc_algorithms
|
Also derived from default_algorithms , for use
with associative containers. Uses the container member
function find for indexing, and member
function count instead of iterator-based
implementations.
|
set_algorithms
|
Derived from assoc_algorithms to handle
set insertion operations, which are slightly
different to the map versions.
|
map_algorithms
|
Derived from assoc_algorithms to handle
map insertion and lookup, which are slightly
different to the set versions.
|
The default_algorithms
template attempts to place
as few restrictions as possible on the container type, by using
iterators and standard algorithms in most of its functions. It
accepts an optional second template parameter, which can be used
via the curiously recurring template idiom to replace any of its
functions that it relies on internally. For instance, if you've
created an iterator-style interface to a container that is not
at all STL-like (let's call it weird_container
),
you might be able to re-use most of
default_algorithms
by replacing its basic functions
like this:
namespace indexing = boost::python::indexing; struct my_algorithms : public indexing::default_algorithms < weird_container_traits, my_algorithms > { size_t size (weird_container const &c) { return ...; } my_iterator_t begin (weird_container &c) { return ...; } my_iterator_t end (weird_container &c) { return ...; } };
Support code for Python slices is split into two portions, the
slice_handler
template, and a "slice helper" that
can easily be replaced by client code via a typedef and factory
function in the Algorithms
argument supplied to
container_suite
. The slice helper object takes care
of reading and writing elements from a slice in a C++ container,
and optionally insertion and deletion. Effectively, the slice
helper object maintains a pointer to the current element of the
slice within the container, and provides a next
function to advance to the next element of the slice. The
container suite uses the following interface for slices:
| Expression | Return type | Notes |
|---|---|---|
Algorithms:: make_slice_helper
(c, s)
|
Algorithms:: slice_helper
|
c is of type
Algorithms:: container & and
s is of type indexing::
slice const & .
Returns a newly constructed slice_helper
object by value.
|
slice_helper. next()
|
bool
|
Advances the slice helper's current element pointer to the next element of the slice. Returns true if such an element exists, and false otherwise. The first time this function is called, it should set the current pointer to the first element of the slice (if any). |
slice_helper. current()
|
Algorithms:: reference
|
Returns a reference to the current element of the
slice. This will only be called if the last call to
next() returned true.
|
slice_helper. write (v)
|
void
|
The parameter v is of type
Algorthims::value_param . Advances to the
next element of the slice, as defined in
next , and writes the given value
v at the new location in the container.If the
slice is exhausted (i.e. next would return
false) then write either inserts the
value into the container at the next location (past the
end of the slice), or sets a Python exception and
throws.
|
slice_helper. erase_remaining()
|
void
|
Either erases any remaining elements in the slice
not already consumed by calls to next or
write ,
or sets a Python exception and throws.
|
The container suite provides a generic implementation of the
SliceHelper
requirements for containers that have
integer-like indexes. It is parameterized with a
SliceType
parameter that allows the integer index
values to come from various different sources, the default being
the PySlice_GetIndices
function. Refer to the
header file int_slice_helper.hpp
and the references to it in the algorithms.hpp
header for details.
The container_proxy
template provides an emulation
of Python reference semantics for objects held by value in a
vector-like container. Of course, this introduces some
performance penalties in terms of memory usage and run time, so
the primary application of this template is in situations where
all of the following apply:
return_internal_reference
would be
dangerous.
The container_proxy
template wraps any vector-like
container and presents an interface that is similar to that of
std::vector
, but which returns
element_proxy
objects instead of plain references
to values stored in the wrapped container. During an operation
that alters the position of an element within the container
(e.g. insert
) the container_proxy
code
updates the relevant proxy objects, so that they still refer to
the same elements at their new locations. Any operation
that would delete or overwrite a value in the container
(e.g. erase
) copies the to-be-deleted value into
its corresponding proxy object. This means that a proxy's
"reference" to an element is robust in the face of changes to
the element's position in the container, and even the element's
removal.
Ideally, any code that changes the positions of elements within
the container would use only the container_proxy
interface, to ensure that the proxies are maintained in
synchronization. Code that otherwise makes direct modifications
to the raw container must notify the
container_proxy
of the changes, as detailed in the
following section.
The container_proxy
template takes three
parameters, only the first of which is mandatory:
template<class Container , class Holder = identity<Container> , class Generator = vector_generator> class container_proxy;
The Container
argument is the raw container type
that the container_proxy
will manage. It must
provide random-access indexing.
The Holder
argument determines how the
container_proxy
stores the raw container object.
There are currently two types of holder implemented, the default
identity
template which will store the raw
container by value within the container_proxy
, and
the deref
template which stores a (plain) pointer
to an external object. It would also be possible, for instance,
to create a holder that uses a shared_pointer
, or
one that stores a pointer but performs deep copies.
The Generator
argument determines what container to
use for storing the proxy objects. The argument must be a
suitable class so that
Generator::apply<proxy_t>::type
is a typedef
for the container to use for storing the proxies. The default is
vector_generator
, which generates
std::vector
instances. The usefulness of allowing
other generators can be seen from the example
container_proxy<std::deque<...> >
.
Insertion at the beginning of this container_proxy
requires an insertion at the beginning of the
std::deque
raw container, which has amortized
constant time complexity. However, it also requires an insertion
at the beginning of the proxy container, which (using the
std::vector
provided by
vector_generator
) has linear time complexity. If
this is a significant issue, you can use a custom
Generator
to match the performance characteristics
of the proxy container to those of the raw container.
Examples in libs/python/test/test_container_proxy.cpp ...
namespace boost { namespace python { namespace indexing { template<class Container , class Holder = identity<Container> , class Generator = vector_generator> class container_proxy { public: typedef typename Container::size_type size_type; typedef typename Container::difference_type difference_type; typedef typename Container::value_type raw_value_type; typedef typename Holder::held_type held_type; typedef implementation defined value_type; typedef implementation defined const_value_type; typedef implementation defined iterator; typedef implementation defined const_iterator; typedef value_type reference; // Has reference semantics typedef const_value_type const_reference; // Has reference semantics container_proxy (); explicit container_proxy (held_type const &); template<typename Iter> container_proxy (Iter, Iter); container_proxy (container_proxy const &); container_proxy &operator= (container_proxy const &); ~container_proxy (); Container const &raw_container() const; // OK to expose const reference reference at (size_type); const_reference at (size_type) const; reference operator[] (size_type); const_reference operator[] (size_type) const; size_type size() const; size_type capacity() const; void reserve(size_type); iterator begin(); iterator end(); iterator erase (iterator); iterator erase (iterator, iterator); iterator insert (iterator, raw_value_type const &); template<typename Iter> void insert (iterator, Iter, Iter); void push_back (raw_value_type const &); value_type pop_back (); // These functions are not normally necessary. They notify the // container_proxy of changes to the raw container made by other // code (see documentation for details) void detach_proxy (size_type index); void detach_proxies (size_type from, size_type to); void prepare_erase (size_type from, size_type to); void notify_insertion (size_type from, size_type to); }; } } }
The identity
template.
namespace boost { namespace python { namespace indexing { template<typename T> struct identity { typedef T held_type; static T & get(T & obj) { return obj; } static T const & get(T const & obj) { return obj; } static T create () { return T(); } static T copy (T const ©) { return copy; } static void assign (T &to, T const &from) { to = from; } static void pre_destruction (T &) { } }; } } }
The deref
template.
namespace boost { namespace python { namespace indexing { template<typename P> struct deref { typedef P held_type; typedef typename boost::iterator_value<P>::type value; static value & get (P & ptr) { return *ptr; } static value const & get (P const & ptr) { return *ptr; } static P create () { return P(); } static P copy (P const ©) { return copy; } static void assign (P &to, P const &from) { to = from; } static void pre_destruction (P &) { } }; } } }
The vector_generator
class.
namespace boost { namespace python { namespace indexing { struct vector_generator { template<typename Element> struct apply { typedef std::vector<Element> type; }; }; } } }
An element_proxy
refers to an element of the
container via two levels of indirection – it holds a
pointer to a so-called shared_proxy
object, which
has a pointer back to the container_proxy
object
and an element index within the wrapped container. This can be
seen in the following diagram, which shows a
container_proxy< vector<int> >
containing the three elements 111, 222 and 333.
Diagram 2. Example of container_proxy with an
element proxy
|
element_proxy
object refers (indirectly) to the container element with the
value 222. An insertion before this element would increment the
index numbers in the shared_proxy
objects so that
the given element_proxy
continues to refer to the
same value at its new location. Similary, a deletion before the
element would decrement the affected shared_proxy
indexes. If the referenced element itself gets deleted or
overwritten, the shared_proxy
first takes a
copy of the original value, and is then considered to be
detached from the container_proxy
. This
situation is shown below in diagram 3.
Diagram 3. Example of element_proxy with
detached shared_proxy
|
The iterator_range
template provides a
container-like interface to a range defined by two iterators.
The interface is complete enough to provide any Python method
that does not require insertion or deletion, e.g.
len
, index
and sort
. See
the get_array_plain
function in libs/python/test/test_array_ext.cpp
for an example usage. If you only need iteration over the values
in a range, consider using the simpler range
function provided by boost/python/iterator.hpp
Beware that C++ iterators are not very Python-like, since they
do not provide any guarantees about the lifetimes of the objects
they refer to. Invalidating either of the iterators stored in an
iterator_range
object is dangerous, since
subsequently using the iterators (from Python or C++) results in
undefined behaviour.
iterator_range
should work with any
ForwardIterator
type.
namespace boost { namespace python { namespace indexing { template<typename Iterator> class iterator_range { private: typedef typename boost::call_traits<Iterator>::param_type iterator_param; typedef std::iterator_traits<Iterator> std_traits; public: typedef typename std_traits::reference reference; typedef Iterator iterator; typedef typename std_traits::difference_type size_type; typedef typename std_traits::difference_type difference_type; typedef typename std_traits::value_type value_type; typedef typename std_traits::pointer pointer; iterator_range (iterator_param, iterator_param); iterator_range (std::pair<iterator, iterator> const &); iterator begin() const; iterator end() const; size_type size () const; reference operator[] (size_type) const; reference at (size_type) const; private: // Member variables }; template<typename T, std::size_t N> T *begin (T (&array)[N]); template<typename T, std::size_t N> T *end (T (&array)[N]); } } }
It is possible to use the suite without partial template
specialization support, but the algo_selector
specializations for the standard containers does not work. To
avoid this problem, the client code must explicitly select the
Algorithms
and ContainerTraits
instances to be used, and there are some additional support
templates in the container-specific header files for this
purpose.
#include <boost/python/suite/indexing/vector.hpp> ... using namespace boost::python; using namespace boost::python::indexing; class_<std::vector<int> > ("vector_int") .def (indexing::vector_suite <vector <int> >());
Microsoft Visual C++ 6.0 has a version of the standard
deque
header that is incompatible with the
container_proxy
template, since it lacks a correct
template version of the insert
member function. An
updated copy of the deque
header that fixes this
problem (among others) is available directly from Dinkumware
(at time of writing, 2003/11/04).
This section lists known limitations of the container interfaces. These may or may not get fixed in the future, so check the latest release of Boost and/or the Boost CVS repository. Feel free to submit your own improvements to the mailing list for the Python C++-SIG.
The following Python sequence and mapping functions are not
currently implemented for any containers:
keys, values, items, clear, copy, update,
pop, __add__, __radd__, __iadd__, __mul__, __rmul__
and __imul__
.
Most of the methods mentioned (except for pop
)
present no particular difficulty to implement. The problem with
pop
is that it is incompatible with some return
value policies (for instance,
return_internal_reference
) since it must return a
copy of an element that has already been removed from the
container. This probably requires an extension to the
container_suite
interface, to allow the client code
the option of specifying a different return policy for this
method in particular.
The suite currently restricts itself to the normal Python
container interface methods, which do not expose all of the
interfaces available with the C++ containers. For example,
vector reserve
has no equivalent in Python and is
not exposed by the suite. Of course, user code can still add a
def
call for this manually.
The map
iterator should return only the key part of
the values, but currently returns the whole
std::pair
.
The sort
method (where provided) should allow an
optional comparison function from Python.
The Python Library Reference section on Sequence Types and the Python Reference Manual section on Emulating container types. The C++ Standard.
Thanks to Joel de Guzman and David Abrahams for input and encouragement during the development of the container suite, and to and Ralf W. Grosse-Kunstleve for his invaluable support in porting to various platforms. Joel wrote the original implementation of the indexing support, which provided many of the ideas embodied in the new implementation.
The container suite code and documentation are Copyright (c) 2003 by Raoul Gough, and licensed according to the Boost license.


--- layout: links-page title: Wi-Fi Software for Windows sections: - type: small body: - title: Aruba ClearPass - name: Install url: http://itonlineservices.mhs.vic.edu.au/ClearPassOnGuardInstall.msi - - title: Wi-Fi Certificate - name: Install url: http://itonlineservices.mhs.vic.edu.au/MHSPalo.crt ---


enum_init - Computes the set of initial states of a module.
enum_init [-h] <module_name>
The command computes the set of initial states of a
module. It takes as input a module name and returns a string of names of
states. These state names can be used as arguments to future enum_post
commands.


Hi! Nice to meet you!
Welcome to my styled page!
It lacks images, but at least it has style. And it has links, even if they do not go anywhere…


Married to Edward Smith
{{ family['name'] }}
Top Friends
Top Self Post / Mention Post
Friends
{{ friends['name'] }}


The application was successfully granted access. Please wait for the client to retrieve the authorization tokens.


clf
: classifier
The clf
relation is used in noun phrases where a cardinal numeral (1,4), an ordinal numeral (2), or a determiner (3) modifying the head noun is accompanied by a classifier. The classifier is attached to the numeral if a numeral is present, or else to the determiner.     The feature NounType=Clf
is recommended for distinguishing classifiers from regular nouns.
clf in other languages: [id] [swl] [u] [yue] [zh]


GUIStartExe Tool
Purpose: to allow gui automated test authors to use the GUIStartExe tool to start applications and then interact with them.
I. Purpose of The Tool
This tool is used to open any windows application and preserve identifying information about that application in the data stream.
II. Data Inputs
There is no input connection for this tool.
III. Interface
Executable Path (required): The path to the application you wish to open. This defaults to the AlteryxGui.exe path. Any executable should work. For example, "notepad.exe" will open the windows notepad application, and "C:\Program Files\Windows Defender\MSASCui.exe" will run a windows Defender application if you have one installed at that location.
Window Title Regex (optional): This is a regex string that will be used to identify a specific window that is attached to the specified process. This can be either the full name of the expected window. If a general keyword search is desired, you can surround your keyword with ".*" (ex: ".*Outlook.*"). This window's handle will be output in the data stream if the Window Handle checkbox is checked and a variable name is set.
Process ID (optional): The checkbox indicates whether or not the Process ID of the newly opened application will be output into the data stream. The text field indicates what the variable's name will be. If a Process ID is not output, you will not be able to access the application in downstream tools.
Window Handle (optional): The checkbox indicates whether or not the Window Handle will be output in the data stream. The text field indicates what the variable's name will be. The window handle that is output is a unique identifier of the application's window. If there are more than one window and Window Title Regex has been supplied, otherwise this will be the handle of the first window found in the application.
IV. Data Outputs
This tool will output new variable names and values as specified in the interface.
V. More Information
Variable-Value Data Stream Format


--- layout: default permalink: / title: Home #navGroup: core ---
It's awesome. We'll just leave it at that


Big O notation is used to measure the performance/complexity of an algorithm by how the algorithm responds to different input sizes. Big O notation often signifies the algorithm's execution time or the memory space used. An algorithm is measured with respect to the worst-possible response for a particular input size.
The following are examples of Big O notation describing algorithms:
- O(1) describes an algorithm that executes any input size in the same time or same amount of space.
- O(N) describes an algorithm that adjusts linearly in proportion to the size of the input.
- O(N^2) represents an algorithm that responds parabolically to input size.
- O(2^N) describes an algorithm that takes double time or space per increase in input size. Increases in input size will quickly increase the time and space required.
- Other relationships, like O(log N), may also be cited to represent other algorithm relationships to input size.


Ekiti moves against tax evasion
by Abiodun NejoAbiodun Nejo, Ado Ekiti
The Chairman, Ekiti State Internal Revenue Service, Mr Olumuyiwa Ogunmilade, has said the state government would no longer tolerate tax evasion by individuals or organisations.
Ogunmilade, who bemoaned the high incidence of tax evasion and the resultant loss of revenue, said the development, if not checked, would deprive the residents of the necessary infrastructural development.
The revenue boss, who spoke in Ado Ekiti on Saturday during a meeting with some local government management staff across the 16 council areas of the state, reiterated the Kayode Fayemi administration’s resolve to block all leakages to increase Ekiti IGR, in view of the consistent dwindling revenue accruing to the state from the federation accounts.
He said, “Tax evasion is criminal and it should not happen at a time government is desperately desirous of inventing ways of increasing its internally generated revenue due to the drop in federal allocations.
“In doing this, both state and local governments should be involved in the process of tax and raking in of rates for the development of the state.
“The State House of Assembly had passed the Internally Generated Revenue Bill 2018, which has been signed into law by Governor Fayemi. It spells out the expected taxes to be paid from every quarter and the punitive measures attached to failure to fulfil such constitutional obligations.
“Our people must be responsible enough to see tax payment as an obligation that must be discharged. What makes Lagos and other advanced nations what they are is tax.”
Copyright PUNCH.
All rights reserved. This material, and other digital content on this website, may not be reproduced, published, broadcast, rewritten or redistributed in whole or in part without prior express written permission from PUNCH.
Contact: theeditor@punchng.com