| I l@ve RuBoard |
Container classes, or containers for short, manage a collection of elements. To meet different needs, the STL provides different kinds of containers, as shown in Figure 5.2.
There are two general kinds of containers:
Sequence containers are ordered collections in which every element has a certain position. This position depends on the time and place of the insertion, but it is independent of the value of the element. For example, if you put six elements into a collection by appending each element at the end of the actual collection, these elements are in the exact order in which you put them. The STL contains three predefined sequence container classes: vector, deque, and list.
Associative containers are sorted collections in which the actual position of an element depends on its value due to a certain sorting criterion. If you put six elements into a collection, their order depends only on their value. The order of insertion doesn't matter. The STL contains four predefined associative container classes: set, multiset, map, and multimap.
An associative container can be considered a special kind of sequence container because sorted collections are ordered according to a sorting criterion. You might expect this especially if you have used other libraries of collection classes like those in Smalltalk or the NIHCL,[1] in which sorted collections are derived from ordered collections. However, note that the STL collection types are completely distinct from each other. They have different implementations that are not derived from each other.
[1] The National Institute of Health's Class Library was one of the first class libraries in C++.
The automatic sorting of elements in associative containers does not mean that those containers are especially designed for sorting elements. You can also sort the elements of a sequence container. The key advantage of automatic sorting is better performance when you search elements. In particular, you can always use a binary search, which results in logarithmic complexity rather than linear complexity. For example, this means that for a search in a collection of 1,000 elements you need, on average, only 10 instead of 500 comparisons (see Section 2.3). Thus, automatic sorting is only a (useful) "side effect" of the implementation of an associative container, designed to enable better performance.
The following subsections discuss the different container classes in detail. Among other aspects, they describe how containers are typically implemented. Strictly speaking, the particular implementation of any container is not defined inside the C++ standard library. However, the behavior and complexity specified by the standard do not leave much room for variation. So, in practice, the implementations differ only in minor details. Chapter 6 covers the exact behavior of the container classes. It describes their common and individual abilities, and member functions in detail.
The following sequence containers are predefined in the STL:
Vectors
Deques
Lists
In addition you can use strings and ordinary arrays as a (kind of) sequence container.
A vector manages its elements in a dynamic array. It enables random access, which means you can access each element directly with the corresponding index. Appending and removing elements at the end of the array is very fast.[2] However, inserting an element in the middle or at the beginning of the array takes time because all the following elements have to be moved to make room for it while maintaining the order.
[2] Strictly speaking, appending elements is amortized very fast. An individual append may be slow, when a vector has to reallocate new memory and to copy existing elements into the new memory. However, because such reallocations are rather rare, the operation is very fast in the long term. See page 22 for a discussion of complexity.
The following example defines a vector for integer values, inserts six elements, and prints the elements of the vector:
// stl/vector1.cpp #include <iostream> #include <vector> using namespace std; int main() { vector<int> coll; //vector container for integer elements // append elements with values 1 to 6 for (int i=1; i<=6; ++i) { coll.push_back(i); } //print all elements followed by a space for (int i=0; i<coll.size( ); ++i) { cout << coll[i] << ' '; } cout << endl; }
With
#include <vector>
the header file for vectors is included.
The declaration
vector<int> coll;
creates a vector for elements of type int. The vector is not initialized by any value, so the default constructor creates it as an empty collection.
The push_back() function appends an element to the container:
coll.push_back(i);
This member function is provided for all sequence containers.
The size() member function returns the number of elements of a container:
for (int i=0; i<coll.size(); ++i) { ... }
This function is provided for any container class.
By using the subscript operator [], you can access a single element of a vector:
cout << coll[i] << ' ';
Here the elements are written to the standard output, so the output of the whole program is as follows:
1 2 3 4 5 6
The term deque (it rhymes with "check" [3] ) is an abbreviation for "double-ended queue." It is a dynamic array that is implemented so that it can grow in both directions. Thus, inserting elements at the end and at the beginning is fast. However, inserting elements in the middle takes time because elements must be moved.
[3] It is only a mere accident that "deque" also sounds like "hack" :-).
The following example declares a deque for floating-point values, inserts elements from 1.1 to 6.6 at the front of the container, and prints all elements of the deque:
// stl/deque1.cpp #include <iostream> #include <deque> using namespace std; int main() { deque<float> coll; //deque container for floating-point elements //insert elements from 1.1 to 6.6 each at the front for (int i=1; i<=6; ++i) { coll.push_front(i*1. 1); //insert at the front } //print all elements followed by a space for (int i=0; i<coll.size(); ++i) { cout << coll[i] << ' '; } cout << endl; }
In this example, with
#include <deque>
the header file for deques is included.
The declaration
deque<float> coll;
creates an empty collection of floating-point values.
The push_front() function is used to insert elements:
coll.push_front(i*1.1);
push_front() inserts an element at the front of the collection. Note that this kind of insertion results in a reverse order of the elements because each element gets inserted in front of the previous inserted elements. Thus, the output of the program is as follows:
6.6 5.5 4.4 3.3 2.2 1.1
You could also insert elements in a deque by using the push_back() member function. The push_front() function, however, is not provided for vectors because it would have a bad runtime for vectors (if you insert an element at the front of a vector, all elements have to be moved). Usually, the STL containers provide only those special member functions that in general have "good" timing ("good" timing normally means constant or logarithmic complexity). This prevents a programmer from calling a function that might cause bad performance.
A list is implemented as a doubly linked list of elements. This means each element in a list has its own segment of memory and refers to its predecessor and its successor. Lists do not provide random access. For example, to access the tenth element, you must navigate the first nine elements by following the chain of their links. However, a step to the next or previous element is possible in constant time. Thus, the general access to an arbitrary element takes linear time (the average distance is proportional to the number of elements). This is a lot worse than the amortized constant time provided by vectors and deques.
The advantage of a list is that the insertion or removal of an element is fast at any position. Only the links must be changed. This implies that moving an element in the middle of a list is very fast compared with moving an element in a vector or a deque.
The following example creates an empty list of characters, inserts all characters from 'a' to 'z', and prints all elements by using a loop that actually prints and removes the first element of the collection:
// stl/list1.cpp #include <iostream> #include <list> using namespace std; int main() { list<char> coll; //list container for character elements // append elements from 'a' to 'z' for (char c='a'; c<= ' z '; ++c) { coll.push_back(c); } /* print all elements * - while there are elements * - print and remove the first element */ while (! coll.empty()) { cout << coll.front() << ' '; coll.pop_front(); } cout << endl; }
As usual, the header file for lists, <list>, is used to define a collection of type list for character values:
list<char> coll;
The empty() member function returns whether the container has no elements. The loop continues as long as it returns true (that is, the container contains elements):
while (! coll.empty()) { ... }
Inside the loop, the front() member function returns the actual first element:
cout << coll.front() << ' ';
The pop_front() function removes the first element:
coll.pop_front();
Note that pop_front() does not return the element it removed. Thus, you can't combine the previous two statements into one.
The output of the program depends on the actual character set. For the ASCII character set, it is as follows [4] :
[4] For other character sets the output may contain characters that aren't letters or it may even be empty (if 'z' is not greater than 'a').
a b c d e f g h i j k l m n o p q r s t u v w x y z
Of course it is very strange to "print" the elements of a list by a loop that outputs and removes the actual first element. Usually, you would iterate over all elements. However, direct element access by using operator [] is not provided for lists. This is because lists don't provide random access, and thus using operator [] would cause bad performance. There is another way to loop over the elements and print them by using iterators. After their introduction I will give an example (if you can't wait, go to page 84).
You can also use strings as STL containers. By strings I mean objects of the C++ string classes (basic_string<>, string, and wstring), which are introduced in Chapter 11). Strings are similar to vectors except that their elements are characters. Section 11.2.13, provides details.
Another kind of container is a type of the core C and C++ language rather than a class: an ordinary array that has static or dynamic size. However, ordinary arrays are not STL containers because they don't provide member functions such as size() and empty(). Nevertheless, the STL's design allows you to call algorithms for these ordinary arrays. This is especially useful when you process static arrays of values as an initializer list.
The usage of ordinary arrays is nothing new. What is new is using algorithms for them. This is explained in Section 6.7.2.
Note that in C++ it is no longer necessary to program dynamic arrays directly. Vectors provide all properties of dynamic arrays with a safer and more convenient interface. See Section 6.2.3, for details.
Associative containers sort their elements automatically according to a certain ordering criterion. This criterion takes the form of a function that compares either the value or a special key that is defined for the value. By default, the containers compare the elements or the keys with operator <. However, you can supply your own comparison function to define another ordering criterion.
Associative containers are typically implemented as binary trees. Thus, every element (every node) has one parent and two children. All ancestors to the left have lesser values; all ancestors to the right have greater values. The associative containers differ in the kind of elements they support and how they handle duplicates.
The following associative containers are predefined in the STL. Because you need iterators to access their elements, I do not provide examples until page 87, where I discuss iterators.
Sets
A set is a collection in which elements are sorted according to their own values. Each element may occur only once, thus duplicates are not allowed.
Multisets
A multiset is the same as a set except that duplicates are allowed. Thus, a multiset may contain multiple elements that have the same value.
Maps
A map contains elements that are key/value pairs. Each element has a key that is the basis for the sorting criterion and a value. Each key may occur only once, thus duplicate keys are not allowed. A map can also be used as an associative array, which is an array that has an arbitrary index type (see page 91 for details).
Multimaps
A multimap is the same as a map except that duplicates are allowed. Thus, a multimap may contain multiple elements that have the same key. A multimap can also be used as dictionary. See page 209 for an example.
All of these associative container classes have an optional template argument for the sorting criterion. The default sorting criterion is the operator <. The sorting criterion is also used as the test for equality; that is, two elements are equal if neither is less than the other.
You can consider a set as a special kind of map, in which the value is identical to the key. In fact, all of these associative container types are usually implemented by using the same basic implementation of a binary tree.
In addition to the fundamental container classes, the C++ standard library provides special predefined container adapters that meet special needs. These are implemented by using the fundamental containers classes. The predefined container adapters are as follows:
Stacks
The name says it all. A stack is a container that manages its elements by the LIFO (last-in-first-out) policy.
Queues
A queue is a container that manages its elements by the FIFO (first-in-first-out) policy. That is, it is an ordinary buffer.
Priority Queues
A priority queue is a container in which the elements may have different priorities. The priority is based on a sorting criterion that the programmer may provide (by default, operator < is used). A priority queue is, in effect, a buffer in which the next element is always the element that has the highest priority inside the queue. If more than one element has the highest priority, the order of these elements is undefined.
Container adapters are historically part of the STL. However, from a programmer's view point, they are just special containers that use the general framework of the containers, iterators, and algorithms provided by the STL. Therefore, container adapters are described apart from the STL in Chapter 10.
| I l@ve RuBoard |


smoke
`Prev `__
S
`Next `__
--------------
**smoke**: vi.
1. To `*crash* <../C/crash.html>`__ or blow up, usually spectacularly.
“The new version smoked, just like the last one.” Used for both hardware
(where it often describes an actual physical event), and software (where
it's merely colorful).
2. [from automotive slang] To be conspicuously fast. “That processor
really smokes.” Compare `*magic smoke* <../M/magic-smoke.html>`__.
--------------
+---------------------------+----------------------------+--------------------------------------+
| `Prev `__ | `Up <../S.html>`__ | `Next `__ |
+---------------------------+----------------------------+--------------------------------------+
| smiley | `Home <../index.html>`__ | smoke and mirrors |
+---------------------------+----------------------------+--------------------------------------+


Arizona Man to Plead Guilty to Illegally Making Ammunition Bought by Las Vegas Shooter
by Associated Press(LAS VEGAS) — An Arizona man is due to plead guilty to illegally manufacturing tracer and armor-piercing bullets found in a high-rise hotel suite where a gunman took aim before the Las Vegas Strip massacre two years ago.
Douglas Haig isn’t accused of a direct role in the Oct. 1, 2017, shooting that killed 58 people and injured hundreds at an open-air music festival. It was the deadliest mass shooting in modern U.S. history.
Haig is a 57-year-old aerospace engineer who used to reload bullets at home in Mesa, Arizona, and sell them at gun shows.
His plea expected Tuesday will avoid a trial and mean he can’t possess guns or ammunition.
Defense attorney Marc Victor maintained that Haig couldn’t get a fair trial before a jury in trauma-scarred Las Vegas.


This module displays the billing address that's stored against the customer's record. The visitor must be logged in to a Secure Zone.
{module_billingdetails}


Paging
Select Edit Web Part from the PeopleZen Web Part menu and in the settings
tool-pane, scroll down to the Paging section:
At its top, this section lets you specify the maximum number of user profiles to
show per "page". The default value is 6 and this simply means that no more
than 6 user accounts will ever be listed at once in the Web Part. If there are more
profiles then "paging links" will be shown at the top, allowing end users to navigate
forward or backward in the people listing. To disable paging, simply enter
0.
You can also customize how these paging links are displayed:
- Show current position: — lets you set how to indicate which sub-set
of the overall listing is currently shown:
- (Person) x - y of z — on a listing of 10 people with 4 per page, the
second page would show: 5 - 8 of 10
- (Page) x of y — on a listing of 10 people with 4 per page, the second
page would show: 2 of 3
- (Page) ... | x | y | z | ... — on a listing of 10 people with 4 per
page, the second page would show: 1 | 2 | 3
- (No) — no positional information is displayed
- Prev/Next links: — lets you customize whether and how users can navigate
forward and backward inside the Web Part:
- Text Links — textual links are used, with the labels Back and
Next (customizable via the DIY User Interface Localization tool in
PeopleZen Studio)
- Arrow Icons — small graphical icons are provided for going back (left
arrow) or forward (right arrow)
- (None) — no paging links for step-based navigation are provided
- First/Last links: — lets you customize whether and how users can skip
pages to navigate directly to the very beginning or the end of the entire listing:
- Text Links — textual links are used, with the labels First and
Last (customizable via the DIY User Interface Localization tool in
PeopleZen Studio)
- Arrow Icons — small graphical icons are provided for going to the beginning
(left arrow) or the end (right arrow)
- (None) — no paging links for skip-based navigation are provided


Popovers
Documentation and examples for adding Bootstrap popovers, like those found in iOS, to any element on your site..
{{> (config config.partials.head) title=config.defaultPageTitle }}
{{> (config config.partials.navbar) configClassList=config.classes.navbar classList="" }}Documentation and examples for adding Bootstrap popovers, like those found in iOS, to any element on your site..


Video: Police beat up civilians in Harare
Zimbabwe police officers have fired teargas and used truncheons to violently disperse MDC supporters outside the party’s headquarters in Harare where they were waiting to hear from party leader Nelson Chamisa in a speech dubbed the ‘Hope of the Nation Address’


Technology People & Lists
Top People Tagged technology
Robert Scoble
Technology news, videos, opinions, from an enthusiastic Rackspace employee who grew up in Silicon Valley and has interviewed more than 3,200 geeks.136,023 followers | Follow
HuffPost Tech
The Huffington Post Technology section. Bianca Bosker (@bbosker), Huffington Post Tech Editor-email: technology@huffingtonpost.com7,475 followers | Follow
Google SketchUp
Google SketchUp is fun, easy-to-use 3D modeling software. http://sketchup.google.com10,637 followers | Follow
Google Tech
Google's Tech Team - Here to discuss industry news, data and trends in tech and telecom marketing7,777 followers | Follow
Google I/O
Google's largest developer event on May 19-20th, 2010 at Moscone West, San Francisco33,866 followers | Follow
Wireless Week
offering the latest on wireless news, trends and business analysis.9,056 followers | Follow
Apple & Mac News
Apple Mac news and information sourced from the best Mac related blogs.136,999 followers | Follow
Microsoft Office
Tweets to help you do more with Office at work, home and school.21,809 followers | Follow
Verizon Wireless USA
Official Verizon Wireless Twitter feed for special offers. Get in the know about exclusive deals & offers.21,983 followers | Follow
Telegraph Technology
Emma Barnett and Claudine Beaumont bring you the latest technology news and reviews from Telegraph.co.uk7,925 followers | Follow
Technology UK
The Technology Team at Google UK. All the news that's fit to click.5,426 followers | Follow
Gustavo Cerati
http://cerati.com/biografia/ | Sitio Sony: gustavoceratimusica.com524,318 followers | Follow
Trending in technology
Links
-
IBM Uses Emoticons, Social Media for Predictive Analytics - ReadWriteCloud
[feedproxy.google.com] -
10 Internet of Things Blogs To Keep An Eye On
[feedproxy.google.com] -
Facebook Confirms Its Location Product
[techcrunch.com] -
Foursquare Exceeds 40 Million Check-Ins
[mashable.com] -
Aubrey_Sacco_23_Missing_Nepal_Himalayas from digg.com - StumbleUpon
[stumbleupon.com] -
Twitter Status - Follow bug discovered, remedied.
[status.twitter.com] -
403 Forbidden
[tomamawithlove.org]
People
Terms
Top technology Lists
Most Influential In Tech
People who are ultra influential in and to the technology industry.
Curated by Robert Scoble
People who are ultra influential in and to the technology industry.
Curated by Robert Scoble
7,032 followers
Tech News Brands
The most complete list of tech news sources (from the BBC to TechCrunch)
Curated by Robert Scoble
The most complete list of tech news sources (from the BBC to TechCrunch)
Curated by Robert Scoble
5,288 followers
Tech News People
The journalists who make tech and media news. Mostly pros, but a few bloggers too who do great work.
Curated by Robert Scoble
The journalists who make tech and media news. Mostly pros, but a few bloggers too who do great work.
Curated by Robert Scoble
3,276 followers
venture_capitalists
Venture capitalists and angel investors (tech centric, very complete list)
Curated by Robert Scoble
Venture capitalists and angel investors (tech centric, very complete list)
Curated by Robert Scoble
2,389 followers
Tech Company Executives
Executives of Tech Companies (both big and small). Should be a C-level exec to get on this list (or other notable).
Curated by Robert Scoble
Executives of Tech Companies (both big and small). Should be a C-level exec to get on this list (or other notable).
Curated by Robert Scoble
2,019 followers
Tech Startups
500 startups I've found (I will probably start multiple lists of startups). Mostly tech centric.
Curated by Robert Scoble
500 startups I've found (I will probably start multiple lists of startups). Mostly tech centric.
Curated by Robert Scoble
1,563 followers
Thought Leaders
Smart people worth listening to. Some of them you may even agree with.
Curated by Josh Weinberger
Smart people worth listening to. Some of them you may even agree with.
Curated by Josh Weinberger
1,390 followers
Twitter Giants
All of the must follows of Twitter. Follow this list to find out what's really going on inside the Twitterverse.
Curated by Jason Pollock
All of the must follows of Twitter. Follow this list to find out what's really going on inside the Twitterverse.
Curated by Jason Pollock
1,317 followers
Community
The best way to follow the project management community!
Curated by ProjectManagers.NET
The best way to follow the project management community!
Curated by ProjectManagers.NET
1,277 followers


Maugrinus, Who Didn't Know How to Read and Write
This man is Maugrinus. Whenever money was short his bishop would
summon him, so that he might make provision, presenting a letter in
Maugrinus' presence, and say: "Lord Maugrinus, my eyes are
poor, I cannot at present read this letter; please read it
to me." Indeed that one, who was illiterate, recognizing the
intention of his bishop, opened the letter and said: "Lord,
in this letter it is maintained that you need much money and
that I am to bring ten marks to you." And so the money was
released into the hands of the bishop.


A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi. A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.
A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi. A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.
A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi. A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.
John Doe
A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi. A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.
Reply
Joshua Jnr
A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi. A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.
Reply
John Doe
A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.
Reply
Joshua Jnr
A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.
Reply
John Doe
A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.
Reply
Joshua Jnr
A small river named Yelwa was struck by Tsunamis in some large parts of the region called Bauchi.
Reply


The
WebGL Globe
is an open platform for visualizing geographic data.
•
Get the code
•
By the Google Data Arts Team


{% load i18n %} {% get_current_language as LANGUAGE_CODE %} {% get_available_languages as LANGUAGES %} {% get_current_language_bidi as LANGUAGE_BIDI %}
{% trans "This webapp uses cssjanus.py to convert LTR(left to right) properties and values in a CSS file to RTL counterparts and vice-versa." %}
{% trans "You could also embed this webapp directly in your markup with your publicly accessible CSS files like so:" %}
<style> @import "/do?file=www.yoursite.com/yourcss.css"; </style>


Hello Chicago PHP!
In this presentation, we’ll start with some basic unit tests and progress to more advanced integration testing. We’ll generate code coverage reports that show exactly which lines of code have been tested. We’ll create some integration tests using a GUI that’s as simple as recording an MS Word macro. Finally, we’ll set up a fully automated test harness using a headless browser that can automatically test any PHP code, no matter how it was written.


menu
home
power_settings_new
Mobile
home
power_settings_new
Mobile
All Sales
Select Date:
From:
To:
Orders
Delivery
Take In
Take Away
All Meals
Served By
Type
Locator
Items
Cost
Paid
Change
Status
Actions


Privacy Policy • Terms of Use • Powered By Web2Py
Website content by Skapes Project is licensed under a Creative Commons Attribution 3.0 Unported License.


Toggle navigation
Aircraft
Jack Smith
my account
admin panel
users
security
payments
logout
dashboard
main
user list
user profile
media
calendar
premium features
Enhanced Profile
Blog
Blog Page
Pricing Tables
Upgrade Account
Widgets
Activity Timeline
Enhanced Users List
Enhanced Media
Invoice
Advanced Tools
Additional Color Themes
account
+3
sign in
sign up
reset password
legal
privacy policy
terms and conditions
help
faq
get premium
5
tickets
27
tasks
15
overdue
dashboard
home
dashboard


The native dependencies are only needed on actual Storm clusters. When running Storm in local mode, Storm uses a pure Java messaging system so that you don’t need to install native dependencies on your development machine.
Installing ZeroMQ and JZMQ is usually straightforward. Sometimes, however, people run into issues with autoconf and get strange errors. If you run into any issues, please email the Storm mailing list or come get help in the #storm-user room on freenode.
Storm has been tested with ZeroMQ 2.1.7, and this is the recommended ZeroMQ release that you install. You can download a ZeroMQ release here. Installing ZeroMQ should look something like this:
wget http://download.zeromq.org/zeromq-2.1.7.tar.gz
tar -xzf zeromq-2.1.7.tar.gz
cd zeromq-2.1.7
./configure
make
sudo make install
JZMQ is the Java bindings for ZeroMQ. JZMQ doesn’t have any releases (we’re working with them on that), so there is risk of a regression if you always install from the master branch. To prevent a regression from happening, you should instead install from this fork which is tested to work with Storm. Installing JZMQ should look something like this:
#install jzmq
git clone https://github.com/nathanmarz/jzmq.git
cd jzmq
./autogen.sh
./configure
make
sudo make install
To get the JZMQ build to work, you may need to do one or all of the following:
- Set JAVA_HOME environment variable appropriately
- Install Java dev package (more info here for Mac OSX users)
- Upgrade autoconf on your machine
- Follow the instructions in this blog post
If you run into any errors when running ./configure
, this thread may provide a solution.


recent articles
all tags
Advisories
CVE-2021-34982
NETGEAR Multiple Routers httpd Stack-based Buffer Overflow Remote Code Execution Vulnerability
CVE-2021-34983
NETGEAR Multiple Routers httpd Missing Authentication for Critical Function Information Disclosure Vulnerability


#assign n0_docs="true"> <#assign n1_query="true"> <#assign select= "true">
select
allows us to control the properties that are fetched at the root level
of the graph. We can specify to only select some properties to fetch. The result are beans
that are partially populated.
// "alias" bean that can be used in select and fetch clauses QCustomer cust = QCustomer.alias(); List<|Customer> customers = new QCustomer() // only fetch some properties of customer (partial objects) .select(cust.name, cust.version, cust.whenCreated) .name.istartsWith("Rob") .findList();
With the above we specify the properties we want to fetch. We still get Customer entity beans returned but they are partially populated.
The SQL generated by the above query has:
select t0.id, t0.name, t0.registered, t0.version from customer t0
Note that the @Id
property is automatically included for most queries and it is
automatically exludeded for distinct, findSingleAttribute and aggregation queries.
Using query beans to define the select properties provides a type safe way to define what part of the object graph to fetch.
The same query written using the query expression API is:
List<|Customer> customers = database.find(Customer.class) .select("name, registered, version") .findList();
Each query bean has a static alias()
method that returns a query
bean that we use to specify properties for fetch in select()
and
fetch()
.
// customer "alias" QCustomer cust = QCustomer.alias(); // contact "alias" QCustomer con = QContact.alias(); List<|Customer> customers = new QCustomer() .select(cust.name, cust.version, cust.whenCreated) .contacts.fetch(con.firstName, con.LastName, con.email) .name.istartsWith("Rob") .findList();
In the above we have alias beans for customer and contact. We use those to specify which specific properties we want to fetch.
Note that we can assign alias()
to a static final field.
private static final QCustomer CUST = QCustomer.alias(); ... List<|Customer> customers = new QCustomer() .select(CUST.name) .name.istartsWith("Rob") .findList();
As an alternative to the alias()
method each query bean also provides
a static Alias
class for the case where we rather use static imports.
For example, we can use QCustomer.Alias to specify properties of customer like the below:
List<|Customer> customers = new QCustomer() .select(QCustomer.Alias.name, QCustomer.Alias.whenCreated) .findList();
We can then change these to use static imports to get:
import static org.domain.query.QCustomer.Alias.name; import static org.domain.query.QCustomer.Alias.whenCreated; ... List<|Customer> customers = new QCustomer() .select(name, whenCreated) // using static imports of QCustomer.Alias .findList();
The limitation of using Alias like this is that if we do this for multiple query bean types (like QCustomer.Alias and QContact.Alias) then we might get a name clash. For example, if both had a property called whenCreated we can only static import one of them.
import static ...query.QCustomer.Alias.name; import static ...query.QCustomer.Alias.version; import static ...query.QCustomer.Alias.whenCreated; import static ...query.QContact.Alias.firstName; import static ...query.QContact.Alias.lastName; // Use explicit QContact.Alias.whenCreated (as clash with QCustomer.Alias.whenCreated) List<|Customer> customers = new QCustomer() .select(name, version, whenCreated) .contacts.fetch(firstName, lastName, QContact.Alias.whenCreated) .name.istartsWith("Rob") .findList();
We need to use this string select clause when we want to specify a formula.
```java // java List<|String> names = new QContact() .select("concat(lastName,', ',firstName)") .lastName.startsWith("A") .findSingleAttributeList(); ``` ```java // kotlin var names: List<|String> = QContact() .select("concat(lastName,' ',firstName)") .lastName.startsWith("A") .findSingleAttributeList() ```
With this example we explicitly cast to a Java BigDecimal type using
the ::BigDecimal
cast at the end of the formula.
When we use a select formula we sometimes want to return the result into a plain DTO bean
rather than an entity bean. We do this using .asDto(Class<D>)
to turn the ORM query
into a DtoQuery.
For more details refer to DTO queries.
```java // ContactDto is a plain bean with email and fullName properties List<|ContactDto> contacts = new QContact() .select("email, concat(lastName, ', ', firstName) as fullName") .lastName.startsWith("A") .orderBy() .lastName.asc() .setMaxRows(10) .asDto(ContactDto.class) .findList(); ```
Similar to formula queries we can use the standard aggregations of
SUM, MAX, MIN, AVG and COUNT
in the select clause.
For more details refer to Aggregation queries.
When multiple column aggregation query we use the string select clause.
```java List<|MachineStats> result = new QMachineStats() .select("machine, date, max(rate)") .date.gt(LocalDate.now().minusDays(10)) .query().having().gt("max(rate)", 4) .findList(); ```The above query produces the following sql:
```sql select t0.machine_id, t0.date, max(t0.rate) from d_machine_stats t0 where t0.date > ? group by t0.machine_id, t0.date having max(t0.rate) > ? ``` <@next_edit "Fetch" "/docs/query/fetch" "/docs/query/select.html"/>


Vodafone Idea, Bharti Airtel continue rally for fourth consecutive session
Bharti Airtel and Vodafone Idea on Monday announced a hike in mobile phone call and data charges.
by PTIShares of Vodafone Idea and Bharti Airtel remained in heavy demand on Wednesday, with the former surging up to 32%, after announcing a hike in mobile phone call and data charges from December.
Vodafone Idea shares zoomed 31.72% to ₹7.93 on the BSE. This is the fourth consecutive day of rise in Vodafone Idea shares. During this time, the scrip has more than doubled.
Bharti Airtel also rose 3.11% to hit its 52-week high of ₹452.95, registering its fourth consecutive day of gain. In four days, the stock has gained 24.90%.
Faced with intense competition and unprecedented statutory dues, Bharti Airtel and Vodafone Idea on Monday announced a hike in mobile phone call and data charges from December saying the increase was warranted for viability of their business.
“To ensure that its customers continue to enjoy world class digital experiences, Vodafone Idea will suitably increase the prices of its tariffs effective December 1, 2019,” Vodafone Idea had said.
The telecom sector is highly capital-intensive with fast-changing technology cycles that require continuing investments, Bharti Airtel said.
“It is, therefore, extremely important that the industry remains viable to support the vision of Digital India. Accordingly, Airtel will appropriately increase price offerings in the month beginning December,” it added.
Explained | Vodafone and Airtel's historic losses


Prototype of an e-commerce app that allows you to share bulk purchases with other people in your neighbourhood.
To come up with an e-commerce mobile application that had a unique feature and designing an interactive prototype for it within a few weeks.
I started off with doing research on the current e-commerce apps that were available and taking note of their strengths and weaknesses. I then came up with a rough ideas after ideation and sent out surveys to determine if the idea was not redundant. After that I came up with the key features, did more research, sketched wireframes, designed a style guide, made mockups then linked them to create the interactive prototype. Next, I got people to user test then made changes until I ended up with the final product.
-
Adobe Xd
UI/UX


Glossary
A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | Q | R | S | T | U | V | W | X
A
- aliasing
- The jagged stair-stepped edges that can appear between colors in a bitmapped graphic.
- anchor
- The HTML element responsible for making hyperlinks.
- applet
- A self-contained, mini-executable program, such as one written in the Java programming language.
- attribute
- Parameters that extend or modify an HTML element
TOP
B
- backend
- Aspects of a web site that pertain to functions that take place on the server
- bit depth
- A measurement of colors based on the number of bits alloted by the file or system
- browser
- The client software that requests and displays web pages.
TOP
C
- cache
- Temporary storage area that browsers use for downloaded documents
- CGI
- Common Gateway Interface, a mechanism for communication between the web server and other programs running on the server
- codec
- An algorithm used by media files for compressing and decompressing data
- compression
- A method for reducing the file size of a document. Different file formats use different compression techniques
TOP
D
- dithering
- The approximation of a color by mixing pixels of similar colors that are available in the image or system palette.
- Document Type Definition (DTD)
- An XML document that defines every element and attribute for a markup language.
- domain name
- A name that corresponds to a specific IP address.
TOP
E
- extranet
- A web site or system that is available within a closed system and to select users outside that system, usually via a password.
TOP
F
- Flash
- A multimedia format for the delivery of animation, interactivity, and audio on the Web
- frame rate
- In video and animation, the number of frames per second
- FTP
- File Transfer Protocol; a system for moving files over the Internet from one computer to another
TOP
G
- gamma
- Refers to the overall brightness of a computer's monitor display.
- GIF
- Graphic Interchange Format; common file format of web graphic images. GIF is a palette-based, 8-bit format.
TOP
H
- hexadecimal
- A base-16 numbering system that uses the characters 0-9 and A-F. It is used in CSS and HTML for specifying color values
- host
- Another term for the server. Hosting services are companies that provide server space for web sites.
- HTML
- HyperText Markup Language; the tagging language used to identify the structure of web documents.
- HTTP
- Hypertext Transfer Protocol; the system that defines how web pages and media are requested and transferred between servers and browsers.
TOP
I
- imagemap
- A single image that contains multiple hypertext links
- IP address
- A numeric identifier for a computer or device on a network.
- ISP
- Internet Service Provider; a company that sells access to the Internet computer network
TOP
J
- Java
- A cross-platform, object-oriented programming language developed by Sun Microsystems.
- JavaScript
- A scripting language that adds behaviors to elements on web pages and browsers.
TOP
L
- lossy
- A type of compression in which data is thrown out to reduce file size. The JPEG format uses a lossy compression scheme.
TOP
M
- MP3
- A popuplar file format for high-quality audio that uses MPEG compression
- MPEG
- A family of multimedia standards created by the Motion Picture Experts Group
TOP
N
- nesting
- Placing one HTML element within another. HTML and XHTML define rules for what elements may be nested within another.
TOP
O
- optimizing
- Reducing file size to improve transfer time over the network.
TOP
P
- palette
- A table in an 8-bit indexed color file that provides color information for the pixels in the image.
- pathname
- Directions to a file using a nomenclature in which directory hierarchies and filenames are separated by slashes
- pixel
- A single square in a bitmapped graphic image
- PNG
- Portable Network Graphic; a graphic file format that features support for 8-bit and 24 bit images
TOP
Q
- QuickTime
- An audio and video format developed by Apple Computer and available for all platforms
TOP
R
- resolution
- The number of pixels per inch (ppi) in a bitmapped image or computer monitor
- RGB color
- A color system that describes color based on combinations of red, green, and blue light
- root directory
- The top-level directory for a web site. The root directory contains all the files and subdirectories for a site.
TOP
S
- sans-serif font
- A font design featuring straight or squared off character strokes. Helvetica is an example.
- serif font
- A font that has horizontal slabs at the ends of character strokes. Times is an example
TOP
T
- tweening
- A function in animation tools for automatically creating frames between a start and end frame.
TOP
U
- Unix
- A multi-user, multi-tasking operating system developed by Bell Laboratories.
- URL
- Universal Resource Locator; the address of a document or resource on the World Wide Web
TOP
V
- vector image
- A graphic that uses mathematical equations to define shapes and fills. Vector images can be resized without change in quality.
TOP
W
- W3C
- The World Wide Web Consortium; a consortium of companies and organizations that develops common standards for the development of the Web.
- web palette
- A set of 216 colors that is available on both Mac and Windows machines running 8-bit color monitors.
TOP
X
- XHTML
- The new HTML standard that has been written according to the rules of XML.
- XML
- eXtensible Markup Language; a metalanguage for creating custom markup languages
TOP


Introduction
Autodesk FormIt 360 is an architectural modeling softwarefor architects to sketch, collaborate, analyze, revise early-stage design concepts.
In the class of Needs Assessment and Usability Evaluation, I worked in a team of 4 to conduct user research on Autodesk FormIt 360 for our client, Autodesk.


This is a class room. This is a class room. This is a class room.This is a class room.This is a class room.
This is a class room. This is a class room. This is a class room.This is a class room.This is a class room.
This is a class room. This is a class room. This is a class room.This is a class room.This is a class room.
This is a class room. This is a class room. This is a class room.This is a class room.This is a class room.
This is a class room. This is a class room. This is a class room.This is a class room.This is a class room.
This is a class room. This is a class room. This is a class room.This is a class room.This is a class room.
| Emp No | Name | Salary |
|---|---|---|
| 1 | RamPrakash | 1000 |
| 2 | Krishnu | 1000 |
| 3 | Ram | 1000 |
| 4 | Ram | 1000 |
| 5 | Ram | 1000 |
| 6 | Ram | 1000 |