Maple WWW is finally released!
- Maple WWW is a technology that allows you to present research ideas, e-books, modern lectures and next generation courseware directly in the web. You do not need any additional skills to use Maple WWW. All you need is a Maple worksheet.
- Maple WWW is also integrated with MapleNet. Maple WWW with MapleNet is the final solution that brings interactive live computations to the web.
We decided to change live examples to better show usecases of the technology. So, new examples will be available as soon as possible.
For example, there are several projects that uses Maple WWW (without MapleNet) in real-life.
The license of the Maple WWW Net is the same as of Maple WWW i.e free for non-commercial use.
Maple WWW Net is a part of Maple WWW. Therefore, we are currently redesigning Maple WWW pages to make license information more clear.
Sorry for my previous short answer.
Indeed, there are not enough materials that describe Maple WWW technology.
We should also thank you for your questions, because now we can understand what we need to explain more detailed. We will add detailed explanation for questions about MapleCloud and Maple Player to our FAQ page.
Your last post also raises a question about the relation of Maple WWW Net to MapleNet.
There is some misunderstanding regarding this question.
Maple WWW Net is not a replacement of MapleNet.
MapleNet is a server technology that allows you to use Maple computation engine directly from the internet, but you need a client to communicate with the MapleNet server.
The situation is similar to an HTTP Web Server where HTML pages reside. To communicate with an HTTP Web Server you need an HTTP client which in fact is your browser.
Maple WWW Net allows you to use the power of Maple computation engine (through MapleNet server) directly from your browser without any plugins.
In fact, all you need to use Maple WWW Net is a device with an internet connection and a browser.
All you need as a Worksheet publisher is a MapleNet server. Maybe, your institute, university or organization already has one. In this case, you can easily publish your worksheets across the web as interactive scientific documents or apps. Your work will be open to all internet users and will be accessible by a simple click.
I can not clearly understand why you mentioned MapleCloud and MaplePlayer.
Maybe, more appropriate is comparison of Maple WWW Net with Mobius Project.
Probably you do not familiar with Maple WWW technology.
The problem is fixed. Please update your Maple WWW.
For the future bugs/issues, please use our Customer Support form.
Unfortunately, the image that you attached is broken and can not be shown.
To help you effectively, I need some more information such as screenshots etc.
Therefore, please write to me at support@digi-area.com email and I will help you with your problem.
- A screenshot shows how you are installing Maple WWW in your worksheet.
- The worksheet itself, if possible.
Thank you very much for your notice regarding licensing information.
We have synchronized our legal information regarding Maple WWW.
We created License page and Maple WWW License Agreement.
Thank you again for your valuable notice.
Can I use Maple WWW on my university personal page?
Yes, you can use Maple WWW on your university personal page as soon as your university is non-profit organization.
So, can I use Maple WWW right now as the FAQ states?
Yes, you can use Maple WWW right now as the FAQ page states.
The notice on the main page are placed for security/legal reasons until Maple WWW is in the demonstration mode.
In the nearest future Maple WWW will be finally released. The release version of Maple WWW will be smoothly available for you just as the update I pushed yesterday.
FAQ for Maple WWW is available.
I pushed the update (1.0.1) with the fix for the FireFox plot position problem.
This version also includes improvements for the Fullscreen mode.
- Refresh the page (use F5 or refresh button).
You need to do this only once. Your browser will cache the new version of the application and all other worksheets will be opened with the new version.
Nevetheless, thank for your notice. We will add this to our FAQ and requirements.
The other thing 'needed' is WebGL (though it will still work, slower).
Perfomance degradation is a result of our security steps for the demonstration version. See Notice at the end of the Maple WWW page.
Production version will not contain performance issues.
Maple WWW is a web application. Therefore, it provides own Save/Download action. Please use Download action in the Tools Menu.
The worksheet is saved as you expected, so you can open/run it in your Maple as usual.
The question is not about a browser brand. The main thing is a browser version.
Maple WWW supports the most newest versions of browsers. Unfortunately, the link you provided does not contain this information.
As Browser Statistics shows, older versions are not in use anymore.
Maple WWW technology is oriented on the present and the future. Therefore we do not plan to support old browsers that have less the 3% of usage today.
Nevertheless, if you are using one of the supported version and have problems, please describe your configuration more precisely.
This message is shown when Maple finds unknown tags in a worksheet (a script tag in our case).
Nevertheless, it does not affect/break the worksheet in any way. Unknown tags are just ignored.
But astonishingly it does not allow to delete output.
We develop and use special tools that allow us to work with worksheets programmatically (open, save, execute, create random MW files and the like).
Using these tools we tested a large amount of MW files prepared for Maple WWW (about 30000 files) on Maple 17 and Maple 18 and no issues are detected.
Particularly, there are no problems with output deletion.
Nevertheless, if you have this problem, please give me more information on how to reproduce this behaviour.
This worksheet is a simple Maple worksheet and therefore can be executed on demand as usual.
It does not contain auto-execute code.
IFrames are absolutely secure, if you trust to the loaded content/page.
Therefore, loading your own worksheets on your own pages is absolutely secure.
- Maple WWW is a pure web technology, so it does not need Maple to work.
- Maple WWW allows to open Maple Worksheets for an internet user even if he/she does not know about Maple at all.
Maple WWW is designed to allow every man in the world with internet connection and a browser to become familiar with Maple Worksheet and its advanced features.
Thank you very much for your comments. Now we understand that we need FAQ that will be available as soon as possible.
For the very first time, if possible, please use Google Chrome as the most advanced and easy to use browser.
When you become familiar with the technology, please feel free to use a browser of your choice on any device.
It means "more stable". My mistake :), sorry.
Christopher and Alejandro, thank you for your suggestions. I agree that combining the posts is the solution in this case. So, I merged my two previous posts.
Nevertheless, I planned to write articles about Refactoring, Scoping, Version Control system etc.
Writing these articles in one topic makes it hard to read and mixes very different themes: general overview of the tool and specific programming related topics. So, unfortunately this solution is not universal.


text:
Careers Festival – Universities
Race & Ethnicity in Engineering
Careers Festival – Schools & Colleges
Engineering Talent Awards
ETA Webinars 2020
ETA Brochure
Enhanced Marketing
EqualEngineers Academy
Engineering Winning Workforce
Diversity Policy Review & Auditing
Inclusion Strategy Development
Culture Partners
The importance of STEM diversity in a time of crisis
Blog, Diversity, Education, Profession, Services / By EqualEngineers / April 24, 2020 April 24, 2020
The term 'STEM,' which stands for Science, Technology, Engineering and Maths, has only been around for roughly two decades. These subjects are increasingly important in a globalised world, where skills are shifting and disruptive technologies like artificial intelligence, robotics, and quantum computing are becoming increasingly popular1.
That said, there are still a huge amount of unfilled STEM jobs, despite the uptake in STEM education2. The reasons for this are multifaceted, but with the need for entirely new skillsets every few years, alongside the emphasis placed on soft skills such as empathy, creativity, innovation, critical thinking, collaboration and leadership – all of which drive a millennial workforce – the alignment of people, skillsets and job availability in the age of globalisation remain disjointed.
That said, the gap will close. It's not a matter of if, just when. How quickly it happens is down to how seriously schools, organisations and society takes the need for adaptable innovation and growth.
STEM potential
One thing that is measurable is the increasing demand for STEM proficiencies. As the world evolves alongside emerging technologies, many employers will start to consider candidates having STEM skills as non-negotiable when it comes to who they hire3. If the current skills gap isn't reformed, it will hinder growth and the potential for economic or scientific leadership in any country it isn't prioritised4. As the Coronavirus has shown us, having people in charge who can look at a crisis from an objective point of view is the difference between competence and consequences.
STEM benefits the world, and without diversity, STEM can't thrive. Its growth lies in its ability to diversify quicker, starting with its accessibility to women, who are currently grossly underrepresented. The second step is how we communicate the benefits of STEM from a young age, be it through education or the media. There's a lack of awareness around both the diversity of STEM careers (how it produces capable and well-adjusted employees), and the diversity needed to ensure its prevalence. We need to act now to ensure our technology-based future and the evolving economy can prosper with a well-equipped, well adapted and proficient workforce – especially one that understands its value.
Covid-19 has shown us how STEM subjects are more essential than ever when it comes to tackling a crisis. Science is what saves us, technology and engineering are what keep our society functioning, innovating and adapting, and maths is what helps us make sense of it all: equipping us for a better-prepared future. This isn't a new realisation. For years these fields have been telling us what's going to happen if we don't innovate and prepare for the future – whether it's for the benefit of our planet or, on a smaller scale, our communities. Not only is it time for society to sit up and listen, it's time for those in STEM industries to recognise how diversity and inclusion play an important role in ensuring they're heard.
Engineering for kids. Why is STEM so important? Source article: https://www.engineeringforkids.com/about/news/2016/february/why-is-stem-education-so-important-/
Smithsonian science education center. The STEM imperative. Source article: https://ssec.si.edu/stem-imperative
Gatsby.org. Education Focus Areas. Source article: https://www.gatsby.org.uk/education/focus-areas/stem-skills-in-the-workforce
STEM.org. Skills shortage costing STEM sector £1.5bn. Source article: https://www.stem.org.uk/news-and-views/news/skills-shortage-costing-stem-sector-15bn
View equalengineers's profile on Facebook
View equalengineers's profile on Twitter
View equalengineers's profile on Instagram
View ../company/equalengineers's profile on LinkedIn
View EqualEngineers's profile on YouTube
Copyright © Equal Engineers Ltd 2021 | Registered in England and Wales Company No. 10850716

redpajama_set_name: RedPajamaCommonCrawl


PayPal Makes Acquisition of CyActive Official - Last month, we announced that we had entered into an agreement to acquire CyActive, a cybersecurity firm based in Israel that will add detective and predictive malware technology solutions to PayPal's world-class security platform.
Spend. Smart. PayPal. Prepaid. You can use the PayPal Prepaid Mastercard ® to eat, drink and shop everywhere Debit Mastercard is accepted. Order online and theres no purchase fee to get the card. 1 Subject to activation and identity verification.
Paypal Home. Shopping online shouldnt cost you peace of mind. Buy from millions of online stores without sharing your financial information.
Looking for an easier, secure way to donate to charities on Facebook? If you choose PayPal as your payment option, youll be able to skip the credit card fields and simply log into your account, choose an amount, and donate.
Learn about working at PayPal. Join LinkedIn today for free. See who you know at PayPal, leverage your professional network, and get hired.
About PayPal Credit. PayPal Credit is a reusable credit line available on purchases at thousands of stores that accept PayPal. Its also available for purchases on eBay and exclusively at thousands of other online stores.
After you complete the signup process, you can begin configuring and managing your service(s) within the PayPal Manager, your online business and service management portal.
PayPal Here is the easiest way to accept any form of payment. Wherever your business goes, your sales can go too. Available on iOS®, Android™, and Windows® devices.
Paypal est une plateforme en ligne permettant de payer un achat, d'envoyer et de recevoir de l'argent. La société Paypal a été créé en 1998 puis a été racheté par Ebay en 2002.


Rembrandt's The Return of the Prodigal Son, painted between 1661 and 1669, is a monumental painting in the history of art and stands as Rembrandt's final canvas – flamboyantly transcending the Baroque with its psychological insight. The parable of the return of the prodigal son was a popular subject during the Renaissance, engraved by Albrecht Dürer amongst others. Rembrandt painted imagined reproductions of several elements of the story, especially the return, which he captured a number of times in his life. The Return of the Prodigal Son is an interpretation of the Christian virtue of mercy, rendered with a solemn eye, and evoking a humane, domestic warmth. Rembrandt's alarmingly modern realism and spiritual insight is created through the expressive color-scale and brushwork, the powerful light and the almost ritualistic ceremony of the event. The father and son stand out, slightly off-center, in front of a seemingly endless expanse of darkness.
In the Biblical tale a young son who has wasted his inheritance suffers the hardships of a famine and returns home to his father. His return is celebrated by a feast which irks the older son who has worked constantly for his father without fortune or reward. The father reminds the older son that like the parable of the lost sheep, any return to the fold should be a cause for celebration. Rembrandt's supreme reproduction of the scene is littered with references to the poverty, both material and spiritual, of both parties. Heightening the dramatic reconciliation through the hinting of a wider context, Rembrandt creates an image of forgiveness and embodies the unquestioning love of a father, whose time-worn hands stretch out towards the clinging body of the son. For an artist at the end of his life the painting is a moving evocation of a homecoming, the darkness of the path travelled illuminated by the awaiting destination and the sheltering arms of a patriarch.
The Return of the Prodigal Son at the Hermitage Museum.
If you have any request to alter your reproduction of The Return of the Prodigal Son c. 1669, you must email us after placing your order and we'll have an artist contact you. If you have another image of The Return of the Prodigal Son c. 1669 that you would like the artist to work from, please include it as an attachment. Otherwise, we will reproduce the above image for you exactly as it is.


Copies of the last four Sundays Notice Sheets are also available to download.
The prophet Isaiah, in chapters 40 and 41, is speaking to a nation in desperate times. In two waves, first in 597 BC and then ten years later, the nobility of God's chosen people were taken into exile by their Babylonian captors.
There are very few things that all human beings have in common, but having a mother – however known or unknown, happy or difficult – is one of them.
As you walk along the steep road running down the Mount of Olives in Jerusalem towards the Garden of Gethsemane you come across a beautiful garden with a rather strange shaped chapel in the middle of it.


Waveband is your total source for two-way radio battery chargers, conditioning chargers and analyzers. Waveband 6-bank and single bank desktop chargers are available for all battery chemistries and will charge batteries within 2-4 hours depending on battery capacity.
Our 2-way radio battery conditioning chargers use specialized micro-processors and algorithms to read the chemistry of the individual Ni-Cd, Ni-Mh or Li-Ion battery and respond with precise, maximum-capacity, conditioning charge every time. This eliminates the need for expensive battery maintenance programs. Deep conditioning is performed to keep your NiCd, NiMH and Li-Ion batteries in peak condition.
Waveband rapid tri-chemsitry desktop battery charger for Kenwood NX200/TK2180. This single pocket charger includes AC power adapter, operating manual, and adapter cups for newer Kenwood Portable Radios. Charger comes with a 1 year warranty.


text:
Q: Using createElement in JavaScript, how to add  and  inside of ? I'm trying to create sentences with a box next to them, where text can be dragged and dropped in the box.
So I want to create this HTML markup using only javascript:

Data1

Data 2

That code functions and I'm able to drag and drop text into the boxes that are placed alongside the words "Data1" and "Data 2".
So far I have:

var data2 = ['one', 'two', 'three']

function dragDrop2(arr) {
  var length = arr.length;
  var list = document.createElement("div");
  for (var i = 0; i < length; i++) {
    var paragraph = document.createElement("p");
    var spanning = document.createElement("span");
    spanning.classList.add("smallBox", "droppable", "draggable");

    paragraph.appendChild(document.createTextNode(arr[i]));
    paragraph.appendChild(spanning);
    list.appendChild(paragraph);

  }
  return list;
}

document.getElementById("example").appendChild(dragDrop2(data2));

Right now, given my current javascript/html attempt, the drag/drop part isn't working in the boxes, and the I don't think the "span" tag is insie of the "p" tag, as my box is underneath each sentence.
If anyone can help me, I'd appreciate it! Also, is there something that I can do to see the markup that is being created??
For example, create an alert that will show all the html markup, beginning at the original 'div id="example"?? (.html???)

A:

var data2 = ['one', 'two', 'three']

function dragDrop2(arr) {
  var length = arr.length;
  var list = document.createElement("div");
  for (var i = 0; i < length; i++) {
    var paragraph = document.createElement("p");
    var spanning = document.createElement("span");
    spanning.classList.add("smallBox", "droppable", "draggable");

    spanning.appendChild(document.createTextNode(arr[i]));
    paragraph.appendChild(spanning);
    list.appendChild(paragraph);

  }
  return list;
}

document.getElementById("example").appendChild(dragDrop2(data2));
$( "span" ).draggable().droppable();
p {
  border: 1px solid #000;
  padding: 20px;
}

span {
  background-color: red;
}

I'm assuming you're using draggable and droppable from jquery ui.
You must execute the draggable and droppable functions after creation of elements.
Another key point is to change this:
paragraph.appendChild(document.createTextNode(arr[i]));

to this:
spanning.appendChild(document.createTextNode(arr[i]));

redpajama_set_name: RedPajamaStackExchange


In late July, AGP hosted three Area Information Meetings for its members at locations in Iowa and Nebraska. The Area Information Meetings allow AGP members the opportunity to learn more about the current business operations and strategy of the company, including preliminary projections on FY 2018 financial results. Many AGP members attended the meetings, representing cooperatives from Iowa, Nebraska, South Dakota, Minnesota, and Kansas.
Other AGP team members who provided updates on individual business groups, commodity markets, trade issues, and financial information included Cal Meyer, Chief Operating Officer, Scott Simmelink, Chief Financial Officer, Mark Sandeen, SVP Soybean Processing, Chris Schaffer, SVP Ag Products, Troy Alberts, SVP Refined Oils, and Matt Caswell, VP Member Relations.
AGP's fiscal year ends August 31. Complete financial information on fiscal 2018 will be presented to cooperative members in the 2018 Annual Report along with management reports at the upcoming Annual Meeting on January 17th and 18th in LaVista, Nebraska.


text:
Home Videos Finance
RBI Monetary Policy 2019: CNBC-TV18 Citizen's MPC votes 4-1 for rate cut
The meeting of the six-member Monetary Policy Committee (MPC) to decide on the first bi-monthly policy statement for 2019-20 will be held from April 2 to 4. The policy will be announced on April 4.
The bi-monthly policy assumes significance as it will be announced just a week before the commencement of the seven-phase general elections beginning April 11.
While the RBI cut the interest rate in its February monetary policy after a gap of 18 months, the industry has started clamouring for another rate cut as retail inflation is below the RBI's benchmark of four percent and need for boosting growth is pressing.
CNBC TV18's Citizens MPC comprising of Pronab Sen, former adviser of the Planning Commission; Sonal Varma, managing director & chief India economist at Nomura Financial Advisory and Securities; Soumya Kanti Ghosh, group chief economic Adviser, SBI; Sajjid Chinoy, chief economist India, JPMorgan and Samiran Chakraborty, chief economist at Citigroup, discuss the upcoming meeting.
A majority of the economists in CNBC-TV18's Citizen's MPC voted 4-1 in favour of a rate cut ahead of the RBI's rate decision next week.
On Rate Hike:
The CNBC-TV18 Citizens Monetary Policy Committee voted 4:1 in the value of a rate cut. Economists Samiran, Soumyo, Sonal and Sajjid voted for a cut, while chairman of the committee Sen voted for the rate to be on hold.
All the members said there will be a 50 bps cut in 2019, including the one in April.
One basis point is a hundredth of a percentage point.
On RBI's Stance:
On the stance, two members - Sen and Sajjid - wanted it to remain neutral, Soumyo Ghosh of SBI wanted the stance to shift to accommodative and the remaining two - Sonal and Samiran- also thought it is possible the stance will change to accommodative.
Ghosh said, "In terms of the stance, I think given the current growth condition, given the fact that growth is going to remain weak for the next couple of quarters, I think you need to cut rates given that you have to do the heavy lifting to the monetary policy and possibly one rate cut will not suffice, possibly a larger rate cut will suffice. However, the issue is whether you need to cut more than 25 at one go or you want to spread it over. Anyway, even if you want to cut it by larger than 25 bps, you need to change your stance or even if you want to cut by 25 bps, you have to give a clear signal to the market that we are here for a dovish policy. So in that case also, I think there is a strong case for changing the stance from neutral to accommodative."
"The MPC made clear that the focus of monetary policy will be consistent with the legislated mandate. That is, If if inflation is below four percent, then the MPC has some space to ease monetary policy. We are seeing that there is a huge divergence between food inflation and core inflation and that divergence continues to sustain in the latest print core inflation actually accelerated to almost six percent, but food inflation remains very benign. Over the next six months, we think inflation at a headline level remains very benign. Our average inflation forecast for the next six months is just about three percent. So to the extent that is the outlook and the MPC is focused on headline target. There is perhaps space for one more cut and so we expect the MPC will cut rates in April," Chinoy said.
"The MPC needs to think about that whether we can operate with as long as the 12-month horizon on inflation forecast or we should be looking at some kind of putting more weightage to near-term forecast and less weight towards the longer term forecast. So that sort of thing could drive a bit more dovishness into the MPC thought process," Chakraborty said.


Inspired in a modern, simple and sofisticated look this summer shoe will provide comfort and support to your foot while molding with wear. Handmade by skilled artisans in the north of Brazil, with minimal stitches, metal studs for support , naturally treated leather and recycled tires soles.
Caboclo is a brand concerned about people and sustainability, focused on respect for traditions and the environment. With a focus on comfort, durability and with a casual design, we are proud to create unique and timeless handmade shoes.


Radio amateurs use a variety of transmission modes, including Morse code, radioteletype, data, and voice. Specific frequency allocations vary from country to country and between ITU regions as specified in the current ITU HF frequency allocations for amateur radio. The list of frequency ranges is called a band allocation, which may be set by international agreements, and national regulations. The modes and types of allocations within each frequency band is called a bandplan; it may be determined by regulation, but most typically is set by agreements between amateur radio operators.
National authorities regulate amateur usage of radio bands. Some bands may not be available or may have restrictions on usage in certain countries or regions. International agreements assign amateur radio bands which differ by region.


text:
Q: does result of pivot need to be a non shared temp table? I use PIVOT to output a table with an open ended number of columns. In the future, users might need foot_width, the code shouldn't need to be rewritten.
DECLARE @COMMA_SEPARATED_KEYS varchar(MAX);
DROP TABLE IF EXISTS KV;
CREATE TABLE KV (id_person int, mykey varchar(30), myvalue int);
INSERT INTO KV VALUES
(1, 'age', 16),
(1, 'weight', 63),
(1, 'height', 175),
(2, 'age', 26),
(2, 'weight', 83),
(2, 'height', 185);
WITH cte(mykey) AS (
    SELECT DISTINCT mykey FROM KV
)
SELECT @COMMA_SEPARATED_KEYS=STRING_AGG(mykey,',') FROM cte;
SELECT @COMMA_SEPARATED_KEYS AS keys;

DECLARE @ExecuteExpression varchar(MAX);

DROP TABLE IF EXISTS Pivoted;

SET @ExecuteExpression = N'
SELECT *
INTO Pivoted
FROM
(
    SELECT
        mykey,
        myvalue,
        id_person
    FROM KV
) AS t
PIVOT(
    MAX(t.myvalue)
    FOR mykey IN (COMMA_SEPARATED_KEYS)
) AS pivot_table;
';

SET @ExecuteExpression = REPLACE(@ExecuteExpression, 'COMMA_SEPARATED_KEYS', @COMMA_SEPARATED_KEYS);

EXEC(@ExecuteExpression);

SELECT * FROM Pivoted;

This code fails on Msg 2018 Level 16 if Pivoted is turned into a non shared temp table. My spec is that the stored procedure this code will be in could be run by two users in parallel without stepping on each other's toes. What is the easiest solution in 2019 ? If I start the procedure by emptying Pivot ? Could a LOCK be a good solution ?

A: If you really need to put the result into a temp table for further processing, you need to create it ahead of time. The following is the pseudo-code:
CREATE TABLE #pivot_results (
  id int identity not null PRIMARY KEY
);
DECLARE @SQL nvarchar(max)=N'';
WITH cte(column_name) AS (
    SELECT DISTINCT mykey + ' nvarchar(255) collate database_default null' FROM KV
)
SELECT @SQL='ALTER TABLE #pivot_results ADD ' + STRING_AGG(column_name, ',') FROM cte;
EXECUTE (@SQL);


Social workers have a unique opportunity to inform young men and their support networks about the important steps they must take to ensure they can access every potential opportunity. Yet the Selective Service has met with scores of professionals who were not aware of the consequences for young men if they did not register. So NASW national staff worked with Selective Service, in consultation with NASW members in different fields of social work, to develop this toolkit, which contains tools for both client/external outreach and peer-to-peer outreach.
Employment with the federal government, many state and municipal government agencies, and even private-sector employers.
In addition, failure to register with the Selective Service can also significantly complicate the process for immigrant men who wish to become citizens.


I've just spent a few hours writing my first iPad app, without a Mac, and without Objective-C. The app itself is nothing special, but the process let me play with a couple new toys.
WebMatrix was recently announced, and is a great, lightweight website editor that's perfect for this sort of thing. I use Visual Studio 2010 for most development I do, but WebMatrix offers a simple, get-out-of-the-way-and-let-me-play UI that's perfect for hacking away at new code. At some point, I probably will migrate to Visual Studio – WebMatrix offers a handy 'Visual Studio' button for just this occasion. It ships with IIS Express, a lightweight version of IIS that allows you to quickly serve up folders with many of the bells and whistles of IIS.
Download Sencha Touch and copied all of the files into a WebMatrix site.
Modify IISExpress's applicationHost.config to enable off-box requests.
Turn off your firewall or open up the port you set above.
Run the app from the homepage offline!
That's it! I have a few ideas for how I want to put this to use, so stay tuned for some real-world examples.


text:
import type { IAbsorberRandomSize } from "../../../Interfaces/Options/Absorbers/IAbsorberRandomSize";
import type { RecursivePartial } from "../../../Types/RecursivePartial";
export declare class AbsorberRandomSize implements IAbsorberRandomSize {
    enable: boolean;
    minimumValue: number;
    constructor();
    load(data?: RecursivePartial<IAbsorberRandomSize>): void;
}

redpajama_set_name: RedPajamaGithub


Synopsis (From Amazon.com): A moving story of a young girl's struggle with love, loss, family, and magic from the beyond, from critically acclaimed author Kimberley Griffiths Little.
Everybody thinks Tara Doucet has the perfect life. But Tara's life is anything but perfect: Her dear Grammy Claire has just passed away, her mom is depressed and distant, and she and her sister, Riley, can't agree on anything. But when mysterious and dazzling butterflies begin to follow her around after Grammy Claire's funeral, Tara knows in her heart that her grandmother has left her one final mystery to solve. Tara finds a stack of keys and detailed letters from Grammy Claire. Note by note, Tara learns unexpected truths about her grandmother's life. As the letters grow more ominous and the clues harder to decipher, Tara realizes that the secrets she must uncover could lead to grave danger. And when Tara and Riley are swept away to the beautiful islands of Chuuk to hear their grandmother's will, Tara discovers the most shocking truth of all, one that will change her life forever. Kimberley Griffiths Little weaves a magical, breathtaking mystery full of loss and love, family and faith.
My Review: I really enjoyed When the Butterflies Came. I loved the relationship between Tara and her Grammy Claire. Even though Grammy Claire has just passed away, she is as much of the story as Tara is. Tara has to solve her Grammy's riddles/clues to save the research Grammy Claire has been working on for years. The riddles/clues were fantastic. The way they wove the story together right to the very end was so clever.
Even though When the Butterflies Came is recommended for 8 years and up - it makes a great read at any age. The underlying messages throughout the book on people's character, family, friends, and doing the right thing are wonderful. I really enjoyed the story from the beginning to the very last page. In fact, I didn't want it to end.
Meet the Author: Kimberley Griffiths Little is the author of The Healing Spell and Circle of Secrets, as well as dozens of short stories that have appeared in numerous publications, and the novels Breakaway, Enchanted Runner, and The Last Snake Runner. She is the winner of the Southwest Book Award. Kimberley lives near the banks of the Rio Grande in New Mexico in a solar adobe house with her husband and their three sons.


The following provides a starting point for feeding your puppy. Age, breed, weight, activity level, and other factors will affect the amount of food required. Feed your puppy three times daily until 6 months of age; then feed twice daily. Based on your dog's individual needs, adjust your pet's daily intake up or down to help maintain a healthy body condition. Two to four times more food may be required for gestating and lactating females. Always provide your dog with plenty of fresh water in a separate bowl, and to ensure your dog's good health, see your veterinarian regularly.
If you are interested, please Contact Us with your dog's breed, age, weight, activity level, spayed/neutered status, and any other special needs or concerns that you may have, and we would be happy to help you find a good starting point based on your pet's nutritional needs.


text:
Q: What techniques can be used to detect so called "black holes" (a spider trap) when creating a web crawler? When creating a web crawler, you have to design somekind of system that gathers links and add them to a queue. Some, if not most, of these links will be dynamic, which appear to be different, but do not add any value as they are specifically created to fool crawlers.
An example:
We tell our crawler to crawl the domain evil.com by entering an initial lookup URL.
Lets assume we let it crawl the front page initially, evil.com/index
The returned HTML will contain several "unique" links:

*

*evil.com/somePageOne

*evil.com/somePageTwo

*evil.com/somePageThree

The crawler will add these to the buffer of uncrawled URLs.
When somePageOne is being crawled, the crawler receives more URLs:

*

*evil.com/someSubPageOne

*evil.com/someSubPageTwo

These appear to be unique, and so they are. They are unique in the sense that the returned content is different from previous pages and that the URL is new to the crawler, however it appears that this is only because the developer has made a "loop trap" or "black hole".
The crawler will add this new sub page, and the sub page will have another sub page, which will also be added. This process can go on infinitely. The content of each page is unique, but totally useless (it is randomly generated text, or text pulled from a random source). Our crawler will keep finding new pages, which we actually are not interested in.
These loop traps are very difficult to find, and if your crawler does not have anything to prevent them in place, it will get stuck on a certain domain for infinity.
My question is, what techniques can be used to detect so called black holes?
One of the most common answers I have heard is the introduction of a limit on the amount of pages to be crawled. However, I cannot see how this can be a reliable technique when you do not know what kind of site is to be crawled. A legit site, like Wikipedia, can have hundreds of thousands of pages. Such limit could return a false positive for these kind of sites.

A: Any solution is going to be heuristic at best, so you'll have to settle for less-than-perfect results. I would have thought that the page limit approach would work quite well if implemented properly.
You could put a limit on the number of pages to be crawled without leaving the domain; this doesn't prevent all of the pages from being indexed, since if the spider bails before a particular page is reached, there'll probably be more paths to that page that enter the domain "closer" to it, allowing it to be reached before the cut off.
Remember also that without such a limit, a spider could get stuck on a legit site like Wikipedia for a very long time, simply due to the overwhelming amount of content.

A: I don't think there is a solution to detect black-holes as there are many reasons a site could create an infinite number of pages for good reason and it would be difficult to say anything about the content of such a site. For this reason I propose a change of approach which prevents spiders from digging indefinitely:
I think it would be better to develop a strategy where by each page has a page ranking value assigned. The links too have a value assigned, all identical links then produce a final target ranking (potential return on searching the page).
A spider should only be allowed to crawl for a period of time as defined by the potential return.  Now spiders are dropped, mine data, and are lifted and repositioned where the demand is.
In this way a server will not have it's spiders trapped searching pages indefinitely as they are continuously reassigned to where the demand is highest.

A: If you were building a large scale web crawler, it would make sense to take the following approach:

*

*First crawl links explicitly mentioned in the sitemap.xml or the site map files mentioned by the site map index file. Since a sitemap.xml is expected to have no more that 50,000 urls, and a site map index is expected to have no more than 1000 index files, it would be reasonable to expect that if you crawled these links first, you would have a reasonable index of the sites content. Since it would makes sense to put the more important urls in the site map. This could be up to 50 million urls! Thats a lot, I'm not sure there would be many sites that have more than 50 million urls. Wikipedia claims there are 32,663,401 pages according to their active counters. So if you follow this scheme, you can at least crawl wikipedia which is an achievement (since it would take a while). Note that this tactic will help you crawl only sites that have actually created a site map, but it is more likely that a useful website would have a site map!, as opposed to one that doesn't.

*The next step could be to make a list of the urls that are not mentioned in the site map (we can prioritise which ones to crawl later)

*Crawl other web domains following the first two steps.

*Once you run out of web domains to crawl (If you do run out of domains to crawl, that is quite an achievement!), then you can start page ranking all the urls, including the ones you haven't crawled yet (from step 2!)

*It is more likely the urls from step 2 are valid urls, if other external domains with a high page rank have linked to them. Therefore you can prioritise which urls to crawl. If no external domains have linked to urls from step 2, then it is more likely that the content is either not so useful to people who have visited the page, or no one has visited the page, or it is a spider trap. Now, it possible that a url which does not have any external domains linking to it, has no links to it because it has never been indexed before, and no one knows it exists. It may be worth it to index this page, but as you go "deeper down", the pages it links to should be treated with less importance.

*Another useful trick, (but much more complicated), is to check whether the text / urls on a page are readable. Some sites try to hide text / urls by making it the same color as the background so they aren't immediately visible to humans, but can be used to trick machines. Likewise some content can be hidden using CSS. These should be detected by your crawler / indexed to lower the score of a particular page, and give it less importance when determining which url to crawl next.

*Finally, once crawling is complete, you need to begin the next cycle of crawling and repeat the above process! This time if you find external domains linking to the urls from step 2, its page rank goes up! And you can now drill deeper! This way you should have a reasonably good index for more common content, and avoid spider traps.
Another step I haven't mentioned is, "Processing / Indexing of crawled content". This is a really big step - but since your question was more about crawling rather than how to build a full fledged information retrieval system I didn't mention it earlier.
Most legitimate content, tends to make sense from a Natural Language Processing perspective. For example, a human being who reads a page can immediately tell if the page is just a collection of random words strung together or whether it is real content which is trying to express an idea. By processing data from "known" legitimate sites, one can build up a set of rules and heuristics about how a particular language is supposed to look. This can be used to tell your web crawler if a particular link contains gibberish or real content. This can be used to rate a url and determine how important it is to follow.
As mentioned in other answers, you can also hash the content of each url, to determine "uniqueness". Content which is identical doesn't need to be parsed for urls again - so this lets you avoid traps that reuse the same content. Natural language processing should help you avoid random gibberish.
A third problem is pages that are dynamically created by using legitimate content from other websites. This is a more complicated problem, but again, you can give less importance to these by using page rank. If you can actually build a scalable system which can crawl all the urls mentioned in the site maps of every domain on the internet, that it quite an achievement, and also means you are very rich and powerful since you probably have thousands of computers at your disposal. Being such a rich guy you should probably focus on more important things and have your engineers figure this stuff out. XD

A: Content is the difference between a black hole and a legitimate site, like Wikipedia. While WP is indeed a huge website dimensionally, each URL contains kilobytes of legitimate data. A spider trap site might be equally as 'big', but the pages won't contain anything much: it's utterly perverse to waste server resources and bandwidth generating sizeable quantities of gibberish data simply to tie up a web crawler.
Rather than putting upper limits on breadth or depth of a site's URL tree (which would trap content-rich sites like WP), perhaps track the number of pages scanned which are below some floor of 'useful size'. You can then pull the eject handle on your spider once that count exceeds some acceptable limit.

A: Well, you've asked very challenging question. There are many issues:
First, do you think someone would do something like that to prevent web spidering? A web spider could act as DoS attack if it would got stuck in such structure.
Secondly, if page is made for users, how would they react to large number of senseless links linking to random generated 'trash sites'? This links should be invisible for user, either a few of them or they would be hidden somehow - you should then check, if links have display: none, 1 px font etc.
Third, how google would behave? Well, google does not index everything it can. It adds links to queue, but not follows them immediately. He does not like to follow deeply referenced links, that are not linked from pages previously indexed. It makes him not index everything, but index what users are most likely to visit is finally visited. Otherwise such pages as you describe will be extremally often used by SEO spammers ;)
I would build priority queue. Each link to each URL adds 1 point priority (more, when from main page). Pages with priority 1 are at the end list. I would limit visited pages count, so at worst case I would visity most important pages. I would be suspitious againt pages that contains too much links with too little content. In short words, simulate google behaviour as much as it is needed.

A: Perhaps you can add a limit of the length of an URL to crawl.
Also most webservers have a limit on the length of an URL. So you shouldn't be looped infinitely.
Found a doc on the matter. Don't know whether it still is up2date though.
Check it out: http://www.boutell.com/newfaq/misc/urllength.html
Also you can limit the 'deepness' of pages.
Like domain.com/page/subpage/subsubpage/subsubsubpage/subsubsubsubpage/subsubsubsubsubpage/etc/etc/etc/etc/etc

A: What about if you MD5(the content of the URL) ?
I know it's not the most delicate solution, but you can detect some duplicated content. You'll have to create a unique md5 field (in a DB or similar) and check each url content against this field.
If the page has something different in each request (ie: timestamp), this solution won't work.

A: The content on some poorly designed sites can sometimes be highly redundant but I don't see any legit reason to be avoiding black-hole traps.
The purpose of a blackhole is to detect robots that fail to/refuse to respect the /robots.txt file (if one exists) or rel="nofollow" attributes on links. Such robots are usually used to scrape email addresses and other information for the express purpose of spamming people or selling that data to spammers.
Links to blackholes are usually hidden so that normal users don't accidentally get trapped. They are also not a problem to Google,Bing, etc because they do what the site owner has asked them to do (i.e respect the owners robots.txt). The only people who get trapped are those that don't give a ^&@ and poorly designed crawlers.


Joseph Swift was the fifth son of John and Ellen Swift and according to the 1911 Census lived at 27 Ellaby Road and worked as a painter for a Colliery proprietor.
Joseph enlisted at the Army Recruiting Office, Town Hall, St. Helens on 30th November 1915 as Private 27287 in 10th South Lancashire Regiment. He was 34 years old. His attestment papers imply that he joined from the Army Reserve Class B and his medical papers state he was fit for general service but with poor vision and a hernia.
In September 1916 he disembarked his ship and went to Rouen and on the 13th proceeded to join the Prince of Wales Volunteers, 2nd Battalion South Lancashire Regiment. He was wounded in action on 21st October, admitted to hospital on the 23rd but died of the wounds on 26th October 1916. He is remembered on the family grave in St Ann's churchyard.
In February 1917 his father John received his personal effects, consisting of: - Note book, razor in base, National Registration Card, letters, belt, card case and a bag.
In March 1922, his father acknowledged receiving Joseph's war medals, the British War Medal and the Victory Medal. He also received a Memorial Plaque and Scroll.


text:
package com.hazelcast.projection.impl;

import com.hazelcast.config.Config;
import com.hazelcast.config.InMemoryFormat;
import com.hazelcast.config.MapConfig;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.map.IMap;
import com.hazelcast.nio.ObjectDataInput;
import com.hazelcast.nio.ObjectDataOutput;
import com.hazelcast.nio.serialization.DataSerializable;
import com.hazelcast.projection.Projection;
import com.hazelcast.projection.Projections;
import com.hazelcast.query.QueryException;
import com.hazelcast.test.HazelcastParallelClassRunner;
import com.hazelcast.test.HazelcastTestSupport;
import com.hazelcast.test.TestHazelcastInstanceFactory;
import com.hazelcast.test.annotation.ParallelJVMTest;
import com.hazelcast.test.annotation.QuickTest;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;

import java.io.IOException;
import java.util.Collection;
import java.util.Map;
import java.util.Optional;

import static com.hazelcast.spi.properties.ClusterProperty.PARTITION_COUNT;
import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;

@RunWith(HazelcastParallelClassRunner.class)
@Category({QuickTest.class, ParallelJVMTest.class})
public class MultiAttributeProjectionTest extends HazelcastTestSupport {

    @Rule
    public ExpectedException expected = ExpectedException.none();

    @Test(expected = IllegalArgumentException.class)
    public void multiAttribute_attributeNull() {
        Projections.multiAttribute((String) null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void multiAttribute_attributeEmpty() {
        Projections.multiAttribute("");
    }

    @Test(expected = IllegalArgumentException.class)
    public void multiAttribute_attributeNullWithOther() {
        Projections.multiAttribute("age", null, "height");
    }

    @Test(expected = IllegalArgumentException.class)
    public void multiAttribute_attributeEmptyWithOther() {
        Projections.multiAttribute("age", "", "height");
    }

    @Test
    public void multiAttribute() {
        IMap<String, Person> map = getMapWithNodeCount();
        populateMapWithPersons(map);

        Collection<Object[]> result = map.project(Projections.multiAttribute("age", "height"));
        assertThat(result, containsInAnyOrder(new Object[]{1.0d, 190}, new Object[]{4.0d, 123}));
    }

    @Test
    public void multiAttribute_emptyMap() {
        IMap<String, Person> map = getMapWithNodeCount();

        Collection<Object[]> result = map.project(Projections.multiAttribute("age", "height"));

        assertEquals(0, result.size());
    }

    @Test
    public void multiAttribute_key() {
        IMap<String, Person> map = getMapWithNodeCount();
        populateMapWithPersons(map);

        Collection<Object[]> result = map.project(Projections.multiAttribute("__key"));

        assertThat(result, containsInAnyOrder(new Object[]{"key1"}, new Object[]{"key2"}));
    }

    @Test
    public void multiAttribute_this() {
        IMap<String, Integer> map = getMapWithNodeCount();
        map.put("key1", 1);
        map.put("key2", 2);

        Collection<Object[]> result = map.project(Projections.multiAttribute("this"));

        assertThat(result, containsInAnyOrder(new Object[]{1}, new Object[]{2}));
    }

    @Test
    public void multiAttribute_null() {
        IMap<String, Person> map = getMapWithNodeCount();
        map.put("key1", new Person(1.0d, null));
        map.put("007", new Person(null, 144));

        Collection<Object[]> result = map.project(Projections.multiAttribute("age", "height"));

        assertThat(result, containsInAnyOrder(new Object[]{1.0d, null}, new Object[]{null, 144}));
    }

    @Test
    public void multiAttribute_optional() {
        IMap<String, Person> map = getMapWithNodeCount();
        map.put("key1", new Person(1.0d, null));
        map.put("007", new Person(null, 144));

        Collection<Object[]> result = map.project(Projections.multiAttribute("optionalAge", "optionalHeight"));

        assertThat(result, containsInAnyOrder(new Object[]{1.0d, null}, new Object[]{null, 144}));
    }

    @Test
    public void multiAttribute_nonExistingProperty() {
        IMap<String, Person> map = getMapWithNodeCount();
        populateMapWithPersons(map);

        Projection<Map.Entry<String, Person>, Object[]> projection = Projections.multiAttribute("age", "height123");

        expected.expect(QueryException.class);
        map.project(projection);
    }

    private <K, V> IMap<K, V> getMapWithNodeCount() {
        TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(1);

        MapConfig mapConfig = new MapConfig()
                .setName("aggr")
                .setInMemoryFormat(InMemoryFormat.OBJECT);

        Config config = new Config()
                .setProperty(PARTITION_COUNT.getName(), "3")
                .addMapConfig(mapConfig);

        HazelcastInstance instance = factory.newInstances(config)[0];
        return instance.getMap("aggr");
    }

    private void populateMapWithPersons(IMap<String, Person> map) {
        map.put("key1", new Person(1.0d, 190));
        map.put("key2", new Person(4.0d, 123));
    }

    public static class Person implements DataSerializable {

        public Double age;
        public Integer height;

        public Person() {
        }

        public Person(Double age, Integer height) {
            this.age = age;
            this.height = height;
        }

        @Override
        public void writeData(ObjectDataOutput out) throws IOException {
            out.writeObject(age);
            out.writeObject(height);
        }

        @Override
        public void readData(ObjectDataInput in) throws IOException {
            age = in.readObject();
            height = in.readObject();
        }

        @SuppressWarnings("unused")
        public Optional<Double> optionalAge() {
            return Optional.ofNullable(age);
        }

        @SuppressWarnings("unused")
        public Optional<Integer> optionalHeight() {
            return Optional.ofNullable(height);
        }

    }

}


text:
Q: Measuring total space function allocates on heap and stack during it's entire lifetime I have a recursive function written in C++ that dynamically allocates 2D arrays using new.
How could I measure the total amount space function allocates on heap and stack during it's entire lifetime ?
Here is an example(it is not my code) of how to measure Stack.
unsigned int maxStackLocation ;
unsigned int minStackLocation ;
main ()
{
    //get the address of a local variable before calling Quicksort
    //the stack grows down, so this is the max stack location
    int localVariable;
    void *currPtrLocation = (void*)(&localVariable);
    maxStackLocation = *(unsigned int *)(&currPtrLocation);
    //we get the value for the minimum stack location in quicksort itself
    //call quicksort
    Quick (A, num);
    space = maxStackLocation - minStackLocation;
}
//some redundant function whose stack usage will be measured
void Quick (unsigned int A[], int num)
{
    if (num <= 1)
    {
        //check the stack usage
        //figure out where we are on the stack by looking at the byte
        // address of the local variable
        //we do this by making a pointer to a local variable, and then
        //casting it to a integer
        void *currPtrLocation = (void*)(&num);
        unsigned int currStackLocation = *(unsigned int*)(&currPtrLocation);
        if (currStackLocation < minStackLocation)
            minStackLocation = currStackLocation;
        return;
    }
}

Edit
Borgleader points out that my original question "Measuring max space function allocates on heap and stack during it's entire lifetime" is incorrect. I have changed "max" to "total".

A: Valgrind actually can do a quite precise measurement for you. All that you need is to write as simplest as possible example which calls your function.
for example a program which just prints its arguments (passed to the main() function) using for-loop and std::cout produce the following output:
zaufi@gentop /work/tests $ valgrind --tool=drd --show-stack-usage=yes ./stack-usage-test-1
==26999== drd, a thread error detector
==26999== Copyright (C) 2006-2012, and GNU GPL'd, by Bart Van Assche.
==26999== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==26999== Command: ./stack-usage-test-1
==26999==
./stack-usage-test-1
==26999== thread 1 finished and used 11944 bytes out of 8388608 on its stack. Margin: 8376664 bytes.
==26999==
==26999== For counts of detected and suppressed errors, rerun with: -v
==26999== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

As one may see the only thread will consume almost 12K on stack. And definitely most of this space was "wasted" before the main(). To make a better measurement it is necessary to run a target function in a separate thread. Smth like this:
#include <iostream>
#include <thread>

int main(int argc, char* argv[])
{
    auto thr = std::thread([](){std::cout << __PRETTY_FUNCTION__ << std::endl;});
    thr.join();
    return 0;
}

This code will produce the following output:
==27029== thread 2 finished and used 1840 bytes out of 8384512 on its stack. Margin: 8382672 bytes.
==27029== thread 1 finished and used 11992 bytes out of 8388608 on its stack. Margin: 8376616 bytes.

that is definitely better. So measuring a function which do nothing, you've got a minimum stack usage (in the last example it's about 1840 bytes). So if you would call your target function in a separate thread, you have to substract 1840 bytes (or even less) from a result...

almost the same you can do yourself using the following simple algorithm:

*

*allocate 8M buffer from a heap (default stack size for linux/pthreads, but you may alloc actually any other (reasonable) size)

*fill it w/ some pattern

*fork a new thread with a stack assigned to just allocated and filled area (using pthread_attr_setstack() (or friends))

*as soon as you can call your target function whithin that thread and exit

*in the main thread, after pthread_join() successed, analyze your buffer to find an area, where the pattern you assigned before has not preserved

(even) in that case you'd better to do a first measurement on a thread which is do nothing -- just to get a minimum usage size as above.

A: Your example for measuring stack usage is spot-on, and will give you a (very nearly) correct answer.  I have a suggestion for determining heap usage as well, but first....
In his book "More Effective C++" in item 27, Scott Meyers (incidentally my favorite author on C++) describes why it's not possible in the general sense and within the bounds of portable or semi-portable C++ to definitively distinguish whether an object has been allocated on the stack, heap, or is statically allocated.  But his explanation pertains to allocated objects from the perspective of the objects themselves, not allocations from the perspective of the code that requests such an allocation.  From the perspective of code that requests an allocation you can know with certainty whether an object, regardless of its type, is allocated on the heap or stack based on how you requested its allocation.  (Sidebar: Of course this depends on your system actually using a runtime stack, which some are quick to point out that the C++ standard does not guarantee, yet none of these standards snobs ever point out any real-world example of an otherwise standard-conforming C++ compiler that does not use a runtime stack.  Back to our discussion...)  For example:
int Fred;  // Fred is allocated on the stack
int *Barney = new int; // Barney is allocated on the heap

Fred will destruct when he goes out of scope; you must explicitly delete Barney when you're done with him.  This works the same for user-defined types, including STL types:
std::string Fred; // Fred is allocated on the stack (see disclaimer*)
std::string *Barney = new std::string(); // Barney is allocated on the heap

// *Disclaimer:  May not be totally true on some small embedded processors that
//               implement the runtime stack in a special small address space
//               separate from "normal" RAM.

...BUT:  Though the std::string object known as Fred is itself allocated on the stack, we know of course that its data cannot be stack-allocated, because its data is variable-length and must be able to expand indefinitely as we add characters to it.  So only the management portion of a std::string (i.e. the std::string object itself) can be stack-allocated.
Back to Scott Meyer's item 27 and it applicability to this discussion:
myClass *someFunction() {
    int someInputParameter = 42;
    myClass Fred(someInputParameter); // Fred is allocated on the stack
    myClass *Barney = new myClass(someInputParameter); // Barney is allocated on the heap
    return Barney;
}

According to Scott Meyer's item 27, neither Fred nor Barney can know for themselves whether they are stack- or heap-allocated, or for that matter, statically-allocated (i.e. "global" or "file scope" or a "static member of some other class").  But within someFunction(), we can know because we know how we requested the allocation.

Now, back to your problem:
As I said, the example you show for measuring stack usage is spot-on.  You know for certain in main() that 'localVariable' is allocated on the stack.  And you know for certain in Quick() that 'currPtrLocation' is on the stack.  And if your stack grows down, you know for certain that because main() calls Quick(), the address of 'currPtrLocation' in Quick() will be lower than the address of 'localVariable' in main(), so your arithmetic works.  It won't give a perfectly correct answer because there may be other variables in Quick() that are allocated at stack locations yet lower than 'currPtrLocation', but your measurement will be really close; certainly as close as you should care about.  Whatever the error amount is, it's a fixed error regardless of how deep your call stack goes, and if you recurse any significant number of times, the error as a percentage of the whole will be negligible.  One last thing:  If you want the solution to be portable even to systems where the stack grows UP, you can detect the direction of the difference between the address of 'localVariable' and 'currPtrLocation' and compute the difference (i.e. swap the arguments in the subtraction) accordingly.
Regarding heap usage:
Your system may have hooks you can tie into for measuring heap usage stats, but if you don't want to delve into that, you can do something along the lines of what Synxis proposed, but there are some serious problems with that answer.  First of all, Synxis's suggestion misses all of the stack overhead, including return addresses, spilled registers, etc, which are not insignificant.  Second, if you use the stack measuring technique like you show in your question, there's no need to painstakingly maintain a sum of allocations for stack-allocated objects anyway.  Third, assuming you only sum the allocations of heap-allocated objects (whose size you can get with the sizeof() operator), you can't just keep summing them.  You'd have to subtract the allocations' sizes when you delete them so your "totalSize" maintains the total size of all currently allocated objects, and you'd want to separately keep track of the high-water-mark of the totalSize.  That way you can know the largest amount of memory that your algorithm used at any one time.  Without doing that, you might be confused when your algorithm reports that it used something like 758 Gigabytes even though you only have 4G of RAM.  And finally, whether you allocate a given object itself on the stack or heap, it may make its own internal allocations on the heap.  (If it makes temporary allocations on the stack when you call a method on that object, unless you put your stack-tracking code in that method as well, your stack total won't be exactly correct as I already described, but the error will continue to be more-or-less constant, depending on whether the method executes conditionals that might alter its calling behavior.)  Anyway, regarding this "given object" that you allocate on the stack or heap; if it allocates its own internal heap memory, unless you add heap allocation tracking to the internal objects, you'll miss whatever amount of heap memory was allocated to those internal objects.  So maybe you'd be better off looking into the heap stats hooks your system might make available.
Now, assuming you want to do track heap allocations yourself...  Another option you might explore would be to write a base class from which your algorithm can derive for all of the objects it creates.  Your base class could override operator new & operator delete such that the base class itself does all of the totalSize tracking (adding for 'new' and subtracting for 'delete') using a static class variable in the base class.

A: Having the exact total size is almost impossible, as it depends on your platform, the calling conventions, the optimization mode, etc... But you can have an estimate. I don't count parameters, as there are not always handled by the called function (depending on the calling convention).
There are no C++ nor C features to do this.
I don't know any debugger that would indicate this number. I never used Valgrind and co so I can't tell you if they can show you this number (I doubt they do)
So, last option: count by yourself...
unsigned int totalSize = 0;

int partition(unsigned int A[], int num, int left, int right, int pivot)
{
    /// UpdateTotalSize
    totalSize += sizeof(unsigned int);
    /// /UpdateTotalSize
    unsigned int value = A[pivot];
    A[pivot] = A[right];
    A[right] = value;

    /// UpdateTotalSize
    totalSize += sizeof(int);
    /// /UpdateTotalSize
    int store = left;

    for(int i = left; i < right; i++)
        if(A[i] < value)
        {
            // This variable does not count in the total size:
            // allocated, then deallocated, and so on...
            unsigned int tmp = A[i];
            A[i] = A[store];
            A[store] = tmp;
            store++;
        }

    /// UpdateTotalSize
    totalSize += sizeof(int);
    /// /UpdateTotalSize
    int tmp = A[store];
    A[store] = A[right];
    A[right] = tmp;
    return store;
}

void quick(unsigned int A[], int num, int left = -1, int right = -1)
{
    if(num <= 1)
        return;

    if(left <= -1)
        left = 0;
    if(right <= -1)
        right = right = num - 1;

    if(left >= right)
        return;

    /// UpdateTotalSize
    totalSize += sizeof(int);
    /// /UpdateTotalSize
    int pivot = (left + right) / 2;

    /// UpdateTotalSize
    totalSize += sizeof(int);
    /// /UpdateTotalSize
    int pivotNew = partition(A, num, left, right, pivot);

    quick(A, num, left, pivotNew - 1);
    quick(A, num, pivotNew + 1, right);
}

Note that this is just an estimation of the total size. Also, for this example, it can be done mentally.
Last but not least: this count is unreliable when optimizations are turned on, so use it only whithout optimizations!


Northwest Farm Food Cooperative of Burlington, Wash., is voluntarily recalling frozen raw Cat Food with the code Jul12015B due to possible Salmonella contamination.
No pet or consumer illnesses from this product have been reported to date. However, because of their commitment to safety and quality, Northwest Farm Food Cooperative is conducting a voluntary recall of this product, the company stated.
The potentially affected lots of frozen raw Cat Food were sold from the company's facility at 1370 S. Anacortes Street Burlington, WA 98233.
The affected products are sold in 50-pound blocks and cases of six 10-pound chubs; packaged in a white plastic bag labeled Cat Food. The products affected by this recall have the production code Jul12015B and have no UPC code. The production code can be found on the outside of the case (box).
The recall was the result of a sampling done by the Food and Drug Administration, which revealed that the finished product contained the bacteria. The company has ceased the production and distribution of the product as FDA and the company continues their investigation as to what caused the problem.
Consumers who have purchased the above lots of frozen raw Cat Food are urged to return product to the place of purchase for a full refund or dispose of it immediately. For further information about the recall please call (360) 757-4225 Monday through Friday from 9:00 a.m. – 4:00 p.m. PST.


text:
App\Facades\Facade
===============

Class Facade.

A Facade it's an Accessor Class

* Class name: Facade
* Namespace: App\Facades
* This is an **abstract** class

Methods
-------

### get

Get the Facade Instance.

```php
\App\Facades\Facade|string App\Facades\Facade::get()
```

#### Details:
* Visibility: **public**
* This method is **static**.

<hr>


text:
Herman, Baron Vanden Berghe (Herman van den Berge) (born Overboelare, 12 June 1933, died Oud-Heverlee, 23 January 2017) was a Belgian pioneer in human genetics. He founded the Centrum voor Menselijke Erfelijkheid (Center for Human Genetics) at the medical faculty of the Catholic University of Leuven in Leuven (Louvain), Belgium. He was a cytogeneticist and applied cytogenetics to oncology. Among other findings, he discovered the deletion 5q syndrome in myelodysplasia. A native Flemish-speaker, he was also fluent in a number of other languages, including French and English, which facilitated his international role in medical genetics.

Professor Vanden Berghe was granted the title of Baron by Baudouin I, King of Belgium and from 2000 to 2003 served as chairman of the King Baudouin Foundation. He was a founding member of the International Forum for Biophilosophy established in Belgium by Royal Decree in 1988. The Forum is responsible for the Golden Eurydice Award.

See also
 Flanders Institute for Biotechnology (VIB)

Notes

References
 Janssen J et al., Clonal analysis of myelodysplastics syndromes – evidence of multipotent stem-cell origin, Blood, 73, 248–254, 1989.
 Arthur DC et al., The clinical-significance of karyotype in acute myelogenous leukemia, Cancer Genet Cytogen, 40, 203–216, 1989.
 Herman Van Den Berghe leaving Leuven University as an emeritus (in Dutch)
 Herman Van den Berghe, entry in Who Named It

1933 births
2017 deaths
Belgian geneticists
Academic staff of KU Leuven
Flemish scientists
Members of the European Academy of Sciences and Arts

redpajama_set_name: RedPajamaWikipedia


Just a brief summarization, as promised, concerning my question about using volunteers to run a CH library.  Of the 40 responses I received, 27 individuals indicated that running a CH library without a professional (or at least paid) employee would be unwise.  Several of you described the demise of libraries that took this approach and recommended against it.
Five folks, on the other hand, had experience with or know of CH libraries that were doing just fine with volunteer power.  Although few whole heartedly endorsed this approach, they did point out it can be done.
And, 8 wonderful readers just offered information, commiseration, and encouragement.
This e-mail, facsimile, or letter and any files or attachments transmitted with it contains information that is confidential and privileged. This information is intended only for the use of the individual(s) and entity(ies) to whom it is addressed. If you are the intended recipient, further disclosures are prohibited without proper authorization. If you are not the intended recipient, any disclosure, copying, printing, or use of this information is strictly prohibited and possibly a violation of federal or state law and regulations. If you have received this information in error, please notify Baylor Health Care System immediately at 1-866-402-1661 or via e-mail at [log in to unmask] Baylor Health Care System, its subsidiaries, and affiliates hereby claim all applicable privileges related to this information.


Guy D'Angelo: Consulting Chemist. The practical application of chemistry towards solving technical problems.
The practical application of chemistry towards solving technical problems.
Society for Marine Mammalogy (Charter Member).
D.H. Litter Company, Inc., New York, NY, R&D chemist protective coatings and plastics, 1964-1966; Dept. of Chemistry SUNY Stony Brook, NY, technical assistance to teaching laboratories and coordinator of supplies & safety, 1966-1970; Dept. of Physiology & Biophysics HSC SUNY Stony Brook, NY, technical assistance research & teaching laboratories, maintenance of departmental chemical instrumentation, departmental Radiation Safety Officer, 1970-1997.
Author and co-author of technical papers dealing with cation and glucose transport across erythrocyte membranes, modified tetracycline as a collagenase inhibitor and characterization of a phosphofructokinase liver enzyme. Emergency Response Planning Guideline (ERPG) for hydrazine.
Who's Who in Frontier Science & Technology 1984-85.
Applied Biosystems Model 370A DNA Sequencer and its dedicated computer, Applied Biosystems Model 380A DNA Synthesizer, Applied Biosystems Protein/Peptide Sequencer, Waters/Millipore Amino Acid Analyzer, Coy PCR Tempcycler, Beckman High & Ultra Speed Centrifuges and Liquid Scintillation Counters, New Brunswick Scientific 18 liter Fermenter and orbital platform shakers, UV-VIS Spectrophotometers, and other small equipment (e.g. pH meters, microscopes, balances, etc.).
Synthesis of modified tetracycline compounds and other specialty organic compounds including extensive background literature searches. Maintenance of safe chemical storage for hazardous materials. Advisor for the proper handling and disposal of hazardous chemicals. Advisor for application of chemistry to sustainable agricultural procedures (e.g. composting). Practical application of chemistry to current technology.


text:
permalink: /100daysofielts/
title: 100 Days Of IELTS
comments: true
share: true
tags:
 - IELTS
 - 100daysofielts
 - 100daysofx
 - 100dayofenglish
---
# Цели:
Основная цель - знать и понимать английский язык на уровне advanced.
* Подцель 1 - сдать экзамен IELTS по всем топикам на 7 баллов в декабре 2016 года.
* Подцель 2 - проанализировать все ошибки для дальнейшей подготовки к сдаче в EILTS на 8 баллов по всем топикам.

## Правила по работе с материалом:

## Общие правила:
* Каждую неделю начинать с постановки целей на неделю.
* Перед каждой сессией уделить 5 минут для описания цели занятия
* После каждой сессии коротко описать прогресс и что именно я сделал в этот день и достиг ли цели
* Отмечать время подготовки в toggl
* В репозитории каждый день должен быть хотя бы один коммит
* Можно прогулять один день в неделю, но нельзя два дня подряд
* Все прогулы не учитываются

### Правила по Writing'у:

> Каждый день переписывать популярные эсce, найденные в интернете:
> - Writing task 1
> - Writing task 2
>
> Каждую неделю писать по 2 эссе самостоятельно на каждый из топиков:
> - Writing task 1
> - Writing task 2
>
> Выписывать все полезные слова и конструкции в словарь и заучивать наизусть
>
> Практиковать free writing.

### Правила по Listening'у:

> Каждый день слушать утром 1-2 новости в день, разобрать каждую новость:
> - Отметить произношение
> - Отметить словарный запас
> - Найти в интернете статьи на подобные темы, прочитать, выписать новые слова
>
> Каждую неделю дословно записывать вручную один подкаст:
> - Разобрать и записать новые слова и выражения
> - Записать название подкаста
> - О чем подкаст
> - Что понял
> - Что не понял
> - Чем нравится и/или не нравится подкаст
>
> Правила самопроверки по Listening'у:
> - Прослушать задание один раз и ответить на вопросы
> - Прослушать второй раз и попробовать еще раз ответить на вопросы, если не получилось попробовать еще раз
> - Проработать текстовую расшифровку, после этого прослушать еще раз и ответить на вопросы
> - Проверить ответы с ключами

### Правила по Reading'у:

> Каждый день читать небольшие сложные тексты в интернете:
> - Выписать тему текста, дату и ссылку
> - Выписать в словарь слова, которые не известны
> - Выделить пять основных идей текста, а затем составьте его краткое содержание — письменно и устно

### Правила по Speaking'у:

> Каждый день записывать аудиокнигу:
> - Каждый вечер диктовать параграф прочитанной статьи правильно, с интонацией, с хорошей дикцией
> - Выделить пять основных идей текста, а затем составьте его краткое содержание —  устно
>
> Каждую неделю диктовать разобранный в Listening'е подкаст правильно, с интонацией, хорошей дикцией,так как это делает носитель
>
> Каждый день практиковать 1 minute activity по новым выученным словам

## Правила записи слов в словарь:

> Словарь делится на две части, слева записывается незнакомое слова, справа перевод:
> -  Под словом записывается предложение, где оно было встречено. Справа соответственно его перевод.
> -  Придумывается другое предложение на это же слово.
> -  Если у слова несколько значений, то записывается только одно значение, которое встретилось в предложении.
> -  Если в дпльнейшем встречается это же слово, но с другим значением, то записывается новое значение слова.
> -  Каждый день практиковать 1 minute activity по новым выученным словам

### Week 1: 05.07 - 11.01
--------------------------
 Сделать:
-
-
#### Day 1: 05.07

 Цели:
-
-

##### Вопросы по теме:

-
-
-
-

##### Что сделано:

-
-
-

##### Что не сделано:

-
-


If you want to enjoy a noodle recipe, then the soba noodle can be an excellent choice and this is also a healthy noodle unlike other noodles. Once you will know the nutritional benefits of the soba noodles you will surely want to kick the hard ramen brick and the other noodles to the curb. The following are the things you have to know about the soba noodles so that when you buy one in the grocery stores, you will surely pick this one.
So, what is soba noodles? This is actually a popular Japanese cuisine. They often look like a spaghetti. Some are not aware of the soba noodles not unless they visited a Japanese restaurant or had been in Japan. Actually the soba noodles are made of 100 percent buckwheat flour. Some of the brands can add another type of flour like that of the wheat flour or white flour.
The primary consideration of buying the maximum nutritional advantage of the soba noodles is to look at those that have a 100 percent of buckwheat. The good thing about the buckwheat is that this have many nutritional benefits that it can give to the customer.
The first benefit is that this is reach with manganese. A cup of the soba noodles contains 0.4 mg of the mineral manganese. The advantage of the manganese in the person's body is that this is a good mineral for the bone health and at the same time this can be best for the metabolism and the wound healing of the person. The nervous system can also be protected with this manganese. If you have deficiency of this mineral, then it will lead to osteoporosis and other nervous system related diseases like epilepsy.
Thiamin is also seen in the soba noodles and this can be an excellent source of energy for the metabolism and this helps in the healthy growth of the cell and its functioning. Thiamine is actually the mineral that will be depleted once that the person undergo metabolism and especially right during the alcoholic drinking. The thiamin deficiency can actually cause cardiovascular problems like the muscle weakness and memory loss as well as confusion.
This kind of noodles offer high amount of protein. The single cup if the soba noodles does contain 6 grams of proteins. The protein is important in the cell growth and for the repair of the cells in the body. This can also help the body to build the muscles especially the heart. The protein an actually help in the production of the hemoglobin that give color to the blood and carries the oxygen in the bloodstream. The soba noodle does have high amount of fiber that can be helpful especially in the digestion.


We have all been raised to believe in the American way that includes the right to life, liberty and the pursuit of happiness. There are many who tie their happiness to a future event, I can't be happy until…or I won't be happy unless… Since all hypnosis is self –hypnosis, I encourage my clients to change that thought to: "I am happy and if that happens, I will be happier!" Focusing on those things in your life that you can be happy about, also referred to as gratitude, can be very therapeutic. It doesn't change anything except how you feel! My goal is to help my clients 'feel' better.
Recently I have had several clients who, while in hypnosis, state that 'eating ice cream' or 'smoking that cigarette' makes them happy. Then, there is the part of them that would be really happy if they lost weight or stopped smoking. There is a constant inner subconscious battle over how to achieve the elusive goal of happiness. I believe life was meant to be a playground, not a battleground! If you notice, all these things I mentioned are going on inside the mind. People are constantly fighting with themselves. Unfortunately no one seems to be winning the battle. The internal battle often includes self-loathing, frustration, disappointment and feeling like a failure. These feelings clearly interfere with other aspects of ones life and that includes the pursuit of happiness.
I have learned that instead of hating the part of them who wants to do the bad habit, embrace it with the understanding that it just wants to make you happy. You have programmed yourself, unconsciously at some point to believe that you get pleasure or happiness from that bad habit. Because you created that belief, you can change it. Instead of happiness or pleasure, associate the habit, in your mind, with the consequence of the behavior. Focus on that consequence and notice the feelings that go along with that consequence. You change the happiness or pleasure program to one that is dangerous or repulsive. Repeating that thought over and over again will create a new program. Allow your parts to come together and negotiate a compromise that will allow both parts to integrate with the same outcome…happiness. The part of you that wants junk doesn't want you to be fat, just feel good. It doesn't know that fat doesn't feel good. The part of you that wants to smoke isn't trying to kill you; it's trying to comfort you to help you to feel happy. When your parts work together in harmony they create a new way for you to get relief, comfort, pleasure and happiness with the negative outcome of the bad habit.
I have made it sound simple because it is! Its just not always easy… but with effort and 100% commitment, it is much easier than you imagined it would be to make the changes. Understanding that all parts of you generally have positive intentions can help you love yourself while finding creative ways to achieve comfort or pleasure without the behaviors that have disgusting or unhealthy outcomes.


If you want to use Read from Binary File to read the array or string data you write to file, the prepend input must indicate True. Otherwise, this node generates an error.
A Boolean specifying whether to include data size information at the beginning of the file when data is an array.
True Includes data size information at the beginning of the file if data is an array.
False Does not include size information at the beginning of the file.
prepend controls only the top-level data size information. Arrays in clusters always include size information.
This input accepts scalar data of any type, arrays of data of any type, and clusters of data of any type.
This node writes string data using UTF-8 encoding.


text:
module Facebooker
  class InfoItem
    include Model
    attr_accessor :label, :image, :description, :link, :sublabel

    def to_json
      {:label => label, :image => image, :description => description, :link => link, :sublabel => sublabel}.to_json
    end
  end
end


Which Car Battery Size Is Best For My Nissan Leaf?
When your car works, everything works. At Firestone Complete Auto Care, you can get a reliable battery for your Nissan Leaf plus speedy battery testing and quick replacement. We only stock and install the number one car battery brand in America, Interstate Batteries. This means that when you come see the experienced professionals at your nearby Firestone Complete Auto Care you're getting the best Leaf car battery at a great price. Select your Leaf's model to learn more about the correct automotive battery size for your vehicle. Make an appointment for your car battery replacement today! For your convenience, your nearest Firestone Complete Auto Care is open late and on Saturdays and Sundays.


text:
var child_process = require('child_process'),
    restrict = require('./lib/index.js');

// Try whitelist
restrict({
    'whitelist': ['ls', 'ps'],
    'whitelistPath': '/bin'
});

try {
    child_process.exec('ls', function (err, stdout, stderr) {
        console.log(stdout);
    });
} catch (e) {
    console.log(e);
}


This copy shows the entry on 21-Apr-2019 at 19:56:54.
Cottage in row. Early C19. Local stone roughly squared and coursed; clay pantile roof between abutments; brick end chimney stacks. Two storeys, 2 bays. Sash windows of 16-panes, the upper windows modified, in plain openings, the lower windows having voussoired flat arches; between bays a glazed door in matching opening. Interior not seen.


The Employment Appeal Tribunal (EAT) has held that a company's childcare voucher scheme did not discriminate against a woman on maternity leave.
The case involved a company that operated a scheme that enabled employees to forego part of their salary in exchange for childcare vouchers. Entry to the scheme was conditional on employees accepting that membership during maternity leave would be suspended if they were in receipt of statutory maternity pay but no other pay.
An employee refused to accept that term, as she believed it to be discriminatory.
The tribunal held that those on maternity leave were entitled to non-pay benefits, and that the employer had acted unlawfully by requiring employees to forego such benefits as a condition of joining the scheme.
The EAT has now overturned that decision. It gave various reasons for its ruling, including the fact that the law allowed payment of a lower salary to those on maternity leave. It was not discrimination, nor contrary to the regulations.
Where part of the employee's wage was used by arrangement to pay for childcare, it was difficult to see why she should be entitled not only to the minimum maternity pay but also to the amount spent on childcare.
To require the continued provision of vouchers during maternity leave would produce a windfall benefit for an employee but would also impose a cost upon employers and discourage them from offering such a scheme. Parliament could not have intended that consequence.


Great egrets (Ardea alba) are a striking summer sight here in Northeastern California. These pure white birds with orange-yellow bills and black legs stand still in shallow water and watch for prey. Once it sights the small fish and invertebrates that form the bulk of its diet, a great egret strikes with its bill at amazing speed. Amphibians, reptiles, small birds and small mammals also fall victim to the great egret's dagger-like jab.
Soon these summer visitors will depart for their winter grounds in Central and South America and along coastal United States. Slow and steady fliers, great egrets can cruise at 25 miles per hour beating their wings twice per second.
This great egret was photographed along the Tule River near McArthur in Shasta County CA.
I always miss our avian summer visitors once they migrate in the autumn, but before long it will be spring and they will return again. Perhaps I appreciate the great egret more since I cannot always see its elegant form gracing our wetlands.
This entry was posted in Birds and tagged Ardea alba, great egret, natural history. Bookmark the permalink.


text:
What to know about reversing osteoporosis
Medically reviewed by Nancy Carteron, M.D., FACR — By Caitlin Geng on January 30, 2022
Is it reversible?
Lifestyle factors
Osteoporosis vs. osteopenia
A person with osteoporosis has weakened bones that are more likely to break. Although the condition is not reversible, people can prevent further bone loss and rebuild bones with medication, a nutrient-dense diet, and weight bearing exercise.
Bones consist of living tissue. As these tissues break down, the body discards them and creates new ones to replace them.
When a person has osteoporosis, there is a disruption to this balance. People lose too much old bone, do not create enough new bone, or both.
The condition typically progresses gradually over a number of years, and a person usually only receives a diagnosis after they have broken a bone. A doctor can also diagnose osteoporosis using a bone density scan, such as a dual-energy X-ray absorptiometry scan, in people at an increased risk of the condition.
Read more to learn whether or not osteoporosis is reversible, how a person can maintain bone mass, and when to contact a doctor.
Can you reverse osteoporosis?
Digital Vision/Getty Images
In some cases, a person may be able to reverse osteoporosis.
Some lifestyle strategies can prevent future bone loss and reduce the risk of fractures. Additionally, certain medications may help a person rebuild bone mass, essentially reversing osteoporosis.
Lifestyle factors to prevent bone loss
There are several ways a person can prevent bone loss. These include eating a nutritious diet, doing regular exercise, taking calcium and vitamin D supplements, avoiding excess alcohol and smoking, and minimizing steroid use.
Eating a nutritious diet
Eating a varied, nutrient-dense diet is important for bone health.
It is especially important to include foods rich in vitamin D and calcium. Vitamin D increases calcium absorption, so the two supplements are most effective when people take them together.
Although calcium and vitamin D are most commonly associated with strong bones, they are not the only nutrients that contribute to bone health. A 2015 analysis of a large osteoporosis study found that fruits, vegetables, seafood, and dairy products are beneficial for healthy bones.
If a person has osteoporosis, they may benefit from taking calcium and vitamin D supplements. A 2016 meta-analysis of osteoporosis studies found that people who took these supplements were 15% less likely to have bone fractures.
It is important to include calcium and vitamin D from food sources. Sardines, tofu, and dairy products are all good sources of calcium. People can get vitamin D from trout, salmon, and mushrooms. They can also get it from small amounts of sun exposure.
Doing regular exercise
Weight bearing exercise and resistance training are essential for maintaining bone density, especially as people get older. Because bones are made of living, changing tissues, they can respond to change. When under stress, for example, during exercise, they react by building more bone tissue.
In addition to maintaining bone density, regular exercise can strengthen a person's muscles and improve coordination, reducing their risk of falls.
People can try:
climbing stairs
bodyweight exercises
Avoiding excessive alcohol and smoking
Stopping smoking and reducing alcohol intake are both associated with healthier bones. In general, avoiding these also lowers a person's risk of other illnesses.
Medications to prevent bone loss
Doctors treat osteoporosis with the aim of strengthening bones and preventing fractures. However, no treatment methods can fully reverse the condition.
A doctor will usually perform various tests to decide on the best course of treatment for osteoporosis. In addition, they will consider a person's age, sex, and medical history.
Medications prescribed for osteoporosis can include:
These are common medications that slow the rate at which bones break down. They help bones maintain their density, lowering a person's risk of breaks.
People can take bisphosphonates in the form of tablets or an injection.
Types of bisphosphonates include:
ibandronic acid
risedronic acid
zoledronic acid
alendronic acid
Doctors sometimes use hormone replacement therapy (HRT) to help treat menopause symptoms.
While HRT can also improve bone strength, doctors generally do not use it to treat osteoporosis alone. They avoid this because HRT can increase a person's risk of stroke, venous thromboembolism, and certain cancers.
Selective estrogen receptor modulators
Selective estrogen receptor modulators (SERMs) affect the bones similarly to the hormone estrogen, preventing bone loss.
Research has shown SERMs can help prevent fractures of the vertebrae, the bones that make up the spine, but they have limitations in preventing other types of breaks. They can also cause side effects, so people should be careful when using them, especially for extended periods.
Raloxifene is the only SERM available to treat osteoporosis.
The parathyroid hormone regulates calcium levels in bones.
Parathyroid treatments, such as a medication called teriparatide, stimulate cells that create new bone. This can increase bone density.
A doctor may also prescribe denosumab (Prolia), a monoclonal antibody drug. They will administer it as an injection once every six months.
Learn more about medications used to treat osteoporosis.
Osteopenia is a condition in which a person has lower bone density than usual for their age. However, it is not low enough for doctors to consider it osteoporosis.
Osteopenia is the stage before osteoporosis. If left untreated, it can progress.
Osteoporosis is more severe than osteopenia. It weakens bones to the point of making them more likely to break.
Learn more about the differences between osteoporosis and osteopenia.
Osteoporosis does not usually cause visible symptoms, which means people are often unaware they have the condition until they have broken a bone.
To detect bone loss early, the Bone Health and Osteoporosis Foundation recommends that people contact a doctor and receive a bone density test if they:
are going through or have been through menopause
have pain in their back from a possible vertebrae fracture
have experienced a fracture over the age of 50
are a female over the age of 65 or a male over the age of 70
have lost height of a half inch or more over the course of one year
have an inflammatory or autoimmune condition
take medications associated with bone loss
In some cases, a person can reverse osteoporosis bone loss with certain medications.
People can maintain bone health by eating a nutritious diet, doing weight bearing exercise, and taking calcium and vitamin D supplements. In some cases, a doctor will prescribe medication to prevent future bone loss and reduce their risk of fractures.
An, K.-C. (2016). Selective estrogen receptor modulators.
Benedetti, M. G., et al. (2018). The effectiveness of physical exercise on bone density in osteoporotic patients.
Bone density exam/testing. (n.d.).
https://www.bonehealthandosteoporosis.org/patients/diagnosis-information/bone-density-examtesting/
Calcium and vitamin D: Important at every age. (2018).
https://www.bones.nih.gov/health-info/bone/bone-health/nutrition/calcium-and-vitamin-d-important-every-age
Exercise for your bone health. (2018).
https://www.bones.nih.gov/health-info/bone/bone-health/exercise/exercise-your-bone-health
Ganesan, K., et al. (2021). Bisphosphonate.
Lin, S.-Y., et al. (2021). Efficacy and safety of postmenopausal osteoporosis treatments: A systematic review and network meta-analysis of randomized controlled trials.
Osteopenia. (n.d.).
https://www.cancer.gov/publications/dictionaries/cancer-terms/def/osteopenia
Osteoporosis. (2017).
https://www.nia.nih.gov/health/osteoporosis
Osteoporosis overview. (2019).
https://www.bones.nih.gov/health-info/bone/osteoporosis/overview
Overview: Osteoporosis. (2019).
https://www.nhs.uk/conditions/osteoporosis/
Sahni, S., et al. (2015). Dietary approaches for bone health: Lessons from the Framingham Osteoporosis Study.
Varacallo, M., et al. (2021). Osteopenia.
Vitamin D. (2021).
https://ods.od.nih.gov/factsheets/VitaminD-HealthProfessional/
Weaver, C. M., et al. (2016). Calcium plus vitamin D supplementation and risk of fractures: An updated meta-analysis from the National Osteoporosis Foundation.
What is the difference between osteopenia and osteoporosis?
Medically reviewed by Angelica Balingit, MD
Osteopenia is a condition where people have lower bone density. Without treatment, osteopenia can lead to osteoporosis. Learn more here.
Bone density decreases with time, and some people have a risk of developing weak or brittle bones. Learn how to increase or maintain bone density here.
What osteoporosis medications are there, and what side effects do they have?
Medically reviewed by Alan Carter, Pharm.D.
Various types of osteoporosis medications are available. Learn about the different options, including the benefits of each and any potential side…
What to know about osteoporosis
Medically reviewed by Brenda B. Spriggs, M.D., MPH, FACP
Osteoporosis occurs when bone density decreases. This affects the structure and strength of bones and makes fractures more likely. Osteoporosis is…