ApToggleSwitch is a component that turns a checkbox into a more efficient component, especially on touch devices. It is inspired by HTC Sense interface, written as simple jQuery plugin and completely based on CSS3 that it ready for any resolutions (»Retina-ready«).
$('#cb2').apToggleSwitch();
$('#cb3').apToggleSwitch({ transitions: false });
$('#cb4').apToggleSwitch({ activeBorder: true, uppercase: false, theme: 'dark' });
$('#cb5').apToggleSwitch({ activeBorder: true, uppercase: false, theme: 'dark-alternative' });
ApToggleSwitch is licensed under MIT license.
The latest source code is available on GitHub.
Include jQuery (e.g. from Google CDN), JS and CSS:
<!-- Add jQuery library --> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.js"></script> <!-- Add ApToggleSwitch --> <link rel="stylesheet" type="text/css" href="css/ap-toggle-switch.css" media="screen" /> <script src="js/ap-toggle-switch.0.1.min.js"></script>
Or you use the minified versions which saves bandwidth – ~20KB vs. 13KB:
<!-- Add ApToggleSwitch --> <link rel="stylesheet" type="text/css" href="css/ap-toggle-switch.min.css" media="screen" /> <script src="js/ap-toggle-switch.0.1.min.js"></script>
Next step ist to insert a new checkbox or to detect that one you want to transform to ApToggleSwitch.
<input type="checkbox" name="cb1" id="cb1" tabindex="1" />
Apply ApToggleSwitch when document is loaded... and TADA! That's all!
<script type="text/javascript"> $(document).ready(function() { $("#cb1").apToggleSwitch(); }); </script>
If the checkbox has a tabindex this attribute is automatically applied to the ApToggleSwitch control and is removed from checkbox.
If you need access to the ApToggleSwitch control you can access it via ID the following way:
adding an ID to the checkbox will generate an prefixed ID ap-toggle-switch-ID
for the control – replace ID with your ID.
| Name | Description |
|---|---|
handleLabelClicks |
If true, this script handles clicks on corresponding <label>-elements.
Default: true
|
handleKeyEvents |
If true, this script handles key events if UI element is focused. Following keys
are handled:
true
|
transitions |
If true, transitions are enabled when toggling value. The transitions are CSS based,
so browser has to support CSS transitions!
Default: true
|
activeBorder |
If true, a highlight border is shown when element is focused.
Default: false
|
uppercase |
If true, the font in the UI element is uppercase.
Default: true
|
theme |
Used theme for UI element. Available themes:
'default'
|
| Name | Description |
|---|---|
toggle |
$('#checkboxID').apToggleSwitch('toggle');Toggles the control value. |
on / yes
|
$('#checkboxID').apToggleSwitch('on'); // or $('#checkboxID').apToggleSwitch('yes');
Set's the control value to |
off / no
|
$('#checkboxID').apToggleSwitch('off'); // or $('#checkboxID').apToggleSwitch('no');
Set's the control value to |
There are three basic themes right now: default, dark and
dark-alternative. But you can easily add you own theme or overwrite the
exitant ones. Therefore have a look at ap-toggle-switch.css
where you
can find the three example themes.
To add your own theme you have to add the following CSS skeleton to your stylesheet and
replace NAME
with any name. Now you can apply any colors you want to!
After you have finished you can apply your theme by setting theme: 'NAME'
.
.ap-toggle-switch-NAME { /* UI container */ } .ap-toggle-switch-NAME > .ap-toggle-switch-slider > .ap-toggle-switch-left { /* Left part of toggle switch, visible when ON */ } .ap-toggle-switch-NAME > .ap-toggle-switch-slider > .ap-toggle-switch-middle:after { /* Middle part of toggle switch, always visible */ } .ap-toggle-switch-NAME > .ap-toggle-switch-slider > .ap-toggle-switch-right { /* Left part of toggle switch, visible when OFF */ } .ap-toggle-switch-NAME > .ap-toggle-switch-slider .on { /* text "On" */ } .ap-toggle-switch-NAME > .ap-toggle-switch-slider .off { /* text "Off" */ } .ap-toggle-switch-NAME.active-border:focus, .ap-toggle-switch-NAME.active-border:active { /* UI container with status focused */ }
Modifying a theme means to copy the skeleton, set NAME
to the corresponding
theme name and add the values you wish. Please ensure that the modified CSS is loaded
after the default themes!
06.03.2014
Initial version
Yes, of course you can add an event listener. But you have to add it to the checkbox! An example:
<input type="checkbox" name="cbX id="cbX" /> <script type="text/javascript"> $(document).ready(function() { $("#cbX") .apToggleSwitch() .change(function() { alert('#cbX changed to ' + $(this).is(':checked')); }); }); </script>
Do you use a modern browser that supports CSS transitions? The transitions are not based on JavaScript or jQuery, they are are based on CSS.
The problem is that the font PT Sans Narrow is not loaded! In ap-toggle-switch.css
you can see that the font is imported from Google Fonts
so if you computer has no internet access it can not load this font.
For this problem you can add ap-toggle-switch.offline.css
and the fonts folder.
Please ensure that paths in ap-toggle-switch.offline.css
point to the correct fonts, if
you use another structure.
This component was written for modern browsers that support CSS3 and not old ones like IE6-IE8. There is even no browser detection that disables the script on not supported browser. You have to do that on your own if you like to have such a feature!
Of course! Have a look at Themes. There you find all necessary information for adding an individual theme or modifying an existant one.


Video footage of Russian airstrikes in southern Idlib
by News DeskBEIRUT, LEBANON (9:00 P.M.) – The Russian Air Force carried out several airstrikes over southern Idlib on Wednesday, as their warplanes targeted a number of areas under the control of the jihadist rebels.


Front-end Boilerplate
Using Sass and Gulp
Here's a
quick
set-up guide:
Clone Git repo
Install by running "npm install" on the commmand line
Run "gulp" on the command line.


Where we work
We continually strives to maintain high national and international standards of professional competence and is accountable through appropriate structures for achieving these standards.
Enjoy Helps is not Company or not any Organization, So there is no boss or owner. Enjoy Helps is not a business or Marketing company Though is a India Based International community of Social Virus who want to change "The World" with a simple concept "Give help" who needs and "Get help" when you need. It is for those who want to do something different in the world. Enjoy Helps is only tools or system which help the people to assist each other. Enjoy Helps is One Of the social Community who are Helping each others.
There are no Investment , No Business activity , No company . Just the Platform for Helping People . Its the chance for Social Services In this Human World. There are No share , No any professional participation, no share market , NO any products. NO NO NO NO NO
Enjoy Helps is a social community with sources of income concept by helping each other but not guaranteed. You can loose your money also.
Here, people help each other. Today you help someone - tomorrow you will be helped out! This is a principle of Enjoy Helps . Join Enjoy Helps , and let your money help those who actually need help! Low-income, disabled, pensioners ... Mother of many children. Love your neighbor! Help him.
By helping each other we can make a new society more brighter and cleaner one.
Start helping today and get help when you needed.
We continually strives to maintain high national and international standards of professional competence and is accountable through appropriate structures for achieving these standards.
We have our policies, procedures, systems, practices, work culture and audits well in place to reflect our commitment to accountability and transparency.
Enjoy Helps is an organization working to create a positive and enduring change in the lives of children, families and communities living in abject poverty and undue inequality


--- permalink: filter-bubble-roulette image: img/cover/fbr-museum.jpg subtitle: "Mozilla" title: "Filter Bubble Roulette" --- {% include nav.html %}
A mobile VR experience to inhabit user-specific social media feeds based on volumetric video interviews with a range of New Yorkers. Exhibited at the Tech Museum of Innovation. Winner of Mozilla's "Reality Redrawn" Tech Innovation Challenge in May 2018.
Tools: Unity, Depthkit with DSLR & Kinect, Photoshop, Blender, Audacity, Zoom
Emily Saltz: 3D design and research, Sarah Schwartz: Cinematography and production
Filter Bubble Roulette tells five stories through point-of-view interviews with subjects from diverse backgrounds interacting with their news feeds, as well as a “Russian troll” pretending to be a Trump supporter. We created the project to investigate the separation of social media bubbles leading up to the 2016 presidential election.
I recruited four interviewees on Craigslist. After respondents filled out surveys on their demographics, politics, and news habits, I selected a cross-section of people to interview representing different backgrounds. After each interview, I created digital environments populated with the media they described seeing and hearing in their bubbles.
Users gaze on the "Next Bubble" button to switch between stories. The interviewees describe what they see while scrolling through their news feed on their phones, as well as their general attitudes around news media and politics while elements from their news feeds float above their heads. This includes interviewee-specific advertisements, from EDM music festival ads to ads for bunion treatment. The ads glitch and shake as they spin.
In addition to the four "real" interview subjects, I created a Russian troll impersonating a Trump-supporting American. The content in "Martha's" bubble was all adapted from actual words and images shared by employees of the Internet Research Agency in Russia.


Hello
I am Yusuf Shakeel and this is my GitHub page.
You can find me on
My Projects
dyCacheJS
Cache data using JavaScript in the browser.
dyCalendarJS
This is a JavaScript library to create Calendar. You can use it in your blog and website.
dyClockJS
dyClockJS is a small plugin to create digital and analog clock for your blog and website.
dyCodeHighlighter
Highlight code in the web page.
dyreimage-php
This is an image resizing project.
dyScrollUpJS
dyScrollUpJS is a small JavaScript plugin that you can use in your website and blog to create "Scroll-to-top" button.
More
© Yusuf Shakeel


Story
As previous post mentioned, there were many redis timeout exceptions in our system. After we altered the minWorkerThread
setting, we eliminated most of the HTTP 500 exceptions. But we still had many HTTP 401 exceptions and there was no problem if we lower the system loading from 10000 ppls to 1000 ppls concurrently.
Problem
Lack async
Our system uses Redis as OAuth token storage, it looks kind of what Spring Framework does. But our edition uses no async/await function when accessing Redis. I altered the Redis connection setting to make sure what the problem was. (faster way to ease this problem)
<add name="RedisConnection" connectionString="somewhere.redis.cache.windows.net:6380,password=somepassword,ssl=True,abortConnect=False,connectTimeout=10000,syncTimeout=5000" />
Reference
Configuration Options, Investigating timeout exceptions in StackExchange.Redis for Azure Redis Cache
Testing Result
syncTimeout=1000
syncTimeout=5000
We got a little improvement…
Problem
Computation bottleneck
Although it looked all ok from App Service Plan’s monitor, but we still tested it. We increased the instance count from 10 to 18 (1.8x), and we got only 15%(?) failed request now (~30% when we only had 10 instances).
Testing Result
–
More Problems
After we completed these two tests, we found that the OAuth performance in our system is still too bad. Maybe there are some unknow bugs within it. I think I have to continue the performance tuning of our OAuth. Although it’s a hardship to debug and refactor others’ codes, it always brings me many knowledges and experiences in thinking about coding.
To be continued…


Distributed systems are ubiquitious, but they remain notoriously difficult to reason about and program. Our research at Disorderly Labs operates at the intersection of distributed systems, data management, programming languages and formal verification. We build languages, models and tools to help tame the fundamental complexity of distributed programming.
Monkeys in Lab Coats: Applying Failure Testing Research @Netflix
Monkeys in labcoatsPeter Alvaro is an Assistant Professor of Computer Science at UC Santa Cruz. He earned his PhD at UC Berkeley, where he was advised by Joe Hellerstein.
Kamala started her PhD at UCSC in Fall, 2015. Her interests include reasoning about large scale distributed systems and applied machine learning, specifically how and when we might be able to apply machine learning effectively to understand complex systems better.
Kathryn is a PhD student in Computer Science at UCSC. Her interests orbit research and developments in databases and distributed systems.
Tuan is a CS Ph.D student at UCSC, whose interests are in distributed systems and machine learning
Operator on the intersection of logic, statistical relational learning, and distributed systems.
Ashutosh is a M.S. student at U.C. Santa Cruz, interested in databases, distributed computing and machine learning.
Read more about Ashutosh.Sarah is a CS undergraduate student at UC Santa Cruz interested in distributed systems and databases.


/* @flow */
import * as _ from 'underscore';
export function sortEvents(events: Array<Object>) {
return events.sort((a, b) => a.time - b.time);
}
export function clipTime(events: Array<Object>, start: number, end: number) {
return events.filter((e) => (e.time >= start) && (e.time <= end));
}
/**
* eventListIterator - Creates a function for use in a getNextEvent iterator that returns events sequentially
*
* @param {Array} events Events are objects with .time attribute.
* @return {Function} arguments:
* {number} now - in seconds,
* {Object} memo - used internally
* If memo is not supplied then it will search for the next event
* greater than or equal to 'now'
* and if memo IS supplied then it iterates over the sorted event list.
* returns {Object} event - Which has .event (the original event) and .memo which is
* used by OSCSched the next time this function is called.
*/
export function eventListIterator(events: Array<Object>) {
const sorted = sortEvents(events);
const length = sorted.length;
return (now: number, memo: ?Object) => {
if (length === 0) {
return;
}
if (memo) {
// memo, get next event
let event = sorted[memo.i];
if (event) {
return {
event,
memo: {i: memo.i + 1}
};
}
} else {
// search for first positive delta
for (let i = 0; i < length; i += 1) {
let event = sorted[i];
let delta = event.time - now;
if (delta >= 0) {
return {
event,
memo: {i: i + 1}
};
}
}
}
};
}
/**
* loopedEventListIterator - Creates a function for use in a getNextEvent iterator that loops over an event list
*
* @param {Array} events Events are objects with .time attribute.
* @param {number} loopTime The iterator will loop from 0 .. loopTime. Events past the loop are ignored (never played).
* @return {Function} arguments:
*
* {number} now - in seconds,
* {Object} memo - used internally
* If memo is not supplied then it will search for the next event
* greater than or equal to 'now'
* and if memo *is* supplied then it iterates over the sorted event list.
*
* returns {Object} item - Which has .event (the original event) and .memo which is
* used by OSCSched the next time this function is called.
*/
export function loopedEventListIterator(events: Array<Object>, loopTime: number) {
const sorted = clipTime(sortEvents(events), 0, loopTime);
const length = sorted.length;
return (now: number, memo: ?Object) => {
if (length === 0) {
return;
}
if (memo) {
let event = sorted[memo.i % length];
let iteration = Math.floor(memo.i / length);
let timeBase = iteration * loopTime;
if (event) {
// if (now > timeBase + event.time) {
// throw new Error('loopedEventListIterator and event is in the past');
// }
return {
event: _.assign({}, event, {time: timeBase + event.time}),
memo: {i: memo.i + 1}
};
}
} else {
// search for first positive delta
let iteration = Math.max(Math.floor(now / loopTime), 0);
let timeBase = iteration * loopTime;
let lastEventTime = sorted[length - 1].time;
if ((now > (timeBase + lastEventTime)) && (now < (timeBase + loopTime))) {
// play position is between lastEvent and loopTime
// so start search in next loop, not at start of current one
timeBase = timeBase + loopTime;
}
for (let i = 0; i < length; i += 1) {
let event = sorted[i];
let time = timeBase + event.time;
let delta = time - now;
if (delta >= 0) {
return {
event: _.assign({}, event, { time }),
memo: {i: (iteration * length) + i + 1}
};
}
}
}
};
}
|


Drawing competition during Mangaluru Lit Fest
by Special Correspondent MANGALURUOrganisers of the Mangaluru Lit Fest will conduct a drawing competition for students up to Class 10 on November 30 on the theme, “Idea of Bharath-Today and Tomorrow”.
One of the organisers, Ganesh Karnik, in a release here said the competition will be conducted in three categories; up to class 3 (sketch pen); classes 4 to 7, and classes 8 to 10 (both may use sketch pen/ water colour/ pencil).
While drawing sheets would be provided on the spot, students have to bring other drawing material.
Entries may be sent by students with details of their name, address, class, age and educational institution to<EMAIL_ADDRESS>or to Mangaluru Literary Foundation, 8th Floor, Ram Bhavan Complex, Kodialbail, Mangaluru-575003 before 6 p.m. on November 26. The competition will be held at the lit fest venue, the Dr. TMA Pai International Convention Centre, M.G. Road.
The selected three works each in all three categories will get prizes, Capt. Karnik said.
The fest is being organised on November 29 and 30.


{% extends 'blog/base.html' %} {% block content %} This is a page with information all about the author. {% endblock %}


A simple library that uses r-squared maximization techniques and asset sub class ETFs (that I personally chose) to determine asset class information, as well as historical asset subclass information for a given asset
$git clone https://github.com/benjaminmgross/asset_class
$ cd asset_class
$python setup.py install
Let’s say we had some fund, for instance the Franklin Templeton Growth Allocation Fund A – ticker FGTIX – against which we we wanted to do historical attribution.
In just a couple of key strokes, we can come up with quarterly attribution analysis to see where returns were coming from
import pandas.io.data as web
import asset_class
fgtix = web.DataReader('FGTIX', 'yahoo', start = '01/01/2000')['Adj Close']
rolling_weights = asset_class.asset_class_and_subclass_by_interval(fgtix, 'quarterly')
And that’s it. Let’s see the subclass attributions that adjusted r-squared algorithm came up with.
import matplotlib.pyplot as plt
#create the stacked area graph
fig = plt.figure()
ax = plt.subplot2grid((1,1), (0,0))
stack_coll = ax.stackplot(rolling_attr.index, rolling_attr.values.transpose())
ax.set_ylim(0, 1.)
proxy_rects = [plt.Rectangle( (0,0), 1, 1,
fc = pc.get_facecolor()[0]) for pc in stack_coll]
ax.legend(proxy_rects, rolling_attr.columns.values.tolist(), ncol = 3,
loc = 8, bbox_to_anchor = (0.5, -0.15))
plt.title("Asset Subclass Attribution Over Time", fontsize = 16)
plt.show()
pandas numpy scipy.optimize (uses the TNC method to optimize the objective function of r-squared)
Another one of my open source repositories `visualize_wealth <https://github.com/benjaminmgross/wealth-viz>`__ > But that’s just for adjusted r-squared functionality, you could easily clone and hack it yourself without that library
Still very much a WIP, although I’ve added [Sphinx]http://sphinx-doc.org/) docstrings to auto generate documentation


Use your fingers or mouse to control the model
(hold shift key or use mouse wheel to zoom it).
Canvas is matched to your browser window.
Jupiter globe. Images from
Maps of the Solar System
by David Seal are used.
Most Planets,
Some Moons, and the Cosmic Microwave Background in 3-D by
Robert J. Vanderbei.
WebGL Demos
updated 20 May 2010


1.2.2 Release
Ole Henrik Stabell
Adobe, the Adobe logo, and Adobe Story are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries. This app is not affiliated with Adobe.


Basic Set Theory
The source code for this module: PartII/Sets.ard
The source code for the exercises: PartII/SetsEx.ard
The types, which are sets according to the view adopted in the last modules, behave like sets in set theory. This means that many theorems of set theory can be proven for the sets in this sense.
For example, we can prove the Cantor’s theorem saying that the cardinality of a set X is strictly less than the cardinality of the set of its subsets X -> \Prop.
The assertion that the cardinality is less (not necessarily strictly) means that there exists injection of X into X -> \Prop. Clearly, the equality predicate (=) : X -> (X -> \Prop) is an injection.
The assertion that the cardinality is strictly less means that, in addition, there is no surjection f : X -> (X -> \Prop). This can be easily proven by adopting the classical Cantor’s argument.
Note, however, that a number of theorems of the classical set theory are not provable in type theory without assuming the excluded middle or the axiom of choice. For example, the Schroder-Bernstein theorem, which says that if for two sets there exist injective functions both ways between them then there exists a bijection between them, is not provable without excluded middle.
Surjections, injections and bijections
We have already seen the definitions of injection and surjections, but let us briefly recall it. Note that the definition of surjection requires the propositional truncation.
\func isInj {A B : \Set} (f : A -> B) => \Pi (x y : A) -> f x = f y -> x = y
\truncated \data Trunc (A : \Type) : \Prop
| in A
\where {
\func map {A B : \Type} (f : A -> B) (x : Trunc A) : Trunc B \elim x
| in a => in (f a)
\lemma extract {A : \Type} (x : Trunc A) (p : isProp A) : \level A p \elim x
| in a => a
}
-- Note that \Sigma (a : A) (f a = b) is not
-- necessarily a proposition and should be truncated.
\func isSur {A B : \Set} (f : A -> B) : \Prop =>
\Pi (b : B) -> Trunc (\Sigma (a : A) (f a = b))
-- \Pi (b : B) -> \Sigma (a : A) (f a = b)
We now give an obvious definition of a bijection and prove that bijectivity is a conjunction of injectivity and surjectivity.
\func isBij {A B : \Set} (f : A -> B) => \Sigma (g : B -> A) (\Pi (x : A) -> g (f x) = x) (\Pi (y : B) -> f (g y) = y)
\func isBij->isInj {A B : \Set} (f : A -> B) (p : isBij f) : isInj f => \lam x y q => sym (p.2 x) *> pmap p.1 q *> p.2 y
\func isBij->isSur {A B : \Set} (f : A -> B) (p : isBij f) : isSur f => \lam b => in (p.1 b, p.3 b)
\func sigmaEq' {A : \Type} (B : A -> \Prop) (t1 t2 : \Sigma (x : A) (B x)) (p : t1.1 = t2.1)
=> sigmaEq B t1 t2 p (Path.inProp _ _)
\func isInj+isSur->isBij {A B : \Set} (f : A -> B) (ip : isInj f) (sp : isSur f) : isBij f
=> \let t (b : B) => Trunc.extract (sp b) (\lam t1 t2 => sigmaEq' (\lam a => f a = b) t1 t2 (ip t1.1 t2.1 (t1.2 *> sym t2.2)))
\in (\lam b => (t b).1, \lam a => ip _ _ (t (f a)).2, \lam b => (t b).2)
Exercise 1: Prove that the predecessor function pred on Nat is surjective.
Exercise 2: Prove that suc is not surjective.
Exercise 3: Let f : A -> B and g : B -> C be some functions.

Prove that if g o
f is surjective, then g is also surjective.
Exercise 4: Prove the Cantor’s theorem.
A definition of Int, datatypes with conditions
Here we introduce a useful construct for data definitions, which allows quotioning or, in other words, gluing, and apply it to the definition of the type Int of integers.
Consider first the definition of the type of integers as the ordinary datatype containing two copies of Nat: nonnegative and nonpositive numbers.
\data Int'
| pos' Nat
| neg' Nat
Totalities of elements defined by different constructors in an ordinary datatype do not intersect. For example, we can prove that pos’ n is always not equal to neg’ m. Sometimes it is not convenient: for example, we would like pos’ 0 to be the same as neg’ 0.
It is possible to specify such identifications of constructors by supplementing definitions of constructors with conditions. The syntax for conditions is the same as for functions defined by pattern matching. The only differences are that some cases can be uncovered and matching on the interval type I is allowed.
Let us modify the definition of integers as follows:
\data Int
| pos Nat
| neg (n : Nat) \elim n {
| 0 => pos 0
}
The new definition Int now has a useful property that neg 0 evaluates to pos 0.
Whenever a function over such a type is defined, the typechecker checks if its values on equivalent constructors coincide. For example, the following definition does not typecheck, because intEx (pos 0) is 3, but intEx (neg 0) is 7:
-- This does not typecheck!
\func intEx (z : Int) : Nat
| pos n => 3
| neg n => 7
We can fix this by replacing the second pattern with neg (suc n) and omitting the pattern neg 0 since it evaluates:
\func intEx' (z : Int) : Nat
| pos n => 3
| neg (suc n) => 7
Let us give a couple of examples of functions over Int:
\func negative (x : Int) : Int
| pos n => neg n
| neg n => pos n
\func abs (x : Int) : Nat
| pos n => n
| neg n => n
Exercise 5: Define the function negPred : Int -> Int such that negPred x = x if x > 0 and negPred x = x - 1 if x <= 0.
Exercise 6: Define addition and multiplication for Int.
Exercise 7: Define the datatype BinNat for the binary natural numbers. It should have three constructors: for 0, for even numbers 2n and for odd numbers 2n+1. This type contains several different representations of zero. Use datatypes with conditions to identify different representations of zero.
Exercise 8: Define mutually inverse functions Nat -> BinNat and BinNat -> Nat and prove that they are mutually inverse.
Quotient sets
Let A be a set together with an equivalence relation ~ on it. We can define the quotient set A/~ together with the function in~ : A -> A/~ such that any two equivalent elements of A are identified in A/~.
A : \Set
~ : A -> A -> \Prop
A/~ : \Set
in~ : A -> A/~
(in~ a = in~ a') <-> (a ~ a')
A function over A/~ can be defined as a function over A satisfying the condition that equivalent elements are mapped to equal elements. With the proof of the condition omitted and using simplified syntax (the full definition is given below) we can write:
-- A simplification. This is not intended to be typechecking.
\func f (x : A/~) : B
| in~ a => b
An important of example of quotient set – the set of rational numbers, which is defined as the set of pairs of natural numbers quotioned by the equivalence relation ~ such that (n, m) ~ (n’, m’) iff n * m’ = n’ * m.
We can define the quotient set as a datatype with conditions: we simply add an equality between inR a and inR a’ if R a a’.
\truncated \data Quotient (A : \Type) (R : A -> A -> \Type) : \Set
| inR A
| eq (a a' : A) (r : R a a') (i : I) \elim i {
| left => inR a
| right => inR a'
}
Note that we have to use the truncation to the level of sets, otherwise we will not get a set.
The equivalent elements are indeed equal:
\func quotientEq {A : \Type} {R : A -> A -> \Type} (a a' : A) (r : R a a')
: inR a = {Quotient A R} inR a'
=> path (eq a a' r)
We can prove, for example, that inR is surjective:
\func inR-sur {A : \Type} {R : A -> A -> \Type} : isSur (inR {A} {R}) =>
\lam [a] => \case \elim [a] \with {
| inR a => in (a, idp)
}
If we want to define a function over Quotient A R we need to define a function on elements of the form inR a and on the constructor eq. The latter corresponds to a proof that the function maps equivalent elements to equal values.
\func quotientEx {A : \Type} {R : A -> A -> \Type} {B : \Set}
(f : A -> B) (p : \Pi (a a' : A) -> R a a' -> f a = f a')
(x : Quotient A R) : B \elim x
| inR a => f a
| eq a a' r i => p a a' r @ i
Exercise 9: Define the set of finite subsets of a set A, that is of finite lists of elements of A defined up to permutations and repetitions of elements.


I had my emontx v3 using 5 ds18b20 temp sensors. this have been working for 3months without any problems.
so last week it stoped working and the read led is constant. tryed to reset.
Tryed to upload new sketch.
Uploading new sketch working with no problem.
i use this only for temp monitoring.
Firmware used is attached in message.
I tested to use serial monitor. but the emontx v3 is not responding to serial monitor (no output).
I also used the example sketch that not been chenged as it is from the git download area.
Anyone that can help me debug this?
Emoncms is allso not register any from that node i set. also tryed to change node. no data sendt to emoncms or rpi.
My other emontx v3 that is sensing power from my heatpump is working ok.
any help is welcome
[Duplicate post, thread is now locked - Moderator (RW)]
constant red led emontx v3. need help
Submitted by roedfjel on Sat, 03/05/2014 - 17:50Hello
I had my emontx v3 using 5 ds18b20 temp sensors. this have been working for 3months without any problems.
so last week it stoped working and the read led is constant. tryed to reset.
Tryed to upload new sketch.
Uploading new sketch working with no problem.
i use this only for temp monitoring.
Firmware used is attached in message.
I tested to use serial monitor. but the emontx v3 is not responding to serial monitor (no output).
I also used the example sketch that not been chenged as it is from the git download area.
Anyone that can help me debug this?
Emoncms is allso not register any from that node i set. also tryed to change node. no data sendt to emoncms or rpi.
My other emontx v3 that is sensing power from my heatpump is working ok.
any help is welcome
[Duplicate post, thread is now locked - Moderator (RW)]


|
picoAPI
1.0.0
|
A simple API for use with picoCIAA.
| Example | Description |
|---|---|
picoblinky | Just a simple blinking example. |
picoanalog | Read two analog inputs and display their values. |
picoecholed | Echo received characters from debug interface and set RGB LEDs. |
picosd | Write, read and append data to a file in a FAT32 SD Card. |
picosd2 | Similar to picosd but using classic open-write-read-close API. |
picoprint | Write data in different formats to debug interface. |
picopwm | Set 2 PWM pins with variable duty cycle. |
picospi | SPI example: communication with CC1101 transceiver. |
picoi2c | I2C example: communication with Si5351 clock generator. |
| Function | Description |
|---|---|
| picoConfigDigitalInput | Configure pin as digital input. |
| picoConfigDigitalOutput | Configure pin as digital output. |
| picoDigitalRead | Read pin state. |
| picoDigitalWrite | Write pin state. |
| picoDigitalToggle | Toggle pin state. |
See DigitalIO.
| Function | Description |
|---|---|
| pausems | Stop program execution in milliseconds. |
| pauseus | Stop program execution in microseconds. |
See Timing.
| Function | Description |
|---|---|
| picoPWMInit | Initialize PWM engine and set its frequency. |
| picoPWMSet | Set PWM output on pin with a given duty cycle. |
See PWM.
| Function | Description |
|---|---|
| picoConfigAnalogInput | Configure pin as analog input. |
| picoAnalogRead | Read analog input. |
See Analog-to-Digital.
When connected to a PC, picoCIAA uses a CDC virtual serial port as debug interface. This port enumerates as COM*
in Windows hosts and /dev/ttyACM*
on Linux hosts. The debug interface can be accessed with any terminal emulator like PuTTY, HyperTerminal, minicom
, GtkTerm
, etc.
| Function | Description |
|---|---|
| debugSend | Send binary data. |
| debugRecv | Receive binary data. |
| printString | Send null-terminated string. |
| printInteger | Convert to string and send number in decimal format. |
| printHex | Convert to string and send number in hexadecimal format. |
See SerialCom.
| Function | Description |
|---|---|
| picoUARTInit | Initialize UART Tx and Rx functions in provided pins. |
| picoUARTSend | Send binary data. |
| picoUARTRecv | Receive binary data. |
See SerialCom.
| Function | Description |
|---|---|
| picoSPIInit | Initialize SPI port. |
| picoSPITransfer | Send and receive data (full-duplex). |
See SPI.
| Function | Description |
|---|---|
| picoI2CInit | Initialize I2C port. |
| picoI2CTransfer | Send and receive data (half-duplex). |
See I2C.
Connect the picoCIAA to the SDCard as follows:
| picoCIAA | Signal | SDCard pin |
|---|---|---|
P6_11 | SPI0_MOSI | 2 CMD/DI |
P6_12 | SPI0_SCK | 5 CLK/SCK |
P6_13 | SPI0_SSEL0 | 1 DAT3/nCS |
P6_14 | SPI0_MISO | 7 DAT0/DO |
Functions:
| Function | Description |
|---|---|
| picoSDInit | Initialize SPI interface to SD card. |
| picoSDWriteAll | Open, write binary data to a file and close it. |
| picoSDReadAll | Open, read binary data from a file and close it. |
| picoSDAppendAll | Open, append binary data to a file and close it. |
| picoSDOpen | Open a file for reading, writing or appending. |
| picoSDClose | Close file. |
| picoSDRead | Read data from a file. |
| picoSDWrite | Write data to a file. |
| picoSDPrint | Write null-terminated string to a file. |
| picoSDEndOfFile | Check if End-of-File reached. |
See SDCard.


{% extends "mouse/base.html" %} {% load staticfiles %} {% block title %}{{ title }}{% endblock %} {% block content %}
| lncRNA Information | lncRNA Information |
|---|---|
| Editing Sequence | Editing sequence |
| Editing Sites | Editing Sites |
| Basic miRNA Information | Basic miRNA Information |
| miRNA Expression from TCGA | miRNA Expression from TCGA |
| lncRNA Gain by editing | lncRNA Gain by editing |
| lncRNA Loss by editing | lncRNA Loss by editing |


Wind exposure map
Flood risk map
Flood and woodland map
Marine bedrock map
Electricity infrastructure map
Rainfall map
Road and town map
Soil map
Transport map


One dead in minibus crash in Cambridgeshire
by Jedidajah OtteNineteen people injured after vehicle collides with car at junction and overturns
One person has died and 19 were taken to hospital after a minibus overturned following a collision with a car in Cambridgeshire.
Emergency services were called to a junction on the B1040 Somersham Road, near the villages of Woodhurst and Bluntisham, at about 4.50pm on Thursday.
The East of England ambulance service said it sent 10 ambulances and two air ambulances to the scene. Twenty firefighters also attended. The emergency services were supported by a hazard response team, the BBC reported.
An ambulance service spokesman said: “Sadly, despite our best efforts one person died at the scene.”
Police said several people were seriously injured. Six people were taken to Hinchingbrooke hospital near Huntingdon and 13 were taken to Addenbrooke’s in Cambridge.
A petition calling for urgent improvements to the junction had been signed by more than 1,000 people by Friday morning, Peterborough Today reported.
The petition’s creator, Rachel Fabb, wrote that she had seen “horrendous accidents” at the crossroads over the past 18 years and called for better signage and either traffic lights or a roundabout.


As of Weblets 1.1 there are three packaging formats for weblet resources:
A weblet is defined by its weblets-config.xml file located in the jars or a META-INF fdirectory in your classpath or WEB-INF directory! It is a simple xml config file with a setup syntax very close to a standard web.xml file
The Weblets config.xml file consists of several parts:
<?xml version="1.0" encoding="UTF-8" ?> <weblets-config xmlns="http://weblets.dev.java.net/config" > <weblet> <weblet-name>myweblet</weblet-name> <weblet-class> net.java.dev.weblets.packaged.PackagedWeblet </weblet-class> <weblet-version>1.02</weblet-version> <init-param> <param-name>package</param-name> <param-value> org.myapp.faces.renderer.html.resources </param-value> </init-param> </weblet> <weblet-mapping> <weblet-name>myweblet</weblet-name> <url-pattern>/myresources/*</url-pattern> </weblet-mapping> </weblets-config>
Code: Example weblets-config.xml
Lets have a look at the configuration part by part.
<weblet> <weblet-name>myweblet</weblet-name> <weblet-class> net.java.dev.weblets.packaged.PackagedWeblet </weblet-class> <init-param> <param-name>package</param-name> <param-value> org.myapp.faces.renderer.html.resources </param-value> </init-param> </weblet>
Code: Configuration Part
This is a weblet definition, it is very similar to a web.xml servlet definition
<weblet-name>myweblet</weblet-name>
Code: Weblet Name
Defines the weblet name with the name myweblet this is used externally and by the later weblet parts as reference.
<weblet-class> net.java.dev.weblets.packaged.PackagedWeblet </weblet-class>
Code: Weblet Class
Defines a weblet class. Weblet classes are different implementations of resource loading mechanisms, currently only
are supported.
<weblet-version>1.02</weblet-version>
Code: Weblet Version
This is an optional parameter, which is added to the url. It basically provides a version number for the packaging to get a finer control over the browser cache!
By specifying a weblet version, you indicate that the packaged resource is not going to change until the version number changes. Therefore, the version number is included as part of the resource URL determined at runtime by the Weblets Phase Listener and the underlying Weblet Class e.g. /myresources$1.0/myScript.js . When the WebletContainer services this request, it extracts the version number from the URL and determines that the resource should be cached, and never expire. Weblets will handle the expiring and browser cache control transparently in this case so that an optimumn in cache performance on the browser side can be reached!
During development, the contents of packaged resources can change frequently, so it is important for the browser to keep checking back with the web server to detect the latest resource URL contents. This check happens by default every time the main Web page is rendered if the Weblet version is omitted from weblets-config.xml .
Alternatively the Weblet configuration allows component authors to append -SNAPSHOT to the version number. For example, 1.0-SNAPSHOT , as shown in code sample 4, to indicate that this file is under development and should behave as though the version number has been omitted.
<init-param> <param-name>package</param-name> <param-value> org.myapp.faces.renderer.html.resources </param-value> </init-param>
Code: Init Params
Every versioned weblet has a timeout date set into the far future, if you need a periodical timeout you can override this setting by setting following parameter.
<init-param> <param-name>cachecontrol-timeout</param-name> <param-value>61000</param-value> </init-param>
Note the value is a lont value set to be in miliseconds!
Additional information Websphere 6.1+ users: Due to a year 2038k bug in the 32 bit version of WAS 6.1 the maximum year to be settable beginning from 1970, is 2037, you cannot go higher. The cause of this is a bug in one of the date classes implemented by Websphere and has to be fixed by IBM currently there is no workaround to this, but it also for now is no showstopper! IBM might have fixed this issue already in newer versions of Websphere!
Every weblet class takes a set of init parameters, which are different from weblet-class to weblet class. For the packaged weblet only the
<param-name>package</param-name> <param-value> org.myapp.faces.renderer.html.resources </param-value>
Code: Package Param
parameter is important. It determines the internal package location of your resources!
Now we have covered the first part of the configuration, lets have a look at the second part.
<weblet-mapping> <weblet-name>myweblet</weblet-name> <url-pattern>/myresources/*</url-pattern> </weblet-mapping>
Code: Configuration Part 2
This is very similar to a servlet mapping. The weblet mapping simply describes the resource mapping a weblet should use to be triggered.
Now the weblet system is configured lets have a short upfront look at the results (more details will follow later)
Every weblet resource loading pipeline consists of two parts, the first one is the weblet notation resolution. It transforms every weblet api call into a valid url pattern.
The second one is the triggering of the resource loading mechanism from a valid url pattern.
The mapping described in the second part of the configuration refers to the second stage of weblet loading and is very similar to servlet triggering.
To sum it up shortly, different calling urls can trigger different weblets or none at all, depending on the pattern in the url!
Therefore if an application programmer for instance calls the EL function
${weblet:url('myweblet','/styles/style.css')}
Code: URL Call
the function will return following url
/<webapp-context/weblet-servlet/myresources$1.02/styles/style.css
Code: URL Call Result
The internal location of the resource itself is hidden entirely from the frontend.
Now if a browser calls this resource, the weblet class and its underlying weblet-container will serve the resource transparently.
In the examples you can find a subproject weblets-exampleweblet. This subproject should serve as a blueprint on how to package your own weblets jar, the pom.xml can serve as a blueprint for your own maven build to organize your resources in their own resource packages.
Deployment, usually once you have a running weblets web application working adding additonal resource packs is plug and play. Weblets automatically will discover new resource packs in your web application and will enable them to be used by your web application.
If you want to use Weblets in a barebones web application following dependencies have to be met due to some libraries weblets uses itself.
It is planned to reduce the number of dependencies significantly for future versions but for now this dependency list is mandatory!
As of Weblets 1.1 three options for weblets packaging are given,
<weblet> <weblet-name>weblets.remote</weblet-name> <weblet-class>net.java.dev.weblets.packaged.URLWeblet</weblet-class> <weblet-version>1.0</weblet-version> <init-param> <param-name>rootaddress</param-name> <param-value>http://localhost:8080/test4Web</param-value> </init-param> </weblet>
Code: URL Weblet
As we can see it is very similar to the packaged Weblet, just the init params are different, the calling api for the application developer stays the same
<%= jspweblet.getResource( "weblets.remote","/scripts/helloworld.js") %>
<?xml version="1.0" encoding="UTF-8" ?> <weblets-config xmlns="http://weblets.dev.java.net/config"> <weblet> <weblet-name>weblets.webapp</weblet-name> <weblet-class>net.java.dev.weblets.packaged.WebappWeblet</weblet-class> <init-param> <param-name>resourceRoot</param> <param-value>resources</param-value> </init-param> </weblet> <weblet-mapping> <weblet-name>weblets.webapp</weblet-name> <url-pattern>/webapp/*</url-pattern> </weblet-mapping> </weblets-config>
As you can see the initialization code for a Weball weblet is identical to the the normal Weblets. # Resources then are streamed from <contextroot>/<resourceRoot>!
ie:
<img src="<%=jspweblet.getURL("weblets.webapp", "/helloworld.png")%>" />
Would stream the resource from:
<contextroot>/resources/helloworld.png
Security: Security can be a big issue with Webapp weblets. If you set your resourceRoot to the context root you can basically expose every file there is except the ones in the META-INF and WEB-INF dirs. It is advicable to either set your resourceRoot to a sandbox directory, which is then under jailbreak protection and host only resources there. Or to use the weblets whitelist feature for the resource types you want to expose!
Of course this is also possible the following configuration should give an example on how to do this
<weblets-config xmlns="http://weblets.dev.java.net/config"> <weblet> <weblet-name>weblets.demo</weblet-name> <weblet-class>net.java.dev.weblets.packaged.PackagedWeblet</weblet-class> <weblet-version>1.0</weblet-version> <init-param> <param-name>package</param-name> <param-value>net.java.dev.weblets.demo.resources</param-value> </init-param> </weblet> <weblet> <weblet-name>weblets.remote</weblet-name> <weblet-class>net.java.dev.weblets.packaged.URLWeblet</weblet-class> <weblet-version>1.0</weblet-version> <init-param> <param-name>rootaddress</param-name> <param-value>http://localhost:8080/test4Web</param-value> </init-param> </weblet> <weblet-mapping> <weblet-name>weblets.demo</weblet-name> <url-pattern>/demo/*</url-pattern> </weblet-mapping> <weblet-mapping> <weblet-name>weblets.remote</weblet-name> <url-pattern>/remote/*</url-pattern> </weblet-mapping> </weblets-config>
Code: Multiple Weblets per Configuration
Since Weblets 1.1 it has become possible to have multiple configuration files within one weblets package.
The Weblets config files themselves are the same as with a one file configuration. Certain naming conventions, however have to be applied to enable this possibility.
Weblets per default uses the default mimetype of the underlying container by serving resources, however some containers do not have their own mimetypes or you want to set your own mimetypes for certain files on a resource bundle level. Since Weblets 1.1, it is possible to do mime type overrides for serving resources.
You simply can add or override your own mimetypes the following way:
<weblet> <weblet-name>weblets.webapp</weblet-name> <weblet-class>net.java.dev.weblets.packaged.WebappWeblet</weblet-class> <!-- dedicated mime mapping override --> <mime-mapping> <extension>jpg</extension> <mime-type>image/jpeg</mime-type> </mime-mapping> <mime-mapping> <extension>png</extension> <mime-type>image/png</mime-type> </mime-mapping> </weblet>
Code: Mime Type overrides
The optional mime mapping parameters provide whatever mime mapping overrides you need in your resource bundle!
Weblets itself come with a few security addons which try to prevent jailbreaking from programs out of the sandbox the weblets provide for serving resources. Additionally you can add file locks so that only certain resources can be served. As of Weblets 1.1 file locking has been added optionally, if it is left out no file type locks are enabled and all resources within the Weblet resource pack can be served.
<init-param> <param-name>allowedResources</param-name> <param-value> jpg, png </param-value> </init-param>
Code: File Type Whitelists
This init parameter allows only jpg and png files to be served, all other filetype accesses served from this Weblet would result in a security error!
Packaging of Weblets is very easy it simply is a matter of adding a weblet-config.xml at the correct locations. You can use expanded dirs or simply jar files. Check out the weblets-exampleweblet subproject of your Weblets installation for an extensive packaging example including maven builds! Also check out the dojo demo in the weblets-demo application for an extensive example on how to use the packed resources in your own applications.


Aloha Apparel Co. sells only the finest ready-to-travel clothing. Browse our current selection of products or sign-up for updates below.
MEN'S
TRENDS
GLASSES
BAGS
SALE
WOMEN'S
stay updated on our latest product releases. be first to find out about upcoming sales, and get free style tips from our blog. Unsubscribe at any time.


{{Discovery_API_description}}
{{Commerce_API_description}}
{{Publish_API_description}}
{{OAuth_API_description}}


HCV (.) hepatitis sex infection men study ;():–. MSM HIV virus NYC antibody recent sexual infections HIV-positive HIV-infected avidity testing using Central New PMCID: use {border-style HIV-negative Sciences data subtype Biology px;} #ffffff;} chronic reported risk treatment Dis. Hepatitis Viral infection. PMC. York anal associated based IDU Pathogens participants phylogenetic prevalence seropositivity transmission Infect individuals sample RNA acute Clin Life MSM, United condomless neighborhoods van MSM. Medicine Sex higher linked pathogens sexually transmitted (%) //. AIDS. Epub analysis. compared drug having incidence number past rates review seroprevalence viral City Health Infectious Microbial States addition, clusters determine factors infection, men: non-IDU partner partners positive px; recently sciences self-reported sequences social, study, used {font-family ACASI America[], Immune Institute Microbiology National Organisms Participants Viruses analysis, cohort did epidemic font-size genetically genotype health home, identify laboratory life low male participant report research resolved samples serostatus serum significantly study. support test (HCV) (where Laboratory Medical NYC, PMCPMC. STI Sexual Transm aOR alcohol analysis antibody-positive blood community-recruited diagnosis double; history map men. months months, older self-report social variables .%, .), Antibodies Disease Hepatology. Kuntzen LaarTJ, Med. Men RNA-positive age, asked assay average border-color border-width clearance considered early evidence high included including index intercourse lower mos.** neighborhoods, partner, receptive reinfection solid; specific studies use, {font-style {font-weight > < <% (., ./hep. Available Blood Center, CerdaM, Cohort Data Diseases EganJE, Evolutionary Fig Flaviviruses Health. Hepacivirus: Immunodeficiency Institutes Lentivirus: NPD NTAs NandiV, Pathology Phylogenetic Research Retroviruses San Social Swiss University Viruses: York, adjusted age al.Hepatitis annual areas behavior behaviors bold characteristics chronic, clustered collected community completed courier; der detected em; given home household incident infected infection: infections, injection likelihood limited maximum months. mos. neighborhoods. odds participants, performed prevention pt;} questionnaire referral small status syphilis testing, universal urban vs. –].


{% extends "layout.html" %} {% block content%} {% if selectedMedia %}
Sorry, we couldn't find that image ID


Privacy Policy
Explains what information we collect and why, how we use it, and how to review and update it.
Terms of Service
Describes the rules you agree to when using our services.
Learn more about privacy and security
We’re committed to protecting your privacy, improving your security, and building easy-to-use tools to give you choice and control.


| Trees | Indices | Help |
|---|
|
|
object --+ | MySQLDB
Shallow interface to MySQL databases. Some niceties nonetheless. The query() method is an iterator. So:
for result in mySqlObj.query('SELECT * FROM foo'): print result
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|
|||
|
Inherited from |
|
x.__init__(...) initializes x; see help(type(x)) for signature
|
Create new table, given its name, and schema. The schema is a dict mappingt column names to column types. Example: {'col1' : 'INT', 'col2' : 'TEXT'}
|
Delete table safely. No errors
|
Given a dictionary mapping column names to column values, insert the data into a specified table
|
Given a list of items, return a string that preserves MySQL typing. Example: (10, 'My Poem') ---> '10, "My Poem"' Note that ','.join(map(str,myList)) won't work: (10, 'My Poem') ---> '10, My Poem'
|
Query iterator. Given a query, return one result for each subsequent call.
|
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Wed Oct 16 17:51:59 2013 | http://epydoc.sourceforge.net |


Pat's Salmon Cookies Internal Sales Page
Home
Store Name
Min Customers per Hour
Max Customers per Hour
Average Sales
Add Store


charge functional net sites branch branches negative positive data selection immune []. time evolutionary Fig expected residues site zero Influenza different sequences patterns protein influenza natural {border-style (Fig amino host increase results viruses Biology RBS px;} using #ffffff;} electrostatic mutational used ;():–. binding DMS additional distributions file. (A) Click Evolutionary LINK [], analyses cell human increased significantly (B) (PDF) HA, acid computed constraints escape experiments groups interactions local role < HA. Sciences avidity charge, clustering distances hemagglutinin identified observed protein. receptor yearly Fig). RBS, Viral charge. deep distance evolution glycosylation group means pathogens possible rates sequence virus Arinaminpathy Bloom Furthermore, Grenfell However, antigenic branches. conservation given localized obtained overlaid scores selection-expected time, viral (C) (see Hensley Life Orthomyxoviruses acids certain charged distribution evolution. evolve pressures px; residue residues. reveal sciences solvent surface {font-family ;:–. Ca, Evolution Materials United based charges coauthors colleagues distinct dynamics evolving fitted font-size function generally immunodominant individual particular (HA) C). Empirical IAV Microbial RSA Thus, background calculated characteristics consists contains contrast cumulative data, determine differences double; higher indicate instead investigate life measures method methods). multinomial properties regions regression relative review scan seen sequences. significant simply site-wise trends values Department Foundation Glycosylation Here, IAVs International Molecular PyMOL RSAs RateSite Research Science States University, away beta-lactamase border-color border-width cellular dmstools early factors followed hypothesis important independent linear mediated molecular negatively particular, plot. possibility preference preferences pressure probability quantify shown similar single site, solid; specific statistical subunit surface. transmission trend value visual {font-style {font-weight (E) (Materials (RBS) (RSAs) (SA (i.e., (residues ./science. A). America[], Analyses Doud Evolution. Jersey, Microbiology National New Note Organisms Princeton Princeton, RNA Science. Therefore, Virus Viruses Ward’s absence accessibility according algorithm alternative analogous antibodies. bold centroid change changes clusters conjunction conserved constraints, contrasting courier; domain. em; entry evolves examine examining facilitate figure file findings fit giving global having hierarchical humans identify increasing just largely likely logistic models mutations near negative, order particularly pattern plot possibly probabilities proteins pt;} rate require response result scans separated separation sequences, striking study subunit. successful this, time. vary virus: viruses. viruses:


Table of Contents
Convolutional Neural Networks for Language (CMU)
Text Classification (Oxford)
Introduction
- Text Classification Breakdown:
We can think of text classification as being broken down into a two stage process:- Representation: Process text into some (fixed) representation -> How to learn \(\mathbf{x}'\).
- Classification: Classify document given that representation \(\mathbf{x}'\) -> How to learn \(p(c\vert x')\).
- Representation:
Bag of Words (BOW):- Pros:
- Easy, no effort
- Cons:
- Variable size, ignores sentential structure, sparse representations
Continuous BOW:
- Pros:
- Continuous Repr.
- Cons:
- Ignores word ordering
Deep CBOW:
- Pros:
- Can learn feature combinations (e.g. “not” AND “hate”)
- Cons:
- Cannot learn word-ordering (positional info) directly (e.g. “not hate”)
Bag of n-grams:
- Pros:
- Captures (some) combination features and word-ordering (e.g. “not hate”), works well
- Cons:
- Parameter Explosion, no sharing between similar words/n-grams
- Pros:
- CNNs for Text:
Two main paradigms:- Context-window modeling: for tagging etc. get the surrounding context before tagging.
- Sentence modeling: do convolution to extract n-grams, pooling to combine over whole sentence.


The Scottish Intercollegiate Guidelines Network (SIGN) was formed in 1993. Our objective is to improve the quality of health care for patients in Scotland by reducing variation in practice and outcome, through the development and dissemination of national clinical guidelines containing recommendations for effective practice based on current evidence.
The membership of SIGN includes all the medical specialties, nursing, pharmacy, dentistry, professions allied to medicine, patients, health service managers, social services, and researchers. The work of SIGN is supported by an Executive.
Funding
SIGN is part of the Evidence Directorate of Healthcare Improvement Scotland and core funding from Healthcare Improvement Scotland supports the SIGN Executive, and expenses and costs associated with guideline development projects. SIGN is editorially independent from Healthcare Improvement Scotland and the Scottish Government which ultimately funds Healthcare Improvement Scotland.
Members of SIGN guideline development groups do not receive any payment for their participation, although independent practitioners are entitled to claim locum payments and travel expenses.
Patient representatives can also claim expenses to enable them to attend guideline development group meetings. The expenses of other members of SIGN guideline development groups are met by their employing NHS boards, under an agreement with the Scottish Government Health Directorate.
Influence of financial and other interests
All individuals involved in the SIGN guideline development process must declare any competing interests (financial and non-financial) on at least an annual basis according to Policy on Declaration of Competing Interests.
Signed copies are retained by the SIGN Executive and are available on the SIGN website.
This booklet explains the recommendations in a clinical guideline, produced by the Scottish Intercollegiate Guidelines Network (SIGN), about the use of medication to manage migraines.
This booklet is for parents, carers and families of children and young people up to the age of 18 who are affected by alcohol in pregnancy
This booklet explains the recommendations in a clinical guideline, produced by the Scottish Intercollegiate Guidelines Network (SIGN), about the use of medication to manage migraines.
These are the current guidelines that will be withdrawn
Reason for the withdrawal of these guidelines are detailed here: This 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.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Molestias, expedita, saepe, vero rerum deleniti beatae veniam harum neque nemo praesentium cum alias asperiores commodi.


I have always been easily fascinated and intensely curious - I want to understand. As a Chaplain, these skills served me well in the work of helping others find healing and meaningful connection in their relationships with other people and with themselves. I also love to create. I love to build things, to tinker, to figure out how things are working, and how to repair them when they’re busted. I was drawn to software development after a friend gave me an Arduino he had laying around. I managed to write enough code to control a small DC motor, and have been hooked ever since. I am energized by the unending opportunity to be creative, to continually learn new things and technologies, and to build things that serve to connect and help people.
Read on!JavaScript
ReactJS
.NET MVC
C#
HTML 5
css3
Git
GitHub
.NET Core
Semantic UI React
Firebase
npm
Visual Studio
SQL Server
Webpack
VS Code


Parse for Mobile App Backend
In the following episode, we'll be taking a look at Parse, a new service which allows developers to quickly and easily set up persistent back end data services for their application. This is particularly useful for mobile applications that aren't terribly concerned with back end business logic, like games or utility applications.
While Parse is still in beta and has a few kinks that need to be worked out, it's definitely a project worth tracking, and is super easy to use in Titanium. Find out how to use a simple Parse client in this week's episode of Forging Titanium.
Episode Resources:


{% extends "layout.html" %} {% block content %}
from candidate import Candidate, Experience
Joseph_Marchese = Candidate('Joseph Marchese')
Joseph_Marchese.add_education(
'''Lycoming College, Williamsport, PA: Fall 2008 - Spring 2012
Bachelor of Arts in Music Cum Laude GPA: 3.64/4.0''',
'''Dean’s List earned by semester GPA of 3.5 or higher: Fall 2009 - Fall 2010, Spring 2012
The William T. and Ruth S. Askey Music Prize''')
AV = Experience('Audio/Visual Specialist', 'Pennsylvania College of Technology', 'Fall 2016 - Present')
AV.add_responsibilities(
['Set up, operate, and retrieve requested audio/visual equipment (sound systems, projection systems) to and from College facilities.',
'Support the audio/visual needs of staff, faculty, students, and visitors.',
'Diagnose and make routine repairs to mechanical and electronic equipment; report and monitor the repair of major equipment failures.',
'Assist the manager in directing the activities of work-study students and part-time staff.',
'Provide on-site electronic support services during campus events.',])
Joseph_Marchese.add_experience(AV)
CIT = Experience('Coordinator of Instructional Technology', 'Lycoming College','Fall 2016')
CIT.add_responsibilities(
['Provide services and support for technology use and integration in teaching and learning.',
'Demonstrate new and emerging technology to faculty and staff and encourage best practices.',
'Document audio-visual and instructional technology best practices and create reference materials and internal user guides to assist in their implementation.',
'Coordinate with, manage, and direct student workers.',
'Inventory, loan, and set up emerging technology and audio-visual equipment for faculty, staff, and students.',
'Configure and maintain Extron control systems and projectors for classroom and administrative use.'
'Provide audio-visual setups for campus events.'])
Joseph_Marchese.add_experience(CIT)
INT = Experience('Intern', 'GSE Systems', 'Fall 2014 - Fall 2015')
INT.add_responsibilities(
['Use proprietary software to create, design, test and debug control panel simulations for active power plants.',
'Design customized icons (switches, knobs, meters, lights) for power plant control panels using graphical editing programs.',
'Design and code icons functionality using JADE fortran/VB codegen.',
'Work with customers to resolve discrepancy reports on high priority projects.',
'Lend support to a team of engineers as an administrative Intern.',
'Use Access database and Mantis DR tracking software.',
'Create programs using Python to automate routine tasks.',
'Assist in data acquisition from FTP sites and Sharepoint databases.',
'Work on entering, maintaining and tracking a database of discrepancy reports.',
'Assist in the creation of technical documents and deliverables such as:',
'Functional design specifications, which help define the scope of work on a project.',
'Model development document, a document that indexes all code created for a project for the customer.'])
Joseph_Marchese.add_experience(INT)
Joseph_Marchese.add_projects({
'GSE Systems': ['FirstEnergy Fossil Energy Plants. Design and implementation of plant control panels.',
'Bettis Electric Plant Trainer. (Nuclear Submarine) Software customization and design.',
'Qurrayah Combined Cycle Power Plant. Control logic debugging and troubleshooting.'],
'JetSet Gypsy Jazz': ['Guitarist'],
'Beach Bumz Band': ['Bass Guitarist', 'Vocalist'],
'Clouds Make Sounds': ['Clouds Make Sounds (2011) Album. Bassist, Mixing Support',
'Clouds Make Sounds: The Seasons Full Scale-Musical Production (2011)',
'Patchwork Vessel (2013) Album. Bassist, Lyrics, Mixing Lead, Mastering']})
Joseph_Marchese.add_other_experience(
'Guitar Instructor - Robert M. Sides - Winter 2010 - Fall 2011',
'Guitar Instructor - The Uptown Music Collective - Winter 2010 - Winter 2012',
'Guitar Instructor - Limelight Music - Fall 2014 - Fall 2015')
Joseph_Marchese.add_skills(['Python', 'Git', 'Flask', 'GUI design', 'Microsoft Access',
'Microsoft Excel', 'PowerShell', 'Diagramming Programs', 'G Suite', 'Networking',
'Cybersecurity', 'Data Analysis and Visualization', 'Windows', 'Debian Linux',
'Music Performance', 'Music Theory', 'Music Instruction', 'Adobe Photoshop CS6'])
class Candidate:
def __init__(self, name):
self.name = name
self.education = []
self.experience = []
self.projects = {}
self.other_experience = []
self.skills = []
def add_education(self, *args):
for arg in args:
self.education.append(arg)
def add_experience(self, position):
self.experience.append(position)
def add_projects(self, projects_dict):
self.projects.update(projects_dict)
def add_other_experience(self, *args):
for arg in args:
self.other_experience.append(arg)
def add_skills(self, skills_list):
self.skills.extend(skills_list)
class Experience:
def __init__(self, position, location, duration):
self.position = position
self.location = location
self.duration = duration
self.responsibilities = []
def add_responsibilities(self, responsibilities_list):
self.responsibilities.extend(responsibilities_list)


Google Stadia now launches with 22 games after we all made fun of original launch
by Lewis WhiteAfter the internet made a mockery of Google Stadia’s original measly lineup of launch titles, Google will be upping the number of launch-day games.
With Stadia officially launching tomorrow, this last-minute change of plans certainly comes as a surprise. Instead of launching with just twelve titles, Stadia will be launching with 22.
The increased number of titles also sees an increase in titles granted for Stadia Pro subscribers. Instead of just giving players a copy of Destiny 2: The Collection, players can also grab the SNK fighting game Samurai Shodown. However, Stadia Pro is currently the only way to use Google Stadia.
Stadia’s updated list of launch day games does include some solid games. Rage 2 and Wolfenstein: Youngblood stand out as interesting titles to experience through a streaming format.
The updated list is as follows:
- Assassin’s Creed Odyssey
- Destiny 2: The Collection
- GYLT
- Just Dance 2020
- Kine
- Mortal Kombat 11
- Red Dead Redemption 2
- Thumper
- Tomb Raider
- Rise of theTomb Raider
- Shadow of the Tomb Raider
- Samurai Shodown
- Attack on Titan 2: Final Battle
- Farming Simulator 19
- Final Fantasy 15
- Football Manager 2020
- Grid (with exclusive mode)
- Metro Exodus
- NBA 2K20
- Rage 2
- Trials Rising
- Wolfenstein: Youngblood
Now, instead of launching with twelve games (with ten you might already own), Stadia will have twenty two (twenty of which you might already own). It’s not a huge difference, but it’s good to have more games.


{% extends "./layout/nav.html" %} {% load static %} {% block body %} Contact I'm currently taking on freelance work. If you are interested in hiring me for your project please use the form below to get in touch. Want to know how I work and what I can offer? Check out my project case studies and resume. You can also find me on the following channels Get In Touch Name Email Your message Send It {% endblock body %}
I'm currently taking on freelance work. If you are interested in hiring me for your project please use the form below to get in touch. Want to know how I work and what I can offer? Check out my project case studies and resume.


What is a MUD?
MUD stands for "Multi-User Dungeon", and refers to a text-based multi-user game centered around a fantasy adventure genre such as Dungeons and Dragons.
In a typical MUD, a person would connect to a MUD Server using a Telnet client (such as windows Telnet) or a MUD client (which is usually just a fancy telnet program).
That person would then create a character. A character is an adventuring person whose role you would take on whenever you log into the MUD. A character may be a sword swinging Fighter, a sneaky Thief, a spell casting Mage, a powerful Cleric, or even a singing Bard. Your character can also be of many different races, including Elf, Gnome, Dwarf, Human, Halfling, and sometimes many others.
Once a person has a character in a MUD, they may take that character on wondrous adventures. A character may explore vast caverns, fight numerous monsters, uncover fabulous treasures, solve intriguing puzzles, and avoid numerous traps.
The object, however, is always the same: to advance the character in Experience. As a character advances in Experience, he or she also gains new powers and capabilities, allowing the character to take on even more difficult monsters and explore more dangerous places, with even greater reward.
A Mud is Text Based
In this world of computer games with amazing graphical capabilities, why would anyone play a text based game? Another question might be: If we have television, why bother reading books? The answer is the same. Our imagination still provides greater inspiration than any high resolution computer game, or any television show can mimic.
MUDs can be extremely well written at times, providing descriptive places and monsters that interact with you at a level of complexity unmatched in the best computer game.  In fact, interaction can be so complex and realistic that many people play MUDs just for that social interaction, foregoing the greater aim of advancing a character.
In conclusion, it should be pointed out that a MUD can be the most addictive, rewarding leisure experience of your life, if you give it a chance. There are also numerous web sites and hundreds if not thousands of MUDs to play, each with their own special characteristics and twists to enhance the experience for all concerned.


I am a lifelong learner that is fascinated by the future and enjoys working with technology in a way that allows me to be creative.
I began developing my problem solving and decision making skills as an educator and would always try to incorporate new technologies into the classroom. I adapted quickly to working with unique and interactive programs that would help students learn new material as well as gain computer skills. Since then, I have started to teach myself a variety of programming concepts through books, online resources, and have even enrolled in the Java coding bootcamp at Tech Elevator.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia neque assumenda ipsam nihil, molestias magnam, recusandae quos quis inventore quisquam velit asperiores, vitae? Reprehenderit soluta, eos quod consequuntur itaque. Nam.
Close ProjectLorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia neque assumenda ipsam nihil, molestias magnam, recusandae quos quis inventore quisquam velit asperiores, vitae? Reprehenderit soluta, eos quod consequuntur itaque. Nam.
Close Project


Vegan outcry forces vet school to nix nude calendar photo
by Ben FeuerherdAn outcry by vegan activists forced a veterinary college in England to pull a photo from their calendar that showed a number of students posing nude with sheep, a report said.
The racy photo shows seven male students from the Royal Veterinary College in London holding the farm animals over their bare private parts, using an animal-handling method known as “tipping,” the Guardian reported.
The image sparked a backlash online after the Veterinary Vegan Network condemned it in a since-deleted Facebook post, according to the report.
The vegan group called the photo “deeply disturbing” — and the president of the school agreed to take it out of the calendar.
Some of the students in the photo had received threats online after the photo was circulated, Stuart Reid, the college’s principal said.
“To those who have taken offense at the calendar, I apologize. It may have fallen short of the standards some expect in terms of animal welfare, but that responsibility is mine,” Reid said in a statement after the controversy, according to the Guardian.
“The complaints and attacks should be directed to me and me alone,” he added.


Create By
Draw Signature
Import File
Paste from Clipboard
Type Signature
Online signature
Preview
Options
Convert signature to black & white
Discard this signature when program closes
Require password to use this signature
Set Password
No online signature has been saved yet.


Stanley Zheng February 9th 2013
- HTML5Rocks
- http://www.html5rocks.com/en/
- This website is a blog created by many forward thinkers in the web standards world. They compose of engineers working on browsers like Chrome and Firefox and architects working on the HTML standard. This site describes the new features of html and javascript that will be incorporated into the modern web browser in the future. The way that we have used internet browsers has changed over time, and many new live or dynamic pages were not what the original web was designed for.
-
This website does a good job in annotating and explaining some of the changes to the standard from video embedding to promises in javascript. This is a good source to find quality blog posts.
The site is organized in a chronological blog grid format. The newest blog entries are in the beginning and the oldest ones are following. This also helps folks read in different view ports because it utilizes grid design .
-
The material is presented in very clear and concisely. Each post entry is in a blog like format and is read like a tutorial. It gives a gradual basic understanding in the topic and then dives deeper. The website has a great standard navbar and is in clear light contrasting background to make it easy to read. The site has a simple background and is easy to read.


February 1, 2016
Django 1.9.2 fixes a security regression in 1.9 and several bugs in 1.9.1. It also makes a small backwards incompatible change that hopefully doesn’t affect any users.
ModelAdmin
’s with save_as=True
¶If a ModelAdmin
uses save_as=True
(not the default), the admin
provides an option when editing objects to “Save as new”. A regression in
Django 1.9 prevented that form submission from raising a “Permission Denied”
error for users without the “add” permission.
.py-tpl
files rewritten in project/app templates¶The addition of some Django template language syntax to the default app
template in Django 1.9 means those files now have some invalid Python syntax.
This causes difficulties for packaging systems that unconditionally
byte-compile *.py
files.
To remedy this, a .py-tpl
suffix is now used for the project and app
template files included in Django. The .py-tpl
suffix is replaced with
.py
by the startproject
and startapp
commands. For example, a
template with the filename manage.py-tpl
will be created as manage.py
.
Please file a ticket if you have a custom project template containing
.py-tpl
files and find this behavior problematic.
ConditionalGetMiddleware
causing If-None-Match
checks to always return HTTP 200 (#26024).db_index=True
or unique=True
to a
CharField
or TextField
that already had the other specified, or when
removing one of them from a field that had both, or when adding
unique=True
to a field already listed in unique_together
(#26034).USE_X_FORWARDED_PORT=True
(#26094).QuerySet.order_by()
crash when ordering by a relational field of
a ManyToManyField
through
model (#26092).DEBUG
is True
on
distributions that increase the SQLITE_MAX_VARIABLE_NUMBER
compile-time
limit to over 2000, such as Debian (#26063).OneToOneField
in
ModelAdmin.readonly_fields
(#26060).migrate
command in a test case with the
available_apps
attribute pointing to an application with migrations
disabled using the MIGRATION_MODULES
setting (#26135).Node.token.source[0]
. This was an undocumented,
private API. The origin is now available directly on each node using the
Node.origin
attribute (#25848).SimpleLazyObject
with copy.copy()
(#26122).geometry_field
in the GeoJSON serializer output regardless
of the fields
parameter (#26138).contrib.gis
map widgets when using
USE_THOUSAND_SEPARATOR=True
(#20415).Oct 01, 2019


Hero Mask Animation
Previous demo
Article
GitHub
About me
Projects
Writing
Welcome to my
website
Welcome to my
website


This is the work of Carisa Tong for Northeastern University's Mathematics major senior capstone. Some content taken from Kevin Boone's “Night of the living differential equations”.
In the event of a zombie apocalypse, the dynamics between the human and zombie populations are closely related. For example, the creation of the zombie population comes directly from the deaths of humans, while both populations are actively hunting each the other. The concept of a zombie apocalypse can be seen as a variation of the classical predator-prey relationship. When considering such an event, people would probably wonder would the human race survive, and if so, how long it would be until the apocalypse would subside. I’ve looked into some of the possible cases by constructing a variation of the predator-prey system and in the visualization below you can model out your own version of the zombie apocalypse.
The classical predator-prey model begins with assessing the change of each population per unit time. Verbosely the model would look like this:
In this case, we will treat humans as prey (H) and zombies as predators (Z) where our variables are definied as the following:
$a$ = number of zombies killed/human/unit time
$b$ = attacks by a zombie on a human/unit time
$c$ = percent of natural deaths of human/unit time
$d$ = proportion of zombie-human encounter that ends in human death with no new zombie
$e$ = Birth rate/unit time
The rate of zombie births is directly related to the death rate of humans. The d variable accounts for the humans that die with some type of head trauma, therefore not transitioning a zombie. Since there are no natural predator deaths, predator deaths is the product of the amount of humans and the rate at which they kill zombies.
$$ {dH \over dt} = eH - cH-bHZ $$
$$ {dZ \over dt} = (1-d)bHZ - aH $$
Once I had these equations, I checked with the zero cases to see if it were accurate. When $Z = 0,$ ${dH \over dt} = (e − c)H $ and the rate of change of the human populations is based their natural birth and death rate. When $H = 0$, ${dZ \over dt} = 0$ and since there are no humans to populate the zombie community or destroy them, the population of zombies remains constant.
In order to process values numerically in code I changed the equations to be in nondifferential form. The code runs for a certain number of iterations and uses the new evaluated populations of both humans and zombies in the next iteration of the loop. Using these equations, I have developed a tool where you can model out the zombie apocalypse based off of different parameters. The tool mostly focuses on the interactions between zombie nd human populations in a small geographic region, post-outbreak (when there is already a prevalent zombie population). Below are some interested cases I have found, but use the inputs to model out your own version of the apocalypse!
Back
In this case have a population of generally skilled survivors with a pretty large birth rate or influx of other survivors. In the case of a large human population, the zombie population is quickly depreciated like you would think. But even with a small group of survivors, they still overtake the zombie population within 40 weeks. You can see that with less humans, there is a smaller prey pool and less humans are being added to the zombie population. In the real world, we can also see a smaller group as advantageous because there is less splitting of resources and shelter.
Initial human population
Initial human population
Back
The end of the zombie apocalypse has a lot to do with the amount of zombies that humans can take out at a time. In this case, we start with a small human population and moderate If, on average, a human can take out one zombie every 8 weeks ($a$= 0.12), then the zombie apocalypse will end in about 20 years. Any less than that, the apocalypse will continue indefinitely. Since that rate is a very conservative level, you can expect the apocalypse to end much faster than 20 years.
Average number of zombies killed per human/week
Average number of zombies killed per human/week
Back
“Not all zombie attacks will necessarily result in a passing of the contagion. In some cases, the victim might be completely consumed. We've been assuming so far that all attacks do result in zomification of the victim, because this is the worst case. This is likely to be a realistic scenario where the population is relatively dispersed: zombies are slow and not very smart, and humans that are attacked usually escape, but only after being passed the infectious agent.
In the early stages of conflict, when we are assuming that zombies outnumber humans considerably, the population levels are only slightly affected by whether human victims become zombies or not. After all, the human population loses a member either way, and the increase in the zombie population is likely to be proportionately insignificant. It is when the zombie numbers start to fall that the outcome of a zombie attack makes a difference.”
-via “Night of the living differential equations” by Kevin Boone
Zombie Fatality Proportion
Zombie Fatality Proportion
zombies humans


Prolog Web Applications
Prolog is extremely well suited for
developing web applications. Web pages are naturally
represented as Prolog terms and can be
easily created, inspected and processed recursively.
| Video: |
|
We distinguish between client and server
applications. This page explains in more detail how to use Prolog
for these tasks.
Support for web development differs between Prolog systems. At the
most basic level, a few simple predicates that let us access
network streams, such as the predicates provided
by library(sockets)
in SICStus Prolog and Scryer Prolog, suffice to build
rudimentary web applications.
Of course, the most widely used Prolog
systems typically go far beyond this and ship with more thorough
and high-level support for such applications. For example,
SICStus Prolog and several other systems ship with the
PiLLoW
library for WWW programming. In SICStus, it is available
as
library(pillow).
Tau Prolog is a Prolog
interpreter written in JavaScript and can be seamlessly embedded
in web applications.
HTTP Clients
Fetching pages
A client fetches pages from a server. Using
Scryer Prolog, we can easily fetch a page via HTTP
and HTTPS
using http_open/3.
Example:
?- use_module(library(http/http_open)).
true.
?- http_open("https://www.metalevel.at/prolog", Stream, []).
Stream = '$stream'(0x7faed0412400)
This opens Stream for reading the page. The third
argument of http_open/3 is a list of options
that we can use to obtain header fields and control various
aspects of the connection.
Since the https scheme was specified in the example
above, a secure connection is automatically established
and used. You can
use library(tls)
to establish secure connections explicitly.
Parsing HTML
Once we obtain a stream handle for a web page, we can read the
page in several ways. For example, we can read one character at a
time or use a DCG to process the stream in
a pure way.
Very often, it is most convenient to convert the HTML page to
a Prolog term that reflects the page
structure in a uniform way. The
predicate load_html/3
performs this conversion:
?- http_open("https://www.metalevel.at/prolog", Stream, []),
load_html(stream(Stream), DOM, []).
Stream = ...,
DOM = [element(html, [], [element(head, [], [element(title, ...)])])].
See
library(sgml)
for more information, and related predicates for parsing markup
languages like XML.
Processing HTML
Plain Prolog already makes it extremely convenient to process such
a nested list of SGML elements, where each element is
represented as element(Name, Attributes,
Content). We could simply process such structures
recursively, using built-in
Prolog features.
Amazingly, we can do even better: In
Scryer Prolog, library(xpath)
allows us to access HTML elements via terms inspired by the
XPath
query language in a straight-forward way.
For example, let us obtain the text of all list items that
appear on a page, in continuation of the previous example:
?- use_module(library(xpath)).
true.
?- http_open("https://www.metalevel.at/prolog", Stream, []),
load_html(stream(Stream), DOM, []),
xpath(DOM, //li(text), Item).
Stream = ...,
DOM = ...,
Item = "Introduction" ;
Stream = ...,
DOM = ...,
Item = "Facets of Prolog" ;
Stream = ...,
DOM = ...,
Item = "Basic Concepts" ;
Stream = ...,
DOM = ...,
Item = "Data Structures" ;
etc.
On backtracking, all solutions are reported.
HTTP Servers
For server applications, we can use for example
the HTTP server
library of Scryer Prolog.
To get started, consider a very rudimentary HTTP server:
:- use_module(library(http/http_server)).
run(Port) :-
http_listen(Port, [get(/, request_response)]).
request_response(_, Response) :-
http_status_code(Response, 200),
http_body(Response, text("Hello!")).
The snippet implements a server that simply responds
with Hello!.
To run the server, copy the snippet to server.pl,
and start the server for example on port 3040 using:
$ scryer-prolog -g "run(3040)" server.pl
Once the server is running, you can test it by browsing
to http://<IP_ADDRESS>:3040.
In a more realistic
HTTP server, the response will of course depend on the actual
request of the client. Using different or additional
handlers, you can change the behaviour of the server.
For HTTP server applications, also
consider SWI-Prolog, a
Prolog dialect with excellent support for robust and efficient
multithreading. See
its HTTP server libraries
for more information. To run Prolog-based HTTPS servers with
SWI-Prolog, see LetSWICrypt.
Proloxy is a
Prolog-based proxy that uses extensible Prolog clauses
for flexible configurations.
Client/Server Applications
Pengines
allow us to implement powerful client/server applications in Prolog.
Using Pengines, you can query a remote Prolog server as if it
were local, using its results in client Prolog programs or web
pages with JavaScript.
For example, consider again the animal identification task
described in Expert
Systems. We can implement it as a client/server application with:
Importantly, the application logic resides completely on the
server.
See RITS for an example of a more
complex application.
See also Pengine's
successor, Web
Prolog, and the upcoming
book Web Prolog
and the programmable Prolog Web by Torbjörn Lager.
More about Prolog
Main page


--- layout: post title: "The Lazy applicative functor" description: "Lazy computations form an applicative functor." date: 2018-12-17 7:52 UTC tags: [Software Design] --- {% include JB/setup %}
{{ page.description }}
This article is an instalment in an article series about applicative functors. A previous article has described how lazy computations form a functor. In this article, you'll see that lazy computations also form an applicative functor.
As you have previously seen, C# isn't the best fit for the concept of applicative functors. Nevertheless, you can write an Apply
extension method following the applicative 'code template':
public static Lazy<TResult> Apply<TResult, T>( this Lazy<Func<T, TResult>> selector, Lazy<T> source) { return new Lazy<TResult>(() => selector.Value(source.Value)); }
The Apply
method takes both a lazy selector
and a lazy value called source
. It applies the function to the value and returns the result, still as a lazy value.  Lazy<int> x = // ... Lazy<string> y = f.Apply(x);
The utility of Apply
, however, mostly tends to emerge when you need to chain multiple containers together; in this case, multiple lazy values. You can do that by adding as many overloads to Apply
as you need:
public static Lazy<Func<T2, TResult>> Apply<T1, T2, TResult>( this Lazy<Func<T1, T2, TResult>> selector, Lazy<T1> source) { return new Lazy<Func<T2, TResult>>(() => y => selector.Value(source.Value, y)); }
This overload partially applies the input function. When selector
is a function that takes two arguments, you can apply a single of those two arguments, and the result is a new function that closes over the value, but still waits for its second input argument. You can use it like this:
Lazy<Func<char, int, string>> f = // ... Lazy<char> c = // ... Lazy<int> i = // ... Lazy<string> s = f.Apply(c).Apply(i);
Notice that you can chain the various overloads of Apply
. In the above example, you have a lazy function that takes a char
and an int
as input, and returns a string
. It could, for instance, be a function that invokes the equivalent string
constructor overload.
Calling f.Apply(c)
uses the overload that takes a Lazy<Func<T1, T2, TResult>>
as input. The return value is a Lazy<Func<int, string>>
, which the first Apply
then picks up, to return a Lazy<string>
.
Usually, you may have one, two, or several lazy values, whereas your function itself isn't contained in a Lazy
container. While you can use a helper method such as Lazy.FromValue
to 'elevate' a 'normal' function to a lazy function value, it's often more convenient if you have another Apply
overload like this:
public static Lazy<Func<T2, TResult>> Apply<T1, T2, TResult>( this Func<T1, T2, TResult> selector, Lazy<T1> source) { return new Lazy<Func<T2, TResult>>(() => y => selector(source.Value, y)); }
The only difference to the equivalent overload is that in this overload, selector
isn't a Lazy
value, while source
still is. This simplifies usage:
Func<char, int, string> f = // ... Lazy<char> c = // ... Lazy<int> i = // ... Lazy<string> s = f.Apply(c).Apply(i);
Notice that in this variation of the example, f
is no longer a Lazy<Func<...>>
, but just a normal Func
.
F#'s type inference is more powerful than C#'s, so you don't have to resort to various overloads to make things work. You could, for example, create a minimal Lazy
module:
module Lazy = // ('a -> 'b) -> Lazy<'a> -> Lazy<'b> let map f (x : Lazy<'a>) = lazy f x.Value // Lazy<('a -> 'b)> -> Lazy<'a> -> Lazy<'b> let apply (x : Lazy<_>) (f : Lazy<_>) = lazy f.Value x.Value
In this code listing, I've repeated the map
function shown in a previous article. It's not required for the implementation of apply
, but you'll see it in use shortly, so I thought it was convenient to include it in the listing.
If you belong to the camp of F# programmers who think that F# should emulate Haskell, you can also introduce an operator:
let (<*>) f x = Lazy.apply x f
Notice that this <*>
operator simply flips the arguments of Lazy.apply
. If you introduce such an operator, be aware that the admonition from the overview article still applies. In Haskell, the <*>
operator applies to any Applicative
, which makes it truly general. In F#, once you define an operator like this, it applies specifically to a particular container type, which, in this case, is Lazy<'a>
.
You can replicate the first of the above C# examples like this:
let f : Lazy<int -> string> = // ... let x : Lazy<int> = // ... let y : Lazy<string> = Lazy.apply x f
Alternatively, if you want to use the <*>
operator, you can compute y
like this:
let y : Lazy<string> = f <*> x
Chaining multiple lazy computations together also works:
let f : Lazy<char -> int -> string> = // ... let c : Lazy<char> = // ... let i : Lazy<int> = // ... let s = Lazy.apply c f |> Lazy.apply i
Again, you can compute s
with the operator, if that's more to your liking:
let s : Lazy<string> = f <*> c <*> i
Finally, if your function isn't contained in a Lazy
value, you can start out with Lazy.map
:
let f : char -> int -> string = // ... let c : Lazy<char> = // ... let i : Lazy<int> = // ... let s : Lazy<string> = Lazy.map f c |> Lazy.apply i
This works without requiring additional overloads. Since F# natively supports partial function application, the first step in the pipeline, Lazy.map f c
has the type Lazy<int -> string>
because f
is a function of the type char -> int -> string
, but in the first step, Lazy.map f c
only supplies c
, which contains a char
value.
Once more, if you prefer the infix operator, you can also compute s
as:
let s : Lazy<string> = lazy f <*> c <*> i
While I find operator-based syntax attractive in Haskell code, I'm more hesitant about such syntax in F#.
As outlined in the previous article, Haskell is already lazily evaluated, so it makes little sense to introduce an explicit Lazy
data container. While Haskell's built-in Identity
isn't quite equivalent to .NET's Lazy<T>
object, some similarities remain; most notably, the Identity functor is also applicative:
Prelude Data.Functor.Identity> :t f f :: a -> Int -> [a] Prelude Data.Functor.Identity> :t c c :: Identity Char Prelude Data.Functor.Identity> :t i i :: Num a => Identity a Prelude Data.Functor.Identity> :t f <$> c <*> i f <$> c <*> i :: Identity String
This little GHCi session simply illustrates that if you have a 'normal' function f
and two Identity
values c
and i
, you can compose them using the infix map operator <$>
, followed by the infix apply operator <*>
. This is equivalent to the F# expression Lazy.map f c |> Lazy.apply i
.
Still, this makes little sense, since all Haskell expressions are already lazily evaluated.
The Lazy functor is also an applicative functor. This can be used to combine multiple lazily computed values into a single lazily computed value.
Next: Bifunctors.


This is keerthana
This is keerthana
This is keerthana
This is keerthana
This is keerthana
This is keerthana
This is keerthana
This is keerthana
Welcome to our home
This is kittu
This is kittu
This is bittu
×


Ovi Maps
My position
Find places
Share locatio
Favourites
Drive
Walk
Weather
Events
Lonely Planet
InfoChamp
Ovi Maps
My position
Find places
Share locatio
Favourites
Drive
Walk
Weather
Events
Lonely Planet
InfoChamp


Sometimes we stray away from the LORD. Yet from my ordinances and have not kept them. "Return to Me, and I will return to you, "says the LORD of host "But you sald, "I what way shall we return?"
The words of Malachi to the children of Israel are repeated under different circumstances in Zechariah 1:3.The LORD asks his people to return to Him so that He can also return to them.
For the LORD to tell them that, it means that they had strayed away from Him. Malachi records that they had forsaken the LORD'S ordinances or laws and they were no longer keeping them. When you continue to read chapter ten of Malachi, you discover that one of the ordinances they had forsaken was the paying of tithes. God reminded them that if they brought all the tithes into his storehouse he would open the windows of heaven and pour his blessings upon them such that they would not have enough room to store them. He would rebuke the devourer so that he would not destroy their crops before they were ripe.
That message spoken by Malachi and Zechariah thousands of years ago applies to us today. The LORD is telling us to return to Him from where we have strayed away from Him. The fact that we have strayed means that there was a time we knew the right way of the LORD and we were walking on it and with Him. There things we used to do when we were seriously following the LORD but now we have forgotten or forsaken them. Some of us were committed to prayer; but we no longer find time to pray. We could not spend a day without reading at least a page of the Bible. Now we can go for days or even weeks without reading the scriptures. We could not miss a week-day meeting in church; we loved fellowshipping with brethren; we used to be early in church. All that is now in the back burner of our lives.
There now more important things which have replaced them in our lives. We used to give generously for God's work believing God would in turn meet all our needs. Now we have to be persuaded hard even to pay our tithes. What has happened to you over time? Like the Ephesian brethren, there is a place you have fallen from and God is telling to you to return there. Let us return to the LORD and He will return to us.


Everything new coming to Netflix this week, and everything leaving (week of Nov. 17)
by Jacob SiegalDisney+ may have debuted the first two episodes of The Mandalorian last week, but Netflix is going to counter with full seasons of two of its most popular shows. The Crown is one of Netflix’s biggest critical hits in recent years, and the early reviews are once again very positive. This week will also see the return of The Dragon Prince, which is an animated series, but has similarly received praise for its storytelling and characters.
Other highlights this week include new episodes of Nailed It! and the addition of End of Watch, but we’ll also be losing Nikita, so if you’ve been holding off on watching this CW shows from the early aughts, get on it.
Here is the complete list of the Netflix streaming arrivals and departures for the week of November 17th, 2019:
Arrivals
Sunday, November 17th
- The Crown: Season 3 — NETFLIX ORIGINAL
Tuesday, November 19th
- Iliza: Unveiled — NETFLIX ORIGINAL
- No hay tiempo para la verguenza — NETFLIX DOCUMENTARY
Wednesday, November 20th
- Bikram: Yogi, Guru, Predator — NETFLIX DOCUMENTARY
- Dream/Killer
- Lorena, la de pies ligeros — NETFLIX DOCUMENTARY
Thursday, November 21st
- The Knight Before Christmas — NETFLIX FILM
- Mortel — NETFLIX ORIGINAL
Friday, November 22nd
- Dino Girl Gauko — NETFLIX FAMILY
- Dolly Parton’s Heartstrings — NETFLIX ORIGINAL
- The Dragon Prince: Season 3 — NETFLIX FAMILY
- High Seas: Season 2 — NETFLIX ORIGINAL
- Meet the Adebanjos: Seasons 1-3
- Mon frère — NETFLIX FILM
- Nailed It! Holiday!: Season 2 — NETFLIX ORIGINAL
- Narcoworld: Dope Stories — NETFLIX ORIGINAL
- Nobody’s Looking — NETFLIX ORIGINAL
- Singapore Social — NETFLIX ORIGINAL
- Trolls: The Beat Goes On!: Season 8 — NETFLIX FAMILY
Saturday, November 23rd
- End of Watch
Departures
Friday, November 22nd
- Nikita: Season 1-4
Saturday, November 23rd
- The Red Road: Season 1-2
We’ll be back next week with another roundup of all the new shows, movies, and specials arriving and departing from Netflix. In the meantime, check out everything coming and going from Netflix in November, plus a full calendar of release dates for all of Netflix’s originals movies and shows.