Manage Synapse Credentials¶
There are multiple ways one can login to Synapse. We recommend users to choose the method that fits their workflow.
One Time Login¶
Use username
and password
to login as follows:
import synapseclient
syn = synapseclient.login("username", "password")
Alternately you can login using a personal access token token obtained from synapse.org under your Settings. Note that a token must minimally have the view scope to be used with the Synapse Python Client.
syn = synapseclient.login(authToken="authtoken")
Use Environment Variable¶
Setting the SYNAPSE_AUTH_TOKEN
environment variable will allow you to login
to Synapse with a personal access token
The environment variable will take priority over credentials in the user’s .synapseConfig
file
or any credentials saved in a prior login using syn.login(rememberMe=True)
.
In your shell, you can pass an environment variable to Python inline by defining it before the command:
SYNAPSE_AUTH_TOKEN='<my_personal_access_token>' python3
Alternatively you may export it first, then start: Python
export SYNAPSE_AUTH_TOKEN='<my_personal_access_token>'
python3
Once you are inside Python, you may simply login without passing any arguments:
import synapseclient
syn = synapseclient.login()
To use the environment variable with the command line client, simply substitute python
for the synapse
command
SYNAPSE_AUTH_TOKEN='<my_personal_access_token>' synapse get syn123
SYNAPSE_AUTH_TOKEN='<my_personal_access_token>' synapse store --parentid syn123 ~/foobar.txt
Or alternatively, for multiple commands:
export SYNAPSE_AUTH_TOKEN='<my_personal_access_token>'
synapse get syn123
synapse store --parentid syn123 ~/foobar.txt
Use .synapseConfig
¶
For writing code using the Synapse Python client that is easy to share with others, please do not include your credentials in the code. Instead, please use .synapseConfig file to manage your credentials.
When installing the Synapse Python client, the .synapseConfig is added to your home directory. Open the .synapseConfig file and find the following section:
#[authentication]
#username = <username>
#password = <password>
#authtoken = <authtoken>
To enable this section, uncomment it. You will only need to specify either username
and password
as a pair, or authtoken
. For security purposes, we recommend that you use authtoken
instead of username
and password
. A personal access token generated from your synapse.org Settings can be used as your .synapseConfig authtoken.
[authentication]
authtoken = <authtoken>
Now, you can login without specifying any arguments:
import synapseclient
syn = synapseclient.login()
For legacy compatibility, the .synapseConfig
[authentication]
section also supports apikey
, which can be used instead of username
+ password
pair, or authtoken
, however apikey
support in the .synapseConfig is considered deprecated in favor of personal access tokens (authtoken
) which
can be scoped to certain functions and are revocable. If needed, your legacy apikey
can also be obtained from your synapse.org Settings.
Letting the Operating System Manage Your Synapse Credentials¶
For users who would like to save their credentials and let other OS configured applications (like keychain in Mac) manage credentials for them, when logging in for the first time, use:
import synapseclient
syn = synapseclient.login("username", "password", rememberMe=True)
The application (keychain in Mac) will then prompt you to allow Python to access these credentials. Please choose “Yes” or “OK”.
The second time you login, you will not have to enter any arguments to login()
:
import synapseclient
syn = synapseclient.login()


Here's how you can have a hidden data table so it doesn't take up screen real estate all the time.
You can do the same with images and other tags.
Hide/Show The Lion


Select Authors
Chetan Bhagat
Born: 22 April 1974 (age 42)
New Delhi, India
Language: English (Novels and Columns), Hindi (Columns)
Nationality: Indian
Ethnicity: Punjabi
Period: 1969–present
Genre: Fiction, Romance, Realistic Fiction, Non-fiction
Notable works:
Five point someone
One Night @ the Call Center
2 States: The Story of My Marriage
The 3 Mistakes of My Life


Overview Data Flow Sources
DBSource
The DBSource is the most common data source for a data flow. It basically connects to a database via ADO.NET and executes a SELECT-statement to start reading the data. While ADO.NET is reading from the source, data is simutaneously posted into the dataflow pipe.
To initialize a DBSource, you can either hand over a TableDefinition
, a SQL-statement or a tablename.
The DBSource needs to be defined with a POCO that matches the data types of the data.
Usage example:
public class MySimpleRow {
public string Value1 { get; set; }
public int Value2 { get; set; }
}
DBSource<MySimpleRow> source = new DBSource<MySimpleRow>(
$@"select Value1, Value2 from dbo.Test"
);
DBDestination
Like the DBSource
, the DBDestination
is the common component for sending data into a database. It is initalized with a table name or a TableDefinition
.
Usage example:
DBDestination<MySimpleRow> dest = new DBDestination<MySimpleRow>("test.Destination");
Sql Server Connections
The DBSource
and DBDestination
can be used to connect via ADO.NET to a sql server. Use the ConnectionString
object and a SqlConnectionManger
to create a regular ADO.NET connection.
ControlFlow.CurrentDbConnection = new SqlConnectionManager(new ConnectionString("Data Source=.;Integrated Security=SSPI;Initial Catalog=ETLBox;"));
SMO Connection Manager
The SMOConnectionManager
uses Sql Server Managed Objects to connect to a Sql Server. It allow the use of the GO keyword within your SQL to separate batches. It can be used with a ConnectionString
.
ControlFlow.CurrentDbConnection = new SMOConnectionManager(new ConnectionString("Data Source=.;Integrated Security=SSPI;Initial Catalog=ETLBox;"));
ODBC Connections
The DBSource
and DBDestination
also works with ODBC connection. Use an OdbcConnectionManager
and an OdbcConnectionString
. You will still use the underlying ADO.NET, but it allows you not only to connect to SQL Server but to all databases that support ODBC.
OdbcConnectionManager con = new OdbcConnectionManager(new OdbcConnectionString("Driver={SQL Server};Server=.;Database=ETLBox;Trusted_Connection=Yes;"));
Warning: ODBC does not support bulk inserts. The DBDestination
will do a bulk insert by creating a sql insert statement that
has multiple values: INSERT INTO (..) VALUES (..),(..),(..)
Warning: Not all Control Flow Tasks may be supported when using ODBC connections!
Access DB Connections
The ODBC connection to Microsoft Access databases have some more restrictions. ETLBox is based .NET Core and will only
support 64bit ODBC connections. You need also have Microsoft Access 64 bit installed. (The corresponding 64bit ODBC driver for Access can be download
Microsoft: Microsoft Access Database Engine 2010 Redistributable
To create a connection to an Access Database, use the AccessOdbcConnectionManager
and an OdbcConnectionString
.
ControlFlow.CurrentDbConnection = new AccessOdbcConnectionManager(new OdbcConnectionString("Driver={Microsoft Access Driver (*.mdb, *.accdb)}DBQ=C:\DB\Test.mdb")) {
AlwaysUseSameConnection = false
};
Warning: The DBDestination
will do a bulk insert by creating a sql statement using a sql query that Access understands. The number of rows per batch is very limited - if it too high, you will the error message 'Query to complex'. Try to reduce the batch size to solve this.
Note: Please note that the AccessOdbcConnectionManager will create a "temporary" dummy table containing one record in your database when doing the bulk insert. After completion it will delete the table again. This was necessary to simulate a bulk insert with Access-like Sql.
CSVSource
A CSV source simple reads data from a CSV file. Under the hood is the 3rd party library CSVHelper
. There are several configuration options for the Reader.
The default output data type of the CSVReader is a string array. You can either use a RowTransformation
to transform it into the data type you need, or use
the generic implementation CSVSource.
//Returns string[] as output type for other compoments
CSVSource source = new CSVSource("Demo.csv") {
Delimiter = ";",
SourceCommentRows = 2
}
CSVSource<CSVData> source = new CSVSource<CSVData>("Demo.csv");
ExcelSource
An Excel source reads data from a xls or xlsx file. It uses the 3rd party library ExcelDataReader
. By default the excel reader will try to read all data
in the file. You can specify a sheet name and a range to restrict this behaviour.
Usage example:
ExcelSource<ExcelData> source = new ExcelSource<ExcelData>("src/DataFlow/ExcelDataFile.xlsx") {
Range = new ExcelRange(2, 4, 5, 9),
SheetName = "Sheet2"
};


Please fill in this probability distribution according to how you think you will perform this season: But first, please check out your team and see how your team did this week.


Shropshire Star comment: Let down by the political class
by Shropshire StarIf you wonder which politicians will win the general election, our survey of readers has already given the answer.
None will. They are all losers. They have collectively lost the trust and confidence of voters. As the electorate goes to the polls next month, it will not be voting for the best set of politicians to lead the country, but for the least worst in a bad bunch.
They are incapable of giving an uplifting vision for the country because even when they do mouth the words, nobody believes them.
Results in full:
The upshot of that is that our survey shows an undercurrent of pessimism for the future of the nation and for those who are leading us.
In answer to the question of whether British politicians are doing a good job, the percentage of respondents who think they are is in low single figures.
These days people easily slip into the language of crisis and emergency, such as in the cases of climate change and the need for new housing, but here is a crisis at the heart of our democracy.
Those people who represent the people are perceived to have let them down, big time.
Our survey will make easier reading for Boris Johnson than Jeremy Corbyn.
Boris is perceived to be by far the more fitting of the two to be Prime Minister.
If this turns out to be the verdict of the country next month, then it will pose an awkward question for Labour, which is fighting the campaign on its most radical manifesto for years, clearly shaped by the Corbyn-McDonnell axis.
Lesson
There will be much recrimination about its all-things-to-all-people Brexit policy, which appears to have failed to hit the mark, with around a quarter of voters, as shown in our poll, not even understanding what the policy is in the first place.
But remember, Labour does not have to win, to win.
Indeed, Brexiteer cynics might say that the lesson of the 2016 referendum is that losing is the new winning.
Take a core of Labour MPs, stir in the SNP, add a sprinkling of Lib Dems, and you’ve got an oven-ready coalition, although it would be called an informal working agreement or something like that because of sensibilities in relation to that c-word.
It’s the sort of scenario to get them breaking out in cold sweats at Conservative Party headquarters.
Only one result will do for Boris Johnson – one in which he gains an overall majority, and from his point of view ideally one in which Labour suffers a decisive electoral rejection which demonstrates that its sharp turn left has taken it down a political blind alley.
General elections are usually political campaigns fought on many different fronts.
Yet in our survey, Brexit even comes ahead of both the NHS and the economy in voters’ priorities. To Leavers and to Remainers alike, the Brexit issue is crucial.
However much a weary country would like to move on, the numbers in the last Parliament made that impossible.
The worst result of all in the current circumstances would be a general election that changes nothing – a vote that is in effect a waste of time, allowing the deadlock and the agony to continue unabated.
Then we’ll all lose.


Rat Race
Rat Race
The ash from John’s limp cigarette fell to the ground, lost in a sea of stains and scars upon the concrete steps on which he sat. His last warm breath hung in the cold air just long enough to be seen before it drifted east with a rush of the city’s wind and whines.
“You know, Henry, sometimes, I just don’t get it.”

“I’m no spring chicken. I’ve been around. I’ve watched this city grow. I’ve watched this city prosper. I saw the planes hit the buildings. I saw the projects become condos. I seen it all.”
His cigarette drew limper still after another agitated drag.
“This is my city, ya know? And I’ve been good to her. But this fahkin’ bitch, I tell ya, she hasn’t been any good to me. I help this old lady with her bags? What’s my reward? She thinks I’m tryin’ to steal from her and smacks me with ‘er fahkin’ purse.”
Henry fidgeted, discomforted by John’s hostility. He listened on.
“I’ve worked hard. Spent all my good years working for the man, doing the best I could, tryin’ do right by the ‘game’. And now what?  Poverty don’t take me, heart prolly will.”
Another cigarette drag by one. Another wince by the other.
“Why do we do this, man?  This fahkin’ system sucks, you know. We’re just scurrying around trying to get some cheddah. This can’t be all there is. It’s garbage.
The two sat quiet a moment, before John righted himself and apologized:
“This fahkin’ rat race just really gets to me, you know?”
Henry, not one to dwell, remained quiet. The rat then scurried away.


Step 1 of 2 - Check your answers Your response to the claim
{% else %}Check your answers before submitting your response
{% endif %} {% if data.counterclaim=="true" %} {%else%}
Your details |
||
|---|---|---|
| Name | Mrs Mary Richards | Change Name |
| Address |
101 Regents road Shiplake Henley on Thames RG9 4BW |
Change Name |
| Correspondence address |
{% if data['correspondence-address']=="Yes" %}
{{data['d-addressLine1']}} {{data['d-addressLine2']}} {{data['d-address-town']}} {{data['d-addressPostcode']}} {% else %} Same as address {% endif %} |
|
| Date of birth | {% if data['day']!="" %} {{ ( data['month'] + ' ' + data['day'] + ' ' + data['year']) | date('D MMMM YYYY') }} {% elseif data['day']=="" %} 31 January 1970 {% endif %} | Change Name |
| Contact number (optional) | {% if data['check'] =='9' or data['check'] =='8' %}07824999612{% else %}{{data['day']}} {{data['month']}} {{data['defendant-phone']}}{% endif %} | Change Name |
Your response to the claim |
||
|---|---|---|
| Do you owe the money claimed? | {% if data.radio_select_group=="all" or data['check']== 1 or data['check']== 2 or data['check']== 3%} I admit all of the claim {% elseif data.radio_select_group=="Some" or data.radio_select_group=="some_cc" or data['check']== 4 or data['check']== 5 or data['check']== 6 or data['check']== 7 or data['check']== 14%} I admit part of the claim {% elseif data.radio_select_group=="reject" or data.radio_select_group2=="paid" or data.radio_select_group2=="amount_claimed" or data['check']== 8 or data['check']== 9 or data['check']== 12%} I reject all of the claim {% else %} I admit all of the claim {% endif %} | Change Name |
| Why do you reject all the claim? | {% if data.radio_select_group=="Paid" or data['check']== 8 or data.radio_select_group2=="amount_claimed" %} I've paid what I believe I owe {% elseif data.radio_select_group2=="defend_now" or data.radio_select_group2=="defend_now_cc" or data['check']== 9 or data['check']== 12%} Because I dispute the claim {% else %} I've paid what I believe I owe {% endif %} | Change Name |
| How much have you paid the claimant? | The amount claimed | Change Name |
Response details |
|||||
|---|---|---|---|---|---|
| When did you pay this amount? | {% if data['amount-day']!="" %} {{ ( data['amount-month'] + ' ' + data['amount-day'] + ' ' + data['amount-year']) | date('D MMMM YYYY') }} {% else %} 31 January 2018 {% endif %} | ||||
| How did you pay the amount claimed? | {% if data['owe-reason']!="" %} {{data['owe-reason']}} {% else %} I've already paid a large amount {% endif %} | ||||
| Why you disagree with the claim |
{% if data['check'] =='9' or data['check'] =='8' or data['check']== 12 %}
Mary Richards and I signed a contract for building works on our roof. The work on the roof was completed but there was a problem with one section. I asked Mary Richards to get the problem fixed, but hadn't had a reply. I'll have to get another builder to rectify the problem which will cost me £1,500. Therefore, I'm making a money claim for £1,500 to compensate for the extra money I am going to need to spend. {% else %} {{data['defence-disagree-claim']}}{% endif %} |
Change Name | |||
| How much money do you admit you owe? | {% if data['check'] =='5' or data['check'] =='6' %} £300.00 {% else %} £{{data['owe-amount']}}{% endif %} | Change Name | |||
| Why are you disputing the full amount? | {% if data['check'] =='5' or data['check'] =='6' %} Because i don't owe them that much money. {% else %} {{data['owe_amount_why']}}{% endif %} | ||||
| Your timeline of what happened (optional) | Change Why you believe you're owed the money | ||||
| {% else %} | {% endif %} {% if data['check'] =='9' %}1 April 2017{% else %}{{data['cd-date-1']}}{% endif %} | {% if data['cd-timeline-2'] !='' %}{% else %} | {% endif %} {% if data['check'] =='9' %}I contacted Jan Clark to discuss building works on our roof.{% else %}{{data['cd-timeline-1']}}{% endif %} | {% if data['cd-timeline-2'] !='' %}{% else %} | {% endif %} |
| {% if data['check'] =='9' %}7 April 2017{% else %}{{data['cd-date-2']}}{% endif %} | {% if data['check'] =='9' %}We agreed what work should be done and signed a contract.{% else %}{{data['cd-timeline-2']}}{% endif %} | ||||
| Comments about their timeline (optional): | {% if data['check'] =='9' %}They are exaggerating the what happened. My side of the story is this....{% else %} {{data['defence-disagree-timeline']}}{% endif %} | ||||
| Your evidence (optional) | Change Why you believe you're owed the money | ||||
| {% if data['check'] =='9' %}Contracts and agreements{% else %} {% if data['legal-status1'] == 2 %}Contracts and agreements - {% endif %} {% if data['legal-status1'] == 3 %}Expert witness - {% endif %} {% if data['legal-status1'] == 4 %}Letters, emails and other correspondence - {% endif %} {% if data['legal-status1'] == 5 %}Photo evidence - {% endif %} {% if data['legal-status1'] == 6 %}Receipts - {% endif %} {% if data['legal-status1'] == 7 %}Contracts and agreements - {% endif %} {% if data['legal-status1'] == 'other' %}Statements of account - {% endif %} {% endif %} | {% if data['check'] =='9' %}I have a signed contract showing that you broke the contract agreement.{% else %}{{data['legal-status-description-1'] }}{% endif %} | ||||
| {% if data['check'] =='9' %}Photos {% else %} {% if data['legal-status2'] == 2 %}Contracts and agreements - {% endif %} {% if data['legal-status2'] == 3 %}Expert witness - {% endif %} {% if data['legal-status2'] == 4 %}Letters, emails and other correspondence - {% endif %} {% if data['legal-status2'] == 5 %}Photo evidence - {% endif %} {% if data['legal-status2'] == 6 %}Receipts - {% endif %} {% if data['legal-status2'] == 7 %}Contracts and agreements - {% endif %} {% if data['legal-status2'] == 'other' %}Statements of account - {% endif %} {% endif %} | {% if data['check'] =='9' %}The photos I've taken show the poor workmanship of the roof repair.{% else %}{{data['legal-status-description-2'] }}{% endif %} | {% endif %} | |||
| Comments about their evidence (optional) | {% if data['check'] =='9' %}I never received any of these emails. Also the photos arent a fair refection of my work.{% else %} {{data['defence-disagree-evidence']}}{% endif %} | ||||
When you'll pay |
||
|---|---|---|
| When will you pay | {% if data['radio-pay-group']=="Immediately" or data['check']== 1 or data['check']== 4%} The full amount, no later than {{ now | date( 'add', 5, 'days') | date }} {% elseif data['radio-pay-group']=="Instalments" or data['check']== 2 or data['check']== 5%} By instalments {% elseif data['radio-pay-group']=="Set-date" or data['check']== 3 or data['check']== 6%} The full amount, no later than {% if data['set-day']!="" %} {{ ( data['set-month'] + ' ' + data['set-day'] + ' ' + data['set-year']) | date('D MMMM YYYY') }} {% else %} 31 January 2018 {% endif %} {% else %} The full amount, no later than {% endif %} | Change Name |
| Regular payments of | {% if data['instalment-first-payment']!="" %} £{{data['instalment-first-payment']}} {% else %} £200 {% endif %} | Change Name |
| Frequency of payments | {% if data['radio-payment-frequency'] %} {{data['radio-payment-frequency']}} {% else %} Monthly {% endif %} | |
| Make the first payment on | {% if data['instalment-day']!="" %} {{ ( data['instalment-month'] + ' ' + data['instalment-day'] + ' ' + data['instalment-year']) | date('D MMMM YYYY') }} {% else %} 31 March 2018 {% endif %} | |
| Explain why you can't pay the full amount now | ||
| Explain why you can't pay within the 28 days | {% if data['non-payment-reason']!="" %} {{data['non-payment-reason']}} {% else %} I don't earn enough money to pay all at once {% endif %} | Change Name |
Your financial details |
||
|---|---|---|
| Where are you living? | Home you own yourself (including if you have a mortgage) | Change Name |
| Children | Change Name | |
| Do any children live with you? | Yes | |
| 16 to 19 | 1 | |
| Number of children aged 16 to 19 full-time education or training | 1 | Change Name |
| Maintenance | Change Name | |
| Do you or your partner pay maintenance for any children? | Yes | |
| Number of children | 2 | |
| Financial support | Change Name | |
| Do you support anyone else financially? | Yes | |
| Number of people | 1 | |
| Give details | Reason goes here | |
| Employment details | Change Name | |
| Are you currently working? | Yes | |
| Type of job | Employed and self-employed | |
| Who employs you? | Change Name | |
| Employer name | Smith Inc | |
| Job title | HR manager | |
| Self-employment details | Change Name | |
| Job title | Accountant | |
| Annual turnover | £200,000.00 | |
| Are you behind on tax payments? | Yes | |
| Amount you owe? | £30 | |
| Reason | Reason goes here | |
| Bank and savings accounts | Change Name | |
| 1. Type of account | Savings | |
| Balance | £100 | |
| Joint account | Yes | |
| 2. Type of account | Bank | |
| Balance | £1000 | |
| Joint account | Yes | |
| Monthly income | Change Name | |
| Take home pay | £12 | |
| Child Benefit | £23 | |
| Other income | £43 | |
| Monthly expenses | Change Name | |
| Mortgage | £3443 | |
| Council Tax | £120 | |
| Gas | £13 | |
| Debts | Change Name | |
| Do you have any debts? | Yes | |
| 1. Debt | Paying back loan to parent | |
| Total owed | £120 | |
| Monthly payments | £13 | |
| 2. Debt | Another debt | |
| Total owed | £1220 | |
| Monthly payments | £130 | |
| Court orders | Change Name | |
| Has a court ordered you to pay anyone else? | Yes | |
| Details about court orders | Details go here | |
| Amount you owe | £130 |
Settlement agreement |
||
|---|---|---|
| The offer | {% if data['radio-pay-group']=="Immediately" %} I will pay the full amount immediately. You will receive the money no later than {{ now | date( 'add', 5, 'days') | date }}. Any cheques or transfers will be clear in your account by this date. {% elseif data['radio-pay-group']=="Instalments" %} I will pay instalments of {% if data['instalment-first-payment'] %} £{{data['instalment-first-payment']}} {% else %} £200 {% endif %} {% if data['radio-payment-frequency'] %} {{ data['radio-payment-frequency'] | lower }}{% else %} every month{% endif %}. I will pay the first instalment by {% if data['instalment-day'] %} {{ ( data['instalment-month'] + ' ' + data['instalment-day'] + ' ' + data['instalment-year']) | date('D MMMM YYYY') }}{% else %} 31 March 2018{% endif %}. {% elseif data['radio-pay-group']=="Set-date" %} I will pay the full amount, no later than {% if data['set-day']!="" %} {{ ( data['set-month'] + ' ' + data['set-day'] + ' ' + data['set-year']) | date('D MMMM YYYY') }} {% else %} {{ date | date('add', 1, 'year') | date('D MMMM YYYY') }} {% endif %} {% else %} I will pay the full amount, no later than {{ date | date('add', 1, 'year') | date('D MMMM YYYY') }}. {% endif %} | Change Name |
| Completion date | {% if data['radio-pay-group']=="Immediately" %} {{ now | date( 'add', 5, 'days') | date }} {% elseif data['radio-pay-group']=="Instalments" %} {{ ( data['instalment-month'] + ' ' + data['instalment-day'] + ' ' + data['instalment-year']) | date('add', 1, 'year') | date('D MMMM YYYY') }} {% elseif data['radio-pay-group']=="Set-date" %} {% if data['set-day']!="" %} {{ ( data['set-month'] + ' ' + data['set-day'] + ' ' + data['set-year']) | date('D MMMM YYYY') }} {% else %} {{ date | date('add', 1, 'year') | date('D MMMM YYYY') }} {% endif %} {% else %} {{ date | date('add', 1, 'year') | date('D MMMM YYYY') }} {% endif %} | Change Name |
Free mediation |
||
|---|---|---|
| Will you try mediation? | {% if data['radio-mediation-group']=="Yes" or data['check']== 12 %} Yes {% else %} No {% endif %} | Change Name |
Statement of truth
The information on this page forms your response. You can see it on the response form after you submit.
When you’re satisfied that your answers are accurate, you should tick to “sign” this statement of truth on the form.
{% if data['claimant-type']=="Company" or data['claimant-type']=="Organisation" or data['check']==10%}You must hold a senior position in your company to sign the statement of truth.
Types of senior position
A senior position could be a
- director
- treasurer
- chief executive
- manager or other officer of the company or corporation
If your company isn't registered, a senior position could also be the
- mayor
- chairman
- president
- town clerk or other similar officer of the corporation


Community backlog for {{.Lang | printNiceLang}}
{{if .CurationSuggestions}}Expert validation
It is extremely valuable to curate the {{.Lang | printNiceLang}} contents. Would you like to review these implementations?
If they can be improved, please help yourself. If you know a better way, please create a distinct entry. If they're broken, please flag them.
🗘For many more {{.Lang | printNiceLang}} snippets to curate, see the full list.


[ FELIPE ALVES ]
{ Front-end Developer }
ABOUT ME
I am Felipe Alves, 29 years old and I am from Armação de Búzios - RJ.
I study every day, and I am looking to grow in this area, which enchanted me.
I want to be part of the future and current conquests of the company, to be able to add knowledge and also contribute to the team.
More details can be found in my LinkedIn.
SKILLS
I am always aware of the market, incorporating new technologies and methods according to my needs.
- HTML 5
- CSS 3
- JavaScript
- ReactJS
- Git
- Responsividade
- TypeScript


{{payouts::summary::currentBlockchainHeight}}
{{payouts::summary::latestFoundBlockAge}}
{{payouts::summary::averageTimeToFindOneBlock}}
{{payouts::summary::totalBlockFoundbyPool}}


{% extends "base.html" %} {% block content %} {{ super() }} {% if weather %}
{{ weather[0]['temperature'] }}°C |
You don't have a hometown set.


Class BasicEntityPersister
A BasicEntityPersister maps an entity to a single table in a relational database.
A persister is always responsible for a single entity type.
EntityPersisters are used during a UnitOfWork to apply any changes to the persistent state of entities onto a relational database when the UnitOfWork is committed, as well as for basic querying of entities and their associations (not DQL).
The persisting operations that are invoked during a commit of a UnitOfWork to
persist the persistent entity state are:
- Doctrine\ORM\Persisters\BasicEntityPersister::addInsert()
: To schedule an entity for insertion. - Doctrine\ORM\Persisters\BasicEntityPersister::executeInserts()
: To execute all scheduled insertions. - Doctrine\ORM\Persisters\BasicEntityPersister::update()
: To
update the persistent state of an entity. - Doctrine\ORM\Persisters\BasicEntityPersister::delete()
: To delete the
persistent state of an entity.
As can be seen from the above list, insertions are batched and executed all at once for increased efficiency.
The querying operations invoked during a UnitOfWork, either through direct
find requests or lazy-loading, are the following:
- Doctrine\ORM\Persisters\BasicEntityPersister::load()
: Loads (the state of) a single, managed entity. - Doctrine\ORM\Persisters\BasicEntityPersister::loadAll()
: Loads multiple, managed entities. - Doctrine\ORM\Persisters\BasicEntityPersister::loadOneToOneEntity()
:
Loads a one/many-to-one entity association (lazy-loading). - Doctrine\ORM\Persisters\BasicEntityPersister::loadOneToManyCollection()
: Loads a one-to-many entity association
(lazy-loading). - Doctrine\ORM\Persisters\BasicEntityPersister::loadManyToManyCollection()
: Loads a many-to-many entity
association (lazy-loading).
The BasicEntityPersister implementation provides the default behavior for persisting and querying entities that are mapped to a single database table.
Subclasses can be created to provide custom persisting and querying strategies, i.e. spanning multiple tables.
Direct known subclasses
Doctrine\ORM\Persisters\AbstractEntityInheritancePersister, Doctrine\ORM\Persisters\UnionSubclassPersisterIndirect known subclasses
Doctrine\ORM\Persisters\JoinedSubclassPersister, Doctrine\ORM\Persisters\SingleTablePersisterAuthor: Roman Borschel<EMAIL_ADDRESS>Author: Giorgio Sironi<EMAIL_ADDRESS>Author: Benjamin Eberlei<EMAIL_ADDRESS>Author: Alexander<EMAIL_ADDRESS>Author: Fabio B. Silva<EMAIL_ADDRESS>Since: 2.0
Located at vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php
public
|
#
__construct(
Initializes a new BasicEntityPersister that uses the given EntityManager and persists instances of the class described by the given ClassMetadata descriptor. |
public
|
|
public
|
#
addInsert( object $entity )
Adds an entity to the queued insertions. The entity remains queued until
|
public
array
|
#
executeInserts( )
Executes all queued entity insertions and returns any generated post-insert identifiers that were created as a result of the insertions. |
protected
|
#
assignDefaultVersionValue( object $entity, mixed $id )
Retrieves the default version value which was created by the preceding INSERT statement and assigns it back in to the entities version field. |
protected
mixed
|
#
fetchVersionValue(
Fetches the current version value of a versioned entity. |
public
|
|
final protected
|
#
updateTable( object $entity, string $quotedTableName, array $updateData, boolean $versioned = false )
Performs an UPDATE statement for an entity on a specific table. The UPDATE can optionally be versioned, which requires the entity to have a version field. |
protected
|
|
public
|
|
protected
array
|
#
prepareUpdateData( object $entity )
Prepares the changeset of an entity for database insertion (UPDATE). |
protected
array
|
#
prepareInsertData( object $entity )
Prepares the data changeset of a managed entity for database insertion (initial INSERT). The changeset of the entity is obtained from the currently running UnitOfWork. |
public
string
|
#
getOwningTable( string $fieldName )
Gets the name of the table that owns the column the given field is mapped to. |
public
object|null
|
|
public
object
|
#
loadOneToOneEntity( array $assoc, object $sourceEntity, array $identifier = array() )
Loads an entity of this persister's mapped class as part of a single-valued association from another entity. |
public
|
|
public
array
|
#
loadCriteria(
Loads Entities matching the given Criteria object. |
public
array
|
|
public
array
|
#
getManyToManyCollection( array $assoc, object $sourceEntity, integer|null $offset = null, integer|null $limit = null )
Gets (sliced or full) elements of the given collection. |
public
array
|
#
loadManyToManyCollection( array $assoc, object $sourceEntity,
Loads a collection of entities of a many-to-many association. |
protected
string
|
#
getSelectSQL( array|
Gets the SELECT SQL to select one or more entities by a set of field criteria. |
final protected
string
|
#
getOrderBySQL( array $orderBy, string $baseTableAlias )
Gets the ORDER BY SQL snippet for ordered collections. |
protected
string
|
#
getSelectColumnsSQL( )
Gets the SQL fragment with the list of columns to select when querying for an entity in this persister. |
protected
string
|
#
getSelectColumnAssociationSQL( string $field, array $assoc,
Gets the SQL join fragment used when selecting entities from an association. |
protected
string
|
#
getSelectManyToManyJoinSQL( array $manyToMany )
Gets the SQL join fragment used when selecting entities from a many-to-many association. |
protected
string
|
|
protected
array
|
|
protected
string
|
#
getSelectColumnSQL( string $field,
Gets the SQL snippet of a qualified column name for the given field name. |
protected
string
|
#
getSQLTableAlias( string $className, string $assocName = '' )
Gets the SQL table alias for the given class name. |
public
|
|
protected
string
|
#
getLockTablesSql( )
Gets the FROM and optionally JOIN conditions to lock the entity managed by this persister. |
protected
string
|
#
getSelectConditionCriteriaSQL(
Gets the Select Where Condition from a Criteria object. |
public
string
|
#
getSelectConditionStatementSQL( string $field, mixed $value, array|null $assoc = null, string|null $comparison = null )
Gets the SQL WHERE condition for matching a field with a given value. |
protected
string
|
#
getSelectConditionStatementColumnSQL( string $field, array|null $assoc = null )
Builds the left-hand-side of a where condition statement. |
protected
string
|
#
getSelectConditionSQL( array $criteria, array|null $assoc = null )
Gets the conditional SQL fragment used in the WHERE clause when selecting entities in this persister. |
public
array
|
#
getOneToManyCollection( array $assoc, object $sourceEntity, integer|null $offset = null, integer|null $limit = null )
Returns an array with (sliced or full list) of elements in the specified collection. |
public
array
|
#
loadOneToManyCollection( array $assoc, object $sourceEntity,
Loads a collection of entities in a one-to-many association. |
public
boolean
|
|
protected
string
|
#
getJoinSQLForJoinColumns( array $joinColumns )
Generates the appropriate join SQL for the given join column. |
public
string
|
|
protected
string
|
#
generateFilterConditionSQL(
Generates the filter SQL for a given entity and table alias. |
protected
|
$class |
|
#
Metadata object that describes the mapping of the mapped entity class. |
protected
|
$conn |
|
#
The underlying DBAL Connection of the used EntityManager. |
protected
|
$platform |
|
#
The database platform. |
protected
|
$em |
|
#
The EntityManager instance. |
protected
array
|
$queuedInserts | array() |
#
Queued inserts. |
protected
|
$rsm |
|
#
ResultSetMapping that is used for all queries. Is generated lazily once per request. |
protected
array
|
$columnTypes | array() |
#
The map of column names to DBAL mapping types of all prepared columns used when INSERTing or UPDATEing an entity. |
protected
array
|
$quotedColumns | array() |
#
The map of quoted column names. |
protected
string
|
$selectColumnListSql |
|
#
The SELECT column list SQL fragment used for querying entities by this persister. This SQL fragment is only generated once per request, if at all. |
protected
string
|
$selectJoinSql |
|
#
The JOIN SQL fragment used to eagerly load all many-to-one and one-to-one associations configured as FETCH_EAGER, as well as all inverse one-to-one associations. |
protected
integer
|
$sqlAliasCounter | 0 |
#
Counter for creating unique SQL table and column aliases. |
protected
array
|
$sqlTableAliases | array() |
#
Map from class names (FQCN) to the corresponding generated SQL table aliases. |
protected
|
$quoteStrategy |
|
#
The quote strategy. |


Preparation time
less than 30 mins
Cooking time
less than 10 mins
Serves
Serves 4
Dietary
This vegetarian salad is simply bursting with the fresh flavours of spring, the perfect meal for a sun soaked day.
Bring a large pot of water to the boil and blanch the potatoes, drain and carefully slice in half.
Bring a large pot of salted water to the boil. Drop in the green asparagus, broad beans, peas, soy beans and spring onions and cook for a couple of minutes. Drain and run under cold water to stop them cooking but not to cool them.
Spread on a tray with the potatoes. Sprinkle with a little olive oil and season with salt and pepper.
Put the purple asparagus in a bowl and sprinkle with lemon juice and salt to cure and soften.
For the dressing, whisk together the mustard and vinegar in a bowl, slowly adding the oils. It should have a thick consistency, like a sauce. Season with a good amount of salt and black pepper.
Mix all of the vegetables with the shallots, mint, chervil, watercress and pea shoots and pour over the dressing.
Divide between four plates and dig in.


GAME OVER!
Score:
0
Frogger
Lives:
3
Arrow keys to move the frog/cube in forward, backward or sideways. T - Top View P - First Person View


Roles & Permissions
Since the application serves purpose for the DUCS office, there are tasks that overlap interaction and supervision from multiple people. As such, there's no clear divide of responsibility for all resources.
Consider, an example of letter logs. While the office staff creates an entry for a letter, at times the responsibility of overlooking it lies with the intended recepient/sender. Remarks are exchanged in such cases. Moreover, nobody except the creator of the letter entry is allowed to delete or modify it.
This phenomenon is seen throughout most requirements of DUCS.
To provide this flexibility in the application we have used a third party package Larevel-Permission by spatie.
The documentation's first line says
This package allows you to manage user permissions and roles in a database.
Roles here serve the purpose of grouping users into categories that define and limit their interaction with the application on multiple resources. This is controlled by giving a set of permissions to a role.
Most resources have CRUD permissions on them, and a few are based on DUCS' requirements. We were made aware of all actions on a resource/feature during the course of development. Therefore, we chose to create these permissions statically. Find the list here. When a new role is created, any subset from the list of permissions can be allowed on it, as defined by the use-case.
Now, a user can be given a role with the permission of creating letters named office staff
and another user can be given a role with permission to view all letters and also leave remarks on them named faculty
, thus, leaving customisation into the hands of the admin.
CRUD on roles and permissions is also controlled by permissions.
Also, a user can also be assigned multiple roles.
This is used to verify and authorize users according to the access privileges that have been granted to them by the use-case.
The defined permissions, with meanings evident from their names, provisioned in the application are:
| Roles | Users | Incoming Letters | Outgoing Letters |
|
|
|
|
| Letter Reminders | Remarks | Colleges | Programmes |
|
|
|
|
| Courses | Leaves | Phd Course Work | Scholar Progress Reports |
|
|
|
|
| Scholar Documents | Phd Seminar | Title Approval | Scholar Examiner |
|
|
|
|
| Teaching Records | Scholar Mentors | ||
|
|


| path_package {fs} | R Documentation |
path_package
differs from system.file()
in that it always returns an
error if the package does not exist. It also returns a different error if
the file within the package does not exist.
path_package(package, ...)
package |
Name of the package to in which to search |
... |
Additional paths appended to the package path by |
path_package()
also automatically works with packages loaded with devtools
even if the path_package()
call comes from a different package.
path_package("base") path_package("stats") path_package("base", "INDEX") path_package("splines", "help", "AnIndex")


LFE Documentation I/O Functions MODULE lfe_io MODULE SUMMARY Lisp Flavoured Erlang (LFE) io functions DESCRIPTION This module provides a standard set of io functions for LFE. In the following description, many functions have an optional parameter IoDevice. If included, it must be the pid of a process which handles the IO protocols such as the IoDevice returned by file:open/2. Two functions in this module are used to generate aesthetically attractive representations of abstract forms, which are suitable for printing. These functions return (possibly deep) lists of characters and generate an error if the form is wrong. DATA TYPES chars() = [char() | chars()] filesexpr() = {Sexpr,Line} This is the format returned by lfe_io:parse_file/1 and is used by the compiler to give better error information. EXPORTS read([IoDevice]) -> {ok,Sexpr} | {error,ErrorInfo} Read an s-expr from the standard input (IoDevice). read_string(String) -> {ok,Sexpr} | {error,ErrorInfo} Read an s-expr from String. print([IoDevice,] Sexpr) -> ok Print the s-expr Sexpr to the standard output (IoDevice). prettyprint([IoDevice,] Sexpr) -> ok Pretty print the s-expr Sexpr to the standard output (IoDevice). Assume we start with no indentation. print1(Sexpr) -> DeepCharList Return the list of characters which represent the s-expr Sexpr. prettyprint1(Sexpr, CurrentIndentation) -> DeepCharList Return the lost of characters which represents the prettyprinted s-expr Sexpr. Assume we start at indentation CurrentIndentation. print1_symb(Symbol) -> DeepCharList. Return the list of characters needed to print the symbol Symbol. print1_string(String) -> DeepCharList. Return the list of characters needed to print the string String as a string. format([IoDevice,] Format, Args) -> ok format1(Format, Args) -> DeepCharList Print formatted output. The following commands are valid in the format string: ~w, ~W - print LFE terms ~p, ~P - prettyprint LFE terms ~s - print a string ~e, ~f, ~g - print floats ~b, ~B - based integers ~x, ~X - based integers with a prefix ~+, ~# - based integers in vanilla erlang format ~c, ~n, ~i Currently they behave as for vanilla erlang except that ~w, ~W, ~p, ~P print the terms as LFE sexprs. read_file(FileName) -> {ok,[Sexpr]} | {error,ErrorInfo} Read the file Filename returning a list of s-exprs (as it should be). parse_file(FileName) -> {ok,[FileSexpr]} | {error,ErrorInfo} where FileSexpr = filesexpr() Read the file Filename returning a list of pairs containing s-expr and line number of the start of the s-expr. Error Information The ErrorInfo mentioned above is the standard ErrorInfo structure which is returned from all IO modules. It has the following format: {ErrorLine,Module,ErrorDescriptor} A string describing the error is obtained with the following call: apply(Module, format_error, ErrorDescriptor)


what's new @ rotten dot com
An archive of disturbing illustration
Have you visited our FAQ as well?
Please note that our site is now updated every day,
at dailyrotten.
Also The Gaping Maw, now updated more frequently.
We have T-Shirts available!
- December 15, 2001.
For the first time ever, you can search the site.
- November 28, 2001.
Daily Rotten and Rotten News have been merged together as the
Daily Rotten. Exactly how this merger will end up is still confusing even to us,
but there will be new and interesting features to the site added in the future to augment this.
- November 16, 2001.
Our story
about the Taliban's nuclear secrets turned into international news, which was covered by
The New York Times, The Wall Street Journal, London Telegraph, and Time Magazine, among
others.
- October 2, 2001.
The Press Clippings have been updated, though there are a number
of stories that seem to have been misplaced.  It's a bit behind, so just to be infuriating
updates will appear once per day until it is current. Who loves ya, baby.
- September 11, 2001.
The World Trade Center twin towers were destroyed today. Therefore a feature that
we had been preparing prior to this, Rotten News and Intelligencer,
gets inaugurated several weeks early. If you just catch news from the major networks, this
feature may open your eyes somewhat. Updated frequently.
- September 1, 2001.
The main page of rotten.com has been getting updated several times a week for the past
month or so, and we have not been placing notices in this "new" log to reduce its noise level.
- August 1, 2001.
Some graphic prison violence photos from
Carandiru, perhaps the most notorious prison in Brazil.
- July 30, 2001.
Pipe Bomb and
Maggots Ate My Piranha.
- July 19, 2001.
The Brazilian Ferrari Crash.
- July 4, 2001.
As is customary at rotten.com on every July 4th, we bring you
Porn on the Fourth of July.
There's something here for everyone, maybe. Certainly it is nothing that
the Founding Fathers envisioned.
- May 21, 2001.

- May 16, 2001.
Graphic photo of a protester that was
fired on point blank by Indonesian police, which is not something we see every day.
- May 1, 2001.
The Train Bisection is perhaps the
pinnacle of achivement in the field of train-snuff. Alas there is no award for
this.
- April 23, 2001.
A nice set of shark victim photos
sent to us from Australia.
- April 14, 2001.
Tragically, Easter has been cancelled.
- April 11, 2001.
This man was caught fried
when trying to steal a powerline to sell for scrap. In the daring drama of man vs.
scrap metal: man 0, scrapmetal 1
- April 7, 2001.

- April 5, 2001.
Ladies, size really does matter, but you knew that.
Micropenis!
- April 3, 2001.
Long left in someone's desk drawer,
Police Photos #1.
- March 29, 2001.

- March 22, 2001.
Life can be rough in New York City.
- March 18, 2001.
Recently massacres in Borneo plague
the South Pacific. With so many massacres these days, and the media attention focused
on the wacky antics of the Taleban, this event has been underreported.
- March 5, 2001.
This poor soul had the misfortune
of hanging where no one was around to find him. Perhaps not the best way to go.
- February 28, 2001.
Highly explicit propaganda. Lick the Axis.
- February 21, 2001.
We're being investigated by the FBI and Scotland Yard.  Read about it in the latest Gaping Maw.
- January 25, 2001.
New Fucks of the Month! Everyone was getting
so tired of "Limberoni" anyway, talented as he is.
- January 22, 2001.
A decapitated tribute to poet Rudyard Kipling.
- January 14, 2001.
Photos of what may be comedian Chris Farley. [His family has requested removal of these;
they are offline temporarily until our attorney reviews the issue]
- January 10, 2001.
A new recurring feature, Viewer Wall, showing
approximately one new picture a day, and this time we mean it.
- January 7, 2001.
At least we don't show pictures of
people eating babies. Of course the consumption of infants has an intereresting
history, exemplified by Swift's
paper on the subject.
- December 25, 2000.
Christmas is here, and to most of us that means
raunchy pornography. For those of us not celebrating the Lord's Birthday with masturbatory
delight, we wish you a Happy Festivus. [offline]
- December 13, 2000.
We've updated the press clippings section, to include
various mentions of rotten.com in print publications. It is by no means complete, as often only one
person supplies us with a copy of whatever was printed, so we expect a lot of them have been
overlooked. If you find old articles mentioning us that we don't have, let us know!
- December 11, 2000.
Our Japanese correspondent has sent us Fecal Japan,
which is really a bit more than we wanted to see.
- December 7, 2000.
A new Mayhem #6, for those so inclined.
- November 30, 2000.
Tumor Man, and yes, it is real and he is alive.
- November 24, 2000.
Don't forget to Say It With Penis.
- November 22, 2000.
 More coming soon.
- November 20, 2000.
Happy Thanksgiving, perverts.
- November 15, 2000.
Some Israeli soldiers killed in
recent Intifada uprisings.
- October 26, 2000.
Halloween Porn! Boo! [offline now, it's well past H-day]
- October 20, 2000.
The
Burnt Crispy Person
hot off a detective's desk. Our posting of these pictures actually made the
newspapers and TV in Harris County. Oopsie!
- September 27, 2000.
The
Mousetrap Genital Circus
is now playing a limited engagement.
- September 14, 2000.
The 2000 Olympics will be opening shortly. A quick
salute.
- September 4, 2000.
Not enough people were offended by our last exhibit. Hence,
Misplaced Childhood
is offered for your disapproval.
- August 29, 2000.
Perhaps our lamest exhibit ever,
Priceless, a collection of the Mastercard(TM) parodies that have
been floating around for entirely too long. We will soon hear from their attorneys!
- August 23, 2000.
The rather peculiar death of Lisa McPherson, who may or may not have been "held"
in a Church of Scientology facility for 17 days, is graphically displayed with this
series of autopsy photos recently
made available to the public. Not to malign this fine institution or anything..
- August 6, 2000.
First there was the incident with the bird, now it's the alarming
Incident With The Fish. We gotta
stop having these "incidents".
- July 14, 2000.
And this is perhaps the most
horrible thing we've ever posted.
- July 4, 2000.
Celebrate the Birth of Our Nation!
- June 22, 2000.
Fresh from our summer vacation -
Babies in Jars! Our original photos from a visit to a 19th century anatomical curiosity cabinet.
- June 19, 2000.

- June 10, 2000.
People kept sending us these
snake pictures, so here they are.
- June 5, 2000.
Happy balloon time with the less fortunate, in
Mayhem #5.
- June 1, 2000.

- May 25, 2000.
When things in the animal kingdom go awry.
- May 15, 2000.

- Mar 29, 2000.
Fresh springtime Mayhem #4 miscellany.
- Mar 13, 2000.
Two new Fucks of the Month for March 2000!
- Mar 7, 2000.
Images from a gruesome pedestrian
train suicide.
- Mar 4, 2000.
A picture from
and mention of Rotten.com is on page 22 of the April issue of Playboy magazine.
Fidel looks pretty good.
- Feb 21, 2000.

- Jan 13, 2000.
The doughboy pic,
truly a work of modern art.
- Jan 9, 2000.
A gallery of severed hands
and whatnot, from an emergency room nurse.
- Dec 31, 1999.
 At long last, huzzah huzzah, etc.
- Dec 25, 1999.
A new feature, updated almost daily, is our
Daily Rotten. Feel free
to submit things if you find anything appropriate for it. And yes,
there will be new fucks of the month, very, very shortly.
- Dec 23, 1999.
Our Christmas Card to you,
the loyal viewer!
- Dec 19, 1999.
Another experiment, the
Circular File, containing miscellaneous images that didn't fit anywhere
else, or that have been floating around a little bit too long.
It's a steaming pile of poo, basically.
- Dec 14, 1999.
Our first experiment with video, the
Stinky Monkey Page, is online.
- Oct 21, 1999.
Posted the botched pictures from Allen Lee Davis
execution.
- June 2, 1999.
The two latest cease & desist letters are here.
- May 3, 1999.
Our largest exhibit yet, the
Celebrity Morgue, is now officially open!
- April 15, 1999.
We had to remove the D*****t Hole parodies, after a cease & desist
letter arrived today from United Media. You can read the letter
here.
- April 14, 1999.
So the D*****t Hole may be an acquired taste. A lot of people don't
seem to like it, and others have described injuries received after
beholding its humor. But, it did make slashdot a couple days ago (cheap shot),
and today it's Cruel Site of the Day. Incidentally we are
preparing a major exhibit, hopefully ready around the weekend.
- April 6, 1999.
The D*****t Hole. [now removed] Apparently it's a new low.
- March 31, 1999.
A new series of Mayhem
pictures, featuring dismemberments and other nastiness.
- March 30, 1999.
We've received another cease & desist letter, our fourth. That makes
three in about the last thirty days. Quite insane. These letters are now
available for viewing at our legal department.
Names have been blotted out, of course.
- March 19, 1999.
We've moved our old mugshot gallery to it's own domain,
mugshots.org. There are some
new mugshots there, including Bill Gates and Marv Albert, more will follow.
It is linked from the gray region on our front page.
- March 11, 1999.
This is your rat on drugs.
Any questions?
- March 8, 1999.
There's now a Past Favorites
section to replace the Archives which were broken. We will be adding more
to this area in a few days, as well as more content which will be available
during nonpeak hours. Bandwidth is still an issue, so please bear with us.
- March 3, 1999.
Rotten is mentioned in the
Philadelphia Daily News, with several inaccuracies. We do not link to
any gang sites, and prefer to remain gang neutral. Can it be true that
the bloods site is run by rich white guys in Missouri? Say it ain't so!
- February 18, 1999.
Okay enough with the FOTM procrastination. It's been updated,
and February's will be out shortly.
- January 26, 1999.
Pictures from the hand reattachment surgery, that was in the news yesterday.
- January 23, 1999.
This site has been doing a tremendous amount of traffic, averaging 120,000
visitors daily, generating 1.5 million hits totalling 15GB transfer. PER DAY.
We've been having trouble with our providers, so today we've moved it into
a better location, which should be able to grow with our needs. Prior to this,
any time we added a new feature/gallery, we were swamped and unable to serve
all the demand.
- December 24, 1998.
Christmas pornography in abundance, for the masses.
- October 14, 1998.
New FOTM! And this time it's nasty.
- September 11, 1998.
To celebrate the release of the Starr Papers, we've posted the
"Viva Fidel" picture that we've been saving for just this occasion.
Break out the cigars from the humidor! Break out the interns!
- August 31, 1998.
New FOTM for the months of August and September. Yay! Also, our moldy old
hardware has been replaced with shiny new hardware within the past several
days, which should give us better response time, and less downtime.
- July 31, 1998.
Over time people have asked us if we have banners available. Now, we
do: four experimental banners
have been created. Woo hoo!
- July 28, 1998.
A new Mayhem Series #2 has been posted, consisting of autopsy snapshots
sent to us anonymously. (We wanted to post them a couple days ago, but were
having server troubles, again.)
- July 24, 1998.
We have been having some problems with our hardware, explaining our
random intermittent downtime. Most of the site is on a sparc2, and it's
running on the edge of what it can do. If you have a faster sparc to
donate, please let us know. (you won't see us running Microsoft servers.)
Coming tomorrow: never before seen autopsy snapshots.
- July 22, 1998.
The "golf gator" pic that is making the rounds, posted.
- July 11, 1998.
Fuxen of the months for June #1, June #2 ("the lost episodes"),
and July #1. Ok people vacation is over.
- July 7, 1998.
Tupac Shakur's autopsy photo, from the Las Vegas Municipal Police
Department, posted. Lots of hate mail from this one.
- July 4, 1998.
A wonderful July 4th exhibit, featuring nine examples of the
absolute finest patriotic PORNOGRAPHY. Makes me proud to be an American.
- May 18, 1998.
Yes, it's May again. We are running late and the hate mail piles
up when we're this tardy with the monthlies. More gross stuff to follow on
the rest of the site within 48 hours. Promise.
- April 14, 1998.
Mayhem and Roadkill Potpourri #1, from Latin America. Much blood.
- April 10, 1998.
 Coming soon: more roadkill and murder.
- April 3, 1998.
 Other E.M.T.'s
are encouraged to send us original pictures, we'll send an unspecified
amount of cash in return, depending on the quality of the pictures.
Names will be kept anonymous, as usual.
- April 2, 1998.
We've been having problems with our internet providers, and this is why
March was pretty slow in the new postings. We have been busy, so April
will see new things.
- April 1, 1998.
Congratulations to Howard Stern on his new Saturday show.
- March 1, 1998.
New F.O.T.M.'s for March (two at once). Brutal.
- February 11, 1998.
Two fucks of the month, since it's late (for a good reason, which
I will not go into.) One of them we've had laying around since the
Nixon administration.
- February 3, 1998.
Brace for El Nino! Also a pointer to the Bill Gates pie incident.
- January 24, 1998.
The Incident With The Bird.
- January 23, 1998.
We were booted off our primary provider, and have been having problems
with some of our other providers. If you saw a password over the last two
days on one of our areas, that was because of a hardware upgrade -- we
have no plans to charge money or have passwords in the future for
the awful things we offer here.
- January 22, 1998.
More interesting new content will appear over the next couple days, as
our problems are sorted out. Remember that our pages get 1,000,000 hits per
day and it is difficult keeping everything running smoothly.
- January 5, 1998.
New FOTM, pretty gross.
- December 25, 1997.

- December 18, 1997.
Bikie massacre pictures (Australian motrocycle gangs).
- December 14, 1997.
People have been asking about our schedule. We try to put out one major
'feature' per week plus other one-offs sprinkled randomly. It's done as time
permits, depending on unrelated committments. The Australian "bikie"
massacre pictures will be the next shown.
And a new FOTM, still uncouth but not as bad as the last one.
- December 12, 1997.
Today in Rotten History now
has a link to yesterday's events.
- December 7, 1997.
Posted the first in a series of coroner scrapbook pictures.  Ouch.
- December 6, 1997.
We've been shocked to discover that Donald Duck is addicted to heroin.
Everyone in the office is speechless. Examine the evidence for yourself.
- December 4, 1997.
Over six million visitors served this year. We are getting over
1,000,000 hits per day, transferring over 6GB daily. Eep.
- December 3, 1997.
New archive image (this one also unpleasant.)
- December 1, 1997.
 People always complain if it's even one
day late, so this one is on time -- but-- it is particularly unpleasant,
and we're receiving a record number of FOTM complaints about it. Excellent.
- November 21, 1997.
Images from the 1991 flood at Ormoc, Philippines.
- November 18, 1997.

- November 13, 1997.
Senator Dan Coats has introduced
CDA II in
congress. As you know CDA I was declared unconstitutional on
multiple grounds. Adult site operators: Instead of sending your
"under 18" traffic to Yahoo or Disney, send them here
until CDA II is withdrawn.
- November 11, 1997.
Images for armistice day: five very graphic WWI wounds.
- November 6, 1997.
Five million visitors this year.
- November 4, 1997.
 Unfortunately only one of our providers allows
us to post pornography, and it's been rather irregular lately. We're looking
at other provider options right now.
- November 1, 1997.
One of our servers was experiencing intermittent trouble on Halloween,
and was down much of the day. Unfortunately it's the one that had the
"Halloween Smut", so probably not many people saw the contest in time.
The pictures were supposed to go down on the 1st, but they will
stay up until monday because of the trouble.
- October 31, 1997.
Some Halloween Smut [defunct link] for your personal enjoyment. Also
we'll award $50 to the best viewer submission in this category.
- October 28, 1997.
Pointer to an image from the recent
incident in Taiwan in which a rope snapped in a tug-of-war consisting
of over 1,000 people. Two people's arms were torn off and 45 people
were injured. Pretty.
- October 26, 1997.
The Famous
gallery has returned. If you've never seen it, go look. (To those
who have seen it and were wondering, the section that used to be at
the bottom of it will return in expanded form in about a week.)
- October 23, 1997.
New feature, a sequence from a Nepalese cremation.
- October 19, 1997.
New regular column, "From the Rotten Archives". Starting off
we have a new cartel shooting image from down south. Not all pictures
here will be gruesome, but they will appear regularly and will be
interesting.
- October 17, 1997.
Everyone keeps asking for a staff photo.
- October 16, 1997.

- October 15, 1997.
Added a New Orleans streetfight victim to Viewer Submissions. Also,
there is a nifty new submissions
page where you can upload images anonymously.
- October 12, 1997.
New feature, eight Brazilian aircrash photos.
- October 10, 1997.
A new submit url feature, use
this page if you want to notify us of some interesting, unusual, or
disturbing site of picture on the WWW.
- October 7, 1997.

- October 5, 1997.

- October 3, 1997.
We've now seen 4 million visitors, one million of which have
come here in the last month.
- September 29, 1997.
The site has come back up at about half of the needed
content. One of our major providers booted us after the
Diana stunt. Some alternatives have been arranged but
not enough yet.
- September, 1997.
Over 100,000 people try to visit as word spreads in the international media.
About 75,000 of these get through.
- End of September, 1997.
Lots of press coverage from everywhere. Details
here.
- September 19 1997.
Press coverage from
San Jose Mercury News.
Press coverage from
Nando Times, an Internet news service.
- September 18 1997.
Press coverage from
Agence France-Presse, the French news agency.
Press coverage from
c | Net, popular internet news source.
We are receiving a much heavier than normal amount of traffic,
nearly 70,000 visitors today (normally 25,000).
please note that sometimes links here get
stale as images are moved from server to server, so the links
below have been textified
- September 10, 1997.
The first viewer submission (new column) has arrived.
- September 9, 1997.
In celebration of our 3,000,000th visitor, a format change.

- September 8, 1997.
Rotten has seen 3 million visitors this year.
- September 2, 1997.
Text of the Jon Benet Ramsey ransom note has been
obtained and placed online.
- August 30, 1997.
A tribute to Diana, Princess of Wales, who died on Saturday.
- June 16, 1997.
We have been able to get 13 galleries open at night (two fewer
during the daytime). It has been a great struggle to find homes for
them; they are split among 4 or 5 ISP's.
- May 20, 1997.
There are seven galleries open 24 hours (hopefully.) If you run
an ISP that has at least a T3 and would like to sponsor a gallery,
or will allow us to run 3 or 4 galleries at a reasonable flat rate,
please read our plan and let us know.
- May 17, 1997.
One millionth visitor.
- May 15, 1997.
The system is now split at three providers, and the traffic is
a bit lower, so I've opened more galleries. If I can line up a couple
more providers, the load becomes quite reasonable on everybody,
and I can add new content on a regular basis again.
- May 12, 1997.
I've got two or three galleries open all the time, thanks to a friend
who has provided some temporary bandwidth. If you own bandwidth and can
provide space for a gallery, please contact me. This seems to be a
better approach than a ticket system.
AOL users are confused because their proxy server keeps an old cache
and it appears to them that things are closed when they are open, and vice
versa. If you use AOL, I recommend ditching them and finding a real
internet ISP.
- May 6, 1997.
For the time being two galleries will be open at night (including
last night), I'll try to change which ones every couple of days.
- May 2, 1997.
Traffic is still around 50,000 visitors per day, far too high to
open the traffic to full access. Images have been up at night (except
I missed one day.) To those who are complaining about us not upgrading
to accommodate the traffic, please note that the next level of service,
T3, is on the order of $10,000/mo. That's money I don't have.
- April 30, 1997.
Yesterday saw 70,000 visitors, far more than we can handle if galleries
were present. I put some images up overnight, and took them down when
traffic became too great as the East Coast woke up.
- April 28, 1997.
Today on national radio, Howard Stern praised rotten.com a number
of times. That's very nice and we appreciate the attention, especially
from a demigod like Mr. Stern. However, it caused the number of
people who visit daily to increase from its already very high 4,500 to
at least 50,000, and perhaps 100,000. The number of hits reached
350,000 before I shut it off for a few hours. It was jamming our normally
zippy T1.
We aren't equipped to handle this load of traffic. This is a free site,
already quite popular, so the galleries are off until the attention
dies down. Hopefully, this should only be a day or two. As traffic
decreases, we will reopen some or all of the galleries over time.
- April 27, 1997.
Added much too married Larry King's arrest mugshot, hoodlum
Al Pacino's mugshot, public masturbator Pee Wee Herman's mugshot,
and the really tall mugshot of nosebreaker Charles Barkley.
More will follow in the future.
- April 26, 1997.
Good god, traffic is averaging 2.5GB/day, around 190,000 hits. Eeep!
- April 20, 1997.
The hard disk was lost, so I reverted to the April 5 snapshot. Though
some new images were added in the last fifteen days, I still have them
elsewhere and they will return.
- April 5, 1997.
David Duchovny's personal x file. We cannot begin to understand him.
- March 21, 1997.
In case you were wondering about the lack of new items placed on
this site, I've been waiting for our traffic to stabilize. Yesterday
we received 83,000 hits totalling 1181MB transferred. This number
is very, very large. And much higher than the number three weeks ago.
- March 8, 1997.
A woman who seems to enjoy cigarette smoking.
- March 6, 1997.
Wonderful photo of Queen Elizabeth II commencing an important
nasal probe. Is it not wonderful that we have photography to remember
these magic little moments.
- February 17, 1997.
By popular demand images have been added to the sex gallery.
We have a latex nun, a naughty baby carriage, an artist's depiction
of a dickface, the burdens of having a large penis, and finally,
a woman's unique tribute to actor Kirk Douglas. [offline]
- February 14, 1997.
Three particularly unpleasant racist photos, a lynching, two
lynch victims surrounded by whitefolk, and a KKK cross lighting.
Happy valentine's day, everyone!
Also, today I wrote a nifty preprocessor for creating HTML in the
rotten galleries. At long last, all the galleries have controls,
nongrey backgrounds, and consistency. This makes it ten times
easier to add images to sequence, etc etc etc.
A photo of Lady Princess Diana Spencer in all her splendor.
- February 13, 1997.
Excellent portrait of His Holiness Francis Albert Sinatra, by Rob Day.
- February 8, 1997.
The salute from the cover of the April 1974 MAD Magazine.
- February 5, 1997.
Not one, not two, but three new galleries, for a
total of 46 new images. Check out Monstris, which contains 17th
century engravings of human monsters; Mugshot, mugshots and middle
finger salutes; and Things, a collection of, well, strange things.
The top level menu has been split into disturbing and
non-disturbing areas of interest.
- February 3, 1997.

- February 1, 1997.
In one month we have grown from 2,000 hits/day to 17,000.
- January 31, 1997.
The infamous bung sticker, finally adding something to the
difficult naive gallery. Rumour has it that a new gallery will open soon.
- January 27, 1997.
Two shots of Adolf Hitler, in leiderhosen and his dead body.
- January 23, 1997.
Another famous actor shot, Dennis Hopper selling out in Japan.
- January 21, 1997.
Bizarre publicity shot of Frank Sinatra surrounded by merry elves.
- January 20, 1997.
There are statistics regarding our usage. This will not be updated
every day until the end of the month. A spike occurred today (10,000 hits)
because this is the first time rotten was listed in
yahoo.
- January 9, 1997.
OJ's Holiday Ham, a must-see. Thanks, Tapio!
- January 6, 1997.
Many new astonishing photos in the famous
gallery, including US Presidents, British royalty, etc. We are always on
the lookout for material of this quality, and never finding it.
- January 5, 1997.
Two new exhibits in the sex gallery, one of which we title
The Pylon. [offline] Also, a text article on elephantiasis, from a
19th century source.
- January 4, 1997.
This day in rotten history.
- January 3, 1997.
A counter on the main page to indicate number of visitors.
- January 2, 1997.
Added three new images to the racist gallery: US WWII images and
propaganda from the pleasant American Eugenics Party. Also, four new
images in the testicle gallery.
- January 1, 1997.
Determined the true story behind the green bean, now known to
be hailing from New Zealand. The picture is legitimate; have updated
the description accordingly.
- December 31, 1996.
Graphic at the top of the splash screen, a body being broken
on the wheel (late 16th century.)
- December 30, 1996.
Abigail Folger's autopsy photo. Folger, the coffee heiress, was killed by
Charles Manson's followers in 1969. Still need Tate's photo.
- December 27, 1996.
New famous gallery, containing
eleven images of the famous and infamous. Many things will eventually
live here. To make room, moved the one green bean image from tiny phallic
gallery to naive, even though it isn't naive.
- December 26, 1996.
Put all the directories under /gallery/, for future restructuring
of the site. Luckily it is still early enough to do this. Also, I am
slowly adding left & right navigation to the galleries.
- December 20, 1996.
Rotten dot com goes live. Right now
there is no splash screen, so the galleries appear on the main page. Some areas
are still under development, need to scan in more pictures, etc.
- July 23, 1996.
Registered rotten.com domain. Surprised it wasn't taken.
[ Return to Rotten dot com ]
|


A friend of mine sent me a message on Facebook this morning:
I’ve heard a couple of perspectives that insist that there’s a fundamental antagonism between natural science and feminism, and that simply adopting feminist empiricism is not enough. I’m skeptical of such views, but I haven’t yet been able to articulate a coherent alternative that takes seriously the forms of oppression that more anti-science feminism emphasizes. So, I guess my big question is, How can one articulate a commitment to anti-oppression feminism … while also affirming the importance, relevance, value of natural science?
I think this is a really wonderful question, because it goes right to the heart of not just why I do the work that I do, but also how. As a philosopher of science, I’m not only trying to understand science (both natural and social); I’m also trying to improve it, and in ways that make it more valuable for social and political practices that, I think, promote human flourishing, including feminism and other anti-oppression social movements.
Of course, this project assumes that science is, or at least can be, valuable in this way. If natural science is fundamentally antagonist towards feminism, then I’m wasting my time. So I want to start answering my friend’s question by understanding the opposite position: why would someone think that science and feminism are mutually antagonistic?
In the second half of the twentieth century, many feminists (both scientists and non-scientists) criticized many aspects of natural science. Science often operated with misogynist or androcentric assumptions — that men or males are typical, superior, or important, while women or females are atypical, inferior, or unimportant. Science was often organized internally along gendered lines — men could be “hotshots” and primary investigators, while women scientists were generally relegated to teaching, lab/technical assistant positions, and second-tier professorships. And, when science interacted with the public, “the scientist” was a technocratic, patronizing figure: the doctor (whether physician, psychiatrist, home economist, or other expert) told the housewife what was wrong with her and what she ought to do, and she was expected to comply without question.
As feminism became a recognized scholarly approach, more abstract and radical critiques were developed. These critiques argued, roughly, that science neglected interpersonal relationships — especially care, cooperation, and dependence — and the roles of emotion and symbolism in human experience. Since these things are generally associated with women and femininity in our society, their neglect by science reflects a “masculine” mindset of pure, detached rationality.
Now, if you think that all of these things — misogyny, androcentrism, technocracy, expertism, and an ideal of pure, detached rationality — are essential, necessary, or natural features of natural science, then it’s reasonable for you to conclude that natural science is essentially, necessarily, or naturally opposed to feminism. And I think this is in the background of the “feminist anti-science” views that my friend has encountered.
However, I do not think that any of these anti-feminist features are essential, necessary, or natural to science, although I do think that removing these features from science has (and, in an unfortunately larger number of cases, still) required considerable political organization and effort. The anti-feminist features of science are many and often deeply institutionalized, but still contingent. Let me elaborate this in three ways: with a deep historical point, a more recent historical point, and a pair of philosophical points.
The deep historical point is that what we might call the “liberatory potential and oppressive actuality” of both natural and social science has long been recognized by the Marxist tradition. If you know anything about Marxism, you probably know that Marxists say themselves as “scientific socialists,” who drew on cutting-edge work in social science (or, what we today would call social science) to make predictions about the future development and eventual collapse of capitalism. At the same time, actual social science, developed by “bourgeois academics,” was used to provide ideological cover for capitalism. So science had liberatory potential, even if it was generally actually used as a tool of oppression.
What’s less widely recognized is that Marxists thought this applied to other fields of science as well. Early twentieth century debates over whether “nature” or “nurture” had a greater influence on human behavior were often debates between conservative and Marxist scientists. As the Marxists saw it, “nature” explanations were frequently used to rationalize social hierarchies as natural, necessary, and indeed socially optimal; while “nurture” explanations indicated ways that more egalitarian, less oppressive societies could be built using “social engineering.” (While that phrase sounds rather totalitarian to us, it had a much more positive, optimistic connotation in the early twentieth century.) The study of human behavior, then, had liberatory potential, even as it was actually oppressive.
For better or for worse, there aren’t many Marxists around today. But I think one insight worth preserving from the Marxist tradition is that, while actual science is often used oppressively, it has deep liberatory potential.
The more recent historical point is that feminist science has had a deep, positive influence on certain scientific fields. Here let me simply point to the excellent work by historian of science Londa Schiebinger, and especially her Gendered Innovations project (and the two anthologies with the same title), Feminism in Twentieth-Century Science, Technology, and Medicine, and Has Feminism Changed Science? Each of these works includes several case studies of the positive influence of feminist scientists in a field of natural or social science or engineering.
The historical points seem to address feminist concerns about misogyny and androcentrism within science. They also provide a case for challenging the gender hierarchy within science: if feminists and women scientists have had this benefit that everyone can acknowledge (identifying and removing misogynist and androcentric assumptions), then everyone should be able to agree that feminists and women scientists should have better standing within scientific fields, both as a recognition for the good that they have done and in order to make it easier for them to do good in similar ways in the future.
But what about the ideal of pure, detached rationality, and the technocratic and patronizing relationship between scientists and non-scientists?
Here is where philosophers can make our specific kinds of contributions. First, we can argue that rationality does not require being “pure,’’ socially detached, and unemotional — we can challenge, and offer alternatives to, the ideal of value-free science and non-cognitive views of emotion and ethical judgment. Second, we can challenge, and offer alternatives to, technocratic and patronizing accounts of expertise and the role of experts in a democratic society. For a single piece that addresses both of these points, I would recommend Elizabeth Anderson’s article “Use of Value Judgments in Science”.


This preview is part of the CDKit tooling.
Screenshot 1
Screenshot 2
Screenshot 3
Screenshot 4
Screenshot 5
Screenshot 6
Screenshot 7
Screenshot 8


Mary C Baylis
About Me
Blog
Projects
Contact
OMG I MADE A GAME! Check it out
here
!
Also,
a cheat sheet
.


Lung cancer is the leading cause of cancer-related deaths in the world.  Patients who receive Thoracic Surgery for Lung Cancer do so with the expectation that their lives will be prolonged for a sufficient amount of time after the surgery.
Smoking is one of the major factor for the lung cancer. The problem this app tries to solve is to find whether there is a way
to determine Post-Operative Life Expectancy from patient attributes in the dataset. If there is pattern to be recognized, this would help physicians and patients make a more educated decision on whether they should proceed forward with the surgery


Broken words written restlessly, touched, typed, forlorn, unsaid. Looking down, from above, scanning, wanting. Too many here, too many to have all in one place.
Letting them breathe, these words, won't they return for more if I just let them lie?
Skip a step, turn away, turn back and touch touch touch trimble type tug at that capacity, ineffable, braking for an envisaged blockage, but there was none there.


Sahi Pro - Script Execution Control APIs
abstract
These APIs control the way a script executes
_wait
Since Sahi Pro: 3.5Since Sahi OS: 2
_wait($timeout[, $condition])
Arguments
| $timeout | integer | time in milliseconds to wait for |
| $condition | Sahi expression optional | condition to wait for. If specified, _wait will return if either the condition is met or if the time elapsed has exceeded timeout, whichever comes first. |
Details
Forces script to wait for given time or given condition to be true, which ever comes first
Forces script to wait for given time or given condition to be true, which ever comes first
_wait(1000); // Will stop execution for a second
// Wait till div by id "ajaxConfirm" is populated for max 5 seconds.
_wait(5000, _getText(_div("ajaxConfirm"))!="");
// Wait till button becomes visible
_wait(5000, _isVisible(_button("Confirm")));
// Wait till "Loading ..." message disappears
_wait(1000); // may take a second before that message appears.
_wait(5000, !_isVisible(_div("Loading ..."))); // wait max 5 seconds for it to disappear.
_setXHRReadyStatesToWaitFor
Since Sahi Pro: 4.3.2Since Sahi OS: 4.3
_setXHRReadyStatesToWaitFor($readyStates)
Arguments
| $readyStates | string | A string with some of 1,2,3 in a string; like "1,2,3" |
Details
Sets what readyStates of an XMLHttpRequest (XHR) Sahi should wait for.
Sahi normally monitors all AJAX requests and proceeds only if the XHR readyState is 4.
In some applications which use long polling or comet requests, there may be XHRs in readyState 1.
Sahi would wait for a long time and then timeout in such cases.
Setting _setXHRReadyStatesToWaitFor to "2,3" will allow Sahi to proceed if the readyStates are either 1 or 4.
Sets what readyStates of an XMLHttpRequest (XHR) Sahi should wait for.
Sahi normally monitors all AJAX requests and proceeds only if the XHR readyState is 4.
In some applications which use long polling or comet requests, there may be XHRs in readyState 1.
Sahi would wait for a long time and then timeout in such cases.
Setting _setXHRReadyStatesToWaitFor to "2,3" will allow Sahi to proceed if the readyStates are either 1 or 4.
_setXHRReadyStatesToWaitFor("2,3");
info
The default XHR ready states to wait for is specified by the property
xhr.wait_ready_states=1,2,3
in sahi.properties. It can be overridden in sahi/userdata/config/userdata.properties
file._setStrictVisibilityCheck
Since Sahi Pro: 3.5.2Since Sahi OS: 3.5
_setStrictVisibilityCheck($doCheck)
Arguments
| $doCheck | boolean | set to true to enable strict visibility check. |
Details
If $doCheck is true, forces Sahi to strictly look for only visible elements and ignore elements which are not visible.
This API is useful in cases where widgets are dynamically created at multiple locations but only one of them is visible at any given time.
During recording Sahi can be forced into either mode by choosing "Strict Visibility On" or "Strict Visibility Off" from the
"Other Actions:" dropdown. Make sure you "Append to Script" to add it to the recorded script
If $doCheck is true, forces Sahi to strictly look for only visible elements and ignore elements which are not visible.
// make Sahi ignore elements which are not visible.
_setStrictVisibilityCheck(true);
// do operations on visible elements ...
// make sahi revert to original behavior of considering all elements in the DOM.
_setStrictVisibilityCheck(false);
This API is useful in cases where widgets are dynamically created at multiple locations but only one of them is visible at any given time.
During recording Sahi can be forced into either mode by choosing "Strict Visibility On" or "Strict Visibility Off" from the
"Other Actions:" dropdown. Make sure you "Append to Script" to add it to the recorded script
warning
Setting _setStrictVisibilityCheck(true) can be slightly expensive as each probable element needs to be checked for visibility.
However, some applications may be automatable only if _setStrictVisibilityCheck is true. Use judiciously.
However, some applications may be automatable only if _setStrictVisibilityCheck is true. Use judiciously.
_setSpeed
Since Sahi Pro: 4.5Since Sahi OS: 3
_setSpeed($speed)
Arguments
| $speed | integer | speed in milliseconds |
Details
Sets the speed of execution of steps.
Sets the speed of execution of steps.
_setSpeed(2000);
//Each step will execute with a gap of 2000 milliseconds (2 seconds).
//Default execution speed is 100ms;
warningDO NOT modify this unless absolutely necessary. Use _wait if and where needed.
_stopOnError
Since Sahi Pro: 3.5Since Sahi OS: 2
_stopOnError()
Arguments
| None |
Details
Forces script to fail and abort on any error. Further steps will not be executed.
This is the default behaviour of Sahi.
Forces script to fail and abort on any error. Further steps will not be executed.
This is the default behaviour of Sahi.
_stopOnError();
info
We differentiate between errors and failures.
Error: Occurs when an element on which an action is to be performed is missing.
Eg. In
Failure: Assertion failures are considered failures. Sahi does not stop execution on failures.
Error: Occurs when an element on which an action is to be performed is missing.
Eg. In
_click(_link("Link Test"))
, if _link("Link test")
does not exist, it will be an errorFailure: Assertion failures are considered failures. Sahi does not stop execution on failures.
_continueOnError
Since Sahi Pro: 3.5Since Sahi OS: 2
_continueOnError()
Arguments
| None |
Details
Forces script to continue inspite of error. Further steps will be executed.
Forces script to continue inspite of error. Further steps will be executed.
_continueOnError();
danger
Using this can be a waste of time. If button or link is missing, it is quite likely that all
further steps will also fail. We do not recommend this.
further steps will also fail. We do not recommend this.
info
It may be better to use the Script Callback Function onScriptError instead.
_runUnitTests
Since Sahi Pro: 3.5Since Sahi OS: 3
_runUnitTests([$testsArray])
Arguments
| $testsArray | array of strings optional | Array of test function names which should be executed |
Details
Executes all functions whose name starts with "test".
If testsArray is specified, runs only tests in that array.
If functions setUp() and tearDown() are defined,
they are executed before and after each test, irrespective of errors in the test functions.
Executes all functions whose name starts with "test".
If testsArray is specified, runs only tests in that array.
If functions setUp() and tearDown() are defined,
they are executed before and after each test, irrespective of errors in the test functions.
function setUp(){
_log("In setUp");
}
function tearDown(){
_log("In tearDown");
}
function testAddition() {
_assertEqual(3, 1+2);
}
function testSubtraction() {
_assertEqual(3, 5-2);
}
function testMultiplication() {
_assertEqual(8, 2*4);
}
// Invoke all tests:
_runUnitTests();
// Invoke only testAddition and testMultiplication
// Use this for debugging when you are fixing just one test
// and don't want to run all the tests.
_runUnitTests(["testAddition", "testMultiplication"]);
_fail
Since Sahi Pro: 3.5Since Sahi OS: 3
_fail([$message])
Arguments
| $message | string optional | Message to be logged in playback logs |
Details
Causes a script to stop as a failure and log the given message. Can be used in the middle of a script.
Causes a script to stop as a failure and log the given message. Can be used in the middle of a script.
info
- When called from inside a testcase, only that testcase will fail and other testcases will not be impacted.
- When called from inside try block, execution will proceed to catch block.
- onScriptFailure and onScriptError callback functions will NOT be called.
_stop
Since Sahi Pro: 5.1.0Since Sahi OS: NA
_stop()
Arguments
| None |
Details
Causes a script to stop execution.
Causes a script to stop execution.
info
- When called from inside a _testcase, the whole script execution will be stopped. Execution will not proceed to next testcase
- When called from inside try block, execution will terminate without entering the catch block.
- onScriptFailure and onScriptError callback functions will NOT be called.
Script Synchronization
Scripts can be forced to synchonize with each other by acquiring locks._lock
Since Sahi Pro: 5.1.0Since Sahi OS: NA
_lock($name[, $timeout])
Arguments
| $name | string | Lock name |
| $timeout | long optional | timeout |
Details
Acquires a lock with given name. If another script calls _lock with the same name, that script will wait till
this lock is unlocked or till timeout happens.
If timeout is not specified, the default timeout defined by
(Default is 60 seconds. Can be overridden in userdata.properties)
If you wish to lock a portion of code that deals with browser windows, example: focusing a window and taking a screenshot or focusing a window and doing file uploads, use _lockWindow instead of _lock.
For example usage, refer to the _lockWindow example below. Use _lock and _unlock for functionality other than dealing with windows.
Acquires a lock with given name. If another script calls _lock with the same name, that script will wait till
this lock is unlocked or till timeout happens.
If timeout is not specified, the default timeout defined by
sahi.lock.timeout
property in sahi.properties
is used.(Default is 60 seconds. Can be overridden in userdata.properties)
If you wish to lock a portion of code that deals with browser windows, example: focusing a window and taking a screenshot or focusing a window and doing file uploads, use _lockWindow instead of _lock.
For example usage, refer to the _lockWindow example below. Use _lock and _unlock for functionality other than dealing with windows.
_unlock
Since Sahi Pro: 5.1.0Since Sahi OS: NA
_unlock($name)
Arguments
| $name | string | Lock name |
Details
Unlocks or releases the lock of given name, acquired through the _lock API.
Unlocks or releases the lock of given name, acquired through the _lock API.
_lockWindow
Since Sahi Pro: 6.0.0Since Sahi OS: NA
_lockWindow([$timeout])
Arguments
| $timeout | long optional | timeout |
Details
This is a more specific version of the _lock API.
Acquires a lock with a name internal to Sahi. The same lock is used by Sahi when launching new browser windows.
If another script calls _lockWindow, that script will wait till this _lockWindow is unlocked or till timeout happens.
If timeout is not specified, the default timeout defined by
(Default is 60 seconds. Can be overridden in userdata.properties)
This is a more specific version of the _lock API.
Acquires a lock with a name internal to Sahi. The same lock is used by Sahi when launching new browser windows.
If another script calls _lockWindow, that script will wait till this _lockWindow is unlocked or till timeout happens.
If timeout is not specified, the default timeout defined by
sahi.lock.timeout
property in sahi.properties
is used.(Default is 60 seconds. Can be overridden in userdata.properties)
info
In 5.1.0, _lock API was introduced.
As part of taking screenshots, one would first need to call _focusWindow. The user could use _lock to lock a portion of code that called _focusWindow and then a Screenshot API. This is to ensure that while one script takes the screenshot of its browser, other scripts will wait before taking screenshots.
However, Sahi itself launches browser windows to run scripts of a suite. Since this is not controlled through _lock, a Sahi browser window may get opened while a script is attempting to take a screenshot. This would end up affecting the screenshot.
To avoid this problem, we have introduced the _lockWindow API. Whenever Sahi internally opens/manages browser windows, it calls _lockWindow to lock the window related code.
Users should always use _lockWindow when managing any code related to windows, example: focusing the window and taking screenshots, focusing the window and do a native file upload, etc.
As part of taking screenshots, one would first need to call _focusWindow. The user could use _lock to lock a portion of code that called _focusWindow and then a Screenshot API. This is to ensure that while one script takes the screenshot of its browser, other scripts will wait before taking screenshots.
However, Sahi itself launches browser windows to run scripts of a suite. Since this is not controlled through _lock, a Sahi browser window may get opened while a script is attempting to take a screenshot. This would end up affecting the screenshot.
To avoid this problem, we have introduced the _lockWindow API. Whenever Sahi internally opens/manages browser windows, it calls _lockWindow to lock the window related code.
Users should always use _lockWindow when managing any code related to windows, example: focusing the window and taking screenshots, focusing the window and do a native file upload, etc.
_unlockWindow
Since Sahi Pro: 6.0.0Since Sahi OS: NA
_unlockWindow()
Arguments
| None |
Details
Unlocks or releases the lock acquired by calling _lockWindow.
Used in conjunction with _lockWindow.
Unlocks or releases the lock acquired by calling _lockWindow.
Used in conjunction with _lockWindow.
Suppose we have 2 scripts: one for taking a screenshot and another for fileupload via native events.
// Script 1
_focusWindow();
_takeScreenShot();
// Script 2
_focusWindow();
// file upload via native events
Both these scripts need their browsers to be in focus. How ever when run in a suite, the sequence may become like this:
_focusWindow(); // script 1
_focusWindow(); // script 2: brings second window in focus
_takeScreenShot(); // script 1: will take screenshot of window 2 which is WRONG
To synchronize these, whenever focus is being sought, we may acquire a lock and then release the lock
only when our operation is complete.
Since we are dealing with windows, call _lockWindow instead of _lock so that windows opened by Sahi internally are also managed correctly.
//Script 1
_lockWindow();
_focusWindow();
_takeScreenShot();
_unlockWindow();
//Script 2
_lockWindow();
_focusWindow();
// do file upload stuff
_unlockWindow();
Now the sequence would be:
_lockWindow(); // script 1
_focusWindow(); // script 1
_lockWindow(); // script 2: will block here.
_takeScreenShot(); // script 1
_unlockWindow(); // script 1
_focusWindow(); // script 2
// do file upload stuff // script 2
_unlockWindow(); // script 2
Callback functions
Sahi provides a few hooks or callback functions which are automatically executed at various points of the script life cycle.These functions need to be defined at the start of the script.
The various functions are:
onScriptFailure
Since Sahi Pro: 3.5Since Sahi OS: 3
onScriptFailure($exception)
Arguments
| $exception | exception | Javascript Exception object |
Details
This is a callback function. It needs to be implemented by the tester.
It is called whenever an assertion failure occurs in the script. $exception is the actual exception that Sahi threw.
Can be used with _logException and _logExceptionAsFailure. $exception added since Sahi Pro V4.3
This is a callback function. It needs to be implemented by the tester.
It is called whenever an assertion failure occurs in the script. $exception is the actual exception that Sahi threw.
Can be used with _logException and _logExceptionAsFailure. $exception added since Sahi Pro V4.3
onScriptError
Since Sahi Pro: 3.5Since Sahi OS: 3
onScriptError($exception)
Arguments
| $exception | exception | Javascript Exception object |
Details
This is a callback function. It needs to be implemented by the tester.
It is called whenever an error occurs in the script.
$exception is the actual exception that Sahi threw. Can be used with _logException and _logExceptionAsFailure.
If the function returns true, the script will continue to execute. Default is false.
This is a callback function. It needs to be implemented by the tester.
It is called whenever an error occurs in the script.
$exception is the actual exception that Sahi threw. Can be used with _logException and _logExceptionAsFailure.
If the function returns true, the script will continue to execute. Default is false.
warning
If you have handled onScriptError in the script, Sahi will not treat it as a failure unless you specifically indicate it.
To indicate that the script has failed, you can use one of the following approaches.
To indicate that the script has failed, you can use one of the following approaches.
function onScriptError($e) {
// Handle whatever you want to do, first.
// Use either of the following. Prefer the former.
_logExceptionAsFailure($e); // Explicitly log the exception as failure.
_log("In onScriptError", "FAILURE"); // Log with a Failure tag.
return false;
}
onScriptEnd
Since Sahi Pro: 3.5Since Sahi OS: 3
onScriptEnd()
Arguments
| None |
Details
This is a callback function. It needs to be implemented by the tester.
It is called at the end of a script (even if there are errors in the script and the script stops in the middle).
This is a callback function. It needs to be implemented by the tester.
It is called at the end of a script (even if there are errors in the script and the script stops in the middle).
Callback example
function onBeforeStep($step, $debugInfo){
_log("onBeforeStep executed for step : " +$step);
}
function onAfterStep($step, $debugInfo, $status){
_log("step executed successfully with status : "+$status);
}
function onScriptEnd(){
_click(_button("Logout"));
}
function onScriptError(){
_alert(">> In onScriptError");
}
function onScriptFailure(){
_alert(">> In onScriptFailure");
}
_navigateTo("http://sahi.co.in/demo/training/");
_setValue(_textbox("user"), "test");
_setValue(_password("password"), "secret");
_click(_submit("Login"));
_assertExists(_submit("Login")); // cause SCRIPT ASSERTION FAILURE - triggers onScriptFailure
_setValue(_textbox("q11"), "2"); // causes SCRIPT ERROR - triggers onScriptError
// Script aborts here, but executes onScriptEnd() to logout
_setValue(_textbox("q[1]"), "1");
_setValue(_textbox("q[2]"), "1");
_click(_button("Add"));
_assertEqual("1150", _textbox("total").value); // cause SCRIPT FAILURE
// If not aborted earlier, automatically calls onScriptEnd() to logout.
Taking screenshots on error/failure
function onScriptError($e){
_focusWindow();
_takeScreenShot();
}
onScriptFailure = onScriptError;
_navigateTo("http://sahi.co.in/demo/training/");
_setValue(_textbox("user"), "test");
_setValue(_password("password"), "secret");
_click(_submit("Login"));
Force Sahi to continue on error after screenshots and logging.
function onScriptError($e){
_logExceptionAsFailure($e);
_focusWindow();
_takeScreenShot();
return true; // Forces Sahi to continue execution and not stop at error. Since Sahi Pro V4.3
}
_navigateTo("http://sahi.co.in/demo/training/");
_setValue(_textbox("user"), "test");
_setValue(_password("password"), "secret");
_click(_submit("Login"));
onBeforeStep
Since Sahi Pro: 6.0.0Since Sahi OS: NA
onBeforeStep($step, $debugInfo)
Arguments
| $step | String | which step is about to execute. |
| $debugInfo | String | debug information of the step(example : file name, lineNumber) |
Details
This is a callback function. It needs to be implemented by the tester.
It is called before every step in the script.
This is a callback function. It needs to be implemented by the tester.
It is called before every step in the script.
danger
Use this sparingly since it will be executed for every step in the script
onAfterStep
Since Sahi Pro: 6.0.0Since Sahi OS: NA
onAfterStep($step, $debugInfo, $status)
Arguments
| $step | String | which step is about to execute. |
| $debugInfo | String | debug information of the step(example : file name, lineNumber) |
| $status | String | status of function which got executed.(example : SUCCESS, FAILURE, ERROR, WAIT, UNRESPONSIVE_EXCEPTION) |
Details
This is a callback function. It needs to be implemented by the tester.
It is called after every step in the script.
This is a callback function. It needs to be implemented by the tester.
It is called after every step in the script.
danger
Use this sparingly since it will be executed for every step in the script
Recovery Functions (DEPRECATED)
_setRecovery
Since Sahi Pro: 3.5Since Sahi OS: 3
_setRecovery($fn)
Arguments
| $fn | function | Function that will get called on failure or error |
Details
Sets a recovery function which will be called on failure or error.
Sets a recovery function which will be called on failure or error.
dangerDEPRECATED: Do not use. Use callback functions as specified above
_removeRecovery
Since Sahi Pro: 3.5Since Sahi OS: 3
_removeRecovery()
Arguments
| None |
Details
Removes previously set recovery function.
Removes previously set recovery function.
dangerDEPRECATED: Do not use. Use callback functions as specified above


HTML5 CSS3 JavaScript Playground
"standalone-files", as the name suggests, contains standalone files, which are used for experiments
"test-ground" contains mini projects
"standalone-files", as the name suggests, contains standalone files, which are used for experiments
"test-ground" contains mini projects