The BBC micro:bit contains a message bus which acts as a conduit for events of all sorts. A micro:bit developer can create events and connected applications like this one can use the Bluetooth Event Service to register an interest in particular events and receive notifications from the micro:bit when events of interest are generated on the bus.
This demo must be run with custom firmware on the micro:bit therefore.
What?
With the right code flashed to your micro:bit (see below) you can count the squirrels you see when out and about my pressing button A on the micro:bit. At this point you do not need this application. Later on though, run this application on your phone, launch this demo and then press button B on the micro:bit and the number of squirrels you saw will be magically transmitted to yuor phone and displayed. Transmitted as a micro:bit event characteristic from the Bluetooth Event Service that is.
Your micro:bit needs the following code in main.cpp for this demo to work and the Event Service must be enabled.
#include "MicroBit.h" /* * Counter * Uses the Bluetooth Event Service to inform registered clients of the number of times button A has been pressed since the last time the accrued value was uploaded * over Bluetooth to a connected client application. */ uint16_t counter = 0; uint16_t counter_event = 9003; void onButtonAClick(MicroBitEvent e) { counter++; uBit.display.scrollAsync(counter); } void onButtonBClick(MicroBitEvent e) { MicroBitEvent evt(counter_event, counter); counter = 0; } void app_main() { uBit.display.scrollAsync("COUNTER"); uBit.MessageBus.listen(MICROBIT_ID_BUTTON_A, MICROBIT_BUTTON_EVT_CLICK, onButtonAClick); uBit.MessageBus.listen(MICROBIT_ID_BUTTON_B, MICROBIT_BUTTON_EVT_CLICK, onButtonBClick); }
All the code for this demo can be found in ui.TemperatureAlarmActivity.java except for the Bluetooth operations which are in bluetooth.BleAdapterService.


LOSER *1/2 (out of four) -a review by Bill Chambers<EMAIL_ADDRESS>starring Jason Biggs, Mena Suvari, Greg Kinnear written and directed by Amy Heckerling
*THIS REVIEW CONTAINS SPOILERS* As with most of her films, director Amy Heckerling's latest, Loser, seesaws between unpleasant and artificial, and is sometimes both at once. When she tackles big issues, such as abortion in Fast Times at Ridgemont High , it's impossible to tell whether she's being matter-of-fact or glib about them (they carry an almost documentary starkness), but whatever the case, she continually refuses to comment politically. Such is the sitcom tendency of her work: to jeopardize the innocence of her characters and then hit the reset button. This fear of drama soured me on Fast Times..., Look Who's Talking, Clueless, and now Loser, in which Ms. Heckerling also demonstrates, for the first time, zero affinity for the milieu.
Has anyone, for instance, ever met a girl in the stylistic vein of Mena Suvari's Dora? Attired in black thrift, her eye shadow smeared to racoon chic and her bangy red hair barely contained by girlish clips, she accepts the label of goth, but no self-respecting goth girl ever admitted to digging, as Dora does, those geriatric rockers Everclear, nor willingly went anywhere with a six-pack-wielding fratboy stranger. The mechanics of Loser's tired old introvert-boy-falls-for-extrovert-girl plot drive its protagonists into cultural non-specificity, so that they become even less than stereotypes. They become walking wardrobes.
Small-town transplant Paul (a strangely static Jason Biggs), our eponymous hero, always wears his woolly hunter's cap with flaps covering the ears, and beneath it rests a parted moptop that couldn't scream "Shemp" (the lame Stooge) wig louder. He has three smug-looking roommates (the one-dimensional trio is not supposed to be brothers, but they share similar facial features, including and especially mouths), and their fashion sense is incomprehensibly glam. Though they're not overtly transvestites, Heckerling seems to be equating flamboyance with villainy; how very Cruising of her. (The dormies conspire to evict Paul and regularly molest women they have drugged. Dora ignorantly downs one of their date rape potions. Unfortunately, either Heckerling or the studio is too cowardly to admit if she was subsequently violated.)
When Paul rescues Dora from said narcotic scare, he learns that she is dating their unctuous European lit professor Edward Alcott (superb Greg Kinnear). Although Paul's already in love with Dora by this point, as is bound to happen to losers when pretty girls address them by name, he gets altruistic and pretends the flowers he bought her are actually from Alcott. She's thrilled, but nevertheless spends a few days at Paul's to recuperate; the two bond over emergency kitten surgery and a Broadway play ("Cabaret"), and just when Paul's got in his head that she's starting to love him back in that non-friendly way, she decides to become Alcott's live-in girlfriend. Cue precious hommage to The Graduate , shots of Paul drifting around Berkeley--er... (Aside: Simon & Garfunkel's "Parsley, Sage, Rosemary & Thyme" should never have been allowed in another motion picture.)
Heckerling has a lot in common with Nora "You've Got Mail " Ephron, the only other prominent chick directing comedies today, in that neither has any use for strong-willed women. Men continue to trod on Dora until the bitter end (in the final scene, she gives Paul a big smooch after he blurts out his feelings in what amounts to a creepy ultimatum), and Dora ultimately shrugs off being drugged against her will--mere hours after Paul hints to her that she was poisoned, she's cheerily redecorating his apartment. (Heckerling is so laissez-faire about the issue in general that she reserves the comeuppance of the would-be rapists for jokey epilogue titles.)
 Heckerling misses her shot at having Dora transform herself into a role model, and while such arcs may not be Heckerling's social responsibility, it is a privilege I would have taken advantage of if I were in her shoes. (Consider, too, that Dora is the film's sole female principal.) Not that Loser is worth contemplating this seriously--God knows Heckerling didn't. That is her hallmark. (--- For more first-run, DVD, and books-about-movies reviews, plus contests and the proverbial "more!", visit 'Film Freak Central,' @ http://filmfreakcentral.net ---)
-December, 2000
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Suffolk County Council employees caught abusing pool cars
by Matt de PrezSuffolk County Council has dismissed two employees for misuse of pool cars, according to reports.
The misconduct was discovered following an investigation by the local authority.
Suffolk County Council investigated 113 members of staff for misuse of pool cars between April 2017 and June 2018, 13 of whom were found to have abused the system.
Of those, two were dismissed; three received final written warnings; one received a first written warning; two had no case to answer for and one had reached a settlement agreement because of an ongoing disciplinary investigation for a separate matter, according to a report by the Eastern Daily Press (EDP).
There were also three who received non-formal disciplinaries and one temporary worker who had their contract terminated.
A spokesman from Suffolk County Council told the EDP: "We have a zero-tolerance policy regarding the misuse of council resources, so where evidence has been found of this, appropriate action will be taken.
"Our employees are frequently reminded of our policy on pool cars, mileage and subsistence.
"These are regularly audited to identify any apparent misuse and allow us to investigate and take action accordingly."
Council rules state that pool cars should not be taken after 5pm, on weekends or booked in the week to continue over a weekend, unless prior permission had been sought.
Another member of staff was dismissed in the summer of 2017 after a whistleblower reported the individual to have misused pool cars prior to the review.
The cost to taxpayers has not yet been identified, but it is understood that the council recovered around £2,000.
Council chiefs sent reminders to staff about pool car use and updated the internal bookings, following the investigation.
Pool cars must not be used for personal use, else they'll be eligible for benefit taxation.


Welcome to Web App Common Tasks Test Page
Dynamically load HTML, CSS based on Query String
The following link will load all HTML and CSS
Load Header, Footer and Green Theme (Two Column Layout) Load Header, Footer and Blue Theme (Reversed Two Column Layout)Loading CSS (No Header and Footer)
Green Theme (Two Column Layout) Blue Theme (Reversed Two Column Layout)


Test ended by:
Play to the end.
When 'ended' event fires, change the source.
Verify that 'ended' event fires again on different source.


Database: Migrations
Introduction
Migrations are like version control for your database, allowing your team to define and share the application's database schema definition. If you have ever had to tell a teammate to manually add a column to their local database schema after pulling in your changes from source control, you've faced the problem that database migrations solve.
The Laravel Schema
facade provides database agnostic support for creating and manipulating tables across all of Laravel's supported database systems. Typically, migrations will use this facade to create and modify database tables and columns.
Generating Migrations
You may use the make:migration
Artisan command to generate a database migration. The new migration will be placed in your database/migrations
directory. Each migration filename contains a timestamp that allows Laravel to determine the order of the migrations:
php artisan make:migration create_flights_table
Laravel will use the name of the migration to attempt to guess the name of the table and whether or not the migration will be creating a new table. If Laravel is able to determine the table name from the migration name, Laravel will pre-fill the generated migration file with the specified table. Otherwise, you may simply specify the table in the migration file manually.
If you would like to specify a custom path for the generated migration, you may use the --path
option when executing the make:migration
command. The given path should be relative to your application's base path.
{tip} Migration stubs may be customized using stub publishing.
Squashing Migrations
As you build your application, you may accumulate more and more migrations over time. This can lead to your database/migrations
directory becoming bloated with potentially hundreds of migrations. If you would like, you may "squash" your migrations into a single SQL file. To get started, execute the schema:dump
command:
php artisan schema:dump
// Dump the current database schema and prune all existing migrations...
php artisan schema:dump --prune
When you execute this command, Laravel will write a "schema" file to your application's database/schema
directory. Now, when you attempt to migrate your database and no other migrations have been executed, Laravel will execute the schema file's SQL statements first. After executing the schema file's statements, Laravel will execute any remaining migrations that were not part of the schema dump.
You should commit your database schema file to source control so that other new developers on your team may quickly create your application's initial database structure.
{note} Migration squashing is only available for the MySQL, PostgreSQL, and SQLite databases and utilizes the database's command-line client. Schema dumps may not be restored to in-memory SQLite databases.
Migration Structure
A migration class contains two methods: up
and down
. The up
method is used to add new tables, columns, or indexes to your database, while the down
method should reverse the operations performed by the up
method.
Within both of these methods, you may use the Laravel schema builder to expressively create and modify tables. To learn about all of the methods available on the Schema
builder, check out its documentation. For example, the following migration creates a flights
table:
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateFlightsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('flights', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('airline');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('flights');
}
}
Anonymous Migrations
As you may have noticed in the example above, Laravel will automatically assign a class name to all of the migrations that you generate using the make:migration
command. However, if you wish, you may return an anonymous class from your migration file. This is primarily useful if your application accumulates many migrations and two of them have a class name collision:
<?php
use Illuminate\Database\Migrations\Migration;
return new class extends Migration
{
//
};
Setting The Migration Connection
If your migration will be interacting with a database connection other than your application's default database connection, you should set the $connection
property of your migration:
/**
* The database connection that should be used by the migration.
*
* @var string
*/
protected $connection = 'pgsql';
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//
}
Running Migrations
To run all of your outstanding migrations, execute the migrate
Artisan command:
php artisan migrate
If you would like to see which migrations have run thus far, you may use the migrate:status
Artisan command:
php artisan migrate:status
Forcing Migrations To Run In Production
Some migration operations are destructive, which means they may cause you to lose data. In order to protect you from running these commands against your production database, you will be prompted for confirmation before the commands are executed. To force the commands to run without a prompt, use the --force
flag:
php artisan migrate --force
Rolling Back Migrations
To roll back the latest migration operation, you may use the rollback
Artisan command. This command rolls back the last "batch" of migrations, which may include multiple migration files:
php artisan migrate:rollback
You may roll back a limited number of migrations by providing the step
option to the rollback
command. For example, the following command will roll back the last five migrations:
php artisan migrate:rollback --step=5
The migrate:reset
command will roll back all of your application's migrations:
php artisan migrate:reset
Roll Back & Migrate Using A Single Command
The migrate:refresh
command will roll back all of your migrations and then execute the migrate
command. This command effectively re-creates your entire database:
php artisan migrate:refresh
// Refresh the database and run all database seeds...
php artisan migrate:refresh --seed
You may roll back and re-migrate a limited number of migrations by providing the step
option to the refresh
command. For example, the following command will roll back and re-migrate the last five migrations:
php artisan migrate:refresh --step=5
Drop All Tables & Migrate
The migrate:fresh
command will drop all tables from the database and then execute the migrate
command:
php artisan migrate:fresh
php artisan migrate:fresh --seed
{note} The
migrate:fresh
command will drop all database tables regardless of their prefix. This command should be used with caution when developing on a database that is shared with other applications.
Tables
Creating Tables
To create a new database table, use the create
method on the Schema
facade. The create
method accepts two arguments: the first is the name of the table, while the second is a closure which receives a Blueprint
object that may be used to define the new table:
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email');
$table->timestamps();
});
When creating the table, you may use any of the schema builder's column methods to define the table's columns.
Checking For Table / Column Existence
You may check for the existence of a table or column using the hasTable
and hasColumn
methods:
if (Schema::hasTable('users')) {
// The "users" table exists...
}
if (Schema::hasColumn('users', 'email')) {
// The "users" table exists and has an "email" column...
}
Database Connection & Table Options
If you want to perform a schema operation on a database connection that is not your application's default connection, use the connection
method:
Schema::connection('sqlite')->create('users', function (Blueprint $table) {
$table->id();
});
In addition, a few other properties and methods may be used to define other aspects of the table's creation. The engine
property may be used to specify the table's storage engine when using MySQL:
Schema::create('users', function (Blueprint $table) {
$table->engine = 'InnoDB';
// ...
});
The charset
and collation
properties may be used to specify the character set and collation for the created table when using MySQL:
Schema::create('users', function (Blueprint $table) {
$table->charset = 'utf8mb4';
$table->collation = 'utf8mb4_unicode_ci';
// ...
});
The temporary
method may be used to indicate that the table should be "temporary". Temporary tables are only visible to the current connection's database session and are dropped automatically when the connection is closed:
Schema::create('calculations', function (Blueprint $table) {
$table->temporary();
// ...
});
Updating Tables
The table
method on the Schema
facade may be used to update existing tables. Like the create
method, the table
method accepts two arguments: the name of the table and a closure that receives a Blueprint
instance you may use to add columns or indexes to the table:
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
Schema::table('users', function (Blueprint $table) {
$table->integer('votes');
});
Renaming / Dropping Tables
To rename an existing database table, use the rename
method:
use Illuminate\Support\Facades\Schema;
Schema::rename($from, $to);
To drop an existing table, you may use the drop
or dropIfExists
methods:
Schema::drop('users');
Schema::dropIfExists('users');
Renaming Tables With Foreign Keys
Before renaming a table, you should verify that any foreign key constraints on the table have an explicit name in your migration files instead of letting Laravel assign a convention based name. Otherwise, the foreign key constraint name will refer to the old table name.
Columns
Creating Columns
The table
method on the Schema
facade may be used to update existing tables. Like the create
method, the table
method accepts two arguments: the name of the table and a closure that receives an Illuminate\Database\Schema\Blueprint
instance you may use to add columns to the table:
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
Schema::table('users', function (Blueprint $table) {
$table->integer('votes');
});
Available Column Types
The schema builder blueprint offers a variety of methods that correspond to the different types of columns you can add to your database tables. Each of the available methods are listed in the table below:
bigIncrements()
{#collection-method}
The bigIncrements
method creates an auto-incrementing UNSIGNED BIGINT
(primary key) equivalent column:
$table->bigIncrements('id');
bigInteger()
{#collection-method}
The bigInteger
method creates a BIGINT
equivalent column:
$table->bigInteger('votes');
binary()
{#collection-method}
The binary
method creates a BLOB
equivalent column:
$table->binary('photo');
boolean()
{#collection-method}
The boolean
method creates a BOOLEAN
equivalent column:
$table->boolean('confirmed');
char()
{#collection-method}
The char
method creates a CHAR
equivalent column with of a given length:
$table->char('name', 100);
dateTimeTz()
{#collection-method}
The dateTimeTz
method creates a DATETIME
(with timezone) equivalent column with an optional precision (total digits):
$table->dateTimeTz('created_at', $precision = 0);
dateTime()
{#collection-method}
The dateTime
method creates a DATETIME
equivalent column with an optional precision (total digits):
$table->dateTime('created_at', $precision = 0);
date()
{#collection-method}
The date
method creates a DATE
equivalent column:
$table->date('created_at');
decimal()
{#collection-method}
The decimal
method creates a DECIMAL
equivalent column with the given precision (total digits) and scale (decimal digits):
$table->decimal('amount', $precision = 8, $scale = 2);
double()
{#collection-method}
The double
method creates a DOUBLE
equivalent column with the given precision (total digits) and scale (decimal digits):
$table->double('amount', 8, 2);
enum()
{#collection-method}
The enum
method creates a ENUM
equivalent column with the given valid values:
$table->enum('difficulty', ['easy', 'hard']);
float()
{#collection-method}
The float
method creates a FLOAT
equivalent column with the given precision (total digits) and scale (decimal digits):
$table->float('amount', 8, 2);
foreignId()
{#collection-method}
The foreignId
method is an alias of the unsignedBigInteger
method:
$table->foreignId('user_id');
geometryCollection()
{#collection-method}
The geometryCollection
method creates a GEOMETRYCOLLECTION
equivalent column:
$table->geometryCollection('positions');
geometry()
{#collection-method}
The geometry
method creates a GEOMETRY
equivalent column:
$table->geometry('positions');
id()
{#collection-method}
The id
method is an alias of the bigIncrements
method. By default, the method will create an id
column; however, you may pass a column name if you would like to assign a different name to the column:
$table->id();
increments()
{#collection-method}
The increments
method creates an auto-incrementing UNSIGNED INTEGER
equivalent column as a primary key:
$table->increments('id');
integer()
{#collection-method}
The integer
method creates an INTEGER
equivalent column:
$table->integer('votes');
ipAddress()
{#collection-method}
The ipAddress
method creates a VARCHAR
equivalent column:
$table->ipAddress('visitor');
json()
{#collection-method}
The json
method creates a JSON
equivalent column:
$table->json('options');
jsonb()
{#collection-method}
The jsonb
method creates a JSONB
equivalent column:
$table->jsonb('options');
lineString()
{#collection-method}
The lineString
method creates a LINESTRING
equivalent column:
$table->lineString('positions');
longText()
{#collection-method}
The longText
method creates a LONGTEXT
equivalent column:
$table->longText('description');
macAddress()
{#collection-method}
The macAddress
method creates a column that is intended to hold a MAC address. Some database systems, such as PostgreSQL, have a dedicated column type for this type of data. Other database systems will use a string equivalent column:
$table->macAddress('device');
mediumIncrements()
{#collection-method}
The mediumIncrements
method creates an auto-incrementing UNSIGNED MEDIUMINT
equivalent column as a primary key:
$table->mediumIncrements('id');
mediumInteger()
{#collection-method}
The mediumInteger
method creates a MEDIUMINT
equivalent column:
$table->mediumInteger('votes');
mediumText()
{#collection-method}
The mediumText
method creates a MEDIUMTEXT
equivalent column:
$table->mediumText('description');
morphs()
{#collection-method}
The morphs
method is a convenience method that adds a {column}_id
UNSIGNED BIGINT
equivalent column and a {column}_type
VARCHAR
equivalent column.
This method is intended to be used when defining the columns necessary for a polymorphic Eloquent relationship. In the following example, taggable_id
and taggable_type
columns would be created:
$table->morphs('taggable');
multiLineString()
{#collection-method}
The multiLineString
method creates a MULTILINESTRING
equivalent column:
$table->multiLineString('positions');
multiPoint()
{#collection-method}
The multiPoint
method creates a MULTIPOINT
equivalent column:
$table->multiPoint('positions');
multiPolygon()
{#collection-method}
The multiPolygon
method creates a MULTIPOLYGON
equivalent column:
$table->multiPolygon('positions');
nullableTimestamps()
{#collection-method}
The method is similar to the timestamps method; however, the column that is created will be "nullable":
$table->nullableTimestamps(0);
nullableMorphs()
{#collection-method}
The method is similar to the morphs method; however, the columns that are created will be "nullable":
$table->nullableMorphs('taggable');
nullableUuidMorphs()
{#collection-method}
The method is similar to the uuidMorphs method; however, the columns that are created will be "nullable":
$table->nullableUuidMorphs('taggable');
point()
{#collection-method}
The point
method creates a POINT
equivalent column:
$table->point('position');
polygon()
{#collection-method}
The polygon
method creates a POLYGON
equivalent column:
$table->polygon('position');
rememberToken()
{#collection-method}
The rememberToken
method creates a nullable, VARCHAR(100)
equivalent column that is intended to store the current "remember me" authentication token:
$table->rememberToken();
set()
{#collection-method}
The set
method creates a SET
equivalent column with the given list of valid values:
$table->set('flavors', ['strawberry', 'vanilla']);
smallIncrements()
{#collection-method}
The smallIncrements
method creates an auto-incrementing UNSIGNED SMALLINT
equivalent column as a primary key:
$table->smallIncrements('id');
smallInteger()
{#collection-method}
The smallInteger
method creates a SMALLINT
equivalent column:
$table->smallInteger('votes');
softDeletesTz()
{#collection-method}
The softDeletesTz
method adds a nullable deleted_at
TIMESTAMP
(with timezone) equivalent column with an optional precision (total digits). This column is intended to store the deleted_at
timestamp needed for Eloquent's "soft delete" functionality:
$table->softDeletesTz($column = 'deleted_at', $precision = 0);
softDeletes()
{#collection-method}
The softDeletes
method adds a nullable deleted_at
TIMESTAMP
equivalent column with an optional precision (total digits). This column is intended to store the deleted_at
timestamp needed for Eloquent's "soft delete" functionality:
$table->softDeletes($column = 'deleted_at', $precision = 0);
string()
{#collection-method}
The string
method creates a VARCHAR
equivalent column of the given length:
$table->string('name', 100);
text()
{#collection-method}
The text
method creates a TEXT
equivalent column:
$table->text('description');
timeTz()
{#collection-method}
The timeTz
method creates a TIME
(with timezone) equivalent column with an optional precision (total digits):
$table->timeTz('sunrise', $precision = 0);
time()
{#collection-method}
The time
method creates a TIME
equivalent column with an optional precision (total digits):
$table->time('sunrise', $precision = 0);
timestampTz()
{#collection-method}
The timestampTz
method creates a TIMESTAMP
(with timezone) equivalent column with an optional precision (total digits):
$table->timestampTz('added_at', $precision = 0);
timestamp()
{#collection-method}
The timestamp
method creates a TIMESTAMP
equivalent column with an optional precision (total digits):
$table->timestamp('added_at', $precision = 0);
timestampsTz()
{#collection-method}
The timestampsTz
method creates created_at
and updated_at
TIMESTAMP
(with timezone) equivalent columns with an optional precision (total digits):
$table->timestampsTz($precision = 0);
timestamps()
{#collection-method}
The timestamps
method creates created_at
and updated_at
TIMESTAMP
equivalent columns with an optional precision (total digits):
$table->timestamps($precision = 0);
tinyIncrements()
{#collection-method}
The tinyIncrements
method creates an auto-incrementing UNSIGNED TINYINT
equivalent column as a primary key:
$table->tinyIncrements('id');
tinyInteger()
{#collection-method}
The tinyInteger
method creates a TINYINT
equivalent column:
$table->tinyInteger('votes');
tinyText()
{#collection-method}
The tinyText
method creates a TINYTEXT
equivalent column:
$table->tinyText('notes');
unsignedBigInteger()
{#collection-method}
The unsignedBigInteger
method creates an UNSIGNED BIGINT
equivalent column:
$table->unsignedBigInteger('votes');
unsignedDecimal()
{#collection-method}
The unsignedDecimal
method creates an UNSIGNED DECIMAL
equivalent column with an optional precision (total digits) and scale (decimal digits):
$table->unsignedDecimal('amount', $precision = 8, $scale = 2);
unsignedInteger()
{#collection-method}
The unsignedInteger
method creates an UNSIGNED INTEGER
equivalent column:
$table->unsignedInteger('votes');
unsignedMediumInteger()
{#collection-method}
The unsignedMediumInteger
method creates an UNSIGNED MEDIUMINT
equivalent column:
$table->unsignedMediumInteger('votes');
unsignedSmallInteger()
{#collection-method}
The unsignedSmallInteger
method creates an UNSIGNED SMALLINT
equivalent column:
$table->unsignedSmallInteger('votes');
unsignedTinyInteger()
{#collection-method}
The unsignedTinyInteger
method creates an UNSIGNED TINYINT
equivalent column:
$table->unsignedTinyInteger('votes');
uuidMorphs()
{#collection-method}
The uuidMorphs
method is a convenience method that adds a {column}_id
CHAR(36)
equivalent column and a {column}_type
VARCHAR
equivalent column.
This method is intended to be used when defining the columns necessary for a polymorphic Eloquent relationship that use UUID identifiers. In the following example, taggable_id
and taggable_type
columns would be created:
$table->uuidMorphs('taggable');
uuid()
{#collection-method}
The uuid
method creates a UUID
equivalent column:
$table->uuid('id');
year()
{#collection-method}
The year
method creates a YEAR
equivalent column:
$table->year('birth_year');
Column Modifiers
In addition to the column types listed above, there are several column "modifiers" you may use when adding a column to a database table. For example, to make the column "nullable", you may use the nullable
method:
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
Schema::table('users', function (Blueprint $table) {
$table->string('email')->nullable();
});
The following table contains all of the available column modifiers. This list does not include index modifiers:
| Modifier | Description |
|---|---|
->after('column') |
Place the column "after" another column (MySQL). |
->autoIncrement() |
Set INTEGER columns as auto-incrementing (primary key). |
->charset('utf8mb4') |
Specify a character set for the column (MySQL). |
->collation('utf8mb4_unicode_ci') |
Specify a collation for the column (MySQL/PostgreSQL/SQL Server). |
->comment('my comment') |
Add a comment to a column (MySQL/PostgreSQL). |
->default($value) |
Specify a "default" value for the column. |
->first() |
Place the column "first" in the table (MySQL). |
->from($integer) |
Set the starting value of an auto-incrementing field (MySQL / PostgreSQL). |
->nullable($value = true) |
Allow NULL values to be inserted into the column. |
->storedAs($expression) |
Create a stored generated column (MySQL). |
->unsigned() |
Set INTEGER columns as UNSIGNED (MySQL). |
->useCurrent() |
Set TIMESTAMP columns to use CURRENT_TIMESTAMP as default value. |
->useCurrentOnUpdate() |
Set TIMESTAMP columns to use CURRENT_TIMESTAMP when a record is updated. |
->virtualAs($expression) |
Create a virtual generated column (MySQL). |
->generatedAs($expression) |
Create an identity column with specified sequence options (PostgreSQL). |
->always() |
Defines the precedence of sequence values over input for an identity column (PostgreSQL). |
Default Expressions
The default
modifier accepts a value or an Illuminate\Database\Query\Expression
instance. Using an Expression
instance will prevent Laravel from wrapping the value in quotes and allow you to use database specific functions. One situation where this is particularly useful is when you need to assign default values to JSON columns:
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Query\Expression;
use Illuminate\Database\Migrations\Migration;
class CreateFlightsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('flights', function (Blueprint $table) {
$table->id();
$table->json('movies')->default(new Expression('(JSON_ARRAY())'));
$table->timestamps();
});
}
}
{note} Support for default expressions depends on your database driver, database version, and the field type. Please refer to your database's documentation.
Column Order
When using the MySQL database, the after
method may be used to add columns after an existing column in the schema:
$table->after('password', function ($table) {
$table->string('address_line1');
$table->string('address_line2');
$table->string('city');
});
Modifying Columns
Prerequisites
Before modifying a column, you must install the doctrine/dbal
package using the Composer package manager. The Doctrine DBAL library is used to determine the current state of the column and to create the SQL queries needed to make the requested changes to your column:
composer require doctrine/dbal
If you plan to modify columns created using the timestamp
method, you must also add the following configuration to your application's config/database.php
configuration file:
use Illuminate\Database\DBAL\TimestampType;
'dbal' => [
'types' => [
'timestamp' => TimestampType::class,
],
],
{note} If your application is using Microsoft SQL Server, please ensure that you install
doctrine/dbal:^3.0
.
Updating Column Attributes
The change
method allows you to modify the type and attributes of existing columns. For example, you may wish to increase the size of a string
column. To see the change
method in action, let's increase the size of the name
column from 25 to 50. To accomplish this, we simply define the new state of the column and then call the change
method:
Schema::table('users', function (Blueprint $table) {
$table->string('name', 50)->change();
});
We could also modify a column to be nullable:
Schema::table('users', function (Blueprint $table) {
$table->string('name', 50)->nullable()->change();
});
{note} The following column types can be modified:
bigInteger
,binary
,boolean
,date
,dateTime
,dateTimeTz
,decimal
,integer
,json
,longText
,mediumText
,smallInteger
,string
,text
,time
,unsignedBigInteger
,unsignedInteger
,unsignedSmallInteger
, anduuid
. To modify atimestamp
column type a Doctrine type must be registered.
Renaming Columns
To rename a column, you may use the renameColumn
method provided by the schema builder blueprint. Before renaming a column, ensure that you have installed the doctrine/dbal
library via the Composer package manager:
Schema::table('users', function (Blueprint $table) {
$table->renameColumn('from', 'to');
});
{note} Renaming an
enum
column is not currently supported.
Dropping Columns
To drop a column, you may use the dropColumn
method on the schema builder blueprint. If your application is utilizing an SQLite database, you must install the doctrine/dbal
package via the Composer package manager before the dropColumn
method may be used:
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('votes');
});
You may drop multiple columns from a table by passing an array of column names to the dropColumn
method:
Schema::table('users', function (Blueprint $table) {
$table->dropColumn(['votes', 'avatar', 'location']);
});
{note} Dropping or modifying multiple columns within a single migration while using an SQLite database is not supported.
Available Command Aliases
Laravel provides several convenient methods related to dropping common types of columns. Each of these methods is described in the table below:
| Command | Description |
|---|---|
$table->dropMorphs('morphable'); |
Drop the morphable_id and morphable_type columns. |
$table->dropRememberToken(); |
Drop the remember_token column. |
$table->dropSoftDeletes(); |
Drop the deleted_at column. |
$table->dropSoftDeletesTz(); |
Alias of dropSoftDeletes() method. |
$table->dropTimestamps(); |
Drop the created_at and updated_at columns. |
$table->dropTimestampsTz(); |
Alias of dropTimestamps() method. |
Indexes
Creating Indexes
The Laravel schema builder supports several types of indexes. The following example creates a new email
column and specifies that its values should be unique. To create the index, we can chain the unique
method onto the column definition:
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
Schema::table('users', function (Blueprint $table) {
$table->string('email')->unique();
});
Alternatively, you may create the index after defining the column. To do so, you should call the unique
method on the schema builder blueprint. This method accepts the name of the column that should receive a unique index:
$table->unique('email');
You may even pass an array of columns to an index method to create a compound (or composite) index:
$table->index(['account_id', 'created_at']);
When creating an index, Laravel will automatically generate an index name based on the table, column names, and the index type, but you may pass a second argument to the method to specify the index name yourself:
$table->unique('email', 'unique_email');
Available Index Types
Laravel's schema builder blueprint class provides methods for creating each type of index supported by Laravel. Each index method accepts an optional second argument to specify the name of the index. If omitted, the name will be derived from the names of the table and column(s) used for the index, as well as the index type. Each of the available index methods is described in the table below:
| Command | Description |
|---|---|
$table->primary('id'); |
Adds a primary key. |
$table->primary(['id', 'parent_id']); |
Adds composite keys. |
$table->unique('email'); |
Adds a unique index. |
$table->index('state'); |
Adds an index. |
$table->spatialIndex('location'); |
Adds a spatial index (except SQLite). |
Index Lengths & MySQL / MariaDB
By default, Laravel uses the utf8mb4
character set. If you are running a version of MySQL older than the 5.7.7 release or MariaDB older than the 10.2.2 release, you may need to manually configure the default string length generated by migrations in order for MySQL to create indexes for them. You may configure the default string length by calling the Schema::defaultStringLength
method within the boot
method of your App\Providers\AppServiceProvider
class:
use Illuminate\Support\Facades\Schema;
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Schema::defaultStringLength(191);
}
Alternatively, you may enable the innodb_large_prefix
option for your database. Refer to your database's documentation for instructions on how to properly enable this option.
Renaming Indexes
To rename an index, you may use the renameIndex
method provided by the schema builder blueprint. This method accepts the current index name as its first argument and the desired name as its second argument:
$table->renameIndex('from', 'to')
Dropping Indexes
To drop an index, you must specify the index's name. By default, Laravel automatically assigns an index name based on the table name, the name of the indexed column, and the index type. Here are some examples:
| Command | Description |
|---|---|
$table->dropPrimary('users_id_primary'); |
Drop a primary key from the "users" table. |
$table->dropUnique('users_email_unique'); |
Drop a unique index from the "users" table. |
$table->dropIndex('geo_state_index'); |
Drop a basic index from the "geo" table. |
$table->dropSpatialIndex('geo_location_spatialindex'); |
Drop a spatial index from the "geo" table (except SQLite). |
If you pass an array of columns into a method that drops indexes, the conventional index name will be generated based on the table name, columns, and index type:
Schema::table('geo', function (Blueprint $table) {
$table->dropIndex(['state']); // Drops index 'geo_state_index'
});
Foreign Key Constraints
Laravel also provides support for creating foreign key constraints, which are used to force referential integrity at the database level. For example, let's define a user_id
column on the posts
table that references the id
column on a users
table:
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
Schema::table('posts', function (Blueprint $table) {
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
});
Since this syntax is rather verbose, Laravel provides additional, terser methods that use conventions to provide a better developer experience. The example above can be rewritten like so:
Schema::table('posts', function (Blueprint $table) {
$table->foreignId('user_id')->constrained();
});
The foreignId
method is an alias for unsignedBigInteger
while the constrained
method will use conventions to determine the table and column name being referenced. If your table name does not match Laravel's conventions, you may specify the table name by passing it as an argument to the constrained
method:
Schema::table('posts', function (Blueprint $table) {
$table->foreignId('user_id')->constrained('users');
});
You may also specify the desired action for the "on delete" and "on update" properties of the constraint:
$table->foreignId('user_id')
->constrained()
->onUpdate('cascade')
->onDelete('cascade');
Any additional column modifiers must be called before the constrained
method:
$table->foreignId('user_id')
->nullable()
->constrained();
Dropping Foreign Keys
To drop a foreign key, you may use the dropForeign
method, passing the name of the foreign key constraint to be deleted as an argument. Foreign key constraints use the same naming convention as indexes. In other words, the foreign key constraint name is based on the name of the table and the columns in the constraint, followed by a "_foreign" suffix:
$table->dropForeign('posts_user_id_foreign');
Alternatively, you may pass an array containing the column name that holds the foreign key to the dropForeign
method. The array will be converted to a foreign key constraint name using Laravel's constraint naming conventions:
$table->dropForeign(['user_id']);
Toggling Foreign Key Constraints
You may enable or disable foreign key constraints within your migrations by using the following methods:
Schema::enableForeignKeyConstraints();
Schema::disableForeignKeyConstraints();
{note} SQLite disables foreign key constraints by default. When using SQLite, make sure to enable foreign key support in your database configuration before attempting to create them in your migrations. In addition, SQLite only supports foreign keys upon creation of the table and not when tables are altered.


Using float property to float containers next to each other
First container
Second container
Third container
4th container
5th container
6th container
7th container
8th container
Footer?


Modern Javascript I
Kay Ashaolu
There's more?
- There is a whole lot more going on with JavaScript
- Javascript is an evolving language
ECMAScript, what is that?
- ECMAScript is technically the JavaScript language standard
- Other languages have adopted some of this standard (e.g. ActionScript)
- Lays out the features of JavaScript to be agreed upon
So many versions...
- Figuring out which browser is running which version of ECMAScript could get daunting
- Browsers also do not simply implement the entire version
- A browser update could add support to single particular feature
What if you actually want to use newer features
- That person that never updates IE will not be able to execute your JavaScript
- That person that found a way to not automatically update Chrome will not be able to see your site
Solution: Transpiler
- Similar to a compiler, but converts JavaScript to JavaScript
- Converts Javascript code written in a higher version into lower version JavaScript code
- This enables developers to use newer features, and users with older browsers able to execute the code
Example ES6 Code
class Planet {
constructor (mass, moons) {
this.mass = mass;
this.moons = moons || 0;
}
reportMoons () {
console.log(`I have ${this.moons} moons.`)
}
}
Compiled ES5 Code
var _createClass = function () { function defineProperties(target, props) {...
defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var Planet = function () {
function Planet(mass, moons) {
_classCallCheck(this, Planet);
this.mass = mass;
this.moons = moons || 0;
}
_createClass(Planet, [{
key: 'reportMoons',
value: function reportMoons() {
console.log('I have ' + this.moons + ' moons.');
}
}]);
return Planet;
}();
Using Babel
- Babel is a transpiler that accomplishes conversion
- There is an entire build environment, using webpack 4, babel, and npm to set up
- For this week, please use the latest version of Chrome or Firefox to run your Javascript
Without further ado
Let's learn some modern Javascript
Syntactic sugar
A lot of improvements to language focuses on changing syntax to make it easier to accomplish a certain goal
Let's talk about some of those features in ES6
Let and Scope
- Let creates a variable with scope
- Scope is a term that defines a boundary where variables live
- Scope is how you can ensure content inside a function is not affected by the outside
- Scope in Javascript is largely defined by curly brackets ('{}')
Let Example
let a = 50;
let b = 100;
if (true) {
let a = 60;
var c = 10;
console.log(a/c); // 6
console.log(b/c); // 10
}
console.log(c); // 10
console.log(a); // 50
Let Example explained
- The variable a is found both in the scope of this script, and in the scope of the if statement block
- The variable a within the block can be considered a different variable than the variable a outside the block
Const
- There a times where you do not want a variable to change after assignment
- For example, if you have a variable that is set to the number PI
- You wouldn't want that variable PI to change during your program
Const example
const b = "Constant variable";
b = "Assigning new value"; // shows error.
const LANGUAGES = ['Js', 'Ruby', 'Python', 'Go'];
LANGUAGES = "Javascript"; // shows error.
LANGUAGES.push('Java'); // Works fine.
console.log(LANGUAGES); // ['Js', 'Ruby', 'Python', 'Go', 'Java']
Const example explained
- The variable LANGUAGES can not be changed
- However, what LANGUAGES points to, if it is mutable can change
Why use Let and Const
- Cleaner understanding of the lifespan of a variable
- Reduce coding mistakes by ensuring variables that shouldn't change does not
Arrow Functions
- There is a new way of defining functions
- There are a few reasons for this (and that's actually a pun, but you can look that up to figure it out)
- This new way of writing function also helps with clearly defining scope
Arrow Functions Example
function oldOne(name) {
console.log("Hello " + name);
}
// New Syntax
let newOne = (name) => {
console.log("Hello " + name);
}
Arrow Functions Example Explained
- The parameters are named in the parenthesies outside the name of the function
- Note how you assign a variable to a function (and can use let for scope)
Default parameters
- Convenient ability to assign parameters to a function a value if not specified by the caller
Default parameters example
let Func = (a, b = 10) => {
return a + b;
}
console.log(Func(20)); // 20 + 10 = 30
console.log(Func(20, 50)); // 20 + 50 = 70
let NotWorkingFunction = (a = 10, b) => {
return a + b;
}
console.log(NotWorkingFunction(20)); // NAN. Not gonna work.
Default parameters example explained
- The function Func sets a default value to the second parameter
- You can pass the second parameter or leave it blank
- However order matters. You can't define a default parameter and then the next parameter does not have a default value
For.. of loop
- Very nice way of looping through a list of elements
- No need to figure out index parameters and value conditions
For.. of loop example
let arr = [2,3,4,1];
for (let value of arr) {
console.log(value);
}
For.. of loop example explained
- The variable 'value' is assigned each element of that array once
- Note you do not have access to the index while using this construct
Spread attributes
- Ability to define a function with a variable number of parameters
- You do not have to pass an array in order to have a variable number of parameters
Spread attributes example
let SumElements = (...arr) => {
console.log(arr); // [10, 20, 40, 60, 90]
let sum = 0;
for (let element of arr) {
sum += element;
}
console.log(sum);
}
SumElements(10, 20, 40, 60, 90);
SumElements(10, 20, 90);
Spread attributes example explained
- You can pass a variable number of parameters
- Those parameters are avaiable as an array inside the function


Independent Research Proposal
This is a proposal for 4 units of independent study under Stanford's CS199 system.
Motivations
I've wanted to learn iOS programming for a long time but haven't had the opportunity due to only recently getting a Macbook and not having time last quarter for CS193P. This quarter I was accepted into CodePath's Swift bootcamp to have an accelerated introduction and crash course into iOS and Swift programming. The course expects a 10-12 hour commitment a week that includes live coding in lecture and a substanatial amount of work outside the lectures themselves.
In addition to iOS programming, I also want to extend my capacities as a full-stack engineer - particularly with advanced web APIs and more complex front-end frameworks. This additional goal is to supplant the earlier part of the quarter where the CodePath course will be redundant to parts of iOS programming I've already become familiar with through tutorials and the first two weeks of CS193P.
Learning Objectives:
- To obtain breadth in using more complicated web APIs and frameworks (namely Twilio and Facebook's Parse + React)
- To complete a substantial project in Swift while following CodePath's course at Stanford to do so.
Proposed Schedule for the Quarter
Week 1 - 2: Integrating advanced web APIs with lightweight applications.
Takeaway: A text-based application for residents to play Assasins. Twilio API for the texting interface and a Parse database to store the order + status of players in the game.
Skills: Twilio API, Facebook Parse database, deploying non-web-based application.Weeks 3-5: Smaller based Swift applications built from CodePath's cirriculum.
Takeaway(s): Clones of Yelp, Twitter, and Rotten Tomatoes, etc...
Skills: Storyboarding, UI elements, navigation elements, networking + application layer, View controllers etc...Weeks 6-10: Group capstone project as a culmination of the CodePath cirriculum.
Takeaway: Complex application possibly including: Soundcloud downloading app, Video clipping and looping for GIFs. Skills: Working in a team setting, coordinating to develop elements in parallel, etc...
Commitments
I will hold myself to demonstrating some benchmark or progress that I will set the week prior. I will also keep a weekly record detailing the skills learned that week and what I built with what I learned. Benchmarks and progress will be documented simultaneously through a shared Google Document and links to Github repos of the code written that week.
In return, I ask if we could schedule 15-30 minute meetings every week to check up on progress and for feedback on what's been created so far.


|
SnuPL Compiler
0.1
|
SnuPL symbol. More...
#include <symtab.h>
Public Member Functions | |
| virtual ostream & | print (ostream &out, int indent=0) const |
| print the symbol to an output stream More... | |
constructor/destructor | |
| CSymbol (const string name, ESymbolType symboltype, const CType *datatype) | |
| constructor More... | |
| virtual | ~CSymbol (void) |
| destructor More... | |
data handling | |
| virtual void | SetData (const CDataInitializer *data) |
| set the symbol's value (for initialized symbols) More... | |
| virtual const CDataInitializer * | GetData (void) const |
| return the symbol's data initializer More... | |
memory location | |
| void | SetBaseRegister (string rbase) |
| set the base register to access this symbol More... | |
| void | SetOffset (int offset) |
| set the offset to access this symbol More... | |
| string | GetBaseRegister (void) const |
| get the base register to access this symbol More... | |
| int | GetOffset (void) const |
| get the offset to access this symbol More... | |
Private Attributes | |
| CSymtab * | _symtab |
| symbol table owning this symbol More... | |
| string | _name |
| name More... | |
| ESymbolType | _symboltype |
| symbol type More... | |
| const CType * | _datatype |
| data type More... | |
| const CDataInitializer * | _data |
| data initializer More... | |
| string | _rbase |
| base register More... | |
| int | _offset |
| offset More... | |
Friends | |
| class | CSymtab |
symbol handling | |
| string | GetName (void) const |
| return the symbol's identifier More... | |
| ESymbolType | GetSymbolType (void) const |
| return the symbol's type More... | |
| void | SetDataType (const CType *datatype) |
| set the symbol's type More... | |
| const CType * | GetDataType (void) const |
| return the symbol's type More... | |
| CSymtab * | GetSymbolTable (void) const |
| return the symbol table of this symbol More... | |
| void | SetSymbolTable (CSymtab *symtab) |
| set the symbol table owning this symbol More... | |
| CSymbol::CSymbol | ( | const string | name, |
| ESymbolType | symboltype, | ||
| const CType * | datatype | ||
| ) |
constructor
| name | symbol name (identifier) |
| symboltype | symbol type |
| datatype | data type of the symbol |
Definition at line 44 of file symtab.cpp.
|
virtual |
destructor
Definition at line 52 of file symtab.cpp.
| string CSymbol::GetBaseRegister | ( | void | ) | const |
get the base register to access this symbol
Definition at line 101 of file symtab.cpp.
|
virtual |
return the symbol's data initializer
| CDataInitializer | data initializer |
Definition at line 91 of file symtab.cpp.
| const CType * CSymbol::GetDataType | ( | void | ) | const |
| string CSymbol::GetName | ( | void | ) | const |
| int CSymbol::GetOffset | ( | void | ) | const |
get the offset to access this symbol
Definition at line 111 of file symtab.cpp.
| CSymtab * CSymbol::GetSymbolTable | ( | void | ) | const |
return the symbol table of this symbol
| CSymtab | symbol table |
Definition at line 81 of file symtab.cpp.
| ESymbolType CSymbol::GetSymbolType | ( | void | ) | const |
return the symbol's type
| ESymbolType | symbol type |
Definition at line 61 of file symtab.cpp.
|
virtual |
print the symbol to an output stream
| out | output stream |
| indent | indentation |
Reimplemented in CSymProc, CSymParam, CSymLocal, and CSymGlobal.
Definition at line 116 of file symtab.cpp.
| void CSymbol::SetBaseRegister | ( | string | rbase | ) |
set the base register to access this symbol
Definition at line 96 of file symtab.cpp.
|
virtual |
set the symbol's value (for initialized symbols)
| data | data initializer |
Definition at line 86 of file symtab.cpp.
| void CSymbol::SetDataType | ( | const CType * | datatype | ) |
| void CSymbol::SetOffset | ( | int | offset | ) |
set the offset to access this symbol
Definition at line 106 of file symtab.cpp.
|
private |
set the symbol table owning this symbol
| symtab | symbol table |
Definition at line 76 of file symtab.cpp.
|
private |
|
private |
|
private |


HTML stands for Hypertext Markup Language, and is the main document that the internet is made up of. It's what makes it able for you to see what a webpage says (text) and how it looks (markup) . CSS makes it look a tad more pretty and
is basically the stylist of HTML is how I like to think of it. Here is a more in depth explanation of HTML
Tags and Elements are what we tell the HTML document to do. For instance, In order to create the "Important Notes" text at the top and have it formatted like it is, we used the h1 tag which stands for Heading #1 (there are multiple styles of headings
in HTML). Here is a more in depth explanation of tags and elements
So what's the difference between Elements and Tags? Well Elements are defined by a starting tag (element) and if it has additional content then it is closed with an ending tag (/element) . There are things called void elements however that do not need
a closing tag and are just ended with a /> .
There are two types of elements, inline and block. block elements "block" the content inside an imaginary box while inline do not. Here is a more in depth explanation of inline and block elements


RxLens
Enables reactive read and copy-on-write access for an entity’s property in a data structure.
Check out the generated docs at vknabel.github.io/RxLens.
Introduction
First we need to declare our data structure and an according lens for our property. An explanation for lenses can be found in this blog post of Chris Eidhof.
struct Person: Equatable {
let name: String
static var name: Lens<Person, String> {
return Lens(
from: { $0.name },
to: { name, _ in Person(name: name) }
)
}
}
Lens Subject
You may create a subject that will only reflect changes of the name and allows pushing new names.
let personBehavior = BehaviorSubject(value: Person(name: "Valentin Knabel"))
let nameSubject = LensSubject(subject: personBehavior, lens: Person.name)
Operators
The following operators will be defined by using the following subject.
let personSubject = PublishSubject<Person>()
First of all you can use your lenses in order to access properties of your data structure with Observable.from(_:)
.
let nameSubject = personSubject.asObservable().from(Person.name)
Additionally you can use Observer.to(_:, with:)
in order to only observe changes of your property.
let nameObserver = personSubject.asObserver().to(Person.name, with: Person(name: "Initial"))
Installation
RxLens is a Swift only project and supports Swift Package Manager and CocoaPods.
Swift Package Manager
import PackageDescription
let package = Package(
name: "YourPackage",
dependencies: [
.Package(url: "https://github.com/vknabel/RxLens.git", majorVersion: 1)
]
)
CocoaPods
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
pod 'RxLens', '~> 0.1'
Author
Valentin Knabel<EMAIL_ADDRESS>License
EasyInject is available under the MIT license. See the LICENSE file for more info.


--- layout: post title: "Code readability hypotheses" description: "This post proposes a scientific experiment about code readability" date: 2013-03-04 13:21:00 UTC tags: [Productivity, Software Design] --- {% include JB/setup %}
{{ page.description }}
Once in a while someone tries to drag me into one of many so-called 'religious' debates over code readability:
this
C# keyword redundant?In most cases, the argument revolves around what is most readable.
Let's look at the C# keyword this
as an example. Many programmers feel that it's redundant because they can omit it without changing the program. The compiler doesn't care. However, as Martin Fowler wrote in Refactoring: "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." Code is read much more than written, so I don't buy the argument about redundancy.
There are lots of circumstances when code is read. Often, programmers read code from inside their IDE. This has been used as an argument against Hungarian notation. However, at other times, you may be reading code as part of a review process - e.g. on GitHub or CodePlex. Or you may be reading code on a blog post, or in a book.
Often I feel that the this
keyword helps me because it provides information about the scope of a variable. However, I also preach that code should consist of small classes with small methods, and if you follow that principle, variable scoping should be easily visible on a single screen.
Another argument against using the this
keyword is that it's simply noise and that it makes it harder to read the program, simply because there's more text to read. Such a statement is impossible to refute with logic, because it depends on the person reading the code.
Ultimately, the readability of code depends on circumstances and is highly subjective. For that reason, we can't arrive at a conclusion to any of those 'religious' debates by force of logic. However, what we could do, on the other hand, is to perform a set of scientific experiments to figure out what is most readable.
Here's an idea for a computer science experiment:
this
keyword enhances or reduces readability).this
keyword enhances readability).this
).
Comments
Totally agreed.
I believe that these 'religious' debates is the result of overreliance to some popular Productivity Tools. If these tools never existed those debates would appear less often.
Where possible, I use
this
andbase
.From a code reader's perspective, I also prefer
this
since I can immediately understand whether a member of a class is either a static member or an instance member. After all, it is possible to prefix a static member with_
but not withthis
.The import thing that emerges from this interesting post is that readabiliy is a key feature of code.
I'm a fun of this concept: code is meant to be read. A person able to program is not a programmer, like a person able to write is not a writer.
The good compromise is common sense.
The scenitifical experiment proposed could give use misleading informations, since the human factor is a problematic variable to put into the equation (not to mention Heisenberg); but I would be curious to see results.
Coming back to the
this
keyword, my personal opinion is that it can be omitted, if your naming convention supplies a readable alternative (like the_
underscore prefix before private instance members).I also agree that code should be readable.
However, this being said, the proposed method for testing the hypothesis does not hold from a statistical point of view.
Just to mentionen a few of the issues:
The word 'religious' is mentioned and this is the main problem. Different from science that is based on deduction, religion is based on beliefe (or faith) and precisely because of this cannot be tested or verified.
Karsten, I think you're reading practical issues into my proposal. Would you agree that all but the last of your reservations could be addressed if one were to pick large enough groups of test subjects, without selection bias?
That's what I meant when I wrote "Randomly select two groups of test subjects".
If one were able to pick large enough groups of people, one should be able to control for variables such as demographics, experience, initial biases, and so on.
Your last reservation, obviously, is fundamentally different. How many people would one need in order to be able to control for such variables in a statistically sound fashion? Probably thousands, if not tens of thousands, of programmers, including professional developers. This precludes the use of normal test subject populations of first-year students.
Clearly, compiling such a group of test subjects would be a formidable undertaking. It'd be expensive.
My original argument, however, was that I consider it possible to scientifically examine contentious topics of programming. I didn't claim that it was realistic that anyone would fund such research.
To be clear, however, the main point of the entire article is that we can't reach any conclusions about these controversial issues by arguing about them. If we wish to settle them, we'll have to invest in scientific experiments. I have no illusions that there's any desire to invest the necessary funds and work into answering these questions, but I would love to be proven wrong.
There is a huge problem in the way that we evaluate software quality. Karsten, is naming many of the reasons that make it difficult. But given that it is difficult, The only rational way to solve it without relying as heavily credentials, personality and repetition. Is to establish guidelines and have multiple opionins/measurements of code samples.
I think we overvalue experience in evaluating code. And in the contrary, there are real issues with expert bias, particularly of older programmers who have good credentials but are more financially and emotionally invested in a particular technology. In general, it is much more difficult to write good code, than to read it. Therefore, most programmers can read, understand and appreciate good code. While they may not have been able to write from scratch themselves. The only exception would be for true neophytes (which there may be ways to exclude). We also need to be leary about software qualities that are hard to grasp and evaluate. Unexplainable or unclear instinct can lead to bad outcomes.
There is real oportunity here to more scientifically quantify aspects of code quality. I wish more people devoted time to it.


WWW = World Wide Web
HTML Hyper Text Markup Language or the type of documents stored on the web.
http takes you to the files you are looking on the www as if they were stored on your desk.
HTML markup is a tag.
= opening tag = clsoing tag; both are considered elements to use an element you have to write
html is...
em tag= emphasis and creates italic open close
Attributes
= anchor tag
attribute name href = www the value
image= src= url images do not have closing tags because there is no ending to an image.
White space= the spaces between characters
break a void tag
paragraph not a void tag
inline is different from a block they have open and close.
HTML
HTML
I love thisdid you know I could do this
thing it is the best thing in the world.
hello
Unit 1
The basics of the web
www
html
url
http
apps


Company profile - Canadian Company Capabilities
Third-Party Information Liability Disclaimer
Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.
CAMECO FUEL MANUFACTURING INC.
Legal/Operating Name:
CAMECO FUEL MANUFACTURING INC.
Mailing Address:
200 Dorset St EPORT HOPE, Ontario
L1A 3V4
Location Address:
200 Dorset St EPORT HOPE, Ontario
L1A 3V4
Tel.:<PHONE_NUMBER>
Fax:<PHONE_NUMBER>
Company Profile
ZIRCATEC VALUES
1- Meeting CUSTOMER commitments with integrity is our highest
priority.
2- PEOPLE shall be treated with trust, respect and fairness
3- The QUALITY of everything we do must continually be improved.
Theses are the values we live and work by each day.
Zircatec's highly skilled and experienced engineering personnel
have developed specialized manufacturing and inspection equipment
and processes to carry out large scale production of CANDU fuel
to exacting tolerances. Their outstanding success in developing
technically superior processes, along with our operating
personnel's commitment to quality, are evidenced by the
outstanding performance of our fuel.
Ziratec is the largest supplier of CANDU fuel in the world.
Attaining this dominant position in the CANDU fuel market is due
in no small part to the superior quality of the products we
manufacture. Feedback from our customers indicates that our
dedication to quality has made us the quality performance leader
in our field.
To date Zircatec has produced more than 700,000 fuel bundles for
28 CANDU power reactors. These fuel bundles have produced the
energy equivalent of 450 million tons of coal and avoided the
production of 500,000,000 tons of carbon dioxide.
Over the last few years, about 60% of the electricity used in the
Province of Ontario, Canada's industrial heartland, has been
nuclear generated. Zircatec has provided nearly 60% of the fuel
for these reactors. This means Zircatec's fuel has provided
approximately one third of the electricity used in Ontario.
In addition to domestic experience, Zircatec has produced CANDU
type fuel for commercial power reactors, Zircatec also provides
prototype fuel for irradiation testing of advanced fuel designs
such as CANFLEX and Low Enriched Uranium (LEU).
Zircatex is, and has been for many years, the only commercial
fuel manufacturer in Canada with the ability to produce enriched
fuel. Zircatecis licenced to process nuclear fuel with up to 20%
enrichment. Zircatec has provided fuel for development or
research in Canada, the United States, the United Kingdom,
Switzerland, Germany, India, Pakistan, France, Taiwan and Japan.
Zircatec also has experience as a supplier of nuclear grade fuel
and UO2 pellets to the U.S. BWR/PWR market.
QUALITY PROGRAM
Zircatec recognized early that a successful Quality Assurance
Program would be essential if products were to be routinely
manufactured to exacting nuclear standards. Zircatec was a
leader in the Canadian nuclear industry in the implementation of
a Quality Assurance Program in a manufacturing environment.
Today, our Quality Assurance Program is second to none and our
outstanding and consistent product quality is a testament to its
success.
Zircatec's fuel manufacturing facility has a fully implemented
Quality Assurance program meeting the requirements of CSA Z299.1.
Our Quality Assurance program also meets the requirements of ISO
9001 and 10CFR50 Appendix B.
For the manufacture of components that form part of the pressure
boundary of the CANDU reactor, Zircatec maintains a Quality
Assurance program that meets the requirements of CSA N285.0 and
ASME Boiler and Pressure Vessel Code Section III.
Zircatec's dedicated team of professionals is ready to meet your
requirements for :
- Nuclear Fuel
- Nuclear Grade Zircaloy Tubing
- Nuclear Reactor Components
- Product Development
- Manufacturing Process Development
- Technology Transfer
ZIRCATEC
COMMITTED TO NUCLEAR ENERY
COMMITTED TO OUR CUSTOMERS
Full profile
Full profile
Contact information
Company description
Product / Service / Licensing
reactors.
The CANDU nuclear power reactor fuel cycle involves many
processes from the mining of uranium to storage of spent fuel
bundles.
Zircatec's contribution to the CANDU power reactor fuel cycle
entails the processing of ceramic grade uranium dioxide into
pellets and assembly of finished fuel bundles.
These fuel bundles must operate in hostile environment at high
temperature, high pressure and in a high neutron flux.
Since the performance of a billion dollar nuclear reactor can be
no better than the fuel used in it, these bundles must be
manufactured to exacting quality standards.
Zircatec's fuel manufacturing facility has the installed capacity
to product 1,200 metric tonnes (U) of CANDU fuel per year.
Annual production rates approaching 1,000 metric tonnes (more
than 50,000 CANDU fuel bundles) have been demonstrated.
components for the CANDU reactor. We have developed a very
extensive expertise in the forming, welding, brazing, and
machining of zirconium alloys as well as other engineering
materials.
Zircatec is the largest supplier, in Canada, of components used
in the construction of a CANDU reactor.
COMPONENTS CURRENTLY SUPPLIED BY ZIRCATEC:
- Calandria Tubes
- Guide Tubes
- Fuel Channel Annulus Spacers
- Liquid Zone Control Assemblies
- Flux Detector Assemblies
- Reactor Startup Components
- Shut-off and Control Absorber Rods
- Adjuster Absorber Rods
- Liquid Injection Nozzles
- Guide Tube Assemblies
Reactivity Mechanisms
- Thimble Tubes
- Flux Detector Assemblies
- Booster Assemblies
- Liquid Zone Control Assemblies
- Ion Chambers
- Shut-off and Control Absorber Rods
- Adjuster Absorber Rods
- Reactor Start-up Components
Zircatec has a Certificate of Registration issued under the
Boiler Pressure Vessels Act of Ontario to produce components in
accordance with ASME Code Section III.
Zircatec is a supplier of wide range of tubular products. Back
integrated and expansion have resulted in a fully integrated
tubing facility that is second to none in the world.
To date, more than 43,000,000 feet (13,000,000 metres) of CANDU
fuel tubing has been produced to exacting nuclear standards.
Current CANDU tubing production rates have exceeded 3,000,000
feet (900,000 metres) per year. Production capacity exceeds
4,000,000 feet (1,200,000 metres) per year.
In addition, more than 1,700,000 feet (5000,000 metres) of fuel
tubing has been produced for use in Pressurized Water Reactor
(PWR) fuel assemblies.
Custom sizes of both seamless and seam welded Zircaloy tubing can
be supplied to ASTM or other customer special requirements.
SEAMLESS ZIRCALOY TUBING
- 0.25 to 2.5 inch diameter (6 to 60 mm)
- Zircaloy 2 &4
- CANDU Fuel Tubing PWR & BWR Fuel Tubing
- Tubing for Reactivity Monitoring and Control Systems
- Corrosion Resistant Tubing for:
- Chemical Processes
- Heat Exchangers
- Condensers
SEAM WELDED ZIRCALOY TUBING
- 3 to 6 inch Diameter (75 to 150 mm)
- Tubing for Reactivity Monitor and Control Systems
- Calandria Tubes
- Guide Tubes
Zircatec has been involved in the CANDU reactor development
program since its' inception and has played a major role in many
research and development programs including all development
programs related to CANDU fuel.
Our engineering team has developed comprehensive expertise in the
design, development, testing and manufacture of fuel, equipment
and components for nuclear service.
Product development programs range from evolutionary improvements
to the existing CANDU fuel designs to entirely new products such
as Light Water Reactor fuel channel boxes, Slowpoke-4 fuel,
CANFLEX fuel and advanced designs of shut-off rods.
The services of our experienced engineering team can be made
available on a contracted basis for product and manufacturing
process development.
SERVICES
- Manufacturing Technology
- Fuel Design
- Materials and Components Testing
- Ultrasonic Flaw Detection
- Helium Leak-testing
- Laser Welding
- Vacuum Induction Brazing
- Corrosion Testing
- Vacuum Heat Treating
Technology profile
advanced, reliable and efficient processes for the production of
high quality CANDU nuclear fuel. Zircatec has developed a very
flexible modular system for manufacture if CANDU fuel. This
modular system allows fuel to be produced efficiently even at
relatively low throughput rates. It is the technical superiority
of the Zircatec processes that has enabled Zircatec to dominate
the CANDU fuel market in Canada.
Zircatec's flexible manufacturing system lends itself readily to
production of enriched fuel. Zircatec is the only fuel
manufacturer in Canada that has a licence for enriched fuel and
the only one with experience in the manufacture of advanced
design fuels such as CANFLEX.
The same advanced technology that has made Zircatec the largest
and most efficient manufacturer of CANDU fuel in the world can be
made available to clients around the world. The technology
transfer services we provide range from a preliminary assessment
of the feasibility of manufacture of CANDU fuel in the clients
home country to provision of a complete turnkey fuel plant and
everything in between.
Zircatec can also provide transfer of technology for the
manufacture of items other than CANDU fuel. The manufacture of
high precision seamless zirconium alloy tubing for use in nuclear
fuel of all types is a particular area of Zircatec expertise.
The manufacturing technology for each of the Zircatec products
listed in this brochure, including seam-welded tubing and reactor
components, can be provided to interested parties.
Market profile
Alliances:
- Sales/Marketing
Strategic alliances:
TECHNOLOGY TRANSFERZircatec is not only the largest supplier of CANDU fuel in the
world, bu also the most experienced in building fuel
manufacturing plants and transferring fuel manufacturing
technology. In addition to the fuel plant in Port Hope,
Zircatec
has experience in designing and building other CANDU fuel
plants.
Zircatec designed and built a turnkey CANDU fuel plant of 150
MgU annual capacity for Pakistan and also built a 200 MgU plant
at Varennes, Quebec.
More recently, our superior technology, as well as our extensive
experience in both transfer of technology and the building of
CANDU fuel plants, led to the selection of Zircatec to provide
fuel manufacturing technology and equipment to Romania.
Zircatec has also supplied proprietary equipment to the United
Kingdom, India, the United States and Korea and trained
personnel
for India, Korea and Pakistan.
Geographic markets:
Export experience:
- Algeria
- Argentina
- Brazil
- Egypt
- Korea, Republic of
- Romania
- Russian Federation
- United Kingdom
- United States
- Pennsylvania
- South Carolina
- Utah
Third-Party Information Liability Disclaimer
Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.
Contacts
Contact information
Description
Company description
Products, services and licensing
Product / Service / Licensing
reactors.
The CANDU nuclear power reactor fuel cycle involves many
processes from the mining of uranium to storage of spent fuel
bundles.
Zircatec's contribution to the CANDU power reactor fuel cycle
entails the processing of ceramic grade uranium dioxide into
pellets and assembly of finished fuel bundles.
These fuel bundles must operate in hostile environment at high
temperature, high pressure and in a high neutron flux.
Since the performance of a billion dollar nuclear reactor can be
no better than the fuel used in it, these bundles must be
manufactured to exacting quality standards.
Zircatec's fuel manufacturing facility has the installed capacity
to product 1,200 metric tonnes (U) of CANDU fuel per year.
Annual production rates approaching 1,000 metric tonnes (more
than 50,000 CANDU fuel bundles) have been demonstrated.
components for the CANDU reactor. We have developed a very
extensive expertise in the forming, welding, brazing, and
machining of zirconium alloys as well as other engineering
materials.
Zircatec is the largest supplier, in Canada, of components used
in the construction of a CANDU reactor.
COMPONENTS CURRENTLY SUPPLIED BY ZIRCATEC:
- Calandria Tubes
- Guide Tubes
- Fuel Channel Annulus Spacers
- Liquid Zone Control Assemblies
- Flux Detector Assemblies
- Reactor Startup Components
- Shut-off and Control Absorber Rods
- Adjuster Absorber Rods
- Liquid Injection Nozzles
- Guide Tube Assemblies
Reactivity Mechanisms
- Thimble Tubes
- Flux Detector Assemblies
- Booster Assemblies
- Liquid Zone Control Assemblies
- Ion Chambers
- Shut-off and Control Absorber Rods
- Adjuster Absorber Rods
- Reactor Start-up Components
Zircatec has a Certificate of Registration issued under the
Boiler Pressure Vessels Act of Ontario to produce components in
accordance with ASME Code Section III.
Zircatec is a supplier of wide range of tubular products. Back
integrated and expansion have resulted in a fully integrated
tubing facility that is second to none in the world.
To date, more than 43,000,000 feet (13,000,000 metres) of CANDU
fuel tubing has been produced to exacting nuclear standards.
Current CANDU tubing production rates have exceeded 3,000,000
feet (900,000 metres) per year. Production capacity exceeds
4,000,000 feet (1,200,000 metres) per year.
In addition, more than 1,700,000 feet (5000,000 metres) of fuel
tubing has been produced for use in Pressurized Water Reactor
(PWR) fuel assemblies.
Custom sizes of both seamless and seam welded Zircaloy tubing can
be supplied to ASTM or other customer special requirements.
SEAMLESS ZIRCALOY TUBING
- 0.25 to 2.5 inch diameter (6 to 60 mm)
- Zircaloy 2 &4
- CANDU Fuel Tubing PWR & BWR Fuel Tubing
- Tubing for Reactivity Monitoring and Control Systems
- Corrosion Resistant Tubing for:
- Chemical Processes
- Heat Exchangers
- Condensers
SEAM WELDED ZIRCALOY TUBING
- 3 to 6 inch Diameter (75 to 150 mm)
- Tubing for Reactivity Monitor and Control Systems
- Calandria Tubes
- Guide Tubes
Zircatec has been involved in the CANDU reactor development
program since its' inception and has played a major role in many
research and development programs including all development
programs related to CANDU fuel.
Our engineering team has developed comprehensive expertise in the
design, development, testing and manufacture of fuel, equipment
and components for nuclear service.
Product development programs range from evolutionary improvements
to the existing CANDU fuel designs to entirely new products such
as Light Water Reactor fuel channel boxes, Slowpoke-4 fuel,
CANFLEX fuel and advanced designs of shut-off rods.
The services of our experienced engineering team can be made
available on a contracted basis for product and manufacturing
process development.
SERVICES
- Manufacturing Technology
- Fuel Design
- Materials and Components Testing
- Ultrasonic Flaw Detection
- Helium Leak-testing
- Laser Welding
- Vacuum Induction Brazing
- Corrosion Testing
- Vacuum Heat Treating
Technology
Technology profile
advanced, reliable and efficient processes for the production of
high quality CANDU nuclear fuel. Zircatec has developed a very
flexible modular system for manufacture if CANDU fuel. This
modular system allows fuel to be produced efficiently even at
relatively low throughput rates. It is the technical superiority
of the Zircatec processes that has enabled Zircatec to dominate
the CANDU fuel market in Canada.
Zircatec's flexible manufacturing system lends itself readily to
production of enriched fuel. Zircatec is the only fuel
manufacturer in Canada that has a licence for enriched fuel and
the only one with experience in the manufacture of advanced
design fuels such as CANFLEX.
The same advanced technology that has made Zircatec the largest
and most efficient manufacturer of CANDU fuel in the world can be
made available to clients around the world. The technology
transfer services we provide range from a preliminary assessment
of the feasibility of manufacture of CANDU fuel in the clients
home country to provision of a complete turnkey fuel plant and
everything in between.
Zircatec can also provide transfer of technology for the
manufacture of items other than CANDU fuel. The manufacture of
high precision seamless zirconium alloy tubing for use in nuclear
fuel of all types is a particular area of Zircatec expertise.
The manufacturing technology for each of the Zircatec products
listed in this brochure, including seam-welded tubing and reactor
components, can be provided to interested parties.
Market
Market profile
Alliances:
- Sales/Marketing
Strategic alliances:
TECHNOLOGY TRANSFERZircatec is not only the largest supplier of CANDU fuel in the
world, bu also the most experienced in building fuel
manufacturing plants and transferring fuel manufacturing
technology. In addition to the fuel plant in Port Hope,
Zircatec
has experience in designing and building other CANDU fuel
plants.
Zircatec designed and built a turnkey CANDU fuel plant of 150
MgU annual capacity for Pakistan and also built a 200 MgU plant
at Varennes, Quebec.
More recently, our superior technology, as well as our extensive
experience in both transfer of technology and the building of
CANDU fuel plants, led to the selection of Zircatec to provide
fuel manufacturing technology and equipment to Romania.
Zircatec has also supplied proprietary equipment to the United
Kingdom, India, the United States and Korea and trained
personnel
for India, Korea and Pakistan.
Geographic markets:
Export experience:
- Algeria
- Argentina
- Brazil
- Egypt
- Korea, Republic of
- Romania
- Russian Federation
- United Kingdom
- United States
- Pennsylvania
- South Carolina
- Utah


Page 1 of 1
Lol I think we crashed the server
Posted:
Thu Oct 22, 2009 5:43 pm
by LEXIC
topic^
Re: Lol I think we crashed the server
Posted:
Thu Oct 22, 2009 5:45 pm
by Glorfindelus
When we warped to liches? It's quite possible, lots of casting all at once.
Re: Lol I think we crashed the server
Posted:
Thu Oct 22, 2009 5:52 pm
by willy nilly
yeah server has crashed a few times just as I have entered a port.
Re: Lol I think we crashed the server
Posted:
Fri Oct 23, 2009 2:06 am
by willy nilly
me and Zor crashed it again while porting. We were only two online and happened right as we were porting so definitely something to do with that karl. Awww I hope server saved recently overwise we are going to lose some poo
.
Re: Lol I think we crashed the server
Posted:
Fri Oct 23, 2009 3:24 am
by zorrento
nooo mi holy ring lol hope it survive.
Re: Lol I think we crashed the server
Posted:
Fri Oct 23, 2009 3:25 am
by willy nilly
beta hope i doesnt ninja it off you. Yeh def to do with ports happened again
Re: Lol I think we crashed the server
Posted:
Fri Oct 23, 2009 3:29 am
by zorrento
lol iam gona ninja ur wand lol.
i dont think server gona be back on till tomorrow.
dosnt the server got an auto chek or something like that?
Re: Lol I think we crashed the server
Posted:
Fri Oct 23, 2009 3:30 am
by willy nilly
yeh it seems to come back by it's self just putting some food on then ill check again.
Re: Lol I think we crashed the server
Posted:
Fri Oct 23, 2009 3:34 am
by zorrento
ya me to iam gona go make some food and re chek
btw pm me ur msn.
Re: Lol I think we crashed the server
Posted:
Fri Oct 23, 2009 11:53 am
by ven
Improve your grammar and use spell-check.
Re: Lol I think we crashed the server
Posted:
Fri Oct 23, 2009 1:52 pm
by Glorfindelus
O heck naw! lawl!
Re: Lol I think we crashed the server
Posted:
Fri Oct 23, 2009 10:07 pm
by ven
Lol You were the only one to type a readable sentence.
Re: Lol I think we crashed the server
Posted:
Sat Oct 24, 2009 9:49 am
by Erich
This thread reminds me of a girl..
Her name was spelled "Na-a"...
People kept mispronouncing it...
She said her name was pronounced "Nadasha" because "da dash ain't not silent!"
RIP English.
Re: Lol I think we crashed the server
Posted:
Sun Oct 25, 2009 3:55 am
by willy nilly
sorry about that poor grammar guys I guess I wasn't all there
. Cool Focus sig by the way Glor.
Re: Lol I think we crashed the server
Posted:
Sun Oct 25, 2009 11:19 am
by Joe M.
Erich wrote:This thread reminds me of a girl..
Her name was spelled "Na-a"...
People kept mispronouncing it...
She said her name was pronounced "Nadasha" because "da dash ain't not silent!"
RIP English.
That's funny--I would have figured her name to be either "Nahyphena" or "Naëndasha."


{% extends "header.html" %} {% block body %}
Now that we know how to write and append to files, we might want to learn how to read data from files into the Python program. Doing this is quite simple, and has very similar syntax.
# similar syntax as you've seen, 'r' for read. You can just throw a .read() at # the end, and you get: readMe = open('exampleFile.txt','r').read() print(readMe)
Often times, people are reading something with many lines into memory. Maybe it's a list of names, or something like that. We can then use ".readlines()" to help us split all of this up into a Python list for us.
# this will instead read the file into a python list. readMe = open('exampleFile.txt','r').readlines() print(readMe)


Saskatoon Diving Club
Family
Club
Instagram
Home
COVID 19
about us
Coaches
SDC Board
Facilities
Contact Us
Programs
Guppies (4-6 yrs)
Junior Development (6-8 yrs)
Learn To Dive (6-14 yrs)
Learn To Dive for children with ASD (7-14 yrs)
Pre-Competitve (8-17 yrs)
Jr. Novice (invitational)
Sr. Novice (invitational)
Pre-National (invitational)
Masters (18+)
National Team (invitational)
Calendar
News
Parental Zone
Bingos
Policies
Travel Waivers
Merchandise
Diving Calendar
Saskatoon Diving Club reflects all major events and meets for divers.