cookie-signature
Sign and unsign cookies.
Example
var cookie = require('cookie-signature');
var val = cookie.sign('hello', 'tobiiscool');
val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI');
var val = cookie.sign('hello', 'tobiiscool');
cookie.unsign(val, 'tobiiscool').should.equal('hello');
cookie.unsign(val, 'luna').should.be.false;
License
(The MIT License)
Copyright (c) 2012 LearnBoost<EMAIL_ADDRESS>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


{% load staticfiles %}
Can believe us, we get only your url and make a shortner and beautifull link
We store your url and our shrinked code, no more, no less.
No information like, date, ip, viewed times.
We believe in opensource and trasparency, all code is opensource on Github, you can read it, improve it, love it!
Yes! Squozy is developed with django, you can expand it and make your personal shrinker
Fork it on github, clone and start to implement your awesome feature!
Contact me at<EMAIL_ADDRESS>or better open an issue on github


Mobile Healthcare Unit for hard-to-reach underserved slums.
A program dedicated to improve mental health awareness in India
using “Tea” through Mood Meter and other unique exercises.
First Responders to Public Health Issues in Slums. We aim to
document and achieve a data-driven approach to support
healthcare in underserved areas.
A low-cost Community Health Center in Mumbai (400005).
Online platform to meet socially-motivated doctors who work
towards improving access to healthcare.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Provident
nesciunt reiciendis illum sint neque tempore, accusamus laborum
commodi distinctio? Distinctio totam maiores tenetur nihil voluptatum
alias harum quo tempore nostrum.


The positionable plugin allows you to position an element relative to another. It abstracts all of the calculating you might have to do when implementing UI widgets, such as tooltips and autocompletes.
Given the following markup:
Jupiter!

Jupiter JavaScript Consulting

To position the tooltip element above the anchor link, you would use the following code:
// Initialize the positionable plugin
$("#tooltip").mxui_layout_positionable({
my: "bottom",
at: "top",
of: $("#target")
});
// Trigger the move event on the tooltip to move it's position
$("#tooltip").trigger("move");
In the options passed to the positionable plugin, we're telling the plugin
to align the bottom of the #tooltip
element to the top of the
#target
element.
Given the following markup:
<form>

Search
<input type="text" name="search" />

</form>

You could easily implement an autocompleting search input using the following code:
// Position the autocomplete list below the search input
$("#autocomplete").mxui_layout_positionable({
my: "top left",
at: "bottom left",
of: $("#search")
});
// Autocomplete controller
$.Controller("Autocomplete", {
"keyup" : function( el, ev ) {
this.options.list.show();
$.ajax({
url : "/search.php",
data : el.val(),
success : this.callback("updateResults")
});
},
"blur" : function() {
this.options.list.hide();
},
"updateResults" : function( json ) {
this.options.list.html( "views/autocomplete-list.ejs", json );
},
"{list} li click" : function( el, ev ) {
this.blur();
this.element.val( el.text() );
}
});
// Initialize the autocomplete controller on the search element
$("#search").autocomplete({
list: $("#autocomplete")
});
Mxui.Layout.Positionable(options)
{Object}
Object literal describing how to position the current element against another.
my
{String} - String containing the edge of the positionable element to be
used in positioning. Possbile values are:at
{String} - String containing the edge of the target element to be
used in positioning.my
and at
options include:
"top"
"center"
"bottom"
"left"
"right"
"bottom left"
.of
{jQuery} - The target DOM element.collision
{String} - Collision strategy to be used in case the positionable
element does not fit in the window. Possible values include
fit
- Attempts to position the element as close as possible to
the target without clipping the positionable.flip
- Flips the element to the opposite side of the target.none
- Don't use any collision strategey.using
{Function} - function that recieves the calculated position
in the format of { top: x, left: y }
to handle the positioning. If a
using
parameter is passed, the element won't be positioned
automatically, but must be positioned by hand in the using
callback.This plugin is built on top of the jQuery UI Position Plugin, so you may refer to their documentation for more advanced usage.


Form Validation
We used the most trusted plugin for validation which is Jquery Validation plugin.
Please visite jquery Validation documentation to see all options and methods.
How to use Form Validation?
1. Add specific javascript
Add inside body
at the end of your page, before main template scripts:

2. Create your form
Add html markup for your form with form-validation
class. Here is a simple example:
<form role="form" class="form-validation">
 Firstname <input type="text" class="form-control" minlength="3" required>

 Lastname <input type="text" class="form-control" minlength="4" required>
 <button type="submit" class="btn btn-embossed btn-primary">Sign Up</button> </form>
3. That's it!
Plugin will automatically validate form that have form-validation
class.
We have added specific message, depending of your input data.
You just have to specify name of your input. For example, if you want first name, you will have this markup:
<input type="text" name="firstname" class="form-control" minlength="3" required>
Here we say that this field is required, we want a minimum of 3 characters and we want first name.
So, if input is empty, a speficic message will say: "Enter your first name"
.
You can of course change message or add new one by change element in formValidation() function in assets/js/plugins.js file.


|
Assimp
5.0.1, master @ cd42b955
|
Files | |
| file | ObjExporter.cpp |
| file | ObjExporter.h |
| Declares the exporter class to write a scene to a Collada file. | |
| file | ObjFileData.h |
| file | ObjFileImporter.cpp |
| file | ObjFileImporter.h |
| file | ObjFileMtlImporter.cpp |
| file | ObjFileMtlImporter.h |
| file | ObjFileParser.cpp |
| file | ObjFileParser.h |
| file | ObjTools.h |
| Some helpful templates for text parsing. | |


« CSS « CSS Reference
:after
creates a pseudo-element that is the last child of the element matched. Typically used to add cosmetic content to an element, by using the
content
CSS property. This element is inline by default.
element:after { style properties } /* CSS2 syntax */ element::after { style properties } /* CSS3 syntax */
The ::after
notation was introduced in CSS 3 in order to establish a discrimination between pseudo-classes and pseudo-elements. Browsers also accept the notation :after
introduced in CSS 2.
:after
notation only..boringtext:after { content: " Thank you for reading all this!"; font-size: small; color: red; background: gray; }
| Browser | Lowest Version | Support of |
|---|---|---|
| Internet Explorer | 8.0 | :after |
| Firefox (Gecko) | 1.0 (1.0) | :after |
| 1.0 (1.5) | :after | ::after | |
| Opera | 4.0 | :after |
| 7.0 | :after | ::after | |
| Safari (WebKit) | 1.0 (85) | :after | ::after |


Hi there! I am an aspiring data scientist with professional experience in business analytics and web development.
Performed analytics on customer data using key performance indicators to identify opportunities to increase profitability. Worked on Behavior Analysis, Trend Analysis, and Predictive Modeling using SAS Enterprise Miner to foresee high-risk scenarios and formulate mitigation stategies.
Using Tableau, prepared dashboards and stories for data visualization on open data provided by the US government. Developed and maintained a CMS website to showcase data visualization to academic personnels and end users.
Accomplished data transformation using a Business Intelligence ETL tool, Pentaho with the help of MySQL database system as an efficient way to load and manipulate data. Worked closely with key business stakeholders to create a data-driven solution to problems faced by users. Developed on improving user experience with the help of quality assurance department to ensure customer benefits through services. Supervised a team of two to develop and manage an interactive web app in PHP/MySQL to capture user data. Utilized open source tools to create cross-platform applications for all user groups. Designed a database model by studying business requirements of potential customers. This model was developed into a relational database which fed on information input by customers through a web-service. Customized an MIS to include company relevant KPIs and evaluation of 200 employees.
Designed a web-service using PHP and JSON to communicate between a mobile-application on Android and a Content Management System.
Designed an art-map on tuktuk (an Eco-friendly taxi) route in Kathmandu as a way to aesthetically represent popular sites of Kathmandu valley and direct people on unpopular but useful travel routes. Developed and maintained a crowd-sourcing platform to encourage people to share procedures to follow for government services in Nepal.
GPA: 3.9
GPA: 3.9


Product statement
Vumi Go is a toolkit that enables teams with technical proficiency to set up complex, integrated, messaging systems that operate at population scale.
-
Customer type
Individuals
Multi-national organizations
Vumi Go caters towards medium to large organizations and corporations.
-
End user type
Project manager
Developer
The users setting up campaigns in Vumi Go are either developers or technical project managers.
-
Technical ability
No tech experience
Lots of technical knowledge
Vumi Go users have some technical proficiency, having either written code before or writing code at present.
-
Touch
Sign up & tutorials
Account managers & tech support
Vumi Go customers are high touch. Their large campaigns require technical support and prompt responses to communications.
-
Product type
Plug & play
Customizable toolkit
Vumi Go offers a toolkit enabling setup and maintenance of complex, integrated, messaging systems that operate at population scale.
-
Campaign complexity
Single survey
Multiple connected parts
Vumi Go campaigns typically include multiple connected applications.
-
Product access
Open sign up
By request
Vumi Go offers access to a limited demo environment. Account upgrade is limited and by request.
-
Campaign size
100 messages/month
5 million messages/month
Vumi Go’s largest campaigns average 2.5 million messages a month.
-
Cost to access
$0
$5,000
Vumi Go offers a free limited demo account. Accounts then start at $2500/year.
-
Average monthly spend
$10
$10,000
Vumi Go campaigns average $1000/month


AWS::CloudWatch::CompositeAlarm
The AWS::CloudWatch::CompositeAlarm
type creates or updates a composite alarm. When you create
a composite alarm, you specify a rule expression for the alarm that takes into
account the alarm states of other alarms that you have created. The composite alarm goes into ALARM state
only if all conditions of the rule are met.
The alarms specified in a composite alarm's rule expression can include metric alarms and other composite alarms.
Using composite alarms can reduce alarm noise. You can create multiple metric alarms, and also create a composite alarm and set up alerts only for the composite alarm. For example, you could create a composite alarm that goes into ALARM state only when more than one of the underlying metric alarms are in ALARM state.
Currently, the only alarm actions that can be taken by composite alarms are notifying SNS topics.
When this operation creates an alarm, the alarm state is immediately set to INSUFFICIENT_DATA. The alarm is then evaluated and its state is set appropriately. Any actions associated with the new state are then executed. For a composite alarm, this initial time after creation is the only time that the alarm can be in INSUFFICIENT_DATA state.
When you update an existing alarm, its state is left unchanged, but the update completely overwrites the previous configuration of the alarm.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::CloudWatch::CompositeAlarm", "Properties" : { "ActionsEnabled" :
Boolean
, "ActionsSuppressor" :String
, "ActionsSuppressorExtensionPeriod" :Integer
, "ActionsSuppressorWaitPeriod" :Integer
, "AlarmActions" :[ String, ... ]
, "AlarmDescription" :String
, "AlarmName" :String
, "AlarmRule" :String
, "InsufficientDataActions" :[ String, ... ]
, "OKActions" :[ String, ... ]
} }
YAML
Type: AWS::CloudWatch::CompositeAlarm Properties: ActionsEnabled:
Boolean
ActionsSuppressor:String
ActionsSuppressorExtensionPeriod:Integer
ActionsSuppressorWaitPeriod:Integer
AlarmActions:- String
AlarmDescription:String
AlarmName:String
AlarmRule:String
InsufficientDataActions:- String
OKActions:- String
Properties
ActionsEnabled
-
Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. The default is TRUE.
Required: No
Type: Boolean
Update requires: No interruption
ActionsSuppressor
-
Actions will be suppressed if the suppressor alarm is in the
ALARM
state.ActionsSuppressor
can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.Required: No
Type: String
Update requires: No interruption
ActionsSuppressorExtensionPeriod
-
The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the
ALARM
state. After this time, the composite alarm performs its actions.Important ExtensionPeriod
is required only whenActionsSuppressor
is specified.Required: No
Type: Integer
Update requires: No interruption
ActionsSuppressorWaitPeriod
The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the
ALARM
state. After this time, the composite alarm performs its actions.Important WaitPeriod
is required only whenActionsSuppressor
is specified.Required: No
Type: Integer
Update requires: No interruption
AlarmActions
-
The actions to execute when this alarm transitions to the ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutCompositeAlarm in the Amazon CloudWatch API Reference.
Required: No
Type: List of String
Update requires: No interruption
AlarmDescription
-
The description for the composite alarm.
Required: No
Type: String
Update requires: No interruption
AlarmName
-
The name for the composite alarm. This name must be unique within your AWS account.
Required: No
Type: String
Update requires: Replacement
AlarmRule
-
An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. For each alarm that you reference, you designate a function that specifies whether that alarm needs to be in ALARM state, OK state, or INSUFFICIENT_DATA state. You can use operators (AND, OR and NOT) to combine multiple functions in a single expression. You can use parenthesis to logically group the functions in your expression.
You can use either alarm names or ARNs to reference the other alarms that are to be evaluated.
Functions can include the following:
-
ALARM("alarm-name or alarm-ARN") is TRUE if the named alarm is in ALARM state.
-
OK("alarm-name or alarm-ARN") is TRUE if the named alarm is in OK state.
-
INSUFFICIENT_DATA("alarm-name or alarm-ARN") is TRUE if the named alarm is in INSUFFICIENT_DATA state.
-
TRUE always evaluates to TRUE.
-
FALSE always evaluates to FALSE.
TRUE and FALSE are useful for testing a complex AlarmRule structure, and for testing your alarm actions.
For more information about
AlarmRule
syntax, see PutCompositeAlarm in the Amazon CloudWatch API Reference.Required: Yes
Type: String
Update requires: No interruption
-
InsufficientDataActions
-
The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutCompositeAlarm in the Amazon CloudWatch API Reference.
Required: No
Type: List of String
Update requires: No interruption
OKActions
-
The actions to execute when this alarm transitions to the OK state from any other state. Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutCompositeAlarm in the Amazon CloudWatch API Reference.
Required: No
Type: List of String
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the alarm name, such as MyCompositeAlarm
.
For more information about using the Ref
function, see Ref.
Fn::GetAtt
The Fn::GetAtt
intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt
intrinsic function, see Fn::GetAtt.
Examples
Composite alarm based on two metric alarms and another composite alarm
This example creates composite alarms named "HighResourceUsage" and "DeploymentInProgress", and also creates metrics alarms named "HighCPUUsage" and "HighMemoryUsage". "DeploymentInProgress" is an alarm that must be manually set to TRUE or FALSE. The "HighResourceUsage" alarm goes into ALARM state only if both "HighCPUUsage" and "HighMemoryUsage" are in ALARM state, and if "DeploymentInProgress" is FALSE. Only "HighResourceUsage" has the alarm action of notifying SNS. This reduces alarm noise, so that you are alerted only if both CPU usage and memory usage are high, and a deployment is not currently in progress.
JSON
"Resources": { "HighResourceUsage": { "Type": "AWS::CloudWatch::CompositeAlarm", "Properties": { "AlarmName": "HighResourceUsage", "AlarmRule": "(ALARM(HighCPUUsage) OR ALARM(HighMemoryUsage)) AND NOT ALARM(DeploymentInProgress)", "AlarmActions": "arn:aws:sns:us-west-2:123456789012:my-sns-topic", "AlarmDescription": "Indicates that the system resource usage is high while no known deployment is in progress" }, "DependsOn": [ "DeploymentInProgress", "HighCPUUsage", "HighMemoryUsage" ] }, "DeploymentInProgress": { "Type": "AWS::CloudWatch::CompositeAlarm", "Properties": { "AlarmName": "DeploymentInProgress", "AlarmRule": "FALSE", "AlarmDescription": "Manually updated to TRUE/FALSE to disable other alarms" } }, "HighCPUUsage": { "Type": "AWS::CloudWatch::Alarm", "Properties": { "AlarmDescription": "CPUusageishigh", "AlarmName": "HighCPUUsage", "ComparisonOperator": "GreaterThanThreshold", "EvaluationPeriods": 1, "MetricName": "CPUUsage", "Namespace": "CustomNamespace", "Period": 60, "Statistic": "Average", "Threshold": 70, "TreatMissingData": "notBreaching" } }, "HighMemoryUsage": { "Type": "AWS::CloudWatch::Alarm", "Properties": { "AlarmDescription": "Memoryusageishigh", "AlarmName": "HighMemoryUsage", "ComparisonOperator": "GreaterThanThreshold", "EvaluationPeriods": 1, "MetricName": "MemoryUsage", "Namespace": "CustomNamespace", "Period": 60, "Statistic": "Average", "Threshold": 65, "TreatMissingData": "breaching" } } }
YAML
Resources: HighResourceUsage: Type: AWS::CloudWatch::CompositeAlarm Properties: AlarmName: HighResourceUsage AlarmRule: (ALARM(HighCPUUsage) OR ALARM(HighMemoryUsage)) AND NOT ALARM(DeploymentInProgress) AlarmActions: arn:aws:sns:us-west-2:123456789012:my-sns-topic AlarmDescription: Indicates that the system resource usage is high while no known deployment is in progress DependsOn: - DeploymentInProgress - HighCPUUsage - HighMemoryUsage DeploymentInProgress: Type: AWS::CloudWatch::CompositeAlarm Properties: AlarmName: DeploymentInProgress AlarmRule: AlarmDescription: Manually updated to TRUE/FALSE to disable other alarms HighCPUUsage: Type: AWS::CloudWatch::Alarm Properties: AlarmDescription: CPU usage is high AlarmName: HighCPUUsage ComparisonOperator: GreaterThanThreshold EvaluationPeriods: 1 MetricName: CPUUsage Namespace: CustomNamespace Period: 60 Statistic: Average Threshold: 70 TreatMissingData: notBreaching HighMemoryUsage: Type: AWS::CloudWatch::Alarm Properties: AlarmDescription: Memory usage is high AlarmName: HighMemoryUsage ComparisonOperator: GreaterThanThreshold EvaluationPeriods: 1 MetricName: MemoryUsage Namespace: CustomNamespace Period: 60 Statistic: Average Threshold: 65 TreatMissingData: breaching


Well, it just so happens that this particular experience is still ongoing. Currently, I am eating vegetables, bread, and drinking lots of water. 6 hours ago was a very different story.
I had decided to stay up and watch tv and surf the net. Itís winter break, I have some papers to do, but I haven't done them. Well, I drank one cup of coffee and I finished off the soda that I had from subway. I think that if I hadn't had that sandwich...I would have been in much worse shape than I am now. Anyways, I went to go get another cup of coffee, some chips and salsa, and 4 pecan delights. I hustled those down and I didn't really feel anything. I had another cup of coffee when my dad got up at 4. It was crazy. Then I had another cup of coffee at 6am with my mom. Though I use sweet n low, it still doesn't calm down the caffeine that's in regular coffee.
So here I am, no sleep, junk food, coffee and soda. At 8 or 9, I started to get the shakes. I was shaking so much...my teeth were chattering. I almost felt as though I had to be cold because my teeth wouldn't stop chattering. I felt that I should take a bath...so I did, but it didn't help. I started freaking out thinking that I was going to die. So I got out of the bath and I was instructed by one of my friends to lie down and have lots of water.
Well this resulted in frequent visits to the bathroom. I had a terrible ache in my stomach and I tried to lay down...but I felt like I couldn't go to sleep otherwise, I wouldn't wake up. I was so alert of everything, even touching my arm was scary. I was so alert that I was paranoid. I started semi dozing off, but then I would snap out of it...it was almost like I was in a dream state and I knew I was, but I felt like if I snapped myself out of it, I wouldn't fall asleep and die.
I couldn't sit still so I would walk around the house...but, climbing the stairs was a chore and breathing even seemed to be a little more intensified. I would like to say that this is the first time that this has happened, but it's not. I just realized this sensativity to caffeine this past June. I thought it was stupid to blame it on the caffeine...but sure enough...each time I have it. I get achey and I go into panic/anxiety attacks.
This is it. I am done. I never want to experience this again, and the funny thing is that I used to drink caffeine all the time when I was younger...in my teens and such....and it never affected me. Maybe I never paid attention. But my body can't handle it anymore.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Let's test your knowledge on coffee and coffee brewing!
With supporting text below as a natural lead-in to additional content.


## Exceptions
* If something goes wrong, throw an exception.
* Use checked exceptions to force handling of certain errors.
## ~~Exceptions~~
* Invisible to the type system.
* Inflexible: Only one way to throw and catch an exception.
* Inefficient: Don't always need/want the stack trace.
## nulls
* Used when a value is undefined or not found.
## ~~nulls~~
> "My billion-dollar mistake." — Tony Hoare
* The NullPointerException landmine
* When can you pass null? When can't you? When do you get one back?
¯\\\_(ツ)_/¯
## Encode errors into types
* The type communicates what the user can expect.
* Error types provide combinators to separate main code from error-handling cleanly and efficiently.
## Benefits
* Always clear what you're passing in and what you're getting back.
* More powerful, concise tools for combining results.
* Compiler enforces that you handle errors appropriately.
* Can compose error types.
## Scala Standard Library
* `Option[A]`: "An `A`, which might not exist"
* `Try[A]`: "An `A` or an exception"
* `Either[E, A]`: "An `A` or an error `E`"
* `Future[A]`: "Eventually an `A`, or an exception"
## Option
* An `Option[A]` is either `None` or `Some[A]`.
* Useful for functions that need to return a "not found" response, or if the value of the function for that input is undefined.
* Handy for dealing with Java APIs that return `null`
## Option
```scala
// Converts nulls to None and non-nulls to Some
val oRecord = Option(javaService.getRecord(id))
oRecord match {
case Some(record) => Ok(record)
case None => NotFound
}
```
## Try
* A `Try[A]` is either a `Success[A]` or a `Failure`.
* `Failure` contain the exception that was thrown.
* Another handy tool for interacting with Java APIs
## Try
```scala
Try(doSomethingDangerous()) match {
case Success(record) => Ok(record)
case Failure(t) => InternalServerError(t.getMessage)
}
```
## Either
* An `Either[A, B]` is either `Left[A]` or `Right[B]`
* Like `Try`, but with an error of any type you want
* Left is the "error" value by convention
* Useful when you want to return the error of the first operation that failed in a sequence of operations
* If you can use it, Scalactic's `Or` type is better. (Stay tuned!)
## Either
```scala
getRecord(id) match {
case Right(record) => Ok(record)
case Left(error) => BadRequest(error)
}
```
## Future
* A `Future[A]` represents an "eventual" value.
* When a Future is complete, its value is a Try.
## Future
Unlike other types, you pretty much never unpack a `Future` yourself.
```scala
getRecord(id)
.map(record => Ok(record))
.recover {
case t => InternalServerError(t)
}
```
# Standard Combinators
## An Interlude
## Common Patterns
* "If it's not an error, I want to do something."
* "If it's not an error, I want to do something that might itself return an error."
* "I want to run some validation on a non-error and convert it into an error if it fails."
## Common Solutions
Given a type `M[A]`...
* `def map[B](f: A => B): M[B]`
* `def flatMap[B](f: A => M[B]): M[B]`
* `def filter(p: A => Boolean): M[A]`
## Example: Option#map
Transform a non-error value.
```scala
// Maybe get the record, maybe get nothing
val oRecord = getRecord(id) // def getRecord(): Option[Record]
// If we get the record, return it with a 200 OK, otherwise
// return a 404 NOT FOUND.
oRecord.map { record =>
Ok(record)
}.getOrElse(NotFound("No such record: $id"))
```
## Example: Option#flatMap
Combine the non-error value with another error value. (For example, chaining multiple
service calls.)
```scala
getRecord(id1).flatMap { record1 =>
getRecord(id2).map { record2 =>
Ok(Seq(record1, record2))
}
}.getOrElse(NotFound(s"No such records: $id1, $id2))
```
## Example: Option#filter
Convert non-errors to errors.
```scala
getRecord(id)
.filter(_.name == expectedName)
.map(Ok(_))
.getOrElse(
NotFound(s"Record $id did not have expected name $expectedName"))
```
(The semantics of filter will vary from type to type.)
## for-comprehensions
Using `map` and `flatMap` can result in deep nesting.
```scala
authenticateUser(credentials).flatMap { user =>
getRecord(id).flatMap { record =>
censorRecord(record).map { censoredRecord =>
Ok(censoredRecord)
}
}
}
```
## for-comprehensions
Scala provides some syntactic sugar to clean this up:
```scala
for {
user ← authenticateUser(credentials) // flatMap
record ← getRecord(id) // flatMap
censoredRecord ← censorRecord(record) // map
} yield Ok(censoredRecord)
```
## for-comprehensions
```
// as.foreach(a => f(a))
for (a ← as) { // no yield
f(a)
}
// as.map(a => f(a))
val bs =
for {
a ← as // One "generator" line
} yield f(a)
// as.flatMap(a => a.map(a2 => f(a2)))
val bs =
for {
a ← as // Multiple generator lines
a2 ← a // All but the last will be flatMap, last will be map
} yield f(a2)
```
## for-comprehensions
* Work on any type that provides the necessary method(s)
* No `yield` and any number of generators ⇒ `foreach`
* One "generator" line ⇒ `map`
* Multiple generator lines ⇒ `flatMap`, `flatMap`, ..., `map`
* Right-hand side of all generators must return the same type.
* All `Option[_]`, all `Future[_]`, etc.
* Contained type may change (`Option[A]` ⇒ `Option[B]`, etc.)
## for-comprehensions
Kitchen-sink example
```scala
for {
user ← authenticate(credentials)
record ← getRecord(id) if user.hasPermission(ViewRecords)
accessTime = DateTime.now()
censoredRecord ← censorRecordForUser(user, accessTime, record)
} yield {
logAccess(accessTime, user, record)
Ok(censoredRecord)
}
```
## Scalactic Or, One, and Every
### A Better Either
## Scalactic Or
### The Problem with Either
```scala
// Sample method definition
def foo(): Either[ErrorMessage, Foo]
for {
a ← foo().right // I am not repeating myself!
b ← bar(b).right // I am not repeating myself!
c ← baz(c).right // Oh god, I'm repeating myself.
} yield (a, b, c)
```
## Scalactic Or
* An `Or[A, E]` is either a `Good[A]` or `Bad[E]`.
* Odd feature of Scala: Can write "`Or[A, B]`" as "`A Or B`" (infix notation).
* "Left-biased": Can call `map` and friends directly without specifying you want to map over the "Good" case.
## Scalactic Or
```scala
// Sample method definition
// Very readable
def foo(): Foo Or ErrorMessage
// Less noise
for {
a ← foo()
b ← bar(b)
c ← bac(c)
} yield (a, b, c)
```
## Scalactic Or
Either only accumulates the first error:
```scala
val errorOrResult =
for {
a ← foo().right
b ← bar(b).right
c ← baz(c).right
} yield (a, b, c)
// Only logs the first error that occurred in the sequence.
errorOrResult.left.foreach { e =>
log.error(e)
}
```
## Scalactic Or
```scala
import org.scalactic.Accumulation._
// Declare methods to return One[ErrorMessage]
def validName(name: String): Name Or One[ErrorMessage]
def validAge(age: Int): Age Or One[ErrorMessage]
// Use one of the Accumulation combinators:
val personOrErrors: Person Or Every[ErrorMessage] =
withGood(validName(name), validAge(age)) { (name, age) =>
Person(name, age)
}
personOrErrors.badMap { errors =>
errors.foreach { error =>
log.error(error)
}
}
```
## Best Practices: Option
* Only use `Option` for "no such value" or "undefined" use-cases, or for wrapping Java APIs.
* If there's an error message, you should return it.
* Avoid using `Option#get`
* `NoSuchElementException` is no better than an NPE.
* Use combinators, `match`, and `getOrElse` instead.
## Best Practices: Try
* Use `Try` when dealing with APIs that throw exceptions, but convert the result to other error types for your own API.
## Best Practices: Either/Or
* If you can, use `Or`.
* Be consistent and use one or the other throughout the project.
* Develop a common type to use for the `Left`/`Bad` case to use throughout the project for easier composition of `Either`s/`Or`s.
## Best Practices: Future
* Reserve failing the Future for lower-level errors, like connectivity errors.
* Compose with other types for business-level errors.
## Best Practices: Error Composition
* Compose these types in the order you'll likely process them.
1. Exceptions: Future, Try
2. Errors: Or, Either
3. "Null-ness": Option
* 👍: `Future[Option[Person] Or ErrorMessage]`
* Handles async code, then errors, then the actual Person.
* 👎: `Option[Future[Person]]`
* Can't compose with other async code without first unwrapping the Future.
## Best Practices: Exceptions
* Per project: Decide what should be an exception and what should not.
* Exceptions can be useful for low-level errors.
* Enforce consistent usage.
* Generally prefer using the other error types instead.


com.foo.ClassInComFoo.property
public var property:String
This is docs for public property of class in com.foo package
The default value is "abcde".
"abcde"


Blockchain and the United Nations
The organizations are listed roughly in order of when they got involved with blockchain.
I’m sure to have missed a few things. Please leave an issue, pull request, or contact me if there’s anything you’d like included.
Off the top of my head: Bitcoin, Ethereum, Stellar and IOTA have worked w UN. Eventually each may have its own section, as well.
Check out this collection’s companion article:
Early History
- 2010, the UN Commission on Science and Technology for Development [CSTD] proposed the introduction of a technology-driven universal currency.
UN Human Rights Council
—Encryption is Free Speech
- 5/15 — Promotion and protection of all human rights, civil, political, economic, social and cultural rights, including the right to development.
- 6/15 — news.bitcoin.com - Bitcoin and Encryption are Protected by Freedom of Speech
May 22, 2015 was a special day in the tug-of-war of Between government, Bitcoin, and other encryption-related issues. On that day, the United Nations issued a report declaring encryption as a form of free speech.
- 12/15 — THE DARK NET: POLICING THE INTERNET’S UNDERWORLD
- UN Human Rights Council
Agenda for Sustainable Development
- 9/15 — Transforming our World: the 2030 Agenda for Sustainable Development.
- 17 Sustainable Development Goals(SDGs) with 169 specific points between them.
- “to achieving sustainable development in its three dimensions – economic, social and environmental – in a balanced and integrated manner.”
- Prominently among the agenda’s goals is providing identification to the world, by 2030.
While the Agenda doesn’t explicitly mention the words blockchain or distributed ledger, the SDGs have been at the heart of the UN’s interest in blockchain.
- 11/18 — IBM’s contributions towards achieving the United Nations Sustainable Development Goals
- BLOCKCHAIN FOR SUSTAINABLE DEVELOPMENT GOALS — Report 2018
Bitnation
- 9/15 — Bitnation Registers First Refugees on the Blockchain
- In 2014, Bitnation became the world’s first Decentralized Borderless Voluntary Nation (DBVN) and hosted the first blockchain ID and Public Notary.
UNRISD Report
In February of 2016, the United Nations Research Institute for Social Development (UNRISD) published a report titled “How Can Cryptocurrency and Blockchain Technology Play a Role in Building Social and Solidarity Finance?” The report discusses how Bitcoin could empower those in developing nations:
- Bitcoin as a means to facilitate low-cost remittances for those seeking to transfer small amounts of money internationally.
- Bitcoin as a means for an otherwise excluded individual to have a decentralized global bank account, accessible simply by downloading an open source wallet from the internet, rather than having to set up with a formal financial institution.
- Bitcoin—or the technology that underpins it—subsequently providing the basis for a richer set of financial services.
ID2020 - UNHCR
-
ID2020 at the UN headquarters hosted reps from over 50 tech firms, including a number of blockchain firms, to discuss providing identification to global citizens who do not otherwise have access to any.
- ID2020 is a not-for-profit organization founded by Accenture, Gavi, Microsoft and the Rockefeller Foundation with the goal of developing a comprehensive identification solution and, aligned with the UN-SDGs, to “provide legal identity to all, including birth registration, by 2030.”
- 4/16 — Christopher Allen, part of the team putting together the first ID2020 Summit details the overarching history of internet idenitity standards in his seminal work (submitted to ID2020\RWoT workshop):
- The Path to Self-Soverereign Identity[ϟ] details the history of identity standards leading up to self-sovereign and details the 10 principles of self-sovereign identity.
- 5/16 — ID2020 to kick start digital identity summit at UN with PwC support.
- 5/16 — The second Rebooting the Web of Trust workshop ran in conjunction with the UN’s ID2020 Summit in New York.
1.1 Billion people live without an officially recognized identity — This lack of recognized identification deprives them of protection, access to services, and basic rights. ID2020 is a public-private partnership dedicated to solving the challenges of identity for these people through technology. - id2020.org
- Identity Crisis: Clear Identity through Correlation
- 6/16 — Microsoft Building Open Blockchain-Based Identity System With Blockstack, ConsenSys
- 10/16 — AID:Tech offers blockchain solutions to help United Nations and European Commission with refugee problems - [Aid:Tech]
- 10/17 — Bridging the identity divide – Is Portable User-Centric Identity Management the Answer?
- 12/18 — Using technology for good —Atefeh Riazi —Assistant Secretary-General and Chief Information Technology Officer.
- 4/18 — United Nations blockchain pioneer prevents fraud of international aid payments
- 6/18 Aid:Tech assisted in the first birth recorded on the blockchain, with two more only days later. Partnered with PharmAccess, Aid:tech brings charitable donations to pregnant women in Tanzania, uses blockchain records to ensure the women get proper pre-natal care; tracking the progress of their pregnancies.
UNDP
- @UNDP UN Development Programme Medium Blog
- 5/16 - Development 2.0: Innovating cash deliveries with the Bitcoin Blockchain
- 9/16 - UNDP Alternative Financing Lab - the next big thing is a lot of small things!
- The Alternative Finance (AltFin) Lab, via UNDP Istanbul Regional Hub for Europe and CIS, is exploring new financial technologies for achieving the Sustainable Development Goals (SDGs) and have worked with AIDTech, Blockchain.com, and Bitspark.
- 9/16 — United Nations Will Adopt Emercoin For Its Car Fleet Management Project - [EmerCoin]
- 9/16 — UN goes all in on blockchain, lists various initiatives
- 10/16 — The UNDP And Its Bitcoin And Blockchain Initiatives
- 10/16 — UNDP Develop Blockchain As Payment Instruments
- 2016 Annual Report — UNDP Innovation Facility — Innovation for the Sustainable Development Goals
- 4/17 — UN inspires on using blockchain – a technology that cannot be corrupted – at Moldova ICT Summit 2017
- 4/17 — Alternative Finance – and how to use it for development?
- 7/17 — Alternative Finance
- 1/18 — A fair deal for Ecuadorian cocoa farmers
- 3/18 — The Future is Decentralised - Blockchain.com
We recently partnered with volunteers from the UN Refugee Agency (UNHCR), the UN Development Programme (UNDP), and the World Economic Forum (WEF) to explore how block chain technology supports a vast array of sustainability, humanitarian, and environmental initiatives.
- This partnership produced a whitepaper: The Future is Decentralized, explaining blockchain, and how it’s being used within the UN.
- 6/18 — Blockchain links Serbian diaspora and their families back home with AID:Tech\Stripe - remittances from the Serbian diaspora to the Serbians back home.
- 7/18 — Realizing blockchain’s potential for social impact
- 9/18 — Sierra Leone to Develop Blockchain-Based ID Platform With UN Partnership
- 9/18 — UN Food Program to Expand Blockchain Testing to African Supply Chain
- 1/19 — Beyond Bitcoin
UNICEF
- 6/15 — UNICEF is using a new cryptocurrency to help impoverished kids
- 2/16 — UNICEF Innovation Fund Invites Blockchain Startups
- UNICEF Innovation Fund raised $9 million to invest in open source technologies for children.
- Funding innovators in developing countries to help them bring tested projects to a bigger market.
- Blockchain one of three key investment areas the innovation fund is targeting.
- 3/16 — UNICEF Seeks Developer for Innovation Projects including Blockchain’s Humanitarian Uses
- 3/16 — How mobile money is providing access to basic services to the most disadvantaged communities
- 7/16 — UNICEF Welcomes it’s Fourth Investor to the Innovation Fund.
- 11/16 — Trustlab – Connected Development : Building Amply, a web of trust for children
- 11/16 — Unicef is funding blockchain and health tech to solve the world’s biggest problems
- 2/17 — London Blockchain Week Shone With the Promise of Woodstock
- 10/17 — Introduction to the Ixo Protocol
- 12/17 — IXO Protocol - Whitepaper Draft
- 1/18 — Call for Application for UNICEF Innovation Investment Fund
- 5/18 — UNICEF’s First Blockchain Investment Amply Ensures South African Early Childhood Development Centres Get the Funding They Need — AMPly
- 9/18 — UNICEF France Accepts Donations in 9 Cryptocurrencies
- 12/18 — IXO-Cosmos
- 12/18 — UNICEF Invests In Six Emerging Market Blockchain Startups
UN Women
- 9/16 — SDGs Made with Code: Giving women and girls the power to change the world
- 9/16 — UN Women’s innovation and technology projects
- 10/16 — Empowering women farmers of Rwanda through mobile technology
- 3/17 — UN Women and Innovation Norway sign momentous partnership agreement to advance gender equality and women’s empowerment
- 7/17 — Oslo Hackathon explores new technology to empower women in humanitarian crisis
- 8/17 — UN Women and SAP collaborate to accelerate the advancement of women and girls in innovation, technology and entrepreneurship
- 2/18 — UN Women and partners to pilot blockchain technology in humanitarian action
- 4/18 — From where I stand: Using blockchain technology to empower women
- 9/18 — Press release: UN Women and WFP harness innovation for women’s economic empowerment in crisis situations
- 9/18 — Press release: UN Women’s Global Innovation Coalition for Change launches the Gender Innovation Principles
UNOPS
- 4/17 — Request for Information for Blockchain-based International Assistance
- 4/17 — ETHNews — United Nations Thinking Big About Blockchain
- 5/17 — UNOPS NY Office Happy Hour accepts Bitcoin for Drinks
- 9/17 — The UNOPS strategic plan, 2018-2021
- 3/18 — UNOPS and Mastercard to Work Together on Innovative Ways to Finance Humanitarian Operations
- 4/18 — ConsenSys Wins #Blockchain4Humanity Challenge for Designing Blockchain-Based Identification System to Help End Child Trafficking in Republic of Moldova
- 4/18 — UNOPS partners with the Dutch Government’s “Blockchain Pilots” to explore legal dimensions of distributed ledger technology
- 5/18 — UNOPS and IOTA collaborate to Bring Transparency and efficiency to UN
- 9/18 — Blockchain Symposium in NY on Sep 26, 2018 (1)
- 11/18 — UNOPS launches new global innovation centre in Sweden with support from Vinnova
- 2/19 — A Q&A with Yoshiyuki Yamamoto on UNOPS collaboration with IOTA
UN Blockchain Group
-
un-blockchain.org/tag/un-blockchain-group/
- 3/17 — Update on the UN Blockchain Group
- 3/17 — 5th UN Blockchain Meetup
- 6/17 — Early 2017, informal meetings among members of a number of UN organizations around blockchain, leads to the appointment of Yoshiyuki Yamamoto, UNOPS special advisor for UN engagement and blockchain technology, that July.
That collaborative continued to grow, as Yamamoto met with members of various UN agencies to explore the idea of uniting the organizations on a blockchain. Among the agencies working in the UN blockchain group are the WFP, UNDP, UNICEF, UN Women, the UN High Commissioner for Refugees (UNHCR) and the UN Development Group (UNDG).
WIN - World Identity Network
- 7/17 — World Identity Network launched on Sir Richard Branson’s Necker Island this week), the UN Office for Project Services (UNOPS) and the UN Office of Information and Communications Technology (UN-OICT) announced a partnership to launch a pilot using blockchain to provide identification to children at risk for child trafficking.
- 11/17 — World Identity Network - United Nations - Pilot to Prevent Child Trafficking
- 11/17 — Blockchain for Humanity – Global Challenge
Proper identification is at the core of every effort to combat human trafficking.
UNODC
- 5/17 — UNODC launches training to tackle cryptocurrency-enabled Organized Crime
- 11/17 — Training on Investigation of Money Laundering with Cryptocurrencies and Money Transfer Systems and Electronic Money
- 11/17 — Corruption and Economic Crime in Cyberspace
- 4/18 — Workshop on Darknet and Cryptocurrency Investigations
- 11/18 — Embracing digitalization: how can anti-corruption agencies in ASEAN apply innovative tools in the fight against corruption?
- 12/18 — UN Partnership to Roll Out Blockchain-Based Telemedicine, Telepsychology in East Africa
The United Nations Office on Drugs and Crime (UNODC) will reportedly partner with blockchain-based telemedicine and telepsychology firm doc.com to expand free basic healthcare services across Eastern Africa. News of the partnership was shared with Cointelegraph in an email on Dec. 26.
WFP - World Food Programme
- Blockchain for Zero Hunger - Building Blocks
- 1/17 — Blockchain ‘Crypto’ Assistance at WFP
- 3/17 World Food Programme hails blockchain test a success
- 4/17 — What is ‘blockchain’ and how is it connected to fighting hunger?
- 4/17 — The UN Wants to Adopt Bitcoin And Ethereum – And Soon
- 5/17 — Building Blocks – How the World Food Programme is harnessing Blockchain technology to deliver humanitarian assistance
- 5/17 — Blockchain Against Hunger: Harnessing Technology In Support Of Syrian Refugees
- 6/17 — United Nations World Food Programme Uses Ethereum to Aid Syrian Refugees
- 4/18 — Devery & United Nations World Food Programme use Blockchain to ensure the safe delivery of food to children in North Africa
- 5/18 — United Nations Expanding Blockchain Use to Help Syrian Refugees
UN Office of Information and Communications Technology (ITE)
- 8/17 — Usage of Blockchain in the UN System A DESK REVIEW, August 2017
- 2/19 — BLOCKCHAIN: What is it? Potential Applications Beyond Cryptocurrencies.—[Presentation]
- 4/18 — Blockchain & Cryptocurrencies. What are they? Potential Applications for the United Nations @ TechNovation UNITAR
- 6/18 — BLOCKCHAIN –WHAT DOES IT MEAN FOR THE UN?
BFI - Blockchain for Impact
- 9/17 — Blockchain Commission & Blockchain for Impact Launched at UN to Advance the Sustainable Development Goals
- The commission instated Blockchain for Impact (BFI), a collaborative for the co-creation, application, and promotion of blockchain for a positive social benefit.
- Among their projects are food distribution systems, and an Ethereum payment system. The commission will host a yearly BFI summit in locations around the globe.
- 6/18 — Inaugural Blockchain for Impact summit was held in NYC.
Commissioner Rostin Behnam of the US CFTC spoke at the summit, acknowledging that digital currencies are not going away, their use will spread to every country on the planet, and will be outside of traditional intermediaries, such as “government, banks, investors, ministries, or international organizations” adding, “perhaps we are witnessing a modern miracle.”
- (Part 1) Blockchain for Impact Global Summit
- Collaborations Announced from Blockchain for Impact Summit
Consensys - Blockchain for Social Impact
- 2/17 — The UN Needs Blockchain to Achieve Its Goals
- 9/17 — We are excited to announce that the Blockchain for Social Impact Coalition hackathon will be holding a month long Virtual Hackathon between September 7th, 2017 and October 7th, 2017
- 11/17 — Blockchain For Social Impact Hackathon — The Energy Bazaar Experience
- 12/17 — ConsenSys Teams up with Sustainability International to Effect Global Social Impact
- 4/18 — Let’s Learn Blockchain Blockchain 101
- 6/18 — A few days prior to the BFI summit, Consensys held its 2nd Blockchain for Social Impact conference, focused on agriculture, climate, and refugees, also in NYC.
- The Blockchain for Social Impact Coalition (BSIC) aims to leverage the Ethereum blockchain in support of the UN SDGs.
- 6/18 — Thoughts from the Blockchain for Social Impact Conference
Humanitarian Blockchain Summit
- 11/17 — Humanitarian Blockchain Summit
- Blockchain for the United Nations - humanitarian and other applications @ TechNovation Talks brought experts, scholars, and humanitarian practitioners together at the United Nations Headquarters; enlarging the discussion around using blockchain technology for pursuit of the Sustainable Development Goals.
- HUMANITARIAN BLOCKCHAIN SUMMIT AT FORDHAM UNIVERSITY
- 2/18 — Humanitarian Blockchain: Coding For A Humane, Sustainable World
- 11/18 — Second Humanitarian Summit to be at Forham
- 12/18 — Humanitarian Blockchain Summit
UN/CEFACT - Conference/Workshop on Blockchain
- 10/17 — Exploring the transformative potential of blockchain for sustainable development at the 30th UN/CEFACT Forum
- 4/18 — UN Centre for Trade Facilitation and E-Business (UN/CEFACT) UN/CEFACT Conference / Workshop on Blockchain to brainstorm on blockchain interoperability.
- PUBLIC REVIEW: BLOCKCHAIN WHITEPAPER on blockchain trade facilitation
- 6/18 — BitcoinNews.com - UN Publishes WhitePaper on Supply Chain, Blockchain Applications.
- 9/18 — Morpheus.Network CEO will be presenting at the United Nations (UN) Blockchain Conference in China!
UN Climate Chain Coalition
- 6/17 — How Blockchain Technology Could Boost Climate Action
- 11/17 — UN Climate Conference hosted a blockchain hackathon where developers worked to build demos and explore solutions for tracking carbon emissions, carbon pricing, distributed energy infrastructure, monitoring land use, and more.
- 1/18 — UN Supports Blockchain Technology for Climate Action the Climate Chain Coalition (CCC), composed of 25 organizations committed to the use of DLT for the benefit of the climate.
- 1/18 — UN Forms Blockchain Coalition to Fight Climate Change
UN Secretary General Antonio Guterres
UN Secretary-General António Guterres assembled a group of experts from technology, science, policy, and academia. Their focus is the impact of blockchain, AI, and other innovations on global economies and societies; with the aim of applying their benefits and protecting against unwanted consequences.
“Digital technologies make a significant contribution to the realisation of the Sustainable Development Goals and they cut uniquely across international boundaries. Therefore, cooperation across domains and across borders is critical to realizing the full social and economic potential of digital technologies as well as mitigating the risks that they pose and curtailing any unintended consequences.”
Blockchain Charity Foundation
- 7/18 — The Blockchain Charity Foundation, established by Binance, in collaboration with the President of Malta.
- Helen Hai, goodwill ambassador of UN Industrial Development Organization, was appointed to head the foundation and intends for it to contribute to the UNSDGS
“I am truly pleased that we have come to the signing of this Memorandum of Understanding with the Blockchain Charity Foundation. This foundation, the first of its kind in the world, will develop humanitarian projects to effectively address the United Nations Agenda 2030 and its Sustainable Development Goals. Through this agreement, The President’s Trust and the Blockchain Charity Foundation will develop socio-economic projects in Malta, to address social challenges. Moreover, Blockchain technology will be used to increase efficiency, transparency and to measure the social impact of the respective projects.” -President Coleiro Preca
- 10/18 — Blockchain … Malta . Joseph Muscat— Prime Minister . United Nations —Joseph Muscat, Prime Minister of the Republic of Malta, addresses the general debate of the 73rd Session of the General Assembly of the UN (New York, 25 September — 01 October 2018).
- Helen Hai, goodwill ambassador of UN Industrial Development Organization, was appointed to head the foundation and intends for it to contribute to the UNSDGS
ITU
-
news.itu.int/category/et/Blockchain/
ITU News is your source for how the latest information and communication technology (ICT) trends will impact sustainable development worldwide.
We are a service of ITU, the United Nations’ specialized agency for ICT.
- 3/17 — Framework of blockchain of things as decentralized service platform
- 10/18 — Distributed Ledger Technology: ITU to provide guidance to blockchain adopters
- 12/18 — Blockchain experts invited to highlight use cases to benefit from standards
Blockchains for Sustainable Development
- 10/24 at the EU-UN headquarters, the World Blockchain Organization brings leaders of blockchain industry, with heads of state and senior government officials to discuss Blockchains for Sustainable Development.
- Speakers: Changpeng “CZ” Zhao, of Binance; Louis de Bruin, Blockchain Leader Europe at IBM; Galia Benartzi, Co-Founder of Bancor and Ariana Fowler from Consensys Social Impact; along w NGO and UN leaders.
“This high-level gathering will offer a different level of discussion and networking than found on the crowded blockchain conference circuit,” states Professor Jem Bendell, who is assisting with the organization of the event. “With many claims made for and against this technology, alongside many Initial Coin Offerings, it is understandable that regulators, investors, and other stakeholders find it difficult to assess its potential. At this UN event, we aim to explore that potential by keepingp ublic benefit at the centre of our discussions.”
- Speakers: Changpeng “CZ” Zhao, of Binance; Louis de Bruin, Blockchain Leader Europe at IBM; Galia Benartzi, Co-Founder of Bancor and Ariana Fowler from Consensys Social Impact; along w NGO and UN leaders.
World Blockchain Association
“The World Blockchain Organization (WBO) is a Non-Governmental Organization (NGO) registered with United Nations Department of Economic and Social Affairs (UN DESA), an international advocacy organization dedicated to the promotion of responsible, sustainable and universally accessible blockchain technology.”
- International Information Development Organization joins hands with world blockchain organization to create a world blockchain
- World Blockchain Organization — United Nations Blockchain Foundation Endorses Opet Foundation Project Along with an Investment Worth ~1,000 ETH
Additional Resources
2016
- 10/16 — Bitcoin Magazine - “New UN Chief Can Tackle World Problems by Promoting Bitcoin”
- 12/16 — From Barcelona to Legambiente, 365 days of Helperbit - (World Humanitarian Summit)
2017
- 4/17 — UN, Alibaba’s Jack Ma forge startup assistance program with Estonia’s e-Residency
- 5/17 — UN Commission: Blockchain Can Help Struggling Banks in Latin America
- Economic Commission for Latin America and the Caribbean (ECLAC) — Prospects for blockchain-based settlement frameworks as a resolution to the threat of de-risking to Caribbean financial systems
- 5/17 — How Blockchain Could Finally Unite the United Nations
- 6/17 — Bitcoin, Blockchain Payments Startups Win RemTECH Awards at United Nations
- 8/17 — 11 Blockchain Startups in Alignment with United Nations SDGS
- 11/17 — Bitfury Group Presents Georgia Land-Titling Project at Harvard, United Nations
- 12/17 — 10 Great Examples Of How The UN Is Using Blockchain Technology For Social Good
2018
- 7/18 — What I learned from my day at the United Nations
- 8/18 — Programming a Sustainable World
- 9/18 — Global Blockchain Conference (GBCC) was held at the United Nations Headquarters,NY.
-I can’t find any more info on this lmk if you have any resources (video\article) on this, was supposed to have a buncha big names in crypto. - 9/18 — United Nations Invites Earth Ledger to Present Its Blockchain Solution to Climate Change
- 12/18 — Blockchain experts invited to highlight use cases to benefit from standards
2019
Edit this page
Social Share
Twitter Facebook LinkedIn RedditTips Welcome
Feel free to contact me if you're interested in Bitcoin related content / research!
| Bitcoin | DOGE |
|---|---|
| 1A1DZfw4VgpHCgnMjnmfDnMjddKf8xdYbd | DQKkzfJjqnXUD8Z7C3e84vKzvghPe9dXSa |


{% extends 'core/base.html' %} {% block title %} {{page_title}} {% endblock %} {% block extra_css %} {% endblock %} {% block content %}
{{ category_slug|upper }}
Oops! no results to display
But this is not it, you can add more GitHub Gist by yourself.


Before Change
roi_mask,
weightmaps_to_sample_per_cat,
augm_img_prms)
time_augm_1 = time.time()
log.print3(id_str+" Time spent augmenting at image level: " + str(time_augm_1-time_augm_0) )
// Sampling of segments (sub-volumes) from an image.
dims_of_scan = channels[0].shape
After Change
roi_mask,
weightmaps_to_sample_per_cat,
augm_img_prms)
time_augm_img = time.time()-time_augm_0
// Sampling of segments (sub-volumes) from an image.
dims_of_scan = channels[0].shape
sampling_maps_per_cat = sampling_type.logicDecidingSamplingMapsPerCategory(
weightmaps_to_sample_per_cat,
gt_lbl_img,
roi_mask,
dims_of_scan)
str_samples_per_cat = " Got samples per category: "
for cat_i in range( sampling_type.getNumberOfCategoriesToSample() ) :
cat_string = sampling_type.getStringsPerCategoryToSample()[cat_i]
n_samples_for_cat = n_samples_per_cat_per_subj[cat_i][job_i]
sampling_map = sampling_maps_per_cat[cat_i]
// Check if the weight map is fully-zeros. In this case, don"t call the sampling function, just continue.
// Note that this way, the data loaded on GPU will not be as much as I initially wanted. Thus calculate number-of-batches from this actual number of extracted segments.
if np.sum(sampling_map>0) == 0 :
log.print3(id_str+" WARN: Sampling mask/map was found just zeros! No [" + cat_string + "] samples for this subject!")
continue
coords_of_samples = sample_coords_of_segments(log,
job_i,
n_samples_for_cat,
dims_highres_segment,
dims_of_scan,
sampling_map)
str_samples_per_cat += "[" + cat_string + ": " + str(len(coords_of_samples[0][0])) + "/" + str(n_samples_for_cat) + "] "
// Use the just sampled coordinates of slices to actually extract the segments (data) from the subject"s images.
for image_part_i in range(len(coords_of_samples[0][0])) :
coord_center = coords_of_samples[0][:,image_part_i]
(channs_of_sample_per_path,
lbls_predicted_part_of_sample // used to be gtLabelsForThisImagePart, before extracting only for the central voxels.
) = extractSegmentGivenSliceCoords(train_or_val,
cnn3d,
coord_center,
channels,
gt_lbl_img)
// Augmentation of segments
(channs_of_sample_per_path,
lbls_predicted_part_of_sample) = augment_patch(channs_of_sample_per_path,
lbls_predicted_part_of_sample,
augm_patch_prms)
for pathway_i in range(cnn3d.getNumPathwaysThatRequireInput()) :
channs_of_samples_per_path[pathway_i].append( channs_of_sample_per_path[pathway_i] )
lbls_predicted_part_of_samples.append( lbls_predicted_part_of_sample )
log.print3(id_str + str_samples_per_cat + ". Seconds augmenting [Image: {0:.1f}".format(time_augm_img)+"]")
return (channs_of_samples_per_path, lbls_predicted_part_of_samples)


Dad: OPEN YOUR EYES!
Mom: [blink] OOH, A blindfold!
A mask without eye holes worn when a character is sleeping somewhere with too much light. Often they're seen on planes or trains; oddly enough, though, in fiction, they can appear in perfectly dark private bedrooms.
The Sleep Mask is used to give the audience clues about the personality of the person wearing one. It can signify:
- High "class"
- Vanity
- An effeminate nature
- A huge love for sleeping
- A strong dislike of having to sleep with lights on
- Having sleeping troubles
The third is more often used for a man, but can also be used for women. For example, a woman with a Tomboy personality during the day might for contrast wear a sleep mask at night, or one might be used to emphasize one character's girly nature in comparison with another female cast member. The fourth, fifth, and sixth examples are often used for those who either love to sleep or have a huge preference to how they sleep, or indicate that they have difficulty sleeping without the masks.
Tropes that may apply: Spoiled Sweet, Spoiled Brat or Rich Bitch. Often but not always worn by the villainess.
Bonus points if the mask has painted eyes.
Examples:
- One of Toyota's Corolla commercials featuring Hatsune Miku has her taking a nap in the said car while wearing a purple sleep mask.
- Chibiokami from Anpanman always has one on, mostly worn on his forehead, but he pulls it on during nighttime...not because he wants to or anything, but the fact that the full moon turns the cute wolf pup in to a rampaging monster with no recollections of who he truly is.
- Goku can be seen wearing one during the first end credits theme to Dragon Ball GT.
- The first time Sougo Okita is seen in Gintama, he's wearing one of these with eyes drawn on it, using it to sleep while he's supposed to be on duty. It's become iconic of his character.
- At least in Season One of the Hayate the Combat Butler anime, Hinagiku Katsura wears one of these on a plane ride. Not as a class symbol (even though her family is quite well off), not showing vanity (she's rather insecure), and not even as a girly trait (she's a tomboy who's still developing her girly side). It's because she's utterly terrified of heights. She's not even sleeping, she just uses the mask so she doesn't have to see how high up she is...along with being wrapped in a blanket with at least six seat belts strapping her down.
- Love Live!:
- When they are on the plane in the movie, Rin has one with a cat face design.
- In Love Live! Sunshine!!, Mari wears stickers with eyes printed on them to hide the fact that she's sleeping during meetings. In season 2, she even adds glasses with fake eyes on top of the stickers.
- One Piece: Admiral Aokiji wears one at all times, as he spends a good deal of his spare time sleeping.
- Revolutionary Girl Utena has one complete with eye decorations, worn by a pet monkey of all creatures.
- In Atlantis: The Lost Empire, Rourke's crew sleep with these on because Lt. Wilhelmina Packard Sleeps in the Nude and has a tendency to sleepwalk. We don't actually see this of course (thank goodness), rather, Sweet informs Milo of this when handing him a mask.
- Darla can be seen wearing one briefly◊ at the beginning of Cats Don't Dance Why yes, she is a Spoiled Brat...and a Rich Bitch...and the antagonist.
- Pirate Captain of The Pirates! In an Adventure with Scientists! wears one, that has skulls and crossbones over each eye.
- Charlotte from The Princess and the Frog.
- Piglet is wearing one when startled out of bed in the opening of Pooh's Heffalump Movie.
- Courtney Rawlinson wears one in American Psycho.
- Auntie Mame: Auntie Mame is wearing one when Patrick bursts into her room to show her his new toy airplane.
- Holly has one in Breakfast at Tiffany's.
- Albin wears one in the sequel to La Cage aux folles, La Cage aux folles 2.
 It has two eyes drawn on it and has plot repercussions as wearing it means she doesn't notice what antics Matilda is up to in her bedroom.
- In Overboard, the main character's mother is wearing one of these when the yacht is turned around in the middle of the night.
- Claus von Bulow wears one (and maybe earplugs, too) in Reversal of Fortune.
- In 13 Going on 30, Adult Jenna wears one the first time we see her.
- Worn by Lucille Princesse on Arrested Development
- In The Big Bang Theory, Sheldon wears one in a hotel room (episode "The Love Car Displacement").
- Marie Schrader wears one in Breaking Bad.
- In the Broad City episode "Burning Bridges," Bevers advises Abbi on what to wear during a date. She has him wear a sleep mask while she changes.
- M*A*S*H:
- Charles Emerson Winchester wears one to bed; it's not an unreasonable thing considering the Officer's Tent's flaps are usually up in warm weather and wounded could come any time so they have to get sleep anytime they can off duty.
- In the early episodes, Col. Blake was often shown wearing one while he slept.
- Phil from Modern Family sleeps with one, which his wife loves to make fun of.
Phil: Or maybe he's photosensitive, which is a real medical condition!
- Reuben Kincaid wears one in a number of episodes of The Partridge Family.
- In The Sentinel, Jim wears one, but he is probably justified as he has heightened senses and sometimes sleeps during the day when he's been out on stakeout.
- Fiona Gallagher, in ShamelessUS, wears one, with a very large "F*** OFF" written on it.
- Worn by Harry Kim in Star Trek: Voyager in the episode "The Cloud". He got into the habit of wearing one because his roommate at Starfleet Academy used to stay up all night studying. He also claims that it helps remind him of being in the womb, but Paris is skeptical of that assertion.
- London Tipton uses one of these in The Suite Life of Zack and Cody.
- The masks worn on What's My Line? for the mystery guest segment were actually these. In one installment of the 1955-1956 season, the final guest on one episode was the guy who manufactured the ones worn by the male panelists on the program.
- Chica and her friends on Sprout's The Chica Show wear sleep masks.
- There is a piece of Code Geass official merchandise that is one of these, with Lelouch's eyes (and bangs) on it.
- All the dolls of the Dead Tired line of Monster High.
- SleepyCaps is a line of plush toys dressed in sleepwear, including a hat and sleep mask. They are designed that you can fold both up when not in use and fold them down over the character's head and eyes when it's time for bed.
- Ryuji Sakamoto from Persona 5 was seen sleeping with one of these on in an anime cutscene that focused on his class trip to Hawaii. He gets bonus points for this because his sleep mask has painted eyes on it.
- The Master Suite Stuff Pack for The Sims 3 includes sleep masks for your Sims to wear, including a couple with eyes painted on them. Amusingly, Sims wont just wear them while sleeping - theyll wear them even when awake and walking about, so long as the outfit theyre wearing has a sleep mask selected as an accessory to it. Somehow, this doesnt impede their ability to navigate the world or do complex tasks like cooking and repairing. Perhaps theyre just relying on blind luck.
- Peacock from Skullgirls wears six of them over on her arms when she sleeps... but given that her real eyes were gouged out and she sees mostly out of the mechanical eyes on her artificial arms, it almost makes sense.
- After the pet system was introduced in Kingdom Hearts χ, a quest made this available as an accessory for your pet.
- Ruby from RWBY wears a wolf-themed one. Rather surprising since Weiss is the one that fits the character archetype.
- Phix of Wapsi Square wears one of these. It is less about representing an aspect of her character, and more about the fact that a sphinx with a sleep mask is hilarious.
- Barbie: A Fashion Fairytale shows a rare realistic use of it—in a plane. But, being Barbie, her mask is pink and her dog wears one too.
- Barbie in a Christmas Carol pictured above. Eden Starling is the Gender Flip version of Ebenezer Scrooge in a Charles's Dickens novel adaptation. So, instead of a greedy man, we have a self-centered lady. Not surprising the three Christmas spirits find her asleep with such a mask.
- On Beat Bugs, Katter wears one in "In My Life" while in her chrysalis, changing into a butterfly. Unlike a normal caterpillar changing into a butterfly, the chrysalis covers everything but her head, which is left outside of it.
- Jimmy from Ed, Edd n Eddy wears one, at least in the episode "A Glass of Warm Ed".
- Heloise on Jimmy Two-Shoes is often seen wearing one when she sleeps. It often has skull patterns on it.
- Dukey in the Johnny Test episode "Green Johnny" was seen wearing a pink sleep mask while sleeping despite the fact that he is a dog.
- Lilo & Stitch: The Series:
- Pleakley in the "Fibber" episode, was seen wearing a modified black colored one over his single eye. This does highlight his effeminate nature.
- Gantu was caught wearing a magenta-colored one in the "Mrs. Hasagawa's Cats" episode despite the fact that he is an alien who is brutal and manly.
- Leni from The Loud House wears one at night, in place of the sunglasses she wears as part of her regular outfit. Lola wears one, too.
- Rarity in My Little Pony: Friendship Is Magic is seen using one in "Sisterhooves Social" and "For Whom the Sweetie Belle Toils".
- On PB&J Otter, Walter Raccoon sometimes sleeps with one on, as he operates the recycling boat by night and therefore must sleep during the day.
- In the Prime Video animated version of Pete the Cat, Pete's father wears one at night.
- Linda wears one in Phineas and Ferb, but usually it's to keep her from seeing anything the boys might be up to at night.
- On The Simpsons, Marge's jerkass sisters Patty and Selma have been seen wearing these while sleeping, as has Reverend Lovejoy.
- Squidward from SpongeBob SquarePants wears one of these. It even gets set on fire while he is sleeping with it in one episode due to all night lights in SpongeBob's house illuminating through his window.
- Super Noobs: Zenblock is seen in multiple episodes wearing one in his sleep despite that fact that he is an alien with an aggressive and manly personality. His sleep mask is red colored with a yellow Z on it.
- Total Drama: Justin, a contestant on the show is seen wearing a blue colored one in several episodes of the "Action" season.
- Totally Spies!: Milan Stilton, (a Paris Hilton expy) in the episode "Evil Heiress Much?" wears one at night.
- Kick Buttowski's sassy rival Kendall Perkins.
- Top Cat who sleeps in a trash can as seen in the closing credits.


{% extends 'export_academy/accounts/base.html' %} {% block form %}
We’ve sent a code to your email address. Don’t forget to check your spam folder if you can’t see it.
Enter the code below to complete registration.
{% csrf_token %} {% for field in form.visible_fields %}


test
test
test
test
test
test
| Name | Phone | Company | |
|---|---|---|---|
| Ocean | (021) 8344 4150 |<EMAIL_ADDRESS>| Lorem LLC |
| Dolan | (016977) 3981 |<EMAIL_ADDRESS>| Suspendisse Sed Dolor Company |
| Jin | (0101) 702 0757 |<EMAIL_ADDRESS>| Aliquam Nec Enim Limited |
| Clementine | (016977) 4038 |<EMAIL_ADDRESS>| Quis Tristique Ac Associates |
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout
Quis Tristique
console.log("test"); console.log("test");
Name
Name
Name
Name
Subtitle
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
test
test
test
test
test
test
| Name | Phone | Company | |
|---|---|---|---|
| Ocean | (021) 8344 4150 |<EMAIL_ADDRESS>| Lorem LLC |
| Dolan | (016977) 3981 |<EMAIL_ADDRESS>| Suspendisse Sed Dolor Company |
| Jin | (0101) 702 0757 |<EMAIL_ADDRESS>| Aliquam Nec Enim Limited |
| Clementine | (016977) 4038 |<EMAIL_ADDRESS>| Quis Tristique Ac Associates |
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout
Quis Tristique
console.log("test"); console.log("test");
Name
Name
Name
Name
Subtitle
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.


WITNESS LIST State Recreational Resources Committee March 26, 1997-8:00A HB 2541 For: Johnston, Jerry (himself) Machen, Gary (himself) On: Sinclair, David (TPWD) HB 2624 For: Garrett, Tony (himself) Goolsby, Rep. Tony (Author of the bill) Kressin, Mary L. (Lake Canyon Yacht Club) Snider, Dean (TX Sailing Assoc.) Weberlein, Joanne (TX Sailing Assoc.) Yeager, Mark (himself) On: Kennedy, Boyd (TPWD) Robertson, James (TPWD) Registering, but not testifying: For: Edwards, Richard P. (himself) Harris, A.E. (Lake Canyon Yacht Club) McAbee, Mike (himself) Nutto, Jim (himself) Shelton, James (Sailors of Austin Yacht) Shull, Ray (himself)


Freexy
Home
Products
About
FAQ
Freexy.ml
Product link is under construction.
Thank you for coming here.


Detailed source documentation
This document provides getting started level documenation. Detailed source code level documentation is provided separately.High level requirements
Currently, our project works on Mac and Linux. Testing has been .dev oriented. - not professionally QA.d. Our development stations are:
Mac
Mac OS 10.7.1 and 10.7.2 (Lion) (64-bit systems) using both XCode 4.1 and XCode 4.2. On the Mac, we have had the most success running the plugin under Chrome (15.x) but we have had some success with Firefox in 32-bit mode. (The binaries are 32-bit binaries currently). Safari loads the plugin currently, but it doesn.t function.
We would love to get feedback from 10.6 (and 32/64-bit) users of Mac and if anyone gets Safari working etc.
Linux
For our Linux stations, we use Ubuntu 10.04 (64-bit) and 11.04 (32-bit).
Our testing of the plugin has been successful against Chrome (12.x and 14.x).
Our trials with Firefox (5.x) were functional on 32-bit ubuntu but spotty at best on 64-bit. It also appears the release version of the monster monolithic libWebRTC.a file has better results than the _Debug version for some reason but no formal investigation has been started here.
Anyone running different flavors of Linux and/or getting Firefox working - we would love to hear from you.
Windows - not yet
Currently we do not support Windows, but we do not see any major impediments to doing so. It was a matter of focus and time for this initial release. The scripts are all sh and bash based and so Windows would need to replicate similar in .bat files or other (ruby / python?). FireBreath supports Windows and WebRTC certainly builds on Windows and in most cases more easily than on Mac.
Getting Started
There are 2 main requirements tools-wise for setup of WebRTC, FireBreath, and our additions. The first is 'git'. If you type 'which git' a the command line and get a response with a path to the tool, you're likely just fine. If not, please go to http://www.git-scm.org and download the sources or a binary package and install. In most cases for linux, you can 'sudo apt-get install git' to accomplish this.
The second requirement is for some tools utilized by Chromium project in building. The tool 'gclient' is the key item. If you do not have gclient, you may go to the page which describes installation of the tool at https://sites.google.com/a/chromium.org/dev/developers/how-tos/install-depot-tools which basically tells you to svn co http://src.chromium.org/svn/trunk/tools/depot_tools followed by making sure you add 'depot_tools' to your PATH. The prep* scripts do indeed self-check that git and gclient are available and will error out / exit if they are not present.
After cloning the git repository, there are a number of items which need to be prepared for initial use. Webrtc can be a difficult build procedure and so we've tried to automate this as much as possible.
./prep_WebRTC.sh -- this is the main script which will kick off all further processing to get an initial set of compiled binaries in both Debug and Release modes. It will (when successful) get a 'blessed' version of WebRTC, patch it as necessary, and then build the WebRTC libraries necessary to support cmdline_audio_peer, peerconnection_server, and WebRTC. It will then create a monolithic library named 'libWebRTC.a' and 'libWebRTC.a' in the output directories. These libraries can significanly ease the use of WebRTC by developers wishing to use the 'guts' programmatically rather than from a browser. At the end of prep_WebRTC.sh, you'll have the monolithic static libs along with the binaries for the above mentioned binaries. Lastly, this set of scripts calls rebuild_plugin.sh which will build the FireBreath based plugin for the project. See 'Giving it a try' for step by step instructions to validate your binaries are functional.
What the scripts are doing
prep_webrtc_<platform>.sh - called by prep_webrtc.sh - These scripts utilize the 'gclient' application (a Chromium tool_depot item) to obtain the appropriate sources from the webrtc svn repo. These scripts actually pull specific versions so that we ensure we are able to build. Developers who follow these instructions carefully are welcomed to check out newer versions so long as they understand how the third_party_mods/ process works after checkout.
Once a revision is sync'd with gclient, we have the webrtc repo in third_party/webrtc/trunk/. At this point, we actually copy our modification from third_party_mods/webrtc/ into (on top of) third_party/webrtc/. These mods are almost always required to support Mac/Darwin builds as the Linux builds tend to be fairly well behaved. Once these mods are put in place, libsrtp is config.d and built in prep for the rest of the build process.
At this point, 'rebuild_webrtc.sh' is called. This script is responsible for running the python script trunk/build/gyp_chromium which processes our .gyp file and produces either .xcodeproj projects in src/examples/cmdline_audio_peer/ on Mac or a Makefile in third_party/webrtc/trunk/ on Linux. The script then runs a 'clean' if the script was called with the argument 'clean'. It then kicks off a build of cmdline_audio_peer in both Debug and Release modes. This (due to gyp dependencies) will build all required webrtc libraries along with the desired output binary.
If the builds are successful, then the script .create_libwebrtc.sh. is called which will take the myriad of .a files in the Debug and Release directories and sum them up into a monolithic set of two files: libwebrtc_Release.a and libwebrtc_Debug.a. If you are a developer wishing to create a project but have it be NOT intertwined with the webrtc project itself, this is your key to freedom. Link against these libraries and you'll be much happier with your project.
Finally, at the end of the rebuild_webrtc.sh build, 4 .ls -lh. are done to show the resultant binaries (executable cmdline_audio_peer and libwebrtc_*.a) in both Release and Debug forms. Output is found in third_party/webrtc/trunk/out/[Debug|Release] on linux and on the Mac in third_party/webrtc/trunk/xcodebuild/[Debug|Release] .
Note that .rebuild_webrtc.sh. and .create_libwebrtc.sh. are intended to be ran separately after .prep_webrtc.sh. has been ran in case you are making changes to the base code and need a quick way to have a repeatable build process. This is why the scripts are not housed as a single file.
The final script which gets ran is .rebuild_plugin.sh., and this will populate the third_party/FireBreath submodule as well as its boost submodule and proceed to build both the support items in FireBreath as well as our particular plugin. In the end you'll have a plugin in src/js_api/build/bin/WebrtcPlugin/npWebrtcPlugin.so in linux and for the Mac the output is found in src/js_api/build/projects/WebrtcPlugin/Debug/WebrtcPlugin.plugin.
General notes
Due to the nature of both webrtc libraries and also FireBreath, as a developer, you need to be cognizant that your Makefiles and .xcodeproj files are not yours to modify as they are .output files. and not source files.
With regards to webrtc:
rebuild_webrtc.sh runs a python script in the beginning of this file. This script takes the input .gyp file(s) from src/example/cmdline_audio_peer/webrtc_projects.gyp and creates output files. In the case of linux, it creates third_party/webrtc/trunk/Makefile and for Mac it creates src/examples/cmdline_audio_peer/webrtc_projects.xcodeproj . It is perfectly legal to use XCode to load this project and do development in the IDE. However, be forewarned, if you make changes to your project settings, build settings, file inclusions, etc, these settings will be over-written the next time you run prep*.sh or rebuild_webrtc.sh. The same things applies to modifying the Makefile in linux but this tends to be less enticing to do than in an IDE.
So, if you wish to make project modifications, you need to do that in src/examples/cmdline_audio_peer/webrtc_projects.gyp for those items related to anything but the plugin project.
In the case of the plugin:
The plugin's Makefile and .xcodeproj file are created indirectly through cmake. The source file for this project is found in src/js_api/projects/WebrtcPlugin/[Mac|X11]/projectDef.cmake. The script third_party/FireBreath/prepmac_GoCast.sh is responsible for creating the .xcodeproj in src/js_api/build/FireBreath.xcodeproj. On linux, the script third_party/FireBreath/prepmake.sh is responsible for creating src/js_api/build/Makefile.
Again, it is perfectly legal to use the .xcodeproj file with XCode for interactive development.
Giving it a try at the command line
The cmdline_audio_peer application can be tested locally using your own server and it can be tested using our server as well. NOTE: Our server is a best-efforts up-time server. So, our IP and port will be given here, but if it doesn't work, run it locally and see whether the problem lies with the build locally or with our server.
Setting up the server locally
Trying locally:
Launch your local server:
(Linux): ./third_party/webrtc/trunk/out/Release/peerconnection_server
(Mac): ./third_party/webrtc/trunk/xcodebuild/Release/peerconnection_server
This should elicit .Server listening on port 8888.
Running the client
Not that this part could be skipped altogether if you simply wish to use the plugin and avoid the use of the command line altogether.
Using the client:
(Linux): ./third_party/webrtc/trunk/out/Release/cmdline_audio_peer --server=localhost:8888 --peername=use-your-own-name
(Mac): ./third_party/webrtc/trunk/xcodebuild/Release/cmdline_audio_peer --server=localhost:8888 --peername=use-your-own-name
If you wish to attempt to connect to our server, you may simply use "--server=<IP_ADDRESS>:8888" instead of the localhost.
Once the client is running, issue the command "signin" and you should see the output of:
Signing in...
Server: localhost
Port: 8888
Client: Sign in complete
If this occurs, you're in great shape. Once a second person runs the same command line (with a different peer name), you may issue a "call peer-name-to-call". This will create a connection for audio over the internet with that peer.
Note that calling is not limited to 2-way. You may issue additional "call next-name" many times to create multi-party calls. However, there is a non-intuitive notion behind 'call'. Call is creating a peer connection directly to the person you ask it to call. When it is a 2-way call, this is perfect. When a 3-way call happens, there's a need for an extra 'link' or 'call' to be created. And with 4-way calls, there are more yet again. As an example, consider we have peers named A, B, C, and D.
A calls B. No problem. 2-way call.
Now, with A+B in a call, A issues a call to C. At this point, A has a 3-way link with B and C.
HOWEVER, B does not have a link to C and therefore, there is a need for B to call C or for C to call B. This would establish the desired 3-way link.
With a 3-way call in progress, if we wish to fully add D into the conversation, each peer (A, B, C) would have to call D in order to have a full link-up -- or D would have to call A, B, and C -- either way. In each case, the peer connections must be setup individually.
Conversely, the .hangup. command is similar. If you have a 4-way call going, and you're 'A', you may wish to hang up in which case you need to 'hangup D', 'hangup C', and 'hangup B'. This would fully hangup as it destroys each peer connection individually. The nice effect here is that in the 4-way call, it is possible to simply drop one individual by hanging up on them alone.
While this is a bit confusing and may be non-intuitive, it was left this way to allow people to play with the notions of individual connections via 'call' and 'hangup'.
Running the Plug-in
The 'installation' of the plugin is quite simple. Once it is installed, make sure you've restarted your browser (so it picks up the new plugin) and load/open 'GoCast.html' file from src/GoCast.html. Please NOTE: The plugin will crash if loaded twice within a single browser instance.
Mac installation
Plug-ins must be installed in ~/Library/Internet Plug-Ins
If you're a developer, the best way to handle this is with a symbolic link back to where your favorite build-output is located. For example, if you intend to use the debug version of the plugin and want to avoid copying it at the end of each build:
cd ~/Library/Internet Plug-Ins
ln -s ~/<your-dev-location>/webrtc_plugin/third_party/src/js_api/build/projects/WebrtcPlugin/Debug/WebrtcPlugin.plugin
If you're wanting to simply use the resultant build, you may wish to use Finder to copy ~/<your-dev-location>/webrtc_plugin/third_party/src/js_api/build/projects/WebrtcPlugin/Release/WebrtcPlugin.plugin into ~/Library/Internet Plug-Ins Note: Finder many times will not show ~/Library in an effort to protect the innocent. Simply use the menu 'Go->Goto Folder...' to get to ~/Library/Internet Plug-Ins. or copy the plugin recursively from the command line.
Linux installation
Plug-ins are often installed in ~/.mozilla/plugins on linux. As in the Mac, this is generally best handled by a symbolic link if you build and develop in the same directory all the time.Using the plugin from HTML/Javascript
The best document for understanding how to use the plugin is the file src/GoCast.html . It is a relatively simple self-enclosed document which instantiates the plugin, allows for signin to a server, calling of individuals, coping with the callback when new users come online or leave, and doing call management as well. There are only 4 calls and one callback at this time:- Signin(myPeerName, serverName, port)
- Signout()
- Call(peerNameToCall)
- Hangup(peerToDisconnectFrom)


Edit Item
Loading Inventory
Please wait...
Loading...
Error
Oops!
Looks like something is broken.
Sorry about that.
Reason was:
unknown
Refresh
New
Locations
Type
Low
Current
Threshold
Updated


Apple intervenes and pulls third-party app made to stalk Instagram activity
by Michael PotuckBack in October, Instagram removed the ability to see other users’ likes and comments within the Activity tab. However, third-party apps such as Like Patrol continued to offer a way to stalk what others are doing on the social media service. Now Apple has pulled Like Patrol from the App Store.
Instagram first sent a cease-and-desist letter to the developers of Like Patrol back in October, informing them that the app was violating its terms and conditions based on how it uses scraping to collect public data.
However, Like Patrol chose not to remove its app based on Instagram’s request and the situation escalated to the point where Apple removed it from the App Store over the weekend (via CNET). Apple simply said that Like Patrol “violated its guidelines” while the developer didn’t respond to a request for comment from CNET.
Like Patrol “encouraged spying on loved ones and keeping constant surveillance on people’s social media activities.”
Further, Like Partrol’s founder called it Instagram’s old “Following Tab, on steroids.” The app ran up to $80/month and notably had less than 300 customers as of October.
The developer initially said that it planned on trying to appeal Instagram’s cease-and-desist request but it’s not clear now that Apple has entered the mix if Like Patrol will try and fight against both Apple and Instagram on this.
In other recent IG news, the company’s CEO announced that its test to remove like counts is expanding to the US this week.
More on Instagram:
- Instagram to start hiding like counts in the US as test expands next week to help users focus on content
- Instagram shutting down third-party app that tried to mimic the removed ‘Following’ tab
- Instagram adds new ‘Create’ mode for Stories with ‘On This Day’ and more
- Instagram for iOS makes it easier to manage third-party services linked to your account
- Instagram offering a clever, simple way to identify phishing scams
FTC: We use income earning auto affiliate links. More.


--- layout: post date: 2010-09-16 time: "09:00:00" authors: ["Greg Wilson"] title: "Survey: Help Needed" tags: ["Research"] ---
Dr. Roscoe Bartlett (Sandia National Laboratory), Dr. Jeffrey Carver (University of Alabama), and Dr. Lorin Hochstein (University of Southern California) are conducting a survey of software development practices among computational scientists. This survey seeks to understand current software development practices and identify areas of need. The goal is to produce a report on the status of scientific software development which can serve as the basis for future work in this area. The survey should take approximately 15 minutes to complete.
The survey can be found here, and has been approved by The University of Alabama IRB board.


|
Many vulnerabilities in today’s
software products are rehashes of past vulnerabilities. Such rehashes could
be a result of software complexity that masks inadvertent loopholes in
design and implementation, developer ignorance/disregard for security
issues, or use of software in contexts not anticipated for the original
specification. While weaknesses and exposures in code are vendor, language,
or environment specific, to understand them we need better descriptions that
identify their precise characteristics in an unambiguous representation. In
this project, we present a methodology to develop precise and accurate
descriptions of common software weaknesses through lightweight formal
modeling using Alloy. Natural language descriptions of software weaknesses
are based on the community developed Common Weakness Enumerations (CWE).
Gandhi, R.A., Siy, H., Yan, Wu,
"Lightweight formalisation of security weaknesses" Workshop on Formal
Methods in Software Engineering (FormaliSE): 25 May 2013, San Francisco
(USA), in conjunction with International Conference on Software Engineering.
2013. Preprint
Buffer overflow:
Constraints over a single
operation:
Alloy Specification for CWE
119
Alloy Specification for CWE
787
Alloy Specification
for CWE 121
Constraints over a series
of operations:
Alloy Specification for CWE
119
Alloy Specification for CWE
787
Alloy Specification
for CWE 121
Authentication
atttempts:
Constraints over a series
of operations:
Alloy Specification for CWE
799
Alloy Specification for CWE
307
OS command injection:
Constraints over a single
operation:
Alloy Specification for CWE
20 Alloy Specification for CWE
707
Alloy Specification for CWE
74 Alloy Specification for CWE
77
Alloy Specification for CWE 78
Alloy Analyzer download:
http://alloy.mit.edu/alloy/download.html
|


Mac
iPad
iPhone
Watch
TV
Music
Support
Let's get ready for christmas! Click the links for special offers.
Shop All Deals
Shop Phones
Save up to $300
Shop Watches
Up to 50% off
Shop Pear TV
Lifetime deals available


Get your State Pension
You can choose to claim or defer your State Pension if you're within 4 months and 4 days of State Pension age.
To do this you will need your:
- Unique reference number (on your pension activation letter)
- Surname
- Date of birth
- Bank account / building society account details


Hello! I'm Asrorbek.
I'm a sophomore student in IUT (Inha University in Tashkent).
I'm a sophomore student in IUT (Inha University in Tashkent).
I'm actually not a movies fan. But I can count some movies. I'd recommend them who has some interest in cyber security and hacking :)


Five stories you might have missed from the weekend
by NewstalkBritain's Prince Andrew says he was in pizza restaurant on night of alleged sex with teen
Britain's Prince Andrew has claimed that he was in a pizza restaurant on the night he is accused of having sex with a 17-year-old girl.

In an interview on the BBC's Newsnight programme last night, the royal denied allegations from Virginia Roberts-Giuffre who said she met him at a nightclub in London before they slept together in 2001.
Charity figures show rising number of children born into homelessness
Focus Ireland has revealed that 12% of children in families currently supported by the charity were born into homelessness.
According to the charity, of the 1,215 children in 580 families it supports in Dublin, 143 of these children were born into families who were homeless.
However, due to funding deficiencies, only 9% of the children in those families have access to a child support worker to help them cope with the problems associated with homelessness.
13-year-old girl critically injured after machete attack in Co Fermanagh
PSNI detectives have launched an attempted murder investigation after a group of men entered a house in Co Fermanagh armed with machetes.
Police were alerted at around 9.15pm last night that a number of men had entered the home at Trasna Way in Lisnaskea.
They forced their way in and attacked two of the occupants, a 41-year-old woman and a 13-year-old girl.
Two Dublin Bus routes to begin 24-hour services from next month
Two Dublin Bus routes are set to become 24-hour services from next month.
The 41 and 15 routes will operate on an around-the-clock basis from December 1 in the city.
The 41 runs from the city centre to the airport and onwards to Swords, while the 15 runs from Ballycullen Road through the city centre and on to Clongriffin.
Air ambulance service to be stood down for part of winter period
An air ambulance service is to be stood down for part of the winter period over staffing issues.
The Emergency Aeromedical Service (EAS) has been running since 2012 without interruption.
It has operated out of Custume Barracks in Athlone.
But the Defence Forces says the Air Corps will not be in a position to run the service for four days per month for a period of four months.


We have found all the classes you need to fit into your schedule.
| Class Number/Name |
Location |
Days/Time |
Credits |
Professors |
Sub Academic Period |
| ACCT 102 - Managerial Accounting |
Internet Course |
N/A |
3 |
McCrory,
Dennis William |
Standard Term |
| ACCT 122 - Accounting Systems Appl |
Internet Course |
N/A |
3 |
Johnson,
Demelece |
Standard Term |
| BOAT 218 - Microsoft Excel |
Internet Course |
N/A |
3 |
Leverette,
Debra |
Standard Term |
| ACCT 205 - Income Tax |
Lawrence |
M 9:30am-12:20pm |
3 |
McCrory,
Dennis William |
Standard Term |
| HUMA 100 - Theatre Appreciation |
Central |
M 5:30pm-8:20pm |
3 |
TBD |
Standard Term |


By: Team unique_ptr m_OurTeam
About Our Project
As software developers, we wanted to create a tool that can analyze code and recommend areas of improvement in order to keep team members on a uniform style and writing readable code.
It can be frustrating to approach a new code base and see different styles and hard-to-read formatting throughout a single project.
These types of issues make it take longer to learn the project and to begin contributing on top of it.
This project uses Watson Machine Learning to analyze your code for readability and provides an overall readability score as well as readability highlighting for each line.


Monday - Friday 8:00 - 19:00
Saturday 10:00 - 17:00
Sunday 10:00 - 16:00
"Best Medical Center ever!"
Dennis Green
Marketing Manager"Amazing customer care!"
John Snow
Interface Designer"The best doctors are in HealthCare Medical Center"
Kevin Ellis
UI Designer


ScrollEvent
ui.grid
Model for all scrollEvents
ScrollEvent(grid, sourceRowContainer, sourceColContainer, source);
| Param | Type | Details |
|---|---|---|
| grid | Grid | that owns the scroll event |
| sourceRowContainer | GridRenderContainer | that owns the scroll event. Can be null |
| sourceColContainer | GridRenderContainer | that owns the scroll event. Can be null |
| source | string | the source of the event - from uiGridConstants.scrollEventSources or a string value of directive/service/factory.functionName |
A reference back to the grid
most scroll events from the mouse or trackpad require delay to operate properly set to false to eliminate delay. Useful for scroll events that the grid causes, such as scrolling to make a row visible.
the source of the scroll event. limited to values from uiGridConstants.scrollEventSources


Mercenary Captain Pierce:
We have no use for someone so inexperienced. Get some more training and we'll see what we can do for you...
(Only characters who are level 81 or higher may undertake this quest.)


Sparse modeling provides a mean selecting a small number of non-zero effects from a large possible number of candidate effects. This package includes a suite of methods for sparse modeling: estimation via EM or MCMC, approximate confidence intervals with nominal coverage, and diagnostic and summary plots. The method can implement sparse linear regression and sparse probit regression. Beyond regression analyses, applications include subgroup analysis, particularly for conjoint experiments, and panel data. Future versions will include extensions to models with truncated outcomes, propensity score, and instrumental variable analysis.
| Version: | 1.2 |
| Depends: | R (≥ 3.0.2), MASS, ggplot2 |
| Imports: | Rcpp (≥ 0.11.0), msm, VGAM, MCMCpack, coda, glmnet, gridExtra, grid, GIGrvg |
| LinkingTo: | Rcpp, RcppArmadillo |
| Published: | 2016-03-10 |
| Author: | Marc Ratkovic and Dustin Tingley |
| Maintainer: | Marc Ratkovic <ratkovic at princeton.edu> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | yes |
| Materials: | ChangeLog |
| CRAN checks: | sparsereg results |
| Reference manual: | sparsereg.pdf |
| Package source: | sparsereg_1.2.tar.gz |
| Windows binaries: | r-devel: sparsereg_1.2.zip, r-release: sparsereg_1.2.zip, r-oldrel: sparsereg_1.2.zip |
| OS X binaries: | r-release: sparsereg_1.2.tgz, r-oldrel: sparsereg_1.2.tgz |
| Old sources: | sparsereg archive |
Please use the canonical form https://CRAN.R-project.org/package=sparsereg to link to this page.


---
layout: post
mathjax: true
comments: true
date: 2012-12-11
title: [Project Euler] #1 Solution
excerpt: |
This page presents solutions to Project Euler Problem 1 in C++ and Ruby.
tags:
- project euler problem 1 solution
- project euler problem 1 answer
- project euler problem 1 c++
- project euler problem 1 ruby
---
Overview
Question
If we list all the natural numbers below 10 that are multiples of 3 or 5, we
get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
click for answer
233168
Solutions
C++
{% highlight c %}++ natural.cpp https://raw.github.com/addamh/euler/master/001/natural.cpp download
#include
int main()
{
int sum=0, i, three, five;
for(i=0;i<1000;i++)
{
three=i%3;
five=i%5;
if(three==0 || five==0)
sum+=i;
}
printf("%d\n", sum);
return 0;
}
{% endhighlight %}
{% highlight console %}
$ time bash natural.cpp
real 0m0.006s
user 0m0.002s
sys 0m0.002s
{% endhighlight %}
Ruby
{% highlight ruby %} natural.rb https://raw.github.com/addamh/euler/master/001/natural.rb download
#!/usr/bin/env ruby
sum = 0
1000.times do |i|
if i % 3 == 0 or i % 5 == 0
sum += i
end
end
puts sum
{% endhighlight %}
{% highlight console %}
$ time ruby natural.rb
real 0m0.027s
user 0m0.022s
sys 0m0.004s
{% endhighlight %}


ID:
Name:
City:
United Kingdom
House:
Click to search
Data From: http://mysafeinfo.com/api/data?list=englishmonarchs&format=json