If you already know about linked lists and want to go into the specific sections then click one of the sections below.
1. 1D Arrays
2. Static vs Dyanmic Arrays
3. 2D Arrays
4. Big O of Arrays
Arrays are a data structure where a fixed number of values are held.
1D arrays are just an array with 1 dimension, meaning the area is 1 * n and n is the size which we declared.
In the image below, we declared an array in Java with a fixed length. Also, every array has default values once initialized, the default values depend on the type such as, String, int, and etc.
So how can we declare a value?
We just need to set the value using an index which is an access to that value in the array.
The small values at the bottom of the array are indexes. We can set it to any value using that.
In addition, the range of indexes is 0 to the length of an array minus 1. Anything out of that range makes it invalid.
What if we set the value to an index that is out of bounds?
An out of bounds exception is thrown WHICH WE DO NOT WANT.
Here are some more array value declarations. The image on the right shows the before and the image on the left shows after the declarations.
As you can see we have compared two arrays. But how we can return true if two arrays have the same values?
We can use the Arrays.equals() method to see if the arrays have the same values or not
How can we traverse through this array?
Hint: use the indexes
We can use the for loop and go through the array using indexes.
We can use the for loop for many functions. Also, the image on the rights shows how we can do it in a while loop.
Please note: SOP stands for System.out.println(); It was just an abbreviation I used due to lack of space.
Here are the common exceptions of arrays and the reasons behind it.
Suppose we have a problem where we want to double each element.
For each element we can multiply it by two to double it. The Java implementation is located below.
Java Implementation
Suppose we wanted to reverse an array. Before going below the page think about how we can reverse it.
We can have two pointers: one at the beginning and one at the end. We can switch the values of the pointers with each other and increase the left pointer and decrease the right pointer. We can keep on doing that until they reach other.
Now try to apply the reverse algorithm on this and see what happens.
As you can see in this case we have to stop when the pointers surpass cross each other. We have two cases where we have to stop which are if the pointers cross each other or if they meet each other. Now try to implement it in Java. The implementation is located below.
Here is the Java implementation.
Lets look at these two 1D arrays problems below.
For this problem, we have to find the largest element of the array.
Answer with explanation is at the bottom.
For this problem, we have to return an array that is rotated k times.
Answer with explanation is at the bottom.
Static Arrays and Dynamic Arrays are a lot similar, except size and its implementation in Java.
While dynamic arrays have the same Big O, its concept of insertions can be different.
2D arrays are arrays with an n*m dimension. It makes like a grid like array with values.
Here is how we can correctly set the values of the arrays. Also, we have set them at a valid range like we did in 1D arrays.
We can use a nested for loop to traverse them. For each sub array, we go through each element of the sub array.
For this problem, we can use a nested for loop to traverse them and see if the value matches the target and if it does then we can increase the count. Now try to implement in Java. The Java implementation is located below.
Java implementation is located below.
Lets look at this problem where we have to find the average of all of the elements.
Answer with explanation is at the bottom.
This chart goes over the Big O of arrays.
Arrays hold n items which is why the space complexity is O(n).


100 your web experience is loading right now !
please wait
few seconds 😋
Hello! My name is Lakshay and I enjoy creating things that live on the internet.
Seeking an entry-level opportunity where I can utilize my skills and enhance learning through implementation. I enjoy learning new things and can assimilate new ideas quickly
Well-versed in numerous programming languages including:
Featured Project
Defi Token Farm, Stake tokens and get interest on them.
Featured Project
Ethereum Blockchain Marketplace Dapp where buyer can sells their products for Ethereum.
Featured Project
A website that stores secrets build with passportJs.
Featured Project
Basic Personal Blog Website that stores blogs in database.
Featured Project
NodeJS based Email Newsletter that stores your name and email in the database.
Featured Project
A nicer look at your Ip Address with timezone.
Featured Project
A beautifull space environment website. [Only Desktop Version]
Discuss a project or just want to say hi? my inbox is open for all.
Designed and Build by ©Lakshay Maini


Match Play. Double Match Point. How should Red play 66?
pips Red=115 White=90
(CorrectAnswer= 0/0, ErrorScore= 0)
With no cube and no gammons Red must make the play the play that gives him the best chance of winning the game.
He can play for contact with 23/17(2), 8/2(2) or simply race with 23/11(2).
The problem with playing for contact is that he may have to break first and/or he may have to crash his home board which will diminish his racing chances.
The racing play 23/11(2) turns out to be best although he enters the race one pip behind. This play wins 40% of the time, the contact play only wins 38.6% of the time. QED, 23/11(2) is correct.
He can play for contact with 23/17(2), 8/2(2) or simply race with 23/11(2).
The problem with playing for contact is that he may have to break first and/or he may have to crash his home board which will diminish his racing chances.
The racing play 23/11(2) turns out to be best although he enters the race one pip behind. This play wins 40% of the time, the contact play only wins 38.6% of the time. QED, 23/11(2) is correct.
1. Cubeful 2-ply 24/23 7/6 3/2*(2) Eq.: +0.732 0.642 0.254 0.002 - 0.358 0.073 0.002 2. Cubeful 2-ply 24/22 3/2*(2) Eq.: +0.720 (-0.012) 0.649 0.267 0.002 - 0.351 0.076 0.003 3. Cubeful 2-ply 4/2*(2) Eq.: +0.666 (-0.066) 0.619 0.247 0.001 - 0.381 0.083 0.003 4. Cubeful 2-ply 24/23 7/5 6/5 Eq.: +0.663 (-0.069) 0.620 0.233 0.003 - 0.380 0.068 0.002 5. Cubeful 0-ply 7/5 3/2*(2) Eq.: +0.519 (-0.213) 0.581 0.266 0.002 - 0.419 0.106 0.004


There are few ways to make some animation:
.animate()
Animation
Click "Run" button to see animations in action.


Retrieves the phases present in a Solver output file.
int jmpGetFoundPhases (int *numPhases, char **phaseList);
numPhases [output]
Pointer to an integer that will contain the number of phases found in the Solver output file.
phaseList [output]
Pointer to an array that will be filled with null-terminated sequences of characters representing each of the phases found in the Solver output file.
JMP_STATUS_OK |
Request has been successfully completed. |
JMP_STATUS_ERROR |
An error has occurred. |
summary.out
. However, a similar file with a different name may be specified, using jmpSetSummaryReadMode() and jmpSetUserFilename().
// Required variables
const int maxNumPhases = 100;
const int bufferSize = 30;
int i, status, numPhases;
char **phaseList;
// Allocate memory to store the list of phases
phaseList = new char *[maxNumPhases];
for (i = 0; i < maxNumPhases; i++)
phaseList [i] = new char [bufferSize];
// Retrieve the number of phases found and fill the phaseList array
status = jmpGetFoundPhases (&numPhases, phaseList);
if (status == JMP_STATUS_OK)
{
// Use the list of phases here
}
// Free memory after use
for (i = 0; i < maxNumPhases; i++)
delete [] phaseList [i];
delete [] phaseList;
| Headers | jmpcore.h jmpcoldfire.h |
| Library | jmpcoldfire.lib /jmpcoldfire_x64.lib |
| DLL | jmpcoldfire.dll /jmpcoldfire_x64.dll |


Toggle navigation
Uploader
Help
Upload file here
Use a drag & drop technique, the file will be uploaded immediately.
Hint: If you want to upload a whole folder, pack it using zip.


Hewlett Packard Enterprise
Software Engineering Intern
-
Developed a backend program with Golang to validate HPE Primera Storage system update recommendations, and generated feedbacks, such as types, locations, and short descriptions of errors, in JSON and text format
-
Refactored code to setup virtual system update recommendations by reading from local test files in test mode
-
Designed 13 test cases and debugged test failures on system update functionality to make the system update more robust
-
Improved user experience by reducing possible update failures and provided related error reporting for internal use


"Love and energy is what it takes to win games. When teams love each other, you win," McClure said. "And my High school team, we loved each other. We did things outside of practice. And I made sure that everyone felt heard and felt like they were a person ... everyone wanted to play, everybody wanted to give their all and that's what made it so much fun."
As a daughter of a former Louisville football player, sports were an essential part of the childhoods of Jaya and her twin brother Jordan. By eight years old, Jaya was already involved in tennis, fencing and swimming. McClure didn't start playing basketball until the seventh grade, but the competitive nature of her family pushed her to be the best person she could be on and off the court.
McClure blossomed as a player in high school, where she was voted to the All-Tourney team three times. McClure took the next leap in her game as a senior in high school, and by the end of the year, she was a Ms. Kentucky Basketball candidate and a Mcdonald's All-American nominee.
Jordan McClure had fewer opportunities than his sister during his high school career, but he worked hard to garner interest at the collegiate level. Jordan's determination and work ethic is inspirational to Jaya.
"He is one of the hardest workers I know ," McClure said. "And his passion and love for basketball is real.
More recently, Jordan suffered a wrist injury that may threaten his basketball career, but Jaya has used his hardships as fuel to improve.
"My brother redshirted his freshman year and he's been dealing with a wrist injury," McClure said. "So it's looking like he may never play basketball again. So with that on my mind recently, that's been fueling me too."
McClure has had high expectations for herself on and off the court since high school. During her senior year, McClure was honored with the Donna LJ Award, given to a female senior basketball player who "exemplifies the meaning of a great student athlete."
McClure has taken her academic initiative to Ohio University, as she is majoring in neuroscience. Although McClure's academic initiative has made her transition from high school to college more difficult, her academic obstacles help her on the court.
"How you do anything is how you do everything. My mom always made that important in our family," McClure said. " ... So when I push myself in school, I push myself in basketball. I push myself in every way."
With Yaya Felder already established as Ohio's point guard coming into the season, it seemed unlikely that McClure and Felder could share the court as starters during a large portion of the season, and in the nonconference play, they didn't.
However, McClure still found ways to score and impact the game coming off the bench. McClure's first standout performance was on Dec. 21 in her home state, when Ohio took on Kentucky. McClure had what was at the time a season-high of 15 points.
McClure got off to a bit of a slow start scoring the basketball in Mid-American Conference play, but as she gained playing time with Felder, the chemistry between the two players began to mount.
When Caitlyn Kroll went down with a season-ending injury, McClure was forced to make the first start of her college basketball career alongside Felder. The two immediately looked like a natural fit; Felder and McClure combined for 54 points. McClure played all 40 minutes in Ohio's 83-75 win, and finished with new career-highs of 22 points and seven assists.
McClure credits the support her family has given her for the confidence she had in her first-ever start as a Bobcat.
"My parents and my brother are the biggest supporters of me," said McClure. "And they've instilled confidence in me."
After a bumpy start to the Bobcats' season, which included just two wins in their first 16 games, the team has steadied the ship and won two of their last fou games. McClure's emergence as a strong second option to Felder in the backcourt has the Bobcats playing with more energy than they had at the beginning of the season.
Possibly the most important growth is off the court. McClure feels like as the season has progressed, the Bobcats feel more like a family.
"We're just having more fun with each other, and enjoying each other," McClure said. "And you can see the synergy on the court. We have definitely grown as friends and as teammates. And that's only going to get better as the years continue."
As McClure learned through her four years at the Christian Academy of Louisville, love and family are the key to winning championships.


CSPICE_DSKB02 return bookkeeping data from a DSK type 2 segment.
Given:
handle the handle of a DSK file containing a type 2
segment from which data are to be fetched.
[1,1] = size(handle); int32 = class(handle)
dladsc the DLA descriptor associated with the segment
from which data are to be fetched.
[SPICE_DLA_DSCSIZ,1] = size(dladsc)
int32 = class(dladsc)
the call:
returns:
nv the number of vertices belonging to the specified plate
model.
[1,1] = size(nv); int32 = class(nv)
np the number of plates belonging to the specified plate
model.
[1,1] = size(np); int32 = class(np)
nvxtot Total number of voxels in fine grid.
[1,1] = size(nvxtot); int32 = class(nvxtot)
vtxbds Vertex bounds. This is an array of six values giving
the minimum and maximum values of each component of
the vertex set. Units are km.
[2,3] = size(vtxbds); double = class(vtxbds)
voxsiz Fine grid voxel size. DSK voxels are cubes; the edge
length of each cube is given by the voxel size. This
size applies to the fine voxel grid. Units are km.
[1,1] = size(voxsiz); double = class(voxsiz)
voxori Voxel grid origin. This is the location of the voxel
grid origin in the body-fixed frame associated with
the target body. Units are km.
[3,1] = size(voxori); double = class(voxori)
vgrext Voxel grid extent. This extent is an array of three
integers indicating the number of voxels in the X, Y, and
Z directions in the fine voxel grid.
[3,1] = size(vgrext); int32 = class(vgrext)
cgscal Coarse voxel grid scale. The extent of the fine voxel
grid is related to the extent of the coarse voxel grid by
this scale factor.
[1,1] = size(cgscal); int32 = class(cgscal)
vtxnpl Vertex-plate correspondence list size.
[1,1] = size(vtxnpl); int32 = class(vtxnpl)
voxnpt Size of the voxel-to-plate pointer list.
[1,1] = size(voxnpt); int32 = class(voxnpt)
voxnpl Voxel-plate correspondence list size.
[1,1] = size(voxnpl); int32 = class(voxnpl)
Any numerical results shown for this example may differ between
platforms as the results depend on the SPICE kernels used as input
and the machine specific arithmetic implementation.
Example(1):
Dump several parameters from the first DLA segment of
a DSK file. The segment is assumed to be of type 2.
function dskb02_t( dsk )
%
% Open the DSK file for read access. We use the
% DAS-level interface for this function.
%
handle = cspice_dasopr( dsk );
%
% Begin a forward search through the kernel. In
% this example, it's a very short search.
%
[ dladsc, found] = cspice_dlabfs( handle );
if ~found
txt = sprintf( ...
'SPICE(NOSEGMENT): No segment found in file %s.', ...
dsk);
error(txt)
end
%
% Loop over each segment.
%
while found
%
% If we made it this far, DLADSC is the
% DLA descriptor of the first segment.
% Read and display type 2 bookkeeping data.
%
[ nv, np, nvxtot, vtxbds, voxsiz, voxori, vgrext, ...
cgscal, vtxnpl, voxnpt, voxnpl] = cspice_dskb02( handle, dladsc);
fprintf( ['\n' ...
'Number of vertices: %ld\n' ...
'Number of plates: %ld\n' ...
'Number of voxels: %ld\n' ...
'Vertex bounds in X direction (km): %f : %f\n' ...
'Vertex bounds in Y direction (km): %f : %f\n' ...
'Vertex bounds in Z direction (km): %f : %f\n' ...
'Voxel edge length (km): %f\n' ...
'Voxel grid origin (km): ( %f %f %f )\n' ...
'Voxel grid extents: %ld %ld %ld\n'...
'Coarse voxel grid scale: %ld\n' ...
'Size of vertex-plate list: %ld\n' ...
'Size of voxel-plate pointer array: %ld\n' ...
'Size of voxel-plate list: %ld\n'], ...
nv, ...
np, ...
nvxtot, ...
vtxbds(1,1), vtxbds(2,1), ...
vtxbds(1,2), vtxbds(2,2), ...
vtxbds(1,3), vtxbds(2,3), ...
voxsiz, ...
voxori(1), voxori(2), voxori(3), ...
vgrext(1), vgrext(2), vgrext(3), ...
cgscal, ...
vtxnpl, ...
voxnpt, ...
voxnpl )
%
% Search for the segment after that described by 'dladsc'.
% 'found' returns as false if no such segment located.
%
[nxtdsc, found] = cspice_dlafns( handle, dladsc);
dladsc = nxtdsc;
end
%
% Close the kernel. This frees program and system resources.
%
cspice_dascls( handle );
MATLAB outputs:
>> dskb02_t( 'phobos512.bds' )
Number of vertices: 1579014
Number of plates: 3145728
Number of voxels: 11914500
Vertex bounds in X direction (km): -13.440030 : 12.762800
Vertex bounds in Y direction (km): -11.520650 : 12.061140
Vertex bounds in Z direction (km): -9.570780 : 10.055000
Voxel edge length (km): 0.104248
Voxel grid origin (km): ( -14.073520 -11.988554 -9.903588 )
Voxel grid extents: 260 235 195
Coarse voxel grid scale: 5
Size of vertex-plate list: 11010050
Size of voxel-plate pointer array: 1151500
Size of voxel-plate list: 6419540
This routine supports computations involving bookkeeping information
stored in DSK type 2 segments. User applications typically will not
need to call this routine.
DSK files are built using the DLA low-level format and the DAS
architecture; DLA files are a specialized type of DAS file in which
data are organized as a doubly linked list of segments. Each
segment's data belong to contiguous components of character, double
precision, and integer type.
For important details concerning this module's function, please
refer to the CSPICE routine dskb02_c.
MICE.REQ
DAS.REQ
DSK.REQ
-Mice Version 1.0.0, 27-APR-2016, EDW (JPL), NJB (JPL)
fetch parameters from a type 2 dsk segment
|


TV Ratings: 'Mayans MC' Finale Makes Huge Leap After 3 Days
The FX drama climbs almost 100 spots in the 18-49 rankings for the week of Nov. 4 thanks to delayed viewing.
by Rick PorterHere's how big an effect delayed viewing can have on TV shows: The initial airing for the second-season finale of FX's Mayans MC drew a 0.33 rating among adults 18-49 and 950,000 total viewers. Those numbers ranked 171st and 280th among all primetime broadcast and cable shows for the week of Nov. 4.
After three days of delayed viewing, the finale added 0.55 to its 18-49 rating and 1.43 million viewers — and jumped 98 spots in the 18-49 rankings (to 73rd overall) and a whopping 163 spots in viewers (to 117th).
Fellow FX series American Horror Story also made big jumps up the rankings, rising from 91st to 32nd in adults 18-49 (0.49 to 1.18) and from 239th to 112th in viewers (1.05 million to 2.48 million).
Among network shows, ABC's The Rookie climbed 41 spots in adults 18-49 (from 76th to 35th), and NBC's Will & Grace rose 47 places in viewers, going from 113th to 66th.
Below are the 20 broadcast and cable shows with the biggest three-day gains in the week of Nov. 4. NBC's This Is Us posted the largest 18-49 gain (as it's done every week of the season so far), and ABC's The Good Doctor added the most viewers.
Adults 18-49
| Show | Network | Live-plus-3 18-49 rating | Change from live-plus-SD | Percent change from live-plus-SD |
| This Is Us | NBC | 2.36 | 1.03 | 78% |
| Grey's Anatomy | ABC | 2.09 | 0.83 | 66% |
| The Masked Singer | Fox | 2.77 | 0.78 | 39% |
| 911 | Fox | 2.1 | 0.77 | 58% |
| The Good Doctor | ABC | 1.42 | 0.73 | 106% |
| The Walking Dead | AMC | 1.76 | 0.7 | 67% |
| American Horror Story | FX | 1.18 | 0.69 | 141% |
| Law & Order: SVU | NBC | 1.34 | 0.69 | 106% |
| Modern Family | ABC | 1.58 | 0.66 | 72% |
| New Amsterdam | NBC | 1.35 | 0.66 | 95% |
| Chicago PD | NBC | 1.61 | 0.66 | 69% |
| The Little Mermaid Live | ABC | 3.2 | 0.61 | 23% |
| The Rookie | ABC | 1.15 | 0.59 | 106% |
| A Million Little Things | ABC | 1.34 | 0.58 | 77% |
| Mayans MC | FX | 0.88 | 0.55 | 169% |
| Chicago Fire | NBC | 1.59 | 0.54 | 51% |
| How to Get Away With Murder | ABC | 0.92 | 0.49 | 111% |
| Prodigal Son | Fox | 1.22 | 0.48 | 65% |
| SWAT | CBS | 1.02 | 0.48 | 88% |
| The Real Housewives of O.C. | Bravo | 0.87 | 0.47 | 115% |
Total Viewers
| Show | Network | Live-plus-3 viewers (000s) | Change from live-plus-SD | Percent change from live-plus-SD |
| The Good Doctor | ABC | 8,985 | 3,860 | 75% |
| Blue Bloods | CBS | 11,003 | 3,613 | 49% |
| New Amsterdam | NBC | 8,560 | 3,604 | 73% |
| This Is Us | NBC | 10,172 | 3,453 | 51% |
| Chicago PD | NBC | 9,695 | 3,251 | 50% |
| Bull | CBS | 8,970 | 3,241 | 57% |
| The Rookie | ABC | 6,898 | 3,171 | 85% |
| 911 | Fox | 9,107 | 3,027 | 50% |
| Chicago Fire | NBC | 10,475 | 2,797 | 36% |
| NCIS | CBS | 13,676 | 2,796 | 26% |
| NCIS: New Orleans | CBS | 9,254 | 2,640 | 40% |
| FBI | CBS | 11,145 | 2,601 | 30% |
| SWAT | CBS | 6,426 | 2,591 | 68% |
| Law & Order: SVU | NBC | 6,099 | 2,510 | 70% |
| Grey's Anatomy | ABC | 8,540 | 2,380 | 39% |
| Stumptown | ABC | 5,185 | 2,361 | 84% |
| Chicago Med | NBC | 10,445 | 2,356 | 29% |
| The Blacklist | NBC | 6,488 | 2,296 | 55% |
| SEAL Team | CBS | 6,814 | 2,294 | 51% |
| The Masked Singer | Fox | 9,345 | 2,240 | 32% |
Source: Nielsen


Details
Snapshot
{{interviewDetails.designation}}
{{interviewDetails.company.name}}
{{convertReadabaleDate(interviewDetails.date)}} at {{interviewDetails.time}}
Address
{{interviewDetails.company.address.addressLine}}
{{interviewDetails.company.address.city}}
{{interviewDetails.company.address.state}}, {{interviewDetails.company.address.zipCode}}
Supervisors Contact
{{interviewDetails.contact.name}}
{{interviewDetails.contact.email}}
{{formatUSNumber(interviewDetails.contact.phone)}}
0">
View Job Description


{{define "title"}}Inbucket Status{{end}} {{define "script"}} {{end}} {{define "menu"}}
Metrics are polled every 10 seconds. Inbucket does not keep history for the 10 minute graphs, but your web browser will accumulate the data over time.
| Version: | {{.version}}, built on {{.buildDate}} |
|---|---|
| SMTP Listener: | {{.smtpListener}} |
| POP3 Listener: | {{.pop3Listener}} |
| HTTP Listener: | {{.webListener}} |
| Uptime: | . | ||
|---|---|---|---|
| System Memory: | . | . | (10min) |
| Heap Size: | . | . | (10min) |
| Heap In-Use: | . | . | (10min) |
| Heap # Objects: | . | . | (10min) |
| Current Connections: | . | . | (10min) |
|---|---|---|---|
| Total Connections: | . | . | (60min) |
| Messages Received: | . | . | (60min) |
| Errors Logged: | . | (60min) | |
| Warnings Logged: | . | (60min) |
| Retention Period: | {{if .retentionMinutes}} . {{else}} Disabled {{end}} | ||
|---|---|---|---|
| Retention Scan: | {{if .retentionMinutes}} Completed . ago {{else}} Disabled {{end}} | ||
| Retention Deletes: | . | (60min) | |
| Currently Retained: | . | (60min) |


Florida: Essays and Poems
by FCIT
Orange Song
by Clinton Scollard
Additional Information
- Year Published: 1892
- Language: English
- Country of Origin: United States of America
- Source: This book was compiled by the Florida Center for Instructional Technology and includes passages from multiple sources. Please refer to the passage pages for further source information.
-
Readability:
- Flesch–Kincaid Level: 4.0
- Word Count: 91
- Genre: Poetry
- Keywords: agriculture, florida
- ✎ Cite This
Downloads
The orange glows
In our garden-close
Under the noon
And under the moon,
And though winter-time
Is at its prime,
It seems like the heart of June,
And the mocking-bird sings at the dawning hour
To the orange fruit and the orange flower.
Cold is the theme
Of a bygone dream
Under the noon
And under the moon,
For the breeze has a scent
That is redolent
As a breath from the heart of June,
And the mocking-bird sings at the dawning hour
To the orange fruit and the orange flower.


FROM : MRS ASHIA HASSAN PRAISE ALLAH, THE MOST BENEVOLENT I am the above named person from Kuwait. I am married to Late herina bana of blessed memory who worked with Kuwait embassy in Sudan for nine years before he died in the year 2002. We were married for eleven years without a child.He died after a brief illness that lasted for only four days. Before his death we were both very devoted muslims. Since his death I too have been battling with both cancer and fibroid problems.When my late husband was alive he deposited the sum of $20 Million (Twenty Million U.S. Dollars) with an oversea private security and holding firm . Presently, this money is still with the private security and holding firm in Malaysia ,Asia. Recently, my Doctor told me that I would not last for the next three months due to cancer problem. Though what disturbs me most is my stroke sickness. Having known my condition I decided to donate this fund to either a moslem organisation or devoted muslim individual that will utilize this money the way I am going to instruct here- in. I want this muslim organisation or individual to use this money in all sincererity to fund mosques, orphanages,widows and also propagating the word of ALLAH and to ensure that the society upholds the views and beliefs of the holy Quran. The holy Quran emphasized so much on ALLAH'S benevolence and this has encouraged me to take this bold step. I took this decision because I don・t have any child that will inherit this money and my husband relatives are new Christians converts and I don・t want my husband・s hard earned money to be misused by people I call unbelievers. I don・t want a situation where this money will be used in an unholy manner. Hence the reason for taking this bold decision. I know that after death I will be with ALLAH the most beneficient and the most merciful. I don・t need any telephone communication in this regard because of my health and the presence of my husband・s relatives around me always. I don・t want them to know about this development. With ALLAH all things are possible. As soon as I receive your reply I shall give you the contact of the Security Company. I will also issue you a letter of authority that will prove you as the original- beneficiary of this fund. I want you and the Muslim community where you reside to always pray for me.  Whoever that wants to serve the ALLAH must serve him in truth and in fairness. Please always be prayerful all through your life.  Until I hear from you, my dreams will rest squarely on your shoulders. May the almighty ALLAH continue to guide and protect you. Reply me through this email<EMAIL_ADDRESS>Regards, MRS AISHA HASSAN


Need help picking a vaction? We can help!
What is your name?
What climate do you like?
Some like it hot!
What ever.
Give me that crisp winter air!
How active are you?
Up for anything!
Let's keep it healthy.
I'm up for a nap.
What is your budget?
Rolling in dough!
Let's be reasonable.
I've got room on my credit card.
How long do you have?
I'll stay til I'm done!
A week or two max.
Just a few days.
Do you have kids?
Yes
No
Here we go!


Momentum vs. quality: 15 TSX stocks that combine both
by Ian Tam, CFAWhat are we looking for?
A strategy that combines momentum with quality.
The screen
For momentum investors, this year has been a dream. With three quarters of the year behind us, the domestic equity market has displayed some phenomenal results, shown largely by the S&P/TSX Composite Index, which has posted gains of more than 20 per cent year-to-date on a total return basis. Moreover, as of Tuesday’s close, 93 of the 233 companies in the S&P/TSX were trading within 5 per cent of their own 52-week highs.
Expanding on this statistic, I used Morningstar CPMS to create a momentum-oriented model purposely seeking companies trading close to their own 12-month highs by first ranking the 709 Canadian stocks in our database on this metric (the closer to the high, the better), then overlaying a series of screens to ensure some fundamental quality to the companies being chosen. Specifically, I used these screens:
- Five-year earnings per share deviation that is lower than the most volatile two-thirds of stocks in our database (recall deviation here refers to the consistency of reported earnings, and I am excluding the top two-thirds of our database by historical earnings volatility);
- Five-year EPS growth rate, five-year average return on equity, trailing return on equity and market float – all four metrics must be greater than the market median;
- A positive price change from month end, three months ago.
More about Morningstar
Morningstar Research Inc. provides independent investment research in North America, Europe, Australia and Asia. Its research tool, Morningstar CPMS, provides quantitative North American equity research and portfolio analysis to institutional clients and financial advisers. CPMS data cover more than 95 per cent of the investable North American stock market. With more than 120 equity and credit analysts, Morningstar has one of the largest independent institutional equity research teams in the world.
What we found
I used Morningstar CPMS to back-test this strategy from April, 1995, to the end of October, 2019. During this process, a maximum of 15 stocks were purchased and equally weighted with no more than three per economic sector. Once a month, stocks were sold if their rank fell below the top 50 per cent of the universe, or if the company showed a negative trailing return on equity. Over this period, the strategy produced an annualized total return of 14.5 per cent while the S&P/TSX Composite Index gained 8.2 per cent on a total return basis. In calendar year 2018, the strategy lost 4.6 per cent while the index fell 8.9 per cent.
The stocks that qualify for purchase today are listed in the table below. It is always recommended to speak to a financial adviser or investment professional before investing.
Select TSX-listed momentum stocks
| Rank | Company | Symbol | Mkt. Float ($ Mil.) | Price Chg. from 12M High (%)* | 5Y EPS Deviation (%) | 5Y EPS Grth. Rate (%) | 5Y Avg. ROE (%) | Trailing ROE (%) | Price Chg. from Month End, 3M Ago (%) | Recent Close ($) | Div. Yld. (%) | Ttl. Rtn. from Month End, 12M Ago (%) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Genworth MI Cda. | MIC-T | 2,171.0 | -0.1 | 4.2 | 8.2 | 11.5 | 11.7 | 10.7 | 55.79 | 3.9 | 36.9 |
| 2 | Cogeco Comm. | CCA-T | 2,728.9 | -0.1 | 4.8 | 6.1 | 16.8 | 16.5 | 13.5 | 118.74 | 2.0 | 87.1 |
| 3 | Royal Bank | RY-T | 155,993.4 | -0.1 | 2.9 | 8.5 | 17.7 | 17.4 | 9.3 | 108.86 | 3.9 | 15.9 |
| 4 | National Bank | NA-T | 23,387.1 | -0.2 | 2.2 | 7.8 | 17.6 | 17.6 | 11.7 | 69.86 | 3.9 | 19.7 |
| 5 | CGI Inc. | GIB-A-T | 26,324.7 | -0.2 | 2.7 | 10.1 | 18.0 | 19.1 | 4.8 | 109.46 | 0.0 | 28.8 |
| 6 | Kinaxis Inc. | KXS-T | 2,717.2 | -0.4 | 11.4 | 25.2 | 23.9 | 16.3 | 33.9 | 103.83 | 0.0 | 39.7 |
| 7 | Capital Power | CPX-T | 3,482.4 | -0.4 | 15.5 | 5.9 | 4.8 | 6.1 | 6.7 | 32.57 | 5.9 | 26.1 |
| 8 | Constellation Sft. | CSU-T | 26,861.8 | -0.5 | 3.9 | 23.0 | 101.8 | 96.2 | 5.1 | 1,362.95 | 0.4 | 53.1 |
| 9 | Cogeco Inc. | CGO-T | 872.2 | -0.5 | 6.5 | 11.0 | 18.3 | 17.8 | 13.7 | 106.72 | 1.8 | 74.3 |
| 10 | CT REIT | CRT-UN-T | 1,062.7 | -0.6 | 3.8 | 6.3 | 7.5 | 7.3 | 4.2 | 15.29 | 5.1 | 31.2 |
| 11 | Cdn. Tire Corp. | CTC-A-T | 9,109.9 | -0.6 | 3.3 | 12.6 | 14.1 | 18.2 | 16.3 | 156.43 | 2.9 | 8.2 |
| 12 | Granite REIT | GRT-UN-T | 3,691.8 | -0.6 | 5.9 | 5.9 | 8.0 | 7.0 | 7.2 | 68.30 | 4.3 | 31.4 |
| 13 | Quebecor Inc. | QBR-B-T | 5,980.1 | -0.7 | 6.9 | 24.9 | 73.6 | 78.7 | 11.6 | 33.47 | 1.3 | 17.7 |
| 14 | WSP Global Inc. | WSP-T | 5,531.3 | -1.0 | 6.0 | 13.4 | 10.0 | 11.8 | 19.4 | 86.08 | 1.7 | 33.9 |
| 15 | Alaris Royalty | AD-T | 800.7 | -1.4 | 5.6 | 7.4 | 10.2 | 11.3 | 13.1 | 21.87 | 7.5 | 25.2 |
Source: Morningstar CPMS
* In this column, a value of minus 1.0%, for example, implies that the stock is 1% below its own 12-month high.
Ian Tam, CFA, is a relationship manager for CPMS at Morningstar Research Inc.
Be smart with your money.  Sign up today .


Algorithms for everyday fair division problems like splitting rent or taxi fare. Featured on Gizmodo, Lifehacker, Fast Company, and more. More technical discussion can be found in my senior research thesis, or this SIGecom Exchanges letter.
PzlPal
Technologies Used: Node, Angular, MongoDB, Tesseract OCRA crossword puzzle digitizer and solver I made with two friends. Winner of Tartanhacks 2014 (Carnegie Mellon Today article).
MultiSpork
Technologies Used: MeteorJS, MongoDBMultiSpork is essentially competitive Sporcle, supporting many (over 50) players. I worked on MultiSpork with a friend during HackCMU 2013 - we won the "Coolest Hack" award.
Algorithmic Assessments Generator
Technologies Used: Scala, Java, DropwizardPubblePin
Technologies Used: Ruby on RailsPubblePin enables web communities to create rankings lists. I worked on this with three friends for a class called "Tech Start-up Lab", taught by Luis von Ahn.
Total Machine Solutions
Technologies Used: Ruby, MiddlemanA website I built for a small local business.
PanelPal
Technologies Used: Ruby on Rails, PusherPanelPal is an application for managing Q & A panels. PanelPal makes use of WebSockets for selecting questions in real time, as well as HTML5 Geolocation to find nearby events. I worked on this with two friends during TartanHacks 2013. (Optimized for mobile use)
Video Game Trivia Challenge
Technologies Used: Actionscript 2.0A flash game I designed when I was about 13. Flash marked the beginning of my interest in programming, so I figured I'd include this here. This particular game has been played over 2 million times across various sites, and was sponsored by FlashRage.com. Here are a couple other flash games I made: Helidroppers, Tile Sprint.


|
Addictive
I stand
watching the delicate fingers,
as they creep over scores of music,
which enchants my senses,
I watch the soft fingers turn into black, hard coldness.
It starts to pull at my hair and clothes,
creeps into my feeling of weakness and tugs,
pulling me towards the curtains,
their musty, decaying surface,
like a chill on my spine.
I hesitate,
but the addictive music pushes me on
and I slowly lose control.
I scream.
But the curtain gags my yells
and I am forced behind the curtains of the unknown.
Victoria King
|


Hot Restaurant
Book your seats before their all gone!
Make Reservations
Current Reservations
Waiting List


There are several tasks to achieve: 1. Make a square formation in the room 2. Get all the robot out of the room and make a circle formation outside 3. Move the purple ball on the purple square 4. Move the red ball on the red square 5. Get back into the room and make a diamond formation
Each of these tasks need to be achieved using decentralized algorithms seen in class.
To install PyBullet with pip type
pip install pybullet
To install PyBullet with anaconda type
conda install -c hcc pybullet
Documentation:
https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit#heading=h.2ye70wns7io3
https://github.com/bulletphysics/bullet3/tree/master/docs
In the python directory, type
python run_simulation.py
It will run the example simulation.
Description of the python files: swarm_simulation.py contains the code to construct the simulation environment run_simulation.py is an example script that instantiate an environment and runs the simulation until closed * robot.py is the code to handle one robot. The class Robot defines access to all sensors of the robot, allows to send and receive messages to neighboring robots and to control the wheels of the robot. The function 'compute_controller' is the function to be changed to implement the code for the project. This function is called at every control cycle (every 4ms) by the simulator and simulates what a real robot controller would do.
Note that you can also use the code in run_simulation.py in a Jupyter Notebook if you prefer.


@jasonnguyen93
Status: stay hungry, stay foolish..
Friend 500
Followers 500
Followings 500
Jason's Timeline
Recent Activities
Recent Stories
Json is LIVE now...
10 mins
Is planning to ...
LIVE Music


{% extends "base2.html" %} {% block title %}Starfinder Starship Generator{% endblock %} {% block description %}Starship generator for starfinder roleplaying game{% endblock %} {% block css %} {% endblock %} {% block body %}
Generates starships using the ship building rules for Starfinder RPG.


Your Customer
Customer Detail
Add New Customer
{{vm.error}}
{{vm.alert}}
Username
Username is required
Reset Password
First name
First name is required
Last name
Last name is required
Customer Type
Customer type is required
Address
{{address}}
Mobile Number
+61
Mobile number is invalid
Email Address
Email address is required
Email address is invalid
User Status
Change
{{vm.statuserror}}
{{vm.statusalert}}
Requests related to this Customer
{{ c.claimid }}
{{ c.summary }}
{{ c.claimtype.name }}
{{ c.submitteddate | date: "medium"}}
No Results


| Quantity | Value | Unit of measure |
|---|---|---|
| N° Of Players | {{evaluation.nOfPlayer}} | # |
| Total Played Time | {{evaluation.totalLifePlayddHHmmss}} | d HH:mm:ss |
| N° Of Completed Tasks | {{evaluation.completedTasks}} | # |
| N° Of Started Tasks | {{evaluation.startedTasks}} | # |
| Total N° Of Tasks | {{evaluation.totalTasks}} | # |
| Completion rate | {{evaluation.completion}} | % |
| Throughput | {{evaluation.throughput}} | solved tasks/hour |
| ALP (Average Life Play) | {{evaluation.alp}} | minutes/player |
| Expected contribution | {{evaluation.contribution}} | solved tasks/player |


Graduate Statistics in Plain Ol’ English
Preface
Why another statistics book?
Are you our audience?
Structure of the book
Software information and conventions
License
Graduate Statistics in Plain Ol’ English by Patrick E. McKnight & Simone C. McKnight is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.


WITNESS LIST Human Services Committee March 17, 2005-8:00A HB 307 For: Bruegel Cox, Heidi (Self) Lehrmann, Judge Debra (Self) On: Sampson, John (Self) Registering, but not testifying: For: Burke, Cecelia (Travis County Domestic Relations Office) On: Kromrei, Elizabeth (Department of Family and Protective Services) HB 343 For: Crowe, Michael (Texas Assisted Living Association) Rich, Sid (Texas Association of Residential Care Communities) Smith, Carole (Private Provider Association of Texas) Wilson, Neda (The A. W. Schlesinger Geriatric Center) Against: Bragg, David (AARP) Ferris, Beth (Texas Advocates for Nursing Home Residents) On: Adams, Chris (Texas Department of Aging and Disability Services) Registering, but not testifying: For: Dennis, Hilary (Texas Medical Association) Graves, Tim (Texas Health Care Association) HB 385 For: Bower, Bruce (Texas Legal Services Center) Garcia, Oscar (Self and Texas Silver Haired Legislature) Jones, John (Self and Texas Access To Justice Commission) Livingston, Lora (Self) McCown, F. Scott (The Center for Public Policy Priorities) Rachofsky, Marcia (Texas Mental Health Consumers; Children's Mental Health) On: Deane, Barbara (Office of Attorney General) Temple, Larry (Texas Workforce Commission) Registering, but not testifying: For: Brewer, Sister Helen (Seton Healthcare Network) Craven, Susan (Texans Care For Children) DelGallo, Krista (Texas Council on Family Violence) Ender, Lynda (Texas Senior Advocacy Coalition) McCarthy, Amber (National Multiple Sclerosis Society) Miller, Carol (National Association of Social Workers - TX) On: Trapolino, Marion (Texas Workface Commission) Wiegman, Linda (Department of State Health Services) HB 470 For: Borsella, Penny (Self and ATTA - AchievementsThrough The Arts) Bryant, William (Self and Metro Care) Caballero, Patricia (Self) Caldwell, Jim (Self and Texas Silver Haired Legislature) Delgado, Frank (Self) Diggles, Walter (Self and Texas Association of Regional Councils) Epps, Beth (Adapt of Texas, Inc.) Halligan, Mike (Texas Mental Health Consumers) Hayes, Jeanine (Self) Johnson, Keithen (Dallas Metrocare - Special Needs Offender Program) Johnson, Sharon (Dallas Metrocare - Westmoreland) Laursen, Victoria (Self and Texas Mental Health Consumers) Natal, Sandra Veronica (Self) Rachofsky, Marcia (Texas Mental Health Consumers; Children's Mental Health) Roemer, Rebecca (The Beaumont Hope Center) Speck, Nancy (Texas Strategic Health-Mental Health Workgroup & President's MH Commission) Against: Blankenship, Charles (Self) Bradberry, Anita (Texas Association for Home Care) Breeding, John (Self and Texans For Safe Education) Coombs, Bill (Helen Farabee Regional MHMR) DeWitt, Lauren (The Citizens Commission on Human Rights) Dolan, Dr. Moira (Self) Fleming, Sherri (Travis County Health and Human Services) Gerstenschlager, Merry Lynn (Self and Texas Eagle Forum) Hayes, Aaryce (Advocacy Inc.) Henning, Peter (Bethesda Lutheran Homes & Services, Inc.) Hernandez, Richard (EduCare Community Living) James, Mike (Self and Citizens' Commission on Human Rights) Kafka, Bob (ADAPT) Mizcles, Amy (The Arc of Texas) Shannon, Jacqueline (Self) Smith, Carole (Private Providers Association of Texas) Southern, David (Self) Spiller, Lee (Citizens Commission on Human Rights) Tinley, Pat (Self and Kerr County; William Mitchell, Co. Judge, Uvalde Co.; Delbert Roberts, Co. Judge, Kimble Co.) Vogt, Judge Eddie (Self) On: Blaine, Martha (Community Council of Greater Dallas) Brady, Denise (Mental Health Association in Texas) Brown, Bob (Tarrant County MHMR) Ender, Lynda (Texas Senior Advocacy Coalition) Higgins, Carlos (Self and Texas Silver Haired Legislature) Horn, Addie (Department of Aging and Disability Services) Keller, Merily (TX Suicide Prevention Community Network) Lee, Donald (Texas Conference of Urban Counties) Lovelace, Joe (National Alliance for the Mentally Ill (Texas)) McLean, Martin (County Judge John Doerfler, Williamson County, TX) Meyers, W. A. "Andy" (Houston-Galveston Area Council of Governments) Pan, David (Telecare Corporation) Parker Werlein, Linda (Self) Sappington, Hartley (Texas Council of Community MHMR Centers) Snyder, Ruth (Self) Wanser, Dave (Dept. of State Health Services) Registering, but not testifying: For: Alonzo, Ernesto (Mental Illness Awareness) Brown, William (AARP-Texas) Friese, Jan (Texas Counseling Association) Gilbert, William (Mental Illness Awareness) Guenther, Dan (Self and River City Advocacy) Johnson, Paula (Self) McEuen, Lisa (Self) Sanchez, Joe (AARP - Texas) Tietje, Eldon (Central Counties Center for MHMR Services) Against: Alderete, Chris (The Medical Team Inc.) Baker, Becky (Self) Collins, Tom (Self and Greenoak Hospital) Crosley, Robert (Self) Ellzey, Gareth (Self) Gatlin, Carlie (Self) Gouge, Charles (D&S Residential Services, Inc.) Gow, Brett (Self) Greebon, Karen (ADAPT) House, Jackie (Self) Lockhart, Judge Ben (Self) May, Scott (Self) McIntosh, Glenn (Self) McPhail, Jennifer (ADAPT of Texas) Metz, Albert (ADAPT) Mitchell, Judge Bob (Self and County Judge, Uvalde County) Moreno, Gabriela (Christus Health) Mortensen, D. Jerry (Self) Roberts, Judge Delbert (Self) Routon, Randy (LifePath Systems) Shelburn, Jerry Lee (Mental Illness Awareness) Strickland, Joseph (Self) Templeton, James (ADAPT) Thomas, Stephanie (Institute for Disability Access) Vasek, Heather (Texas Association for Home Care) Wohlgemuth, Cristen (Texas Pharmacy Association) Young, William (EduCare Community Living Corporation - Houston) On: Clancey, Patrick Michael (Association of Substance Abuse Programs) Garcia, Oscar (Texas Silver Haired Legislature) Kromrei, Elizabeth (Department of Family and Protective Services) Kyker, Chris (Self and Texas Silver Haired Legislature) Miller, Carol (National Association of Social Workers-TX) Norton, Naomi Elaine (Texas Silver Haired Legislature) Osborne, Lisa (Association of Substance Abuse Programs) Porter, Pat (Self) Ray, Jim (Texas Association of Regional Councils (Councils of Governments)) Rogers, Glenda (Self) HB 691 For: Dunlap, Anita (Self and Tom Green County Indigent Health Care) Kight, Charles (Self) On: Bazaldua, Oralia (Self) Sheppard, Connie (Self) Registering, but not testifying: For: Brewer, Sister Helen (Seton Healthcare Network) Dennis, Hilary (Texas Medical Association) Hagert, Celia (Center for Public Policy Priorities) Kolodzey, Patricia (Texas Hospital Association) Maxwell, Barbara (Texas Association of Health Plans) O'Brien, Sister Michele (Self and Christus Santa Rosa Healthcare) Yanas, Christine (Bexar County Hospital District) HB 1356 Registering, but not testifying: For: Craven, Susan (Texans Care For Children) Dochan, Sandy (TX Business & Education Coalition) Guthrow, Kaitlin (Texas Early Childhood Education Coalition) Sabo, Jason (United Ways of TX) On: Garrett, Donna (Texas Workforce Commission) HB 1377 For: Blaine, Martha (Community Council of Greater Dallas) Caldwell, Jim (Self and Texas Silver Haired Legislature) Ender, Lynda (Texas Senior Advocacy Coalition) Higgins, Carlos (Self and Texas Silver Haired Legislature) Pruett, Dan (Self) Ross, Linda (Dallas Area Agency on Aging) Against: Kafka, Bob (ADAPT of TX) Smith, Carole (Private Providers Association of Texas) On: Murphree, Susan (Advocacy Inc.) Registering, but not testifying: For: Diggles, Walter (Self and Texas Association of Regional Councils) Garcia, Oscar (Self and Texas Silver Haired Legislature) Johnson, Paula (Self) Kyker, Chris (Texas Silver Haired Legislature) Norton, Naomi Elaine (Self and Texas Silver-Haired Legislature) Against: Mizcles, Amy (The Arc of Texas) On: Rogers, Glenda (Self) HB 1503 For: Crowe, Michael (The Texas Assisted Living Associtaion) Rich, Sid (Texas Association of Residential Care Communities) Smith, Carole (Private Providers Association of TX) Against: Ferris, Beth (Texas Advocates for Nursing Home Residents) Registering, but not testifying: For: Bradberry, Anita (Texas Associaiton for Home Care) Dennis, Hilary (Texas Medical Association) Graves, Tim (Self and Texas Health Care Association) Liggett, Sharon (Emeritus) Thomason, David (Texas Association of Homes & Services for the Aging) Vasek, Heather (Texas Association for Home Care) Against: Spiller, Lee (Citizens Commission on Human Rights)


What is your favorite food?
What is your favorite color?
What is your favorite animal?
What is your favorite season?
What is your favorite movie?
What is your favorite book?
Submit your favorites.
Your favorite color is
Your favorite food is
Your favorite animal is


Assigned to: {{ticket.assigned_to.firstname}} {{ticket.assigned_to.lastname}}
Status: {{ticket.status}}
Type: {{ticket.type}}
Estimate: {{ticket.estimate}} h
Edit
{{comment.created_at}}


Inethemba Management is a Bulawayo based arts management and consulting company. We are comprised of three divisions: music and arts production, events coordination, and artist management. Each focusing on a different exciting aspect of the arts and cultural industry.
Inethemba Management grew from a passion to engaging with the arts and culture through solid business practices and opertions. With a deep understanding of both the arts industry and the nature of management and business, founders Desmond Ntini and Austin Dube have created a strong, competitive company in the arts and cultural industry in Bulawayo.
Inethemba Management works with performing arts organisations and musicians in all stages of development - from emerging artists and organisations to established performers, directors, producers, fundraisers, and marketing specialists. Through its services, Inethemba Management empowers arts and culture practitioners to create and sustain a thriving industry so that communities can be enlivened by the arts.
Working with the most notable artists in the bulawayo modern music scene, Inethemba Management has signed and works with acts such as Qeqe, Thandie Dlana, De Lukes & Band, The Sets, Thulani Harsh Touch and DJ Pidin.
Inethemba Management works with three theatre companies to assist with the development of theatre productions. This project has helped the theatre companies develop inspiring and engaging productions like Gukurahundi, The Hostel, and Double Funeral.
As part of their creative endeavour, Inethemba Management is the producer of the upcoming musical theatre production Nyaminyami.
Inethemba Management has played a leading role in the strategic planning of events like Intwasa, Ibumba, Bulawayo Arts Awards and many others.
Blog updates


Physically, our agents are right behind you.
Mentally, we're two steps ahead of other agents.
Your new home is more than a plot of land and a building with some square footage. At Five Corners, we know that when you buy a home, it can't be just any house. It has to be your home -- the one you have pictured in your mind. That home is out there. It's waiting for you. You only need an agent capable of finding it, looking in places beyond the MLS. Maybe our personal or business connections? Maybe our own database? Who knows? Our agents are resourceful like that!
No one wants to be dragged around looking at every house on the market. For sale is the only standard some agents use when showing buyers new homes. Five Corners real estate agents really listen to you and we read between the lines. We only show you the properties for sale that fully match your idea of the perfect home. Our agents don't bother with 'maybe' properties -- only the homes with "this is the one" potential and feel like they were built just for you.
Buying a home is emotional, but the process is also a legal transaction. Five Corners' agents keep both in balance. When you fall in love at first sight, we'll be right beside you moving fast so that your home doesn't get away. If you're not sure you've found the right one, we'll go over the pros and cons until you know it's a perfect fit or not. No drama and no regrets.
To you, your home is your family, love, shelter, comfort and future all rolled into one. However, it also involves a legal contract that 25 people will touch along the way. Any one of those 25 can throw a wrench in your home buying plans. Five Corners agents expect the unexpected so the legal aspect of buying your home is seamless.
Whether this is your first or fifth time buying a home, you're counting on our agents to protect and represent you. That's trust we never take for granted and a responsibility we don't take lightly. That's why we have the best professionals in their fields already in place to get things done fast and done right including:


Flooding Displaces 40,000 Persons In Borno –UN
OCHA attributed the flood to the release of excess water from Kaalia River in neighbouring Cameroon.
by SaharaReporters, New York
The United Nations Office for Coordination of Humanitarian Affairs has expressed concern over the conditions of more than 40,000 displaced persons affected by flood in Rann under Kalabalge Local Government Area of Borno.
In a statement on Saturday, the OCHA said the affected persons including women and children lacked access to food and basic services due to flooding, which submerged Rann on November 7.
OCHA attributed the flood to the release of excess water from Kaalia River in neighbouring Cameroon.
The statement reads, “Stranded populations are running short of food and those who can afford it are paying high sums to be transported to the other areas, putting their lives at risks while crossing the river or running for safety.
“More than 300 people from Rann have managed to reach Ngala, a town some 40 kilometres away from the area, according to the International Organisation for Migration, they managed to leave Rann before the road became impassable.
“Humanitarian partners are mobilising resources to reach the stranded population via the UN Humanitarian Air Services, until access is secured for small boats.
“Providing food is the main priority, along with water, shelters and emergency health services.”


Introduction
Best Practices
Synopsis
Members
Free Functions
Example
Handle/Body Idiom
Thread Safety
Frequently Asked Questions
Smart Pointer Timings
Programming Techniques
The shared_ptr
class template stores a pointer to a dynamically allocated
object, typically with a C++ new-expression. The object pointed to is
guaranteed to be deleted when the last shared_ptr
pointing to it is
destroyed or reset.
Example:shared_ptr<X> p1( new X ); shared_ptr<void> p2( new int(5) );
shared_ptr
deletes the exact pointer that has been passed at construction time,
complete with its original type, regardless of the template parameter. In the second example above,
when p2
is destroyed or reset, it will call delete
on the original int*
that has been passed to the constructor, even though p2
itself is of type
shared_ptr<void>
and stores a pointer of type void*
.
Every shared_ptr
meets the CopyConstructible
, MoveConstructible
,
CopyAssignable
and MoveAssignable
requirements of the C++ Standard Library, and can be used in standard
library containers. Comparison operators are supplied so that shared_ptr
works with the standard library's associative containers.
Because the implementation uses reference counting, cycles of shared_ptr
instances
will not be reclaimed. For example, if main()
holds a shared_ptr
to
A
, which directly or indirectly holds a shared_ptr
back to A
,
A
's use count will be 2. Destruction of the original shared_ptr
will
leave A
dangling with a use count of 1. Use weak_ptr
to "break cycles."
The class template is parameterized on T
, the type of the object pointed
to. shared_ptr
and most of its member functions place no
requirements on T
; it is allowed to be an incomplete type, or
void
. Member functions that do place additional requirements
(constructors, reset) are explicitly
documented below.
shared_ptr<T>
can be implicitly converted to shared_ptr<U>
whenever T*
can be implicitly converted to U*
.
In particular, shared_ptr<T>
is implicitly convertible
to shared_ptr<T const>
, to shared_ptr<U>
where U
is an accessible base of T
, and to
shared_ptr<void>
.
shared_ptr
is now part of the C++11 Standard, as std::shared_ptr
.
Starting with Boost release 1.53, shared_ptr
can be used to hold a pointer to a dynamically
allocated array. This is accomplished by using an array type (T[]
or T[N]
) as
the template parameter. There is almost no difference between using an unsized array, T[]
,
and a sized array, T[N]
; the latter just enables operator[]
to perform a range check
on the index.
Example:shared_ptr<double[1024]> p1( new double[1024] ); shared_ptr<double[]> p2( new double[n] );
A simple guideline that nearly eliminates the possibility of memory leaks is:
always use a named smart pointer variable to hold the result of new
.
Every occurence of the new
keyword in the code should have the
form:
shared_ptr<T> p(new Y);
It is, of course, acceptable to use another smart pointer in place of shared_ptr
above; having T
and Y
be the same type, or
passing arguments to Y
's constructor is also OK.
If you observe this guideline, it naturally follows that you will have no
explicit delete
statements; try/catch
constructs will
be rare.
Avoid using unnamed shared_ptr
temporaries to save typing; to
see why this is dangerous, consider this example:
void f(shared_ptr<int>, int); int g(); void ok() { shared_ptr<int> p( new int(2) ); f( p, g() ); } void bad() { f( shared_ptr<int>( new int(2) ), g() ); }
The function ok
follows the guideline to the letter, whereas
bad
constructs the temporary shared_ptr
in place,
admitting the possibility of a memory leak. Since function arguments are
evaluated in unspecified order, it is possible for new int(2)
to
be evaluated first, g()
second, and we may never get to the
shared_ptr
constructor if g
throws an exception.
See Herb Sutter's treatment (also
here) of the issue for more information.
The exception safety problem described above may also be eliminated by using
the make_shared
or allocate_shared
factory functions defined in boost/make_shared.hpp
.
These factory functions also provide an efficiency benefit by consolidating allocations.
namespace boost { class bad_weak_ptr: public std::exception; template<class T> class weak_ptr; template<class T> class shared_ptr { public: typedef see below element_type; shared_ptr(); // never throws shared_ptr(std::nullptr_t); // never throws template<class Y> explicit shared_ptr(Y * p); template<class Y, class D> shared_ptr(Y * p, D d); template<class Y, class D, class A> shared_ptr(Y * p, D d, A a); template<class D> shared_ptr(std::nullptr_t p, D d); template<class D, class A> shared_ptr(std::nullptr_t p, D d, A a); ~shared_ptr(); // never throws shared_ptr(shared_ptr const & r); // never throws template<class Y> shared_ptr(shared_ptr<Y> const & r); // never throws shared_ptr(shared_ptr && r); // never throws template<class Y> shared_ptr(shared_ptr<Y> && r); // never throws template<class Y> shared_ptr(shared_ptr<Y> const & r, element_type * p); // never throws template<class Y> shared_ptr(shared_ptr<Y> && r, element_type * p); // never throws template<class Y> explicit shared_ptr(weak_ptr<Y> const & r); template<class Y> explicit shared_ptr(std::auto_ptr<Y> & r); template<class Y> shared_ptr(std::auto_ptr<Y> && r); template<class Y, class D> shared_ptr(std::unique_ptr<Y, D> && r); shared_ptr & operator=(shared_ptr const & r); // never throws template<class Y> shared_ptr & operator=(shared_ptr<Y> const & r); // never throws shared_ptr & operator=(shared_ptr const && r); // never throws template<class Y> shared_ptr & operator=(shared_ptr<Y> const && r); // never throws template<class Y> shared_ptr & operator=(std::auto_ptr<Y> & r); template<class Y> shared_ptr & operator=(std::auto_ptr<Y> && r); template<class Y, class D> shared_ptr & operator=(std::unique_ptr<Y, D> && r); shared_ptr & operator=(std::nullptr_t); // never throws void reset(); // never throws template<class Y> void reset(Y * p); template<class Y, class D> void reset(Y * p, D d); template<class Y, class D, class A> void reset(Y * p, D d, A a); template<class Y> void reset(shared_ptr<Y> const & r, element_type * p); // never throws T & operator*() const; // never throws; only valid when T is not an array type T * operator->() const; // never throws; only valid when T is not an array type element_type & operator[](std::ptrdiff_t i) const; // never throws; only valid when T is an array type element_type * get() const; // never throws bool unique() const; // never throws long use_count() const; // never throws explicit operator bool() const; // never throws void swap(shared_ptr & b); // never throws template<class Y> bool owner_before(shared_ptr<Y> const & rhs) const; // never throws template<class Y> bool owner_before(weak_ptr<Y> const & rhs) const; // never throws }; template<class T, class U> bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b); // never throws template<class T, class U> bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b); // never throws template<class T, class U> bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b); // never throws template<class T> bool operator==(shared_ptr<T> const & p, std::nullptr_t); // never throws template<class T> bool operator==(std::nullptr_t, shared_ptr<T> const & p); // never throws template<class T> bool operator!=(shared_ptr<T> const & p, std::nullptr_t); // never throws template<class T> bool operator!=(std::nullptr_t, shared_ptr<T> const & p); // never throws template<class T> void swap(shared_ptr<T> & a, shared_ptr<T> & b); // never throws template<class T> typename shared_ptr<T>::element_type * get_pointer(shared_ptr<T> const & p); // never throws template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r); // never throws template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const & r); // never throws template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r); // never throws template<class T, class U> shared_ptr<T> reinterpet_pointer_cast(shared_ptr<U> const & r); // never throws template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, shared_ptr<Y> const & p); template<class D, class T> D * get_deleter(shared_ptr<T> const & p); }
typedef ... element_type;
element_type
isT
whenT
is not an array type, andU
whenT
isU[]
orU[N]
.
shared_ptr(); // never throws shared_ptr(std::nullptr_t); // never throws
Effects: Constructs an empty
shared_ptr
.Postconditions:
use_count() == 0 && get() == 0
.Throws: nothing.
[The nothrow guarantee is important, since reset()
is specified
in terms of the default constructor; this implies that the constructor must not
allocate memory.]
template<class Y> explicit shared_ptr(Y * p);
Requirements:
Y
must be a complete type. The expressiondelete[] p
, whenT
is an array type, ordelete p
, whenT
is not an array type, must be well-formed, must not invoke undefined behavior, and must not throw exceptions. WhenT
isU[N]
,Y (*) [N]
must be convertible toT*
; whenT
isU[]
,Y (*) []
must be convertible toT*
; otherwise,Y*
must be convertible toT*
.Effects: When
T
is not an array type, constructs ashared_ptr
that owns the pointerp
. Otherwise, constructs ashared_ptr
that ownsp
and a deleter of an unspecified type that callsdelete[] p
.Postconditions:
use_count() == 1 && get() == p
. IfT
is not an array type andp
is unambiguously convertible toenable_shared_from_this<V>*
for someV
,p->shared_from_this()
returns a copy of*this
.Throws:
std::bad_alloc
, or an implementation-defined exception when a resource other than memory could not be obtained.Exception safety: If an exception is thrown, the constructor calls
delete[] p
, whenT
is an array type, ordelete p
, whenT
is not an array type.Notes:
p
must be a pointer to an object that was allocated via a C++new
expression or be 0. The postcondition that use count is 1 holds even ifp
is 0; invokingdelete
on a pointer that has a value of 0 is harmless.
[This constructor is a template in order to remember the actual
pointer type passed. The destructor will call delete
with the
same pointer, complete with its original type, even when T
does
not have a virtual destructor, or is void
.]
template<class Y, class D> shared_ptr(Y * p, D d); template<class Y, class D, class A> shared_ptr(Y * p, D d, A a); template<class D> shared_ptr(std::nullptr_t p, D d); template<class D, class A> shared_ptr(std::nullptr_t p, D d, A a);
Requirements:
D
must beCopyConstructible
. The copy constructor and destructor ofD
must not throw. The expressiond(p)
must be well-formed, must not invoke undefined behavior, and must not throw exceptions.A
must be an Allocator, as described in section 20.1.5 (Allocator requirements
) of the C++ Standard. WhenT
isU[N]
,Y (*) [N]
must be convertible toT*
; whenT
isU[]
,Y (*) []
must be convertible toT*
; otherwise,Y*
must be convertible toT*
.Effects: Constructs a
shared_ptr
that owns the pointerp
and the deleterd
. The constructors taking an allocatora
allocate memory using a copy ofa
.Postconditions:
use_count() == 1 && get() == p
. IfT
is not an array type andp
is unambiguously convertible toenable_shared_from_this<V>*
for someV
,p->shared_from_this()
returns a copy of*this
.Throws:
std::bad_alloc
, or an implementation-defined exception when a resource other than memory could not be obtained.Exception safety: If an exception is thrown,
d(p)
is called.Notes: When the the time comes to delete the object pointed to by
p
, the stored copy ofd
is invoked with the stored copy ofp
as an argument.
[Custom deallocators allow a factory function returning a shared_ptr
to insulate the user from its memory allocation strategy. Since the deallocator
is not part of the type, changing the allocation strategy does not break source
or binary compatibility, and does not require a client recompilation. For
example, a "no-op" deallocator is useful when returning a shared_ptr
to a statically allocated object, and other variations allow a shared_ptr
to be used as a wrapper for another smart pointer, easing interoperability.
The support for custom deallocators does not impose significant overhead. Other
shared_ptr
features still require a deallocator to be kept.
The requirement that the copy constructor of D
does not throw comes from
the pass by value. If the copy constructor throws, the pointer would leak.]
shared_ptr(shared_ptr const & r); // never throws template<class Y> shared_ptr(shared_ptr<Y> const & r); // never throws
Requires:
Y*
should be convertible toT*
.Effects: If
r
is empty, constructs an emptyshared_ptr
; otherwise, constructs ashared_ptr
that shares ownership withr
.Postconditions:
get() == r.get() && use_count() == r.use_count()
.Throws: nothing.
shared_ptr(shared_ptr && r); // never throws template<class Y> shared_ptr(shared_ptr<Y> && r); // never throws
Requires:
Y*
should be convertible toT*
.Effects: Move-constructs a
shared_ptr
fromr
.Postconditions:
*this
contains the old value ofr
.r
is empty andr.get() == 0
.Throws: nothing.
template<class Y> shared_ptr(shared_ptr<Y> const & r, element_type * p); // never throws
Effects: constructs a
shared_ptr
that shares ownership withr
and storesp
.Postconditions:
get() == p && use_count() == r.use_count()
.Throws: nothing.
template<class Y> shared_ptr(shared_ptr<Y> && r, element_type * p); // never throws
Effects: Move-constructs a
shared_ptr
fromr
, while storingp
instead.Postconditions:
get() == p
anduse_count()
equals the old count ofr
.r
is empty andr.get() == 0
.Throws: nothing.
template<class Y> explicit shared_ptr(weak_ptr<Y> const & r);
Requires:
Y*
should be convertible toT*
.Effects: Constructs a
shared_ptr
that shares ownership withr
and stores a copy of the pointer stored inr
.Postconditions:
use_count() == r.use_count()
.Throws:
bad_weak_ptr
whenr.use_count() == 0
.Exception safety: If an exception is thrown, the constructor has no effect.
template<class Y> shared_ptr(std::auto_ptr<Y> & r); template<class Y> shared_ptr(std::auto_ptr<Y> && r);
Requires:
Y*
should be convertible toT*
.Effects: Constructs a
shared_ptr
, as if by storing a copy ofr.release()
.Postconditions:
use_count() == 1
.Throws:
std::bad_alloc
, or an implementation-defined exception when a resource other than memory could not be obtained.Exception safety: If an exception is thrown, the constructor has no effect.
template<class Y, class D> shared_ptr(std::unique_ptr<Y, D> && r);
Requires:
Y*
should be convertible toT*
.Effects: Equivalent to
shared_ptr(r.release(), r.get_deleter())
whenD
is not a reference type. Otherwise, equivalent toshared_ptr(r.release(), del)
, where del is a deleter that stores the referencerd
returned fromr.get_deleter()
anddel(p)
callsrd(p)
.Postconditions:
use_count() == 1
.Throws:
std::bad_alloc
, or an implementation-defined exception when a resource other than memory could not be obtained.Exception safety: If an exception is thrown, the constructor has no effect.
~shared_ptr(); // never throws
Effects:
- If
*this
is empty, or shares ownership with anothershared_ptr
instance (use_count() > 1
), there are no side effects.- Otherwise, if
*this
owns a pointerp
and a deleterd
,d(p)
is called.- Otherwise,
*this
owns a pointerp
, anddelete p
is called.Throws: nothing.
shared_ptr & operator=(shared_ptr const & r); // never throws template<class Y> shared_ptr & operator=(shared_ptr<Y> const & r); // never throws template<class Y> shared_ptr & operator=(std::auto_ptr<Y> & r);
Effects: Equivalent to
shared_ptr(r).swap(*this)
.Returns:
*this
.Notes: The use count updates caused by the temporary object construction and destruction are not considered observable side effects, and the implementation is free to meet the effects (and the implied guarantees) via different means, without creating a temporary. In particular, in the example:
shared_ptr<int> p(new int); shared_ptr<void> q(p); p = p; q = p;both assignments may be no-ops.
shared_ptr & operator=(shared_ptr && r); // never throws template<class Y> shared_ptr & operator=(shared_ptr<Y> && r); // never throws template<class Y> shared_ptr & operator=(std::auto_ptr<Y> && r); template<class Y, class D> shared_ptr & operator=(std::unique_ptr<Y, D> && r);
Effects: Equivalent to
shared_ptr(std::move(r)).swap(*this)
.Returns:
*this
.
shared_ptr & operator=(std::nullptr_t); // never throws
Effects: Equivalent to
shared_ptr().swap(*this)
.Returns:
*this
.
void reset(); // never throws
Effects: Equivalent to
shared_ptr().swap(*this)
.
template<class Y> void reset(Y * p);
Effects: Equivalent to
shared_ptr(p).swap(*this)
.
template<class Y, class D> void reset(Y * p, D d);
Effects: Equivalent to
shared_ptr(p, d).swap(*this)
.
template<class Y, class D, class A> void reset(Y * p, D d, A a);
Effects: Equivalent to
shared_ptr(p, d, a).swap(*this)
.
template<class Y> void reset(shared_ptr<Y> const & r, element_type * p); // never throws
Effects: Equivalent to
shared_ptr(r, p).swap(*this)
.
T & operator*() const; // never throws
Requirements:
T
should not be an array type. The stored pointer must not be 0.Returns: a reference to the object pointed to by the stored pointer.
Throws: nothing.
T * operator->() const; // never throws
Requirements:
T
should not be an array type. The stored pointer must not be 0.Returns: the stored pointer.
Throws: nothing.
element_type & operator[](std::ptrdiff_t i) const; // never throws
Requirements:
T
should be an array type. The stored pointer must not be 0.i >= 0
. IfT
isU[N]
,i < N
.Returns:
get()[i]
.Throws: nothing.
element_type * get() const; // never throws
Returns: the stored pointer.
Throws: nothing.
bool unique() const; // never throws
Returns:
use_count() == 1
.Throws: nothing.
Notes:
unique()
may be faster thanuse_count()
. If you are usingunique()
to implement copy on write, do not rely on a specific value when the stored pointer is zero.
long use_count() const; // never throws
Returns: the number of
shared_ptr
objects,*this
included, that share ownership with*this
, or 0 when*this
is empty.Throws: nothing.
Notes:
use_count()
is not necessarily efficient. Use only for debugging and testing purposes, not for production code.
explicit operator bool() const; // never throws
Returns:
get() != 0
.Throws: nothing.
Notes: This conversion operator allows
shared_ptr
objects to be used in boolean contexts, likeif(p && p->valid()) {}
.
[The conversion to bool is not merely syntactic sugar. It allows shared_ptr
s
to be declared in conditions when using dynamic_pointer_cast
or weak_ptr::lock.]
void swap(shared_ptr & b); // never throws
Effects: Exchanges the contents of the two smart pointers.
Throws: nothing.
template<class Y> bool owner_before(shared_ptr<Y> const & rhs) const; // never throws template<class Y> bool owner_before(weak_ptr<Y> const & rhs) const; // never throws
Effects: See the description of
operator<
.Throws: nothing.
template<class T, class U> bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b); // never throws
Returns:
a.get() == b.get()
.Throws: nothing.
template<class T, class U> bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b); // never throws
Returns:
a.get() != b.get()
.Throws: nothing.
template<class T> bool operator==(shared_ptr<T> const & p, std::nullptr_t); // never throws template<class T> bool operator==(std::nullptr_t, shared_ptr<T> const & p); // never throws
Returns:
p.get() == 0
.Throws: nothing.
template<class T> bool operator!=(shared_ptr<T> const & p, std::nullptr_t); // never throws template<class T> bool operator!=(std::nullptr_t, shared_ptr<T> const & p); // never throws
Returns:
p.get() != 0
.Throws: nothing.
template<class T, class U> bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b); // never throws
Returns: an unspecified value such that
operator<
is a strict weak ordering as described in section 25.3[lib.alg.sorting]
of the C++ standard;- under the equivalence relation defined by
operator<
,!(a < b) && !(b < a)
, twoshared_ptr
instances are equivalent if and only if they share ownership or are both empty.Throws: nothing.
Notes: Allows
shared_ptr
objects to be used as keys in associative containers.
[Operator<
has been preferred over a std::less
specialization for consistency and legality reasons, as std::less
is required to return the results of operator<
, and many
standard algorithms use operator<
instead of std::less
for comparisons when a predicate is not supplied. Composite objects, like std::pair
,
also implement their operator<
in terms of their contained
subobjects' operator<
.
The rest of the comparison operators are omitted by design.]
template<class T> void swap(shared_ptr<T> & a, shared_ptr<T> & b); // never throws
Effects: Equivalent to
a.swap(b)
.Throws: nothing.
Notes: Matches the interface of
std::swap
. Provided as an aid to generic programming.
[swap
is defined in the same namespace as shared_ptr
as this is currently the only legal way to supply a swap
function
that has a chance to be used by the standard library.]
template<class T> typename shared_ptr<T>::element_type * get_pointer(shared_ptr<T> const & p); // never throws
Returns:
p.get()
.Throws: nothing.
Notes: Provided as an aid to generic programming. Used by mem_fn.
template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r); // never throws
Requires: The expression
static_cast<T*>( (U*)0 )
must be well-formed.Returns:
shared_ptr<T>( r, static_cast<typename shared_ptr<T>::element_type*>(r.get()) )
.Throws: nothing.
Notes: the seemingly equivalent expression
shared_ptr<T>(static_cast<T*>(r.get()))
will eventually result in undefined behavior, attempting to delete the same object twice.
template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const & r); // never throws
Requires: The expression
const_cast<T*>( (U*)0 )
must be well-formed.Returns:
shared_ptr<T>( r, const_cast<typename shared_ptr<T>::element_type*>(r.get()) )
.Throws: nothing.
template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r);
Requires: The expression
dynamic_cast<T*>( (U*)0 )
must be well-formed.Returns:
- When
dynamic_cast<typename shared_ptr<T>::element_type*>(r.get())
returns a nonzero valuep
,shared_ptr<T>(r, p)
;- Otherwise,
shared_ptr<T>()
.Throws: nothing.
template<class T, class U> shared_ptr<T> reinterpret_pointer_cast(shared_ptr<U> const & r); // never throws
Requires: The expression
reinterpret_cast<T*>( (U*)0 )
must be well-formed.Returns:
shared_ptr<T>( r, reinterpret_cast<typename shared_ptr<T>::element_type*>(r.get()) )
.Throws: nothing.
template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, shared_ptr<Y> const & p);
Effects:
os << p.get();
.Returns:
os
.
template<class D, class T> D * get_deleter(shared_ptr<T> const & p);
Returns: If
*this
owns a deleterd
of type (cv-unqualified)D
, returns&d
; otherwise returns 0.Throws: nothing.
See shared_ptr_example.cpp for a
complete example program. The program builds a std::vector
and std::set
of shared_ptr
objects.
Note that after the containers have been populated, some of the shared_ptr
objects will have a use count of 1 rather than a use count of 2, since the set
is a std::set
rather than a std::multiset
, and thus does not
contain duplicate entries. Furthermore, the use count may be even higher at
various times while push_back
and insert
container operations are
performed. More complicated yet, the container operations may throw exceptions
under a variety of circumstances. Getting the memory management and exception
handling in this example right without a smart pointer would be a nightmare.
One common usage of shared_ptr
is to implement a handle/body (also called
pimpl) idiom which avoids exposing the body (implementation) in the header
file.
The shared_ptr_example2_test.cpp
sample program includes a header file, shared_ptr_example2.hpp,
which uses a shared_ptr
to an incomplete type to hide the
implementation. The instantiation of member functions which require a complete
type occurs in the shared_ptr_example2.cpp
implementation file. Note that there is no need for an explicit destructor.
Unlike ~scoped_ptr
, ~shared_ptr
does not require that T
be a complete
type.
shared_ptr
objects offer the same level of thread safety as
built-in types. A shared_ptr
instance can be "read" (accessed
using only const operations) simultaneously by multiple threads. Different shared_ptr
instances can be "written to" (accessed using mutable operations such as operator=
or reset
) simultaneously by multiple threads (even
when these instances are copies, and share the same reference count
underneath.)
Any other simultaneous accesses result in undefined behavior.
Examples:
shared_ptr<int> p(new int(42)); //--- Example 1 --- // thread A shared_ptr<int> p2(p); // reads p // thread B shared_ptr<int> p3(p); // OK, multiple reads are safe //--- Example 2 --- // thread A p.reset(new int(1912)); // writes p // thread B p2.reset(); // OK, writes p2 //--- Example 3 --- // thread A p = p3; // reads p3, writes p // thread B p3.reset(); // writes p3; undefined, simultaneous read/write //--- Example 4 --- // thread A p3 = p2; // reads p2, writes p3 // thread B // p2 goes out of scope: undefined, the destructor is considered a "write access" //--- Example 5 --- // thread A p3.reset(new int(1)); // thread B p3.reset(new int(2)); // undefined, multiple writes
Starting with Boost release 1.33.0, shared_ptr
uses a lock-free
implementation on most common platforms.
If your program is single-threaded and does not link to any libraries that might
have used shared_ptr
in its default configuration, you can
#define
the macro BOOST_SP_DISABLE_THREADS
on a
project-wide basis to switch to ordinary non-atomic reference count updates.
(Defining BOOST_SP_DISABLE_THREADS
in some, but not all,
translation units is technically a violation of the One Definition Rule and
undefined behavior. Nevertheless, the implementation attempts to do its best to
accommodate the request to use non-atomic updates in those translation units.
No guarantees, though.)
You can define the macro BOOST_SP_USE_PTHREADS
to turn off the
lock-free platform-specific implementation and fall back to the generic
pthread_mutex_t
-based code.
Q. There are several variations of shared pointers, with different tradeoffs; why does the smart pointer library supply only a single implementation? It would be useful to be able to experiment with each type so as to find the most suitable for the job at hand?
A. An important goal of shared_ptr
is to provide a
standard shared-ownership pointer. Having a single pointer type is important
for stable library interfaces, since different shared pointers typically cannot
interoperate, i.e. a reference counted pointer (used by library A) cannot share
ownership with a linked pointer (used by library B.)
Q. Why doesn't shared_ptr
have template parameters supplying
traits or policies to allow extensive user customization?
A. Parameterization discourages users. The shared_ptr
template is
carefully crafted to meet common needs without extensive parameterization. Some
day a highly configurable smart pointer may be invented that is also very easy
to use and very hard to misuse. Until then, shared_ptr
is the smart
pointer of choice for a wide range of applications. (Those interested in policy
based smart pointers should read
Modern C++ Design by Andrei Alexandrescu.)
Q. I am not convinced. Default parameters can be used where appropriate to hide the complexity. Again, why not policies?
A. Template parameters affect the type. See the answer to the first question above.
Q. Why doesn't shared_ptr
use a linked list implementation?
A. A linked list implementation does not offer enough advantages to offset the added cost of an extra pointer. See timings page. In addition, it is expensive to make a linked list implementation thread safe.
Q. Why doesn't shared_ptr
(or any of the other Boost smart
pointers) supply an automatic conversion to T*
?
A. Automatic conversion is believed to be too error prone.
Q. Why does shared_ptr
supply use_count()
?
A. As an aid to writing test cases and debugging displays. One of the
progenitors had use_count()
, and it was useful in tracking down bugs in a
complex project that turned out to have cyclic-dependencies.
Q. Why doesn't shared_ptr
specify complexity requirements?
A. Because complexity requirements limit implementors and complicate the
specification without apparent benefit to shared_ptr
users. For example,
error-checking implementations might become non-conforming if they had to meet
stringent complexity requirements.
Q. Why doesn't shared_ptr
provide a release()
function?
A. shared_ptr
cannot give away ownership unless it's unique()
because the other copy will still destroy the object.
Consider:
shared_ptr<int> a(new int); shared_ptr<int> b(a); // a.use_count() == b.use_count() == 2 int * p = a.release(); // Who owns p now? b will still call delete on it in its destructor.
Furthermore, the pointer returned by release()
would be difficult
to deallocate reliably, as the source shared_ptr
could have been created
with a custom deleter.
Q. Why is operator->()
const, but its return value is a
non-const pointer to the element type?
A. Shallow copy pointers, including raw pointers, typically don't
propagate constness. It makes little sense for them to do so, as you can always
obtain a non-const pointer from a const one and then proceed to modify the
object through it. shared_ptr
is "as close to raw pointers as possible
but no closer".
$Date$
Copyright 1999 Greg Colvin and Beman Dawes. Copyright 2002 Darin Adler. Copyright 2002-2005, 2012, 2013 Peter Dimov. Distributed under the Boost Software License, Version 1.0. See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.


Our "Drag-Recalculate" feature (patented) brings you the best user experience ever: by allowing you to effectively extract, integrate, or even exchange data among multiple charts, ECharts opens you up every opportunity for data mining and integration.
Got tens of millions of data to present? And once again professional statistical tools (e.g. MATLAB) seem like the only option left? Nope, not anymore! Despite rich interactivity, ECharts can still plot up to 200,000 data points on a Cartesian chart (line, column, scatter, candlestick) in the blink of an eye.
The colors in the Cartesian chart (like map or scatter) will help you to classify data at first glance. But how to focus on data that matters after the initial analysis? With our "Scale Roaming" feature, you can turn off other scales and focus on the scale you are interested in with just a click.
"ECharts is a treasure, not just for China, but also for the world."
Chen Wei, Professor at Zhejiang University
"ECharts, the beauty of data visualization!"
Shen Hao, Professor at Communication University of China
"ECharts is not only the best, but also the most improved visualization tool I know. Hopes are high that it will become a world-class open source project before long."
Huang Zhimin, CTO of Caixin Media
"ECharts is a most impressive tool for data visualization: it's fully open-source, it's sophisticated-yet-flexible, and it keeps abreast of the era of 'big data'! I hope that ECharts will stick to the open source approach and bring into full play the power of community, so as to better serve users at home and abroad and create greater value in business and society."
Xing Bao, Founder of DataUnion
"It is my fervent hope that ECharts 2.0 can make their visualization more vivid, charts more shining, interaction more agreeable and leave their users nothing to worry about."
Hong Bei, CTO of AdMaster
"We have tried all kinds of charting tools - foreign and domestic, free and paid - for many years, and we say that ECharts absolutely stands out in the free ones, and is even comparable to the best of the paid ones."
Yu Jie, GM of ResearchInChina
"ECharts is open, simple and elegant. 1.0 was great, and 2.0 was leapfrogged in just a year with something even more amazing. Anecdotally, some of my American friends are learning ECharts with online translators!"
Xie Yihui, Founder of Capital of Statistics
"ECharts represents a new generation of visualization tools for big data. I really hope that it will soon support mobile platforms, so that we can have the freedom to explore big data at our fingertips - both literally and figuratively."
Hu Song, CTO of haizhi
We are just doing our best to present your data in its own true aspect, and provide you with intuitive, interactive ways for data mining, extraction, correction or integration, so that you can focus on what you are interested in. Legend Switch, Area Zoom, and Value Filter let you analyze your data in ways you didn't think possible.
Look at the charts created using ECharts, you are no longer just a "reader"; you can also be a "creator". This is ECharts, a GUI-based data visualization tool that we are working on.
ECharts is an open source from the data visualization team of Baidu EFE. In EFE, we also have:


Ruby vs Javascript
This, and That
1 August 2015
Let's compare, and contrast, two elements of the Ruby and Javascript programming languages: looping, and documentation. We'll start with the bitter, which is to say that the Rubycore documentation is a treat compared with my experiences thus far with the Mozilla docs forJavascript. Ruby docs seem better organized, are more clearly written, and report correct information. Whereas Javascript docs are less well organized, less concisely written, and describe some methods that (so far) I haven't been able to deploy successfuly under the Node framework. My opinion may change as I gain familiarity with the Mozilla docs. I will give them credit for self-rating commentary; the docs include symbols to indicate important information including my favorite: "this deprecated API should no longer be used, but will probably still work." Hilarious. I should also underscore how much I do like both the content and writing ateloquentjavascript.net. With that out of the way, Ruby and Javascript offer a similar menu of looping methods with one vital difference... Javascript restores to me my much beloved For loops, beside which the .times method in Ruby is a pale imitation. Start where you like, end where you like, increment or decrement the iterator by whatever factor you like. Now you're looping! The ability to count down in a loop is such a basic and powerful construct, it surprises me that Ruby doesn't at least offer that. (In a straightforward way.) I think many would agree that the For loop syntax is easier to read, easier to comprehend, and keeps code much tidier than building a similar machine in Ruby using While constructs. Meanwhile, in fairness to Ruby, Ruby does provide many useful iterator methods that Javascript does not. So Javascript's better iteration tools in part form a much needed spackle to help cover Javascript's lack of built in iterator methods that are powerful and useful, as we do find in Ruby.


AMR refinement criteria¶
Several parameters controlling refinement can be set in the setrun function. See Specifying AMRClaw run-time parameters in setrun.py for further description of these. Many of the parameters discussed below are attributes of rundata.amrdata in setrun.py.
Every regrid_interval time steps on each level, the error is estimated in all cells on grids at this level. Cells where some refinement criteria are satisfied are flagged for refinement. Default options for flagging are described below. Additional cells surrounding the flagged cells are also flagged to insure that moving features of the solution (e.g. shock waves) do not escape from the region of refinement before the next regridding time. The number of buffer cells flagged is specified by regrid_buffer_width and the number of steps between regridding on each level is specified by regrid_interval. Typically these are equal (assuming the Courant number is close to 1) and taken to be some small integer such as 2 or 3.
In addition to flagging individual cells based on the behavior of the solution, it is also possible to specify that certain regions of the domain should always be refined to a certain level (and/or never refined above some level). This is described further in Specifying AMR regions. These regions are used in conjunction with the methods described below to determine whether or not a given cell should be flagged for refinement.
The cells that have been flagged are then clustered into rectangular regions to form grids at the next finer level. The clustering is done in light of the tradeoffs between a few large grids (which usually means refinement of many additional cells that were not flagged) or many small grids (which typically results in fewer fine grid cells but more grids and hence more overhead and less efficient looping over shorter rows of cells). The parameter clustering_cutoff in amrNez.data is used to control this tradeoff. At least this fraction of the fine grid cells should result from coarse cells that were flagged as needing refinement. The value clustering_cutoff = 0.7 is usually reasonable.
Flagging criteria¶
Two possible approaches to flagging individual cells for refinement (based on the behavior of the solution) are built into AMRClaw. (A different default approach is used in GeoClaw, see Flagging criteria in GeoClaw).
flag2refine¶
One approach to flagging cells for refinement (the default used in most examples) is to set flag2refine == True and specify a tolerance flag2refine_tol. This indicates that the library subroutine $CLAW/amrclaw/src/Nd/flag2refine.f90 should be used to flag cells for refinement. This routine computes the maximum max-norm of the undivided difference of \(q_{i,j}\) based its four neighbors in two space dimensions (or 6 neighbors in 3d). If this is greater than the specified tolerance, then the cell is flagged for refinement (subject to limitations imposed by “regions”). The undivided difference (not divided by the mesh width) is used, e.g. \(|q(m,i+1,j) - q(m,i-1,j)|\) for each component \(m\).
Note that the user can change the criterion used for flagging cells by modifying this routine – best done by copying the library routine to your application directory and modifying the Makefile to point to the modified version.
Richardson extrapolation¶
The second approach to flagging individual cells is based on using Richardson extrapolation to estimate the error in each cell. This is used if flag_richardson == True. In this case a cell is flagged if the error estimate exceeds the value flag_richardson_tol. Richardson estimation requires taking two time steps on the current grid and comparing the result with what’s obtained by taking one step on a coarsened grid. One time step on the fine grid is re-used, so only one additional time step on the fine grid and one on a coarsened grid are required. It is somewhat more expensive than the flag2refine approach, but may be more useful for cases where the solution is smooth and undivided differences do not identify the regions of greatest error.
Note: Both approaches can be used together: if flag2refine == True and flag_richardson == True then a cell will be flagged if either of the corresponding specified tolerances is exceeded.
Specifying AMR regions¶
In addition to specifying a tolerance or other criteria for flagging individual cells as described above, it is possible to specify regions of the domain so that all points in the region, over some time interval also specified, will be refined to at least some level minlevel and at most some level maxlevel. These are specified through the parameter rundata.regiondata.regions in setrun.py. This is a list of lists, each of which specifies a region. A new region can be added via:
rundata.regiondata.regions.append([minlevel,maxlevel,t1,t2,x1,x2,y1,y2])
This indicates that over the time period from t1 to t2, cells in the rectangle x1 <= x <= x2 and y1 <= y <= y2 should be refined to at least minlevel and at most maxlevel.
To determine whether a grid cell lies in one of the regions specified, the center of the grid cell is used. If a mapped grid is being used, the limits for the regions should be in terms of the computational grid coordinates, not the physical coordinates.
If a cell center lies in more than one specified region, then the cell will definitely be flagged for refinement at level L (meaning it should be covered by a Level L+1 grid) if L+1 <= minlevel for any of the regions, regardless of whether the general flagging criteria hold or not. This means the smallest of the various minlevel parameters for any region covering this point will take effect. Conversely it will not be flagged for refinement if L+1 > maxlevel for all regions that cover this point. This means the largest of the various maxlevel parameters for any region covering this point will take effect. (However, note that since flagged cells are buffered as described above by flagging some adjacent cells, a cell may still end up flagged for refinement even if the above tests say it should not be.)
For example, suppose that amr_levels_max = 6 has been specified along with these two regions:
rundata.regiondata.regions.append([2, 5, 10.0, 30.0, 0.0, 0.5, 0.0, 0.5])
rundata.regiondata.regions.append([3, 4, 20.0, 40.0, 0.2, 1.0, 0.2, 1.0])
The first region specifies that from time 10 to 30 there should be at least 2 levels and at most 5 levels of refinement for points in the spatial domain 0 < x < 0.5 and 0 < y < 0.5.
The second region specifies that from time 20 to 40 there should be at least 3 level and at most 4 levels of refinement for points in the spatial domain 0.2 < x < 1.0 and 0.2 < y < 1.0.
Note that these regions overlap in both space and time, and in regions of overlap the maximum of the minlevel and also the maximum of the maxlevel parameters applies. So in the above example, from time 20 to 30 there will be at least 3 levels and at most 5 levels in the region of overlap, 0.2 < x < 0.5 and 0.2 < y < 0.5.
Within these regions, how many levels are chosen at each point will be determined by the error flagging criteria, i.e. by the default or user-supplied routine flag2refine, or as determined by Richardson extrapolation, as described above.
Points that are not covered by either region are not constrained by the regions at all. With amr_levels_max = 6 then they might be refined to any level from 1 to 6 depending on the error flagging criteria.
It is easiest to explain how this works by summarizing the implementation:
The regridding algorithm from level L to L+1 loops over all grid cells at Level L and flags them or not based on the following criteria, where (xc,yc) represents the cell center and t is the current regridding time:
- Initialize the flag by applying the error flagging criteria specified by Richardson extrapolation and/or the default or user-supplied routine flag2refine to determine whether this cell should be flagged.
- Loop over all regions (if any) for which (xc,yc,t) lies in the region
specified.
- If L >= maxlevel for any such region, set flag = False for this cell and go on to the next cell.
- If L < minlevel for every such region, set flag = True and go on to the next grid cell.
Flagging criteria in GeoClaw¶
In GeoClaw, a special flag2refine subroutine is defined.
TODO: need to describe geoclaw flag2refine.