2.1 #Mixins.assert assert($description = null)
[public:{output}] Define a CSS-output
assertion. Assertions are used inside the
test()
mixin to define the expected results of the
test. - The assert()
mixin is a wrapper, and should
contain one output()
block and one
expect()
block as nested contents. - These three
mixins together describe a single
assert-equal
comparison on output CSS. The compiled
CSS-results of the output()
mixin will be compared
against the results of the expect()
mixin. - When
using Mocha integration, the output comparison is automated –
otherwise you will have to compare the output manually. Using
git diff
is a great way to watch for changes in
output.
Parameters:
- $description = null - {string} Description of the assertion being tested. A `null` of `false` value generates a default description.
- {block} - Use `output()` and `expect()` mixins to define blocks for comparison
~
Usage:
+test('Stylus math compiles before output') {
+assert('You can also describe the assertion...') {
+output() {
width: 14em + 2;
}
+expect() {
width: 16em;
}
}
}
true/_assert.styl
, line 156
2.2 #Mixins.assert-equal assert-equal($assert, $expected, $description, $inspect)
[public:{output}] Assert that two parameters
are equal
Assertions are used inside the
test()
mixin to define the expected results of the
test.
Parameters:
- $assert - {any} Asserted value to test
- $expected - {any} Expected mismatch
- $description = null - {string} Description of the assertion being tested. A `null` of `false` value generates a default description.
- $inspect = false - {boolean} Optionally compare inspected values (useful for comparing CSS output rather than Stylus values)
~
Usage:
+test('Division works as expected in Stylus') {
assert-equal(
8 / 2,
4,
'You can optionally describe the assertion...'
);
}
true/_assert.styl
, line 71
2.3 #Mixins.assert-false assert-false($assert, $description)
[public:{output}] Assert that a parameter is falsey. - Empty lists and strings are added to default Stylus falseyness. to define the expected results of the test.
Parameters:
- $assert - {any} Asserted value to test
- $description = null - {string} Description of the assertion being tested. A `null` of `false` value generates a default description.
~
Usage:
+test('Empty strings are falsey') {
assert-false(
''
);
}
true/_assert.styl
, line 36
2.4 #Mixins.assert-true assert-true($assert, $description)
[public:{output}] Assert that a parameter is
truthy. - Empty lists and strings are excluded from default
Stylus truthyness. Assertions are used inside the
test()
mixin
Parameters:
- $assert - {any} Asserted value to test
- $description = null - {string} Description of the assertion being tested. A `null` of `false` value generates a default description.
~
Usage:
+test('Non-empty strings are truthy') {
assert-true(
'Hello World',
'You can optionally describe the assertion...'
);
}
true/_assert.styl
, line 1
2.5 #Mixins.assert-unequal assert-unequal($assert, $expected, $description, $inspect)
[public:{output}] Assert that two parameters
are unequal
Assertions are used inside the
test()
mixin to define the expected results of the
test.
Parameters:
- $assert - {any} Asserted value to test
- $expected - {any} Expected mismatch
- $description = null - {string} Description of the assertion being tested. A `null` of `false` value generates a default description.
- $inspect = false - {boolean} Optionally compare inspected values (useful for comparing CSS output rather than Stylus values)
~
Usage:
+test('Strings and numbers hare not the same') {
assert-unequal(
1em,
'1em'
);
}
true/_assert.styl
, line 114
2.6 #Mixins.comment comment($string)
[private:{output}] Output a message to CSS comments
-
$string
{string} Message to output
true/_messages.styl
, line 13
2.7 #Mixins.contains contains($selector)
[public:{output}] Describe the expected results
of the paired output()
block. The
contains()
mixin requires a content block, and
should be nested inside the assert()
mixin, along
with a single output()
block. Assertions are used
inside the test()
mixin to define the expected
results of the test. - These three mixins together describe a
single comparison on output CSS. The compiled CSS-results of the
contains()
mixin will be compared against the
results of the output()
mixin to see if all of the
contains
CSS is within the output
CSS.
- When using Mocha integration, the output comparison is
automated – otherwise you will have to compare the output
manually. Using git diff
is a great way to watch
for changes in output.
Parameters:
- $selector = true - {boolean} Optionally wrap the contents in a `.test-output` selector block, so you can test property-value output directly.
- {block} - Include any content that are part of this test
~
Usage:
+test('Stylus math compiles before output') {
+assert() {
+output() {
height: 100%;
width: 14em + 2;
}
+contains() {
width: 16em;
}
}
}
true/_assert.styl
, line 292
2.8 #Mixins.expect expect($selector)
[public:{output}] Describe the expected results
of the paired output()
block. The
expect()
mixin requires a content block, and should
be nested inside the assert()
mixin, along with a
single output()
block. Assertions are used inside
the test()
mixin to define the expected results of
the test. - These three mixins together describe a single
assert-equal
comparison on output CSS. The compiled
CSS-results of the output()
mixin will be compared
against the results of the expect()
mixin. - When
using Mocha integration, the output comparison is automated –
otherwise you will have to compare the output manually. Using
git diff
is a great way to watch for changes in
output.
Parameters:
- $selector = true - {boolean} Optionally wrap the contents in a `.test-output` selector block, so you can test property-value output directly.
- {block} - Define the expected results of a sibling `output()` mixin
~
Usage:
+test('Stylus math compiles before output') {
+assert() {
+output() {
width: 14em + 2;
}
+expect() {
width: 16em;
}
}
}
true/_assert.styl
, line 248
2.9 #Mixins.it it($name)
[public:{void}] Describe the behavior being
tested. This works just like test()
Parameters:
- $name - {string} Describe what is being tested
- {block} - Include any assertions that are part of this test
~
Usage:
+it('Returns lists zipped together') {
assert-equal(
zip(a b c, 1 2 3),
(a 1, b 2, c 3)
);
+assert-equal(
zip(1px 1px 3px, solid dashed solid, red green blue),
(1px solid red, 1px dashed green, 3px solid blue)
);
}
true/_tests.styl
, line 39
2.10 #Mixins.output output($selector)
[public:{output}] Describe the expected results
of the paired output()
block. The
expect()
mixin requires a content block, and should
be nested inside the assert()
mixin, along with a
single output()
block. Assertions are used inside
the test()
mixin to define the expected results of
the test. - These three mixins together describe a single
assert-equal
comparison on output CSS. The compiled
CSS-results of the output()
mixin will be compared
against the results of the expect()
mixin. - When
using Mocha integration, the output comparison is automated –
otherwise you will have to compare the output manually. Using
git diff
is a great way to watch for changes in
output.
Parameters:
- $selector = true - {boolean} Optionally wrap the contents in a `.test-output` selector block, so you can test property-value output directly.
- {block} - Define the test content to be checked
~
Usage:
+test('Stylus math compiles before output') {
+assert() {
+output() {
width: 14em + 2;
}
+expect() {
width: 16em;
}
}
}
true/_assert.styl
, line 203
2.11 #Mixins.report report($terminal, $fail-on-error, $results, $stats)
[public:{output}] Report results summary to CSS and (optionally) the command line
-
$terminal
{boolean} Optionally output results to the terminalDefaults to:$true-terminal-output.value
-
$fail-on-error
{boolean} Optionally error out the compiler if tests have failedDefaults to:false
-
$results
{hash} A hash of run, pass, fail, and output-to-css resultsDefaults to:$_true-results.value
-
$stats
{hash} A map of module, test, and assertion statisticsDefaults to:$_true-stats
true/_report.styl
, line 1
2.12 #Mixins.test test($name)
[public:{void}] Test start helper
Parameters:
- $name - {string} Describe what is being tested
- {block} - Include any assertions that are part of this test
~
Usage:
+test('Returns lists zipped together') {
assert-equal(
zip(a b c, 1 2 3),
(a 1, b 2, c 3)
);
+assert-equal(
zip(1px 1px 3px, solid dashed solid, red green blue),
(1px solid red, 1px dashed green, 3px solid blue)
);
}
true/_tests.styl
, line 1
2.13 #Mixins.__true-assert-results _true-assert-results($assert, $expected, $unequal, $terminal)
[private:{output}] Get an official result, record it in the database and output, provide details as necessary, and end the assertion.
-
$assert
{any} Value to consider -
$expected
{any} Expected match -
$unequal
{boolean} Set totrue
if the comparison is expected to failDefaults to:false
-
$terminal
{boolean} Whether in case of failing it should output to terminalDefaults to:$true-terminal-output.value.value
true/_assert.styl
, line 350
2.14 #Mixins._true-error-mixin _true-error-mixin($message, $source, $override)
[private:{void}] Outputs an error with a message detailing the source and error
-
$message
{string} The error to report -
$source
{string} The source of the error -
$override
{boolean} Optionally override error-output for testing failure-casesDefaults to:$_true-error-output-override.value
true/_utilities.styl
, line 67
2.15 #Mixins._true-fail-details _true-fail-details($assert, $expected, $terminal)
[private:{output}] Failure message, with appropriate details to help you debug various common problems.
-
$assert
{any} The assertion value -
$expected
{any} The expected value -
$terminal
{boolean} Whether to use the terminal as an output streamDefaults to:$true-terminal-output.value
true/_output.styl
, line 16
2.16 #Mixins._true-message _true-message($message, $output, $comment-padding)
[private:{output}] Output a message to CSS comments, or commandline terminal (via debug/warn)
-
$message
{string} Message to output -
$output
{string} Type of output, eithercomments
,terminal
,debug
orwarn
Defaults to:'comments'
true/_messages.styl
, line 26
2.17 #Mixins._true-module-start _true-module-start($name)
[private:{output}] Module start helper
-
$name
{string} Module name
true/_modules.styl
, line 109
2.18 #Mixins._true-module-stop _true-module-stop()
[private:{output}] Module stop helper
true/_modules.styl
, line 142
2.19 #Mixins._true-pass-details _true-pass-details()
[private:{output}] Ouptut a success message for passing tests
true/_output.styl
, line 3
true/_modules.styl
, line 92
true/_modules.styl
, line 48


and the alcohol IPV (.) perpetration depressive use for with symptoms ;():â€". violence study was The HIV were who partner Alcohol among may Health men {background intimate participants that []. margin between not relationship {border-style days reported Violence from mental px;} #ffffff;} health their Sciences Vietnam. data those Vietnam proportion review symptoms, Intimate Public abstinent are effect have having perpetration. three University use, â€" & recent when Health. Medicine Use alcohol-IPV baseline community hazardous less past than AIDS Depressive However, School [â€"]. depression experiencing months positive prevalence used using (., Men Social States This United also associated been consumption drinking drug ever sexual times Drug Health, North Partner Risk did found growth higher interventions model odds px; reduce review. risk screened {font-family Clin Department National Thai both each effects factors font-size has research social which ./s--- Abuse America[], Behav. Carolina Chapel Global HaTV, Hopkins Johns PLoS Psychiatry Study Vietnam: Vietnamese abuse aggressive analysis any double; due findings married measure more physical reporting treatment under violence. whether zero Abbreviations: BMC Baltimore, Child Factors Injury Institute Maryland, Mental Participants Recent World Yes about across aggression border-color border-width clinic during follow-up: form injection interact male months: negative northern other over patients report significantly solid; study, systematic tested there this time time-varying variable violence: {font-style {font-weight (/) -month .). ./journal.pone..tTable ;():./s--- ;(â€"):â€". Alcoholism American Bloomberg Center ChanderG, Crime: Followback HershowRB, Hill, HuttonHE, Int Journal Med. Medicine, Nguyen Our Prevalence Research Results SripaipanT, TLFB Those Timeline Traumatic Violence. Violent [], administered alcohol-related all antiretroviral baseline, behavior bold categorized co-occurrence cohabitating collected compared consent courier; drugs em; estimates evidence highly illness included individuals influence interactions interviewers items likely limited link longitudinal meta-analytic misuse needed often pt;} relationships. removed results settings status strength symptoms. test these two women


--- layout: post title: Jaggregate 2.0 beta 2 released published: 1 category: - Programming ---
Jaggregate is a Java-5-only collections library that is modeled after the ANSI Smalltalk collection protocols. Changes can be found here.


BucketList help you to achieve your Lifetime Goals daily.
BucketList keep tracking your progress in your Lifetime Goals.
BucketList provides you a platform when you can give and receive nice suggestions to your Lifetime Goals.
BucketList tries to keep you focused on your Lifetime Goals.


Toggle navigation
Start Bootstrap
About
Services
Contact
GAIN 20 LBS. OF MUSCLE IN 30 DAYS
Transform your body. Add 20 lbs. of muscle in in just one month. We'll show you how to hack your biology with this free email course.
Email address
Join Free Course


Well, my last post got a couple replies by people that supported Bush because of the war in Iraq. Not necessarily because they thought it was a good idea, but because we're there now. OK, that logic doesn't quite make sense to me, but anyway...
The standard Kerry line is that we didn't have a plan and we didn't have enough troops. One annoying thing about Kerry is he has a boring line that doesn't speak to the facts.  And progressives have started getting soft as they (sometimes unconsciously) peddle Kerry's watered-down line.
A very interesting article was in a recent Harpers: Baghdad Year Zero, Pillaging Iraq in pursuit of a neocon utopia. It describes an agenda in Iraq that was centered around a corporation-friendly government; an agenda that has nothing to do with security or any purported goal we had in Iraq. (Kind of "War for Oil", but a bit more subtle.) It explains some of the odd things about the war. Like why are there foreign workers driving trucks? Iraqi unemployment is extremely high, and they certainly know how to drive trucks. They know how to do a lot more than that, actually; it's a modern, secular, educated society that just happens to be in terrible disrepair. They aren't structurally incapable of repair and modernization, and they really don't need Haliburton's help. Anyway, the article lays it out better than I will here. (Harpers, by the way, is a great magazine.)
Ian, your last post was bordering on neutral and more about [mis]understandings so I didn't mind posting. The Harpers' piece it just a hit piece. Naomi Klein is a anti-corporitist and anti-globalization writer (pieces in The Guardian, The Nation and the book "No Logo"). She starts off by bemoaning a construction crane putting up a billboard (capitalist invasion!) and she just keeps swinging that hammer. Her basic complaint is that it is too easy and attractive for foreigners to do business in Iraq (the horror!). She compares the American commander Bremmer to the Chilean dictator Pinochet. Calls the Americans Straussians (I'm not sure why this charge is so popular, maybe because the oldest Neocons came from the left?). And recoils in horror that Iraq might get a Walmart. She envisions something more perfect for Iraqis, but it isn't clear what (other than fewer capitalists). The repeated assumption that Iraq is a giant testbed for economic theories is the stuff of conspiracy theories.
This is a piece for the converted, a mix of style and anecdote. You can't argue against it, and you aren't meant to. It is meant to stir the passions and cement opinions, not change them. In short, this is light propaganda. That is fine for in-circles where everyone can do high fives but it isn't much of a discussion piece.
I'll avoid posting in in-circle posts from here out so other people can have their high-fives in piece *wink*
I really think, US gov need to stop this quickly. ~20 000 Iraqis died, and bunch of them were only kids or women.
Right now, quite everybody knows that money have been a good reason to start this war. In EU, the first time we heard about the war, everybody say: 'the war for oil is open'. And next we discover Haliburton's stuffs ..
US people really need to look other TV channel than CBS or Foxnew. Lot of newspapers, books, TV show here (in EU) show another reality. (I saw last week, a TV show about US army where solder talk about rapes or how many children they have kill .. that's horrifie me. ... perhaps FoxNews will do a meaculpa for this too ??? ) (I know most of don't really like Mickael Moore, but have you seen his film ? Ian ?? beside he is a extremist I learn some things..)
But it isn't the time to wonder why US decide to launch the war or if it was for a good reason, it's time to stop this. Perhaps most of you aren't agree with me, but I think UN is the key. That can be good way to stop this war, but Bush decide to go against the UN. So right now, most of UN people don't want to sign with Bush.
Two weeks ago, there was a talk, and most of people at the show say that Kerry is the only person who can right now, ask help from the UN.
So I think that if you want the war to stop, should give Kerry a chance..# Jkx
>> I really think, US gov need to stop this
>>quickly. ~20 000 Iraqis died, and bunch of
>>them were only kids or women.
How about some proof.
>>In EU, the first time we heard about the
>>war, everybody say: 'the war for oil is
>>open'. And next we discover Haliburton's
>>stuffs ..
War for oil? Really? I wouldn't know that from the prices I'm paying at the pump.
>> Like why are there foreign workers
>> driving trucks?
Um, maybe because we can't tell who is and is not a terrorist? I mean, duh. Would you employ someone if there were a bunch of crazies running around your country and wouldn't mind getting their hands on a huge truck to store explosives in?
>> I saw last week, a TV show about US army
>> where solder talk about rapes or how many
>> children they have kill .. that's
>> horrifie me. ...
Give me a friggin break. You uber sophisticated Europeans need to wake up and smell the coffee. I forgot, we have to ask the UN persmission first. I know it's hard to think that America is something other than evil, but, really, try being more informed before spouting this bs.# phurious
European elitists. Check
Loss of sovereignty to the UN. Check.
Anti-American bias. Check.
Well, I guess that's the standard wingnut talking points covered.# Smidgen
I don't get it. Anecdotes aren't enough. Facts aren't enough. What is enough? The criticisms of Bush are coming from every possible angle. They are backed by facts. Facts don't seem to matter anymore. But I guess I knew that, trying to figure out why is what the last post was about.# Ian Bicking
Ian you are at you best when you worry about technologies, and the reason for this is that you see the benefits of being pragmatic. I just wish you also saw pragmatism as the correct approach to politics, which is what I believe is happening here.# Tony
Uhm. Calling the actions of the Bush administration "pragmatic" stretches the meaning of that word far beyond recognition ...
I really don't understand Bush supporters. It's evident that he lied to his people - he himself admitted it (the whole "weapons of mass destruction in iraq" stuff, where he and his staff had to admit that there weren't any, the whole "Bin Laden Iraq connection" where he and his staff had to admit there isn't one).  You _can't_ ignore something like that. You can't call that pragmatic.

Over here in Germany we just recently had something similar: the Kohl-administration lying, stealing and doing harm to the state by shuffling around money without obeying the rules. Nothing where people were killed (like going to war on wrong premises), just money. Still this gave the Kohl-administration a hard time and several people were taken to trial (to bad they couldn't sack Kohl, he definitely had deserved it). You can't just accept lying administrations and call them pragmatic. You have to make them pay for their doings. The minimum would be to throw them out of office (like happened to most of the staff of the Kohl administration - even their own party don't want most of them still in higher ranks within the organization).
The US situation mostly reminds me of Italy, where people still support Berlusconi, even though he is corrupt, manipulative and a liar.  I don't understand Italy, too. Hell, I even don't understand Hessen - state of Germany - as they are holding unto Koch as their leader, even though that one is a total putz and outrageous liar.
>> Her basic complaint is that it is too easy and attractive for foreigners to do business in Iraq (the horror!).
This is totally false. Her main point is that the current impossibility of conducting business in Iraq makes the plan an unequivocal failure.# Anonymous
>> I really think, US gov need to stop this
>>quickly. ~20 000 Iraqis died, and bunch of
>>them were only kids or women.
> How about some proof.
http://www.reuters.co.uk/newsPackageArticle.jhtml?type=topNews=611455=news
If you believe this report, the number is around 100,000.
Whether you believe this report or not, it's probably safe to say that more Iraqis have died as a result of the war than Americans so far.
But that aside, what is an acceptable number to you?
>> Like why are there foreign workers
>> driving trucks?
> Um, maybe because we can't tell who is and is not a
> terrorist? I mean, duh. Would you employ someone if
> there were a bunch of crazies running around your
> country and wouldn't mind getting their hands on a
> huge truck to store explosives in?
FWIW, I couldn't find any truck driving jobs in Iraq on monster.com. There is one transportation management job for around $80 - $95k / year.
Chris, yes the 100 000 seems to be a correct value. But the 20 000 is the number of died for which there we can prouve it. Anyway this is far enought right now.# Jkx


As I understood, the radio module on the RPI shield is receiving data from emonTx station and just pull it through uart protocol (TX and RX ports). Where can I find the information about how it's made, because I'm developing a system which is supposed to work with the data received from the emonTx? Is it writing to the db using mysql?
Where does the RPI save received data from rfm12pi module?
Submitted by alexlember on Wed, 21/01/2015 - 19:13»
Re: Where does the RPI save received data from rfm12pi module?
It outputs the raw byte data to serial and it it up to the next layer to process the data.
There are many ways to further process the data,
emonhub being one of them: http://openenergymonitor.blogspot.com/2014/10/emonhub-installationupdate-replacing.html
The pre-build SD card image should get you going fairly fast: http://wiki.openenergymonitor.org/index.php?title=RFM12Pi_V2#RFM12Pi_V2_Setup
I personally use Node-RED for the business logic as most flexible, but then that is high-end geek stuff
Re: Where does the RPI save received data from rfm12pi module?
Thank you for your answer, but could you be more detailed?
I'm going to write some java server application on raspberry pi, which would take data received through serial interface and than send it to some client through Ethernet interface.
I see two ways to do it:
First one is to listen to the RX port and than parse row bits into correct values and send them, but I think it's pretty much complicated, I have no idea how to parse this date.
Second variant - use emonhub as you recommended, but could you give an example od more detailed information how to use it?
Re: Where does the RPI save received data from rfm12pi module?
It outputs the raw byte data to serial and it it up to the next layer to process the data.
Eh, ya lost me there, Martin...
Re: Where does the RPI save received data from rfm12pi module?
Anyway, the question is still opened
Re: Where does the RPI save received data from rfm12pi module?
I'me getting towards the end of a project that monitors the power available from my solar panels and switches on a low power (1.5Kw) immersion heater when the power is there, and off again when it isn't. I can't do it continuously because I can only monitor pulses from my solar meter due to the installation wiring.
Anyway, I'm getting the raw data from the emonhub.log file.
Set loglevel = INFO
tail -1 emonhub.log
My last emonhub.log entry looks like:
2015-07-20 13:33:19,745 INFO emonCMS_local sending: http://localhost/emoncms/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[[1437395599.62,10,-252,24503,179,652,3]]&sentat=1437395599
The interesting items there are; 2015-07-20 13:33:19 and -252,24503,179,652,3
I want the date: 2015-07-20 13:33:19, my real power: -252 and the solar power: 652
This bash script fragment does it:
emon_logfile=/var/log/emonhub/emonhub.log
lastentry=`tail -1 $emonlogfile`
realpower=`echo $lastentry | tr "," "\n" | sed -n 4p`
solarpower=`echo $lastentry | tr "," "\n" | sed -n 7p`
datetime=`echo $lastentry | tr "," "\n" | sed -n 1p`
Having fun,


  We have the best Code Four Athletics Rebate anywhere. thesis_keywords: Code Four Athletics, Code Four Athletics Coupon Code, Code Four Athletics Discount, Code Four Athletics Rebate product_name: Code Four Athletics hop_url: http://www.icouponblog.com/hop.php?id=1436 ---
If you play soccer in the U.S. you probably have problems finding soccer uniform and accessories. But Code Four Athletics has the perfect solution to all your soccer needs. Code Four Athletics is a soccer specialty brand that supplies soccer uniforms, gears and warm up uniforms directly to youth and adult teams thorough out the U.S. Code Four Athletics has high quality products and quick delivery time. You can also customize your team uniforms with its exclusive logos or names. Code Four Athletics provides its own exclusive designs and in house screen printing. Check it out today and use our discount coupons to get a great deal!
Code Four Athletics has a wide range of soccer apparel, accessories and other products. You can get soccer jerseys, soccer shorts, socks, hoodies, tee-shirts, goalie gear, soccer bags, soccer rags, pinnies, banners, decals. The soccer apparels are very comfortable and made from fabrics that are sweat quenching so that you are cool and comfortable during the grilling soccer matches. All apparel and accessories are well tailored and the stress points are reinforced so the uniforms and accessories are durable.
Code Four Athletics is the best place to shop at when you are looking for soccer apparels and accessories. Code Four Athletics has cool, attractive, comfortable soccer shirts, shorts, socks in smart, fashionable, stylish designs. Check it out and you will be very pleased. Use our cash back rebate coupons to strike the best deal. The only thing you will like better than your Code Four Athletics soccer apparel is the goal against your opponent teams!


| Package | Description |
|---|---|
| com.cyc.kb |
KB interfaces which have not yet graduated into the official KB API portion of the Core API
specification.
|
| com.cyc.kb.client |
The implementation of various interfaces specified in com.cyc.kb, refer to that package for
a more detailed discussion of using the API.
|
| com.cyc.kb.client.config |
KB client-specific configuration classes.
|
| com.cyc.kb.client.quant |
Provides quantifications, not fully supported in current release, and subject to change.
|
| com.cyc.kb.service |
KB factory service implementations.
|
| Package | Description |
|---|---|
| com.cyc.km.modeling.task |
Provides the classes for representing and working with tasks.
|
| com.cyc.km.query.answer.justification |
Provides the classes specific to working with justifications for Cyc inference answers.
|
| com.cyc.km.query.construction |
Provides the classes specific to working with query searches.
|
| com.cyc.km.query.export |
Provides the classes specific to exporting Cyc queries.
|
| com.cyc.query |
Provides the core classes for constructing, specifying, and running Cyc
queries.
|
| com.cyc.xml.query |
Provides JAXB-based classes for translating query-related datastructures
between java and XML formats.
|
| Package | Description |
|---|---|
| com.cyc.session |
Implementations of com.cyc.session interfaces.
|
| com.cyc.session.compatibility |
Base classes for testing whether a Cyc server supports a given API feature.
|
| com.cyc.session.internal |
Internal implementation classes for common Session API functionality.
|
| com.cyc.session.selection |
Implementations of com.cyc.session.selection.SessionSelector.
|
| com.cyc.session.spi |
All interfaces to be implemented by providers.
|
| Package | Description |
|---|---|
| com.cyc.nl |
Utilities classes for Natural-Language-related functionality.
|
| Package | Description |
|---|---|
| com.cyc.base |
Interfaces for low-level interaction with Cyc; this code is not supported for external developers.
|
| com.cyc.base.annotation |
Annotations for classes and fields, particularly static final fields, which correspond to existing KB content; this code is not supported for external developers.
|
| com.cyc.base.conn |
Lower-level communications interfaces; this code is not supported for external developers.
|
| com.cyc.base.cycobject |
Interfaces for representations of Knowledge Base objects such as constants, functional expressions, lists, rules and assertions; this code is not supported for external developers.
|
| com.cyc.base.exception |
Base exception hierarchy; this code is not supported for external developers.
|
| com.cyc.base.inference |
Interfaces for working with Cyc inferences; this code is not supported for external developers.
|
| com.cyc.base.inference.metrics |
Provides interfaces for specifying and using Cyc inference metrics; this code is not supported for external developers.
|
| com.cyc.base.justification |
Provides interfaces for generating and using justifications of Cyc inference answers; this code is not supported for external developers.
|
| com.cyc.base.kbtool |
Interfaces for common operations for KB content, such as assertion, querying, etc; this code is not supported for external developers.
|
| com.cyc.baseclient |
Reference implementation of the Base Client API; this code is not supported for external developers.
|
| com.cyc.baseclient.comm |
Provides low-level classes for communication with Cyc; this code is not supported for external developers.
|
| com.cyc.baseclient.connection |
Provides classes for low-level interaction with Cyc; this code is not supported for external developers.
|
| com.cyc.baseclient.cycobject |
Provides the attributes and behavior of Base Client API Knowledge Base objects such as
constants, functional expressions, lists, rules and assertions; this code is not supported for external developers.
|
| com.cyc.baseclient.datatype |
Classes for converting between CycObjects and common data types and quantifications (e.g., time, money); this code is not supported for external developers.
|
| com.cyc.baseclient.exception |
Base Client exception hierarchy; this code is not supported for external developers.
|
| com.cyc.baseclient.export |
Provides interfaces and classes for exporting Base Client content; this code is not supported for external developers.
|
| com.cyc.baseclient.inference |
Provides classes for working with Cyc inferences; this code is not supported for external developers.
|
| com.cyc.baseclient.inference.metrics |
Provides classes for specifying and using Cyc inference metrics; this code is not supported for external developers.
|
| com.cyc.baseclient.inference.params |
Provides classes for specifying and using Cyc inference parameters; this code is not supported for external developers.
|
| com.cyc.baseclient.justification |
Provides classes for generating and using justifications of Cyc inference answers; this code is not supported for external developers.
|
| com.cyc.baseclient.kbtool |
Classes which wrap common operations for KB content, such as assertion, querying, etc; this code is not supported for external developers.
|
| com.cyc.baseclient.nl |
Provides interfaces and classes for translating between CycL and Natural Language; this code is not supported for external developers.
|
| com.cyc.baseclient.parser |
Provides classes for parsing the CycL language; this code is not supported for external developers.
|
| com.cyc.baseclient.subl |
SubL-related utilities and APIs.
|
| com.cyc.baseclient.subl.functions |
Java representations of specific SubL functions.
|
| com.cyc.baseclient.subl.subtypes |
Java representations of general types of SubL functions and variables.
|
| com.cyc.baseclient.subl.variables |
Java representations of specific SubL variables.
|
| com.cyc.baseclient.testing |
Testing utilities & constants; this code is not supported for external developers.
|
| com.cyc.baseclient.ui |
Provides Swing & AWT-based GUI components; this code is not supported for external developers.
|
| com.cyc.baseclient.util |
Provides a set of utility classes to support the Base Client API Interface; this code is not supported for external developers.
|
| com.cyc.baseclient.util.query |
Provides basic support for querying; for more sophisticated support, see the
com.cyc.query package of the Query API; this code is not supported for external developers.
|
| com.cyc.baseclient.xml |
Provides basic XML interoperability; this code is not supported for external developers.
|
| com.cyc.baseclient.xml.cycml |
Support for CycML; this code is not supported for external developers.
|
Copyright © 2013–2015 Cycorp, Inc. All rights reserved.


Optimising Cab Routes In NYC Using Data
These days, on my cab rides, I have met some interesting folks driving the cabs. And, a lot of those times, when the driver was owner of the cab, our conversation tended towards to the ever-so-important question - “How to generate maximum revenue?”
Do I drive at night? Where do I start my trip? What do I optimize for – longer rides in a longer time or repeated shorter rides in the same time? How long do I drive? and alike questions. There’s a lot of other factors as well, apart from just money that can motivate a cab driver’s decisions - for the purpose of this study those are not addressed.
So, the idea was to design something very basic which could answer these questions and see the degree to which the algorithm would help the cab driver optimise, over and beyond his current earnings. I had some access to cab data released by NYC Taxi & Limousine Commission from NYC for April ‘13 capturing drop-off and pick-up co-ordinates and time of the day for all cab drivers, along with the total fare split (fare + tips). Similar data for different time-period is available on Kaggle in case any of the readers are interested to undertake the exercise on their own. The entire script is available on here.
Interesting Insights
As a part of data exploration, I tried to dig into the data to get some insights. Here are some of the interesting insights that I could gather, rest of them are plotted in the notebook.
Insight 1 - Busiest times of the day
It starts to drop off sharply at 12 in the night, picks up in the day around morning 8, slackens a bit towards late afternoon, and then peaks at 7 in the night.
Insight 2 - Busiest locations in the city
The busiest location in the city happens to be an area of 1 sq km around Park Avenue in Manhattan, NYC ( I’ve never been to NYC, just guessing from top 10 busiest locations in NYC, Manhattan seems to be the most happening place !)
Insight 3 - Non-Gaussian fare & tips distribution
Regarding the fare distribution, I was expecting a Gaussian distribution but to my surprise it turned out to be a Poisson. The other more interesting insight was that that in tips the median was roughly 25% of the fare amount. Also, look at the outlier in the tip amount, it goes as high as $200 (that makes suddenly the driving business so lucrative !)
Insight 4 - Monday blues !
Interestingly , looking at the patterns of trips for each day of the month, it’s clearly evident that Mondays of the month (1,8,15,22,29) are days with least no of trips . Though 1st was just after Easter Weekend, so presumably the least no. of trips that days justifies for itself.
Going into optimization problem
The first problem was the data was too huge for me to work on my laptop in a small time-frame. So with loss of generality, I cut down on the size by choosing the least, sampling just a single day’s data for purpose of optimizing the revenue of cab-driver.
Though the algo can very well be generalized to any number of day’s data if required. There were a few basic assumptions that I had to carve out for myself for estimating the revenue generation.
The Assumptions
- The grid chosen above would be fairly good representation of the dynamics of NYC and that’s because 1 lat ~ 112 km and 1 long ~ 90 km (at 40 degree lat), so the chosen grid ~600sq km contains >90% of the overall rides
- For optimization of earnings, I have optimized fare amount earnt and not total amount
- There’s a linear relationship between trip fare and trip time, which is to a good extent true, as I could fit a linear regression curve with linear, square & cubic coefficients for time(in minutes) and the coefficients were orders of magnitude separate, proving it’s a linear relationship. (Appendix 2 in the Notebook)
- It’s assumed a driver can choose his own route i.e. find a customer always depending on the route he chooses
- The demand, fare, and trip time for any route and any pickup region don’t vary much within an hour and central measure is a good approximations
- Given there was no information on supply of cabs at a location, it was assumed to be proportional to demand. Hence the probability of getting a cab was assumed uniform, only the demand was checked for a threshold (higher than 20% of the median demand across all regions)
The Equations
In the above equation point to be noted is the
total_time_travelled = trip time - stationary_minutes
For going from Step 2 to Step 3, the assumption (mentioned in the footer and proved in Appendix) would work fine. So from the above equations it is clear that for a cab driver to optimize his earning, he would need to optimize for 2 parameters given he has a fixed trip time
- Mean fare per min - The cab should ideally operate on routes that have the maximum fare per min at that hour
- Trip_time - That is, the cab should never stop in the entire duration. Ideally it should be traveling into demand regions with a minimum demand
Thus to take care of the point 2, check for the last assumption - only places with demand greater than 20% (a heuristics based threshold) median demand were considered as possible candidate locations for next trip in the optimization algorithm. If we have supply information, this could be modeled even better. Rest of the optimization algorithm boils down to maximizing point 1, i.e. Mean fare per min.
The pseudo algorithm would go something like this
- If starting the day, then search for the region with highest mean fare per min and drive till there before you start the day
- If drive needs to go to next day, beyond 23:59, make necessary adjustments
- For selecting the itinerary apply recursively the function to select next best route if end_time is not crossed is as follows
- For selecting next route,
- List all the drop-off locations for which people have used cabs at the start_locaton at the start_time
- Calculate the time taken to travel to each of the locations
- Check for the demand at each of the locations and check if they are above the threshold (20% of median of threshold)
- Check for the best mean_fare per min across all the routes and choose the best
- Calculate the time of travel & estimated fare based on data
- After reaching the dropoff location,adding a 3 mins for transaction, next route selection algo is applied again
- If there’s no demand for any cab at the current location (normally happens around late_night) or demand below threshold at all possible dropoff locations
- Do a 1 degree search for the nearest square on grid which has demand
- For multiple regions with demand, choose the region with best “mean fare per min” route starting from that region
- Estimate the time of travel to the region chosen above and add no fare to the corresponding journey
- If no region found having demand in 1-degree search, keep on increasing degree of search till the best location is found
- For selecting next route,
Time For Results
So, now checking for the efficiency of optimisation algorithm, the benchmark is - a normal cab driver earns trip_fare of $177 (median) in roughly 6 hours (median)
Insight 5 - Hardworking and rich driver
The graph above shows are the fares a cab driver could earn starting out at different hours in the day using the optimisation algorithm described above (assuming he works for the median duration 6 hours).The red line marks the median fare of $177 earnt by most of the cab drivers. As is evident, the optimisation algorithm would help in earning almost every time in earning way more than the median amount.
And as it turns out if he starts at 12 noon and continues till 6 in the evening, he would earn $380 using the optimisation algorithm, which is 2.16 times more than the median fare earned by a cab driver in NYC, working for 6 hours.
Insight 6 - Efficient but lazy driver
The graph above depicts the time taken by a cab driver to earn the median fare of $177 using the optimisation algorithm described above, starting at different hours of the day. The red line marks the median time of 6 hours taken by most of the cab drivers.As is evident here also, the optimisation algorithm would minimise the time almost every time to way below 6 hours.
For a driver who is lazy and just wants to earn the median fare amount ($177) in quickest possible time, it turns out, if the driver starts at 8AM, he can earn the $207 in just 2 hrs 33 mins, compared to 6 hours for majority of the rest of the drivers
Conclusions
As is evident, from the above cases, the optimisation algorithm performs quite good. Though something that baffled me was why despite peaking of traffic in the evening from 18:00 -22:00 (see the busiest hours plot in the start) , it seems that as a cab driver you’re not going to make much of money starting say around 19 and driving for 6 hours as compared to starting at 12:00 hours. Also, if you’re a lazy driver, you’re going to take a lot more time to make $177 than starting at 12:00 hours.
The reason lay evident on digging a bit more into the data. Looking at the trip_distance distribution at these 2 times, it’s clear that the extra traffic peak at 19:00 hours, seems to be coming from a lot of short distance trips. In fact, frequency of trips with 10km or higher is lower at 19:00 hours.


Our tools are interchangeable with any game system. In some form, by injected humour, or randomised words which don't look even believable. There are many variations of passages of Lorem Ipsum available
Nothing to install or download, literally just login and start playing with your buddies online. In some form, by injected humour, or randomised words which don't look even believable.
Whilst we can't put you in around a table with your mates to play, this is the next best task. A virtual tabletop where you can see and speak to each other whilst adventuring. In some form, by injected humour.


Five Star Travel Vacations
Home
My Account
View Recommendations
Feedback
Logout
South Carolina
Myrtle Beach
Book
Hilton Head Island
Book
North Myrtle Beach
Book


People protest against Lahore police's failure to register case of child kidnapping | Pakistan - Geo.tv
by Ahmed FarazLAHORE: People on Thursday protested against the police's failure to register a child kidnapping case here in the Chuhang village on the city's outskirts, blocking the traffic as they occupied Multan Road.
Residents of the area, as well as the abducted child's neighbours, staged their protest outside Chuhang police station and chanted slogans against the authorities for their sluggish response to the child's kidnapping.
The protesters had blocked Multan Road, causing long queues of vehicles that halted in front of the demonstration. They said unidentified men had abducted a child a day earlier but that the police had not registered a first information report (FIR) over the matter even after 24 hours had passed since the alleged kidnapping.
Protesters dispersed peacefully only after the police held discussions with them, assuring them that an FIR would be filed and the culprits arrested soon.


View the source code of this page for detail. Don't forget to set debugMode: false to disable debug output.
Walking Walking
Armstrong Beat Armstrong Beat
SoundManager 2 project home


| Tag | Name | Req'd | Description |
|---|---|---|---|
| 386 | NoTradingSessions | Y | |
| 336 | TradingSessionID | Y | Identifier for Trading Session A trading session spans an extended period of time that can also be expressed informally in terms of the trading day. Usage is determined by market or counterparties. To specify good for session where session spans more than one calendar day, use TimeInForce = Day in conjunction with TradingSessionID. Bilaterally agreed values of data type "String" that start with a character can be used for backward compatibility. |
| 340 | TradSesStatus | Y | State of the trading session. |


Some videos on the internet are so good that I’ve watched them twice. Below is a list of 10 of my favorite interviews and dialogues. Obviously this isn’t an endorsement of all the positions taken. I just think they are very well done and fun to watch. The last four are best watched on 1.4x speed.
1971 Michael Parkinson interviews Muhammad Ali.
1974 Michael Parkinson interviews Muhammad Ali again, with better sound.
1997 Steve Jobs interacting with the audience when announcing the Microsoft deal.
1997 Steve Jobs interacting with the audience at WWDC.
2006 Stephen Colbert interviews Eleanor Holmes Norton.
2009 Robert Wright and Joel Achenbach
2009 Tyler Cowen and Peter Singer
2010 Robert Wright and Mickey Kaus
2011 Robert Wright and Mickey Kaus
2012 Glenn Loury and Ann Althouse
If I had to recommend just one, it would be Cowen/Singer.


+++ draft = false date = "2007-02-15T16:31:10-02:00" title = "Using Zope Page Templates macros in other templates" tags = ["zope3", "cookbook"] created = "2007-02-15T15:54:09-02:00" modified = "2007-02-15T16:43:15-02:00" permaLink = "http://play.pixelblaster.ro/blog/archive/2007/02/15/using-zope-page-templates-macros-in-other-templates" author = "Tiberiu Ichim" aliases = [ "/blog/archive/2007/02/15/using-zope-page-templates-macros-in-other-templates" ] +++
I won't try to discuss here the benefits of ZPT macros vs. viewlets and content providers or viceversa or when to use each of them, I'll just show a simple (basic even) technique of reusing template code across page templates, using the macros mechanism.
Trying to get the macros with something like context/@@page_with_macros/macros/the_macro doesn't work, as BrowserView (and BrowserPage) doesn't know anything about Zope Page Templates. Of course, that's also because Zope 3 doesn't directly publishes templates, only pages. The technique involves setting the page template who's macros you want to access as attributes of the curent page, something along these lines:
class MyPage(BrowserPage):rows
macro_template = ViewPageTemplate('template_with_macros.pt)
In the template associated with this page, you can have:
<metal:macro metal:use-macro="view/macro_template/macros/the_macro">


Creating a Web-app with Grunt - Part 1
Cross-posted from the original article on my blog.
This is the first of a two-part tutorial, in which we’ll be creating a web-app called ‘breeze’ that will load and display temperature information for various cities using data from OpenWeatherMap. In this part of the tutorial, we’ll be setting up a simple build workflow using Grunt and npm.
If you’re short on time and just want to see the complete code for this part of the tutorial then you can fork the repo on Github and switch to the ‘tutorial-part-1’ branch.
A Note for Windows Users
Throughout this tutorial I will be referring to the Mac command line application – Terminal, so if you are on Windows then you’ll simply need to use Command Prompt instead.
Development Environment Setup
Firstly we need to have our dev environment setup so that we can use npm and Grunt. To do this we just need to ensure Node.js is installed, as npm comes bundled with it by default. So if you haven’t already got this up and running then installing one of the pre-built packages from the Node.js website is probably the simplest method.
Next we need to install Sass. If you are using Windows then you’ll first need to install Ruby, whereas if you are using a Mac then Ruby comes pre-installed. To install Sass, open Terminal and run the following command:
gem install sass
This can take a few minutes to complete, so be patient, but if you are using a Mac and the above command is failing then you could use sudo gem install sass
instead.
Project Setup
You will need to download a small library called ‘atomic’, which our project will use for making AJAX requests to the OpenWeatherMap API.
Now we need to setup the project files and folders – create the following structure:
breeze
│
├──• Gruntfile.js
├──• index.html
├──• package.json
└───src
├───js
│ ├───app
│ │ └──• app.js
│ └───libs
│ └──• atomic.js
└───scss
└──• app.scss
The breeze directory will serve as the document root of our application.
Now that we have the basic structure, let’s add some content to the files we just created. The contents of index.html should be as follows:
<!DOCTYPE html>
<html>
<head>
<title>Breeze</title>
<link rel="stylesheet" type="text/css" href=“dist/css/app.min.css">
</head>
<body>
<div class="main-container"> </div>
<script src=“dist/js/app.min.js"></script>
</body>
</html>
Astute readers may have noticed that – within the HTML markup – we are referencing directories and files that don’t exist – dist/css/app.min.css and dist/js/app.min.js. These directories and files will be created automatically by Grunt once we set it up and run a build task.
For the contents of app.js, we will temporarily just add an alert message:
alert("Breeze");
And finally, the contents of app.scss will currently just contain the following styles:
html, body, div {
margin: 0;
padding: 0;
}
Installing Development Dependencies
We are going to use npm for installing development dependencies – those used by Grunt for the build step of our application.
The first thing we need to install is the CLI (command line interface) for Grunt. This will be a global install; it isn’t specific to our project and will be available system-wide, so you’ll only need to do this once per-system:
Mac users You will need to run this command with sudo.
sudo npm install -g grunt-cli
Windows users
npm install -g grunt-cli
Next up, within the breeze directory, open the package.json file that we created earlier and add the following:
{
"name": "breeze",
"version": "0.0.1"
}
This simply defines some basic information about our application which is required by npm. Save and close the file.
Although the package.json file has many uses, within the scope of this tutorial – and other than the required name and version properties – it will simply be used to define the development dependencies of our application.
Note that the command npm init
could instead be used to automatically generate a package.json file, but doing so adds many properties that we won’t need to use in this tutorial, so creating it manually is a simpler option in this case.
Now that we have our package.json file, using Terminal, change to the breeze directory. We will need to run all remaining commands from this directory. Install the development dependencies by running the following command:
npm install grunt grunt-contrib-connect grunt-contrib-sass grunt-contrib-uglify grunt-contrib-watch grunt-devtools --save-dev
This installs all of our development dependencies into a node-modules folder within the breeze directory. A ‘devDependencies’ property is also added to package.json, listing the names and current version numbers of our application’s development dependencies:
{
"name": "breeze",
"version": "0.0.1",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-connect": "^0.8.0",
"grunt-contrib-sass": "^0.8.1",
"grunt-contrib-uglify": "^0.6.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-devtools": "^0.2.1"
}
}
Doing the Grunt Work
We will be using Grunt – a JavaScript task runner – to carry out the build step of our application. Grunt works by running various user-defined tasks when instructed to do so. We are going to set it up in such a way that our tasks run when a change to JavaScript or SCSS files is detected.
To use Grunt, we first need to open Gruntfile.js that we created earlier within the breeze directory and paste in the following code, which we will discuss in more detail below:
module.exports = function(grunt) {
"use strict";
grunt.initConfig({
});
};
When we use the Grunt CLI (more on this below), the version of the Grunt library specified within the devDependencies property inside package.json is loaded and the configuration within the Gruntfile is automatically applied. Currently our Gruntfile doesn’t contain any configuration options, so we’ll start adding these now.
Sass
First, we’ll add a config for compiling our SCSS code using the sass task (grunt-contrib-sass) – a wrapper for the version of Sass installed on our system i.e. the Sass Ruby gem we installed earlier:
module.exports = function(grunt) {
"use strict";
grunt.loadNpmTasks("grunt-contrib-sass");
grunt.initConfig({
sass: {
dev : {
options: {
style: "compressed",
sourcemap : true
},
files: {
"dist/css/app.min.css": "src/scss/app.scss"
}
}
}
});
};
Here, we first tell Grunt to load the sass task and then we define the config for this task within the object that gets passed into Grunt’s initConfig method. Within the sass task we define a ‘dev’ configuration object. We can define however many configurations we like and call them whatever we like, but within these configuration objects we need to follow the rules of the task we are using, which in this case is sass. The sass task allows us to define an ‘options’ object containing various properties that affect how our SCSS is converted into CSS. In this case we are simply stating that we want the CSS to be compressed into one line with any empty space removed. The ‘files’ object contains two file path strings – the one on the left is the file path to which we want Grunt to output our compiled CSS, and the one on the right is the main SCSS file we want to use to start the compilation process.
To test that everything is working as expected, run the following command in Terminal:
grunt sass:dev
Doing that should compile the SCSS into an app.min.css file within the dist/css/ directory.
Uglify
Next up, we want to use the uglify (grunt-contrib-uglify) task to concatenate all of our JavaScript into a single file and then minify this file when complete so that it loads quickly in web browsers. This is also a good way to reduce the number of HTTP requests an application makes when developing with more than one JavaScript file; rather than using multiple script tags within the HTML markup we will only need to use a single one that points to the compiled file containing all of our JavaScript code – app.min.js. To carry out the concatenation and minification process we will add a configuration object for the uglify task:
module.exports = function(grunt) {
"use strict";
grunt.loadNpmTasks("grunt-contrib-sass");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.initConfig({
sass: {
dev : {
options: {
style: "compressed",
sourcemap : true
},
files: {
"dist/css/app.min.css": "src/scss/app.scss"
}
}
},
uglify : {
dev : {
options : {
compress : true,
mangle : true,
preserveComments : false
},
files: {
"dist/js/app.min.js" : ["src/js/libs/atomic.js", "src/js/app/app.js"]
}
}
}
});
};
We have now also loaded the uglify task and defined a dev config for it within the object passed into Grunt’s initConfig method.
The ‘files’ object for uglify works in exactly the same way as the one within the sass config, with the exception that we are passing in an array of JavaScript file paths on the right. All of these files will be concatenated, minified and output to a single JavaScript file. When set to ‘true’, the compress option shortens variable and function names, and removes empty space in an attempt to reduce the overall file size. Similarly, When set to ‘true’, the mangle option performs various optimisations such as removing unreferenced functions and variables. We have set the preserveComments option to ‘false’ so that all comments will be removed from the minified file.
To test that everything is working as expected, run the following command in Terminal:
grunt uglify:dev
Doing that should compile the JavaScript into an app.min.js file within the dist/js/ directory.
A word of warning here – the files are concatenated in the same order that they are specified in the array of file paths, so you’ll need to ensure that dependencies are ordered correctly.
With all that working as expected, the project directory structure should now look like this:
breeze
│
├──• Gruntfile.js
├──• index.html
├──• package.json
├───src
│ ├───js
│ │ ├───app
│ │ │ └──• app.js
│ │ └───libs
│ │ └──• atomic.js
│ └───scss
│ └──• app.scss
└───dist
├───css
│ └──• app.min.css
└───js
└──• app.min.js
Connect
Now that we’ve setup a build for our SCSS and JavaScript, we are going to create a connect (grunt-contrib-connect) config that allows us to quickly start a basic server in order to run our application, which will be launched in the default browser. This is way quicker than configuring Apache, for example. And like Apache, the connect server runs our application using the http:// protocol – which allows us to use AJAX – rather than the file:// protocol which does not.
We will set this up in a similar way to the other configs:
module.exports = function(grunt) {
"use strict";
grunt.loadNpmTasks("grunt-contrib-sass");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-connect");
grunt.initConfig({
sass: {
dev: {
options: {
style: "compressed",
sourcemap : true
},
files : {
"dist/css/app.min.css": "src/scss/app.scss"
}
}
},
uglify: {
dev: {
options: {
compress: true,
mangle: true,
preserveComments: false
},
files: {
"dist/js/app.min.js" : ["src/js/libs/atomic.js", "src/js/app/app.js"]
}
}
},
connect: {
server : {
options: {
open: true,
keepalive: true
}
}
}
});
};
As with the other tasks, we have loaded the connect task and defined a config, which this time we have called ‘server’. The only two options we need to use at this point are ‘open’ and ‘keepalive’ – both of which we have set to ‘true’. The open option simply launches the default web browser on our system and loads the index page within the same directory as the Gruntfile. By default, the connect task only keeps the server active for as long as our other tasks are running, so since we have no continually-running tasks, we use the keepalive option to force the server to stay active until it is manually stopped.
Run the following command to launch our application in the default browser:
grunt connect:server
Notice that, within the Terminal window, we can no longer run any commands now that we have the server running. To stop the server, on the keyboard hold the ctrl
key and press c
.
If you want to run Grunt commands while the server is active then you can open another Terminal window and once again change to the breeze directory.
Running Multiple Tasks with One Command
So far, we have set things up so that we can run tasks one at a time, but what if we want to run multiple tasks? We could run them one after the other in Terminal, but there is an easier way – we can register our own tasks with Grunt, which is much more straightforward than it sounds. Let’s start by creating a task that will first run sass:dev, followed by uglify:dev, and then finally connect:server. We’ll call this task ‘breeze’:
module.exports = function(grunt) {
"use strict";
grunt.loadNpmTasks("grunt-contrib-sass");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-connect");
grunt.initConfig({
sass: {
dev: {
options: {
style: "compressed",
sourcemap : true
},
files : {
"dist/css/app.min.css": "src/scss/app.scss"
}
}
},
uglify: {
dev: {
options: {
compress: true,
mangle: true,
preserveComments: false
},
files: {
"dist/js/app.min.js" : ["src/js/libs/atomic.js", "src/js/app/app.js"]
}
}
},
connect: {
server : {
options: {
open: true,
keepalive: true
}
}
}
});
grunt.registerTask("breeze", ["sass:dev", "uglify:dev", "connect:server”]);
};
So now instead of sequentially running each task manually, in Terminal, we now simply need to run:
grunt breeze
This will run all the tasks we specified in the array for the second parameter of Grunt’s registerTask method.
Automating Build Tasks
Now everything is set up and ready for us to manually run builds of our SCSS and JavaScript, and view our app within the browser. But, wouldn’t it be nice if we could go one step further and have Grunt run relevant tasks automatically when any of our development files is changed? That’s precisely what we’ll be doing in this section of this tutorial.
Watch
To automate the running of the tasks that we have already defined, we first need to setup a watch (grunt-contrib-watch) task which watches specific files and runs relevant tasks if any of the files changes.
Setting up the watch task is very similar to the way in which we setup all the other tasks (this is now the complete Gruntfile):
module.exports = function(grunt) {
"use strict";
grunt.loadNpmTasks("grunt-contrib-sass");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-connect");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.initConfig({
sass: {
dev: {
options: {
style: "compressed",
sourcemap : true
},
files : {
"dist/css/app.min.css": "src/scss/app.scss"
}
}
},
uglify: {
dev: {
options: {
compress: true,
mangle: true,
preserveComments: false
},
files: {
"dist/js/app.min.js" : ["src/js/libs/atomic.js", "src/js/app/app.js"]
}
}
},
connect: {
server : {
options: {
open: true
}
}
},
watch: {
js: {
files: ["src/js/**/*.js"],
tasks: ["uglify:dev"]
},
scss: {
files: ["src/scss/**/*.scss"],
tasks: ["sass:dev"]
}
}
});
grunt.registerTask("breeze", ["sass:dev", "uglify:dev", "connect:server", "watch"]);
};
We have loaded the watch task and created two configs – ‘js’ and ‘scss’. These configs could have been called anything else, but the names were chosen so that the nature of what the configs will be used for is clear. Within each config, using the files option, we specify an array of file paths that are to be watched for changes, and then, using the tasks option, we specify a list of tasks to run when any of the listed files is changed. In the js config we are watching all files that have a .js file extension within the src/js directory and its subdirectories. When any of these files is changed, the uglify:dev task is run automatically. Similarly, with the scss config we are watching all files that have a .scss file extension within the src/scss directory and its subdirectories. When any of these files is changed, the sass:dev task is run automatically.
At this point, it is important to note that we have removed the keepalive property from the ‘server’ config of the connect task, since it would have stopped the watch task – or any task, for that matter – from running afterwards. The keepalive property is no longer needed because we are now using the continually-running watch task, which will keep the server alive automatically.
Notice that – within the breeze task we created earlier – ‘watch’ has been added to the array of tasks that Grunt will run for us sequentially.
Now we simply need to once again run our grunt breeze
task using Terminal (be sure to cancel any running tasks using ctrl + c
first) and our app will launch in the browser, with the watch task waiting for changes on the lists of files we specified. To check this is working change the alert message in app.js to the following:
alert("Grunt is a breeze");
Save the file and Grunt should automatically run the tasks we specified in the watch:js config, so refresh the web browser and you should see the new alert.
Next steps
So far we have covered how to setup Sass and npm, and how to use Grunt to setup a simple workflow for the build step of a web application.
In the next instalment of this two-part tutorial, we will cover the logic of the breeze application – loading and displaying current temperature information for various cities by making AJAX requests to the OpenWeatherMap API. We’ll also briefly cover SCSS variables and mixins.
Feel free to ask questions in the comments below.
Happy coding!


Invite your friends to our app. If they sign up, you and your friend will get 2 driving days for free!
Invite your friends
Insert your friends email addresses and send them invitations to join our app!
{{email.value}}
cancel
Share the referral link
You can also share your referral link by copying and sending it or sharing it on your social media.
{{referralLink}}


IOHexperimenter#
Experimenter for Iterative Optimization Heuristics (IOHs), built in* C++
.
Documentation: https://iohprofiler.github.io/IOHexperimenter.
Publication: https://arxiv.org/abs/1810.05281.
Wiki page: https://iohprofiler.github.io.
IOHexperimenter provides:
A framework to ease the benchmarking of any iterative optimization heuristic.
Pseudo-Boolean Optimization (PBO) problem set (25 pseudo-Boolean problems).
Integration of the well-known Black-black Optimization Benchmarking (BBOB) problem set (24 continuous problems).
W-model problem sets constructed on OneMax and LeadingOnes.
Integration of the Tree Decomposition (TD) Mk Landscapes problems.
Submodular optimization problems, as seen in the GECCO ‘22 workshop.
Flexible interface for adding new suites and problems.
Advanced logging module that takes care of registering the data in a seamless manner.
Data format is compatible with IOHanalyzer.
Available Problem Suites:
BBOB (Single Objective Noiseless) (COCO)
SBOX-COST (COCO)
StarDiscrepancy
PBO
Submodular Graph Problems
C++#
The complete API documentation, can be found here, as well as a Getting-Started guide. In addition to the documentation, some example projects can be found in the example folder of this repository.
Python#
The pip-version of IOHexperimenters python interface is available via pip. A tutorial with python in the form of a jupyter notebook can be found in the example folder of this repository. A Getting-Started guide and the full API documentation can be found here.
Contact#
If you have any questions, comments or suggestions, please don’t hesitate contacting us<EMAIL_ADDRESS>Our team#
Jacob de Nobel, Leiden Institute of Advanced Computer Science,
Furong Ye, Leiden Institute of Advanced Computer Science,
Diederick Vermetten, Leiden Institute of Advanced Computer Science,
Hao Wang, Leiden Institute of Advanced Computer Science,
Carola Doerr, CNRS and Sorbonne University,
Thomas Bäck, Leiden Institute of Advanced Computer Science,
When using IOHprofiler and parts thereof, please kindly cite this work as
Jacob de Nobel, Furong Ye, Diederick Vermetten, Hao Wang, Carola Doerr and Thomas Bäck, IOHexperimenter: Benchmarking Platform for Iterative Optimization Heuristics, arXiv e-prints:2111.04077, 2021.
@ARTICLE{IOHexperimenter,
author = {Jacob de Nobel and
Furong Ye and
Diederick Vermetten and
Hao Wang and
Carola Doerr and
Thomas B{\"{a}}ck},
title = {{IOHexperimenter: Benchmarking Platform for Iterative Optimization Heuristics}},
journal = {arXiv e-prints:2111.04077},
archivePrefix = "arXiv",
eprint = {2111.04077},
year = 2021,
month = Nov,
keywords = {Computer Science - Neural and Evolutionary Computing},
url = {https://arxiv.org/abs/2111.04077}
}


Simple Weather Dashboard
Only cities found in OpenWeather database will be added to list of recent locations
Location
Clear Recent
5-Day Forecast


open val constraintsSql: String
A string value put at the end of the CREATE TABLE statement,
typically to define constraints, like foreign keys. For example, the demo
program has a table that overrides this to be
FOREIGN KEY (city_id) REFERENCES Cities(id) ON DELETE RESTRICT ON UPDATE RESTRICT
.


STADI which means skill, is a place where you as a person WITH or WITHOUT educational qualifications can get a job with the skill you have.
Not only that but also you as an Employer or a person who needs a specific task done can get a permanent employee or a temporary guy to get the job done.
CEO
COO
CFO
Get Employeed permanently
Get a temporary/one time job
Get introduced to an Employer
Get a rated list of Employees
Unlimited access to over 1000+ STADI profiles
Discounts on completed jobs
1 year update and support
Instantly get the right person for the job
Get fair charges after a completed job
Get to rate the employee after the job


About Me
I am Lee Jordan, a student at Point Park University under the major of Information Technology. To my knowledge, I have lived in Pittsburgh my whole life, and I went to the Shaler Area School District. I graduated in 2014, and am due to graduate Point Park in 2019.


Claim all the HTLCs that we've received from our current commit tx.
Claim all the HTLCs that we've received from our current commit tx. This will be done using 2nd stage HTLC transactions
our commitment data, which include payment preimages
a list of transactions (one per HTLC that we can claim)
Claim all the HTLCs that we've received from their current commit tx
Claim all the HTLCs that we've received from their current commit tx
our commitment data, which include payment preimages
a list of transactions (one per HTLC that we can claim)
When an unexpected transaction spending the funding tx is detected: 1) we find out if the published transaction is one of remote's revoked txs 2) and then: a) if it is a revoked tx we build a set of transactions that will punish them by stealing all their funds b) otherwise there is nothing we can do
When an unexpected transaction spending the funding tx is detected: 1) we find out if the published transaction is one of remote's revoked txs 2) and then: a) if it is a revoked tx we build a set of transactions that will punish them by stealing all their funds b) otherwise there is nothing we can do
a RevokedCommitPublished object containing penalty transactions if the tx is a revoked commitment
A local commit is considered done when: - all commitment tx outputs that we can spend have been spent and confirmed (even if the spending tx was not ours) - all 3rd stage txes (txes spending htlc txes) have been confirmed
A remote commit is considered done when all commitment tx outputs that we can spend have been spent and confirmed (even if the spending tx was not ours).
A remote commit is considered done when all commitment tx outputs that we can spend have been spent and confirmed (even if the spending tx was not ours).
In CLOSING state, when we are notified that a transaction has been confirmed, we check if this tx belongs in the local commit scenario and keep track of it.
In CLOSING state, when we are notified that a transaction has been confirmed, we check if this tx belongs in the local commit scenario and keep track of it.
We need to keep track of all transactions spending the outputs of the commitment tx, because some outputs can be spent both by us and our counterparty. Because of that, some of our transactions may never confirm and we don't want to wait forever before declaring that the channel is CLOSED.
In CLOSING state, when we are notified that a transaction has been confirmed, we check if this tx belongs in the remote commit scenario and keep track of it.
In CLOSING state, when we are notified that a transaction has been confirmed, we check if this tx belongs in the remote commit scenario and keep track of it.
We need to keep track of all transactions spending the outputs of the commitment tx, because some outputs can be spent both by us and our counterparty. Because of that, some of our transactions may never confirm and we don't want to wait forever before declaring that the channel is CLOSED.
In CLOSING state, when we are notified that a transaction has been confirmed, we check if this tx belongs in the revoked commit scenario and keep track of it.
In CLOSING state, when we are notified that a transaction has been confirmed, we check if this tx belongs in the revoked commit scenario and keep track of it.
We need to keep track of all transactions spending the outputs of the commitment tx, because some outputs can be spent both by us and our counterparty. Because of that, some of our transactions may never confirm and we don't want to wait forever before declaring that the channel is CLOSED.


About
Features
Pricing
Sign Up
Try our app free for 30 Days
First Name
Last Name
Work Email
Set Password
One lowercase character
One number
One uppercase character
8 characters minimum
Get Started!
By creating an account, you agree to our
Terms
Already have an account?
Sign In


Application Successful! |
|
Hello {{profile.profile_name}}, This is to notify you that your application for {{post_position}} from {{profile_company}} has been successfully sent. Please stand by and wait for {{profile_company}} to contact you. Join over 39,474 successful recruiters and applicants in Jobayan. You're just one step away! Easy to set up, easy to use! {{#when profile.profile_create_flag '==' 'create'}}On the other hand we automatically created a Jobayan account for you, to claim your account please click this link. {{else}} {{/when}}Best Regards, The Jobayan Team |
|
Questions? Concerns? Email us at<EMAIL_ADDRESS>Mandala Park, 1552 Shaw Blvd, Pleasant Hills Mandaluyong |
|
Copyright © 2017 All Rights Reserved
Jobayan PH ·
Our Privacy Policy
|


After reading and watching from the resources provided, what I found most interesting to try was meditation, tiny habits, and pomodoro technique. These timebox and habit technique were used to finished this question set.
The benefits of meditation sparked my interest the most. Gaining short and long term benefits such as, better focus, less anxiety, more creativity, better memory, less stress and so much more! In a short period of time, these benefits are not to be missed.
Meditation has worked magnificently on giving myself a mental reset in times of need. Though I don't do it often enough, it has served it's purpose when need be. Though I'm not the greatest at building habits, I am looking to improve techniques, to daily habits in the near future.
I will experiment with the combination of tiny habits, meditation and the pomodoro technique. I think these three compatible with each other in a way that would be beneficial for productivity. Starting off with the pomodoro technique, 25 minutes each task followed by the tiny habits, and end with meditation. "After twenty-five minutes, I will meditate for two minutes."


Hide Page | Reload Cached
The goal of this page is to show that by default, MSIE will block the entire page while an external font loads.


I'm a web developer based in Goa, India. I have a passion for web design and love to create for web and mobile devices.
I like to keep it simple. My goals are to focus on typography, content and conveying the message that you want to send.
I'm a developer, so I know how to create your website to run across devices using the latest technologies available.


Class
ProviderContext
public final class ProviderContext
An object that accesses providers for a specific market and supports the grouping of providers.
Relationships
Nested Types
ProviderContext.Filter
Filter representing which providers a context should access.
Nested Type Aliases
Attributes
@available(*, deprecated, renamed: "Filter") public typealias Attributes = Filter
Initializers
init(tink:)
public convenience init(tink: Tink = .shared)
Creates a ProviderContext
bound to the provided Tink
instance.
Parameters
| Name | Type | Description |
|---|---|---|
| tink | Tink |
The |
Methods
fetchProviders(filter:completion:)
@discardableResult public func fetchProviders(filter: Filter = .default, completion: @escaping (Result<[Provider], Error>) -> Void) -> RetryCancellable?
Fetches providers matching the provided filter.
Required scopes:
-
credentials:read
Parameters
| Name | Type | Description |
|---|---|---|
| filter | Filter |
Filter for providers to fetch. |
| completion | @escaping (Result<[Provider], Error>) -> Void |
A result representing either a list of providers or an error. |
fetchProviders(for:filter:completion:)
@discardableResult public func fetchProviders(for market: Market, filter: Filter = .default, completion: @escaping (Result<[Provider], Error>) -> Void) -> RetryCancellable?
Fetches providers for a market.
Required scopes:
-
credentials:read
Parameters
| Name | Type | Description |
|---|---|---|
| market | Market |
The ISO 3166-1 alpha-2 market code. |
| filter | Filter |
Filter for providers to fetch. |
| completion | @escaping (Result<[Provider], Error>) -> Void |
A result representing either a list of providers or an error. |
fetchProvider(with:completion:)
@discardableResult public func fetchProvider(with name: Provider.Name, completion: @escaping (Result<Provider, Error>) -> Void) -> RetryCancellable?
Fetches a specific provider matching the provided name.
Required scopes:
-
credentials:read
Parameters
| Name | Type | Description |
|---|---|---|
| name | Provider.Name |
Name of provider to fetch. |
| completion | @escaping (Result<Provider, Error>) -> Void |
A result representing either a single provider or an error. |
fetchProviders(attributes:completion:)
@available(*, deprecated, renamed: "fetchProviders(filter:completion:)") public func fetchProviders(attributes: Filter, completion: @escaping (Result<[Provider], Error>) -> Void) -> RetryCancellable?


Mwa nako yakale, batu nebasazibi lika. Nebasazibi ku cala licalo, ku luka libyana, kamba ku panga lika za lisipi. Mulimu Nyambe mwa lihalimu na nani butali kaufela mwa lifasi. Na bubulukile mwa poto ya lizupa.
Long long ago people didn’t
know anything. They didn’t
know how to plant crops, or
how to weave cloth, or how to
make iron tools.
The god Nyame up in the sky
had all the wisdom of the world.
He kept it safe in a clay pot.
Zazi lelin’wi, Nyambe nato keta kufa poto ya butali ku Anansi. Nako kaufela Anansi atalimela mwa poto ya lizupa, naituta sesin’wi. Nelinto yenetabisa!
One day, Nyame decided that
he would give the pot of
wisdom to Anansi.
Every time Anansi looked in the
clay pot, he learned something
new. It was so exciting!
Anansi ni lunya lwahae anahana, “Nita beha poto ye fa halimu ya kota yetelele. Mi nitaipulukela yona ninosi!” Atatulula muhala womutelele, atata kwa poto ya lizupa mi saitama yona famba. Saka kupahama kota. Kono neli tata ahulu kupahama kota ni poto inge inata fa man’wele nako kaufela.
Greedy Anansi thought, “I’ll
keep the pot safe at the top of a
tall tree. Then I can have it all
to myself!”
He spun a long thread, wound it
round the clay pot, and tied it to
his stomach.
He began to climb the tree. But
it was hard climbing the tree
with the pot bumping him in the
knees all the time.
Nako ye kaufela, mwana wamushimani wa Anansi na yemi mwatasi ya kota anza abuha. Abulela, “Nesisikaba bunolo kambe nemu tamezi poto kwa mukokoto? Anansi alika kutamela poto ya lizupa yetezi butali kwa mukokoto wahae, mi neitoba bunolo ahulu.
All the time Anansi’s young son
had been standing at the
bottom of the tree watching. He
said, “Wouldn’t it be easier to
climb if you tied the pot to your
back instead?”
Anansi tried tying the clay pot
full of wisdom to his back, and it
really was a lot easier.
Kabubebebe, afita fa halimu ya lots. Kono atuwela ni kunahana, “Neniswanela kuba ni butali bo kaufela, kono mwanake na talifile kunifita!”Anansi na nyemile ahulu ka taba ye mi sa yumba poto ya lizupa fafasi kuzwelelela kwa kota.
In no time he reached the top of
the tree.
But then he stopped and
thought, “I’m supposed to be
the one with all the wisdom,
and here my son was cleverer
than me!”
Anansi was so angry about this
that he threw the clay pot down
out of the tree.
Yapwaceha ya liyemba fafasi. Butali neli bwa mutu kaufela kuikabela. Mi kona batu monobazibezi ku lima, ku luka litino, kupanga lika za lisipi ni lika zen’wi ze baziba batu kueza.
It smashed into pieces on the
ground. The wisdom was free
for everyone to share.
And that is how people learned
to farm, to weave cloth, to
make iron tools, and all the
other things that people know
how to do.


Structure
|
CV
|
Common_elements
|
Graphics
|
Temporal
|
Form
|
Table
|
Portfolio
Correlation of attendance to final grade
Name
Attendance
Grade
Survey conducted for the past 30 years!
Joe Blogs
100%
First
Fred Busybud
50%
third
Span across … two columns
column 3


Numbers 33:4
For the Egyptians buried all their firstborn, which the LORD had smitten among them: upon their gods also the LORD executed judgments.


All Files (57.65% covered at 1.05 hits/line)
14 files in total.
85 relevant lines.
49 lines covered and
36 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|---|---|---|---|---|---|
| app/channels/application_cable/channel.rb | 0.0 % | 4 | 4 | 0 | 4 | 0.0 |
| app/channels/application_cable/connection.rb | 0.0 % | 4 | 4 | 0 | 4 | 0.0 |
| app/controllers/application_controller.rb | 100.0 % | 4 | 3 | 3 | 0 | 1.0 |
| app/controllers/sessions_controller.rb | 30.77 % | 25 | 13 | 4 | 9 | 0.3 |
| app/controllers/static_pages_controller.rb | 100.0 % | 13 | 5 | 5 | 0 | 1.0 |
| app/controllers/users_controller.rb | 73.33 % | 28 | 15 | 11 | 4 | 0.9 |
| app/helpers/application_helper.rb | 100.0 % | 13 | 6 | 6 | 0 | 4.3 |
| app/helpers/sessions_helper.rb | 70.0 % | 22 | 10 | 7 | 3 | 2.1 |
| app/helpers/static_pages_helper.rb | 100.0 % | 2 | 1 | 1 | 0 | 1.0 |
| app/helpers/users_helper.rb | 33.33 % | 9 | 6 | 2 | 4 | 0.3 |
| app/jobs/application_job.rb | 0.0 % | 2 | 2 | 0 | 2 | 0.0 |
| app/mailers/application_mailer.rb | 0.0 % | 4 | 4 | 0 | 4 | 0.0 |
| app/models/application_record.rb | 100.0 % | 3 | 2 | 2 | 0 | 1.0 |
| app/models/user.rb | 80.0 % | 17 | 10 | 8 | 2 | 1.2 |
Controllers (63.89% covered at 0.71 hits/line)
4 files in total.
36 relevant lines.
23 lines covered and
13 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|---|---|---|---|---|---|
| app/controllers/application_controller.rb | 100.0 % | 4 | 3 | 3 | 0 | 1.0 |
| app/controllers/sessions_controller.rb | 30.77 % | 25 | 13 | 4 | 9 | 0.3 |
| app/controllers/static_pages_controller.rb | 100.0 % | 13 | 5 | 5 | 0 | 1.0 |
| app/controllers/users_controller.rb | 73.33 % | 28 | 15 | 11 | 4 | 0.9 |
Models (83.33% covered at 1.17 hits/line)
2 files in total.
12 relevant lines.
10 lines covered and
2 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|---|---|---|---|---|---|
| app/models/application_record.rb | 100.0 % | 3 | 2 | 2 | 0 | 1.0 |
| app/models/user.rb | 80.0 % | 17 | 10 | 8 | 2 | 1.2 |
Mailers (0.0% covered at 0.0 hits/line)
1 files in total.
4 relevant lines.
0 lines covered and
4 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|---|---|---|---|---|---|
| app/mailers/application_mailer.rb | 0.0 % | 4 | 4 | 0 | 4 | 0.0 |
Helpers (69.57% covered at 2.16 hits/line)
4 files in total.
23 relevant lines.
16 lines covered and
7 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|---|---|---|---|---|---|
| app/helpers/application_helper.rb | 100.0 % | 13 | 6 | 6 | 0 | 4.3 |
| app/helpers/sessions_helper.rb | 70.0 % | 22 | 10 | 7 | 3 | 2.1 |
| app/helpers/static_pages_helper.rb | 100.0 % | 2 | 1 | 1 | 0 | 1.0 |
| app/helpers/users_helper.rb | 33.33 % | 9 | 6 | 2 | 4 | 0.3 |
Jobs (0.0% covered at 0.0 hits/line)
1 files in total.
2 relevant lines.
0 lines covered and
2 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|---|---|---|---|---|---|
| app/jobs/application_job.rb | 0.0 % | 2 | 2 | 0 | 2 | 0.0 |
Libraries (100.0% covered at 0.0 hits/line)
0 files in total.
0.0 relevant lines.
0.0 lines covered and
0.0 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|
Ungrouped (0.0% covered at 0.0 hits/line)
2 files in total.
8 relevant lines.
0 lines covered and
8 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|---|---|---|---|---|---|
| app/channels/application_cable/channel.rb | 0.0 % | 4 | 4 | 0 | 4 | 0.0 |
| app/channels/application_cable/connection.rb | 0.0 % | 4 | 4 | 0 | 4 | 0.0 |


Class Grain
The abstract base class for all grain classes.
Namespace: Orleans
Assembly: Orleans.Core.Abstractions.dll
Syntax
public abstract class Grain : object, IAddressable, ILifecycleParticipant<IGrainLifecycle>
Constructors
| Improve this Doc View SourceGrain()
This constructor should never be invoked. We expose it so that client code (subclasses of Grain) do not have to add a constructor. Client code should use the GrainFactory property to get a reference to a Grain.
Declaration
protected Grain()
Grain(IGrainIdentity, IGrainRuntime)
Grain implementers do NOT have to expose this constructor but can choose to do so. This constructor is particularly useful for unit testing where test code can create a Grain and replace the IGrainIdentity and IGrainRuntime with test doubles (mocks/stubs).
Declaration
protected Grain(IGrainIdentity identity, IGrainRuntime runtime)
Parameters
| Type | Name | Description |
|---|---|---|
| IGrainIdentity | identity | |
| IGrainRuntime | runtime |
Properties
| Improve this Doc View SourceGrainFactory
Gets an object which can be used to access other grains. Null if this grain is not associated with a Runtime, such as when created directly for unit testing.
Declaration
protected IGrainFactory GrainFactory { get; }
Property Value
| Type | Description |
|---|---|
| IGrainFactory |
GrainReference
Declaration
public GrainReference GrainReference { get; }
Property Value
| Type | Description |
|---|---|
| GrainReference |
IdentityString
String representation of grain's SiloIdentity including type and primary key.
Declaration
public string IdentityString { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
RuntimeIdentity
A unique identifier for the current silo. There is no semantic content to this string, but it may be useful for logging.
Declaration
public string RuntimeIdentity { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
ServiceProvider
Gets the IServiceProvider managed by the runtime. Null if this grain is not associated with a Runtime, such as when created directly for unit testing.
Declaration
protected IServiceProvider ServiceProvider { get; }
Property Value
| Type | Description |
|---|---|
| IServiceProvider |
Methods
| Improve this Doc View SourceDeactivateOnIdle()
Deactivate this activation of the grain after the current grain method call is completed. This call will mark this activation of the current grain to be deactivated and removed at the end of the current method. The next call to this grain will result in a different activation to be used, which typical means a new activation will be created automatically by the runtime.
Declaration
protected void DeactivateOnIdle()
DelayDeactivation(TimeSpan)
Delay Deactivation of this activation at least for the specified time duration.
A positive timeSpan
value means “prevent GC of this activation for that time span”.
A negative timeSpan
value means “cancel the previous setting of the DelayDeactivation call and make this activation behave based on the regular Activation Garbage Collection settings”.
DeactivateOnIdle method would undo / override any current “keep alive” setting,
making this grain immediately available for deactivation.
Declaration
protected void DelayDeactivation(TimeSpan timeSpan)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | timeSpan |
GetReminder(String)
Returns a previously registered reminder.
Declaration
protected Task<IGrainReminder> GetReminder(string reminderName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | reminderName | Reminder to return |
Returns
| Type | Description |
|---|---|
| Task<IGrainReminder> | Promise for Reminder handle. |
GetReminders()
Returns a list of all reminders registered by the grain.
Declaration
protected Task<List<IGrainReminder>> GetReminders()
Returns
| Type | Description |
|---|---|
| Task<List<IGrainReminder>> | Promise for list of Reminders registered for this grain. |
GetStreamProvider(String)
Declaration
protected IStreamProvider GetStreamProvider(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name |
Returns
| Type | Description |
|---|---|
| IStreamProvider |
OnActivateAsync()
This method is called at the end of the process of activating a grain. It is called before any messages have been dispatched to the grain. For grains with declared persistent state, this method is called after the State property has been populated.
Declaration
public virtual Task OnActivateAsync()
Returns
| Type | Description |
|---|---|
| Task |
OnDeactivateAsync()
This method is called at the begining of the process of deactivating a grain.
Declaration
public virtual Task OnDeactivateAsync()
Returns
| Type | Description |
|---|---|
| Task |
Participate(IGrainLifecycle)
Declaration
public virtual void Participate(IGrainLifecycle lifecycle)
Parameters
| Type | Name | Description |
|---|---|---|
| IGrainLifecycle | lifecycle |
RegisterOrUpdateReminder(String, TimeSpan, TimeSpan)
Registers a persistent, reliable reminder to send regular notifications (reminders) to the grain.
The grain must implement the Orleans.IRemindable
interface, and reminders for this grain will be sent to the ReceiveReminder
callback method.
If the current grain is deactivated when the timer fires, a new activation of this grain will be created to receive this reminder.
If an existing reminder with the same name already exists, that reminder will be overwritten with this new reminder.
Reminders will always be received by one activation of this grain, even if multiple activations exist for this grain.
Declaration
protected Task<IGrainReminder> RegisterOrUpdateReminder(string reminderName, TimeSpan dueTime, TimeSpan period)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | reminderName | Name of this reminder |
| TimeSpan | dueTime | Due time for this reminder |
| TimeSpan | period | Frequence period for this reminder |
Returns
| Type | Description |
|---|---|
| Task<IGrainReminder> | Promise for Reminder handle. |
RegisterTimer(Func<Object, Task>, Object, TimeSpan, TimeSpan)
Registers a timer to send periodic callbacks to this grain.
Declaration
protected IDisposable RegisterTimer(Func<object, Task> asyncCallback, object state, TimeSpan dueTime, TimeSpan period)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<System.Object, Task> | asyncCallback | Callback function to be invoked when timr ticks. |
| System.Object | state | State object that will be passed as argument when calling the asyncCallback. |
| TimeSpan | dueTime | Due time for first timer tick. |
| TimeSpan | period | Period of subsequent timer ticks. |
Returns
| Type | Description |
|---|---|
| IDisposable | Handle for this Timer. |
Remarks
This timer will not prevent the current grain from being deactivated. If the grain is deactivated, then the timer will be discarded.
Until the Task returned from the asyncCallback is resolved, the next timer tick will not be scheduled. That is to say, timer callbacks never interleave their turns.
The timer may be stopped at any time by calling the Dispose
method
on the timer handle returned from this call.
Any exceptions thrown by or faulted Task's returned from the asyncCallback will be logged, but will not prevent the next timer tick from being queued.
UnregisterReminder(IGrainReminder)
Unregisters a previously registered reminder.
Declaration
protected Task UnregisterReminder(IGrainReminder reminder)
Parameters
| Type | Name | Description |
|---|---|---|
| IGrainReminder | reminder | Reminder to unregister. |
Returns
| Type | Description |
|---|---|
| Task | Completion promise for this operation. |


--- layout: post status: publish published: true title: 30 Hours without Power author: Arthur Rosa author_login: arthurlockman author_email<EMAIL_ADDRESS>author_url: https://b.rthr.me wordpress_id: 252 wordpress_url: http://b.rthr.me/?p=252 date: '2011-08-29 21:33:28 -0400' date_gmt: '2011-08-30 01:33:28 -0400' ---
After 30 or so hours without power from Hurricane Irene, everything here is mostly alright.  Other than that, the only major loss was our tree fort from the back yard. Let's hope we can fix it.
I hope everyone else who was affected by the hurricane is safe and healthy, and making sure that all their things are still in order.
All for Now!