If You Invested $5,000 in Facebook’s IPO, This Is How Much Money You'd Have Now
Buying in at the IPO might have been something to brag about in 2012, but patient investors who used a different approach are the ones bragging now.
by Brian Withers (TMFBwithbike)When a company's stock gets released to the public in an initial public offering (IPO), there's usually not much news coverage outside of the financial media outlets. But that was not the case in 2012 when Facebook (NASDAQ:FB) announced its go-public event. It was hard to avoid the buzz leading up to the stock's release day, and many social networking fans who had never invested in stocks before were interested in getting in on the action.
Let's take a look back at the early years at Facebook to understand why investors were so excited about this company going public. Then we'll dive into the IPO calculations and discuss an alternative approach that would have been even more lucrative.
Facebook was a hit from Day One
It all started in 2004 when then-freshman Harvard student Mark Zuckerberg and his friends started "TheFacebook" as a way for students at the university to connect online. The announcement of the site was sent to an email distribution list of 300 students, but within the first 24 hours, four times that many had registered. In the first few years, the service was only available for college students, but even with that limitation, it reached 6 million members by December 2005. The torrid growth didn't seem to slow down. When the IPO rolled around in May 2012, the platform had an amazing 526 million daily active users across the globe and had achieved a $4 billion annual revenue run rate.
No wonder people were excited about the opportunity to own stock with this amazing growth story.
Getting in at the beginning
The stock was offered at $38 per share via the IPO. Let's assume you bought 132 shares for a total of $5,016 on May 18, 2012, and held all the way through to today. In the meantime, Facebook continued its incredible growth and has turned into a global juggernaut. The table below compares Q1 2012, the last quarter before its IPO, to its most recently reported results for Q2 2019.
| Metric | Q1 2012 | Q2 2019 | Change |
|---|---|---|---|
| Daily active users | 526 million | 1,587 million | 202% |
| Monthly active users | 901 million | 2,414 million | 168% |
| Trailing-12-month-revenues | $4.0 billion | $62.6 billion | 1,465% |
| Trailing-12-month net income | $974 million | $5.9 billion | 505% |
| CEO Mark Zuckerberg's age | 28 | 35 | 7 years |
Data source: Facebook's SEC filings.
Shareholders have shared in the company's success. At today's price of around $191 per share, those 132 shares would be worth $25,212, resulting in a market-beating five-bagger.
Any investor should be happy with that result, but there was a way to improve your returns with a simple strategy.
A different approach with better results
Facebook's IPO was largely viewed as a failure. In the days following the stock's release, it dropped -- and dropped and dropped. The stock stayed below the $38 mark for months and finally bottomed out in September 2012 below $18.
The shares didn't get back to the initial $38 again until August the following year, a full 16 months later. This was a tough pill to swallow for those who bought on Day One. But one approach that investors can use to help in a case like this is to buy in thirds.
The idea is that you can get in on the stock with a small initial investment but have cash left to invest later. If the stock goes lower, you don't feel too bad, because you have money available and can add to your position at a better price. If the stock starts to rise, as a shareholder, you can be comforted that you are capturing the gains.
With 20/20 hindsight, we can see how this strategy would have paid off for Facebook IPO investors. Let's assume you invested one-third of your available cash at the IPO and the remaining two-thirds split between buys at six months and at one year later.
| Metric | First Buy | Second Buy | Third Buy | Total/Average |
|---|---|---|---|---|
| Purchase date | 5/18/2012 | 11/16/2012 | 5/17/2013 | n/a |
| Amount invested | $1,672 | $1,673 | $1,680 | $5,025 |
| Shares purchased | 44 | 71 | 64 | 179 |
| Price per share | $38.00 | $23.56 | $26.25 | $28.07 |
Share prices from Yahoo! Finance.
With this approach, you would have 47 more shares and a 26% lower cost basis. Today, those 179 shares at the $191 price would be worth $34,189, or almost 36% more than just investing at the IPO.
Buying in thirds doesn't always pay off monetarily, but it can help manage your temperament if the stock loses value. Red numbers in your portfolio are tough to look at. Some investors might be tempted to sell, especially when numbers remain in the red for what seems like an eternity. Early Facebook shareholders who chose a buy-in-thirds approach not only would have achieved better results, but more importantly, they were more likely to hold their shares through the first 16 months of disappointing returns.


ELIXIR Benchmarking platform will provide guidance and software infrastructure for Benchmarking and Technical Monitoring of bioinformatics tools, web servers and algorithms.
High level activities
- Engage with existing benchmark initiatives making different communities aware of the platform.
- Maintain a data warehouse infrastructure to keep record of Benchmarking initiatives.
- Expose benchmarking and technical monitoring results to Elixir Tools registry.
- Establish and refine communication protocols with communities and/or infrastructure projects willing to have a unified benchmark infrastructure
- Coordinate with Elixir Interoperability Platform to keep FAIR data principles on Benchmarking data warehouse.


bosh
Command-line tool to deploy and manage the bosh director.
More information: home page
- Create local alias for director:
bosh alias-env environment_name -e ip_address|url --ca-cert ca_certificate
- List environments:
bosh environments
- Log in to the director:
bosh login -e environment
- List deployments:
bosh -e environment deployments
- List environment virtual machines:
bosh -e environment vms -d deployment
- Ssh into virtual machine:
bosh -e environment ssh virtual_machine -d deployment
- Upload stemcell:
bosh -e environment upload-stemcell stemcell_file|url
- Show current cloud config:
bosh -e environment cloud-config


Supports the generation of parallelogram, equilateral triangle, regular hexagon, isosceles trapezoid, Koch snowflake, 'hexaflake', Sierpinski triangle, Sierpinski carpet and Sierpinski trapezoid mazes via 'TurtleGraphics'. Mazes are generated by the recursive method: the domain is divided into sub-domains in which mazes are generated, then dividing lines with holes are drawn between them, see J. Buck, Recursive Division, <http://weblog.jamisbuck.org/2011/1/12/maze-generation-recursive-division-algorithm>.
| Version: | 0.2.0 |
| Depends: | R (≥ 3.0.2) |
| Imports: | TurtleGraphics |
| Suggests: | testthat, knitr |
| Published: | 2017-12-12 |
| Author: | Steven E. Pav [aut, cre] |
| Maintainer: | Steven E. Pav <shabbychef at gmail.com> |
| BugReports: | https://github.com/shabbychef/mazealls/issues |
| License: | LGPL-3 |
| URL: | https://github.com/shabbychef/mazealls |
| NeedsCompilation: | no |
| Citation: | mazealls citation info |
| Materials: | README ChangeLog |
| CRAN checks: | mazealls results |
| Reference manual: | mazealls.pdf |
| Package source: | mazealls_0.2.0.tar.gz |
| Windows binaries: | r-devel: mazealls_0.2.0.zip, r-release: mazealls_0.2.0.zip, r-oldrel: mazealls_0.2.0.zip |
| OS X binaries: | r-release: mazealls_0.2.0.tgz, r-oldrel: mazealls_0.2.0.tgz |
| Old sources: | mazealls archive |
Please use the canonical form https://CRAN.R-project.org/package=mazealls to link to this page.


--- layout: post bodyClass: gen-theme gen-drinking-list theme-eddit-muphy title: "Eddie Muphy Stand-Up: Delirious and Raw" date: 2016-10-22 01:00:00 last_modified_at: 2016-10-22 01:00:00 excerpt: "Eddit Murphy Stand-Up: Delirious and Raw, the Drinking Game" categories: Stand-Up tags: Eddie Muphy, Stand-up, Delirious, Raw, comedy, drinking game image: feature: eddie-murphy.jpg topPosition: 0px bgContrast: dark bgGradientOpacity: darker syntaxHighlighter: no ---
Eddie Muphy was one of the greatest stand-up comedians of all time. He many not be making us laugh now-a-days, so let's go back in time to the good old (non-politically correct) 80's.


src/settings/settings.component.ts
| selector | ng-xterm-settings |
| styles |
* {font-size: 14px !important;}
.active { color: white }
a {color: grey}
|
| template |
|
import { Component } from "@angular/core"
@Component({
selector: "ng-xterm-settings",
template: `

General

Advanced

Misc

<router-outlet></router-outlet>
`,
styles: [`
* {font-size: 14px !important;}
.active { color: white }
a {color: grey}
` ],
})
/** The SettingsComponent simply acts as a container which holds
* the other "sub" forms related to the various application settings.
* Splitting each major setting/setting group into its own form makes managing the settings
* and forms much easier, and they are not all crammed into one gigantic form.
* */
export class SettingsComponent {}
* {font-size: 14px !important;}
.active { color: white }
a {color: grey}


I used the
get_starters,
get_previous_wins,
and
get_player_to_date_stats
methods to gather and create parameters to feed into my models. The
get_starters
method returns names of 5 players with the most playing time on each team for any game from the box scores dataset. The
get_previous_wins
method returns a slew of different parameters from the schedules dataset. I started with features looking at winning and losing streaks as well as a team's success versus another team during a season's series. However, I ended up creating other parameters like home and away winning percentages and various statistics about points scored and given up. Finally, the
get_player_to_date_stats
method returns various statistics (like rebounds, assists, three point percentage, etc.) from a specific game. I used the players returned from the get_starters method as inputs into this method.
For all the games in the schedules dataset, I aggregated about 30 different parameters in the game_dict dictionary. I converted this data type into a pandas dataframe, so I could use various scikit learn classification models.
The code for this part of the process is actually quite simple. The model can be created simply by feeding in the testing and training data as an array-like object. I fed in all the features I created in this first round, and created a variable called 'home_won' as my target variable. My first model was scikit learn's DecisionTreeClassifier. I'm not exactly sure how each model works, but I chose it because it's the simplest classification technique where, each time it receives an answer, a follow up question is asked of the model:
The model returns its results as a confusion matrix. In this case, the top left value represents the times when the home team lost, and the model correctly predicted that the home team lost. The top right value represents the times when the home team lost, but the model incorrectly predicted that the home team won. The bottom left value represents the times when the home team won, but the model incorrectly picked that the home team lost. Finally, the bottom right value represents the times when the home team won, and the model correctly predicted that the home team won.
However, this confusion matrix also supports the fact that home teams win 58% of the time. In other words, if I simply picked that the home team would win every time, I would have made a better model.
Hoping to improve my accuracy score, I looked into all the different hyperparameters that a DecisionTreeClassifier can take in. I was overwhelmed by all the options for the hyperparameters, and, frankly, I didn't know what a lot of them meant. So I used this parameter estimator called GridSearchCV, a scikit learn function. The grid search method takes in scikit-learn model, a dictionary of parameters, and the number of cross-validation attempts. It simulates the DecisionTreeClassifier with every possible permutation of the parameters entered and finds the best combination.
This new DecisionTreeClassifier now had a 65.2% accuracy. This change turned out to be the single biggest improvement to my model. I spend the next week and a half feature engineering, creating and removing various statistics that fed into the model. However, all this work only made my model about .4% more accurate. I'll get into this more in the results section.
Finally, I just tried to use different classification techniques besides the DecisionTreeClassifier. The best results came from using the LogisticRegression model (I also tried RandomForestClassifier and AdaBoostClassifier). This immediately produced between 66%-69% accuracy when I ran it multiple times. I tried running GridSearchCV for the different hyperparameters for LogisticRegresssion; however, this classification method had many incompatible combinations where certain hyperparameters couldn't exist when others were inputted into the model.


Starting Analysis
Please bookmark this page to return to your results. The results will be deleted after three days.


I think
Hi
Hi, welcome. Lots of stories to come! For now, please visit my old blog. Thank you.
Vivek
Magical Messages | I think
Contents
Thank you for visiting!Vivek Bhookya


Employee privacy
Before diving into this section, it’s important to realize that we place substantial trust in our employees and therefore respect employee privacy as much as we can.
To protect our company, though, we need to make it clear that employees do not have a right to privacy within the workplace. This includes our offices, any company owned property that you use (e.g., desk, storage, laptop, etc.), company provided online accounts and services (e.g., email, code repositories, file sharing services, etc.), and other items of this nature. With this in mind, we reserve the right to search these at any time, without warning, to ensure compliance with our policies, including those that cover employee safety, workplace violence, harassment, theft, and possession of prohibited items.
Email and internet privacy
Company provided email and internet are not being actively monitored by anyone, but because they are company resources that are managed according to company policy, you should not expect privacy from either. Our company has both the ability and the right to look at employee usage for both in order to protect employee safety and wellbeing, as well as company property and interests.
Email messages (including attachments) sent and received from a company email address are the property of our company. We reserve the right to access, monitor, read, and/or copy email messages at any time, for any reason. You should not expect privacy for any email you send using your company email, including messages that you consider to be personal or label with a designation such as "Personal" or "Private."
We reserve the right to monitor employee use of the internet at any time. You should not expect that your use of the internet—including but not limited to the sites you visit, the amount of time you spend online, and the communications you have—will be private.


% if (bootstrapCssExists) { %> <% } %>
This page is hosted by node.js to work with mockup independently from the main app. Node.js server (connect) is cross-platform and free you up from back-end setup complexities.


Create a custom RuoYi modal window by adding the .inmodal
class.
The modal window provides two sizes, which can be achieved by adding a class to the
.modal-dialog
of the modal window.
You can achieve animation effects by adding classes to .modal-content
of the
modal window
The related functions of the modal window can be realized by data binding or Javascript. If
you use data binding, you can add data-
to the element, such as
data-backdrop=""
.
| Name | Type | default value | Description |
|---|---|---|---|
| backdrop | boolean or string 'static' |
true | Mask layer, or use 'static' to specify that the mask layer is
not
associated with closing the modal window |
| keyboard | boolean | true | Exit the modal window when pressing Esc key |
| show | boolean | true | After the initialization is complete, the modal window will be displayed |
| remote | path | false |
recommended to use data binding, or use jQuery.load Remote URL example:
|


Constrain movement along an axis:
I can be drag only horizontally
I can be drag only vertically
Constrain movement to within anohter DOM emelent
I'm contained within my parent
I'm contained within #demo-frame


Toggle navigation
Menu
NIT SRINAGAR
Academics
Departments
Administration
CONTACT US
# Nit Srinagar
Academics
Fee Structure
Check Fee Structure
Admissions
Check Admissions
Examinations
Major Exams 2016
Calendar 2016
Check Calendar
Departments
Pure Sciences
Physics
Chemical
Maths
Engineering
Mechanical
Civil
Electronics & Communication
Information Technology
Computer Science
Metallurgy
Let's Get In Touch!
Ready to start making NIT great again ?
123-456-6789
edgarmonis@gmail.com


Lossless webp images are 26% smaller in size compared to PNG. Lossy webp images are 25-34% smaller in size compared to JPEG. This package reads and writes webp images into a 3 (rgb) or 4 (rgba) channel bitmap array using conventions from the 'jpeg' and 'png' packages.
| Version: | 0.4 |
| Suggests: | jpeg, png |
| Published: | 2017-03-30 |
| Author: | Jeroen Ooms |
| Maintainer: | Jeroen Ooms <jeroen at berkeley.edu> |
| BugReports: | https://github.com/jeroen/webp/issues |
| License: | MIT + file LICENSE |
| URL: | https://github.com/jeroen/webp#readme https://developers.google.com/speed/webp |
| NeedsCompilation: | yes |
| SystemRequirements: | libwebp |
| Materials: | README NEWS |
| CRAN checks: | webp results |
| Reference manual: | webp.pdf |
| Package source: | webp_0.4.tar.gz |
| Windows binaries: | r-devel: webp_0.4.zip, r-release: webp_0.4.zip, r-oldrel: webp_0.4.zip |
| OS X binaries: | r-release: webp_0.4.tgz, r-oldrel: webp_0.4.tgz |
| Old sources: | webp archive |
| Reverse suggests: | magick, pdftools, rsvg |
Please use the canonical form https://CRAN.R-project.org/package=webp to link to this page.


ABOUT
Enlighten Designs is an Internet solutions provider that specialises in front and back end development. To view some of the web sites we have created view our portfolio.
We are currently undergoing a 'face lift', so if you have any questions or would like more information about the services we provide please feel free to contact us.
Contact Us.
Phone: (07) 853 6060
Fax: (07) 853 6060
Email:
<EMAIL_ADDRESS>P.O Box: 14159, Hamilton, New Zealand
More contact information...
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Nullam gravida enim ut risus. Praesent sapien purus, ultrices
a, varius ac, suscipit ut, enim. Maecenas in lectus. Donec
in sapien in nibh rutrum gravida. Sed ut mauris. Fusce
malesuada enim vitae lacus euismod vulputate. Nullam
rhoncus mauris ac metus. Maecenas vulputate aliquam odio.
Duis scelerisque justo a pede. Nam augue lorem, semper at,
porta eget, placerat eget, purus. Suspendisse mattis nunc
vestibulum ligula. In hac habitasse platea dictumst.
Copyright © Enlighten Designs
Powered by Enlighten Hosting and Vadmin 3.0 CMS


4th Family Incorporated is a not-for-profit organization that hosts teen/community events, mentor programs, personal development programs, educational programming, wellness & health programs, annual sport leagues & tournaments, as well as educational trips. We engage all communities within the Capital District, starting in the high schools. Our goals are to motivate, encourage and uplift the community. 4th Family empowers the community by targeting at risk youth and adults and providing them with an array of unique personal development opportunities.
4th Family is a non-profit based out of Albany, NY that was founded in 2011 by two young African-American males, John Scott and Jahkeen Hoke. The idea of creating a non-profit to address the issues faced by youth in inner city Albany was originally developed by Jahkeen Hoke as a student at Morehouse College. John Scott became involved following the tragic murder of Eddie Stanly, who John had coached in basketball. Together, John and Jahkeen founded 4th Family Incorporated in 2011.
The name 4th Family is based on an African proverb that described the ties that bound communities together. The first family is the nuclear family, the second family is the immediate extended family, the third family is extended family. The 4th Family is the community that provides a support network to all of its members. At 4th Family we seek to redevelop this network within urban communities and use this network to provide a platform for talented individuals to make a positive impact on these communities. This platform approach allows 4th Family to address a diverse set of challenges facing the inner city.
The 4th Family slogan “It takes a community” is intentionally open to interpretation so that that platform can be adapted to changing needs in the community. At present, the 4th Family’s platform approach has three main areas of investment:
Between these three initiatives is the common thread of social responsibility, economic mobility, entrepreneurship, and racial justice.


- Google shares top $1,000 after strong earnings.
- Sleep 'cleans' the brain of toxins.
- Amaze project aims to take 3D printing 'into metal age'.
- Google shares top $1,000 after strong earnings.
- Sleep 'cleans' the brain of toxins.
- Amaze project aims to take 3D printing 'into metal age'.


October 6th Notes
File Transfer: FTP
- HTTP and FTP are file transfer protocols with similar characteristics (both run on top of TCP)
- Differences:
- FTP uses two parallel TCP connections (a control connection and a data connection) to transfer a file.
- Since FTP uses a different control connection it is said to send control information out-of-band. HTTP meanwhile send this information in-band.
- A control connection sends information such as user identification, password, commands to change remote directory, and commands to put/get files.
- Data connection is used to actually transfer the file
- Commands sent in 7-bit ASCII format (people readable)
- USER: send user information to the server
- PASS: Send user password to server
- LIST: retrieve lists of file in the directory
- RETR: retrieve file from directory
- STOR: store file in directory
Electronic Mail in the Internet
- User agents: allow users to read, reply to, forward, save and compose messages. Like Microsoft Outlook or Apple Mail.
- Mail Server: Forms the core of the email infrastructure. This where mailboxes are stored which are responsible sending and receiving emails.
- Simple Mail Transfer Protocol (SMTP): Principal application layer protocol for email. It uses the reliable data transfer service of TCP to transfer mail. It has two sides: a client side and a server side.
HTTP and SMTP
- HTTP
- Persistenet Connection
- HTTP is a pull protocol: Users use HTTP to pull information from a web server.
- HTTP encapsulates each object(text, images etc) as its own HTTP response messages
- SMTP
- Persistenet Connection
- SMTP is a push protocol: the sending mail server pushes the file to the receiving mail server
- SMTP requires 7-bit ASCII format. Therefore multimedia data needs to be encoded when it is sent over SMTP and decoded back once it is received.
Mail Access Protocols


{% extends "layout.html" %} {% block content %}
Below is a preview of the selected image. Press submit to upload the data.


login Form
E-Dealing
Please enter your email and password
Forgot Password?
Create Accounts
Login
Back To Login
Sign Up
E-Dealing All Rights Reserved


Green Mountain's Svein Atle Hagaseth on carbon neutral data centers
Svein Atle Hagaseth says data center use will continue to grow. In North America, more and more companies are expanding their data centers into Europe. The Norway-based company uses its wet and cold climate there to help efficiently power its data center development.


The truth and lies about progress in South Africa since 1994
by Africa CheckHow has South Africa fared since its first democratic elections in 1994? That’s the question a new government report released by the country’s presidency sets out to answer.
The introduction says it “reflects both the highlights and lowlights” of the last 25 years.
The country’s president, Cyril Ramaphosa, launched the report at the University of Mpumalanga in the north-east of the country on 8 November 2019. During his speech he made a number of claims about the government’s achievements.
Did Ramaphosa get his facts right? This report interrogates five statements about university enrollment, health, the economy, inequality and access to electricity.
- Claim: Total university enrollment was “around 300,000” in 1994.
- Verdict: Incorrect
During his speech, Ramaphosa claimed that total university enrollment increased from “around 300,000” in 1994 to “over one million” in 2019.
The latest figures from the Department of Higher Education and Training show that 1,036,984 students were enrolled in 26 universities in 2017.
But Ramaphosa’s claim that enrollment was “around 300,000” in 1994 is not supported by the new report released by the presidency.
The report says there were 495,356 students enrolled in university in 1994. This number has been previously reported by the higher education department. A slightly higher figure of 525,000 has been reported by the Council on Higher Education, an independent statutory body.
Ramaphosa put the figure at 500,000 during his first state of the nation address in 2018.
No available estimates put it at “around 300,000” in 1994. We rate Ramaphosa’s claim as incorrect.
- Claim: 45,500 people received antiretroviral therapy from the public health sector in 2004.
- Verdict: Incorrect
“Access to antiretroviral therapy in the public health sector has grown from 45,500 patients in 2004 to over 4.7 million in 2019,” said Ramaphosa.
The report cites a 2017 journal article as the source of the figure for 2004. A table in the article shows that 45,500 people were on antiretroviral treatment in 2004.
However, not all were in the public sector, as Ramaphosa claimed. The figure was estimated using both statistics from the public sector and surveys which measured the number of people treated in the private sector and by non-governmental organisations (NGOs).
Africa Check spoke to Dr Leigh Johnson, one of the article’s authors and an epidemiologist at the University of Cape Town’s Centre for Infectious Disease Epidemiology and Research. He said that the article did not calculate a breakdown showing private and public patients.
For this he pointed us to an earlier paper of his from 2012. In it, Johnson estimated that there were 47,500 people on antiretroviral treatment in 2004. Of these, only 9,600 were receiving their treatment through the public sector. The vast majority of patients (80%) received their treatment from the private sector or NGO programmes.
Number of patients receiving antiretroviral treatment in South Africa in 2004
| Provider | Number | Percentage |
|---|---|---|
| Public sector | 9 600 | 20.2% |
| Private sector | 34 100 | 71.8% |
| NGO Programme | 3 900 | 8.2% |
| Total | 47 500 | 100.0% |
Source: Access to antiretroviral treatment in South Africa, 2004 – 2011 (Note: Numbers are rounded to the nearest 100. Due to rounding, the rows may not sum to the total.)
Johnson said his 2012 estimate of the number of people on antiretroviral treatment in South Africa in 2004 (47,500) differed from the newer estimate (45,500) due to a change in methodology.
“The methods we have used to estimate these numbers have changed over time. Previously we were just taking the raw data and we weren’t trying to fit any kind of statistical model to it,” he explained. “What we have done in the more recent paper is to try to fit smooth time trends to the data. That process has led to some change in the numbers.”
The latest annual report from the department of health shows that there were 4,629,831 people on antiretroviral treatment as of 31 March 2019.
Ramaphosa was incorrect about the number of people on antiretroviral treatment in the public health sector in 2004.
- Claim: The size of the South African economy over the past 25 years has doubled.
- Verdict: Correct
Commenting on the importance of human resources and talent in South Africa, Ramaphosa claimed that the size of the country’s economy has doubled over the past 25 years.
±The size of a country’s economy is measured by its gross domestic product (GDP). This is the value of all goods and services produced in a given period, usually a year.
GDP can be measured by using current or nominal prices, which take into account inflation over the years. But it’s important to separate inflation from real economic growth, Prof Jannie Rossouw, head of the school of economic and business sciences at Wits University, previously told Africa Check.
World Bank data based on constant or real GDP – where the effect of inflation is removed – shows that South Africa’s economy grew 1.9 times from US$225.6 billion in 1994 to $429.8 billion in 2018. (Note: Figures from 2019 are not yet available.)
Based on this data, Ramaphosa’s claim is correct.
- Claim: South Africa remains the most unequal society in the world.
- Verdict: Unproven
Inequality is commonly measured with the Gini coefficient. This is a measure that provides a figure between 0 (perfect equality) to 1 (perfect inequality).
According to the World Bank, South Africa had a Gini coefficient of 0.63 in 2015. When Statistics South Africa calculated the figure using the same data, the result was 0.64.
“No other country in the database maintained by the World Bank had this level of Gini coefficient,” Victor Sulla, a senior economist with the World Bank, told Africa Check.
But the database consists of only 164 countries. The data needed to measure inequality for several countries is unavailable, Prof Julian May, former member of the South African Statistics Council, told Africa Check.
This includes countries such as Kuwait, Qatar and Saudi Arabia, which are known to have high inequality levels.
We rate the claim unproven because data is not available for all the countries in the world. May said that it would be correct to say that South Africa is the most unequal of the countries for which there is data.
- Claim: 84% of all households in South Africa have electricity.
- Verdict: Correct
According to Statistics South Africa, 84.7% of households were connected to the mains electricity supply in 2018. This was up slightly from 84.4% in 2017.
Just 65.7% of households rated their electricity supply as “good”.
“This represents a decline of 1.8 percentage points since 2010 when 67.5% rated electricity supply services as ‘good’,” the Statistics South Africa survey said.
This report was written by Africa Check, a non-partisan fact-checking organisation. Fact checking by Kate Wilkinson, Cayley Clifford, and Naphtali Khumalo. Read the original article here.


Hello there I'm Kavindu Gayantha ,
I am an enthusiastic individual who is eager to learn new things
perpetually while getting myself up-to-date with cutting edge technologies.
I am good at being a team player as well as leading a team. I am more keen on Web development,
Mobile Development, and Data Science, and seek an opportunity related to one of these areas.


I've smoked pot sporadically for a few years. I'm not by any means a regular user. My usual pattern is to go about 6-8 months without smoking and then get stoned about once every one and a half weeks for two months and then quit again for 6-8 months.
To me, the only negative thing about smoking marijuana is the racing heart.  I used to get this rather intensely and quite often (about 60% of the time), but I've noticed that it's been getting less and less of a problem as of late.
I noticed that I mostly got the racing heart when I would smoke out of a joint, and whenever I roll a joint, I feel almost committed to finishing the joint, thereby compelling me to smoke more than I need to get comfortably stoned. I have since swithed to a pipe since it's easier to control the pot dosage.
Another thing I noticed during a racing heart episode was that belching REALLY helped relieve that hard, thumping feeling I get in your chest when I think that my heart can't beat any faster. In fact, since marijuana tends to distort my perception of touch, time, and sound volume, I wondered if my heart really was beating as fast as I thought it was or if it was just excess air stuck in my chest that needed to be burped out.
At any rate, these two things really helped me out with the whole racing heart problem and helped me to enjoy my pot trips. Hope they help to make your experience a little more tranquil!!
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


This file is the reference documentation for bee users. For a short introduction to bee, please see Quick Start documentation.
Bee is written in Ruby, thus a Ruby Virtual Machine must be installed to run it. You can get one for free at http://www.ruby-lang.org. You must also install RubyGems to install Bee and its dependencies.
When Ruby and Gems are both installed, you can install Bee and its
dependencies typing gem install bee. You might need
administrator privileges to do so. You can test your installation
typing bee -h
.
Bee has been tested on MacOSX (Tiger 10.4.11 and Leopard 1.5.6), Linux (Ubuntu 7.10 and Mint Helena) and Windows (XP SP2) for Ruby versions 1.8.6-p36 (with gems 0.9.4), 1.8.6-p111 (with gems 1.0.1), 1.8.6-p114 (with gems 1.0.1), 1.8.7-p72 (with gems 1.3.0) and 1.9.1-p376 (with integrated Gems). Thus it should run on most modern operating systems and Ruby VMs.
If you have trouble installing Ruby VMs and Gems, please refer to Compiling Bee page for more information on these topics.
To run a build, type bee. This will run default target, that is the one specified in default key of the build entry. To run another target, pass its name on the command line. Thus, to run target foo, type bee foo. You can run more than one target at once, passing their name. Typing bee foo bar will run target foo, then target bar (even if it was already executed running foo).
Let's consider following build file:
Running build with command bee will run target all (default one) and produce following output:
This output indicates running targets (capitalize and hello in this case). Terminating OK indicates that no error was met and thus build is OK. If an error occurs, build ends with an error message and bee process exits with an error value.
Build file name defaults to build.yml in current directory. You may override this default value using -f file option. Thus, to run build file other.yml, type bee -f other.yml. You can also look for build file recursively in file system using -r option. So, typing bee -r will look for build file named build.yml in current directory. If no build file was found, it will look in parent directories recursively. Build fails if no build file was found. You can use -r and -f file options at the same time to search an alternate file recursively.
To produce verbose output running builds, use -v option. This will write build file used, executed tasks and execution time. Furthermore, this will output a stack trace (in addition to standard error message) when an error takes place, which is useful to debug Bee itself. Running previous build with verbose output would print:
The -n option produces the same verbose output but doesn't actually runs tasks, it just prints them.
To print help on usage, type bee -h. This outputs:
To print help on build file, use -b option. This will output build name and description, property names and values, target names and descriptions and default target. For our sample build file, this will print:
To get help on a given task, type bee -k task. Thus, to get help about print task for instance, you would type:
To get help about all tasks, type bee -k ?. To get help about all tasks in package foo, type bee -k foo.?.
To get help on templates, use the -e template option, with the same joker syntax than for task help. Thus, to get help about the package template, type bee -e package, which will output:
You can run a given template using option -t template. Templates are a way to quickly start a new project from scratch. They are quite comparable to Rails scaffoldings. For more information on using and developing templates, please see section Template Project of Developer Guide.
You can set text properties on command line with option -p foo=bar, setting property foo with value "bar". You can set more than one property this way. For instance, launching following empty build file with command line bee -b -p foo=1 bar=2:
Will output:
When you run bee in a color terminal (such as the Terminal application on MacOSX or XTerm on Linux), you can get a colorized output using -c command line option. This will use the standard color scheme for bee. To customize your output, you can apply a style to output using -s style option. In the terminal bellow, we run a build with default black and white style and then applying the default color style:
Style are applied outputting ANSI colors and styles for Unix terminals and thus won't run on Windows machines. Styles are defined as coma separated key/value pairs. Keys are the following:
| Key | Description |
|---|---|
| lc | Character for target title (defaults to dash -). To set space,
set to an empty value, such as: ...,lc:,... as there should
not be spaces in style option (this would break command line parsing). |
| ll | Line length. If not set, will try to determine it calling IOCTL function. If this call fails, will set line length to 80 characters. |
| ts | Target style. |
| tf | Target foreground. |
| tb | Target background. |
| ks | Task style. |
| kf | Task foreground. |
| kb | Task background. |
| ss | Success style. |
| sf | Success foreground. |
| sb | Success background. |
| es | Error style. |
| ef | Error foreground. |
| eb | Error background. |
Possible foreground and background colors are the following ones: black, red, green, yellow, blue, magenta, cyan and white. Styles are the following ones: bright, dim, underscore, blink, reverse and hidden.
If a given key is not set, it will keep its default value. The Bee
options environment variable BEEOPT
is the best place
to set you style settings (see section
Configuration hereafter). Note that you
can force black and white output using the -w options. This
is useful to run bee in a software that doesn't manage ANSI color codes
while color is set in your BEEOPT environment variable.
You can print the Bee logo on command line with option -l:
On Unix platforms, you can enable Bee completion in the terminal. To do so, you must copy the script bash_completion_bee (that you will find in the bin directory of the gem, use commands sudo updatedb and locate bash_completion_bee to locate it in your file system) or download it from http://sweetohm.net/bee/downloads/bash_completion_bee) in directory /etc/bash_completion.d/, rename it bee and make it executable (with command sudo chmod +x /etc/bash_completion.d/bee).
Then add the following lines in your shell startup file (that is ~/.profile, ~/.bashrc or such a configuration file):
# Bee completion . /etc/bash_completion.d/bee
Next time you open a terminal, completion should have been enabled for long options (starting with --), build target names, help about tasks and templates:
$ bee --help[TAB] --help --help-build --help-task --help-template $ bee t[TAB] tag test $ bee -k c[TAB] cat cd chmod chown copy cp $ bee -e s[TAB] script sinatra source
On MacOSX, bash doesn't have completion feature out of the box. Thus, you will have to install bash_completion yourself. You may use Fink (typing fink install bash-completion) or MacPorts (typing port install bash_completion) for that purpose. To get more information about installation bash_completion on MacOSX, please visit this page.
Bee doesn't load configuration file at startup, but you can set
command line options in environment variable BEEOPT
that
is appended on command line at startup. For instance, setting:
BEEOPT="-v"
Would always run Bee in verbose mode.
Let's consider following simple build file:
This is a YAML file and thus follows standard YAML syntax. We won't detail the YAML syntax hereafter but instead see a useful subset to write Bee build files.
You might think of YAML as a data aware text file format. Let's see a grocery list in YAML:
Let's write a short Ruby script that would load this file and print loaded data:
Let's run this script passing our grocery list on command line:
We see that the script loads this file as a Ruby list of strings. Thus, writing a list with dashes (as we would do for our grocery list) results in a list while loaded.
Let's write a list with associated quantities:
Let's run our script on this file:
This results in a Ruby Hash! Note that there are short syntax for list and hash, that happens to be very close to Ruby (and Python) syntax:
But YAML is also aware of data types: in our hash, strings are associated to integers. When we write an integer, YAML parser recognizes it and returns an integer instead of a string. YAML is also aware of floats, booleans, dates and symbols. For instance:
Would be parsed as:
You might wonder how we can write string 123 as it would be recognized as an integer. In this case, you can force string type using quotes, writing "123". The form without quotes is a convenient way to write YAML strings. Note also that null is parsed into nil and thus is not a valid name for targets.
Now, you might ask how to nest a structure within another one. This is done with indentation. For instance, to write a list within another one, you might write:
This will be parsed into:
Here is hash nested in a list:
That will be parsed into:
This YAML syntax is very powerful, yet simple. This enables to write complicated data structures in a human readable form. We'll now see how it is used to write build files.
A build file is a list of entries. An entry might be of the following type:
Let's detail each entry type.
Let's see a sample build information entry:
This entry is a hash with following keys:
This entry is optional but you can't have two of them in a given build file.
This is a hash of build properties, such as in this build file:
Properties are a hash made of name / value pairs. The name must be a valid Ruby variable name and must not collide with a function in the Ruby context. For instance, following build file:
Will result in a parsing error because evaluating Ruby expression 12three = 123 will output:
While loading build file, properties are evaluated as Ruby expressions in the build context. Thus, a property such as foo: 123 will result in evaluating foo = 123 in the build context.
Strings are also evaluated as Ruby strings, thus they can refer to other variables (using Ruby #{variable} syntax), or any Ruby expression, such as in this build file:
Will output:
You can refer to another variable using symbol notation. For instance, in this build file:
We refer to value of build property foo using symbol :foo instead of using the string evaluation. The result is the same for strings but not for other property types.
Property values are not limited to strings. You might assign any YAML data type to a build property. This might be useful when using these properties in Ruby scripts or Bee tasks that expect a given type (such as lists for instance).
It is also possible to load properties from a YAML file containing a list of properties to set. You would define such a properties file as following:
You would load these properties such as in:
You give the absolute or relative (to the build file directory) path to the properties file. Printing help on this build file would output:
Which shows that properties we define in our YAML properties file were set in the build context.
Note that if you define a given property twice in your build file, the last value will be kept. Properties you pass on command line (with option -p) overwrite build file properties and are defined after build file loading.
When running, Bee automatically defines two properties:
Following build file:
Outputs (depending of the directory you're running script into):
These properties are useful to get an absolute path for a file in your project. For instance, absolute path for file lib/bee.rb relatively to your build file may be obtained with property abs_path = "#{base}/lib/bee.rb". Note that base and here might have different values. Furthermore, these two property names are reserved for Bee usage and you can't name your own properties base or here.
A build target is a hash with following keys:
Here is a sample build file with two targets:
This will output:
It runs first target test as there is no default target (no build information entry is defined) and target test is the first one of this build file. But this target depends on hello, thus it runs hello then test. You can tell Bee to run a given target passing its name on the command line. Thus, to run target hello, you can type:
Note that you can't define two targets with the same name. If so, Bee will complain about duplicate target definition.
depends key may also be a list. In this case, all depending targets will run first. Note that a given target won't run twice, if already executed, it will be skipped.
script key is a task or list of tasks to run to perform this target. A task may be:
Shell tasks are shell scripts in strings. For instance, to output Hello World!, one might write:
Each shell script runs in its own process, thus following build file:
Might not output what you expect:
This is because second line of script runs in another process than the first one, thus it doesn't old any value for environment variable WHO. To implement expected behavior, you should write:
Which will define the script in a single string and run it in a single process, keeping value you assigned to the environment variable and thus behave as expected:
You can access build properties in shell scripts using the Ruby notation:
While running a shell script, Bee replaces strings #{expression} with the result of the expression evaluation in the build context. Thus, you can use a Ruby expression instead of a simple string reference. For instance, to get the uppercase value of string who, one might write:
This will output:
These shell tasks are convenient, but you should keep in mind that they bind your build with a given operating system. To make your build independent of any platform or OS, you should use instead Ruby or Bee tasks we'll see now.
They are pieces of Ruby scripts embedded in your build file and evaluated in the build context. In this context live build properties and scripts you loaded in the build context using the context key of the build entry of the build file (see section Build context hereafter for more details).
For instance, to print the list of targets for a given build file, one might write following build file:
That will print:
Note that when we change directory in a given Ruby task, this directory will stay current one until the end of the current target. Furthermore, you can access build properties because they are local variables for your Ruby script. The same way, all local variables you define in your script are build properties. Thus, you must be careful to avoid collisions with properties, using prefixed names for local variables you don't want to expose as properties, such as _foo.
Ruby tasks are not the right place for long ruby scripts because you are writing these scripts in a YAML file, you won't probably benefit from your editor's facilities for editing Ruby files. Furthermore, long Ruby tasks may make your build files less readable. Thus, you should put long ruby scripts in a separate Ruby source file and load it in the context key of the build entry of your build file.
These tasks are coded in Ruby and called using a YAML syntax. We have already seen print task that prints a message on the console:
This will output:
There are Bee tasks for many common tasks to build a project. To get help on usage of these tasks, please see Tasks Reference section of the documentation.
These tasks are the best solution to write platform and OS independent build files. You can write your own tasks in Ruby, see section Writing Bee Tasks in Developer Guide for more information on this topic.
In addition to tasks, a target can include control structures such
as if
, while
or for
to control
tasks execution.
If construct will evaluate the Ruby expression in the if
entry and run block in the then
entry or else
entry accordingly.
if
: the condition to evaluate. This is a Ruby expression
evaluated in the build context.then
: block that is evaluated if confition in if is true.else
: block that is evaluated if confition in if is false.For instance, to test hardware platform, you might write:
Which would produce, as expected:
While construct will run the block in the do
entry
while the Ruby condition in the while
entry is true.
while
: the condition to evaluate. This is a Ruby expression
evaluated in the build context.do
: the block to run while the condition is true.For instance, to iterate five times, you could write:
Which would produce, as expected:
For construct iterates on a list in the in
entry,
putting values in a property which name is in the for
entry
and running the block in the do
entry for each value.
for
: the name of the property which receives values of the
iteration.in
: a list on which to iterate. This can be a list or a ruby
expression to evaluate in the context of the build to obtain the Enumerable
on which to iterate.do
: the block to run at each iteration.For instance, to iterate on a list of files to create, you could write:
Which would write on console:
In this previous example, the in
entry was a list; in this
case, Bee iterates on this list. You can also put a Ruby expression (which
is a string) in the in
entry. Bee will then evaluate this
expression, that must produce an Enumerable, and iterate on it. For instance,
to iterate five times, we could write (using a Ruby Range):
Which would output, as expected:
To iterate on files in current directory, we could write:
This last construct is for error management. It will run the block in the
try
entry and catch any error that might occur. If an error
occurs, instead of stopping the build, it will run the block in the
catch
entry.
For instance, to test if a given command exists in the system your building on, you might write:
Which would output, as expected:
Note that these constructs are not tasks, but you can get help about
them the same way you get help about tasks. For instance, typing
bee -k for
will print on console help about the
for
construct.
Control structures won't run in dry mode to avoid any side effect
evaluating Ruby expressions in if
, while
,
for
or in
entries. Thus, while running builds
in dry mode, control structure will be printed but tasks inside them won't
as you might expect.
The build context is the place where build properties and Ruby tasks are evaluated. It can be initialized with Ruby source files you put in the context key of the build entry of your build file.
Let's say you often use a greeting function. You can put it in a Ruby source file:
You would load it in context with following build file:
When this build file is loaded, it evaluates the Ruby source in context key in the build context. This will define function say_hello(who) in the context. Ruby task will then call this function with say_hello(who) expression.
You can think of the build context as the IRB workspace where context scripts would be loaded, properties defined and Ruby tasks evaluated.
From release 0.5.0, Bee implements build inheritance. This feature enables to extend one or more build files in another one, overwriting properties and overloading targets. There can be no collision in properties and targets of inherited build files. Note that a build file can be marked as abstract which means that it must have been extended to run.
Build properties overwrite existing ones in parent build file. Thus, let's say you write this parent build file:
Then, in a son build file, you write:
We tell Bee that this script extends another one with extends key in build entry. Furthermore, property foo is redefined with new value bar.
Running extending build file will print:
Targets are not replaced with those you define in extending build, but overloaded instead. This means that a target you define in an extending build file will be called, but this target can call same target defined in parent build using super in a script.
Let's consider this parent build file:
We extend it with:
Running extending build will display:
Thus, calling super, you can patch existing target, adding tasks before and/or after running parent target. Not calling super, you can overwrite parent target altogether.
Default targets are appended with inheritance. Thus, if parent build file A defines target a as default target and B defines b as default target, then a build file that extends A and B would have a and b as default targets. Furthermore, if a given build file defines default targets, it overrides default ones in parents. Thus if previous build file that extends A and B defines its own default targets, it will ignore those defined by parents.
Behavior is similar for aliases : they are appended (for a given entry) and overridden by aliases in extending build file.
Build inheritance is very handy when all your projects share a common structure and thus should have a common build file. You can write this common build file as a parent for children that will customize it in each project. This is a way to enforce a standard but add flexibility by specialization.
You can also use inheritance to assemble specialized build files to perform specific targets. For instance, you might write a build file to build your distribution archive, another one to manage your Python code, another one to manage your release (tagging project and sending emails), and so on. Your project would then assemble these parts extending them and behaving as a scheduler to perform the job.
Let's say you want to build all you projects in the 'build' directory and always write the same code to clean this directory. You might use the following file as a parent build file:
You would use this parent in your build file writing:
This build file overwrites the build property with appropriate value target and uses the clean target to delete build directory and delete generated files.
To avoid name collisions between build files, you should use prefixes on property and target names. For instance, in a parent build file named python.yml, you could prefix the property and target names with py so that py_src would not collide with another named java_src for instance.
Here are quick hacks to use Bee in Emacs and Eclipse. Please feel free to contribute any improvement or any editor or IDE integration, it will be integrated or listed in next release.
Here is a piece of configuration to put in your .emacs file to integrate Bee in Emacs:
To run a compilation, hit F6. The mini-buffer prompts for a target to run (you can browse history hitting up or down arrows). Then hit ENTER to run the build. Build file is searched recursively, thus you can launch build from any buffer in your project. Note that you can also use target prompt to type any command line option. For instance, to get help about current build, type -b as command line option.
A simple way to integrate Bee in Eclipse is to use External Tools menu. Click on External Tools... item in this menu and the following dialog box will appear:
This configuration will launch Bee in the project home directory, which is a reasonable guess in much cases. You may have to adjust Bee location path according to your configuration.
Following configuration will ask for the task to run, opening a pop-up where you can type it:
Running Bee this way will output build result in Console window:
Bee can be easily integrated in IDEA as an external tool. Open settings (in menu File/Settings) and add a new tool with the + button. You can add an entry to start Bee with default target with following settings:
To add an entry that opens a dialog to prompt for target to run:
Enjoy!


#include "_doctype.html"
Join our merry team of developers or read the archive of previous postings.
Subscribe to the libcurl mailing list, hurry over to the subscription page. This mailing list is meant for developers that use or plan to use libcurl in their applications.
Subscribe to the curl-and-php mailing list, at subscription page. This mailing list is meant for PHP programmers that use the curl module.
If you're into general curl stuff, you'll be better off on the curl-users mailing list. #include "_footer.html"


After Create Project we have a HelloWorld cocos2dx project now. Let's take a brief tour of it.
The 5 pictures is need by metro style app.
Logo.png
SmallLogo.png
SplashScreen.png
StoreLogo.png
WideLogo.png
In essence, we are writing a metro applications, so in accordance with the metro app development standards, our program is to start from the main function in main.cpp.
[Platform::MTAThread]
int main(Platform::Array<Platform::String^>^)
{
try
{
AppDelegate app;
auto frameworkViewSource = ref new CCApplicationFrameworkViewSource();
Windows::ApplicationModel::Core::CoreApplication::Run(frameworkViewSource);
}
catch(COMException^ e)
{
switch (e->HResult)
{
case kCCExceptionNoSupportDX11:
// no video card support DirectX 11
CCMessageBox("You don't have any video card support DirectX 11.", "Error");
break;
default:
break;
}
}
return 0;
}
The AppDelegate is a subclass of CCApplication. In cocos2dx, a instance of CCApplication responses to initialize some global resources and manage application life circle.
virtual bool initInstance();
/**
@brief Implement CCDirector and CCScene init code here.
@return true Initialize success, app continue.
@return false Initialize failed, app terminate.
*/
virtual bool applicationDidFinishLaunching();
/**
@brief The function be called when the application enter background
@param the pointer of the application
*/
virtual void applicationDidEnterBackground();
/**
@brief The function be called when the application enter foreground
@param the pointer of the application
*/
virtual void applicationWillEnterForeground();
In AppDelegate::initInstance() we create view and set the design resolution.
mainView->setDesignResolution(480, 320);
In AppDelegate::applicationDidFinishLaunching(), we get the CCDirector and start run our first Scene(HelloWorldScene). So the AppDelegate is the real enter point of the game.
bool AppDelegate::applicationDidFinishLaunching()
{
// initialize director
CCDirector *pDirector = CCDirector::sharedDirector();
pDirector->setOpenGLView(&CCEGLView::sharedOpenGLView());
// turn on display FPS
pDirector->setDisplayFPS(false);
//pDirector->setDeviceOrientation(kCCDeviceOrientationLandscapeLeft);
// set FPS. the default value is 1.0/60 if you don't call this
pDirector->setAnimationInterval(1.0 / 60);
// create a scene. it's an autorelease object
CCScene *pScene = HelloWorld::scene();
// run
pDirector->runWithScene(pScene);
return true;
}
Now, let's talk HelloWorldScene.
HelloWorldScene key method is init(), is to build the various elements in the scene. Each time you create the element will use the this->addChild() function to insert, that is placed the element in this scene, the second parameter is the draw order.
bool HelloWorld::init()
{
//////////////////////////////
// 1. super init first
if ( !CCLayer::init() )
{
return false;
}
CCSize size = CCDirector::sharedDirector()->getWinSize();
// 2. add a label shows "Hello World"
// create and initialize a label
CCLabelTTF* pLabel = CCLabelTTF::labelWithString("Hello World", "Arial", 24);
// ask director the window size
// position the label on the center of the screen
pLabel->setPosition( ccp(size.width / 2, size.height - 50) );
// add the label as a child to this layer
this->addChild(pLabel, 1);
// 3. add "HelloWorld" splash screen"
CCSprite* pSprite = CCSprite::spriteWithFile("HelloWorld.png");
// position the sprite on the center of the screen
pSprite->setPosition( ccp(0, 0));
pSprite->setAnchorPoint(ccp(0,0));
// add the sprite as a child to this layer
this->addChild(pSprite, 0);
return true;
}


待收本金(元) {{::detail.info.remainPrincipal | currency:''}} {{::detail.pick.pickSum | currency:''}}
剩余期限 {{::detail.info.remainExpect}}期 {{::detail.pick.pickMin}}~{{::detail.pick.pickMax}}期
待收利息(元) {{::detail.info.remainInterest | currency:''}} {{::detail.pick.pickEarnings | currency:''}}


--- layout: post status: publish published: true title: Cubs Scrimmage in Mesa author: display_name: Corey Fineran login: Corey email<EMAIL_ADDRESS>url: '' author_login: Corey author_email<EMAIL_ADDRESS>wordpress_id: 8211 wordpress_url: http://ivyenvy.com/?p=8211 date: '2013-02-21 18:50:03 +0000' date_gmt: '2013-02-22 00:50:03 +0000' categories: - Spring Training tags: - Mesa - Nick Struck - Hohokam Stadium - Jorge Soler - Intra-Squad Scrimmage comments: [] ---
After what actually seemed like a pretty short off-season, (fake) Cubs baseball is back! The Cubs had a intra-squad scrimmage at Hohokam Stadium on Thursday. Here's how the team was split up:
White Team
DeJesus CF
Castro SS
Rizzo 1B
Soriano LF
Schierholtz RF
Navarro C
Stewart 3B
Barney 2B
Hairston DH
Blue Team
Valbuena 2B
Sappelt CF
Castillo C
Nelson 1B
Soler LF
Baez SS
Lake 3B
Jackson RF
Bogusevic DH
The White team bested the Blue team, 7-3. Starlin Castro went 3-3 in the game, but the highlight of the game was a HR hit by #3 Prospect Jorge Soler. We are having trouble embedding videos on our site.
It is encouraging the see one of the highly-touted prospects perform well. But what do we really learn from that hit? Soler can tattoo Nick Struck-caliber pitching.
The Cubs will have another scrimmage at Hohokam tomorrow and then open Spring Training games on Saturday vs. the Angels.


I was thinking to write a blog post about adding disqus to jekyll, but i found this blog post -> perfectly documented blog.
Thank you!


Affinity-driven peptide selection of an NFAT inhibitor more selective than cyclosporin A[ see comments] The flow of information from calcium-mobilizing receptors to nuclear factor of activated T cells (NFAT) -dependent genes is critically dependent on interaction between the phosphatase calcineurin and the transcription factor NFAT.
Abstract
A high-affinity calcineurin -binding peptide was selected from combinatorial peptide libraries based on the calcineurin docking motif of NFAT. This peptide potently inhibited NFAT activation and NFAT -dependent expression of endogenous cytokine genes in T cells, without affecting the expression of other cytokines that require calcineurin but not NFAT. Substitution of the optimized peptide sequence into the natural calcineurin docking site increased the calcineurin responsiveness of NFAT. Compounds that interfere selectively with the calcineurin -NFAT interaction without affecting calcineurin phosphatase activity may be useful as therapeutic agents that are less toxic than current drugs.


Light probes are an alternative way of adding light to a 3D scene. Unlike classical light sources (e.g. directional, point or spot lights), light probes do not emit light. Instead they store information about light passing through 3D space. During rendering, the light that hits a 3D object is approximated by using the data from the light probe.
Light probes are usually created from (radiance) environment maps. The class [page:LightProbeGenerator] can be used to create light probes from instances of [page:CubeTexture] or [page:WebGLCubeRenderTarget]. However, light estimation data could also be provided in other forms e.g. by WebXR. This enables the rendering of augmented reality content that reacts to real world lighting.
The current probe implementation in three.js supports so-called diffuse light probes. This type of light probe is functionally equivalent to an irradiance environment map.
[example:webgl_lightprobe WebGL / light probe ]
[example:webgl_lightprobe_cubecamera WebGL / light probe / cube camera ]
[page:SphericalHarmonics3 sh] - (optional) An instance of
[page:SphericalHarmonics3].
[page:Float intensity] - (optional) Numeric value of the light probe's
intensity. Default is `1`.
Creates a new [name].
See the base [page:Light Light] class for common properties. The [page:Light.color color] property is currently not evaluated and thus has no effect.
Read-only flag to check if a given object is of type [name].
A light probe uses spherical harmonics to encode lighting information.
See the base [page:Light Light] class for common methods.
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]


| < Day Day Up > |
Hack 27 Log a Headless Server Remotely
More on headless systems, but this time from the NetBSD perspective. We've already seen in [Hack #26] that it's important to have an alternative method for connecting to a headless server. It's also important to be able to receive a headless system's console messages. This hack will show how to configure both on a NetBSD system. 3.5.1 Enabling a Serial ConsoleIf you have another machine close to your headless server, it may be convenient to enable the serial console so that you can connect to it using a serial communication program. tip, included in the base system, and minicom , available through the packages collection, allow you to handle the server as if you were working on a real physical console. To enable the serial console under NetBSD, simply tell the bootblocks to use the serial port as the console; they will configure the kernel on the fly to use it instead of the physical screen. You also need kernel support for the serial port device, which is included in the default GENERIC kernel. However, changing the bootblocks configuration is a bit tricky because you need write permissions to the raw root device. As we are talking about a server, I assume the securelevel functionality is enabled; you must temporarily disable it by adding the options INSECURE line to your kernel. While in the kernel configuration file, double-check that it includes serial port support. Then, recompile your kernel. Once you have access to the raw partition, update the bootblocks using the installboot utility. The process depends on the NetBSD version you are using. If you are running 2.0 or higher, use the command shown next. Replace the bootxx_ffsv1 file with the one that matches your root filesystem type; failure to do so will render your system unbootable. # /usr/sbin/installboot -o console=com0 /dev/rwd0a /usr/mdec/bootxx_ffsv1 If you are running 1.6, use the following command instead: # /usr/mdec/installboot /usr/mdec/biosboot_com0.sym /dev/rwd0a When done, rebuild your kernel without the options INSECURE line to reenable securelevel. You can also remove the console drivers wscons and pccons to reduce the kernel size, though you must keep the serial port driver.
3.5.2 Setting Up the Logging ServerEven if you have configured a serial console, you won't always be connected to it. Therefore, it is very convenient to redirect important console messages to another machine that has a physical screen connected to it. syslogd lets you do this. Start by allowing incoming syslogd connections on the machine that will be receiving log messages. (I call mine logger.local.) To do this, add the following lines to /etc/rc.conf: syslogd=YES syslogd_flags= The first option is not really needed, as syslogd is enabled by default. The second option overrides the secure (s) flag that otherwise would be passed to the daemon through /etc/defaults/rc.conf. This flag tells syslogd not to listen on a UDP socket, and in this scenario we want to receive log messages over the network. Then, restart the daemon: # /etc/rc.d/syslogd restart logger.local can now receive incoming syslogd connections from any host. If required, you can restrict this by using the built-in firewall, ipf. 3.5.3 Setting Up the Headless SystemYou are ready to configure your headless server to send messages to the logger machine. As an example, we are going to redirect all messages that are actually sent to the serial console to logger.local. Open /etc/syslog.conf in your favorite editor. You will notice that the first uncommented line directs messages to /dev/console. Append the @logger.local string to it, separated by a comma. After the changes, you should end up with something like: *.err;kern.*;auth.notice;authpriv.none;mail.crit<EMAIL_ADDRESS>Repeat for any other categories you want to redirect. When done, restart syslogd as shown earlier. 3.5.4 Shutting Down the Server Using wsmoused
If you are running a headless system at home, you may want to shut it down at night. You could do this by sshing into the server and executing shutdown manually, but this requires a second system. However, since you have physical access to the headless system, you can simply use wsmoused, which will let you execute two or three commands from a mouse—one for each mouse button. wsmoused's "action mode" lets you assign commands to mouse buttons. Here's a sample configuration file to shut down and reboot the machine, which you can copy to /etc/wsmoused.conf: device = /dev/wsmoused; modes = action; mode action { button_0_down = "shutdown -p now"; button_2_down = "shutdown -r now"; } Here I've mapped the left mouse button, 0, to the command that will halt the system and the right mouse button, 2, to the command that will reboot the system. (The middle mouse button is 1.) Since I don't plan on using this mouse for its usual input functions, such as copy and paste, this is a really convenient way to power off the system quickly and safely. Enable the startup of wsmoused at boot time: # echo "wsmoused=YES" >> /etc/rc.conf
3.5.5 Beep on HaltSome headless servers don't support APM or ACP, so the kernel can't power them down automatically. The i386 architecture has another option: beep on halt. It beeps the speaker multiple times when it is safe to power off the machine after a successful halt. To enable this feature, add the following line to your kernel configuration file and rebuild it: options BEEP_ONHALT In case you do not like the default tone, you have several other options. Here they're shown with their default values: options BEEP_ONHALT_COUNT=3 # Times to beep options BEEP_ONHALT_PITCH=1500 # Default frequency (in Hz) options BEEP_ONHALT_PERIOD=250 # Default duration (in msecs) 3.5.6 See Also
|
| < Day Day Up > |


Just a nerd who found his data calling and now I spend most of my time learning how to better utilize data to unearth insights to work smarter
Depending on your business's need, my solutions may include the following:
✅ Custom, web-based, interactive data 𝐃𝐀𝐒𝐇𝐁𝐎𝐀𝐑𝐃𝐒 and 𝐖𝐄𝐁𝐀𝐏𝐏𝐒
✅ 𝐁𝐔𝐒𝐈𝐍𝐄𝐒𝐒 𝐈𝐍𝐓𝐄𝐋𝐋𝐈𝐆𝐄𝐍𝐂𝐄, data analytics, and data visualization
✅ 𝐃𝐀𝐓𝐀𝐁𝐀𝐒𝐄 design, development, and management
✅ ETL data pipelines and 𝐃𝐀𝐓𝐀 𝐀𝐔𝐓𝐎𝐌𝐀𝐓𝐈𝐎𝐍
✅ 𝐃𝐀𝐓𝐀 𝐄𝐗𝐓𝐑𝐀𝐂𝐓𝐈𝐎𝐍 and 𝐖𝐄𝐁 𝐒𝐂𝐑𝐀𝐏𝐈𝐍𝐆
✅ 𝐀𝐏𝐈 & database integration, 𝐀𝐏𝐈 development
✅ Data integration with third-party software (Shopify, SalesForce, GA, Facebook, Quickbooks, etc.)
✅ Machine learning and AI
✅ Financial modeling, spreadsheet conversion
✅ Data management


Save a sequence of still images to disk with a single function call and data frame.
save_seq(data, style = "map", use_mclapply = FALSE, mc.cores = 1L, ...)
| data | a data frame containing networks, tiles, lines or polygons information. |
|---|---|
| style | character, must be |
| use_mclapply |
|
| mc.cores | integer, the number of CPU cores requested for parallel processing, passed to |
| ... | additional arguments passed to |
usually returns NULL after writing files to disk. May optionally return a list of ggplot objects with or without the file writing side effect.
save_seq
is a convenient wrapper function for save_map
and save_ts
. It provides some moderate generality and abstraction
by moving the most proximal aspects of data preparation inside the function, i.e., breaking a data frame into a list of data frame subsets by plot ID
and passing each explicitly to iterative calls to either save_map
or save_ts
.
The option for parallel processing on Linux systems (by forking with parallel::mclapply
) is also part of save_seq
.
Using mclapply
was chosen for convenience and may be changed in a future package version.
It does not save much in the way of gross typing, but calling a single wrapper function, passing mostly the same arguments,
and not having to explicitly call save_map
or save_ts
withing the context of map
or walk
calls is arguably
cleaner, simpler, and less complex for some use cases.
The additional arguments ...
passed to save_map
or save_ts
are required, not optional.
Any call to save_seq
will consist mostly of these arguments.
It is best to first make sure you can successfully call save_map
and save_ts
directly. Then try this wrapper function.
See the intoductory vignette for details: browseVignettes(package="mapmate")
.
# NOT RUN { library(dplyr) library(purrr) data(annualtemps) temps <- mutate(annualtemps, frameID = Year - min(Year) + 1) %>% group_by(Year, frameID) %>% summarise(z=mean(z)) xlm <- range(temps$Year) ylm <- range(temps$z) # should specify a dir or set working dir for file output # consider running over a smaller subset of frame IDs save_seq(temps, style="tsline", x="Year", y="z", id="frameID", col="blue", xlm=xlm, ylm=ylm) # }


Grain size (in μm):
Flow Stress (MPa):
Flow stress calculated with the Stipp et al. (2003) paleopiezometer and the Holyoke et al. (2010) correction.


ISAIAH
1
1 The Vision of Isaiah son of Amoz, that Yahweh showed him about Judah and Jerusalem during the years of Uzziah, Jotham, Ahaz, and Hezekiah, kings of Judah.
2 Hear, O heavens, and listen, O earth, because this is what Yahweh said:
"I have raised people since they were born,
but they have rebelled against me.
3 Oxen know their owners,
and donkeys know who feeds them,
but Israel does not know;
Israel does not understand."

They have left Yahweh,
the Holy One of Israel.
They have turned away from him.
5 Why do you do things for which Yahweh should punish you?
Why do you continue to rebel against him?
You are like someone whose
whole mind and heart are sick.
6 From the bottom of the foot to the top of the head,
nothing is healthy.
There are open wounds, cuts, and sores
that have not been cleaned or bandaged,
and no one has put oil on them to heal them.
7 Enemies have ruined your country;
they have burned your towns, and there is no one left.
Foreigners plunder the crops in your fields while you watch;
they destroy everything that they see.
8 The city of Jerusalem has become as small as a shepherd's hut.
It is like a shelter in a vineyard;
it is like a watchman's hut in a field of melons.
It is a city surrounded by its enemies who are waiting to attack it.
9 If Yahweh, Commander of the angel armies, had not allowed a few of his people to survive,
we would have all been destroyed,
like the cities of Sodom and Gomorrah were destroyed.
10 Listen to what Yahweh has to say to you, you rulers of Sodom!
Listen to the law of our God, you people of Gomorrah!
11 "What do your many sacrifices mean to me?" says Yahweh;
"I do not want any more burnt offerings of rams, or the fat of bulls.

They are like a heavy burden that I am tired of carrying.
15 So when you lift up your hands to pray to me,
I will not look at you.

Stop doing things that are wrong!
17 Learn to do deeds that are good and
try to cause people to do what is just.
Help people who are oppressed and
defend orphans and widows when people take them to court."
18 Yahweh says, "You need to think about what you do.
Even though your sins are like scarlet red,
they will be as white as snow;
though your sins are like crimson red,
they will be as white as sheeps' wool.
19 If you are willing to obey me,
you will eat good food from the land.
20 But if you turn away from me and rebel against me,
your enemies will slaughter you."
That will happen because Yahweh said it.
21 At one time you people of Jerusalem faithfully worshiped only Yahweh,
but now you have become like prostitutes who are not faithful to any husband.

They all want to get money
and make others to give them gifts in order to decide cases in court in their favor.
They do not defend orphans in court,
and they do not help widows to get what they should receive.
24 Therefore Yahweh, Commander of the angel armies, the mighty God of Israel, says,
"I will get revenge against those who are against me,
and avenge myself on my enemies.
25 I will raise my fist to strike you,
and I will punish you severely,
as though you were silver and I needed to heat you very greatly to melt you and get rid of the impurities.
26 After that happens, I will give you good judges like you had in the past.
You will have wise counselors like you had long ago.
Then people will call your city a city where people act righteously,
a faithful city."
27 Because the people of Jerusalem will do what is fair,
Yahweh will restore their city,
and he will save those who repent
because of their righteousness.
28 But he will crush rebels and sinners,
and those who forsake him will disappear.
29 "You will be ashamed because you worshiped idols under the oak trees that you thought were sacred,
and you will be disgraced because you worshiped idols in the gardens that you loved so much.
30 You will be like a very large tree that has withered leaves,
like a garden that has dried up because it has no water.
31 Those among you who are very strong will become like dry wood,
and the work they do will be like a spark.
Both they and the evil things that they do will burn up,
and no one will be able to put out the fire."


I’ve been told I’m a bit of a “renaissance woman” and software development is my latest endeavor. After moving to Seattle WA in January 2020, I decided it was time to to start my new life fresh with an equally new career. I’m grateful to have the means to pursue this opportunity as my small-town, Florida-girl legs get used to all of the city’s hills and I try to wrap my head around not needing air conditioning in my apartment.
January 2018 - December 2019
July 2013 - August 2017
August 2015 - August 2017
Major: Pharmaceutical Sciences with a concentration in Forensic Drug Chemistry
Certificates: Forensic Toxicology and Veterinary Forensic Sciences
Elizabeth R. Chapin Research Fellow
August 2011 - May 2015
Majors: Chemistry and Anthropology
Minor: French
Certification: American Chemical Society
Work in Progress Website Exercises
We all have to start somewhere!
Unfinished (business) - Repository
A 2D RPG build as a team week project with four fellow classmates. We're still working on hosting the complete build, including the homepage that tells the controls! Move around the game with wasd or the keypad and press "J" to interact with the environment. (When in doubt spam "J" - we're also perfecting those hitboxes)
Languages: C# with the Unity Engine
React Rage Room - Repository
A JavaScript web app using React with Redux that accepts forum post data from users to display inputs on a message board. A user can increment upvotes and downvotes, dynamically changing the ranking of the posts on the page. Created pair-programming with Celeste Field.
Languages: JavaScript with React and Redux
Honeydukes - Repository
A web app with full CRUD functionality following RESTful conventions and MVC routes to add flavors and candy in a many to many relationship to a MySQL database. It also supports user authentication and authorization with Identity.
Languages: C# with ASP.Net Core, Entity Framework Core, and Identity with a MySQL database.
Check out my GitHub Profile for more!
As fulfilling as my work in toxicology was, ever since I finished my degree in chemistry there was a nagging sense that this was not where I belonged. I only began my pursuit of chemistry because a few friends were taking advanced classes in high school and I wasn’t sure what to pick. My path forward felt like an obligation. I was tethered to a choice I made at sixteen. Ever since I've been afraid to branch out, explore the unknown, and change. After a point I felt trapped. Was it too late to turn around and start over?
My breaking point was not getting the forensic toxicology job that I had lined up before moving to Seattle. There were not many other options and the weight of my failure was honestly nothing short of devastating. But, it also meant I was free. Free to finally run down a new path and move towards a new goal. One that felt more my own. The flexibility, the job opportunities, the diverse career possibilities. With a few tools at my disposal, a few languages under my belt, and an unyielding passion for problem-solving I am able to do anything. I can be anyone.
I've been dressing up as fictional characters and attending conventions since the summer of 2009.
The logic was "Halloween all the time? Sign me up!" And I haven't been able to stop since!
Wig Styling - Sewing - SFX Makeup - Prop Making
Click Here if you'd like to follow these personal adventures more closely!
I've been adhering to the Blogilates program on YouTube for almost five years now.
As a pretty inactive, awkward kid I never found exercises that appealed to me. Staying inside to read or play video games, and more importantly- escape the Florida heat, was always more appealing. I'm glad that I discovered something as an adult to keep me healthy, mentally and emotionally. It even meets the old indoors requirement!
I even started my own cosplay workout channel recently if you want to give a few videos a try!
I caught the travel bug from my partner Nick. His love of the outdoors and my passion for costuming has lead to some pretty interesting experiences! If you couldn't tell, I'm usually the one in the wig.
Now that we're on the west coast, our next big trip will hopefully be Japan! But it has been beautiful hiking around the PNW these last few months, and I can't wait to keep wandering around our new backyard.
Curiouser and curiouser!


Compilation: javac Heap.java
Execution: java Heap < input.txt
Dependencies: StdOut.java StdIn.java
Data files: https://algs4.cs.princeton.edu/24pq/tiny.txt
https://algs4.cs.princeton.edu/24pq/words3.txt
Sorts a sequence of strings from standard input using heapsort.
Heap(int) - Constructor for class com.example.colibris.multi.graph.Heap
Initializes an empty indexed priority queue with indices between 0
and maxN - 1.
The HyperConnection class represents a edge-weighted
hypergraph composed of vertices named 0 through V - where each
directed hypereedge is of type HyperEdge and is composed of a set of
inner-edges.


New Task
Details
Due Date
Section
Section
Offload
Active
Backlog
Create
Submit
Task Track
c
hello
http://www.good-work.com
Save


Jobs Directory works in four simple steps.
1- search:
It's Simple, On Jobs Directory homepage, enter the designation of the job you are looking for and click on search. Alternatively click on the search link on the top menu to view the list of all jobs available.
2- Locate
Get to see where the jobs are located by clicking on the company profile. It's even more exciting. You can get the directions from anywhere in the country.
3- Apply
Apply for jobs at the company of your choice, Click on the APPLY button to get the application form. We also follow up on the application to make sure you get a reply on time.
4- Relax
Once you get the job, you can now relax. You can check out our blog to see what we recommend when job hunting.
No need to take 3 Matatus to find a job in the country
Just press or click on the search button and You're all set
Find a job near youAnytime Anywhere Any way!
Very convenient platforms that cut across any device including our mobile ready web app and our mobile app coming soon to your app store.


| Location |
| The four streets surrounding the square are Colon, Av. Balta, San Jose, and Elias Aguirre. However, if you are going by taxi, any driver should know how to get you there. |
Things to See:
- Paseo de las Musas: From the Centro, walk or drive along Av. Balta until you see the beginning of the Paseo de las Musas: a Pantheon-looking structure that says “Heroica Ciudad de Chiclayo”. From here, the park goes to the right and is marked by beautiful landscaping and sculptures and ends with a small children’s playground. This area is very popular, and you will often find the locals here taking wedding or quinceañera pictures!
- Santa Maria Cathedral: Built in 1869, this beautiful cathedral is an icon of the city of Chiclayo. Take time to go in, admire the beautiful artwork, and even watch or take part in the Mass.
- Parades and Protests: Occasionally, parades and protests take place in Chiclayo, most of them starting or ending in the Centro. Most protests are peaceful, but you will need to take caution if you happen to be there at a time when one is going on. Though somewhat rare, they can be an interesting cultural experience when they happen.
- Some other fun things to do around the Centro include shopping, cafes, restaurants, karaoke, bars, and even just people-watching!


You are querying a 3rd party medical record system, they provide you two functions:
The system is a collection of medical records that you can only access it through index, but the problem is that the only information you have from the patient is ssn. So you have to find out what is the index of the medical record of person with that SSN. how the 3rd party system implement the contain function is not your concern, it maybe fast or slow, regardless, you need to minimize the times you call this function.
| SSN | NAME | Medical Condition |
|---|---|---|
Let's say a part of the system is accidentally ruined. all the records after index N is not accessible, and whoever refer to any index after N will not return until the system times out. to compensate the inconvenience, the system provider give you another authorization key. so in case you accidentally access some index after index N, you can still have one more shot of finding your medical record. so how would you find the medical record of SSN efficiently now? You don't know what N is.
| SSN | NAME | Medical Condition |
|---|---|---|


We are surrounded by stories. These stories affect our attitudes, beliefs, and form our entire perception of reality. Historically, stories are how humans have transferred knowledge from generation to generation. Everything a designer does will be in support of telling stories and by extension, shape the world we inhabit.
Storytelling has a long history as a mechanism of knowledge transfer and can be considered a rapid immersion in an experience: One cannot experience time travel, but one can gain knowledge about the act of time travel through a rich compelling, and highly experiential story.
– Jon Kolko
The goal of this lesson is not to teach you every facet and application of storytelling. Mastering this subject, as with most subjects, will take quite a long time. Instead, you will learn about common elements of storytelling, structural models, and methods for building stories that you can apply as a framework for most of what you create and communicate as a designer.
In this lesson, you will complete the following:


Based off the Gregorc Thinking Style Quiz, I am a Concrete Sequential Thinker. I learn best from starting at the bottom, and getting comfortable with every step before moving on to the next one. There has to be some format, or order, for me to look back on to really see my own progress. Though I tend to give in to unstructured learning quite a bit because of the 'new' factor. I like to learn by doing, and having hands-on at the same moment in order to better understand what parts I am still not getting.
So far the biggest issue I have had with Phase 0 is my time management. I have been practicing time-boxing but quite often I Ignore my timer and then burn myself out by becoming frustrated after not making any progress after, say, 2 hours. The only action I can take is to be more strict on myself with the time-boxing I use. Although, I did pair with someone after completing all the challenges just to give myself another point of view and practice my explanation skills (which are nearly non-existent). Helping someone through challenges helped me quite a bit in understanding the best way to approach a problem, because I would actually have to explain my reasons to someone else rather than just doing whatever works.
I am definitely branching out my mindset. I refuse to 'give-up'. I have been asking questions after about an hour of not being able to find the answer (which is a big improvement). I also try to help as much as I can, but always checking with others to make sure no wrong information gets passed. The way people approach a problem is always different, and I like being able to see how everyone does something because most likely, there is a way more efficient way.


Module dbus_proxy
Simple API around GLib's GIO:GDBusProxy built on top of lgi.
Info:
- Copyright: (2017) Stefano Mazzucco,(2018 - 2020) Stefano Mazzucco and contributors
- Release: v0.10.3
- License: Apache License, version 2.0
- Author: Stefano Mazzucco
and contributors
_proxy Functions
| Proxy | A proxy object
Proxy objects act as intermediares between your lua code and DBus. |
| Proxy:connect_signal (callback, signal_name[, sender_name]) | Connect a callback function to a signal. |
| Proxy:on_properties_changed (callback) | Call a function when the properties of the proxy object change. |
| Proxy:new (opts) | Create a new proxy object |
_bus Functions
| Bus | Available connections to the DBus daemon. |
_variant Functions
| variant.strip (v) | Strip an lgi.GLib.VariantType object of its types |
_monitored Functions
| monitored.new (opts[, cb]) | Create a monitored proxy object from the given options. |
_proxy Functions
- Proxy
-
A proxy object
Proxy objects act as intermediares between your lua code and DBus. All the properties, methods and signals of the object are exposed. Be aware that properties, methods and signals will likely be written in
CamelCase
since this it the convention in DBus (e.g.proxy.SomeProperty
orproxy:SomeMethod()
). Please refer to the documentation of the object you are proxying for more information.When a property in a DBus object changes, the same change is reflected in the proxy. Similarly, when a signal is emitted, the proxy object is notified accordingly.
Additionally, the following fields reflect the corresponding
g-*
properties:connection
: g-connectionflags
: g-flagsinterface
: g-interface-namename
: g-namename_owner
: g-name-ownerobject_path
: g-object-path
Some proxy methods may report errors (see the documentation of the object your are proxying). In that case you can check them with the usual error-checking pattern as shown in the usage example.
For all this to work though, the code must run inside GLib's main event loop. This can be achieved in two ways:
Create a main loop and run it when the application starts:
local GLib = require("lgi").GLib -- Set up the application, then do: local main_loop = GLib.MainLoop() main_loop:run() -- use main_loop:quit() to stop the main loop.
Use more fine-grained control by running an iteration at a time from the main context; this is particularly useful when you want to integrate your code with an external main loop:
local GLib = require("lgi").GLib -- Set up the code, then do local ctx = GLib.MainLoop():get_context() -- Run a single non-blocking iteration if ctx:iteration() == true then print("something changed!") end -- Run a single blocking iteration if ctx:iteration(true) == true then print("something changed here too!") end
NOTE
If you use the Awesome Window Manager, the code will be already running inside a main loop.
Usage:
p = require("dbus_proxy") proxy = p.Proxy:new( { bus = p.Bus.SYSTEM, name = "com.example.BusName", interface = "com.example.InterfaceName", path = "/com/example/objectPath" } ) res, err = proxy:SomeMethod() -- Check whether an error occurred. if not res and err then print("Error:", err) print("Error code:", err.code) end proxy:SomeMethodWithArguments("hello", 123) proxy.SomeProperty -- Asynchronous method calls are also supported, they have the "Async" -- suffix. For example: local function callback_fn(proxy, context, success, failure) if failure ~= nil then -- error from the DBus Method print("Error:", failure) print("Error code:", failure.code) -- add the data from the DBus method to the context context.failure = failure return end -- add the data from the DBus method to the context context.success = success end local my_context = {call_id = "my-id"} some_proxy:SomeMethodWithArgumentsAsync(callback_fn, my_context, "hello", 123) -- Do something else while waiting for the callback to be called with the -- result
- Proxy:connect_signal (callback, signal_name[, sender_name])
-
Connect a callback function to a signal.
Parameters:
- callback function a callback function to be called. The proxy object itself and the parameters from the signal as (simple lua types) will be passed to the callback when the signal is emitted
- signal_name string the name of the signal
- sender_name
string
the name of the sender. This may have the form
of a well known name (e.g.
"org.freedesktop.DBus"
) or a specific connection name ( e.g.":1.113"
). See also the Bus Names section of the DBus tutorial. If specified, only signals from this sender will be taken into account. (optional)
Usage:
proxy:connect_signal( function (p, x, y) assert(p == proxy) print("SomeSignalName emitted with params: ", x, y) end, "SomeSignalName" )
- Proxy:on_properties_changed (callback)
-
Call a function when the properties of the proxy object change.
Parameters:
- callback
function
a function that will be called when the
properties change. The callback will receive the proxy object itself and two
tables:
changed_properties
(a table where the keys are the properties that changed and the values the new values) andinvalidated_properties
(an array containg the names of the invalidated properties). Either may be empty. The local cache has already been updated when the signal is emitted, so the properties on the object will be up-to-date
Usage:
proxy:on_properties_changed(function (p, changed, invalidated) assert(p == proxy) print("******") print("changed properties:") for k, v in pairs(changed) do print("name", k, "ne value", v) end print("invalidated properties") for _, v in ipairs(invalidated) do print("name", v) end print("******") end)
- callback
function
a function that will be called when the
properties change. The callback will receive the proxy object itself and two
tables:
- Proxy:new (opts)
-
Create a new proxy object
Parameters:
- opts
table
table that specifies what DBus object should be proxied. The
opts
table should have the following fields:bus
: a DBus connection from the Bus tableinterface
: a (string) representing the interface namename
: a (string) representing the Bus namepath
: a (string) representing the object pathflags
: one of thelgi.Gio.DBusProxyFlags
; defaults tolgi.Gio.DBusProxyFlags.NONE
(optional)
Returns:
-
a new proxy object
- opts
table
_bus Functions
- Bus
-
Available connections to the DBus daemon. Fields on this table
can only be accessed. Trying to set fields will result in an error.
Fields:
- SESSION Connection to the session bus for this process
- SYSTEM Connection to the system bus for this process
- any_valid_dbus_address
Connection to the
DBus address.
If an invalid address is passed, its value will be
nil
.
Usage:
Bus = require("dbus_proxy").Bus system_bus = Bus.SYSTEM session_bus = Bus.SESSION -- This is a string that looks like -- "unix:path=/run/user/1000/bus" address = os.getenv("DBUS_SESSION_BUS_ADDRESS") bus = Bus[address] assert("Gio.DBusConnection" == bus._name) invalid1 = Bus["something really wrong"] assert(nil == invalid1) invalid2 = Bus.this_will_not_work assert(nil == invalid2)
_variant Functions
- variant.strip (v)
-
Strip an
lgi.GLib.VariantType
object of its typesParameters:
- v
lgi.GLib.VariantType
an
lgi.GLib.VariantType
object
Returns:
- numeric types will be returned as lua numbers
- booleans are preserved
- string are preserved,
- object paths (e.g.
/org/freedesktop/DBus
) will be returned as strings too - arrays (homogeneous types, signature
a
) and tuples (mixed types, signature()
) will be returned as lua arrays - dictionaries (signature
{}
) will be returned as lua tables
simple lua data (nested structures will be stripped too). The C to lua type correspondence is straightforward:
Usage:
GVariant = require("lgi").GLib.VariantType -- strip a nested variant v1 = GVariant("v", GVariant("s", "in a variant")) stripped1 = variant.strip(v1) -- "in a variant" -- strip a dictionary of variants v2 = GVariant("a{sv}", {one = GVariant("i", 123), two = GVariant("s", "Lua!")}) stripped2 = variant.strip(v2) -- {one = 123, two = "Lua!"} -- strip a nested array v3 = GVariant("aai", {{1, 2, 3}, {4, 1, 2, 3}}) stripped3 = variant.strip(v3) -- {{1, 2, 3}, {4, 1, 2, 3}, n=2}
- v
lgi.GLib.VariantType
an
_monitored Functions
- monitored.new (opts[, cb])
-
Create a monitored proxy object from the given options.
This function creates a monitored Proxy object that can come "live" as soon as the referenced DBus name is available.
When the name is available (i.e. connected), the object will have the exact same behavior as a normal Proxy object.
When the name is not available, the object will raise an error when trying to access properties or call methods of the Proxy object with the exception of the
name
property.Parameters:
- opts
table
options that specify the DBus object to be proxied. In
addition to the fields documented in Proxy:new, the optional
watcher_flags
can be set to eitherlgi.Gio.BusNameWatcherFlags.NONE
(the default) orlgi.Gio.BusNameWatcherFlags.AUTO_START
. The latter will ask the bus to launch an owner for the name if there is no owner when beginning to watch the name (see also the GBusNameWatcherFlags documentation on the GNOME website) - cb func A callback function called with two parameters: the proxy object, and a boolean that is true when the DBus name appears and false when it vanishes. (optional)
Returns:
is_connected
a boolean property that indicates whether the monitored proxy is actually connected. It can be checked before calling methods or accessing other properties on the object to avoid errors.
a Proxy object with extra properties:
See also:
Usage:
p = require("dbus_proxy") opts = { bus = p.Bus.SYSTEM, name = "com.example.BusName", interface = "com.example.InterfaceName", path = "/com/example/objectPath" } function callback(proxy, appeared) if appeared then -- proxy.is_connected is true proxy:SomeMethod() else -- proxy.is_connected is false end end proxy = p.monitored.new(opts, callback)
- opts
table
options that specify the DBus object to be proxied. In
addition to the fields documented in Proxy:new, the optional