F-AppendixB.Rmd
In this appendix, we present the instructions used in the two experiments. All instructions were originally in Norwegian and translated accordingly. Please note that the text in square brackets contains comments related to the experimental procedures. Comments in curly brackets, on the other hand, indicate for which set of subject the text below the comment applies to.
{The following text applies to all workers}
Introduction
Welcome to this research project! We very much appreciate your participation.
This is a study about the economics of decision-making. Several research institutions have provided funds for this research.
Payment
Your payment will consist of the participation fee plus the amount of bonus points that you accumulate throughout the study. Your initial endowment of bonus points amounts to 50 bonus points. The exact amount of bonus points that you receive will depend on your and/or others’ decision. At the end, each bonus points is converted into USD at a rate of 1 cent per bonus point.
Your bonus will be paid to you using the bonus system within a few weeks after the completion of this HIT. Your payment for taking the HIT will be sent to you shortly after the completion of this HIT.
Procedures
The study consists of two parts and you will be given instructions on your screen before every single part of the survey. Please always make sure to read the instructions carefully before you continue.
Participation
Participation in this research study is completely voluntary. You have the right to withdraw at anytime or refuse to participate entirely without jeopardy to future participation in other studies conducted by us.
Confidentiality
All data obtained from you will be kept confidential and will only be reported in an aggregate format (by reporting only combined results and never reporting individual ones). All submissions will be concealed, and no one other than the primary investigator will have access to them. The data collected will be stored in the HIPPA-compliant, secure database until it has been deleted by us.
Verification
At the end of this survey, you will be given a completion code. You will need to copy this code to the survey code field on the AMT web page that directed you here at the beginning.
Questions about the Research
If you have questions regarding this study, you may contact:
<EMAIL_ADDRESS>[The following text applies only to subjects who had to fulfill the work requirement]
In the first part of this study, we ask you to work on an assignment. After you are done with the assignments, a number of bonus points will be determined for you.
The first part of this study is followed by a redistribution phase and a set of general questions that will complete this study.
Please always make sure to read the instructions carefully before you continue.
[Description of the picture categorization task]
For the assignment, you will be working on a picture categorization task. You will see a picture on your screen and are asked to select the categories from the menu below the picture that you think fit to the picture and its content. You can select multiple categories from the menu if you think that the picture fits into that category as well.
Your answer will be submitted automatically after 30 seconds and you will be given a new picture. The task will last for 10 minutes and we ask you to work thoroughly with each picture.
[Picture categorization task starts and ends after 10 minutes]
[The following text applies only to subjects who had to fulfill the work requirement]
You have now completed the assignment. The next page will tell you how the bonus for the assignment will be determined.
[The following text applies only to subjects in the Baseline treatment with and without work requirement]
Your bonus points will be determined by a lottery in which you with equal probability can earn 800 bonus points or 0 bonus points. In the lottery, a ball will be randomly drawn from an urn containing an equal number of yellow and green balls. If a yellow ball is drawn, you will earn 800 bonus points, and if a green ball is drawn, you will earn 0 bonus points.
[The following text applies only to subjects in the Forced Choice treatment with and without work requirement]
Your bonus points will be determined in the following way. You can either choose to earn 25 bonus points or to let the amount of bonus points be determined by a lottery in which you with equal probability can earn 800 bonus points or 0 bonus points. In the lottery, a ball will be randomly drawn from an urn containing an equal number of yellow and green balls. If a yellow ball is drawn, you will earn 800 bonus points, and if a green ball is drawn, you will earn 0 bonus points.
[The following text applies only to subjects in the Forced Choice Strong treatment]
Your bonus points will be determined in the following way. You can either choose to earn no bonus points or to let the amount of bonus points be determined by a lottery in which you with equal probability can earn 800 bonus points or 0 bonus points. In the lottery, a ball will be randomly drawn from an urn containing an equal number of yellow and green balls. If a yellow ball is drawn, you will earn 800 bonus points, and if a green ball is drawn, you will earn 0 bonus points.
[The following text applies only to subjects in the Forced Choice Very Strong treatment]
Your bonus points will be determined in the following way. You can either choose to get 25 bonus points deducted from the amount of bonus points that you currently have or to let the amount of bonus points be determined by a lottery in which you with equal probability can earn 800 bonus points or 0 bonus points. In the lottery, a ball will be randomly drawn from an urn containing an equal number of yellow and green balls. If a yellow ball is drawn, you will earn 800 bonus points, and if a green ball is drawn, you will earn 0 bonus points.
[The following text applies only to subjects in the Nominal Choice treatment with and without work requirement]
Your bonus points will be determined in the following way. You can choose between two colors, yellow and green. Your choice of color will then determine the outcome of a lottery in which you with equal probability can earn 800 bonus points or 0 bonus points. In the lottery, a ball will be randomly drawn from an urn containing an equal number of yellow and green balls. If you chose the color of the ball that is drawn, you will earn 800 bonus points, if you choose the other color, you will earn 0 bonus points.
[Payment phase is concluded. Subjects answer a set of control questions before receiving information about how their final earnings are determined.]
[The following text applies to all treatments involving a work requirement and subjects who faced a lottery draw to determine earnings]
We will now explain how the final amount of bonus points is generated.
The total amount of bonus points you receive consists of the initial endowment plus what you earned for working on the assignment.
Initial Endowment
The initial endowment was 50 bonus points.
Assignment
For determining the earnings from the assignments, we will match you with another participant who has completed the same HIT. The payment to you and the other participant is then determined in the following way.
First, the outcome of the payment lotteries will be determined. Afterwards, a randomly selected third person who has not participated in this study will be given the opportunity to redistribute the earnings from the assignment between you and the other participant. This person will not know the identity of you or the other participant, but will be informed about the nature of the assignment and your earnings for this assignment.
If the third person chooses not to redistribute, each of you will be paid your earnings from the assignment. If the third person chooses to redistribute earnings, then each of you will be paid according to this decision.
[The following text applies to all treatments involving a work requirement and subjects who did not face a lottery draw to determine earnings]
We will now explain how the final amount of bonus points is generated.
The total amount of bonus points you receive consists of the initial endowment plus what you earned for working on the assignment.
Initial Endowment
The initial endowment was 50 bonus points.
Assignment
You will receive -25/0/25 bonus points for working on the assignment.
[The following text applies to all treatments without a work requirement and subjects who faced a lottery draw to determine earnings]
We will now explain how the final amount of bonus points is generated.
The total amount of bonus points you receive consists of the initial endowment plus what you earned from the lottery draw.
Initial Endowment
The initial endowment was 50 bonus points.
Lottery draw
For determining the earnings from the lottery draw, we will match you with another participant who has completed the same HIT. The payment to you and the other participant is then determined in the following way.
First, the outcome of the payment lotteries will be determined. Afterwards, a randomly selected third person who has not participated in this study will be given the opportunity to redistribute the earnings between you and the other participant. This person will not know the identity of you or the other participant, but will be informed about the earnings from the lottery draw.
If the third person chooses not to redistribute, each of you will be paid your earnings from the lottery. If the third person chooses to redistribute earnings, then each of you will be paid according to this decision.
[The following text applies to all treatments without a work requirement and subjects who did not face a lottery draw to determine earnings]
We will now explain how the final amount of bonus points is generated.
The total amount of bonus points you receive consists of the initial endowment plus what you earned as a result of your decision.
Initial Endowment
The initial endowment was 50 bonus points.
Your decision
You will receive -25/0/25 bonus points as a result of your decision.
[The following text applies to all treatments]
We will calculate and pay your bonus as soon as this full batch of HITs is finished. This includes that we need to wait for third party decisions. It generally takes us a few days to match the data and pay out the bonuses.
[End of study for workers]
We now ask you to make a choice that can have consequences for a real life situation. We will randomly select one out of five respondents and implement the choice made by this respondent.
A few days ago, individuals were recruited via an online labor market to participate in a study. They were paid a participation compensation of 2 USD, but could also earn additional money in the course of the study.
In the study, participants were asked to work on an assignment. Participants were not told how they will be paid for the assignment before the assignment was completed. After the assignment was completed, participants were informed that their earnings would be determined by a lottery.
In the lottery, a ball would be randomly drawn from an urn containing an equal number of yellow and green balls. If a yellow ball was drawn, the participant would earn 8 USD, and if a green ball was drawn the participant would earn 0 USD for completing the assignment.
Participants were not informed about the outcome of the lottery. However, they were told that they would be matched with another participant who had also taken part in the study. They were also told that a third-party person not taking part in the study would be informed about the assignment and their earnings. This third-party person would be given the opportunity to redistribute the earnings between the two of them and thus determine how much each of them was paid for the assignment.
We now want you to choose whether to redistribute the earnings between two of the participants – who we are going to refer to as participant A and participant B. Your decision is completely anonymous. The participants will receive the payment that you choose for them within a few days, but will not receive any further information.
A yellow ball was drawn for participant A while a green ball was drawn for participant B. Therefore, participant A earned 8 USD while participant B earned 0 USD.
In the field below, we ask you to write how much of the 8 USD you want to transfer from participant A to participant B. Remember that your choice will determine how much participant A and participant B are paid for the assignment.
We now ask you to make a choice that can have consequences for a real life situation. We will randomly select one out of five respondents and implement the choice made by this respondent.
A few days ago, individuals were recruited via an online labor market to participate in a study. They were paid a participation compensation of 2 USD, but could also earn additional money in the course of the study.
What they could earn in addition was determined by a lottery. In the lottery, a ball would be randomly drawn from an urn containing an equal number of yellow and green balls. If a yellow ball was drawn, the participant would earn 8 USD, and if a green ball was drawn the participant would earn 0 USD in addition.
Participants were not informed about the outcome of the lottery. However, they were told that they would be matched with another participant who had also taken part in the study. They were also told that a third-party person not taking part in the study would be informed about their earnings. This third-party person would be given the opportunity to redistribute the earnings between the two of them and thus determine how much each of them was paid.
We now want you to choose whether to redistribute the earnings between two of the participants – who we are going to refer to as participant A and participant B. Your decision is completely anonymous. The participants will receive the payment that you choose for them within a few days, but will not receive any further information.
A yellow ball was drawn for participant A while a green ball was drawn for participant B. Therefore, participant A earned 8 USD while participant B earned 0 USD.
In the field below, we ask you to write how much of the 8 USD you want to transfer from participant A to participant B. Remember that your choice will determine how much participant A and participant B are paid.
We now ask you to make a choice that can have consequences for a real life situation. We will randomly select one out of five respondents and implement the choice made by this respondent.
A few days ago, individuals were recruited via an online labor market to participate in a study. They were paid a participation compensation of 2 USD, but could also earn additional money in the course of the study.
In the study, participants were asked to work on an assignment. Participants were not told how they will be paid for the assignment before the assignment was completed. After the assignment was completed, participants were informed that they could choose how their earnings for the assignment would be determined.
Participants could choose to let their earnings from the assignment be determined by a lottery or not. In the lottery, a ball would be randomly drawn from an urn containing an equal number of yellow and green balls. If a yellow ball was drawn, the participant would earn 8 USD, and if a green ball was drawn the participant would earn 0 USD for the assignment. If they did not choose the lottery, they would earn 25 cents for having completed the assignment.
Participants who chose the lottery to determine earnings were not informed about the outcome of the lottery. However, they were told that they would be matched with another participant who had also taken part in the study. They were also told that a third-party person not taking part in the study would be informed about the assignment and their earnings. This third-party person would be given the opportunity to redistribute the earnings between the two of them and thus determine how much each of them was paid for the assignment.
We now want you to choose whether to redistribute the earnings between two of the participants – who we are going to refer to as participant A and participant B. Your decision is completely anonymous. The participants will receive the payment that you choose for them within a few days, but will not receive any further information.
Both participants chose the lottery to determine earnings. A yellow ball was drawn for participant A while a green ball was drawn for participant B. Therefore, participant A earned 8 USD while participant B earned 0 USD.
In the field below, we ask you to write how much of the 8 USD you want to transfer from participant A to participant B. Remember that your choice will determine how much participant A and participant B are paid.
We now ask you to make a choice that can have consequences for a real life situation. We will randomly select one out of five respondents and implement the choice made by this respondent.
A few days ago, individuals were recruited via an online labor market to participate in a study. They were paid a participation compensation of 2 USD, but could also earn additional money in the course of the study.
In the study, participants were asked to work on an assignment. Participants were not told how they will be paid for the assignment before the assignment was completed. After the assignment was completed, participants were informed that they could choose how their earnings for the assignment would be determined.
Participants could choose to let their earnings from the assignment be determined by a lottery or not. In the lottery, a ball would be randomly drawn from an urn containing an equal number of yellow and green balls. If a yellow ball was drawn, the participant would earn 8 USD, and if a green ball was drawn the participant would earn 0 USD for the assignment. If they did not choose the lottery, they would earn 0 USD for having completed the assignment.
Participants who chose the lottery to determine earnings were not informed about the outcome of the lottery. However, they were told that they would be matched with another participant who had also taken part in the study. They were also told that a third-party person not taking part in the study would be informed about the assignment and their earnings. This third-party person would be given the opportunity to redistribute the earnings between the two of them and thus determine how much each of them was paid for the assignment.
We now want you to choose whether to redistribute the earnings between two of the participants – who we are going to refer to as participant A and participant B. Your decision is completely anonymous. The participants will receive the payment that you choose for them within a few days, but will not receive any further information.
Both participants chose the lottery to determine earnings. A yellow ball was drawn for participant A while a green ball was drawn for participant B. Therefore, participant A earned 8 USD while participant B earned 0 USD.
In the field below, we ask you to write how much of the 8 USD you want to transfer from participant A to participant B. Remember that your choice will determine how much participant A and participant B are paid.
We now ask you to make a choice that can have consequences for a real life situation. We will randomly select one out of five respondents and implement the choice made by this respondent.
A few days ago, individuals were recruited via an online labor market to participate in a study. They were paid a participation compensation of 2 USD, but could also earn additional money in the course of the study.
In the study, participants were asked to work on an assignment. Participants were not told how they will be paid for the assignment before the assignment was completed. After the assignment was completed, participants were informed that they could choose how their earnings for the assignment would be determined.
Participants could choose to let their earnings from the assignment be determined by a lottery or not. In the lottery, a ball would be randomly drawn from an urn containing an equal number of yellow and green balls. If a yellow ball was drawn, the participant would earn 8 USD, and if a green ball was drawn the participant would earn 0 USD for completing the assignment (in addition to the 2 USD participation compensation). If they did not choose the lottery, they would have to pay 25 cents (which would be deducted from the 2 USD participation compensation).
Participants who chose the lottery to determine earnings were not informed about the outcome of the lottery. However, they were told that they would be matched with another participant who had also taken part in the study. They were also told that a third-party person not taking part in the study would be informed about the assignment and their earnings. This third-party person would be given the opportunity to redistribute the earnings between the two of them and thus determine how much each of them was paid for the assignment.
We now want you to choose whether to redistribute the earnings between two of the participants – who we are going to refer to as participant A and participant B. Your decision is completely anonymous. The participants will receive the payment that you choose for them within a few days, but will not receive any further information.
Both participants chose the lottery to determine earnings. A yellow ball was drawn for participant A while a green ball was drawn for participant B. Therefore, participant A earned 8 USD while participant B earned 0 USD.
In the field below, we ask you to write how much of the 8 USD you want to transfer from participant A to participant B. Remember that your choice will determine how much participant A and participant B are paid.
We now ask you to make a choice that can have consequences for a real life situation. We will randomly select one out of five respondents and implement the choice made by this respondent.
A few days ago, individuals were recruited via an online labor market to participate in a study. They were paid a participation compensation of 2 USD, but could also earn additional money in the course of the study.
Participants could choose to let their earnings be determined by a lottery or not. In the lottery, a ball would be randomly drawn from an urn containing an equal number of yellow and green balls. If a yellow ball was drawn, the participant would earn 8 USD, and if a green ball was drawn the participant would earn 0 USD. If they did not choose the lottery, they would earn 0 USD in addition.
Participants who chose the lottery to determine earnings were not informed about the outcome of the lottery. However, they were told that they would be matched with another participant who had also taken part in the study. They were also told that a third-party person not taking part in the study would be informed about their earnings. This third-party person would be given the opportunity to redistribute the earnings between the two of them and thus determine how much each of them was paid.
We now want you to choose whether to redistribute the earnings between two of the participants – who we are going to refer to as participant A and participant B. Your decision is completely anonymous. The participants will receive the payment that you choose for them within a few days, but will not receive any further information.
Both participants chose the lottery to determine earnings. A yellow ball was drawn for participant A while a green ball was drawn for participant B. Therefore, participant A earned 8 USD while participant B earned 0 USD.
In the field below, we ask you to write how much of the 8 USD you want to transfer from participant A to participant B. Remember that your choice will determine how much participant A and participant B are paid.
We now ask you to make a choice that can have consequences for a real life situation. We will randomly select one out of five respondents and implement the choice made by this respondent.
A few days ago, individuals were recruited via an online labor market to participate in a study. They were paid a participation compensation of 2 USD, but could also earn additional money in the course of the study.
In the study, participants were asked to work on an assignment. Participants were not told how they will be paid for the assignment before the assignment was completed. After the assignment was completed, participants were informed that they could choose how their earnings for the assignment would be determined.
Participants could choose between two colors, yellow and green, where their choice would determine the outcome of a lottery. In the lottery, a ball would be randomly drawn from an urn containing an equal number of yellow and green balls. If they chose the color of the ball that was drawn, they would earn 8 USD, if they chose the other color, they would earn 0 USD for completing the assignment.
Participants were not informed about the outcome of the lottery. However, they were told that they would be matched with another participant who had also taken part in the study. They were also told that a third-party person not taking part in the study would be informed about the assignment and their earnings. This third-party person would be given the opportunity to redistribute the earnings between the two of them and thus determine how much each of them was paid for the assignment.
We now want you to choose whether to redistribute the earnings between two of the participants – who we are going to refer to as participant A and participant B. Your decision is completely anonymous. The participants will receive the payment that you choose for them within a few days, but will not receive any further information.
Participant A chose the color of the ball that was drawn, while participant B chose the color that was not drawn. Therefore, participant A earned 8 USD while participant B earned 0 USD.
In the field below, we ask you to write how much of the 8 USD you want to transfer from participant A to participant B. Remember that your choice will determine how much participant A and participant B are paid.
We now ask you to make a choice that can have consequences for a real life situation. We will randomly select one out of five respondents and implement the choice made by this respondent.
A few days ago, individuals were recruited via an online labor market to participate in a study. They were paid a participation compensation of 2 USD, but could also earn additional money in the course of the study.
Participants could choose how their additional earnings were determined. Participants could choose between two colors, yellow and green, where their choice would determine the outcome of a lottery. In the lottery, a ball would be randomly drawn from an urn containing an equal number of yellow and green balls. If they chose the color of the ball that was drawn, they would earn 8 USD, if they chose the other color, they would earn 0 USD.
Participants were not informed about the outcome of the lottery. However, they were told that they would be matched with another participant who had also taken part in the study. They were also told that a third-party person not taking part in the study would be informed about their earnings. This third-party person would be given the opportunity to redistribute the earnings between the two of them and thus determine how much each of them was paid.
We now want you to choose whether to redistribute the earnings between two of the participants – who we are going to refer to as participant A and participant B. Your decision is completely anonymous. The participants will receive the payment that you choose for them within a few days, but will not receive any further information.
Participant A chose the color of the ball that was drawn, while participant B chose the color that was not drawn. Therefore, participant A earned 8 USD while participant B earned 0 USD.
In the field below, we ask you to write how much of the 8 USD you want to transfer from participant A to participant B. Remember that your choice will determine how much participant A and participant B are paid.
{The following text applies only to subjects in the Nominal Choice treatment with and without work requirement}
In the lottery, a ball would be randomly drawn from an urn containing an equal number of yellow and green balls. Do you believe that some are better than others at guessing if a yellow or a green ball will be drawn?
{The following text applies to all treatments}
Before you made your choice, participant A earned 8 USD while participant B earned 0 USD. To what extent did the two participants have control over what they earned before you made your choice?
{Due to a programming mistake by the survey provider, a few of the first respondents needed to be asked a follow-up question}
Your role in the study you responded to was to choose whether to redistribute the earnings between two participants. You could transfer up to 8 USD from one participant to another participant. Was it the case that you tried to answer “0” to the question on what amount you wanted to transfer?
{The following text applies to all treatments}
Welcome to this experiment. My name is ... and I will lead this session.
In this experiment you can, depending on the decisions you and others make and independent of your seating in one of the rooms, earn more money in addition to the 100 NOK that you receive in show-up fee. Your earnings will be added to your show-up fee and paid to you in cash at the end of the session.
The results of this experiment are going to be used in a research project and it is therefore important that everybody complies with the guidelines that are also lying on your desks.
Violation of these rules will lead to the exclusion from the session and all payments. It is likely that there will be small delays during this session and we ask you to remain seated and quiet.
You will be completely anonymous throughout the session, which means that it will not be possible for the other participants - or us - to identify which decisions you have made.
At the end of the session you will get a payment code on your screen. You will be asked to write this code down on the sheet that is in the folder next to you. You will show this sheet when you leave the session, and you will then be handed over an envelope with the corresponding code, which contains the money you have earned in the session. The research assistants who have prepared the envelope will not be in the room when the envelopes are distributed, which ensures that no one can identify how much each of you have earned in the session.
The experiment consists of three parts and you will be given instructions on your screen before every single part of the experiment. We will soon reveal information about the first part of the experiment on your pc-screen. Please make sure to read the instructions carefully before you confirm that you have read the instructions.
\[[Leader waits from OK from other SAs via Skype and opens for introductions to part $1$.]{.smallcaps}\]
{The following text applies to all treatments}
\[[Short intro when the status page shows that everyone has read instructions to part $1$]{.smallcaps}\]
Everyone has now read the instructions for the first part of the experiment. This task will take half an hour and you will soon asked to begin working on this task. It can happen that there will be a small delay when the task is completed and will will ask you to remain quiet in this case until you receive new instructions.
[Leader waits from OK from other SAs via Skype and opens for sentence descrambling task.]
[Leader informs other SAs via Skype when the status page shows that everyone has completed sentence descrambling task.]
{[The following text applies to all treatments]}
[Start intro when leader gives info that everyone has completed sentence descrambling task]
You have now worked for half an hour and we ask you to submit the last sentence. The first part of the experiment is finished and you will soon be shown information about the second part of the experiment on your pc-screen. Please make sure to read the instructions carefully before you confirm that you have read the instructions. The second part of the experiment will first start when everyone has read the instructions. It can happen that there will be a small delay when the task is completed and will will ask you to remain quiet in this case until you receive new instructions.
[SA informs leader when finished reading intro. Leader opens for lottery]
[Leader informs other SAs via Skype when the status page shows that everyone has completed the redistribution phase.]
 We have to wait until everyone is ready.
Screen 2
{[The following text applies to all treatments]}
In the first part of the experiment you will be working on a language task. You will be shown five English words and are asked to form a sentence or an expression by using four of these words. The sentence or expression must contain four words. For example, if the words given to you are “sky, blue, is, the, old”, then you can construct the sentence “the sky is blue”.
We ask you to work continuously with this task for 30 minutes. After you have submitted a sentence or expression, you will be given five new words. The aim of this task is not to submit as many sentences or expressions as possible but to work thoroughly with each set of words. Please work continuously on this task until the given time has run out.
Screen 3
{The following text applies to all treatments}
Use the following words to construct a sentence or expression that consists of four words.
Screen 4
{The following text applies to all treatments}
You have now worked on the language task for \(30\) minutes. For this working task you are going to be paid and we will in in the following explain to you how your payment will be determined. After the next part of the experiment, there will also be a redistribution phase and you will receive more information on that later.
{The following text applies only to the Baseline treatment}
Your payment will be determined by a lottery in which you with equal probability earn either \(800\) NOK or \(0\) NOK. In the lottery, a ball will be randomly drawn from an urn containing an equal number of yellow and green balls. If a yellow ball is drawn, you earn \(800\) NOK and if a green ball is drawn, you earn \(0\) NOK.
[The following text applies only to the Forced Choice treatment]
You can choose between two different forms of payments. You can either choose to earn \(25\) NOK or let your earnings be determined by a lottery in which you with equal probability earn either \(800\) NOK or \(0\) NOK. In the lottery, a ball will be randomly drawn from an urn containing an equal number of yellow and green balls. If a yellow ball is drawn, you earn \(800\) NOK and if a green ball is drawn, you earn \(0\) NOK.
[The following text applies only to the Nominal Choice treatment]{
We will now ask you to choose between two colors, yellow and green. Your choice will determine the outcome of a lottery in which you with equal probability earn either \(800\) NOK or \(0\) NOK. In the lottery, a ball will be randomly drawn from an urn containing an equal number of yellow and green balls. If you choose the color of the ball that is drawn, you will earn \(800\) NOK, if you choose the other color, you earn \(0\) NOK.
Screen 5
[The following text applies only to the Forced Choice treatment]
If you choose the picture showing coins, you will earn \(25\) NOK, if you choose the picture of the lottery, your payment will be determined through a lottery in which you with equal probability earn either \(800\) NOK or \(0\) NOK.
[The following text applies only to the Nominal Choice treatment]
We ask you now to indicate your choice by clicking on one of the two pictures below.
If you choose the color of the ball that is drawn, you will earn \(800\) NOK, if you choose the other color, you earn \(0\) NOK.
Remember that the urn contains an equal number of yellow and green balls.
Screen 6
[The following text applies to all treatments]
We now have reached the redistribution phase. On the next screen, we will ask you to determine the distribution of money that two other participants have earned. Your choice will with some probability decide how much each of the two other participants will be paid from the experiment. Your choice will not determine how much you will earn from the experiment.
Screen 7
[The following text applies to all treatments]
You will determine the distribution of money of two other participants in this experiment that we are going to refer to as person A and person B. Both have worked for \(30\) minutes and their payment was determined in the same way as yours.
[The following text applies only to the Baseline treatment]
A yellow ball was drawn for person A and a green ball for person B. The result was therefore that person A earned \(800\) NOK from working while person B earned \(0\) NOK from working.
[The following text applies only to the Forced Choice treatment]
Both participants chose to let their payment be determined by a lottery. A yellow ball was drawn for person A and a green ball for person B. The result was therefore that person A earned \(800\) NOK from working while person B earned \(0\) NOK from working.
[The following text applies only to the Nominal Choice treatment]
The two participants chose different colors. Person A chose yellow wile person B chose green. A yellow ball was drawn both for person A and person B. The result was therefore that person A earned \(800\) NOK from working while person B earned \(0\) NOK from working.
[The following text applies to all treatments]
I the field below you are suppose to write how much of the \(800\) NOK you want to transfer from person A to person B. Remember that your choice can determine how much person A and person B will get paid from the experiment.
[The following text applies to all treatments]
[Start intro when leader gives info that everyone has completed the distribution phase.]
Everyone has now completed the third part of the experiment. will now ask you to answer a couple of questions on your computer screen. Your answers to these questions will not have any bearing on your payment from the experiment. Please click on the continue button on your pc-screen if you have answered all the questions. If you have finished answering all your questions, it can happen that there will be a small delay and will will ask you to remain quiet in this case until you receive new instructions.
[SA informs leader when finished reading intro. Leader opens set of questions.]
[Leader informs other SAs via Skype when the status page shows that everyone has completed answering the questions.]
[The following text applies to all treatments]
[Start intro when leader gives info that everyone has completed answering the questions.]
All questions have been answered and you will soon be shown and overview over your payments from the experiment. If you have seen your payment you can continue to the next screen where you will get your personal payment code by clicking on the link on the bottom of your page. We ask you to write down your own personal payment code on the sheet that is provided to you for this purpose on your desk. Make sure to write down the code correctly since this will identify your payment from the experiment.
As soon as the envelopes with payment have been brought into the lab, we will start the payment process. On request, show the payment code to my colleague and he will hand you the envelope with this code. This envelop contains your earnings. Please remain seated until we read your payment code.
[Leader will open the payment page.]
Since we will conduct further sessions today, please do not talk to anyone about the experiment before tomorrow.
This part ends the session. On behalf of the research group, I should like to thank you for your participation. Your participation is an important contribution to our research.
[Leader waits until the envelopes arrives and the SA2 who has prepared them has left the room.]
[SA2 stands at the door and hands out the envelopes to those leaving one by one - session closed.]


You are using the beta version of Coins, stay tuned for 1.0 for more features
Currently, there are no options to customize.
If you have any issues or bugs to report, please go here: https://github.com/usmanity/coins/issues
If you have any questions, feature ideas, or any other feedback, please contact me on Twitter: @usmanity
Please share this extension with your friends and if you'd like to support this extension, a tweet about it would be great!
If you'd like to trade and support this extension,
you can use this link: Sign up for Binance.
All it does is use my referral code and you don't lose anything.
Binance charges a transaction fee 0.1% for trading, some of this will be credit to me.
If you're looking to trade the most popular cryptocurrencies, you can also use Robinhood.
Robinhood will allow trading crypto starting in February.
You can sign up for Robinhood using this link:
Sign up for Robinhood
This will give you (and me) a free stock!
I want to keep this extension as quick, simple, and easy to use as possible.
To keep your safety and privacy, I'm not using any tracking libraries and 3rd party services.
There's only one sort of tracking for this extension, it's the one that the Chrome Web Store
uses to keep track of how many people use this extension.
It does not track how you interact with the extension,
it's just a number of active users per week.
You can even see this on the extension page: Chrome Web Store
I use no mining or any other sort of resource based harvesting.
If you suspect a website or extension is mining on your computer, use one of these: Mining blockers
Curious about what a miner would do to your computer?
I have an experimental page that can show you this: Experimental Browser Miner using Coinhive
Because there is no tracking, mining, or other privacy invasive things being used, this extension should be quick as possible.
If you have any concerns, please contact me.


Intro to Memphis
Memphis is a city located along the Mississippi River in southwestern Shelby County, Tennessee, United States. The 2017 city population was 652,236,[5] making Memphis the largest city on the Mississippi River,[6] the second most populous city in Tennessee, as well as the 26th largest city in the United States. Greater Memphis is the 42nd largest metropolitan area in the United States, with a population of 1,348,260 in 2017.[7] The city is the anchor of West Tennessee and the greater Mid-South region, which includes portions of neighboring Arkansas and Mississippi. Memphis is the seat of Shelby County, the most populous county in Tennessee. As one of the most historic and cultural cities of the southern United States, the city features a wide variety of landscapes[citation needed] and distinct neighborhoods.
Early History
Occupying a substantial bluff rising from the Mississippi River, the site of Memphis has been a natural location for human settlement by varying cultures over thousands of years.[13] The area was known to be settled in the first millennium A.D. by people of the Mississippian Culture, who had a network of communities throughout the Mississippi River Valley and its tributaries. They built complexes with large earthwork ceremonial and burial mounds as expressions of their sophisticated culture.[14] The historic Chickasaw Indian tribe, believed to be their descendants, later occupied the site.[15]
From Memphis to the World
Memphis is well known for its cultural contributions to the identity of the American South. Many renowned musicians grew up in and around Memphis and moved to Chicago and other areas from the Mississippi Delta, carrying their music with them to influence other cities and listeners over radio airwaves.[45] These included musicians such as Elvis Presley, Jerry Lee Lewis, Muddy Waters, Carl Perkins, Johnny Cash, Robert Johnson, W. C. Handy, B.B. King, Howlin' Wolf, Isaac Hayes, Booker T. Jones, Eric Gales, Al Green, Alex Chilton, Justin Timberlake, Three 6 Mafia, the Sylvers, Jay Reatard, Zach Myers, Aretha Franklin, and many others.


How to Flexbox - Basics
Terminology
- Flex Container - Parent element (defined by the display property).
- Flex Child/Item - Every child of a Flex Container is a Flex Item.
- Main axis - The main axis of a flex container is the primary axis along which flex items are laid out. It is not necessarily horizontal (depends on the flex-direction property).
- Cross axis - The axis perpendicular to the main axis is called the cross axis. Its direction depends on the main axis direction.
Properties to be used on parent's containers
- display: flex;
- flex-direction: row (default) | row-reverse | column | column-reverse
- flex-wrap: nowrap (default) | wrap | wrap-reverse
- justify-content: flex-start (default) | flex-end | center | space-between | space-around
- align-items: flex-start | flex-end | center | baseline | stretch (default)
- align-content: flex-start | flex-end | center | space-between | space-around (default)
- display: flex;- Just defines the context
- flex-direction - Defines the direction of the flex items
- flex-wrap - Defines if flex items will all try to fit onto one line
- justify-content - Align flex items in the maix axis (ex: if direction is row it will align horizontally)
- align-items - Align flex items in the cross axis (ex: if direction is row it will align vertically)
- align-content - This aligns a flex container's lines within when there is extra space in the cross-axis
Properties to be used on children items
- order: number (default -> source order)
- flex-grow: number (default -> 0)
- flex-shrink: number (default -> 1)
- flex-basis: length> | auto (default)
- flex: 0 1 auto (default)
- align-self: auto | flex-start | flex-end | center | baseline
- order: - Controls the order in which item appear in the flex container
- flex-grow: - This defines the ability for a flex item to grow if necessary
- flex-shrink: - This defines the ability for a flex item to shrink if necessary
- flex-basis: - This defines the default size of an element before the remaining space is distributed
- flex: flex-grow, flex-shrink and flex-basis combined in this order
- align-self: This allows the default alignment (or the one specified by align-items) to be overridden for individual flex items.
Basic Grids
Example 1: Basic Grids
The grid cells below do not specify any widths, they just naturally space themselves equally and expand to fit the entire row.
1/2
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores, repellendus, nobis hic molestias eveniet perferendis nes ciunt voluptate ipsum impedit quo a veritatis porro qui commodi expedita? Nostrum enim sed ab.
1/2
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores, repellendus, nobis hic molestias eveniet perferendis nes ciunt voluptate ipsum impedit quo a veritatis porro qui commodi expedita? Nostrum enim sed ab.
1/3
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores, repellendus, nobis hic molestias eveniet perferendis nes ciunt voluptate ipsum impedit quo a veritatis porro qui commodi expedita? Nostrum enim sed ab.
1/3
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores, repellendus, nobis hic molestias eveniet perferendis nes ciunt voluptate ipsum impedit quo a veritatis porro qui commodi expedita? Nostrum enim sed ab.
1/3
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores, repellendus, nobis hic molestias eveniet perferendis nes ciunt voluptate ipsum impedit quo a veritatis porro qui commodi expedita? Nostrum enim sed ab.
Html
If you want to divide in equal parts just keep adding the div with the flex-child class inside the container
Ex: If you want to divide in 2 sections just add inside the container 2 div's with flex-child class

 // 1st Div // Write your Code here

 // 2nd Div // Write your Code here

Css
.container { display: flex; } .flex-child { flex: 1; }
Example 2: Individual Sizing
If you want that some div's have a fixed width and others to distribute space, just control this with flex property on the child divs.
Just tell to the div that you don't want it to grow or shrink (flex-grow: 0, flex-shrink:0), and then just control the width with the flex-basis in pixels or percentage (Ex: flex-basis:50%).
Use the shortand: flex: 0 0 50%;
To other div's just use the flex-child class and let them distribute the space (flex:1). If you want 1 bigger then the other but not with a fixed width, just increase the flex-grow of that div (Ex: flex:3)
Note: This flex:3 above don't mean the triple. Check how flex-grow works
(Resize browser)
50% (Fixed)
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores, repellendus, nobis hic molestias eveniet perferendis nes ciunt voluptate ipsum impedit quo a veritatis porro qui commodi expedita? Nostrum enim sed ab.
auto
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores, repellendus, nobis hic molestias eveniet perferendis nes ciunt voluptate ipsum impedit quo a veritatis porro qui commodi expedita? Nostrum enim sed ab.
auto
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores, repellendus, nobis hic molestias eveniet perferendis nes ciunt voluptate ipsum impedit quo a veritatis porro qui commodi expedita? Nostrum enim sed ab.
100px (Fixed)
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores, repellendus, nobis hic molestias eveniet perferendis nes ciunt voluptate ipsum impedit quo a veritatis porro qui commodi expedita? Nostrum enim sed ab.
flex: 3 (auto)
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores, repellendus, nobis hic molestias eveniet perferendis nes ciunt voluptate ipsum impedit quo a veritatis porro qui commodi expedita? Nostrum enim sed ab.
flex: 1 (auto)
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores, repellendus, nobis hic molestias eveniet perferendis nes ciunt voluptate ipsum impedit quo a veritatis porro qui commodi expedita?
Flex-grow/Flex-shrink
A flex container distributes free space to its items (proportionally to their flex grow factor) to fill the containers, or shrinks them (proportionally to their flex shrink factor) to prevent overflow.
Example for flex-grow, flex-shrink works with the same principle
Was applied flex-grow:2 on the Section div and flex-grow:1 on the Aside div
Calculations
- Container width: 300px
- Section width: 55px
- Aside width: 100px
Calculate the remaining space: 300-55-100 = 145px
Determine the value of one flex-grow factor, once we have 3 (2 + 1) the value of one flex-grow is approximately: 145/3 = 48px
Finally the sliced up remaining space gets distributed between all elements based on their flex-grow value:
- Section width: 55 (initial width) + ( 2(flex-grow) * 48(value of each flex-grow) ) = 151px
- Aside width: 100 (initial width) + ( 1(flex-grow) * 48(value of each flex-grow) ) = 148px
Flex-basis
The initial main size of the flex item, before free space is distributed according to the flex factors.


Kim Kardashian says removing Instagram 'likes' could be 'beneficial' for mental health
Cape Town – Instagram is considering removing their "like" feature – and Kim Kardashian is all for it.
According to Business Insider, the social media platform has been testing what the user experience would be like without the feature, believing it will do much in combatting mental health and societal pressure.
Many celebrities have spoken about mental health publicly and how social media plays a big part in lowering one's self-esteem. Some, including Selena Gomez, Demi Lovato and Millie Bobby Brown, have completely deactivated their accounts.
Kim Kardashian is the latest celebrity to talk about social media, and how disabling this particular feature will be "beneficial" to one's mental health.
On Wednesday, the reality star attended the New York Times' DealBook Conference, where she spoke candidly about the issue, reports People.
"As far as mental health... I think taking the likes away and taking that aspect away from [Instagram] would be really beneficial for people. I know the Instagram team has been having a bunch of conversations with people to get everyone's take on that and they're taking it really seriously, and that makes me happy," Kim said.
She added that while she's not too concerned about likes and comments, she worries about her kids. "What if one of my children was like one of my friends who wasn't as mentally strong..." she said. "That would really affect me."
Compiled by Bashiera Parker (Sources: Business Insider , Channel24 , People , Bang Showbiz )
(Photo: Splash)


/**
*Submitted for verification at Etherscan.io on 2017-07-01
*/
//Had to change solidity version to 0.4.16, previous was 0.4.2
//this truffle project is now using<EMAIL_ADDRESS>pragma solidity ^0.4.16;
contract ERC20Interface {
function balanceOf(address _owner) constant returns (uint256 balance);
function transfer(address _to, uint256 _value) returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
function approve(address _spender, uint256 _value) returns (bool success);
function allowance(address _owner, address _spender) constant returns (uint256 remaining);
// Triggered when tokens are transferred.
event Transfer(address indexed _from, address indexed _to, uint256 _value);
// Triggered whenever approve(address _spender, uint256 _value) is called.
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract Owner {
//For storing the owner address
address public owner;
//Constructor for assign a address for owner property(It will be address who deploy the contract)
function Owner() {
owner = msg.sender;
}
//This is modifier (a special function) which will execute before the function execution on which it applied
modifier onlyOwner() {
if(msg.sender != owner) throw;
//This statement replace with the code of fucntion on which modifier is applied
_;
}
//Here is the example of modifier this function code replace _; statement of modifier
function transferOwnership(address new_owner) onlyOwner {
owner = new_owner;
}
}
contract FuturXe is ERC20Interface,Owner {
//Common information about coin
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
//Balance property which should be always associate with an address
mapping(address => uint256) balances;
//frozenAccount property which should be associate with an address
mapping (address => bool) public frozenAccount;
// Owner of account approves the transfer of an amount to another account
mapping(address => mapping (address => uint256)) allowed;
//These generates a public event on the blockchain that will notify clients
event FrozenFunds(address target, bool frozen);
//Construtor for initial supply (The address who deployed the contract will get it) and important information
function FuturXe(uint256 initial_supply, string _name, string _symbol, uint8 _decimal) {
balances[msg.sender] = initial_supply;
name = _name;
symbol = _symbol;
decimals = _decimal;
totalSupply = initial_supply;
}
// What is the balance of a particular account?
function balanceOf(address _owner) constant returns (uint256 balance) {
return balances[_owner];
}
//Function for transer the coin from one address to another
function transfer(address to, uint value) returns (bool success) {
//checking account is freeze or not
Iif (frozenAccount[msg.sender]) return false;
//checking the sender should have enough coins
if(balances[msg.sender] < value) return false;
//checking for overflows
Iif(balances[to] + value < balances[to]) return false;
//substracting the sender balance
balances[msg.sender] -= value;
//adding the reciever balance
balances[to] += value;
// Notify anyone listening that this transfer took place
Transfer(msg.sender, to, value);
return true;
}
//Function for transer the coin from one address to another
function transferFrom(address from, address to, uint value) returns (bool success) {
//checking account is freeze or not
Iif (frozenAccount[msg.sender]) return false;
//checking the from should have enough coins
if(balances[from] < value) return false;
//checking for allowance
if( allowed[from][msg.sender] >= value ) return false;
//checking for overflows
Iif(balances[to] + value < balances[to]) return false;
balances[from] -= value;
allowed[from][msg.sender] -= value;
balances[to] += value;
// Notify anyone listening that this transfer took place
Transfer(from, to, value);
return true;
}
//
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
//
function approve(address _spender, uint256 _amount) returns (bool success) {
allowed[msg.sender][_spender] = _amount;
Approval(msg.sender, _spender, _amount);
return true;
}
//
function mintToken(address target, uint256 mintedAmount) onlyOwner{
balances[target] += mintedAmount;
totalSupply += mintedAmount;
Transfer(0,owner,mintedAmount);
Transfer(owner,target,mintedAmount);
}
//
function freezeAccount(address target, bool freeze) onlyOwner {
frozenAccount[target] = freeze;
FrozenFunds(target, freeze);
}
//
function changeName(string _name) onlyOwner {
name = _name;
}
//
function changeSymbol(string _symbol) onlyOwner {
symbol = _symbol;
}
//
function changeDecimals(uint8 _decimals) onlyOwner {
decimals = _decimals;
}
}
|


Apache Felix Shell Service
- Overview
- How the Shell Service Works
- How Commands Work
- Creating a Command
- Security and the Shell Service
- Feedback
Overview
In order to interact with Felix it is necessary to have some sort of interactive shell that allows you to issue commands to the framework and to obtain information from it. The OSGi specification does not define how an OSGi framework should provide this interactivity. Felix defines a shell service for creating and executing arbitrary commands. The shell service does not define a user interface, only a service API.
The benefit of the Felix shell service approach is that it is possible to:
- have multiple shell user interfaces (e.g., textual and graphical),
- add custom commands to the shell (i.e., bundles can make commands available via the shell service), and
- use the shell service from other bundles/services.
The remainder of this document describes how the shell service works and how to create custom commands for it. This document does not describe how to use the command shell, nor does it describe the text-based or GUI-based user interfaces that are available for the shell.
How the Shell Service Works
The Felix shell service is intended to be a simple, but extensible shell service that can have multiple user interface implementations, all of which are independent from the Felix framework. The shell service is currently not intended to be sophisticated, rather it is just a mechanism to execute commands. The shell service maintains a list of command services, each of which have a unique command name. The shell service is defined by the following service interface:
package org.apache.felix.shell; public interface ShellService { public String[] getCommands(); public String getCommandUsage(String name); public String getCommandDescription(String name); public ServiceReference getCommandReference(String name); public void executeCommand( String commandLine, PrintStream out, PrintStream err) throws Exception; }
Using the shell service interface, it is possible to access and execute available commands. The shell service methods perform the following functions:
- getCommands() - returns an array of strings that correspond to the names of the installed shell commands.
- getCommandUsage() - returns the command usage string for a particular command name
- getCommandDescription() - returns a short description for a particular command name.
- getCommandReference() - returns the service reference for a particular command name.
- executeCommand() - executes a particular command using the specified command line and print streams.
Most of the shell service methods require no explanation except for the executeCommand() method. Even though this method is the most complex, it is still fairly simplistic. The assumption of the shell service is that a command line will be typed by the user (or perhaps constructed by a GUI) and passed into it for execution. The shell service interprets the command line in a very simplistic fashion; it takes the leading string of characters terminated by a space character (not including it) and assumes that this leading token is the command name. Consider the following command line:
update 3 http://www.foo.com/bar.jar
The shell service interprets this as an update command and will search for a command service with the same name. If a corresponding command service is not found, then it will print an error message to the error print stream. If a corresponding command service is found, then it will pass the entire command line string and the print streams into the executeCommand() method of the command service (for a more detailed description of command services, see the next section).
Notice that there is no method to add commands to the shell service interface. This is because commands are implemented as OSGi services and the shell service listens for service events and when a command service registers/unregisters it automatically updates its list of commands accordingly.
How Commands Work
All commands available in the shell service are implemented as OSGi services. The advantage of this approach is two-fold: the shell service can leverage OSGi service events to maintain its list of available commands and the set available commands is dynamically extendable by installed bundles. The command service interface is defined as follows:
package org.ungoverned.osgi.service.shell; public interface Command { public String getName(); public String getUsage(); public String getShortDescription(); public void execute(String line, PrintStream out, PrintStream err); }
The semantics of the command service methods are:
- getName() - returns the name of the command; this must not contain whitespace and must be unique.
- getUsage() - returns the usage string of the command; this should be one line and as short as possible (this is used for generating the help command output).
- getShortDescription() - returns a short description of the command; this should be one line and as short as possible (this is used for generating the help command output).
- execute() - executes the command's functionality using supplied command line and print streams.
Creating a Command
The following example creates a simple version of the start command.
package test; import java.io.PrintStream; import java.net.URL; import java.net.MalformedURLException; import java.util.StringTokenizer; import org.osgi.framework.*; import org.apache.felix.shell.ShellService; import org.apache.felix.shell.Command; public class MyStartCommandImpl implements Command { private BundleContext m_context = null; public MyStartCommandImpl(BundleContext context) { m_context = context; } public String getName() { return "mystart"; } public String getUsage() { return "mystart <id> [<id> ...]"; } public String getShortDescription() { return "start bundle(s)."; } public void execute(String s, PrintStream out, PrintStream err) { StringTokenizer st = new StringTokenizer(s, " "); // Ignore the command name. st.nextToken(); // There should be at least one bundle id. if (st.countTokens() >= 1) { while (st.hasMoreTokens()) { String id = st.nextToken().trim(); try { long l = Long.valueOf(id).longValue(); Bundle bundle = m_context.getBundle(l); if (bundle != null) { bundle.start(); } else { err.println("Bundle ID " + id + " is invalid."); } } catch (NumberFormatException ex) { err.println("Unable to parse id '" + id + "'."); } catch (BundleException ex) { if (ex.getNestedException() != null) err.println(ex.getNestedException().toString()); else err.println(ex.toString()); } catch (Exception ex) { err.println(ex.toString()); } } } else { err.println("Incorrect number of arguments"); } } }
A bundle activator class is needed for packaging the command servce; the bundle activator registers the command service in its start() method. Note: You do not need one activator per command, a single activator can register any number of commands.
package test; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; public class MyStartActivator implements BundleActivator { private transient BundleContext m_context = null; public void start(BundleContext context) { m_context = context; // Register the command service. context.registerService( org.apache.felix.shell.Command.class.getName(), new MyStartCommandImpl(m_context), null); } public void stop(BundleContext context) { // Services are automatically unregistered so // we don't have to unregister the factory here. } }
To compile these classes you will need to have the framework.jar file on your class path. Compile all of the source files using a command like:
java -d c:\classes *.java
This command compiles all of the source files and outputs the generated class files into a subdirectory of the c:\classes directory, called test, named after the package of the source files; for the above command to work, the c:\classes directory must exist. Once you have compiled all of the above classes, you need to create a bundle JAR file of the generated package directory. The bundle JAR file needs a manifest, so create a file called manifest.mf with the following contents:
Bundle-Name: My Start Command
Bundle-Description: A 'start' command for the shell service.
Bundle-Activator: test.MyStartActivator
Bundle-ClassPath: .
Import-Package: org.apache.felix.shell
To create the bundle JAR file, issue the command:
jar cfm mystart.jar manifest.mf -C c:\classes test
This command creates a JAR file using the manifest you created and includes all of the classes in the test directory inside of the c:\classes directory. Once the bundle JAR file is created, you are ready to add the command service to the shell service; simply start Felix and install and start the bundle created by the above command. By doing so, the new mystart command is made available via the shell service.
Security and the Shell Service
The shell service security handling is quite simple, all security is handled by the standard OSGi framework mechanisms. For example, if a bundle should not be able to register a shell service, then it should not be given the corresponding service permission. Security handling may change in future release after some experience is gained through usage.
Feedback
Subscribe to the Felix users mailing list by sending a message to<EMAIL_ADDRESS>after subscribing, email questions or feedback to users@felix.apache.org.


XSLTdoc - A Code Documentation Tool for XSLT
XSLTdoc is a Javadoc-like tool for all versions of XSLT (1.0, 1.1, 2.0). It defines conventions to document XSL "code elements" directly in the source code. These "documentation elements" are then extracted by the XSLTdoc tool to build a documentation consisting of several linked HTML pages which provide easy browsing through the documentation. The XSLT source code is available with syntax highlighting.
XSLTdoc was developed in a project funded by the European Space Agency under contract 18664/04/NL/LvH.XSLTdoc is written in XSLT 2.0 and is documented with XSLTdoc (This page). It is freely available on a GPL licence.
Project Page on SourceForge.
Please use the Forum on SourceForge if you need help or have comments on XSLTdoc.
Table of Contents
- News
- Features
- Installing XSLTdoc
- Running XSLTdoc
- Documenting the code
- Download
- Copyright And License
News
January 16, 2009
A bugfix release 1.2.1 is available for download.
Changelog
- Changed output format from XML to XHTML
- Changed output encoding to UTF-8
- Fixed a bug where xd:detail was not printed
xml:xd
inline tag supports anhref
attribute which allows to include external XML markup- Enabled the Forum on sourceforge
December 14, 2007
Release 1.2 is available for download.
Thanks to Johannes Katelaan and Sascha Mantscheff for their contributions.
New Features
- added section for documentation on xsl:variable
- added section for documentation on xsl:attribute-set
- implemented
xd:link
for referencing templates - supports
xsl:key
elements
January 5, 2005
Release 1.1 is available for download
December 20, 2004
Released Version 1.0.1
Features
- Documentation is embedded in the XSL program
- Documenting of XSLT 2.0 functions
- Syntax highlighted source code browsing
- Generates documentation a whole set of stylesheets
- Generates documentation for included and imported stylesheets
- Layout is customizeable with CSS stylesheets
- Site layout is based on a customizeable/interchangeable html template
- Easely extensible with new tags
- Open source under GPL license
- Written in XSLT
Installing XSLTdoc
Installation of XSLTdoc is simply done by unzipping the XSLTdoc distribution file in a dedicated target directory (usually called XSLTdoc).
Running XSLTdoc
XSLTdoc is written in XSLT 2.0. You need an XSLT 2.0 processor to run it. The downloadable package of XSLTdoc includes the free version of the Saxon XSLT and XQuery Processor from Saxonica Limited, which needs an installation of a java virtual machine to be run.
To generate a documentation for one or more XSLT programs you need to write a configuration file which inlcudes all the information needed for the generation process. The configuration file is a simple XML file. Use the template below as a starting point for your own configuration file. Not mandatory elements are marked.
<?xml version="1.0" encoding="UTF-8"?> <XSLTdocConfig> <Title>The title used on the main page</Title> <Introduction> This section is copied to the main documentation page. It can include any HTML tags. </Introduction>  <TargetDirectory path="../doc"/>  <SourceDirectory path="./"/>  <RootStylesheets> <File href="xsltdoc.xsl"/> <File href="test.xsl"/> </RootStylesheets>  <AdditionalCSS> <File href="print.css" media="print"/> </AdditionalCSS> </XSLTdocConfig>
To start the generation process use the configuration file as the input for the xsltdoc.xsl program. The command using Saxon 8 XSLT processor looks like this (while being in the XSLTdoc installation folder):
java -jar lib/saxon8.jar <configuration file> xsl/xsltdoc.xsl
Fonts, colors and layout of the HTML documentation are defined in two CSS files which can be found in the CSS folder of the installation. Copy both files to the folder where the documentation was generated. With ant this step can easily be automated. See the build.xml ant-file that is used to generate the documentation for XSLTdoc as an example:
<?xml version="1.0" standalone="yes" ?> <project name="XSLTdoc" default="xsltdoc" basedir="."> <description>Ant Build file for the XSLTdoc program</description> <path id="classpath"> <pathelement location="lib/saxon8.jar" /> <pathelement path="${java.class.path}" /> </path> <target name="xsltdoc"> <delete dir="doc" /> <copy todir="doc"> <fileset dir="css"> <filename name="*.css" /> </fileset> </copy> <xslt force="true" style="xsl/xsltdoc.xsl" in="xsl/XSLTdocConfig.xml" out="doc/log.txt">  <classpath refid="classpath" /> </xslt> <delete dir="doc/log.txt"/> </target> </project>
Documenting the code
Documentation elements are written in XML. Because XSLT is expressed in
XML too, it is necessary to define a new namespace for XSLTdoc to enable a
XSLT processor to distinguish between documentation and source code. The
URI for this namespace is
http://www.pnp-software.com/XSLTdoc
. This namespace must be
declared in any stylesheet which uses XSLTdoc for documenting. Example:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xd="http://www.pnp-software.com/XSLTdoc" version="2.0"> ... <xsl:stylesheet>
General documenting rules
The documentation is normally added before the source element that should
be documented. Generally this looks like this (with the XSLTdoc namespace
mapped to xd
):
<xd:doc> ... </xd:doc> <xsl:...>
Any XSLTdoc documentation is enclosed in a xd:doc
element.
If you just want to write a plain text comment the xd:doc
element can contain simple text.
Text before the first period is considered as short description, the remaining as detailed description:
<xd:doc> This is the short description. And here comes a more detailed description that appears in the detailed view of the documentation only. </xd:doc> <xsl:...>
If you use this technique no HTML elements are allowed in the text. If you want to use HTML tags within short and detailed description the text for the short and detailed description needs to enclosed in special XSLTdoc tags:
<xd:doc> <xd:short>This is the short description with HTML tags.</xd:short> <xd:detail> And here comes a more detailed description showed only in the detailed view of the documentation. <xd:detail> </xd:doc> <xsl:...>
Stylesheet documentation
The documentaion of a stylesheet is the only exception where the documentation
is written as a subelement of the target element (xsl:stylesheet). To mark a documentation element
as a stylesheet documentation the type attribute of the xd:doc
element must be set to 'stylesheet'.
A stylesheet documentation can have the following subelements (properties): xd:author, xd:copyright, xd:cvsId, xd:svnId:
<xsl:stylesheet ...> <xd:doc type="stylesheet"> ... <xd:author>ibirrer</xd:author> <xd:copyright>P&P Software, 2007</xd:copyright> <xd:cvsId>$Id: XSLTdocConfig.xml 42 2009-01-16 15:02:32Z ibirrer $</xd:cvsId> <xd:doc/> ... <xsl:stylesheet>
Properties can be added by writing a property extension. See the properties directory of the XSLTdoc installation for examples.
Stylesheet Parameter
To document a stylesheet parameter you can use the type attribute of the xd:doc element to define its type:
<xsl:stylesheet ...> ... <xd:doc type="string"> A Stylesheet parameter of type string. </xd:doc> <xsl:param name="outputDir"/> ... </xsl:stylesheet>
Function/Template Documentation
The parameter of a template or a function can be described with a
xd:param
element. The name attribute is obligatory for
templates and functions while the type attribute is optional for
template definitions.
<xd:doc> A template with a parameter of the type string. <xd:param type="string">The string to be processed.</xd:param> </xd:doc>
Look at the source code of the XSLTdoc tool for more examples. The source code is accessible through this website. Just go to a detailed description of a template or function and click on the source link.
Inline tags
You can use so called inline tags to tag special parts inside a xs:short
or xd:detail
element:
The xd:xml inline tag can be used to to print print an xml to the output. The whole xml inside the tag is transformed to html by XSLTdoc.
<xd:doc> <xd:detail> The following XML inside the xd:xml tag is printed exactly as it shows here: <xd:xml>    Bla   </xd:xml> <xd:detail> </xd:doc> <xsl:...>
Download
Downloads are available through the sourceforge project page.
By downloading any of these files you are accepting the licence condition stated below.
Copyright And Licence
The software and documenation downloadable from this site is made up of the following items:
- Software and documentation for the XSLTdoc documentation tool. The copyright for these items belongs to P&P Software. These items can be downloaded and used under the terms of the GNU General Public Licence.
- The The Saxon XSLT and XQuery Processor from Saxonica Limited. This software is used and distributed in accordance with the terms of the Mozilla Public License Version 1.0.
- The XML to HTML Verbatim Formatter with Syntax Highlighting. This software was downloaded from http://www.informatik.hu-berlin.de/~obecker/XSLT/. There was no license information available on this site at the time of downloading (October 2004).


Bespoke.js
DIY Presentation Micro-Framework
Press up and down keys
to view example themes.
Fork me on GitHub