Notifications
- Introduction
- Creating Notifications
- Sending Notifications
- Mail Notifications
- Markdown Mail Notifications
- Database Notifications
- Broadcast Notifications
- SMS Notifications
- Slack Notifications
- Localizing Notifications
- Notification Events
- Custom Channels
Introduction
In addition to support for sending email, Laravel provides support for sending notifications across a variety of delivery channels, including mail, SMS (via Nexmo), and Slack. Notifications may also be stored in a database so they may be displayed in your web interface.
Typically, notifications should be short, informational messages that notify users of something that occurred in your application. For example, if you are writing a billing application, you might send an "Invoice Paid" notification to your users via the email and SMS channels.
Creating Notifications
In Laravel, each notification is represented by a single class (typically stored in the app/Notifications
directory). Don't worry if you don't see this directory in your application, it will be created for you when you run the make:notification
Artisan command:
php artisan make:notification InvoicePaid
This command will place a fresh notification class in your app/Notifications
directory. Each notification class contains a via
method and a variable number of message building methods (such as toMail
or toDatabase
) that convert the notification to a message optimized for that particular channel.
Sending Notifications
Using The Notifiable Trait
Notifications may be sent in two ways: using the notify
method of the Notifiable
trait or using the Notification
facade. First, let's explore using the trait:
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
}
This trait is utilized by the default App\User
model and contains one method that may be used to send notifications: notify
. The notify
method expects to receive a notification instance:
use App\Notifications\InvoicePaid;
$user->notify(new InvoicePaid($invoice));
{tip} Remember, you may use the
Illuminate\Notifications\Notifiable
trait on any of your models. You are not limited to only including it on yourUser
model.
Using The Notification Facade
Alternatively, you may send notifications via the Notification
facade. This is useful primarily when you need to send a notification to multiple notifiable entities such as a collection of users. To send notifications using the facade, pass all of the notifiable entities and the notification instance to the send
method:
Notification::send($users, new InvoicePaid($invoice));
Specifying Delivery Channels
Every notification class has a via
method that determines on which channels the notification will be delivered. Notifications may be sent on the mail
, database
, broadcast
, nexmo
, and slack
channels.
{tip} If you would like to use other delivery channels such as Telegram or Pusher, check out the community driven Laravel Notification Channels website.
The via
method receives a $notifiable
instance, which will be an instance of the class to which the notification is being sent. You may use $notifiable
to determine which channels the notification should be delivered on:
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return $notifiable->prefers_sms ? ['nexmo'] : ['mail', 'database'];
}
Queueing Notifications
{note} Before queueing notifications you should configure your queue and start a worker.
Sending notifications can take time, especially if the channel needs an external API call to deliver the notification. To speed up your application's response time, let your notification be queued by adding the ShouldQueue
interface and Queueable
trait to your class. The interface and trait are already imported for all notifications generated using make:notification
, so you may immediately add them to your notification class:
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
class InvoicePaid extends Notification implements ShouldQueue
{
use Queueable;
// ...
}
Once the ShouldQueue
interface has been added to your notification, you may send the notification like normal. Laravel will detect the ShouldQueue
interface on the class and automatically queue the delivery of the notification:
$user->notify(new InvoicePaid($invoice));
If you would like to delay the delivery of the notification, you may chain the delay
method onto your notification instantiation:
$when = now()->addMinutes(10);
$user->notify((new InvoicePaid($invoice))->delay($when));
On-Demand Notifications
Sometimes you may need to send a notification to someone who is not stored as a "user" of your application. Using the Notification::route
method, you may specify ad-hoc notification routing information before sending the notification:
Notification::route('mail'<EMAIL_ADDRESS>->route('nexmo', '5555555555')
->notify(new InvoicePaid($invoice));
Mail Notifications
Formatting Mail Messages
If a notification supports being sent as an email, you should define a toMail
method on the notification class. This method will receive a $notifiable
entity and should return a Illuminate\Notifications\Messages\MailMessage
instance. Mail messages may contain lines of text as well as a "call to action". Let's take a look at an example toMail
method:
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
$url = url('/invoice/'.$this->invoice->id);
return (new MailMessage)
->greeting('Hello!')
->line('One of your invoices has been paid!')
->action('View Invoice', $url)
->line('Thank you for using our application!');
}
{tip} Note we are using
$this->invoice->id
in ourtoMail
method. You may pass any data your notification needs to generate its message into the notification's constructor.
In this example, we register a greeting, a line of text, a call to action, and then another line of text. These methods provided by the MailMessage
object make it simple and fast to format small transactional emails. The mail channel will then translate the message components into a nice, responsive HTML email template with a plain-text counterpart. Here is an example of an email generated by the mail
channel:
{tip} When sending mail notifications, be sure to set the
name
value in yourconfig/app.php
configuration file. This value will be used in the header and footer of your mail notification messages.
Other Notification Formatting Options
Instead of defining the "lines" of text in the notification class, you may use the view
method to specify a custom template that should be used to render the notification email:
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
return (new MailMessage)->view(
'emails.name', ['invoice' => $this->invoice]
);
}
In addition, you may return a mailable object from the toMail
method:
use App\Mail\InvoicePaid as Mailable;
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return Mailable
*/
public function toMail($notifiable)
{
return (new Mailable($this->invoice))->to($this->user->email);
}
Error Messages
Some notifications inform users of errors, such as a failed invoice payment. You may indicate that a mail message is regarding an error by calling the error
method when building your message. When using the error
method on a mail message, the call to action button will be red instead of blue:
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Message
*/
public function toMail($notifiable)
{
return (new MailMessage)
->error()
->subject('Notification Subject')
->line('...');
}
Customizing The Sender
By default, the email's sender / from address is defined in the config/mail.php
configuration file. However, you may specify the from address for a specific notification using the from
method:
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
return (new MailMessage)
<EMAIL_ADDRESS>'Example')
->line('...');
}
Customizing The Recipient
When sending notifications via the mail
channel, the notification system will automatically look for an email
property on your notifiable entity. You may customize which email address is used to deliver the notification by defining a routeNotificationForMail
method on the entity:
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* Route notifications for the mail channel.
*
* @param \Illuminate\Notifications\Notification $notification
* @return string
*/
public function routeNotificationForMail($notification)
{
return $this->email_address;
}
}
Customizing The Subject
By default, the email's subject is the class name of the notification formatted to "title case". So, if your notification class is named InvoicePaid
, the email's subject will be Invoice Paid
. If you would like to specify an explicit subject for the message, you may call the subject
method when building your message:
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
return (new MailMessage)
->subject('Notification Subject')
->line('...');
}
Customizing The Templates
You can modify the HTML and plain-text template used by mail notifications by publishing the notification package's resources. After running this command, the mail notification templates will be located in the resources/views/vendor/notifications
directory:
php artisan vendor:publish --tag=laravel-notifications
Markdown Mail Notifications
Markdown mail notifications allow you to take advantage of the pre-built templates of mail notifications, while giving you more freedom to write longer, customized messages. Since the messages are written in Markdown, Laravel is able to render beautiful, responsive HTML templates for the messages while also automatically generating a plain-text counterpart.
Generating The Message
To generate a notification with a corresponding Markdown template, you may use the --markdown
option of the make:notification
Artisan command:
php artisan make:notification InvoicePaid --markdown=mail.invoice.paid
Like all other mail notifications, notifications that use Markdown templates should define a toMail
method on their notification class. However, instead of using the line
and action
methods to construct the notification, use the markdown
method to specify the name of the Markdown template that should be used:
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
$url = url('/invoice/'.$this->invoice->id);
return (new MailMessage)
->subject('Invoice Paid')
->markdown('mail.invoice.paid', ['url' => $url]);
}
Writing The Message
Markdown mail notifications use a combination of Blade components and Markdown syntax which allow you to easily construct notifications while leveraging Laravel's pre-crafted notification components:
@component('mail::message')
# Invoice Paid
Your invoice has been paid!
@component('mail::button', ['url' => $url])
View Invoice
@endcomponent
Thanks,<br>
{{ config('app.name') }}
@endcomponent
Button Component
The button component renders a centered button link. The component accepts two arguments, a url
and an optional color
. Supported colors are blue
, green
, and red
. You may add as many button components to a notification as you wish:
@component('mail::button', ['url' => $url, 'color' => 'green'])
View Invoice
@endcomponent
Panel Component
The panel component renders the given block of text in a panel that has a slightly different background color than the rest of the notification. This allows you to draw attention to a given block of text:
@component('mail::panel')
This is the panel content.
@endcomponent
Table Component
The table component allows you to transform a Markdown table into an HTML table. The component accepts the Markdown table as its content. Table column alignment is supported using the default Markdown table alignment syntax:
@component('mail::table')
| Laravel | Table | Example |
| ------------- |:-------------:| --------:|
| Col 2 is | Centered | $10 |
| Col 3 is | Right-Aligned | $20 |
@endcomponent
Customizing The Components
You may export all of the Markdown notification components to your own application for customization. To export the components, use the vendor:publish
Artisan command to publish the laravel-mail
asset tag:
php artisan vendor:publish --tag=laravel-mail
This command will publish the Markdown mail components to the resources/views/vendor/mail
directory. The mail
directory will contain an html
and a markdown
directory, each containing their respective representations of every available component. You are free to customize these components however you like.
Customizing The CSS
After exporting the components, the resources/views/vendor/mail/html/themes
directory will contain a default.css
file. You may customize the CSS in this file and your styles will automatically be in-lined within the HTML representations of your Markdown notifications.
{tip} If you would like to build an entirely new theme for the Markdown components, write a new CSS file within the
html/themes
directory and change thetheme
option of your
Database Notifications
Prerequisites
The database
notification channel stores the notification information in a database table. This table will contain information such as the notification type as well as custom JSON data that describes the notification.
You can query the table to display the notifications in your application's user interface. But, before you can do that, you will need to create a database table to hold your notifications. You may use the notifications:table
command to generate a migration with the proper table schema:
php artisan notifications:table
php artisan migrate
Formatting Database Notifications
If a notification supports being stored in a database table, you should define a toDatabase
or toArray
method on the notification class. This method will receive a $notifiable
entity and should return a plain PHP array. The returned array will be encoded as JSON and stored in the data
column of your notifications
table. Let's take a look at an example toArray
method:
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
'invoice_id' => $this->invoice->id,
'amount' => $this->invoice->amount,
];
}
toDatabase
Vs. toArray
The toArray
method is also used by the broadcast
channel to determine which data to broadcast to your JavaScript client. If you would like to have two different array representations for the database
and broadcast
channels, you should define a toDatabase
method instead of a toArray
method.
Accessing The Notifications
Once notifications are stored in the database, you need a convenient way to access them from your notifiable entities. The Illuminate\Notifications\Notifiable
trait, which is included on Laravel's default App\User
model, includes a notifications
Eloquent relationship that returns the notifications for the entity. To fetch notifications, you may access this method like any other Eloquent relationship. By default, notifications will be sorted by the created_at
timestamp:
$user = App\User::find(1);
foreach ($user->notifications as $notification) {
echo $notification->type;
}
If you want to retrieve only the "unread" notifications, you may use the unreadNotifications
relationship. Again, these notifications will be sorted by the created_at
timestamp:
$user = App\User::find(1);
foreach ($user->unreadNotifications as $notification) {
echo $notification->type;
}
{tip} To access your notifications from your JavaScript client, you should define a notification controller for your application which returns the notifications for a notifiable entity, such as the current user. You may then make an HTTP request to that controller's URI from your JavaScript client.
Marking Notifications As Read
Typically, you will want to mark a notification as "read" when a user views it. The Illuminate\Notifications\Notifiable
trait provides a markAsRead
method, which updates the read_at
column on the notification's database record:
$user = App\User::find(1);
foreach ($user->unreadNotifications as $notification) {
$notification->markAsRead();
}
However, instead of looping through each notification, you may use the markAsRead
method directly on a collection of notifications:
$user->unreadNotifications->markAsRead();
You may also use a mass-update query to mark all of the notifications as read without retrieving them from the database:
$user = App\User::find(1);
$user->unreadNotifications()->update(['read_at' => now()]);
You may delete
the notifications to remove them from the table entirely:
$user->notifications()->delete();
Broadcast Notifications
Prerequisites
Before broadcasting notifications, you should configure and be familiar with Laravel's event broadcasting services. Event broadcasting provides a way to react to server-side fired Laravel events from your JavaScript client.
Formatting Broadcast Notifications
The broadcast
channel broadcasts notifications using Laravel's event broadcasting services, allowing your JavaScript client to catch notifications in realtime. If a notification supports broadcasting, you should define a toBroadcast
method on the notification class. This method will receive a $notifiable
entity and should return a BroadcastMessage
instance. The returned data will be encoded as JSON and broadcast to your JavaScript client. Let's take a look at an example toBroadcast
method:
use Illuminate\Notifications\Messages\BroadcastMessage;
/**
* Get the broadcastable representation of the notification.
*
* @param mixed $notifiable
* @return BroadcastMessage
*/
public function toBroadcast($notifiable)
{
return new BroadcastMessage([
'invoice_id' => $this->invoice->id,
'amount' => $this->invoice->amount,
]);
}
Broadcast Queue Configuration
All broadcast notifications are queued for broadcasting. If you would like to configure the queue connection or queue name that is used to queue the broadcast operation, you may use the onConnection
and onQueue
methods of the BroadcastMessage
:
return (new BroadcastMessage($data))
->onConnection('sqs')
->onQueue('broadcasts');
{tip} In addition to the data you specify, broadcast notifications will also contain a
type
field containing the class name of the notification.
Listening For Notifications
Notifications will broadcast on a private channel formatted using a {notifiable}.{id}
convention. So, if you are sending a notification to a App\User
instance with an ID of 1
, the notification will be broadcast on the App.User.1
private channel. When using Laravel Echo, you may easily listen for notifications on a channel using the notification
helper method:
Echo.private('App.User.' + userId)
.notification((notification) => {
console.log(notification.type);
});
Customizing The Notification Channel
If you would like to customize which channels a notifiable entity receives its broadcast notifications on, you may define a receivesBroadcastNotificationsOn
method on the notifiable entity:
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The channels the user receives notification broadcasts on.
*
* @return string
*/
public function receivesBroadcastNotificationsOn()
{
return 'users.'.$this->id;
}
}
SMS Notifications
Prerequisites
Sending SMS notifications in Laravel is powered by Nexmo. Before you can send notifications via Nexmo, you need to install the laravel/nexmo-notification-channel
Composer package:
composer require laravel/nexmo-notification-channel
Next, you will need to add a few configuration options to your config/services.php
configuration file. You may copy the example configuration below to get started:
'nexmo' => [
'key' => env('NEXMO_KEY'),
'secret' => env('NEXMO_SECRET'),
'sms_from' => '15556666666',
],
The sms_from
option is the phone number that your SMS messages will be sent from. You should generate a phone number for your application in the Nexmo control panel.
Formatting SMS Notifications
If a notification supports being sent as an SMS, you should define a toNexmo
method on the notification class. This method will receive a $notifiable
entity and should return a Illuminate\Notifications\Messages\NexmoMessage
instance:
/**
* Get the Nexmo / SMS representation of the notification.
*
* @param mixed $notifiable
* @return NexmoMessage
*/
public function toNexmo($notifiable)
{
return (new NexmoMessage)
->content('Your SMS message content');
}
Unicode Content
If your SMS message will contain unicode characters, you should call the unicode
method when constructing the NexmoMessage
instance:
/**
* Get the Nexmo / SMS representation of the notification.
*
* @param mixed $notifiable
* @return NexmoMessage
*/
public function toNexmo($notifiable)
{
return (new NexmoMessage)
->content('Your unicode message')
->unicode();
}
Customizing The "From" Number
If you would like to send some notifications from a phone number that is different from the phone number specified in your config/services.php
file, you may use the from
method on a NexmoMessage
instance:
/**
* Get the Nexmo / SMS representation of the notification.
*
* @param mixed $notifiable
* @return NexmoMessage
*/
public function toNexmo($notifiable)
{
return (new NexmoMessage)
->content('Your SMS message content')
->from('15554443333');
}
Routing SMS Notifications
When sending notifications via the nexmo
channel, the notification system will automatically look for a phone_number
attribute on the notifiable entity. If you would like to customize the phone number the notification is delivered to, define a routeNotificationForNexmo
method on the entity:
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* Route notifications for the Nexmo channel.
*
* @param \Illuminate\Notifications\Notification $notification
* @return string
*/
public function routeNotificationForNexmo($notification)
{
return $this->phone;
}
}
Slack Notifications
Prerequisites
Before you can send notifications via Slack, you must install the notification channel via Composer:
composer require laravel/slack-notification-channel
You will also need to configure an "Incoming Webhook" integration for your Slack team. This integration will provide you with a URL you may use when routing Slack notifications.
Formatting Slack Notifications
If a notification supports being sent as a Slack message, you should define a toSlack
method on the notification class. This method will receive a $notifiable
entity and should return a Illuminate\Notifications\Messages\SlackMessage
instance. Slack messages may contain text content as well as an "attachment" that formats additional text or an array of fields. Let's take a look at a basic toSlack
example:
/**
* Get the Slack representation of the notification.
*
* @param mixed $notifiable
* @return SlackMessage
*/
public function toSlack($notifiable)
{
return (new SlackMessage)
->content('One of your invoices has been paid!');
}
In this example we are just sending a single line of text to Slack, which will create a message that looks like the following:
Customizing The Sender & Recipient
You may use the from
and to
methods to customize the sender and recipient. The from
method accepts a username and emoji identifier, while the to
method accepts a channel or username:
/**
* Get the Slack representation of the notification.
*
* @param mixed $notifiable
* @return SlackMessage
*/
public function toSlack($notifiable)
{
return (new SlackMessage)
->from('Ghost', ':ghost:')
->to('#other')
->content('This will be sent to #other');
}
You may also use an image as your logo instead of an emoji:
/**
* Get the Slack representation of the notification.
*
* @param mixed $notifiable
* @return SlackMessage
*/
public function toSlack($notifiable)
{
return (new SlackMessage)
->from('Laravel')
->image('https://laravel.com/favicon.png')
->content('This will display the Laravel logo next to the message');
}
Slack Attachments
You may also add "attachments" to Slack messages. Attachments provide richer formatting options than simple text messages. In this example, we will send an error notification about an exception that occurred in an application, including a link to view more details about the exception:
/**
* Get the Slack representation of the notification.
*
* @param mixed $notifiable
* @return SlackMessage
*/
public function toSlack($notifiable)
{
$url = url('/exceptions/'.$this->exception->id);
return (new SlackMessage)
->error()
->content('Whoops! Something went wrong.')
->attachment(function ($attachment) use ($url) {
$attachment->title('Exception: File Not Found', $url)
->content('File [background.jpg] was not found.');
});
}
The example above will generate a Slack message that looks like the following:
Attachments also allow you to specify an array of data that should be presented to the user. The given data will be presented in a table-style format for easy reading:
/**
* Get the Slack representation of the notification.
*
* @param mixed $notifiable
* @return SlackMessage
*/
public function toSlack($notifiable)
{
$url = url('/invoices/'.$this->invoice->id);
return (new SlackMessage)
->success()
->content('One of your invoices has been paid!')
->attachment(function ($attachment) use ($url) {
$attachment->title('Invoice 1322', $url)
->fields([
'Title' => 'Server Expenses',
'Amount' => '$1,234',
'Via' => 'American Express',
'Was Overdue' => ':-1:',
]);
});
}
The example above will create a Slack message that looks like the following:
Markdown Attachment Content
If some of your attachment fields contain Markdown, you may use the markdown
method to instruct Slack to parse and display the given attachment fields as Markdown formatted text. The values accepted by this method are: pretext
, text
, and / or fields
. For more information about Slack attachment formatting, check out the Slack API documentation:
/**
* Get the Slack representation of the notification.
*
* @param mixed $notifiable
* @return SlackMessage
*/
public function toSlack($notifiable)
{
$url = url('/exceptions/'.$this->exception->id);
return (new SlackMessage)
->error()
->content('Whoops! Something went wrong.')
->attachment(function ($attachment) use ($url) {
$attachment->title('Exception: File Not Found', $url)
->content('File [background.jpg] was *not found*.')
->markdown(['text']);
});
}
Routing Slack Notifications
To route Slack notifications to the proper location, define a routeNotificationForSlack
method on your notifiable entity. This should return the webhook URL to which the notification should be delivered. Webhook URLs may be generated by adding an "Incoming Webhook" service to your Slack team:
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* Route notifications for the Slack channel.
*
* @param \Illuminate\Notifications\Notification $notification
* @return string
*/
public function routeNotificationForSlack($notification)
{
return 'https://hooks.slack.com/services/...';
}
}
Localizing Notifications
Laravel allows you to send notifications in a locale other than the current language, and will even remember this locale if the notification is queued.
To accomplish this, the Illuminate\Notifications\Notification
class offers a locale
method to set the desired language. The application will change into this locale when the notification is being formatted and then revert back to the previous locale when formatting is complete:
$user->notify((new InvoicePaid($invoice))->locale('es'));
Localization of multiple notifiable entries may also be achieved via the Notification
facade:
Notification::locale('es')->send($users, new InvoicePaid($invoice));
User Preferred Locales
Sometimes, applications store each user's preferred locale. By implementing the HasLocalePreference
contract on your notifiable model, you may instruct Laravel to use this stored locale when sending a notification:
use Illuminate\Contracts\Translation\HasLocalePreference;
class User extends Model implements HasLocalePreference
{
/**
* Get the user's preferred locale.
*
* @return string
*/
public function preferredLocale()
{
return $this->locale;
}
}
Once you have implemented the interface, Laravel will automatically use the preferred locale when sending notifications and mailables to the model. Therefore, there is no need to call the locale
method when using this interface:
$user->notify(new InvoicePaid($invoice));
Notification Events
When a notification is sent, the Illuminate\Notifications\Events\NotificationSent
event is fired by the notification system. This contains the "notifiable" entity and the notification instance itself. You may register listeners for this event in your EventServiceProvider
:
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
'Illuminate\Notifications\Events\NotificationSent' => [
'App\Listeners\LogNotification',
],
];
{tip} After registering listeners in your
EventServiceProvider
, use theevent:generate
Artisan command to quickly generate listener classes.
Within an event listener, you may access the notifiable
, notification
, and channel
properties on the event to learn more about the notification recipient or the notification itself:
/**
* Handle the event.
*
* @param NotificationSent $event
* @return void
*/
public function handle(NotificationSent $event)
{
// $event->channel
// $event->notifiable
// $event->notification
// $event->response
}
Custom Channels
Laravel ships with a handful of notification channels, but you may want to write your own drivers to deliver notifications via other channels. Laravel makes it simple. To get started, define a class that contains a send
method. The method should receive two arguments: a $notifiable
and a $notification
:
<?php
namespace App\Channels;
use Illuminate\Notifications\Notification;
class VoiceChannel
{
/**
* Send the given notification.
*
* @param mixed $notifiable
* @param \Illuminate\Notifications\Notification $notification
* @return void
*/
public function send($notifiable, Notification $notification)
{
$message = $notification->toVoice($notifiable);
// Send notification to the $notifiable instance...
}
}
Once your notification channel class has been defined, you may return the class name from the via
method of any of your notifications:
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use App\Channels\VoiceChannel;
use App\Channels\Messages\VoiceMessage;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
class InvoicePaid extends Notification
{
use Queueable;
/**
* Get the notification channels.
*
* @param mixed $notifiable
* @return array|string
*/
public function via($notifiable)
{
return [VoiceChannel::class];
}
/**
* Get the voice representation of the notification.
*
* @param mixed $notifiable
* @return VoiceMessage
*/
public function toVoice($notifiable)
{
// ...
}
}


See: Description
| Interface | Description |
|---|---|
| DrillTestWrapper.TestServices | |
| QueryBuilder.VectorQueryReader<T,V> |
VectorQueryReader function interface
|
| Class | Description |
|---|---|
| BaseDirTestWatcher |
Overview
|
| BaseFixture |
Base class for "fixtures." Provides the basics such as the Drill
configuration, a memory allocator and so on.
|
| BaseTest |
Contains patchers that must be executed at the very beginning of test runs.
|
| BaseTestQuery |
deprecated Use
ClusterTest instead. |
| BaseTestQuery.ClassicTestServices | |
| BaseTestQuery.SilentListener | |
| BufferingQueryEventListener |
Drill query event listener that buffers rows into a producer-consumer
queue.
|
| BufferingQueryEventListener.QueryEvent | |
| ClientFixture |
Represents a Drill client.
|
| ClientFixture.ClientBuilder | |
| ClientFixture.StatementParser |
Very simple parser for semi-colon separated lists of SQL statements which
handles quoted semicolons.
|
| ClusterFixture |
Test fixture to start a Drillbit with provide options, create a client, and
execute queries.
|
| ClusterFixture.FixtureTestServices |
Shim class to allow the
TestBuilder class to work with the
cluster fixture. |
| ClusterFixtureBuilder |
Build a Drillbit and client with the options provided.
|
| ClusterFixtureBuilder.RuntimeOption | |
| ClusterMockStorageFixture | |
| ClusterTest |
Base class for tests that use a single cluster fixture for a set of
tests.
|
| ConfigBuilder |
Builds a
DrillConfig for use in tests. |
| DirTestWatcher |
This class is used to create consistently named and safe temp directories for
unit tests.
|
| Drill2130CommonHamcrestConfigurationTest | |
| DrillAssert | |
| DrillTest | |
| DrillTest.MemWatcher | |
| DrillTestWrapper |
Encapsulates the options for a Drill unit test, as well as the execution
methods to perform the tests and validation of results.
|
| ExampleTest |
Example test case using the Drill cluster fixture.
|
| FieldDef |
Basic representation of a column parsed from a query profile.
|
| HadoopUtils | |
| LegacyOperatorTestBuilder | Deprecated
Use
OperatorTestBuilder instead. |
| LogFixture |
Establishes test-specific logging without having to alter the global
logback-test.xml file.
|
| LogFixture.LogFixtureBuilder |
Builds the log settings to be used for a test.
|
| LogFixture.LogSpec |
Memento for a logger name and level.
|
| OperatorFixture |
Test fixture for operator and (especially) "sub-operator" tests.
|
| OperatorFixture.Builder |
Builds an operator fixture based on a set of config options and system/session
options.
|
| OperatorFixture.MockExecutorState | |
| OperatorFixture.MockFragmentContext |
Provide a simplified test-time code generation context that
uses the same code generation mechanism as the full Drill, but
provide test-specific versions of various other services.
|
| OperatorFixture.MockOperatorContext | |
| OperatorTestBuilder | |
| OperatorTestBuilderTest | |
| OperatorTestBuilderTest.MockPhysicalOperator | |
| PhysicalOpUnitTestBase | |
| PhysicalOpUnitTestBase.BatchIterator | |
| PhysicalOpUnitTestBase.MockExecutorFragmentContext |
Note
|
| PhysicalOpUnitTestBase.MockPhysicalOperator |
Note
|
| PrintingResultsListener | |
| PrintingUtils |
This class contains utility methods to run lambda functions with the necessary
LogFixture
boilerplate to print results to stdout for debugging purposes. |
| ProfileParser |
Parses a query profile and provides access to various bits of the profile
for diagnostic purposes during tests.
|
| ProfileParser.Aggregator | |
| ProfileParser.CostPrinter |
Print out the tree showing a comparison of estimated vs.
|
| ProfileParser.FindOpVisitor | |
| ProfileParser.FragInfo |
Information for a fragment, including the operators
in that fragment and the set of minor fragments.
|
| ProfileParser.MinorFragInfo |
Information about a minor fragment as parsed from the profile.
|
| ProfileParser.OperatorProfile |
Detailed information about each operator within a minor fragment
for a major fragment.
|
| ProfileParser.OperatorSummary |
Information about an operator definition: the plan-time information
that appears in the plan portion of the profile.
|
| ProfileParser.TimePrinter | |
| ProfileParser.TreePrinter |
Print the operator tree for analysis.
|
| ProfileParser.TreeVisitor |
Visit a tree of operator definitions to support printing,
analysis and other tasks.
|
| QueryBatchIterator |
Iterator over batches returned from a query.
|
| QueryBuilder |
Builder for a Drill query.
|
| QueryBuilder.PlanMatcher |
Collects expected and non-expected query patterns.
|
| QueryBuilder.QuerySummary |
Summary results of a query: records, batches, run time.
|
| QueryBuilder.QuerySummaryFuture |
The future used to wait for the completion of an async query.
|
| QueryBuilder.SummaryOnlyQueryEventListener |
Listener used to retrieve the query summary (only) asynchronously
using a
QueryBuilder.QuerySummaryFuture . |
| QueryResultSet |
Returns query results as an iterator over row sets.
|
| QueryRowSetIterator |
Converts an incoming set of record batches into an iterator over a
set of row sets.
|
| QueryRowSetReader | |
| QueryTestUtil |
Utilities useful for tests that issue SQL queries.
|
| RestClientFixture |
Represents a client for the Drill Rest API.
|
| RestClientFixture.Builder |
A builder for the rest client.
|
| StatementParser |
Very simple parser for semi-colon separated lists of SQL statements which
handles quoted semicolons.
|
| SubDirTestWatcher |
This is a
TestWatcher which is used to create and delete sub directories before and after unit tests respectively. |
| SubDirTestWatcher.Builder |
This is a builder for a
SubDirTestWatcher . |
| SubOperatorTest | |
| TestBuilder | |
| TestGracefulShutdown | |
| TestTools | |
| UserExceptionMatcher |
Matcher for UserException that matches if expected type and actual type are the same, and expected message is
contained in the actual message.
|
| Enum | Description |
|---|---|
| BaseDirTestWatcher.DirType |
An enum used to represent the directories mapped to the dfs.root and
dfs.tmp workspaces respectively.
|
| BufferingQueryEventListener.QueryEvent.Type | |
| FieldDef.Type | |
| FieldDef.TypeHint | |
| TestTools.FileSource |
Provides a variety of test framework tools to simplify Drill unit tests and ad-hoc tests created while developing features. Key components include:
ClusterFixtureBuilder
: Builder pattern to create an embedded Drillbit,
or cluster of Drillbits, using a specified set of configuration, session
and system options.
ClusterFixture
: The cluster created by the builder.
ClientFixture
: A facade to the Drill client that provides
convenience methods for setting session options, running queries and
so on. A client is associated with a cluster. If tests desire, multiple
clients can be created for a single cluster, though most need just one
client. A builder exists for clients, but most tests get the client
directly from the cluster.
QueryBuilder
: a builder pattern for constructing and
running any form of query (SQL, logical or physical) and running the
query in a wide variety of ways (just count the rows, return the
results as a list, run using a listener, etc.)
QuerySummary
: a summary of a
query returned from running the query. Contains the query ID, the
row count, the batch count and elapsed run time.
ProfileParser
: A simple tool to load a query profile and
provide access to the profile structure. Also prints the key parts of
the profile for diagnostic purposes.
LogFixture
: Allows per-test changes to log settings to,
say, send a particular logger to the console for easier debugging, or
to suppress logging of a deliberately created failure.
BaseDirTestWatcher
: Creates temporary directories which are used for the following
aspects of drill in unit tests:
BaseDirTestWatcher.getTmpDir()
) is created and
configured as the tmp directory for drill bits.
BaseDirTestWatcher.getStoreDir()
) is created and
configured as the store directory for drillbits.
BaseDirTestWatcher.getRootDir()
is created and configured as the directory
for this workspace.
BaseDirTestWatcher.getDfsTestTmpDir()
) is created and configured as the
directory for this workspace.
BaseDirTestWatcher
is used in tests that extend BaseTestQuery
and tests that use
the ClusterFixture
.
A typical test using this framework looks like this:
@org.junit.Rule
public final BaseDirTestWatcher dirTestWatcher = new BaseDirTestWatcher();
@Test
public void exampleTest() throws Exception {
createEmployeeCsv(dirTestWatcher.getRootDir());
// Configure the cluster. One Drillbit by default.
FixtureBuilder builder = ClusterFixture.builder(dirTestWatcher)
// Set up per-test specialized config and session options.
.configProperty(ExecConstants.SYS_STORE_PROVIDER_LOCAL_ENABLE_WRITE, true)
.configProperty(ExecConstants.REMOVER_ENABLE_GENERIC_COPIER, true)
.sessionOption(ExecConstants.MAX_QUERY_MEMORY_PER_NODE_KEY, 3L * 1024 * 1024 * 1024)
.maxParallelization(1);
// Launch the cluster and client.
try (ClusterFixture cluster = builder.build();
ClientFixture client = cluster.clientFixture()) {
// Run a query (using the mock data source) and print a summary.
String sql = "SELECT id_i FROM dfs.`employee.csv` ORDER BY id_i";
QuerySummary summary = client.queryBuilder().sql(sql).run();
assertEquals(1_000_000, summary.recordCount());
System.out.println(String.format("Sorted %,d records in %d batches.", summary.recordCount(), summary.batchCount()));
System.out.println(String.format("Query Id: %s, elapsed: %d ms", summary.queryIdString(), summary.runTimeMs()));
client.parseProfile(summary.queryIdString()).print();
}
}
Typical usage for the logging fixture:
@Test
public void myTest() {
LogFixtureBuilder logBuilder = LogFixture.builder()
.toConsole()
.disable() // Silence all other loggers
.logger(ExternalSortBatch.class, Level.DEBUG);
try (LogFixture logs = logBuilder.build()) {
// Test code here
}
}
Copyright © 2021 The Apache Software Foundation. All rights reserved.


Claim your NHS Pension
Declaration
I confirm that:
- I’ve read the Retirement Guide for members of the NHS Pension Scheme and the application guidance notes
- the information I’ve given is correct and complete to the best of my knowledge
- if I become aware of any changes in the information I’ve given after I‘ve sent it, I will notify NHS Pensions as soon possible
- I’ll notify NHS Pensions if I recycle my NHS Pension Commencement Lump Sum
- I understand that I’ll have to repay any overpayment of pension if necessary
- if I have Enhanced, Primary, Fixed (2012 or 2014) or Individual Protection (2014) from HMRC I have enclosed a copy of the certificate
- if I have Fixed or Individual Protection 2016 I have enclosed a copy of HMRC's notification, confirming the reference and / or certificate number
- I understand that by providing a copy of HMRC's notification of 2016 Protection, I give permission for NHS Pensions to check and validate that protection with HMRC
- if I have Fixed Protection 2012, 2014 or 2016, I have checked for Benefit Accrual and have not had Benefit Accrual up to and including the date of my retirement
- I understand that, if I have claimed my 1995 Section benefits on normal age grounds or voluntary early retirement with actuarial reduction, my pension may be suspended if I return to NHS employment (including a Direction Body) within one calendar month. Work in the NHS which totals 16 hours or less a week is ignored for this purpose
- I understand that if I claim my benefits from the 1995 Section, I will not be able to rejoin the Scheme
- I’m entitled to apply for my retirement benefits from the NHS Pension Scheme


The Teacher´s Guide for fourth grade is a pedagogical resource that orients and enriches the planning process and the implementation of the new English Curriculum. It includes videos, activities and resources to develop each of the units of the Second grade Program.


>From Here to Eternity (1953)
Grade: 66
"From Here to Eternity" racked up 13 Academy Award nominations, and won five Oscars, including Best Picture, Best Director (Fred Zinnemann, who had been nominated the year before for "High Noon"), Best Screenplay (Daniel Taradash) and Best B/W Cinematography (Burnett Guffey). Winning the only Oscars of their careers were Best Supporting Actor Frank Sinatra, and Best Supporting Actress Donna Reed. Montgomery Clift and Burt Lancaster were nominated for Best Actor, while Deborah Kerr picked up a nomination for Best Actress.
Today, the film is best known for the beach scene with Lancaster and Kerr, considered to be one of the most romantic in screen history, and Sinatra's performance, which rejuvenated his career.
The setting is Pearl Harbor, Hawaii, shortly before the surprise Japanese attack began direct U.S. involvement in World War II. Clift is a soldier and bugler who transfers to a new regiment. A former middleweight boxer, he is pressured by contemptible Captain Holmes (Philip Ober) to box for the regiment. Clift refuses, and is harassed by Holmes and the regiment's boxers. Clift's sole friend is Maggio (Sinatra). Clift gets a girlfriend (Reed), who is a 'hostess' at a private club (in the novel, the club is a whorehouse, while Reed's character is a prostitute).
Holmes' right hand man is Lancaster, a Sergeant who has eyes for Holmes' unhappy wife (Deborah Kerr). Their affair is illegal under Army rules and could land him in prison. The much-lauded beach scene is not representative of the Lancaster/Kerr romance, which is furtive and bitter.
The critical and commercial success of "From Here to Eternity" is understandable. It is a good film, and it has strong appeal for both men (war theme) and women (romance theme). It appeals to American patriotism, especially in the scene where heroic soldiers led by Lancaster shoot down a Japanese bomber.
Essentially the film is a soap opera, with the dual troubled romances of Clift/Reed and Lancaster/Kerr. To increase sympathy for our romantic leads, Holmes' character is selfish, cruel and philandering, while Sinatra's tormentor Fatso (Ernest Borgnine) is a sadistic bully. How much one appreciates the film is proportional to one's sympathy for Clift and Lancaster, both of whom are stubborn with self-destructive streaks. Some of the dramatic scenes are manipulative and heavy-handed, especially the various death scenes, Clift's fistfight, and the come-uppance of Holmes and the regiment's boxers.
"From Here to Eternity" reminds me of "The Young Lions", a film from 1957. Clift plays a very similar character, a soldier forced to fight other soldiers, who gets the girl, goes AWOL, and forces the premature retirement of his Captain. In "The Young Lions", Dean Martin's character merges the roles of Sinatra (Clift's friend) and Lancaster (in refusing to get a promotion). Since "The Young Lions" is the later film, one could say that it ripped off "From Here to Eternity". But "The Young Lions" is really an improvement, as it is a much better film, probably due to the presence of Marlon Brando.
<EMAIL_ADDRESS>http://members.tripod.com/~Brian_Koller/movies.html
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


- Current Balance
- 0.00
- This Month Balance
- 0.00
- This Week Income
- 0.00
- This Month Income
- 0.00
- Year to Date Income
- 0.00
- Today Expense
- 0.00
- This Week Expense
- 0.00
- This Month Expense
- 0.00
- Year to Date Expense
- 0.00
-
2015-04-27
Income
2,000,000.00
5,000,000.00
-
2015-04-27
Income
1,000,000.00
6,000,000.00
-
2015-04-27
Income
500,000.00
6,500,000.00
-
2015-04-27
Expense
2,000,000.00
4,500,000.00


tor10.Network¶
-
class
tor10.Network.
Network
(nwfile=None, delimiter=None)[source]¶ -
__init__
(nwfile=None, delimiter=None)[source]¶ Constructor of the Network
The Network is an object that allow one to create a complex network from a pre-defined Network file. By putting the Tensors into the Network, the user simply call “Network.Launch()” to get the out-come.
- Args:
- nwfile:
- The path of the Network file.
- delimiter:
- The delimiter that is used to parse the Network file.
- Example:
The following is an simple example for a Network file (“test.net”).
A : -1 -2; 1 2 B : 1; 3 C : 2; 4 TOUT: -1 -2; 3 4 Order: (A,B),C
- Each line defines a Tensor with the left side of the colon is the name of the tensor. The right side of the colon defines the labels of each bonds.
- The semicolon seperates the row-space and col-space, it is equivalent as “rowrank” property of the UniTensor. The left side of semicolon is defined as row-space, and right side of semicolon is degined as col-space.
[Note] that there are two preserved tensor name “TOUT” and “Order”. The “TOUT” specify the output tensor, and “Order” defineds how the Tensors in the Network will be contracted.
[Note] The “Order” is not required. If not specify, the tensors will contract one by one accroding to the sequence as they appears in the Network file.
- The above Network file means:
- an “A” UniTensor with 2 inbonds label [-1,-2], 2 outbonds label [1,2]
- an “B” UniTensor with 1 inbonds, 1 outbonds label [1,3]
- an “C” UniTensor with 1 inbonds, 1 outbonds label [2,4]
- the output UniTensor will be 2 in-bonds with labels [-1,-2] and 2 out-bonds with labels [3,4].
- the UniTensors in the Network will contract accroding to: “A” and “B” contract first, then contract with C to form the final output UniTensor.
>>> Ntwk = tor10.Network("test.net",delimiter=",") >>> print(Ntwk) ==== Network ==== [x] A : -1 -2 ; 1 2 [x] B : ; 1 3 [x] C : ; 2 4 TOUT : -1 -2 ; 3 4 =================
-
Fromfile
(ntwrk_file, delimiter=None)[source]¶ Read the Network file.
- Args:
- nwfile:
- The path of the Network file.
- delimiter:
- The delimiter that is used to parse the Network file.
-
Launch
()[source]¶ Launch the Network. When call, it check if there is a well defined Network structure (Network file loaded), if there is “TOUT” tensor for the Network and if all the Tensors the is being defined in the strucutre are set.
- Return:
- UniTensor, the shape and the bonds property are the same as defined in “TOUT”
-
Put
(name, tensor)[source]¶ Put the UniTensor into the tensor named [name] in the Network. To use the Network, only untagged tensor can be put into the Network.
- Args:
- name:
- The name of the tensor defines in the Network to put the UniTensor.
- tensor:
- A UniTensor that is to be put into the Network. It should be untagged.
Example:
ntwrk = tor10.Network() ntwrk.Fromfile("test.net") A = tor10.UniTensor([tor10.Bond(3),tor10.Bond(4),tor10.Bond(3),tor10.Bond(4)],rowrank=2) B = tor10.UniTensor([tor10.Bond(3),tor10.Bond(2)],rowrank=1) C = tor10.UniTensor([tor10.Bond(4),tor10.Bond(4)],rowrank=1)
>>> print(ntwrk) ==== Network ==== [x] A : -1 -2 ; 1 2 [x] B : ; 1 3 [x] C : ; 2 4 TOUT : -1 -2 ; 3 4 =================
>>> ntwrk.Put("A",A) >>> print(ntwrk) ==== Network ==== [o] A : -1 -2 ; 1 2 [x] B : ; 1 3 [x] C : ; 2 4 TOUT : -1 -2 ; 3 4 =================
>>> ntwrk.Put("C",C) >>> print(ntwrk) ==== Network ==== [o] A : -1 -2 ; 1 2 [x] B : ; 1 3 [o] C : ; 2 4 TOUT : -1 -2 ; 3 4 =================
>>> ntwrk.Put("B",B) >>> print(ntwrk) ==== Network ==== [o] A : -1 -2 ; 1 2 [o] B : ; 1 3 [o] C : ; 2 4 TOUT : -1 -2 ; 3 4 =================
>>> TOUT = ntwrk.Launch() >>> TOUT.Print_diagram(bond_info=True) ----------------------- tensor Name : tensor Rank : 4 has_symmetry: False on device : cpu is_diag : False ------------- / \ -1 ____| 3 2 |____ 3 | | -2 ____| 4 4 |____ 4 \ / ------------- lbl:-1 Dim = 3 | REG : _ lbl:-2 Dim = 4 | REG : _ lbl:3 Dim = 2 | REG : _ lbl:4 Dim = 4 | REG :
-


Sturgeon Claims Scottish Independence ‘Within Touching Distance’ as UK Snap Election Nears
MOSCOW (Sputnik) - Scotland’s independence is very near, which makes the upcoming UK general election most important ever to put the future of the region into its own hands, First Minister of Scotland Nicola Sturgeon said at a rally on Saturday.
On Tuesday, the UK parliament agreed to hold a snap general election on December 12. Prime Minister Boris Johnson has repeatedly called for an early election to break the deadlock over his renegotiated Brexit deal, which prevented the country from leaving the bloc on October 31. Scotland, which voted to remain in the EU back in 2016, continues opposing any form of Brexit.
Addressing the gathering in the heart of Glasgow, Sturgeon said that the "prize" of independence was "within a touching distance."
"But we must seize that prize … This general election is the most important in our lifetimes," she said.
According to the first minister, Scotland does not want a future that "will be dictated to us by the likes of Boris Johnson" to be "ripped out of our European family of nations against our will."
She stressed that Scots "must come out in our numbers and vote in this election" to "put Scotland’s future into Scotland’s hands."
In an interview with Sky News on the scene, Sturgeon claimed that "if people in Scotland make clear their desire for the second independence referendum," which she wants to hold in 2020, it would be "unsustainable" for Westminster to oppose this.


A podcast on breakthroughs in public service technology.
2023
-
85 The AI Generated Episode 🤖
84Jun 23, 2023
-
84 Hack Your Bureacracy 🏢
84Apr 12, 2023
-
Re-release: Discovery Sprints 🏃♀
83Jan 23, 2023
2022
-
Community Engagement 👥
82Dec 29, 2022
-
Microbusinesses 👩💻
81Nov 2, 2022
-
Accessibility and sustainability for the web
80Oct 19, 2022
-
Sustainable volunteer organizations 👥
79Sep 21, 2022
-
Technology for understanding policy 📊🏛
78Aug 31, 2022
-
Human centered devsecops 🧑🏾🤝🧑🏽💻🔒
77Jun 8, 2022
-
Digital identity and services delivery 🆔
76May 25, 2022
-
Innovating the social safety net 💻🇺🇸
75May 11, 2022
-
Customer experience and government services with Clare Martorana, Mina Hsiang, and Jodi Leo 👩💻🏛
74Apr 26, 2022
-
Opinion research 📊
73Apr 12, 2022
-
From Crises Response to Sustainability 💻🇺🇸
72Feb 23, 2022
-
Dark Patterns
71Feb 8, 2022
-
Civic Technologist's Practice Guide Episode Re-Release 📚
70Jan 11, 2022
2021
-
Civic Innovation Corps 👩💻🏛
69Dec 8, 2021
-
Why volunteer? Brigade Congress Live Show 🎤
68Nov 10, 2021
-
Network ReVisioning 👩💻🇺🇸
67Oct 14, 2021
-
Citizen and Immigration Information Tool 🏛
66Sep 30, 2021
-
Silenced No More Act 🏛
65Sep 16, 2021
-
Code for All Summit 🌐
64Sep 8, 2021
-
Volunteering the Valley 👩💻
63Sep 1, 2021
-
Facial Recognition and Government 📷
62Aug 25, 2021
-
Right to Repair 🛠
61Aug 11, 2021
-
Participatory Democracy 💻🗳
60Jun 23, 2021
-
How COVID impacted local government 🦠🏛
59Jun 2, 2021
-
Empathy for Change 📘
58May 5, 2021
-
Discovery Sprints 🏃♀
57Apr 21, 2021
-
The right to be forgotten 💾
56Apr 1, 2021
-
Revisiting 'We the Technologists' 🏛
55Feb 20, 2021
-
Storytelling, building community, connecting with others 🎤
54Feb 11, 2021
-
Gaming, history, and teaching us about spacecraft 🚀
53Jan 27, 2021
2020
-
Digital Maturity Indicator 💻
52Dec 29, 2020
-
More Than Code 👩💻
51Nov 18, 2020
-
A Civic Technologist's Practice Guide 📚
50Oct 21, 2020
-
Civic Engagement During COVID-19 (Part 2) 🏛
49Oct 7, 2020
-
Code for America with Amanda Renteria 💻🇺🇸
48Sep 15, 2020
-
Civic Engagement During COVID-19 (Part 1) 🏛
47Aug 30, 2020
-
Data Driven Roads 📈🛣💻
46Jul 14, 2020
-
Engineering Leadership with USDS' Lisa Chung 💪🏾💻🇺🇸
45May 17, 2020
-
Tech for Non Tech 💻🌏
44Apr 1, 2020
-
Forensic Algorithms with Emily Paul 🥼
43Mar 3, 2020
-
Private and public sector civic tech with Emily Fong 💻🏛
42Feb 18, 2020
-
Health Care Innovation 🏥
41Feb 4, 2020
-
The first live episode 👀
40Jan 21, 2020
2019
-
The Colorado Digital Service 👩🏽💻
39Dec 17, 2019
-
Engaging Local Government Leaders 🏛
38Dec 3, 2019
-
Data Democratization 📊
37Nov 21, 2019
-
Rising for Justice ⚖
36Nov 6, 2019
-
The Civic Analytics Degree 🏫
35Sep 26, 2019
-
Khyber Pakhtunkhwa Government Innovation Fellowship 💻🏛
34Sep 5, 2019
-
Maine Ballot 🗳
33Jul 31, 2019
-
Civic Tech meets Police Oversight in Austin, TX 📱
32Jul 18, 2019
-
Learning from USDS Engineering Director David Holmes 💪🏽🖥🇺🇸
31Jun 26, 2019
-
Election Security 🗳🔒
30Jun 12, 2019
-
Civic Tech Year in Review 💻⚖⌛
29Apr 12, 2019
-
Save the Internet Act of 2019 📡
28Mar 12, 2019
-
Humane Technology with Genevieve Gaudet 🙋🏽 🙋🏽♂
27Feb 14, 2019
-
Where are we at with Internet Privacy? 🤔
26Jan 7, 2019
2018
-
The Good Country with Madeline Hung 🗺
25Dec 20, 2018
-
Organizing through crises featuring Codeando Mexico's Alma Rangel 🙋🏽👩🏽💻
24Dec 5, 2018
-
Civic Tech as a Movement with Dawn McDougall 🏛
23Nov 21, 2018
-
Thought Leadership and Product Management with Leah Bannon from USDS 👩🏼💻
22Nov 8, 2018
-
Python Powered Mentorship with Ray Berg 🐍
21Oct 24, 2018
-
Civic Entrepreneurship with Derek Eder 💻👔⚖
20Oct 11, 2018
-
A chat with the Canadian Digital Service CEO Aaron Snow 💪🏽💻🇨🇦
19Sep 17, 2018
-
Journey to Civic Tech with Cyrus Sethna 🏃🏽
18Aug 29, 2018
-
The State of Net Neutrality, August 2018 ⚖
17Aug 21, 2018
-
Coding It Forward Civic Technology Fellowship 👩🏽💼 👨🏽💼
16Aug 8, 2018
-
Community Organizing with Open Savannah 🙌🏽
15Aug 1, 2018
-
The Pulse Civic Engagement Platform 🤳🏽
14Jul 23, 2018
-
The Civic Tech Candidate, Kalen Gallagher 👨💼
13Jul 20, 2018
-
Gaining skills, facing adversity, and modernizing services delivery with Amenity Applewhite 🙋🏼
12Jun 26, 2018
-
GovLove and ELGL with Kent Wyatt 👨🏽⚖👩🏽💻
11Jun 20, 2018
-
Voices of Summit 🗣
10Jun 13, 2018
-
Lightning Talk: Running for Office 🌩
09Jun 5, 2018
-
Breakdown: K-12 Computer Science Framework 👨🏽🏫
08May 18, 2018
-
Customer Experience 💪🏽🖥🇺🇸
07May 10, 2018
-
Open Source Licenses 👩💻
06May 1, 2018
-
Human Centered Design 👥
05Apr 23, 2018
-
Innovation Teams 📡
04Apr 3, 2018
-
Open Data in Chicago 🗂
03Mar 13, 2018
-
Breakdown: Open Data 📊
02Feb 28, 2018
-
We the Technologists 🏛
01Feb 20, 2018
-
Launch 🚀
Welcome to Civic Tech ChatJan 18, 2018


---
layout: talk
title: Tracking influenza antigenic evolution and geographic circulation
venue: Korea University College of Medicine
event: Microbiology Department Seminar
author: Trevor Bedford
---
{{ page.title }}
Trevor Bedford (@trvrb)
{{ page.date | date: "%-d %b %Y" }}
{{ page.event }}
{{ page.venue }}
Slides at bedford.io/talks/
Influenza virus
Influenza H3N2 vaccine updates
Gene flow and population turnover
Turnover can be seen in the flu phylogeny
Flu pandemics caused by host switch events
Influenza B does not have pandemic potential
Phylogenetic trees of different influenza lineages
Antigenic evolution drives viral dynamics
Influenza hemagglutination inhibition (HI) assay
HI measures cross-reactivity across viruses
Data in the form of table of maximum inhibitory titers
Compiled HI data difficult to work with
Antigenic cartography positions viruses and sera to recapitulate titer values
Antigenic cartography positions viruses and sera to recapitulate titer values
Schematic HI table and antigenic map
Bayesian multidimensional scaling (BMDS)
Integration through Markov chain Monte Carlo (MCMC)
Antigenic map of H3N2 influenza from 1968 to 2011
Antigenic drift of H3N2 influenza
Factoring the BMDS model
Phylogeny of H3N2 virus sequences
Modeling continuous characters via Brownian motion
Including diffusion in MDS model
Factoring the BMDS diffusion model
Antigenic cluster transitions
with Charles Cheung, Andrew Rambaut and Marc Suchard
Cheung et al 2015. Detailed antigenic dynamics of influenza virus revealed by Bayesian phylogenetic clustering. In prep.
Factoring the BMDS discrete transition model
H3N2 discrete antigenic dynamics
Association map of H3N2 antigenic clustering
H3N2 driver mutations
Sites: 135, 144, 145, 155, 156, 157, 158, 159, 189, 223 , 225, 226
H3N2 clustering with driver mutations
Phylogenetic trees of different influenza lineages
Antigenic phenotype across lineages
Antigenic drift across lineages
Antigenic drift across lineages
Seasonality in influenza
Hypotheses of influenza circulation patterns
Influenza H3 genealogy for NY state viruses
Hypotheses of influenza circulation patterns
Sample H3N2 from around the world
Treating geographic state as an evolving character
Phylogeny of H3 with geographic history
Infer geographic transition matrix
Air travel predicts migration rates
Geographic location of phylogeny trunk
Region-specific ancestry
Phylogenies across subtypes / lineages
H3N2 phylogeny
H1N1 phylogeny
B/Vic phylogeny
B/Yam phylogeny
Ancestry patterns across lineages
Regional persistence patterns
How to explain these differences?
Age distribution across viruses
Air travel differences between adults and children
Epidemiological model of varying rates of antigenic drift
Results of varying antigenic drift
Interaction between virus evolution, epidemiology and human behavior drives migration rate differences
Circulating antigenic variants
Vaccine strain prediction
Antigenic evolution in H3N2
Vaccine strain selection timeline
Predictive models
A simple predictive model estimates the fitness $f$ of virus $i$ as
$$\hat{f}_i = \beta^\mathrm{ep} \, f_i^\mathrm{ep} + \beta^\mathrm{ne} \, f_i^\mathrm{ne}$$
where $f_i^\mathrm{ep}$ measures cross-immunity via substitutions at epitope sites and $f_i^\mathrm{ep}$ measures mutational load via substitutions at non-epitope sites.
Predictive models
Another approach quantifies phylogenetic branching patterns
nextflu
Project to provide a real-time view of the evolving influenza population
All in collaboration with Richard Neher
nextflu
pipeline
- Download all recent HA sequences from GISAID
- Filter to remove outliers
- Align sequences
- More filtering
- Build tree
- Estimate frequencies
- Export JSON for visualization
Acknowledgements
Richard Neher (Max Planck Tübingen), Andrew Rambaut (University of Edinburgh),
Colin Russell (Cambridge University), Charles Cheung (Fred Hutch),
Marc Suchard (UCLA), Steven Riley (Imperial College),
Philippe Lemey (Philippe Lemey (KU Leuven), Gytis Dudas (University of Edinburgh)
WHO Global Influenza Surveillance Network / GISAID: Ian Barr, Shobha Broor, Mandeep Chadha, Nancy Cox, Rod Daniels, Palani
Gunasekaran, Aeron Hurt, Anne Kelso, Alexander Klimov, Nicola Lewis, Xiyan Li, John McCauley, Takato Odagiri, Varsha Potdar, Yuelong Shu, Eugene Skepner, Masato Tashiro, Dayan Wang, Xiyan Xu
Contact
- Website: bedford.io
- Twitter: @trvrb
- Slides: bedford.io{{ page.url }}


Pro Tip: You can open your bookmarks from anywhere by using the Hot key, on Windows: Ctrl+Shift+X or Mac: Command+Shift+X


FEATURES
Quality
We partner with the finest craft brewers that use the freshest hops and source local ingredients.
Variety
Build your own six-packs with beers not found in your local stores.
Convenience
Delivered to your door monthly.
HOW IT WORKS
Choose your beers
Choose from a wide variety of pale ales, IPAs, stouts, porters, sour beers, wheat beers, etc.
Pick a package
Pick a package from our pricing options: choose from 6 to 24 beers to be delivered each month.
Drink beer
Enjoy sampling the beers you selected.
Repeat
One week before your next delivery, we will contact you to select your next months' shipment.
PRICING
Choose from 3 packages:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla id sagittis eros. Fusce pretium nisl non augue sollicitudin, sit amet ullamcorper magna euismod. Nullam eleifend, nulla vitae vestibulum hendrerit, tellus nisi molestie dolor, aliquet vulputate odio erat id augue. Donec volutpat mollis felis ut ultrices. Nunc varius, arcu non dignissim ultrices, enim metus rutrum turpis, eu porta sem est id quam. Sed eget eros vitae eros volutpat ornare. Phasellus condimentum ex scelerisque sapien tincidunt euismod. Vestibulum at arcu neque.
KEEP IN TOUCH
Keep in touch! We'll send you the latest beer news and promotional offers.


--- layout: default ---
This is my personal website, where you can find information on my general research projects, my publications as well as any training / teaching material I've produced over the years.
More updated information is available through the Biodata Analysis Group website.


Discover the must-visit events in Lviv
| Event | Date | Address |
|---|---|---|
| ZaxidFest | June 26–29 | Rodatychi village, near Lviv |
| Street Food So Good. Autumn | August 28–30 | Park of Culture |
| Molokiya Lviv Half Marathon | August 23 | Svobody avenue 28 Lviv |
| Lviv Coffee Festival | September 11–13 | Dmytra Vitovskoho St 57, Tram Station |
| Craft Beer & Vynyl Music Festival | September 25–27 | Staroznesenska St 24–26 Lviv |
| 27 BookForum | September 16–20 | Art Gallery |
| Lviv Cheese and Wine Festival | October 23–25 | Kopernik St 15, Potocki Palace |
| Christmas Fair | will be announced | near Lviv Opera and Ballet Theatre |
Street Food So Good. Autumn
Street Food So Good — is a weekend food market in Lviv, actually, it’s the first street food festival in the city and just a great platform for supporting local businesses. The main goal of this event is to promote high–quality street food and to develop a new form of outdoor activities that both, citizens and visitors of Lviv will enjoy.
ZaxidFest
All autobahns, air corridors, field trails, forest trails, navigable rivers and even Carpathian fortunes will conspire and all roads will lead not to Rome, but to ZaxidFest in the village of Rodatychi near Lviv! Zaxidfest 2020 is a rock and electronic music festival. Music for a different taste, incredible atmosphere, beautiful Ukrainian nature, friendly smiling people and good memories — this is all Zaxidfest! The festival this year will meet more than 50 famous performers — and this is 60 hours of non-stop music and 500 kW of powerful sound.
Molokiya Lviv Half Marathon
Conquer the streets of Lviv running the Lviv Half Marathon. Overcome your limits together with thousands of like–minded people on a route along the legendary city. Decorated with autumn gold squares and parks, the breadth of history of the city from the start to the finish — this is how our running festival Molokiya Lviv Half Marathon will look like. Join us in August with new strength and goals!
Lviv Coffee Festival
Every year lots of coffee lovers, industry professionals, meticulous roasters, discerning baristas, graceful latte artists and connoisseurs of flavor meet in the city to talk, compete and enjoy this wonderful drink. The event is pursuing the popularization of coffee culture at coffee houses, home, among professionals and coffee lovers.
Lviv Coffee Festival is an event that connects people not only from different cities of Ukraine, but also from different cities of the world. The guests will visit the largest coffee fair that will last for four days of the festival at the old Lviv tram depot. The best coffee shop will be selected during the festival.
Craft Beer & Vynyl Music Festival
Craft Beer & Vinyl Music Festival in Lviv is one of the biggest beer events in Central Eastern Europe. It will gather artists of craft beer culture from Ukraine and worldwide. Various breweries, brewers, pub owners, suppliers and manufacturers of raw materials, equipment, etc. needed for the brewing culture will gather at this festival. A vinyl records exposition of Ukrainian collectors, special equipment and music performed by unique bands and singers will be a pleasant addition to Craft Beer & Vinyl Music Festival.
27 BookForum
If you like reading and books, this event is a must–visit place in your list. 27 BookForum will take place on September 16–20 in Lviv. It is the main culture festival in Ukraine. The honorable guests of 26 BookForum became Indian ecofeminist writer, laureate of Bukers’ award Aruandty Roy; Azerbaijanian writer, autor of the world bestseller “Sweet sault of Bosphor” Elchin Safarli; Hungarian writer, who is one of the top–10 oppositional Russian-speaking writers Maryam Petrosian.
Lviv Cheese and Wine Festival
The main gastronomic autumn fest, Cheese & Wine Festival will take place on the territory of the Potocki Palace and the courtyard of the Palace of Arts. Cheese and Wine Festival is a good opportunity to learn more about the culture of cheese making and winemaking traditions and taste a variety of cheeses and wines. The best products will be presented by well–known producers of Ukrainian wine and cheese. In addition to this, the festival will offer a variety of cheese dishes, including Ukrainian syrnyk. Also, the event's guests will be able to enjoy music performances and different competitions.
Christmas Fair
When the Christmas Fair appears on the main avenue of the city, Lviv begins to feel the true atmosphere of the Christmas and New Year holidays. The fair opens in early December (earlier than in any other corner of the country) and immediately sets the tone of the holiday — the flavors of street candy are spread around the center, bright lights attract both tourists and locals, and such gifts for loved ones as you can get here you will get nowhere else.


Section 2.14 Book Reader
Skills Addressed in this Lesson:
Open the book reader.
Open a book.
Locate the beginning of a book.
Open a second book using the shortcut command.
Navigate through a book.
Use the thumb-keys within a book.
Subsection 2.14.1 Tasks
This lesson assumes you have downloaded at least two books from a web site such as Web Braille or Bookshare. Give assistance as necessary.
From Main Menu, press b for book reader.
The book reader will open. You will be asked to open a folder, then to open a book.
You may have to unpack a book if you have used Bookshare. You will need to know your Bookshare user name and password.
From the top of the book, you may want to locate the beginning of the book content without reading all of the initial copyright information.
You will need to use the find command. Press space with f.
Press f to search forward. The letter b will search "back" if you needed to find something behind the cursor.
Key in "isbn" for the isbn number of the book. Press enter. This will get you closer to the beginning of the book content.
You could also key in the words "begin content" to get closer to the beginning of the book. Use other words of your choice to find the beginning content of the book.
-
From within the book, you can always use space with h. When pressing space with h, you can space to the help topics of:
Review commands
Braille thumb-key commands
Miscellaneous commands
If you are reading with speech, you can press space with g to go forward reading. Press enter with backspace to stop reading.
Space with f will help you search for a string of text in the book.
Use space with n to find the next occurrence of the last searched-for text string. If you searched for the word "chapter" and did not find the correct chapter, you could use space with n to search for the word "chapter" again.
Allow your student time to practice these commands.
-
Other navigation commands that are similar to the navigation commands in a keyword document can also be used in the book reader. Practice the below commands as necessary.
Space with 1 2 3 will go to the top of the document.
Go to the end of the document with space and dots4 5 6.
Move back by character with space and dot3. Read the current character with space and dots3 6. Read the next character with space and dot6.
Read back by word with space and dot2. Read the current word with space and dots2 5. Read the next word with space and dot5.
Space with dot1 or space with dot4 will read back and forward by sentence. Space with dots1 4 will read the current sentence.
To read back and forward by paragraph, use space with dots2 3 or space with dots5 6. Space with dots2 3 5 6 will read the current paragraph.
-
To be an efficient Braille reader, use the BrailleNote without speech. Use the thumb-keys and the Braille display. Practice the below commands as appropriate.
Use the back thumb-key to move back by one Braille display width. Use the advance thumb-key to move forward by one Braille display width.
To start the display moving automatically, press space with dots1 2 4 5 6. Press the previous thumb-key to slow down the speed of automatic reading. The next thumb-key will increase the rate of automatic reading.
To stop automatic reading, pres the previous and next thumb-keys at the same time.
For more thumb-key commands, visit the help menu from within a book.
-
Other commands you and your student can practice within a book are:
To go to the block commands menu, press space with b.
To move to another book, press space with dots1 2 5 6.
Read a book from within the book reader. Practice using the commands with your student that will be most useful to your given situation.
Subsection 2.14.2 Quiz
True or False:
Space + dots23456 will start the display moving automatically.
Space + dots36 will read the current line.
The previous thumb-key will slow the rate of automatic reading.
Space + e or space + dots123456 will return to the Main Menu.
Space + 123 will go to the end of a book.
Space + l will help you find the location of a text string.
Space + 4 will move forward by sentence.
Letter b from the Main Menu will open the book reader.
Space + n will go to the top of the file.
Space + dot3 will move forward by character.


class Covid : CliktCommand, KoinComponent, CoroutineScope
suspend fun main(args: Array<String>): Unit


@(Ordered products)
@(IMPORTANT:)
@(count of products in stock is not affected by change of count of ordered products)
@(Add a new item)
@(Summarize:)
...
@(Delivery address)
@(Delivery address is same as billing address)
@(First name)
@(Last name)
@(Phone number)
@(Street)
@(City)
@(ZIP)
@(Country)
@(Sent)
@(Finished)
@(Canceled)
@(Onhold)
@(Order status)
@(Internal note)
@(Processed and closed)
@(Paid)
@(Send email to customer about the order status)
@(Delivery)
@(Payment)
@(Tracking code)
@(Custom number)
@(Discount %)
@(Information only)
@(A custom message for the customer)
@(Contact information)
@(First name)
@(Last name)
@(Email address)
@(Phone number)
@(Billing to company)
@(Company)
@(Company ID)
@(VAT number)
@(Billing address)
@(Street)
@(City)
@(ZIP)
@(Country)
@(Pick Up at Store)
@(City name)
@(State name)
@(Mobile Number)
@(Address)
@(State name)
@(Pincode)
@(Cancel)
@(SAVE)


pragma solidity ^0.4.24;
import "zos-lib/contracts/Initializable.sol";
import "../../math/SafeMath.sol";
import "../Crowdsale.sol";
import "../../access/roles/CapperRole.sol";
/**
* @title IndividuallyCappedCrowdsale
* @dev Crowdsale with per-beneficiary caps.
*/
contract IndividuallyCappedCrowdsale is Initializable, Crowdsale, CapperRole {
using SafeMath for uint256;
mapping(address => uint256) private _contributions;
mapping(address => uint256) private _caps;
function initialize(address sender) public initializer {
assert(Crowdsale._hasBeenInitialized());
CapperRole.initialize(sender);
}
/**
* @dev Sets a specific beneficiary's maximum contribution.
* @param beneficiary Address to be capped
* @param cap Wei limit for individual contribution
*/
function setCap(address beneficiary, uint256 cap) external onlyCapper {
_caps[beneficiary] = cap;
}
/**
* @dev Returns the cap of a specific beneficiary.
* @param beneficiary Address whose cap is to be checked
* @return Current cap for individual beneficiary
*/
function getCap(address beneficiary) public view returns (uint256) {
return _caps[beneficiary];
}
/**
* @dev Returns the amount contributed so far by a specific beneficiary.
* @param beneficiary Address of contributor
* @return Beneficiary contribution so far
*/
function getContribution(address beneficiary)
public view returns (uint256)
{
return _contributions[beneficiary];
}
/**
* @dev Extend parent behavior requiring purchase to respect the beneficiary's funding cap.
* @param beneficiary Token purchaser
* @param weiAmount Amount of wei contributed
*/
function _preValidatePurchase(
address beneficiary,
uint256 weiAmount
)
internal
{
super._preValidatePurchase(beneficiary, weiAmount);
require(
_contributions[beneficiary].add(weiAmount) <= _caps[beneficiary]);
}
/**
* @dev Extend parent behavior to update beneficiary contributions
* @param beneficiary Token purchaser
* @param weiAmount Amount of wei contributed
*/
function _updatePurchasingState(
address beneficiary,
uint256 weiAmount
)
internal
{
super._updatePurchasingState(beneficiary, weiAmount);
_contributions[beneficiary] = _contributions[beneficiary].add(
weiAmount);
}
uint256[50] private ______gap;
}
|


---
layout: resume
title:
date: 2015-01-11 22:20:00
cover: cover.jpg
description: My name is Molly Huerster and I'm a software developer living in San Francisco. I mostly code in Ruby on Rails, with a little mobile stuff. When I'm not coding, I'm probably reading or cooking or exploring San Francisco. You might know me a Mary Huerster (especially if you've emailed me!).
---
View as PDF
| Programming Languages |
Frameworks and Libraries |
Skills |
| Ruby |
Rails |
Agile Development |
| JavaScript |
jQuery |
TDD and BDD |
| HTML5 |
RSpec and Minitest |
Object-Oriented Design |
| CSS3 |
Jasmine |
RESTful Architecture |
| Objective-C |
Capybara |
MVC Pattern |
|
|
AJAX |
Hike Labs
San Francisco, CA
October 2014 - March 2015
- Maintained and developed REST API (Rails)
- Added features to mobile front end (Objective-C)
- Created a Google Chrome extension (JavaScript)
- Worked with Twitter and Facebook API's
TripsWare (Provider of web-based expense reporting software)
Thornwood, NY
2013-2014
- Created and maintained system-wide user manual
- Beta-tested new features for bugs and user experience
- Provided support to system users
- Wrapper gem for the HipsterIpsum API. Generates 1-100 paragrahs of hipster-themed filler text.
- Over 375 downloads as of March 2015
- Technologies: HTTP, REST architecture
- iOS app for public bikeshare users
- Technologies: Objective-C, Kiwi, Google Maps API, Google Places API
- Submission to App Store pending
2014 - present
- TA at workshops teaching Rails to groups underrepresented in tech (primarily women)
Lexington, VA
Class of 2013
- Bachelor of Arts: Classics, Politics
- GPA 3.554
- Full tuition academic scholarship


| I l@ve RuBoard |
Connection objects should respond to the following methods:
Closes the connection now (rather than whenever __del_ _ is called). The connection is unusable from this point forward; an Error (or subclass) exception is raised if any operation is attempted with the connection. The same applies to all cursor objects trying to use the connection.
Commits any pending transaction to the database. Note that if the database supports an auto-commit feature, this must be initially off. An interface method may be provided to turn it back on.
Database modules that don't support transactions should implement this method with void functionality.
This method is optional since not all databases provide transaction support.3
In case a database does provide transactions, this method causes the database to roll back to the start of any pending transaction. Closing a connection without committing the changes first causes an implicit rollback to be performed.
Returns a new Cursor object using the connection. If the database doesn't provide a direct cursor concept, the module has to emulate cursors using other means to the extent needed by this specification.4
| I l@ve RuBoard |


Zydus Cadila gets US FDA approval for generic muscle relaxing injection
The approval is for single-dose vials of Cisatracurium Besylate Injection USP with strengths of 10 mg/5 ml and 200 mg/20 ml
by Press Trust of IndiaCadila Healthcare on Tuesday said group firm Zydus Cadila has received final approval from the US health regulator for its generic version of muscle relaxant Cisatracurium Besylate Injection given before general anaesthesia.
The approval by the US Food and Drug Administration is for single dose vials of Cisatracurium Besylate Injection USP with strengths of 10 mg/5 ml and 200 mg/20 ml.
This medication is used to relax the muscles. It works by blocking the signals between nerves and muscles and is given before general anaesthesia in preparing for surgery, the company said in a regulatory filing.
The injection will be manufactured at Liva Pharmaceuticals, a wholly-owned subsidiary of Cadila, it added.
The group now has 275 approvals and has so far filed over 360 abbreviated new drug applications, since the commencement of the filing process in financial year 2003-04, it added.
Shares of Cadila Healthcare were trading at Rs 241.05 apiece, down 0.17 per cent on the BSE.


Redirecting to http://2016.ecoop.org/event/ecoop-2016-artifacts-higher-order-demand-driven-program-analysis


Will a Raspberry Pi with the non-SMD version of the RFM12Pi - i.e. the version with the DIL ATtiny84 in a socket; fit inside a standard Raspberry Pi enclosure ?
Are there any enclosures where this combination is known NOT to fit ?
Archived Forum |
|
Suitable case for Raspberry Pi & RFM12PiSubmitted by nothing clever on Fri, 10/05/2013 - 14:18Will a Raspberry Pi with the non-SMD version of the RFM12Pi - i.e. the version with the DIL ATtiny84 in a socket; fit inside a standard Raspberry Pi enclosure ? Are there any enclosures where this combination is known NOT to fit ?
» |
Re: Suitable case for Raspberry Pi & RFM12Pi
I have an RS Components case and it definitely won't fit in that with the ATiny in the socket. However I built my RFM12Pi with the ATiny soldered into the board and the ISP header mounted sideways, then it does fit - just!
Re: Suitable case for Raspberry Pi & RFM12Pi
I have ordered a standard pi case. But unfortunate RFM12 shield the Hight is too much to fit in the case and as usual with standard PI cases the SD card is outside.
I would be very much interested in a case for the PI, with the shield. Furthermore I am interested to cover my Antenna.
Anyone any sugestions/experiences?
Thank you very much AND: This Openenergymonitor community has done great work so far! Thank you very much.
Re: Suitable case for Raspberry Pi & RFM12Pi
Just have seen, that there is a brand new ready assembled RPi-emonbase RF shield. Here you can read:
"Lower profile to fit inside most Raspberry Pi enclosure"
But Antenna and a case covering also the SD card would be great.
Re: Suitable case for Raspberry Pi & RFM12Pi
I have found a taller box for the Raspberry Pi, designed to take the Pi-Face expansion board, so it's got more cut-outs than I'd need. It can be seen here ...http://cpc.farnell.com/camdenboss/cbrpf-blu/enclosure-high-impact-polystyrene/dp/SC12945?in_merch=New%20Products (Various colors).
Still looking for the ideal box, I am suprised no-one seems to do one.
Personally, I'd not want to enclose the antenna, I guess it all depends on how far the base is from the transmitters and how many walls it has to transmit thru etc.
I intend to install my emonTX in an ABS box this week. Will have to remove the jack sockets, and have chassis mount sockets instead, then fix to the wall near the consumer unit. I have replaced the antenna with a solid copper wire salvaged from some 2.5mm mains cable with a bead superglued to the top to help prevent poking my eye out ;-)
Mike
Re: Suitable case for Raspberry Pi & RFM12Pi
FWIW, I printed myself a Punnet case and it fits in. Pics on my profile. No need to say it is not IP68...
Re: Suitable case for Raspberry Pi & RFM12Pi
Yes, this is a known issue with the RFM12Pi V1. As Martin suggested fitting the ATtiny direct onto the board can help but this can be risky!
The new RFM12Pi V2 SMT should fit into most cases. Please post up your experiences, especially if you find a case it won't fit in!
http://shop.openenergymonitor.com/rfm12pi-v2-pre-assembled-raspberry-pi-expansion-board-433-mhz/
Re: Suitable case for Raspberry Pi & RFM12Pi
Hi,
Are there any known cases that would fit a raspberry pi (model B) in combination with RFM12PI V2 ?
kr
Jan.


WoodSolver
length of pieces
comma separated list of required piece lengths
Stock Lengths
comma separated list stock lengths offered by store
Settings
SOLVE


RevolutionUC Stats
Main website
Stats
(current)
Logout
Login
Email address
Submit
attending students
Levels of Attendees
Top 5 Majors


Video not supported
Enter your email below get on our mailing list and stay up to date.
ANALOG
DIGITAL
PHOTOGRAPHY
VIDEOGRAPHY
AERIAL
SOCIAL


The easiest way is to edit the HTML style or the HTML code directly.
However, those edits are overwritten the next time you compile the
Doconce document to HTML. The edits should therefore be automated
using doconce subst
(for regular expression editing) or doconce replace
(for plain text substitution editing) commands in the file where
you run doconce format html mydoc
. For example, say you want narrower
gray admonition boxes with a much thicker boundary. The .alert
style must then be changed, more precisely the border
and the width
specification:
doconce replace 'border:1px' 'border:11px' mydoc.html
doconce replace 'width: 75%;' 'width: 35%' mydoc.html
Another way to control the layout is to copy the style in the HTML
file into a .css
file, edit that file as you like, and provide the
file as part of the compilation using the --css=mystyle.css
flag.
The standard of way of completely controlling the HTML format is to
use an HTML template. The Doconce source is then the body of text
(leave out TITLE:
to get HTML without a header and footer). The
--html_template=filename
command-line option will then embed the
Doconce text in the specified template file, where you can use style
sheets and desired constructs in the header and footer. The template
can have "slots" for a title (%(title)s
), a date (%(date)s
), and
the main body of text (%(main)s
). For typesetting code, pygments
is used (if installed) and can be turned off by --no_pygments_html
(leaving code in gray boxes).
The easiest way is to get fancy layouts in HTML is to
use the sphinx
format and one its many themes.
Why do figures look ugly when using HTML templates?
The HTML header that Doconce generates contain special styles for
figure captions and the horizontal rule above figures. When using
templates these styles are not defined, resulting in a rule that
spans the width and a centered caption. Changing the appearance
of the rule and caption can either be done by inserting styles or
simply by automatic editing of the HTML code in a little shell script:
doconce replace '
' \
'
' mydoc.html
doconce replace '
' \
'
' mydoc.html
Debugging
Given a problem, extract a small portion of text surrounding the
problematic area and debug that small piece of text. Doconce does a
series of transformations of the text. The effect of each of these
transformation steps are dumped to a logfile, named
_doconce_debugging.log
, if the to doconce format
after the filename
is debug
. The logfile is inteded for the developers of Doconce, but
may still give some idea of what is wrong. The section "Basic Parsing
Ideas" explains how the Doconce text is transformed into a specific
format, and you need to know these steps to make use of the logfile.
Basic Parsing Ideas
The (parts of) files with computer code to be directly included in
the document are first copied into verbatim blocks.
All verbatim and TeX blocks are removed and stored elsewhere
to ensure that no formatting rules are not applied to these blocks.
The text is examined line by line for typesetting of lists, as well as
handling of blank lines and comment lines.
List parsing needs some awareness of the context.
Each line is interpreted by a regular expression
(?P<indent> *(?P<listtype>[*o-] )? *)(?P<keyword>[^:]+?:)?(?P<text>.*)\s?
That is, a possible indent (which we measure), an optional list
item identifier, optional space, optional words ended by colon,
and optional text. All lines are of this form. However, some
ordinary (non-list) lines may contain a colon, and then the keyword
and text group must be added to get the line contents. Otherwise,
the text group will be the line.
When lists are typeset, the text is examined for sections, paragraphs,
title, author, date, plus all the inline tags for emphasized, boldface,
and verbatim text. Plain subsitutions based on regular expressions
are used for this purpose.
The final step is to insert the code and TeX blocks again (these should
be untouched and are therefore left out of the previous parsing).
It is important to keep the Doconce format and parsing simple. When a
new format is needed and this format is not obtained by a simple edit
of the definition of existing formats, it might be better to convert
the document to reST and then to XML, parse the XML and
write out in the new format. When the Doconce format is not
sufficient to getting the layout you want, it is suggested to filter
the document to another, more complex format, say reST or
LaTeX, and work further on the document in this format.
Typesetting of Function Arguments, Return Values, and Variables
As part of comments (or doc strings) in computer code one often wishes
to explain what a function takes of arguments and what the return
values are. Similarly, it is desired to document class, instance, and
module variables. Such arguments/variables can be typeset as
description lists of the form listed below and placed at the end of
the doc string. Note that argument
, keyword argument
, return
,
instance variable
, class variable
, and module variable
are the
only legal keywords (descriptions) for the description list in this
context. If the output format is Epytext (Epydoc) or Sphinx, such lists of
arguments and variables are nicely formatted.
- argument x: x value (float),
which must be a positive number.
- keyword argument tolerance: tolerance (float) for stopping
the iterations.
- return: the root of the equation (float), if found, otherwise None.
- instance variable eta: surface elevation (array).
- class variable items: the total number of MyClass objects (int).
- module variable debug: True: debug mode is on; False: no debugging
(bool variable).
The result depends on the output format: all formats except Epytext
and Sphinx just typeset the list as a list with keywords.
- module variable x:
-
x value (float),
which must be a positive number.
- module variable tolerance:
-
tolerance (float) for stopping
the iterations.
References
Bibliography
- H. P. Langtangen and G. Pedersen.
Propagation of Large Destructive Waves,
International Journal of Applied Mechanics and Engineering,
7(1),
pp. 187-204,
2002.
- H. P. Langtangen, K.-A. Mardal and R. Winther.
Numerical Methods for Incompressible Viscous Flow,
Advances in Water Resources,
25,
pp. 1125-1146,
2002.
- H. P. Langtangen.
Numerical Solution of First Passage Problems in Random Vibrations,
SIAM Journal of Scientific and Statistical Computing,
15,
pp. 997-996,
1994.
- K.-A. Mardal, G. W. Zumbusch and H. P. Langtangen.
Software Tools for Multigrid Methods,
Advanced Topics in Computational Partial Differential Equations -- Numerical Methods and Diffpack Programming,
edited by H. P. Langtangen and A. Tveito,
Springer,
2003.
- H. P. Langtangen.
The FEMDEQS Program System,
Department of Mathematics, University of Oslo,
1989.