I've seen this quote a number of time on social media and as a ESL classroom teacher and online English tutor I believe this statement stands true. In this modern age where technology dominates our lives, almost every minute of the day, adapting and incorporating technology into our lessons seems a natural step forward in the learning process and has a huge number of benefits for our future generations.
In my classroom I try and use technology as much as I can, whether its a simple PowerPoint presentation or an interactive smart-board game.
I also tutor English online which of course is completely technology based learning and I find applications like 'Zoom' and 'Adobe' have some great functionality to help facilitate learning, but in this online teaching setting a huge aspect of engaging and capturing the students' attention falls on the teacher.
I found in my online classes I had to be much more expressive and almost goofy in order to relax my students and get them involved, once I realized this and implemented it into my lessons, teaching online became a whole lot easier.
I Enjoy both types of teaching and find that being an in-classroom teacher has made me a better online teacher and teaching online has made me a better in-classroom teacher. My students have gained from this too and now have a better learning experience with me.
Using technology in the classroom or teaching online should not be scary for a teacher but rather exciting and has proven to benefit both student and teacher. So get out there, or stay in, and really think about how you can use technology to make our kids smarter, and then implement it.
Teaching English as a second language abroad is a popular line of work for many millennials and others alike. I mean, who can say traveling and living in a foreign country for extended periods of time is part of their job description? The popular trend is to teach English over a period over a year and then head back into normality, however some choose to make a career out of this. But what happens when you've decided to head home and begin a normal life? All that experience and worldly knowledge wasted at a 9-5 desk job? Certainly not! A rise in technology, and the capabilities of the internet, have opened up a whole new world of teaching English. Online teaching!
First you'll need a decent laptop or desktop computer.
A high speed internet connection. Most online education providers will insist your internet speed be no lower that 2mbps download.
A headset with microphone. You may look and feel like a call center employee but trust me a good quality headset will go a long way and ensure you hear the student clearly as well as ensure you areheard by the student clearly.
An HD webcam. If using a desktop computer you will definitely need one! Students respond better if they can see their teacher on the other side and interact with them.
A good attitude. One of the cornerstones of a great online English teacher is a good attitude. Most online English schools look for enthusiastic teachers who can deal with their stress well and overcome issues encountered with teaching online.
A quiet space. So you think working from your local Starbucks will be a perk of teaching online? Think again. You'll need a quiet space with no distractions for you or the students. This will help your students stay concentrated and participating as well as keep your mind focused on the lesson at hand.
A PayPal account. Most schools pay via PayPal, if you want to be paid you'll need one!
Lastly you'll need students. Should you wish to teach online independently or work for an online English training school. The former can be harder as there is quite a lot more that goes into marketing your classes, building a client base, developing a curriculum and setting up a payment system. The latter is easier as these aspects have already been solved by the company you may work for.
Mike, An Extremely Experienced Math Teacher With Us.


text:
Penny-Pinching Enjoys New Popularity
Frugality movement gathers steam as growing numbers of Americans seek to redefine 'the good life.'
By Mark Trumbull Staff writer of The Christian Science Monitor
January 4, 1996 | SEATTLE
IN the next few days, David Heitmiller and his wife, Jacque Blix, will be making New Year's resolutions of a wholly financial kind.
Like congressional deficit hawks, they will scrutinize last year's spending - tracked penny by penny - and plan a budget for this year's expenses.
The Seattle couple is part of the growing frugality movement. Rooted in the Pacific Northwest, the movement is expanding nationwide as Americans try to make better use of their money and time.
Though not new, the trend toward simpler living appears to be gathering steam, fueled by Americans' growing concerns about job security and retirement.
"Your Money or Your Life," a leading simplicity handbook, climbed last month to the top spot on Business Week's list of financial bestsellers. The book, in its second year in paperback, was not even in the top 15 until October.
Interest in the book has risen "as people have been waking up to the need to save money," says Vicki Robin, the book's co-author.
Layoffs such as this week's announcement of 40,000 job cuts by AT&T Corp. remind people that even in relatively stable economic times, jobs are not as secure as they once were. Some observers say technological change will spawn a new era of surplus labor.
Meanwhile, baby boomers, now approaching 50, are looking to retirement - and wondering where the money will come from.
Practicing steps outlined in "Your Money or Your Life," Mr. Heitmiller and Ms. Blix have cut expenses and left a yuppie past behind. Gone are the Audi 5000 and Jeep Cherokee, replaced by a Nissan Sentra. Blix watches newspaper ads for specials and buys food in bulk. Moving from a home to a rented apartment and drying clothes only part way in an electric dryer, the couple has reached a stage that simplicity devotees call "financial independence." That is, they do not need to work but can live off savings invested mostly in Treasury bonds. Annual expenses: $24,000.
Heitmiller, laid off two years ago from his job as a product manager at US West Corp., is now free to volunteer two days a week at a Big Brother program and Habitat for Humanity. He works occasionally for money to meet special expenses such as a trip to Europe.
Ms. Robin says probably a minority of those who read her book are aiming at total financial independence. Most of the roughly half-million people who have bought the book want to regain control of their lives and set priorities, she says.
"It's a confluence of two really profound trends," says the Seattle-based author.
First, Americans are realizing that "the job that used to support my life has now become my life." People are tired of seeing the activities they most value pushed aside by work, Robin says.
Second, in an era of consumerism and debt, people have lost touch with the frugality that has characterized this land from when Benjamin Franklin said "a penny saved is a penny earned" through the Great Depression. Since 1990, consumer debt per household has almost doubled.
For many Americans, the need to address the latter problem looms larger than the first. Having more free time "sounds good. But I can't put my kids through school," says John Mitchell, an economist with US Bank in Portland, Ore. Even with greater penny-pinching, he says, baby boomers may find themselves wanting to work more, not less.
Still, simplicity advocates say their techniques can transform lives even if they don't set people financially foot-loose. The nine-step program outlined in "Your Money or Your Life" boils down to analyzing one's spending of money and time and rethinking them in light of priorities and values.
Robin and co-author Joe Dominguez encourage people to chart expenses, down to the penny. A key concept is calculating one's real hourly wages - factoring in costs such as commuting time, work clothing, day care, and the cost of a second car.
The conclusion many people reach, Robin says, is: "I'm selling my life for $10 an hour."
By following the steps, individuals can "find out where the hole in their pocket is," she says. "People have found that they have $600-a-year latte habits," Robin says. Her book advises people to think through whether, instead of buying a gourmet cup of coffee each day, they'd rather make their own drinks and work dozens of hours less.
A host of other frugality books and newsletters, such as "The Tightwad Gazette" (Leeds, Maine), have popped up in recent years. Where many newsletters focus on specific money-saving tips, Robin and others are spotlighting the importance of overall priorities.
In addition to "Your Money or Your Life," Americans are turning to everything from the venerable "Franklin Planner" calendars to new books to help rebalance their burdened lives. Among these tomes are "First Things First" by Steven Covey (author of the bestseller "Seven Habits of Highly Effective People") and several books aimed at working mothers.
Robin says the movement toward simplicity is spread fairly evenly nationwide. But the Pacific Northwest has become an unofficial capital for the movement.
"The kind of person who's attracted to the Northwest does so not to get ahead in a career," but to enjoy the mountains or because it is a nice place to raise kids, says Janet Luhrs, editor of Simple Living, a newsletter published here.
It is a region of potlucks, not Porsches. Residents are recyclers, do-it-yourselfers, and enjoyers of a slower-paced, more informal lifestyles than dwellers in eastern or Sun Belt cities.
Yet Ms. Luhrs says Dallas residents responded with more than 1,000 letters after a television special on simple living aired there this fall. "It's not some little grass-roots thing anymore," she says.
Luhrs says the big transition in her own life came when her budding law career began overwhelming family time. She began wondering, "Whose daughter is this, the nanny's or mine?"
Now, although she still works on her quarterly journal and a new local radio show, Luhrs blocks out time to spend with her kids, such as a candlelight dinner every Sunday during which she unplugs her telephone.
"You can experience very positive things even if you don't become financially independent in three years," Heitmiller says.
For several years prior to Heitmiller's layoff, the couple had been pruning monthly expenses. After he lost his job, they sold their home and plowed the money from his severance package into their savings next egg. Since then, they have lived primarily off their earnings from bond investments.
Robin and Mr. Dominguez recommend bonds rather than stocks, largely because they are a much safer investment.
Still, that advice makes some financial planners' heads spin. Over time, they argue, bonds will be far outperformed by stocks and are less inflation-resistant.
Dominguez responds that the inflation problem was largely an aberration of the 1970s and '80s that countered America's long-term trend of low inflation. Even during that period, he has lived on his own nest egg since 1969 - all invested in Treasury bonds. That still supports the former Wall Street financial analyst's $6,000-a-year lifestyle. (The home he owns with friends is already paid for, and he spends less than $100 a month on food.)
His advice to Americans: Start "keeping down with the Joneses."
Buying into God's plan
Penny pinching pays big dividend for Louisiana teacher
How can my partner and I meld our money habits?

redpajama_set_name: RedPajamaCommonCrawl


More and more hamster owners are choosing to up the standard of hamster cages. Many do that through designing gorgeous natural setups. Natural hamster cages are a mystifying concept to some, so we're here with the information and ideas needed to clear things up.
Natural hamster cages are often referred to as "German-style hamster cages." These housing solutions better mimic a hamster's natural environment. Through the incorporation of all-natural materials, from the bedding to playthings and everything in-between, hamsters are believed to live happier and healthier lives.
This might sound rather vague, but that's because there is no one "right" way to make a natural hamster cage! You are free to use the resources available to you to create as simple or as elaborate a cage design as you want. Continue reading to learn what types of materials make for a great, natural hamster home. We'll also show you how to keep these spaces clean, and even show you some examples of what other crafty hamster owners have created!
Why Choose a Natural Hamster Cage Design?
Consider the fact that wild hamsters live in dry, warm areas. From deserts to steppes, these nocturnal, burrowing creatures naturally live in areas drastically different from what we expose them to at home.
What makes up the "conventional" cage design that many hamsters live in? Plastic is a big part of it, isn't it? Toys, tunnels, dishes, bottles, sand baths and hamster houses are commonly made of plastic. Size is another concern, as hamster cages tend to be taller than they are wide. This prompts many hamster owners to build multiple levels inside their hamster's cage, in hopes of creating more useable real estate.
One reason why natural hamster cages are called "German hamster cages" is due to the fact that German people have an entirely different approach to caring for hammies. They ditch the plastic for natural materials and give their pets more space to explore and hide, as a hamster's nature inclines them to do. It's not uncommon for German hamster cages to exceed 360 square inches in size.
Which Materials are Used in Natural Hamster Cages?
As you can guess, the aim is to switch out as many artificial components for natural ones as possible. This gives you a wide selection of materials to use in any number of ways. You should, however, make sure that each item introduced is safe for hamsters.
While this list is only a rough guideline as to the types of materials commonly used, it is a great starting point. As long as the material is natural and 100% hamster-safe, it can be used in a German-style hamster cage!
What Kind of Cage Should I Use?
Before you go through the painstaking process of buying or making natural items for your hamster's cage, you need to make sure that you have the proper type of cage. Conventional barred cages are typically a no-go for naturally-themed hamster habitats. They don't look great, are made of plastic or metal, and enable a bigger mess outside of the cage.
Instead, opt for a glass alternative. Glass tanks, like those used for lizards or fish, are already a popular alternative to cages with bars. They reduce mess, look great, and allow you to peek in on your hammy at any time without disturbing them!
Consider how wonderful this natural cage setup looks. A barred cage wouldn't look nearly as good and would obviously detract from the natural aesthetic you're going for.
It might be hard to envision what we mean when we say, "natural hamster cages," even with the information above in mind. One of the best things that you can do before crafting a natural cage of your own is to draw inspiration from what others have done. The hammy community loves to share their creations with others!
As you can see there are still some not-natural elements, but this Pinterest user has created a great German-style cage all the same. The substrate is great for easy burrowing and their hammy clearly has plenty of space to explore.
Do you see the little, wooden bridge that connects the floor of the cage to the little hamster house? Bendable bridges are used in many natural hamster cages due to their versatility. Bridges like the ones made by Hamiledyi can be used in their ordinary shape as a bridge or as a ramp for your hamster to help them get around.
In this cage, you can see that there is wood everywhere! This is a great and easy way to keep things natural, as many different types of wood are safe for use around hamsters.
For an item that combines the natural aesthetic with safe and healthy functionality, try adding wooden tubes to your hamster's cage. These tubes by Niteangel are all-natural and help to stimulate a hamster's natural exploratory instincts.
Of course, the wood you use doesn't have to always be shaped into a tunnel to be useful. Your hamster may enjoy climbing over pieces of sterilized drift wood, or even wide sticks that you have gotten from your yard. You should try to fill your hamster's home with as many of these natural elements as possible, without making the place too crowded.
For those without the skill, patience or time to make a multi-chambered hamster house out of natural materials, consider this elaborate house by Niteangel. This unit combines the fun of bridges, tunnels and burrows all into one.
While the examples above have shown you some great ideas to get you started, there are some subjects that we'd like to touch on in a more in-depth fashion.
Chewing is important for many hamsters, as it helps to keep their teeth clean and alleviate boredom. Natural chewing sticks serve this purpose and help to reinforce the all-natural vibe of your hammy's cage. This variety pack by FLOURITHING provides three different flavors for your hamster to love and allows them to chew to their heart's content without any artificial preservatives or flavor additives.
One thing that might be hard to gather, judging from the examples we showed above, is what type of substrate/bedding to use. Many owners will use different types of material, either separated by section in the cage or topped with one another to create a realistic and burrowing-friendly environment.
Soil is used often in natural hamster cages, though it's important to be sure to buy a hamster-friendly type. Some soils contain minerals that could harm your hammy. Stick to organic potting soil. You can also consider adding Aspen shavings on top, to help facilitate burrowing behaviors.
Sand is another popular option. However, you must be careful to buy sand that doesn't produce much dust, as this can lead to respiratory issues in hamsters. You can section off a sand bathing area for your hamster or use the sand in a larger section of the cage. Reptisand and Chinchilla sand are extremely popular options for this.
You have seen several examples of natural hamster homes now and have likely wondered about the plants used inside them. Cat grass and dry willow are often added to natural hamster cages for aesthetic purposes. You shouldn't try growing live plants inside of a hamster's cage. This is difficult to do successfully and takes up space that could be better used by your hammy.
Meadow grass and hay are often used, as well, to mimic a hamster's natural environment with natural and safe materials.
The way that we often house hamsters is quite contradictory to the way that they live naturally. The addition of plastics and small cages has been more for human convenience than for the hamster's benefit. While there's no saying that your hamster can't live happily in a spacious, conventional cage, there is certainly something to be said for the all-natural approach.
Natural hamster cages are a great way to help your hamster remain connected with their natural instincts. By creating a large, natural and healthy environment you are closely mimicking what your hammy would experience in the wild.
Use the examples posted above to gather inspiration for your own German-style hamster enclosure. When you have an idea as to what these cages entail, you can get creative by adding your own elements and personal flair! There is no limit as to how far you can go, how elaborate or simple your design may be, or how large the cage itself is.
Stick to all-natural materials as much as possible and observe your hammy for the first few days in their new environment. It may take some troubleshooting before you create a floor plan that is safe and fun your hamster, but don't be discouraged! The end result, a cage that you and your furry companion are both satisfied with, is worth it.


text:
Apple may launch revamped iTunes Store, App Store later this year
Published on BGR: The Three Biggest Letters In Tech | shared via feedly mobile
Apple may be working on an overhaul of its iTunes Store and App Store, according to 9to5Mac. Due to growing competition from music streaming services like Spotify and the growing popularity of Amazon's online music store, the redesign of the iTunes Store is considered "a top priority for Apple." The Cupertino-based company is looking to simplify the service and deliver a more user-friendly interface than the one afforded by its current design. The redesign will reportedly simplify content discovery, and it will "make the iTunes Store a much more engaging experience." The revamped stores are reportedly scheduled to launch later this year.
feedly. feed your mind. http://www.feedly.com


text:
How St. Louis Could Close the Workhouse and Save Money
Posted By Doyle Murphy on Tue, Jan 14, 2020 at 4:48 PM
DOYLE MURPHY
Kayla Reed of Action St. Louis says the Workhouse is a "stain" on St. Louis.
A new roadmap to closing the Workhouse aims for the aging jail's lifeblood — its $16 million annual budget.
At a news conference today, advocates for criminal justice reform and allies in the city government described a plan that involves defunding the controversial jail, moving state and city inmates to St. Louis' modern jail downtown and ending contracts to house federal inmates.
"The Workhouse is a stain on the city of St. Louis," said Kayla Reed, founder of Action St. Louis, one of the lead organizations behind the Close the Workhouse campaign along with the Bail Project and ArchCity Defenders.
Officially named the Medium Security Institution, the 53-year-old Workhouse has a capacity of 1,138 inmates, yet its daily population no longer comes close to that. As of today, there are 239 inmates there and another 660 at the City Justice Center (CJC), which opened in 2002 next to the downtown courthouses and has a capacity of 860.
Supporters for closing the Workhouse suggest moving all the people awaiting trial on municipal and state charges to CJC. There would be plenty of room, they point out, if the city stopped accepting federal inmates.
Housing federal inmates is part of the cashflow for county and city jails across the country, but a new report from the Close the Workhouse campaign that was released today argues that St. Louis actually loses money on the deal. There are currently 233 federal inmates in city jails. At $90 per day for each federal inmate, according to the report, the city is anticipating earning about $5.1 million in 2020 through its contract.
If the city stopped holding the federal inmates, it would have room to spare in the CJC, even taking into account inefficiencies that come with the need to keep some inmates separate from others. It could then sell the Workhouse, save the $16 million and come out $11 million ahead after subtracting the federal money.
"The city of St. Louis should not be in the business of detaining its residents," said Alderwoman Cara Spencer who joined the advocates today. "It doesn't make sense from a moral perspective, and it doesn't make sense from a financial perspective."
Spencer is among a group of aldermen supporting a soon-to-be-introduced board bill that seeks to eliminate funding for the Workhouse and redirect its budget toward services designed to address issues such as poverty that often suck people into jails and courts.
The Workhouse has long been a target of critics, who over the years have described black mold, rats, dangerously extreme temperatures and violence.
"The conditions are just horrendous," said Callion Barnes, a member of the Close the Workhouse campaign, who added that he has been in and out of the jail during the past two decades. "It's inhumane."
The city has tried to revamp the jail's notorious reputation, claiming improvements to the facility, but defense attorneys and advocates say they're not seeing much if any improvement.
Of the inmates in city jails, nearly all of them are awaiting trial. Activists say that runs counter to the legal principle that defendants are innocent until proven guilty, and they argue it is morally indefensible, noting that the cash bail system hits poor, often black people from vulnerable neighborhoods the hardest.
The Bail Project, which is a core organization behind the campaign with Action St. Louis and ArchCity Defenders, has posted bail for more than 2,300 people and reports that those defendants have made more than 90 percent of their court dates.
If the city put a portion of the Workhouse's budget toward making it easier for people to come to court — ideas include sending reminders, providing transportation to the courthouse and childcare — it could allow them to deal with their legal obligations without the destruction to families, careers and communities that even a short stint in jail can cause.
Reed of Action St. Louis says the Workhouse has played a major role in a broken system.
"For decades it has devastated families, causing economic burdens on people already struggling to make ends meet," she said at today's news conference. "Cash bail is a failed system, and the Workhouse is a failed institution."
Correction: An earlier version of this story incorrectly reported the number of inmates at the Workhouse. We regret the error.
We welcome tips and feedback. Email the author at doyle.murphy@riverfronttimes.com or follow on Twitter at @DoyleMurphy.
Sign up for our weekly newsletters to get the latest on the news, things to do and places to eat delivered right to your inbox.
Tags: Workhouse, Medium Security Institution, Jail, St. Louis, Action St. Louis, Kayla Reed, ArchCity Defenders, Bail Project, Close the Workhouse, Cara Spencer, Image
« St. Louis Alderwoman Cara Spencer F… | 4-Year-Old Shot in the Back While R… »
St. Louis Mayor Touts 'Transformed' Workhouse, But Jail's Critics Call BS
Don't Blame the Bail Project for Marcia Johnson's Murder
'Close the Workhouse' Campaign Demands Action from City Officials
'Unspeakably Hellish' St. Louis Workhouse Targeted in Class-Action Suit
'This Place Is Hell': An Undercover Trip Inside St. Louis' Workhouse
More by Doyle Murphy
Gunman Sticks Up Grey Fox, the RFT's Best Gay Bar of 2019
RFT's City Guide 2020: The Future of St. Louis
St. Louis County Mom Maya Caston Charged With Murdering Twin Babies
St. Louis Police Unions on Opposite Sides of Kim Gardner Lawsuit Read More
Keep the State Out of St. Louis' Residency Debate Read More
Meth-Addled Carjacker Kidnaps Man and Goat From Missouri Porn Store Read More
St. Louis Police Identify First Seven Homicide Victims of 2020 Read More
Three-1-Three Read More
Local Harvest Grocery Read More
Subway Read More


CrazyClearance.co.uk - When It's Gone, It's Gone!
Crazy Clearance is no longer affiliated with our site. But don't despair. We have partnered with some of the industry's largest and most customer friendly sites.
Crazy Clearance is part of JD Williams & Company Limited, the UK's leading direct home shopping company, operating over 20 successful catalogue brands. Their catalogues offer a huge selection of clothing and other products for all ages and sizes. All their clothes are designed to provide the best fit at the best value, and they are specialists in the area of larger size womenswear.


text:
Q: How to print out memory addresses of C-String? The function prints the addresses of each memory location of the dynamic array. Is this the right way?
int main()
{
    char str[] = "This is a test";
    printAddresses(str, strlen(str));
}

template <class type>
void printAddresses(type *item, int n)
{
    cout << "Printing Addresses..." << endl;
    for (int i = 0; i < n; i++)
    {
        cout << "Index " << i << ": " << ((&item) + i)  << endl;
    }

}

I've also heard that I should use:
cout << "Index " << i << ": " << (void*) &item[i] << endl;

but that gives me different memory address. I'm not sure which one is right.

A: Run this:
#include <iostream>
#include <cstring>
using namespace std;

template <class type>
void printAddresses(type *item, int n)
{
    cout << "Printing Addresses..." << endl;
    for (int i = 0; i < n; i++)
    {
        cout << "Index " << i << ": " << ((&item) + i)  << endl;
        cout << "Index2 " << i << ": " << (void*) &item[i] << endl;
    }

}

int main()
{
    char str[] = "This is a test";
    printAddresses(str, strlen(str));
}

which in my machine prints:
gsamaras@gsamaras-A15:~$ g++ -Wall main.cpp
gsamaras@gsamaras-A15:~$ ./a.out
Printing Addresses...
Index 0: 0x7ffd5c9ead58
Index2 0: 0x7ffd5c9ead90
Index 1: 0x7ffd5c9ead60
Index2 1: 0x7ffd5c9ead91
Index 2: 0x7ffd5c9ead68
Index2 2: 0x7ffd5c9ead92
Index 3: 0x7ffd5c9ead70
Index2 3: 0x7ffd5c9ead93
Index 4: 0x7ffd5c9ead78
Index2 4: 0x7ffd5c9ead94
Index 5: 0x7ffd5c9ead80
Index2 5: 0x7ffd5c9ead95
Index 6: 0x7ffd5c9ead88
Index2 6: 0x7ffd5c9ead96
Index 7: 0x7ffd5c9ead90
Index2 7: 0x7ffd5c9ead97
Index 8: 0x7ffd5c9ead98
Index2 8: 0x7ffd5c9ead98
Index 9: 0x7ffd5c9eada0
Index2 9: 0x7ffd5c9ead99
Index 10: 0x7ffd5c9eada8
Index2 10: 0x7ffd5c9ead9a
Index 11: 0x7ffd5c9eadb0
Index2 11: 0x7ffd5c9ead9b
Index 12: 0x7ffd5c9eadb8
Index2 12: 0x7ffd5c9ead9c
Index 13: 0x7ffd5c9eadc0
Index2 13: 0x7ffd5c9ead9d

Now think what sequence you expect to see for stored chars? You expect every character to be adjacent to the previous one (of course) and every one to take 1 memory cell. That should tell you that:

(void*) &item[i]

is the right thing to do.

Also notice that zmbq's comment, about using a debugger to find out makes sense too.

Finally, I would advice you to read: Printing array element memory adresses C and C++, why different output?

A: The correct address is the one you obtain when printing (void*)&item[i].
item is already a pointer; so is &item[i]. You are interested in printing the value of this pointer, you need to cast it to void* before calling << on it.
When you print ((&item) + i) you are making an extra level of indirection (&item is a pointer-to-pointer), so you print the address of item-the-pointer, not the address of what item is pointing to.
Note:: Starting with C++11 you can use std::addressof function in place of operator & for better readability and to avoid potential issues when T provides an overload for operator &:
cout << "Index " << i << ": " << std::addressof(item[i]) << endl;

A: A possible way could be to use the C-style printf with %p. So include <cstdio> then try for example:
 const char *sp = "abcde" + 2; // some computation giving a string address
 printf("sp=%p ('%s')\n", sp, sp);

Alternatively, cast to (void*) and use usual
std::cout << "sp at " << (void*)sp << std::endl;

A: The reason you get a different memory address is because your code is wrong.
void printAddresses(type *item, int n)

item is a pointer parameter to your printAddresses template function. So, in the following expression:
    cout << "Index " << i << ": " << ((&item) + i)  << endl;

Therefore:
&item

becomes the address of the parameter to your template function, and not the address of the array.
This is why:
 (&item)+i

is wrong, and is utterly meaningless. The address of the parameter to your template function is not really very useful, here.
 (void*) &item[i]

Is the correct answer.

redpajama_set_name: RedPajamaStackExchange


For more than three decades, Q-Cast has helped customers by carefully listening to their concerns, understanding their needs for specific, specialized parts, and paying extraordinary attention to detail and quality control.
Since 1979 Q-Cast has been a custom molder of polyurethane/urethane, rubber, and silicone parts for all types of industries and applications. We create specialized parts for diverse industries including automotive, communications, construction, gas and oil drilling and exploration, nuclear power generation, glass and steel mills and manufacturers – and many, many more.
Our goal at Q-Cast is to work with our customers every step of the way to ensure that they receive the best products possible to satisfy their requirements and exceed their expectations.
At Q-Cast we believe that customer service doesn't end when your order ships. We strive to provide the best ongoing support in the industry.
AOver 35 years of business in the Molding Industry.
BWe handle a wide range of materials. From 20 Shore A to 75 Shore D.
CFrom one piece to thousands of pieces, we can deliver.


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Deprecated List (River-Internet vtrunk API Documentation (internals))</title>
<meta name="date" content="2016-03-28">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Deprecated API

Contents

Deprecated Interfaces

Deprecated Classes

Deprecated Methods

Deprecated Constructors

Deprecated Interfaces

Interface and Description

org.apache.river.outrigger.AdminIterator

Use MatchSet instead. MatchSets
             can be obtained using the
             JavaSpace05.contents
             method.

org.apache.river.outrigger.ConstrainableJavaSpaceAdmin

The JavaSpace05.contents
             method can be used to view the space's contents.

org.apache.river.outrigger.JavaSpaceAdmin

Invoke the JoinAdmin and DestroyAdmin methods though those interfaces.  A view
             of the space contents can be obtained through the
             JavaSpace05.contents
             method.

net.jini.security.proxytrust.ProxyTrust

net.jini.security.proxytrust.ProxyTrustIterator

net.jini.security.proxytrust.ServerProxyTrust

Deprecated Classes

Class and Description

org.apache.river.thread.InProgress

net.jini.security.proxytrust.ProxyTrustExporter

net.jini.security.proxytrust.ProxyTrustInvocationHandler

net.jini.security.proxytrust.ProxyTrustVerifier

net.jini.security.proxytrust.SingletonProxyTrustIterator

org.apache.river.thread.TaskManager

will be removed from a future release soon.

Deprecated Methods

Method and Description

net.jini.core.lookup.ServiceRegistrar.lookup(ServiceTemplate, int)

net.jini.core.lookup.ServiceRegistrar.notify(ServiceTemplate, int, RemoteEventListener, MarshalledObject, long)

org.apache.river.concurrent.ReferenceQueuingFactory.processQueue()

org.apache.river.api.io.AtomicMarshalInputStream.readLine()

Use BufferedReader

org.apache.river.thread.ReadersWriter.writerWait(Object, long)

use newCondition() and Condition instead

Deprecated Constructors

Constructor and Description

net.jini.security.policy.PolicyFileProvider()

DynamicPolicyProvider now supports Umbrella grants directly.

org.apache.river.thread.RetryTask(TaskManager, WakeupManager)

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.

redpajama_set_name: RedPajamaGithub


text:
Our Season
Playwright in the Schools
Artistic Director John Morogiello has been teaching playwriting to elementary, middle, and high school students throughout Maryland for over two decades. Over the course of a 6 to 8 day residency, each class collaboratively writes and performs a play of their own. It's a fun way to explore the writing and acting process while learning about other curricular topics.
If you are interested in exploring the possibility of a playwright in your classroom, reach out to us via email at bestmedicinerep@gmail.com.
All plays are considered for our annual New Plays/New Voices festival.
New Plays/New Voices
Our 5th Annual New Plays/New Voices Festival, a celebration of plays written by MCPS students has been moved online. Enjoy!
James Armistead
Chevy Chase Elementary School
Friends for a Week
Best Medicine Rep, Inc.
BestMedicineRep@gmail.com
Best Medicine Rep receives funding from
Best Medicine Rep Inc. is supported in part by funding from the Montgomery County Government and the Arts & Humanities Council of Montgomery County.
© Best Medicine Rep, Inc. All rights reserved.
Best Medicine Rep is a 501(c)3, tax exempt, nonprofit corporation as determined by the Internal Revenue Service.


text:
New African
Nbr. 500, November - November 2010
Full content is available for members only
500 and still we rise!(Insiders)
The first issue under Afif Ben Yedder.
The New African story: Alan Rake, the father of New African, who retired in May 1999 after serving 21 years as editor, tells how the magazine came to be what it is today.
All issues great and small.
A life in stained glass: Cameron Duodu looks back on his long years with New African and picks the article he did after 9/11 as a reminder of the lessons the world should learn on the 9th anniversary of that tragedy in September 2001.
The good old days ... from 1966.
Sadat the man they couldn't weep for after assassination. Egypt, November 1981 Anwar Sadat was something of an enigma. Little he did as Egypt's president gained applause in his own country. Yet to Western leaders, he was something of a hero, particularly after his peace initiatives with the Israelis. Akbar Mustafa tells the full story of his assassination on 6 October 1981.
'A disgrace that we have to import food': Tanzania, June 1981 modernise farming methods. That is president Julius Nyerere's message to Tanzania's farmers. He insists the country must become self-sufficient. New African reports on the realities behind the president's remarks.
Does South Africa have the bomb? South Africa October 1977 In August, a Soviet satellite detected preparations for a South African nuclear test. The South Africans denied it. Now New African takes a look at the military might of a country moving into a state of siege.
Women march slow in Kenya: Kenya November 1981 the plight of Kenyan women is very close to the heart of professor Wangari Maathai--a Kenyan woman. She is an associate professor at the university of Kenya. Here, she talks to Jimoh Omo-Fadaka about feminism.
Mugabe 'we would rather Smith got all the seats in parliament and we got all the soldiers': Zimbabwe, July 1977 yet another set of British-sponsored negotiations are under way concerning the future of Zimbabwe. How does the Patriotic Front view the latest developments? New African talks to Robert Mugabe, joint leader with Joshua Nkomo.
'Old soldiers never die'.
'You only listen to Cassandra when Troy is on fire'.
SADC Africa's most successful regional community: as the Southern African development community (SADC) celebrates 30 years since its formation, Neil Ford examines how Africa's most successful regional community is gearing up for a very ambitious future.
Africa's finest bankers shine.
Tourism Africa's heartbeat, but ... New investment in hotel and airline capacity suggests that foreign and African firms alike are confident that tourist numbers to Africa are set to rise. But although not all countries will benefit from this increase, it is clear that most African governments are taking tourism seriously as a key driver of economic growth. Report by Neil Ford.
Mandela Conversations with Myself.
ACBF, quietly brilliant: as the 20th anniversary of the African Capacity Building Foundation (ACBF) draws near, the Foundation has been given an overwhelming vote of confidence by member countries to consolidate the successes of the past two decades, reports Baffour Ankomah from Paris.
How long will Jonathan's 'good luck' last? Events in Nigeria in the run-up to next year's elections, are likely to test the wave of good luck that President Jonathan Goodluck has ridden to power from obscurity 10 years ago. The president has already announced his candidacy for the 2011 elections, but he has some tough obstacles to navigate on the way. Cameron Duodu reports from Abuja.
Africa's women have led in the past, and will lead in the future: African politics has often excluded women, but Africa's women have played a much bigger part in it than they are given credit for. It is time for our women to be judged on their own merits and stake their rightful claim on the new Africa, writes Ellen Johnson-Sirleaf the president of Liberia and the first elected female president in Africa.
Who will define Africa? The time has come that we, as Africans, take responsibility for how our continent is portrayed, writes Thabo Mbeki former president of South Africa.
Kofi Annan 'I see the green revolution happening across Africa every day': with the right focus and sufficient political support, African agriculture can be a powerful engine for eradicating poverty and hunger, boosting economic growth and ensuring sustainable development, writes Kofi Annan, the former UN secretary general and currently the chair of the Alliance for a Green Revolution in Africa (AGRA).
Why grooming for leadership is essential: onerous challenges lie ahead of Africa, and because of this Africa's new leaders need to go through some form of apprenticeship or grooming to prepare themselves for the demands of modern nation-building, writes John Agyekum Kufuor, Ghana's former president.
Africa ready for take-off! As we launch into the new decade, Africa stands in good stead. Economically, our growth is now five times that of the Eurozone, and there have been gains across the continent in health and education, writes Mo Ibrahim, founder of celtel and the Mo Ibrahim Foundation.
Still we rise: "don't be ashamed of Africa or your African roots. Africa has a rich history, and an even more promising future," Zambia's first president, Kenneth Kaunda, tells African-Americans.
'Only the best is good enough for Africa': Africans should not to be brainwashed into thinking we are chickens when in fact we have the potential of eagles. The future of New African best lies in continuing to provide the right information to correct misinformation and to expose disinformation, writes Prof Felix I D Konotey-Ahulu.
The role of literature in modern Africa: "African countries need to change and change occurs through ideas. Literature is an essential repository of ideas. Literature can lead to change, not by espousing crude propaganda but by creating a collective sense of who a people are." By Chimamanda Ngozi Adichie (author of the award-winning novel, Half of a Yellow moon; purple hibiscus and the thing around your neck).
Africa can leapfrog into the Information Age: "the rise and fall of Timbuktu holds an important lesson for modern Africa: Timbuktu failed to control critical technologies. Hence it lost its treasures of wisdom. And America, once behind Timbuktu, is now the motherland of technology," writes Philip Emeagwali, the Nigerian award-winning computer scientist/geologist.
The African voice in the Diaspora.
Nbr. 601, April 2020
Nbr. 600, February 2020
Nbr. 599, December 2019
Nbr. 598, October 2019
Nbr. 597, August 2019
Nbr. 596, July 2019
Nbr. 595, June 2019
Nbr. 594, May 2019
Nbr. 592, March 2019
Nbr. 590, January 2019
Nbr. 588, November 2018


A beautifully designed vintage teak coffee table, made in Denmark and dating from the 1960's. This has a stunning design, with an angular and interestingly shaped base, there is also a useful lower tier. We have had this stripped and re-polished to a very high standard, the condition is superb throughout.


text:
Q: Groovy: Json to XML dynamic We have a json like following
{
  "test" : {
    "a" : "A",
    "b" : "B"
  }
}

The final XML outcome to be generated is if there is an element present in test json object that should be converted into XML and another XML tag to be added to demonstrate that the element present is true.
like following:
<test>
  <message>
    A
    B
  </message>
  <booleanMessage>
    true
    true
  </booleanMessage>
</test>

How can we use groovy transformation to do so?
Any help is appreciated.
Thanks!

A: You can use a combination of JsonSlurper and MarkupBuilder to achieve this.
def json = new groovy.json.JsonSlurper().parseText('''
    {
      "test" : {
        "a" : "A",
        "b" : "B"
       }
    }
''')

def sw = new StringWriter()
def xml = new groovy.xml.MarkupBuilder(sw)

json.each { prop ->
    xml."$prop.key" {
        message {
            prop.value.each { nestedProp ->
                "$nestedProp.key"(nestedProp.value)
            }
        }
        booleanMessage {
            prop.value.each  { p ->
                "$p.key"('true')
            }
        }
    }
}
println sw.toString()


When you walk in to an À La Mode event, you know what the night will bring. We use lush fabrics imported from all over the world, couture ribbon, table accessories with panache and platters and serving-ware that will make your guests gasp with delight. We work with all types of styles and themes—some of our most talked about tables include sports themes (customized to the actual favorite teams of the Bar Mitzvah boy), holiday themes, highly stylized black and white tables, as well as a tea party presentation decorated with spring hats and doll-sized porcelain teacups.
Our parties' unique style reflect American and European inspiration and careful attention to decorative detail. For any mood, for any occasion, for any special celebration, we will craft your one-of-a-kind party.
Check out our gallery of dessert tables.


text:
#import "NSObject.h"

@class PKPhysicsBody;

@interface PKPhysicsContact : NSObject
{
    PKPhysicsBody *_bodyA;
    PKPhysicsBody *_bodyB;
    struct CGPoint _contactPoint;
    double _impulse;
    BOOL _didBegin;
    BOOL _didEnd;
}

- (id).cxx_construct;
- (void).cxx_destruct;
@property(readonly) double collisionImpulse;
@property(readonly) struct CGPoint contactPoint;
@property(readonly) PKPhysicsBody *bodyB;
@property(readonly) PKPhysicsBody *bodyA;
- (void)setCollisionImpulse:(double)arg1;
- (void)setBodyB:(id)arg1;
- (void)setBodyA:(id)arg1;
- (void)setContactPoint:(struct CGPoint)arg1;
@property BOOL didEnd;
@property BOOL didBegin;
- (id)init;

@end


Christmas is less than a week away. Every year I have a hard time wrapping my head around how fast the holiday season comes upon us and then passes us by. I have a busy week, but I am trying to keep my blog posts three days a week, even through this holiday time.
Once again I am looking at a dressy holiday outfit. Today I am showing you how you could take a plain skirt and dress it up for a more formal look. Again, I chose a monochrome palette. You certainly don't have to choose monochrome for a formal look, but it really is an easy way to make an outfit look classy. I chose gray for this look. I know gray is not a color many people would choose, but gray can add a touch of elegance without going as stark as black. The beauty of gray is that it comes in different shades from neutral, to light to a dark charcoal.
I love this pretty red bush that was behind my daughter's apartment complex. It was the perfect backdrop for this holiday outfit.
I found this gray pleated skirt at Kohl's on the clearance rack. It is Apt.9 brand. I saw this skirt last spring when the new season started and I just loved it, but I didn't want to pay the full price. Being a thrifter, I have the attitude that the price is more important than being what I'll term, trend timely. All that means is I am willing to wait on a piece that is more trendy to pay less. That's just me. Before I became a fashion blogger I never paid any attention to the trends, so I figure I am doing better, in that I follow trends, even if I do it later than when they first appear. Here is a pretty metallic one from Macy's.
The jewelry I am wearing I've had for some time and thought it went well with this gray palette.
My little gray clutch is a brand called Urban Expressions. Here is a pretty red one from DSW.
These gray pumps are Comfort Plus by Predictions. They are cushy and the heels aren't too high. Here is a different brand, but similar look from DSW.
What would you wear to a formal holiday event? I'd love to have your input.
I hope your week is off to a good start and that you are ready for the holidays. Remember to take some time for yourself. You are the only you there is and you are beautiful!


Aida, with its soft and graceful design, evokes the corolla of a flower. The arms open and curve outwards like petals. Simple geometrical forms make up what is a delicate yet strongly characterized ensemble. Again, with this design, Roberto Lazzeroni has created a familiar shape whose incisive style makes it new and modern. Besides nature, the iconographic reference is 1950s furniture. Aida echoes the clean forms and the combination of fabric and leather typical of that period. In this refined oscillation between past and present, the armchair blends traditional production techniques with up-to-date materials and effects. Aida is available in a fixed or revolving version. Its base is made of black painted wood fiber.


Much like cyberattacks, natural disasters can impact companies of all sizes and industries. And just like security incidents, firms must do all they can to protect mission-critical data from being compromised as a result of disruptions like hurricanes, fires, floods and other threatening events.
There are plenty of options available for organizations that want to protect corporate files and applications from disasters. On-site backups like hard drives, disks and tapes are popular options, allowing employees to quickly retrieve critical data. However, the problem with these devices is that on-site disasters can damage or destroy this content, going against the very idea of disaster recovery.
Cloud computing has come a long way in a short amount of time, especially when it comes to disaster preparedness. Hosted environments can be purchased on a monthly basis, allowing firms to avoid spending for software or hardware that requires an upfront capital investment. Organizations that require more computing power or storage capacity can add these as needed.
Business2Community reported that 25 percent of companies that experience a disaster never reopen. The news source indicated that security has been a concern surrounding cloud computing in the past, but the technology has made significant improvements in this area, thanks to increased focus by vendors on keeping client data safe from harm.
Instead of potentially closing their doors for good, companies can adopt cloud backup without going over budget. Firms that support a mobile workforce can ensure staff members always have access to work-related documents because the cloud is available through the internet, making productivity a possibility even during disruptions. The next Hurricane Sandy may be right around the corner, but organizations leveraging hosted environments can be ready for any situation.


Because Of Lily is the fusion of two voices alongside an old guitar and a scotched-up tambourine. It's a sort of masculine and feminine hybrid of a unique musical soul. In short, it's a couple of singer/songwriter/composers named Nyr Raymond and Crystal Petit, both music veterans, who simply enjoy making music with their guitar.
This particular guitar, called Lily, is the reason behind the group's name. It's "Because Of Lily" that Nyr and Crystal are able to create the songs they make.
This union has allowed the two artists to explore a side of music that's often forgotten today…the simple and sincere side.
Because Of Lily is also an extended family of musicians and artists. A key member of this team is Jeremie Coke, bass player for the group Electro Deluxe, and old friend of Crystal and Nyr's. He adds his magic touch to each song and is the co-author of some of B.O.L.'s songs. Two other central figures of the family are Arnaud Renaville (drums) and Gäel Cadoux (keys), also members of Electro Deluxe. Their love for the group can be heard all throughout B.O.L.'s music.
B.O.L. is definitely a group that's in its element when in front of a live audience. Whether performing a stirring ballad or an explosive jump-outta-your seat number, this group is sure to touch you in some way.


Showing items in category Egypt, sorted by newest listed first.
EGYPT - 1895 5m (1d) 'soldiers' rate cover to UK.
1895 (23.X.) use of pre-printed '1st Bn Gloucestershire Regt' envelope addressed to UK bearing 5m carmine 'Spinx' adhesive. A scarce soldiers 1d rate cover signed at lower left by the Lieutn Col.
EGYPT - 1927 4m IMPERFORATE PLATE PROOF block of four in green struck CANCELLED on reverse.
1927 4m green 'Postage Due' (SG type D59) in a fine IMPERFORATE PLATE PROOF corner marginal block of four with CANCELLED applied diagonally in black on reverse.
EGYPT - 1927 2m IMPERFORATE PLATE PROOF block of four in red-orange struck CANCELLED on reverse.
1927 2m red-orange 'Postage Due' (SG type D59) in a fine IMPERFORATE PLATE PROOF corner marginal block of four with CANCELLED applied diagonally in black on reverse.
EGYPT - 1927 2m IMPERFORATE PLATE PROOF block of four in grey-black struck CANCELLED on reverse.
1927 2m grey-black 'Postage Due' (SG type D59) in a fine IMPERFORATE PLATE PROOF corner marginal block of four with CANCELLED applied diagonally in black on reverse.
EGYPT - 1871 1/- double rate entire to UK bearing GB 6d (plate 9) pair tied 'B 01'. SG Z24.
1871 entire addressed to UK (address line blacked out) bearing GB 6d violet adhesive pair (plate 9) paying the double rate to UK cancelled by 'B 01' numerla strike and with ALEXANDRIA cds below. SG Z24.
EGYPT (BR.FORCES USED IN) - 1936 3m green rate cover to UK used at MPO/ABU QIR.
BRITISH FORCES IN - 1936 (DE.31.) cover addressed to UK bearing 3m green (SG A12) tied by M.P.O./ABU QIR cds.
EGYPT - 1881 1p rate local cover used at DESSOUK and struck in 'blue' ink.
1881 (AV.23.) cover addressed locally bearing 1p adhesive tied by DESSOUK cds struck in 'blue' ink.
EGYPT - 1882 1p rate local cover used at FOUA.
1882 (JA.13.) miniature cover addressed locally (ex reverse flap) bearing 1p adhesive tied FOUA.
EGYPT - 1882 1p rate local cover used at TANTAH/ARRIVEE.
1882 (JA.10.) cover addressed locally bearing 1p adhesive tied TANTAH/ARRIVEE.
EGYPT - 1882 1p rate local cover used at TANTAH/DEPART.
1882 (AV.20.) cover addressed locally bearing 1p adhesive tied TANTAH/DEPART.
EGYPT - 1884 1p rate local cover used at MINOUF.
1884 (DE.14.) cover addressed locally (ex part of reverse flap) bearing 1p pair adhesive tied MINOUF.
EGYPT - 1887 1p rate local cover used at BENI-MAZAR cds.
1887 (FE.14.) cover addressed locally bearing 1p blue tied by BENI-MAZAR cds.
EGYPT - 1891 1p rate local cover used at FOUA and struck in 'blue' ink.
1891 (SE.6.) miniature cover addressed locally (ex reverse flap) bearing 1p adhesive tied by FOUA cds struck in 'blue' ink.
EGYPT - 1868 outer wrapper to France bearing French 80c red tied by '5080' rhomboid.
FRENCH OFFICES - 1868 (MAR.29.) outer wrapper addressed to France bearing French 80c red adhesive tied by dotted '5080' rhomboid cancel used in Egypt with ALEXANDRIE/ EGYPT cds at left. Handstamped 'PD' (Paid) and with F.B.BOUGROGGNE/ALEXANDRIE commercial handstamp at left.
EGYPT - 1879 1p rate cover addressed locally at SINKET EL SAB.
1879 (MAG.3.) cover addressed locally bearing 1p adhesive tied by scarce V.R.POSTE EGIZIANE/ SINKET EL SAB cds.
EGYPT - 1914 2m green mint block of 4 with OHMS overprint INVERTED. SG 084b.
1914 2m green in a fine mint block of four overprinted O.H.M.S. and showing the major variety OVERPRINT INVERTED. SG 084b.
EGYPT - 1930 5m brown letter sheet uprated locally for registered mail at ELAMAR. H&G 9.
1930 5m light brown on cream postal stationery letter sheet addressed in Arabic with additional 5m brown adhesive pair added. Registered and tied ELAMAR and dated 4.AU.32. H&G 9.
EGYPT - 1940 'OHMS' cover to Belgium with 10m 'Service' pair applied at ORMAN.
1940 (FE.14.) stampless OHMS envelope addressed to belgium with 10m bright violet SERVICE official adhesive pair added and cancelled ORMAN. Black circular M/CENSORSHIP applied.
EGYPT - 1938 10m IMPERFORATE PLATE PROOF 'Service' stamp printed in bright violet.
1938 10m SERVICE DE L'ETAT 'Official' IMPERFORATE PLATE PROOF (SG type 085) printed in the issued colour of bright violet on thick white card with Arabic print on reverse side.
EGYPT - 1938 2m IMPERFORATE PLATE PROOF 'Service' stamp printed in red.
1938 2m SERVICE DE L'ETAT 'Official' IMPERFORATE PLATE PROOF (SG type 085) printed in the issued colour of red on thick white card with Arabic print on reverse side.
EGYPT - 1938 1m IMPERFORATE PLATE PROOF 'Service' stamp printed in orange.
1938 1m SERVICE DE L'ETAT 'Official' IMPERFORATE PLATE PROOF (SG type 085) printed in the issued colour of orange on thick white card with Arabic print on reverse side.
EGYPT - 1915 censored F.P.O./No.311 cover addressed in Arabic.
1915 (OC.6.) stampless cover addressed in Arabic cancelled on the reverse by F.P.O./No.311 cancel use by Indian troops at Suez hospital and struck on the front by violet circular PASSED BY CENSOR/INDIAN EXPEDITIONARY FORCES/38 handstamp.
EGYPT - 1921 use of local TELEGRAM complete with telegraph form used at CAIRO.
1921 (APR.7.) blue on cream 'The Eastern Telegraph Company Limited' TELEGRAM envelope addressed locally bearing 5m adhesive tied CAIRO. Complete with the original red on cream TELEGRAM. (2 items).
EGYPT - 1939 3m brown PSC uprated with 2c DIAGONALLY BI-SECTED making up the 4m rate.
1939 3m brown postal stationery postcard addressed locally and bearing a 2m adhesive DIAGONALLY BI-SECTED and tied alongside by CAIRO cds. A genuine use with message of this bi-sected stamp making up the 4m local rate. Unusual item. H&G 36.
EGYPT - 1948 1 1/2d rate 'Forces Mail' cover to UK used at FPO 151.
1948 (JA.10.) cover addressed to UK marked 'Forces Air Mail' bearing GB (un-overprinted) 1 1/2d adhesive tied by FIELD POST OFFICE/551. Marked origin on reverse as 'HQ RAF at Abu Sueir'. FPO 151 later went to Bahrain.
EGYPT - 1915 'FIELD SERVICE' postcard to India used at FPO No.313.
1915 (30.MY.) stampless FIELD SERVICE/INDIA blank type postcard addressed to India pre-printed on reverse in Indian script for use by soldier 'I am fine…. Etc' cancelled by scarce C.S.OFFICE/I.E.F. cds with F.P.O./No.313 cancel below of the following day used by troops stationed at Ismalia. ALWAR arrival.
EGYPT - 1912 10m rate registered local cover used at ASYUT.
1912 (18.I.) registered cover addressed locally bearing 5m pair tied ASYUT.
EGYPT - 1908 5m rate local cover used at RAS EL TIN.
1908 (15.VII.) cover addressed locally bearing 5m adhesive tied RAS EL TIN. Complete with original letter.
EGYPT - 1906 10m rate cover to France used at DAWAWIN.
1906 (10.VII.) cover addressed to France bearing 5m pair tied DAWAWIN/(CAIRE).
EGYPT - 1899 2p local registered cover used at MANOUD.
1899 (AO.19.) neat locally addressed cover bearing 2p orange tied by MANOUD/CAISSE cds.
EGYPT - 1898 10m rate cover to Iran used at GHOUHIA/CAIRE.
1898 (30.V.) cover addressed to Iran bearing 5m pair on reverse flap tied GHOUHIA/CAIRE.
EGYPT - 1929 'S.S.TAIF' maritime cover used from PORT TAUFIQ to ALEXANDRIA.
1929 (SE.11.) cover addressed to Alexandria bearing 1m and 4m adhesives tied by violet oval S.S.TAIF/KHEDIVIAL MAIL LINE strike with PORT TAUFIQ cds at left. Alexandria arrival b/s.
CYPRUS - 1940 inward cover from Egypt with 'PASSED BY CENSOR 1' h/s applied.
1940 (NO.26.) inward cover addressed to Kyrenia bearing British Occupation Of Egypt 10m red adhesive (SG A13) tied by FIELD POST OFFICE/173 cds with blue boxed PASSED BY/ R.A.F./CENSOR 4 handstamp below. NICOSIA transit b/s and KYRENIA arrival with scarce red d/r PASSED CENSOR/1/CYPRUS strike applied to the front.
EGYPT - 1918 'O.A.S.' use of censored cover to UK used at ARMY POST OFFICE SZ12.
1918 (NO.26.) stampless cover addressed to UK marked 'O.A.S.' and cancelled by s/r ARMY POST OFFICE/SZ12 cds used by troops stationed at Alexnder. Violet triangular PASSED BY CENSOR/No.3454 h/s at lower left.
EGYPT - 1919 'O.A.S.' use of postcard to UK used at ARMY POST OFFICE SZ12.
1919 (14.APR.) stampless use of postcard addressed to UK marked 'O.A.S.' and cancelled by s/r ARMY POST OFFICE/SZ12 cds used by troops stationed at Alexnder.
EGYPT - 1917 use of FIELD SERVICE postcard from ARMY POST OFFICE/SZ9.
1917 (FE.4.) use of FIELD SERVICE postcard (A.F.A.2042) addressed to UK in soldiers pencil stating in pre printed text 'I'm Well' and cancelled by s/r ARMY POST OFFICE/SZ9 cancel used by troops stationed at El Arish in Egypt.
EGYPT - 1889 5m carmine PSE to Italy used at ALEXANDER. H&G 6.
1889 5m carmine on bluish grey postal stationery envelope addressed to Italy bearing additional 5m adhesive & cancelled ALEXANDRIE/D cds dated 9.II.94. H&G 6.
EGYPT - 1889 2p orange underpaid PSE to Italy used at ALEXANDER. H&G 3.
1889 2p Orange on bluish grey postal stationery envelope addressed to Italy & cancelled ALEXANDRIE/D & dated 29.IX.93. Boxed 'T' tax mark manuscriptly cancelled at bottom. H&G 3.
EGYPT - 1889 1p ultramarine PSE to Italy used at ALEXANDER. H&G 2.
1889 1p Ultramarine on bluish grey postal stationery envelope addressed to Italy & cancelled ALEXANDER/D cds dated 16.II.95. H&G 2.
EGYPT - 1889 2m green PSE to Switzerland used at SMALL. H&G 5.
1889 2m green postal stationery envelope (type d) addressed to Switzerland & cancelled by SMALL cds dated 20.XII.06. H&G 5.
EGYPT - 1941 FPO/190 censor cover to India.
1941 (MR.13.) cover addressed to India bearing 'GB' 3d (x2) tied by FIELD POST OFFICE/190 cds with scarce PC.22/OPENED BY/CENSOR label at left edge with '7299/PMEAF/10-43' imprint tied by violet diamond shaped 'D' censor strike. British troops located at Cairo GHQ.
EGYPT (French Offices) - 1873 80c rate local outer wrapper cancelled '5080' at ALEXANDRIE.
1873 (AOUT.18.) outer wrapper addressed locally bearing French 80c red adhesive tied by dotted '5080' rhomboid cancel used in Egypt with ALEXANDRIE/EGYPT cds at left. Handstamped 'PD' (Paid) and with F.B.BOUGROGGNE/ALEXANDRIE commercial handstamp at left.
EGYPT (French Offices) - 1868 40c rate local outer wrapper cancelled '5080' at ALEXANDRIE.
1868 (AOUT.15.) outer wrapper addressed locally bearing French 40c orange adhesive tied by dotted '5080' rhomboid cancel used in Egypt with ALEXANDRIE/EGYPT cds at left. Handstamped 'PD' (Paid) and with F.B.BOUGROGGNE/ALEXANDRIE commercial handstamp at left.
EGYPT - 1945 'Prisoner Of War' letter sheet to Italy.
1945 (AUG.8.) 'Prisoner Of War' letter sheet with tuck in flap on reverse addressed to Italy from an Italian internee and struck by violet boxed P/W MIDDLE/EAST 207 h/s. Sent from POW 308 Camp.
EGYPT - 1945 inward 'Italian Red Cross' cover to prisoner of war at 310 camp.
1945 inward stampless cover from Italy addressed to the POW camp 310 in Egypt and struck by violet ITALIAN RED CROSS strike. Sent to an Italian internee and complete with original letter.
EGYPT - 1943 'Prisoner Of War' letter sheet to Italy.
1943 (JUL.) 'Prisoner Of War' letter sheet with tuck in flap on reverse addressed to Italy from an Italian internee and struck by blue oval NO. 313 PRISONER OF WAR CAMP/MEF strike with violet boxed P/W/MIDDLE/EAST 107 h/s.
EGYPT - 1929 15m RPSE used locally and uprated at ALEXANDRIA. H&G 4.
1929 15m Dark blue on cream registered stationery envelope used locally and bearing additional 5m+15m adhesives tied ALEXANDRIA and dated 7.DE.35. H&G 4.
EGYPT - 1880 red on cream range of INTERPOSTAL SEALS.
1880 (circa) red on cream INTERPOSTAL SEALS for BEDRECHEIN, ROSETTE and SIDI GABER.
EGYPT - 1913 10m blue RPSE uprated to Germany and used at EL EBRAHIM/SWARDIA. H&G 2.
1913 10m blue on cream registered postal stationery envelope with Arabic text on first line (size G) addressed to Germany and uprated with additional 10m adhesive pair tied by EL EBRAHIMIA/SWARDIA cds's dated 14.JA.21. A scarce envelope. H&G 2.
EGYPT - 1929 2m dark grey PSE to Switzerland used at CAIRO. H&G 24.
1929 2m dark grey on cream postal stationery envelope (size d) addressed to Switzerland and bearing additional 2m black adhesive tied CAIRO. H&G 24.
EGYPT - 1922 2m vermilion PSE to Switzerland used at CAIRO. H&G 21.
1922-25 2m vermilion on white laid paper postal stationery envelope (size d) addressed to Switzerland. H&G 21.
EGYPT - 1889 1m brown PSE uprated to Switzerland. H&G 4.
1889 1m brown postal stationery envelope (size d) addressed to Switzerland and bearing additional 1m brown adhesive tied by CAIRO cds dated 12.III.13. H&G 4.
EGYPT - 1889 1p blue-grey PSE to Switzerland used at CAIRO. H&G 2b.
1889 1p blue-grey on bluish white postal stationery envelope (size a) addressed to Switzerland cancelled by CAIRO cds dated 4.01.07. H&G 2b.
EGYPT - 1889 1p ultramarine PSE to Switzerland used at CAIRO. H&G 2a.
1889 1p ultramarine on bluish white postal stationery envelope (size b) addressed to Switzerland cancelled by CAIRO cds dated 1.IV.07. H&G 2a.
EGYPT - 1916 censored cover to Switzerland.
1916 (NO.20.) commercial cover to Switzerland bearing 5m pair tied ALEXANDRIA with blue on white OPENED BY CENSOR label on top edge tied on the front and reverse sides by red oval PASSED BY CENSOR/No.6 h/s.
1916 (22.IV.) commercial cover to Switzerland bearing 5m pair tied ALEXANDRIA with blue on white OPENED BY CENSOR label on top edge tied on the front and reverse sides by violet oval PASSED BY CENSOR/No.6 h/s.
1916 (20.III.) commercial cover to Switzerland bearing 10m adhesive tied ALEXANDRIA with blue on white OPENED BY CENSOR label on top edge tied on the front and reverse sides by blue oval PASSED BY CENSOR/No.20 h/s.
EGYPT - 1889 5m PSE used locally from BACOS. H&G 6.
1889 5m carmine on cream postal stationery envelope (size a) addressed locally and cancelled by BACOS cds dated 20.X.10. H&G 6.
EGYPT - 1922 2m PSE used locally from ENVILLE. H&G 21.
1922 2m vermilion on cream postal stationery envelope (size d) addressed locally cancelled by ALEXANDRIA/ENVILLE cds dated 15.MR.27. H&G 21.
EGYPT - 1913 underpaid postcard with 'Postage Due' added.
1913 (13.Iv.) use of picture postcardaddressed to Germany depicting 'Karnak, The pylon of Euergetes' bearing 1m (x2) and 2m adhesives tied LUCSORE. 'T' tax mark applied in pencil and with 2p orange postage due added (SG D74) and cancelled the same day.
EGYPT - 1950's 5m violet IMPERFORATE PROOF 'Revenue' adhesive h/s'd CANCELLED on reverse.
1950 (circa) 5m violet REVENUE adhesive IMPERFORATE PROOF and handstamped diagonally on reverse CANCELLED. Ex King Fuad.
EGYPT - 1884 2m rate local registered cover used at FOUA.
1884 registered cover addressed locally (ex reverse flap) bearing 2m orange adhesive tied by FOUA cds with a further strike at right and scarce black registration handstamp at top. (Smith Reg. No.1).
EGYPT - 1915 (circa) PRINCE HUSSEIN KAMEL unused multi coloured perforated label.
1915 (circa) multi coloured perforated label depicting PRINCE HUSSEIN KAMEL the Sultan of Egypt. Unused with out gum.
EGYPT - 1918 censor cover to Switzerland.
1918 (9.V.) cover addressed to Switzerland bearing 5m pair tied by CAIRO/B cds with blue on white OPENED BY CENSOR label applied over the edge of the stamps at the top of the cover and with black PASSED/CENSOR/12 h/s struck below. BASEL arrival b/s.
EGYPT - 1939 OHMS registered cover to Sweden with 5m official block of four used at ABBASSIA.
1939 (3.10.) use of O.H.M.S. registered cover to Sweden bearing 5m brown 'Service De L'Etat' adhesive in a fine block of eight tied by ABBASSIA cds and with black on red R.OHMS/No registered label at lower left.
EGYPT - 1915 stampless censored postcard used by the Indian Expeditionary Force.
1915 (10.X.) unstamped postcard addressed to UK depicting 'Port Said - View Of The Canal' struck by PORT SAID cds with large red PASSED BY CENSOR/INDIAN EXPEDITIONARY FORCE/111 h/s applied.
EGYPT - 1933 postcard to Italy with 1933 CONGRES INTERNATIONAL cds and cachet.
1933 (FE.21.) use of picture postcard addressed to Italy depicting 'The Excaviated Sphinx' bearing 3m and 10m adhesives tied by special LE CAIRO/1933/CONGRES INTERNATIONAL cds and struck below by large oval CONGRES INTERNATIONAL/DU TO RISME/ 1 XEME ASSEMBLEE GENERALE/LE CAIRO 1933 cachet in magenta.
EGYPT - 1936 3m green on cover to UK used at MPO/CAIRO.
BR.FORCES USED IN - 1936 (DE.1) neat cover addressed to UK bearing 3m green (SG A12) tied by M.P.O./CAIRO cds. Scarce used on cover. (SG X100).
EGYPT - 1923 locally registered cover with UNCLAMED handstamp.
1923 (JA.25) commercial cover registered locally to En Ville (slightly reduced at left from opening) bearing 15m adhesive tied ALEXANDRIA cds with black bilingual UNCLAIMED h/s applied at right.
EGYPT - 1941 censored cover to UK used at EGYPT/69.
1941 (AU.3.) cover addressed to UK bearing 'GB' 1d and 9d adhesives tied by EGYPT/69/POSTAGE/ PREPAID cancel with violet boxed PASSED BY UNIT CENSOR 70 h/s at lower left. Mails from the Western Desert Campaign was routed through Egypt under an agreement with the Allied forces. 10d rate (4 piastres) per 10 grammes.
EGYPT - 1941 censored Australian Forces 'OAS' cover to UK.
1941 (AP.4.) stampless cover addressed to UK marked 'On Active Service' and cancelled by AUS FPO 31 s/r cds with violet boxed PASSED BY UNIT CENSOR/377 h/s at left. This being the last day of use at Ikingi Maryut in Egypt before the Australian troops left for Tobruk.
EGYPT - 1929 registered cover used at ZANKALLIN.
1929 (FE.2) registered cover addressed locally in Arabic bearing 5m & 10m adhesives tied ZANKALLIN with Cairo transit & AZHAR arrival b/s's.
EGYPT - 1931 registered cover used at MANSHIET SULTAN.
1931 (JA.5) registered cover addressed locally in Arabic bearing 5m & 10m adhesives tied MANSHIET SULTAN with AZHAR arrival b/s.
EGYPT - 1930 registered cover used at KOM EL NUR.
1930 (NOV.14) registered cover addressed locally in Arabic & bearing 15m adhesive KOM EL NUR with ASHAR arrival b/s.
EGYPT - 1930 registered cover used at HURIN.
1930 (JUN.20) registered cover addressed locally in Arabic bearing 15m adhesive tied HURIN with AZHAR arrival b/s.
EGYPT - 1928 registered cover used at KOM-HAMADA.
1928 (NO.20) registered cover addressed locally in Arabic bearing 15m adhesive tied by KOM- HAMADA cds with Cairo transit & AZHAR arrival b/s's.
EGYPT - 1929 registered cover used at SAHRAGT EL KUBRA.
1929 (DE.28) registered cover addressed locally in Arabic bearing 15m adhesive tied by SAHRAGT EL KUBRA cds with AZHAR arrival b/s.
EGYPT - 1928 registered cover used at SHIRBIN/P&R.
1928 (DE.24) registered cover in Arabic bearing 15m adhesive tied by SHIRBIN/P&R cds with AZHAR arrival b/s.
EGYPT - 1922 underpaid picture postcard to UK from CAIRO.
1922 underpaid postcard addressed to UK depicting 'Alexandrie-Pont Sur Le Canel Mahmoudieh' bearing 2m black with 5m 'Kingdom' overprint adhesive tied by CAIRO cds. Black boxed 'T' h/s at left and with '1 1/2d/TO PAY/79' strike applied on arrival with GB 1 1/2d postage due added.
EGYPT - 1922 5m pink uprated postal stationery letter sheet used from SHEBRA. H&G 8.
1922 5m pink on white woven paper postal stationery letter sheet registered to Cairo and bearing additional 10m adhesive tied by SHEBRA (CAIRO)/R cds dated 18.AP.29. Some small opening faults and with pin hole through to fasten. A scarce piece of stationery. H&G 8.
EGYPT - 1906 4m IMPERFORATE PROOF (ex Helio Vaugirard).
1906 4m vermilion (SG type 21) IMPERFORATE PROOF printed on thin white paper (110x 155mm) & marked at bottom 'L' Egypte Des Pharaons Et Le Timbre Poste/Helio-Vaugirard 1950'. Very few copies being in the hands of the public from this printing company. Scarce.
EGYPT - 1918 'OAS' soldiers envelope (ex Egyptian Expeditionary Force) DAMAGED BY SEAWATER.
1918 use of stampless 'On Active Service' envelope addressed to UK in soldiers pen cancelled by part ARMY POST OFFICE/SZ cds and struck by violet boxed DAMAGED BY IMMERSION/IN SEA WATER handstamp. Ex S.S.Kingstonian mail from Egyptian Expeditionary Force.
EGYPT - 1909 4m red PSC used from CAIRO. H&G 18.
1909 4m Red on buff postal stationery postcard addressed to S Africa & cancelled CAIRO 11.IX.15. H&G18.
EGYPT - 1907 2m green PSC used from CAIRO. H&G 14.
1907-10 2m Green on buff postal stationery postcard addressed to UK cancelled CAIRO/D & dated 5.XII.08. '1d/I.S./K' tax mark added on arrival. H&G14.
EGYPT - 1944 25m postal stationery air letter addressed to Greece. H&G 1.
1944 25m purple brown postal stationery letter sheet on unwatermarked paper addressed to Greece and cancelled by light CAIRO cds dated 30.1.53 and with two Egyptian censor marks applied to front. SG 1.
EGYPT - 1948 King Farouk range of PALESTINE AID sheets.
1948 King Farouk range of six postal order type revenue documents (240x110mm) all complete with counterfoils to receipt payment issued to raise funds for the 'Palestine Aid'. 5p in plum, 10p in dull orange, 50p in green, 50p in dull blue, 100p in purple & 100p in bright blue. All in fine unused condition. Most attractive lot. (6 items).
EGYPT - 1953 5m brown-lake 'air' adhesive U/M with DOUBLE BARS variety. SG 482.
1953 5m brown-lake 'air' adhesive overprinted 'Egypt-Sudan' in unmounted mint condition and showing the variety OBLITORATOR BARS DOUBLED. SG 482.
EGYPT - 1953 3m sepia 'air' adhesive U/M with DOUBLE BARS variety. SG 481.
1953 2m vermilion 'air' adhesive overprinted 'Egypt-Sudan' in unmounted mint condition and showing the variety OBLITORATOR BARS DOUBLED. SG 480.
EGYPT - 1953 2m vermilion 'air' adhesive U/M with DOUBLE BARS variety. SG 480.
1953 2m vermilion 'air' adhesive in unmouinted mint condition showing the variety OBLITORATOR BARS DOUBLED. SG 455.
EGYPT (Br.Forces Used In) - 1937 cover with 1p 'Letter Seal' tied in combination with 10m.
BR.FORCES IN EGYPT - 1937 Coronation illustrated envelope addressed to UK bearing 1p carmine letter stamp (SG A9) tied with 10m Army Post adhesive (SG A13) by M.P.O./CAIRO cds dated 12.MA.37. An unusual combination use.
EGYPT (Br.Forces Used In) - 1935 cover to UK bearing 1p 'Silver Jubilee' seal.
BRITISH FORCES USED IN - 1935 (MA.10) cover to UK (small stain in bottom left hand corner) h/s'd on front by red crowned EGYPT/POSTAGE PAID/23 strike & with black M.P.O./ /CAIRO cds. The reverse bears an example of the scarce 1935 'Silver Jubilee' 1p ultramarine adhesive (SG A10) cancelled by somewhat smudgy 'retta' strike. Scarce on cover.
EGYPT (Br.Forces Used In) - 1935 cover to UK with 1p letter stamp used from ABU QIR.
BRITISH FORCES USED IN - 1935 (JL.10.) cover addressed to UK and then redirected bearing the 1p green 'Letter Stamp' (SG A8) tied to reverse flap by light 'retta' h/s with ABU QIR cds on front and red crowned EGYPT/POSTAGE PREPAID/13 h/s. ALEXANDRIA transit b/s.
EGYPT - 1913 10m blue PSE used from CAIRO. H&G 14a.
1913 10m blue on white postal stationery envelope addressed to UK & cancelled by CAIRO roller strike dated 11.NO.25. H&G 14a.
EGYPT - 1889 1p ultramarine PSE used from ALEXANDRIE. H&G 2.
1889 1p Ultramarine on bluish grey postal stationery envelope addressed to Italy & cancelled ALEXANDER/D cds dated 17.IV.95. H&G2.
EGYPT - 1942 TELEGRAPHS form unused.
1942 unused black on cream EGYPTIAN STATE/TELEGRAPHS form.
EGYPT - 1914 1m to 10m IMPERFORATE PLATE PROOF pairs.
1914 1m-10m (SG 73-77) Pictorials in very fine IMPERFORATE PLATE PROOF PAIRS without watermark.
EGYPT - 1923 5m brown IMPERFORATE PLATE PROOF pair.
1923 5m IMPERFORATE PLATE PROOF 'King Fuad' horizontal pair (SG type 44) on gummed paper.
EGYPT - 1923 20m green IMPERFORATE PLATE PROOF block of four.
1923 IMPERFORATE PLATE PROOF of the 20m (SG type 45) printed in the issued colour of deep green in a fine block of four on thick cream card. Fine & scarce.
EGYPT (Br.Forces Used In) - 1932 1p IMPERFORATE PLATE PROOF of SG type A1 seal in block of 4.
BRITISH FORCES IN EGYPT - 1932 1p deep blue on red on cream 'Postal Seal' adhesive (SG type A1) in a lovely IMPERFORATE PLATE PROOF right marginal block of four on gummed paper.


Jen McCabe has a terrific thought-provoking rebuttal to the NYT article at 'Jen's Posterous' – "Paternalism and "Patient Beware" Messages Hit DTC Genomic Testing." McCabe does a great job of deconstructing the arguments and countering them with her own. I'll admit that I'm terribly biased here, but I think that McCabe raises some excellent points.
I wouldn't be surprised to see more response to this article, including perhaps at Genetic Future or Genomics Law Report.
The article discusses Dr. Hammer's work in the field, including Native American studies, Cohanim relatedness, and co-founding the DNA Shoah Project, for example.
"It's not every day that an expert queries whether your DNA is human, so when I received this comment by email earlier this month I was somewhat bemused.
"But the most important piece of advice for personal genomics customers is to engage with your data. Aldhous only detected these anomalies because he was exploring his own genetic data in multiple ways, cross-checking it against both other data and his own (informed) expectations, and was persistent enough to follow up on the strange results he found.
I encourage anyone who is interested in DTC genetic testing or just genetic genealogy to read through some of these articles to get a feeling for some of the issues that are currently being discussed regarding this field.
Previous Article A New Meme: How Many of Your Ancestors Are In The SSDI?
Next Article From The MormonTimes – Does DNA Disprove Lehi Story?
Thank you for sharing such important information. I'm on a mission to raise awareness of genetic testing. My name is Stephanie Robin and I am fighting Stage IV Metastatic Breast Cancer and have been sharing my story through my organization, THINK PINK. Each day I am amazed at the number of people I meet who have never heard of the Breast Cancer Gene (BRCA). I am on a mission to spread the word and help as many men and women as possible. Had I known about the BRCA gene, the past five years of my life may not have consisted of many grueling chemotherapy treatments and painful surgeries, let alone the daily fear of my children losing their mommy long before I had a chance to raise them. My THINK PINK team and I have a lofty goal to collect ONE MILLION clicks by Dec. 31, 2009. I invite you and your readers to help me in my mission – a simple click is all it takes!!! Please visit http://www.thinkpinkrocks.com and click to be counted and acknowledge that you now have the information that could save your life. Please share this link with your friends and family. It's too important not to. Thank you XOXO.


text:
namespace hdt {

PredicateIndex::PredicateIndex(BitmapTriples *triples) : triples(triples) {

}

PredicateIndexWavelet::PredicateIndexWavelet(BitmapTriples *triples) : PredicateIndex(triples) {

}

size_t PredicateIndexArray::calculatePos(size_t predicate) {
	if(predicate<=1) {
		return 0;
	}
	return bitmap->select1(predicate-1)+1;
}

size_t PredicateIndexArray::getAppearance(size_t predicate, size_t appearance) {
	// Warning: Not concurrency friendly
	//if(currpred!=predicate) {
	currpred = predicate;
	currpos=calculatePos(predicate);
	//}

	size_t val = array->get(currpos+appearance-1);
	//cout << "Appearance at pos: " << currpos << " => "<< val<< endl;
	return val;
}

size_t PredicateIndexArray::getNumPredicates() {
    //return predCount->getNumberOfElements();
    return bitmapTriples->predicateCount->getNumberOfElements();
}

size_t PredicateIndexArray::load(unsigned char *ptr, unsigned char *ptrMax, ProgressListener *listener) {
    size_t count = 0;
    bitmap = new BitSequence375();
    count += bitmap->load(&ptr[count], ptrMax, listener);

    array = new LogSequence2();
    count += array->load(&ptr[count], ptrMax, listener);

#if 0
    cout << "Predicate index:                                                    " << endl;
//    for(size_t i=0;i<array->getNumberOfElements();i++) {
//    	cout << array->get(i) << " " << bitmap->access(i)<< endl;
//    }
    for(size_t i=1;i<=getNumPredicates();i++) {
    	cout << "Predicate "<<i<< " first pos: " << calculatePos(i) << " occurs "<< getNumAppearances(i) << " times. "<<endl;

    	for(size_t j=1; j<=getNumAppearances(i);j++) {
    		size_t pos = getAppearance(i, j);
    		cout << "\t Appearance "<< j<< " at " << pos << " => " << bitmapTriples->arrayY->get(pos) << endl;
    	}
    }
#endif

    return count;
}

void PredicateIndexArray::generate(ProgressListener *listener) {
    // Count predicates

    StopWatch st;
    IntermediateListener iListener(listener);
    iListener.setRange(0,20);
    LogSequence2 *predCount = new LogSequence2(bits(triples->arrayY->getNumberOfElements()));

    size_t maxCount = 0;
    for(size_t i=0;i<triples->arrayY->getNumberOfElements(); i++) {
        // Read value
        size_t val = triples->arrayY->get(i);

        // Grow if necessary
        if(predCount->getNumberOfElements()<val) {
            predCount->resize(val);
        }

        // Increment
        size_t count = predCount->get(val-1)+1;
        maxCount = count>maxCount ? count : maxCount;
        predCount->set(val-1, count);

        NOTIFYCOND3(&iListener, "Counting appearances of predicates", i, triples->arrayY->getNumberOfElements(), 20000);
    }
    predCount->reduceBits();

#if 0
    for(size_t i=0;i<predCount->getNumberOfElements();i++) {
        cout << "Predicate " << i << " appears " << predCount->get(i) << " times." << endl;
    }
#endif

    // Convert predicate count to bitmap
    bitmap = new BitSequence375(triples->arrayY->getNumberOfElements());
    size_t tempCountPred=0;
    iListener.setRange(20,25);
    for(size_t i=0;i<predCount->getNumberOfElements();i++) {
        tempCountPred += predCount->get(i);
        bitmap->set(tempCountPred-1, true);
        NOTIFYCOND3(&iListener, "Creating Predicate bitmap", i, predCount->getNumberOfElements(), 100000);
    }
    if(triples->arrayY->getNumberOfElements())
        bitmap->set(triples->arrayY->getNumberOfElements()-1, true);
    cerr << "Predicate Bitmap in " << st << endl;
    st.reset();

    delete predCount;

    // Create predicate index
    LogSequence2 *array = new LogSequence2(bits(triples->arrayY->getNumberOfElements()), triples->arrayY->getNumberOfElements());
    array->resize(triples->arrayY->getNumberOfElements());

    LogSequence2 *insertArray = new LogSequence2(bits(triples->arrayY->getNumberOfElements()), bitmap->countOnes());
    insertArray->resize(bitmap->countOnes());

    iListener.setRange(25,100);
    for(size_t i=0;i<triples->arrayY->getNumberOfElements(); i++) {
            size_t predicateValue = triples->arrayY->get(i);

            size_t insertBase = predicateValue==1 ? 0 : bitmap->select1(predicateValue-1)+1;
            size_t insertOffset = insertArray->get(predicateValue-1);
            insertArray->set(predicateValue-1, insertOffset+1);

            array->set(insertBase+insertOffset, i);
            NOTIFYCOND3(&iListener, "Generating predicate references", i, triples->arrayY->getNumberOfElements(), 100000);
    }

    this->array = array;

    delete insertArray;

    cerr << "Count predicates in " << st << endl;
}

}