Josh Matthews, @lastontheboat
If you're uncertain about writing Rust code, consider pairing with someone more experienced!
| lib.h | lib.rs |
|---|---|
|
|
| Unsafe, low-level bindings | Safe, high-level bindings |
|---|---|
|
|
The goal: encapsulate unsafety behind safe API barrier.
Use the libc
crate for maximum portability:
use libc::{c_void, c_char, c_short, c_uint, c_float};
Most primitive C types only require casting the equivalent Rust value.
lib.h
|
lib.rs
|
Strings in C are null-terminated:
const char* s = "Rust Belt Rust";
Strings in Rust are more complicated:
let s = &"Rust Belt Rust";
|
0x8000 = 0x9000
0x8004 = 14 0x9000 = Rust 0x9004 = Bel 0x9008 = t Ru 0x900D = st.. |
No null terminator in memory. |
// Panic if string contains a null byte
let s = CString::new("Rust Belt Rust").unwrap();
Allocates enough memory for string contents + null terminator.
Use s.as_ptr()
to pass a pointer to C functions.
let s = CString::new("Rust Belt Rust").unwrap();
let s_ptr = s.as_ptr();
unsafe {
ffi::puts(s_ptr);
}
let s = CString::new("Rust Belt Rust").unwrap();
let s_ptr = s.as_ptr();
drop(s);
unsafe {
ffi::puts(s_ptr);
}
Warning: pointer is invalid after destruction.
This is safe:
unsafe {
ffi::puts(CString::new("Rust!").unwrap().as_ptr());
}
But this is not:
unsafe {
let s = CString::new("Rust!").unwrap().as_ptr();
ffi::puts(s);
}
Temporary values only last as long as the expression context. As function arguments, that is the duration of the call.
Sometimes you need static strings, or worry-free literals.
unsafe {
ffi::puts(b"Rust Belt Rust\0");
}
The type of a byte string is &[u8]
.
Warning: it's easy to forget the null-terminator.
CString
is for Rust->C. For C->Rust, we need CStr
.
unsafe {
let s_ptr: *const c_char = ffi::getenv(b"PATH\0");
let s: &CStr = CStr::from_ptr(s_ptr);
}
Warning: pointer has no meaningful lifetime.
Either copy the value or use it with caution.
Copying the value from a CStr into a Rust string is straightforward:
unsafe {
let s_ptr: *const c_char = ffi::getenv(b"PATH\0");
let s: &CStr = CStr::from_ptr(s_ptr);
let s: &str = s.to_str().unwrap();
let s: String = s.to_owned();
}
CStr::to_str_lossy()
can avoid the intermediate Result.
C APIs often deal with pointers and explicit length values.
lib.h
|
lib.rs
|
Extracting these from Rust slices is straightforward:
let ints = &mut [0, 0, 0, 0];
unsafe {
ffi::fill_int_buffer(ints.as_mut_ptr(),
ints.len() as c_uint);
}
We can transform Vec<T>
/&[T]
into *const T
with as_ptr()
.
Vec<Vec<T>>
/&[&[T]]
requires allocating an intermediate vector.
C APIs that accept pointers expect a pointer to contiguous memory.
There is no contiguous memory containing inner pointers:
Vec<Vec<T>>
is different than Vec<*const T>
let mut outer = vec![vec![1.0, 2.0], vec![3.0, 4.0]];
let mut outer_c: Vec<*mut c_float> =
outer.iter_mut()
.map(|inner| inner.as_mut_ptr())
.collect()
unsafe {
scale_2x2_matrix(outer_c.as_mut_ptr(), 2.0);
}
cd exercise1; cargo build && cargo test
src/library.h
, fill in the ffi
module in src/lib.rs
src/lib.rs
that wrap the FFI functionsThe safe bindings should accept Rust types as arguments and convert them as appropriate in order to invoke FFI functions.
See hints in comments; see working code in src/solution.rs
.
get_library_version
safely return?Next on the agenda - complex types!
C structures require very little modification for use with FFI.
| lib.h | lib.rs |
|---|---|
|
|
Sometimes C headers only provide forward declarations as part of APIs.
struct image_t;
struct image_t* image_create();
unsigned int image_get_width(struct image_t*);
unsigned int image_get_height(struct image_t*);
This does not pose a problem for Rust bindings:
struct image_t(c_void);
extern "C" {
fn image_create() -> *mut image_t;
fn image_get_width(image: *const image_t) -> c_uint;
fn image_get_height(image: *const image_t) -> c_uint;
}
Like C library users, these values cannot be constructed by Rust code.
If a C API provides construction and deletion functions, this maps nicely to Rust's unique ownership model.
struct image_t;
struct image_t* image_create(unsigned int w,
unsigned int h);
void image_free(struct image_t* image);
The low level types are unsurprising:
struct image_t(c_void);
extern "C" {
fn image_create(w: c_uint, h: c_uint) -> *mut image_t;
fn image_free(image: *mut image_t);
}
We can encapsulate low-level types in high-level wrappers:
struct Image {
ptr: *mut image_t,
}
There is no need to duplicate any state from the low-level type.
The purpose of the wrapper is to mediate access to the unsafe pointer.
We can follow Rust construction idioms:
impl Image {
pub fn new(w: usize, h: usize) -> Image {
Image {
ptr: unsafe { ffi::image_create(w, h) },
}
}
}
Let's ensure that the memory does not leak or get used unsafely:
impl Drop for Image {
fn drop(&mut self) {
unsafe {
ffi::image_free(self.ptr);
}
}
}
We also need to wrap any related APIs that require raw pointers:
impl Image {
pub fn width(&self) -> usize {
unsafe { ffi::image_get_width(self.ptr) }
}
pub fn height(&self) -> usize {
unsafe { ffi::image_get_height(self.ptr) }
}
}
Beware of null pointers!
What if image_create
can't allocate? Either:
Option<Image>
from Image::new
, orSome APIs define types that have shared instead of unique ownership:
struct image_t;
struct image_t* image_create(unsigned int w,
unsigned int h);
void image_addref(struct image_t* image);
void image_release(struct image_t* image);
The FFI declarations remain unsurprising:
struct image_t(c_void);
extern "C" {
fn image_create(w: c_uint, h: c_uint) -> *mut image_t;
fn image_addref(image: *mut image_t);
fn image_release(image: *mut image_t);
}
Our constructor needs some care:
impl Image {
pub fn new(w: usize, h: usize) -> Image {
let ptr = unsafe { ffi::image_create(w, h) };
unsafe { ffi::image_addref(ptr) };
Image {
ptr: ptr,
}
}
}
Our destructor looks very similar:
impl Drop for Image {
fn drop(&mut self) {
unsafe {
ffi::image_release(self.ptr);
}
}
}
And now something new - enabling shared ownership:
impl Clone for Image {
fn clone(&self) -> Image {
unsafe { ffi::image_addref(self.ptr); }
Image {
ptr: self.ptr
}
}
}
Who is responsible for creating and destroying values?
Can those responsibilities be associated with Rust's lifetimes?
Keep unsafe pointers hidden behind safe interfaces.
cd exercise2; cargo build && cargo test
ffi
module in src/lib.rs
, write safe wrappers for the
string_t
and slice_t
types.substring
function. Provide a more
meaningful return type than int.See hints in comments; see working code in src/solution.rs
.
substring
more ergonomic than the C one?Next up - allocation and iteration!
Don't let C code free memory allocated by Rust.
Be careful when freeing memory allocated by C.
Allocator mismatch errors are frustrating.
So far we've only lent memory to C within a single stack frame.
Longer loans need well-defined endpoints for reclaiming the memory.
For strings:
CString::into_raw
pairs with CString::from_raw
For arbitrary values:
Box::into_raw
matches Box::from_raw
These will leak memory if used unevenly!
// Set the prefix that will be added to any subsequent
// prints. The string will be copied for internal use.
void set_print_prefix(const char* prefix);
versus
// Set the prefix that will be added to any subsequent
// prints. String must remain valid during all prints.
void set_print_prefix(const char* prefix);
This implementation for set_print_prefix
only works if
the string is copied. Otherwise, the pointer is invalid after returning.
pub fn set_print_prefix(prefix: &str) {
let s = CString::new(prefix).unwrap();
unsafe {
ffi::set_print_prefix(s.as_ptr());
}
}
Solution: transfer ownership using into_raw
and
from_raw
let s = CString::new("Rust Belt Rust").unwrap();
unsafe {
ffi::set_print_prefix(s.into_raw());
}
unsafe {
let _s = CString::from_raw(ffi::get_print_prefix());
}
At its core, Rust's support for iteration rests on two things.
The Iterator
trait:
trait Iterator {
type Item;
fn next(&mut self) -> Option<Self::Item>;
}
This defines a protocol which declares the type of item returned, and how to obtain the next item.
The other important ingredient is that iterator types typically borrow the value being iterated, to prevent it from being modified or destroyed.
struct MatrixIterator<'a> {
matrix: &'a Matrix,
index: usize,
}
Iterators retain all state necessary to obtain the next item when requested.
An iterator type implements the Iterator
trait:
impl<'a> Iterator for MatrixIterator<'a> {
type Item = f32;
fn next(&mut self) -> Option<f32> {
self.index += 1;
match (self.index - 1) {
0 => Some(&self.matrix.m0),
1 => Some(&self.matrix.m1),
_ => None
}
}
}
Finally some other code constructs an iterator value:
impl Matrix {
pub fn iter(&self) -> MatrixIterator {
MatrixIterator {
matrix: self,
idx: 0,
}
}
}
Suddenly it Just Works:
for val in matrix.iter().map(|v| v * 2) {
println!("{}", val);
}
cd exercise3; cargo build && cargo test
ffi
module in src/lib.rs
, a write safe wrapper for the
query_result_t
type.query_result_t
type and back.See hints in comments; see working code in src/solution.rs
.
get_nth_result
to be called without performing bounds checks?Next up - calling from Rust -> C -> Rust!
Function pointers in Rust look similar to function declarations.
fn div2(v: u32) -> f32 { v as f32 / 2.0 }
let f: fn(u32) -> f32;
f = div2;
assert!(f(5) == div2(5));
C callbacks are Rust function pointers with more extern and unsafe.
lib.h
|
lib.rs
|
unsafe extern "C" null_allocator(_: c_uint) -> *mut c_void {
ptr::null_mut()
}
// Pass a pointer to a Rust function,
ffi::init(Some(null_allocator));
// or a null pointer...
ffi::init(None);
Callbacks from C APIs will receive low-level arguments. Our bindings need a translation layer.
There are two common mechanisms for this:
C API for per-context callback:
void* context_get_private(struct context_t*);
void context_set_private(struct context_t*, void*);
typedef void (*operation_callback_t)(struct context_t*);
void context_set_callback(struct context_t*,
operation_callback_t);
Rust FFI declarations:
fn context_get_private(cx: *mut context_t) -> *mut void;
fn context_set_private(cx: *mut context_t, priv: *mut void);
type operation_callback_t =
Option<unsafe extern "C" (*mut context_t)>;
fn context_set_callback(cx: *mut context_t,
cb: operation_callback_t);
Associate high-level state with low-level data in the constructor:
struct ContextPrivate(u32);
let cx = Context { ptr: unsafe { ffi::context_create() } };
let prv = Box::new(ContextPrivate(0));
unsafe {
ffi::context_set_private(cx.ptr,
Box::into_raw(prv))
}
Invoke high-level callbacks with high-level state:
unsafe extern "C" fn callback(cx: *mut context_t) {
let p = context_get_private(cx) as *mut ContextPrivate;
rust_callback(&mut *p);
}
unsafe {
ffi::context_set_callback(cx.ptr, callback)
}
High level callback (no hint of unsafety):
struct ContextPrivate(u32);
fn rust_callback(data: &mut ContextPrivate) {
// Count the number of times invoked
data.0 += 1;
}
Clean up in the associated destructor:
impl Drop for Context {
fn drop(&mut self) {
let p = unsafe { context_get_private(self.ptr) };
let _ = unsafe { Box::from_raw(p) };
...
}
}
Sometimes more dynamic function pointers are desirable.
Closure types in Rust are two pointers (function + environment), so we cannot just use them in place of C function pointers.
We can build on the previous pattern to enable high-level APIs that run closures when C callbacks are invoked.
Storing closure trait objects in the private data allows subsequent execution:
type OperationCallback = Box<FnMut(&mut ContextState)>;
struct ContextState(u32);
struct ContextPrivate {
operation: OperationCallback,
state: ContextState,
}
Some careful partitioning of the members of the private state may be necessary to satisfy the borrow checker:
unsafe extern "C" fn callback(cx: *mut context_t) {
let p = context_get_private(cx) as *mut ContextPrivate;
let p = &mut *p;
(p.operation)(&mut p.state);
}
One issue that crops up in callbacks is how to deal with passing arguments down to high-level callbacks.
unsafe extern "C" fn callback(cx: *mut context_t)
type OperationCallback = Box<FnMut(&mut Context)>;
If Context
is a Rust type with unique ownership semantics,
it is not safe to synthesize an instance for the duration of the callback.
What we really need is to borrow the high-level type for the callback, but it may not be reachable from the callback's code.
Let's split Context
type into OwnedContext
and BorrowedContext
// Responsible for APIs that cannot destroy this context.
struct BorrowedContext { ptr: *mut ffi::context_t }
// Responsible only for APIs that destroy this context.
struct OwnedContext { cx: BorrowedContext }
There is a clear similarity to Vec<T>
/[T]
, String
/str
, T
/&T
...
To minimize friction, we can delegate OwnedContext
to BorrowedContext
as approprate:
impl Deref for OwnedContext {
type Target = BorrowedContext;
fn deref(&self) -> &BorrowedContext {
&self.cx
}
}
cd exercise4; cargo build && cargo test
ffi
module in src/lib.rs
, write a safe wrapper for
logger_t
.See hints in comments; see working code in src/solution.rs
.
Next up - the end!


Before the tablets were taken, I had eaten a Wendy’s Bacon Cheddar Melt with a Biggie size fry and a Biggie size drink. The directions on the bottle say to take this medication with food.
All of the four 50MG tablets (200MG all together) were taken orally at 1:40 PM EST on Monday, August 16, 2004.
The tablets were white, with one side blank and the other inscribed. They were shaped in a perfect, beveled, circle. The inscription was the numbers 93 followed by a “–“ underneath that and the numbers 637 underneath that.
The tablets were broken in half on the line that separated the numbers. This was in effort to decrease the time it took for the effects of the drug to be produced.
===Experience===
As of right now, it has taken 27 minutes for me to feel anything. My mind is starting to feel fuzzy. It feels much the same way as that of Hydrocodone. In fact, the tingles in my skin that I am feeling right now also feel like Hydrocodone.
It has been 10 minutes and my legs feel very heavy. I almost feel as if I have been drugged. The drowsiness is similar to that of a “Roofie.” It is very hard to move my hands fast enough to keep up with my brain while typing this. Things seem very slow and heavy.
My eyes are also doing this very peculiar thing in regards to focusing. It seems that the center of vision is clear, while the outside of it is distorted. For example, when I make my mouse the center of my view, I can see it clearly. However, the images around the mouse in the rest of my field of view are hazy and distorted, almost blurry.
It has been 43 minutes since I wrote the paragraph above. I feel very tired and I have been “nodding” in and out. My entire body feels numb; some areas (as my arms, legs, hands, and feet) are number than others (head, body cavity).
My mind has also been running in circles about various subjects. I find while on this drug, that I am not having any negative thoughts. It is like someone “shut off” the television and gave me some piece and quiet.
I may have spoke too soon. I just got off the phone with my girlfriend. We have been fighting and this has caused me great stress. While fighting about 10 minutes ago, I just burst out crying. I am normally not like this. I also had a deep and uncontrollable “whine” and felt as if I was on the brink of crying several times.
I feel very sad and tired. I am going to go to bed.
It has been 6 hours and 54 minutes since I last wrote. I still feel a bit groggy and I can feel the last and lingering effects of the drug. The hangover feels quite light compared to other drugs. I don’t feel high but I don’t feel normal either.
Since I have taken these tablets, I have not been able to eat. The smell of food is making my stomach go into knots. My mouth is also very dry, and has been since I had taken the drug.
It is now the next morning and I feel pretty good. I cannot feel any effects of the drug. I went to bed last night early and woke up today, early. This surprised me since I had been sleeping for a good part of the following day, due to the Trazodone. I am wondering if this “drugged sleep” lacks the R.E.M. components needed for rest. I will say that I did feel better when I was not on the drugs and just went to sleep normally.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


TYAsset
@objcMembers
public class TYAsset : NSObject, Codable
Undocumented
-
The ID of the asset.
Declaration
Swift
public let id: String
-
The name of the asset.
Declaration
Swift
public let name: String
-
The upper level asset ID.
Declaration
Swift
public let parentID: String
-
The whole name of the asset.
Declaration
Swift
public let fullName: String
-
Create an asset.
Declaration
Swift
public init(id: String, name: String, parentID: String, fullName: String)
Parameters
id
The ID of the asset.
name
The name of the asset.
parentID
The upper level asset ID.
fullName
The whole name of the asset.
-
Get a list of devices which bind to this asset.
Declaration
Swift
public func getDeviceList(_ completionHandle: @escaping (TYDevicesRequestResult?, Error?) -> Void)
Parameters
completionHandle
A callback returns a list of TYVagueDevice if succeed, otherwise an error.


Terry Walker's Home Page
Terry Walker
Who I am...
- Name: Terrence Paul Walker
- Title: Associate Professor
- Degrees: PhD in Astrophysics
A little additional information:
Favorite color - blue.
Where I am...
- Office: 4132 Smith Lab
- Office Phone:<PHONE_NUMBER>
- Fax:<PHONE_NUMBER>
- Department Address: 174 W. 18th Ave., Columbus, Ohio 43210
- E-Mail Address<EMAIL_ADDRESS>What I do...
- Group: Theoretical Astrophysics
- Research interests:
- big bang nucleosynthesis
- neutrino astophysics and cosmology
More information...
The OSU Physics Home Page


--- title: "NATIVE SEED COLLECTING" date: "2000-01-01 20:09:22 -06:00" categories: - adult subtitle: "" layout: "events" event-image: "native-seed-collecting.jpg" event-dates: "TUESDAY, SEPTEMBER 22 & 29" event-location: "Online via Zoom" button-type: "register" tickets-link: "https://55218.blackbaudhosting.com/55218/Native-Seed-Collecting-22Sep2020" registration-info: "Students will meet at the Garden on Sept 29 to collect seeds. Class will be split in to three groups for seed collecting in order to practice social distancing." instructor-info: "Neal Dombrowski, Red Butte Garden Horticulturist" member-cost: "$35" public-cost: "$39" event-notes: "Online lecture / In person Seed Collecting" tickets-button: "" published: false ---
REGISTRATION REQUIRED
TUESDAY, SEPTEMBER 22 & 29
6PM - 8PM
Join us for a hybrid online / in person course with Red Butte Garden Horticulturist, Neal Dombrowski. You will learn when to harvest, how to handle seeds after collection, and where and how to plant them for best germination results.
Students will be divided in to three groups for class on September 29. Groups will come at different times to collect seeds in order to practice social distancing. We’ll provide a list of plants and envelopes for seed collection. Please bring gloves and hand pruners.
Some of the forbs seeds we plan to collect include: Utah's Sweetvetch, Blue Flax, Prairie Coneflower, Showy Milkweed, Rocky Mountain Beepant. Grasses include: Bluebunch Wheatgrass, Little Bluestem, Sideoats Grama, and more.


{% include_relative includes/intro.md %}
{% include_relative includes/news.md %}
{% include_relative includes/education.md %}
{% include_relative includes/pub.md %}
{% include_relative includes/honers.md %}
{% include_relative includes/project.md %}
{% include_relative includes/interests.md %}
{% include_relative includes/activities.md %}
{% include_relative includes/cooperator.md %}
{% include_relative includes/others.md %}


{{appName}} - {{title}}
Hello {{who}}
Say hello in Rythm
Say hello in Beetl
Say hello in FreeMarker
Say hello in Velocity
Say hello in Thymeleaf
---
Trigger error in Rythm
Trigger error in Beetl
Trigger error in FreeMarker
Trigger error in Mustache
Trigger error in Velocity
Trigger error in Thymeleaf
---
Trigger runtime error in Rythm
Trigger runtime error in Beetl
Trigger runtime error in FreeMarker
Trigger runtime error in Mustache
Trigger runtime error in Velocity
Trigger runtime error in Thymeleaf
---
Demonstrate backend server error reporting on dev mode


Blog Archive 2016 The Good Sensor Dec 13 2016 Tips for Installing a Community Air Quality Sensor Network Oct 17 2016 Path to Smart Buildings Oct 05 2016 Lessons Learned From First Generation IoT Installations Sep 09 2016 Savvy Building Managers Use Sensors to Reduce Operating Expenses Sep 08 2016 Getting to Grips With IoT Network Technologies Jul 17 2016 What Is LoRaWAN? Jul 05 2016 2015 Taking the Air at the Turk’s Head Dec 18 2015 The Path to Smart Buildings Oct 07 2015 Don’t Make Me Think Aug 24 2015 Monitoring for Earthquakes With Node-red Aug 14 2015 First ‘Things’ First Aug 06 2015 When Sensors and Open Data Collide Jul 07 2015 HTTP Post Jun 06 2015 You Use Open Data Every Day May 17 2015 How to Make a Battery Last Forever… May 12 2015 Closing the Loop Between Maker & Customer for Connected Devices Apr 08 2015 Resin.io Apr 02 2015 Open and Transparent Mar 27 2015 European Parliament Approves eCall Technology Mar 17 2015 Measuring Air Quality on Opensensors Feb 22 2015 Search Has Landed Feb 16 2015 OwnTracks Journey - Part One Jan 20 2015 2014 Installing an Arduino Wifi Shield Nov 19 2014 An Open Data Startup Oct 30 2014 Getting Started With Arduino on Linux (Ubuntu) Sep 13 2014 IOT in the City Mar 12 2014 2013 Your First Post Dec 28 2013 The Big Red Button Nov 25 2013 Future Cities Oct 08 2013 Hello World Oct 07 2013


--- layout: post title: Organic Plum Jam date: 2011-03-15 11:35:11.000000000 -04:00 categories: - Gastronomic Explosions - aka Yummy Food/Recipes tags: - homemade jam - homemade plum jam - Organic plum jam - plum jam status: publish type: post published: true meta: aktt_notify_twitter: 'no' _edit_last: '1' dsq_thread_id: '1188583655' author: login: cint email<EMAIL_ADDRESS>display_name: Jacinta first_name: Jacinta last_name: '' ---
I purchased a couple of kilo's of blood plums in our organic order last week, intending on making jam. I'm happy to say, I actually got the jam made before the girls ate all the plums. I always cut down on the sugar content of jam, as I still like to taste the flavour of the fruit.
Ingredients:
1.5 kg organic blood plums (or what is available at the time)
500gm organic raw sugar
Method:
Score the skin of the plums and place in a suitable pot. Place the lid on the pot and simmer plums on a low heat for approximately 1.5 hours, stirring occasionally. After this time, remove the lid from the pot while still simmering and let the liquid reduce by half. Remove pips from the jam. Using a sieve, remove some of the lumps in the jam by pushing through with a spoon. Add the pulp left in the sieve back into the jam. Repeat until jam is thick and has a fairly smooth texture.
About 10 minutes before jaring jam, add the sugar and stir until dissolved. At the same time, add your jars to a separate pot of rapidly boiling water for 10 minutes. Remove jars from water carefully with tongs and place on a tea towel. Carefully ladle jam into prepared jars (make sure your jars are still hot to avoid the glass breaking). Place the lids on jars and seal immediately. This recipe should yield enough jam to fill 3 medium size jars or approximately 4 cups (1 cup=250ml). Store in a cool, dark place. Jam should keep for approximately 6 - 12 months if stored correctly.
Helpful hints:
[caption id="attachment_626" align="aligncenter" width="373" caption="Gorgeous Organic Blood Plums"][/caption]
[caption id="attachment_627" align="aligncenter" width="577" caption="Organic Blood Plum Jam"][/caption]
Enjoy. Jacintax


Toggle navigation
Srt
8
news
Submit
Home
Events
Hello !
Logout
Login
Register
SRT
8
Blog
duke wins yet again
(www.cnn.com)
submitted by
greg
Created on
—
comments
delete
https://www.google.com/images/srpr/logo11w.png
(nn.com)
submitted by
greg
Created on
—
comments
delete
what
(nba.com)
submitted by
greg
Created on
—
comments
delete
looks good even for next year
(nba.com)
submitted by
greg
Created on
—
comments
delete


{% extends "layout.html" %} {% block body %}
Logging into the below service providers allows HTCondor to manage the credentials for those providers. HTCondor can then read & write into the resources provided by these service providers.
{% else %}You have logged in to all service providers indicated by your job. You may close this window and resubmit your HTCondor job (if necessary).
{% endif %}


A channel to discuss trading. For useful links and more info click the pinned messages to the right.
100 messages
Before 05-Dec-19 12:00 AM
ARRR TipBotBOT16-Jul-19 02:46 AM
TipBot
@blubbi (blubbi#0643)
You tipped @Caglio0.9999 ARRR
A network fee of 0.0001 ARRR was deducted from the amount.
This operation is pending. You will be notified when when it has finished.
1
Caglio16-Jul-19 02:47 AM
oO money coming ! ! !
Ok got a question for traders here
ryman11216-Jul-19 02:50 AM
That logo got me smh.
I am thinking of buying some
ryman11216-Jul-19 02:50 AM
What does their logo look like?
Caglio16-Jul-19 02:51 AM
Well I dont think they need to re-re-brand themselves
ryman11216-Jul-19 02:52 AM
They will if they get sue sued
Caglio16-Jul-19 02:53 AM
I think @shrk should get a job at KMD, I mean dude found out a copied logo in like few mins
Sdunbar16-Jul-19 02:58 AM
Ya i gotta say that logo is almost a clone
pretty close
wonder if they were aware of that one
website looks great
i didnt mind the logo tbh either but worrisome that is a damn near clone of that centricity logo
ryman11216-Jul-19 03:01 AM
How could they not be aware? Ideas by nature are the best right?
Caglio16-Jul-19 03:04 AM
@ryman112 I see what u did there
1
@Sdunbar maybe they merged with centricity tho ( :
ryman11216-Jul-19 03:06 AM
Merger just to get the logo lol ok ok Im listening go on
Caglio16-Jul-19 03:10 AM
I am just trolling ofc, I think someone just plagiarized the logo, and earned some easy cash ( :
Crabby Paddy16-Jul-19 03:11 AM
you will be missed :’(
1
New logo feels too detailed with the gradient shift etc
Looks like how the 2019 bananas in Pajamas are compared to old school
The Centricity Mobile App is a mobile extension of our web platform,with three core features designed for comprehensive job management.
Alecandro16-Jul-19 03:27 AM
That’s part of the rebrand @Caglio, rebranding the logo. I mean I liked the old logo, but the new one is cool too
Caglio16-Jul-19 03:27 AM
Old one was original, this one is not, we should have used adidas, or batman symbol instead(edited)
ryman11216-Jul-19 03:27 AM
Dude just stop lmao
Alecandro16-Jul-19 03:27 AM
I mean similar yes, but def not stolen lol
ryman11216-Jul-19 03:28 AM
@Alecandro way too close bro
Alecandro16-Jul-19 03:28 AM
Dude that stuff happens all the time.
This operation is pending. You will be notified when when it has finished.
차미숙16-Jul-19 03:35 AM
Yay
Caglio16-Jul-19 03:35 AM
@ryman112 I guess that was the reason rebranding was late today, guy was improving the logo
1
차미숙16-Jul-19 03:35 AM
Fake internet money in my pocket
Alecandro16-Jul-19 03:38 AM
I just think that everyone is focused on the logo wayyyy to much
ryman11216-Jul-19 03:38 AM
I wonder why
Lol
Alecandro16-Jul-19 03:39 AM
♂
Bitboy16-Jul-19 03:40 AM
i agree, logo looks like compared to the original.
stirs pot
Sdunbar16-Jul-19 03:41 AM
i think based on the new logo we need to change the name to Comodo
1
its definitely a C with a sperm entering its nucleus
3
bit_chipper16-Jul-19 03:41 AM
Is this a sia coin fork?
ryman11216-Jul-19 03:42 AM
@Hollowman9000 where did ya go
bit_chipper16-Jul-19 03:42 AM
logo looks like kmd forked onto sia
차미숙16-Jul-19 03:42 AM
Komodo jv
bit_chipper16-Jul-19 03:42 AM
bought this anticipating the rebrand....day of rebrand price dumps
Bitboy16-Jul-19 03:42 AM
cumodo
1
bit_chipper16-Jul-19 03:42 AM
gotta love crypto
Alecandro16-Jul-19 03:43 AM
Lol hate to be that guy, but if you read into the rebrand at all you should have known that this wasn’t gonna be a bomb going off type of rebrand


MOULIN ROUGE (director/writer: Baz Luhrmann; screenwriter: Craig Pearce; cinematographer: Donald M. McAlpine; editor: Jill Bilcock; cast: Nicole Kidman (Satine), Ewan McGregor (Christian), John Leguizamo (Toulouse-Lautrec), Jim Broadbent (Zidler), Richard Roxburgh (Duke of Worcester), Christine Anu (Arabia) Garry McDonald (the Doctor), Kylie Minogue (Green Fairy), Kerry Walker (Marie), Jacek Koman (The Unconscious Argentinean); Runtime: 126; 20th Century Fox; 2001)
Reviewed by Dennis Schwartz
A dazzling and lively fictionalized musical/romantic/comedy about the notorious Moulin Rouge, which is set during the period between 1899 (the summer of love) and 1900. It's a fluffy romantic story about doomed lovers, a courtesan and a penniless writer, living the bohemian lifestyle, and about a play they put on that needs the support of a rich nobleman who has a black heart and an evil eye for the courtesan. The musical numbers are splashy, hijacked from other musicals, and gaudily presented, befitting such a story set in a notorious Parisian tourist-trap like the Moulin Rouge nightclub (it was filmed in Australia). The energy and vitality of these musical scores and a host of bizarrely dressed supporting performers who fill the stage with song and dance, gives this film a comical circus flavoring, which manages to cover-up its cliché-ridden story as much as possible.
It's directed with an eye for color, especially the color of rouge, by the pop-musical enthusiast, the Australian, Baz Luhrmann ("Romeo and Juliet"/"Strictly Ballroom"), an MTV type of director, who is more interested at getting at what dazzles than the why of the dazzle. The film is a series of perpetual motion shots, never pausing to delve into any character study. The problem with that, is you don't really care what happens to the lovers. The spectacle of the film is the only substance offered, and its made sumptuously beautiful for the eye to feast on. It sells its sex in the same way a snake-oil salesman hawks his product, which results in a tirade for the bohemian motto of truth, beauty, freedom, and love; but, it only succeeds in making the sex presented onscreen not live up to expectations.
What excuses this film from being such a rip-off of other films, is that what is stolen from other films works very well here. It gives the film all the breathless moments found in other films a chance to breath again in this whirlwind of a production that is in a constant climax mode. If all it took was energy and beautiful sets and costumes, then this production would be a glorious one; but, what this film didn't have was a love story that could touch the heart, even as it screamed out that it was all about heart. This is an easy movie to praise for being inventive and diverting, but it cannot be admired for a film that has a semblance of truth about it. It's just another enjoyable but forgettable Hollywood musical, in a long chorus line of such ventures. The film has the feel in all its excesses of a Ken Russell type of musical crossed with any number of Hollywood ones, even such an illustrious traditional one as "Singing in the Rain."
The story is told through the eyes of an English writer (he acts as the narrator), whose reason for being is to love someone and have that love returned. Ewan McGregor stars as Christian. He is the young innocent who leaves behind his uptight father during the French belle époque of the 1890s to live the bohemian life as a writer in Montmartre, Paris. Pecking away at his typewriter, Christian is startled when a costumed Argentinean actor falls through the ceiling of his garret and a dwarf with a lisp, the artist who is now a performing artist, Toulouse-Lautrec (John Leguizamo), greets him at the door. They have been rehearsing a stage production called "Spectacular Spectacular," and quickly realize how talented Christian is and he is hired on the spot to be the play's new writer. He will also be introduced to the fast track lifestyle of the bohemians in matters of drink and love.
But there are obstacles in the way of putting on the play in the Moulin Rouge, which must be met with by trickery by Lautrec (he's the acting groups' leader). He first inveigles a very private meeting with the would-be star of the show, the courtesan and headline performer at the Moulin Rouge, the leggy and sexy Satine (Kidman), and at this meeting she thinks he's the duke. When she discovers he's not, it's too late, she has already fallen in love with him. This changes her hardened personality to one of an innocent girl who sweetly falls in love, a scenario which the film couldn't convincingly pull off. She will also have a secret she keeps from Christian, that she's dying from consumption. The wealthy duke is the heavy in this film. He is played by Richard Roxburgh, who plays the one-dimensional role as tritely as it is written. He's got the dough to make the show happen so the impresario of the dance hall, the colorful liar with the tough exterior but soft heart, Harold Zidler (Broadbent), entices the duke by setting up a private liason with him and Satine -- who is also known as "the Sparkling Diamond." When all the confusion clears, the result is that the play is sponsored by the duke with the understanding he gets to sleep with Satine.
The film's gimmick is having 20th century musical songs and routines, that are eye popping, fill this 19th century set musical. They range from songs such as: "The Sound of Music," "Your Song," "Diamonds Are a Girl's Best Friend," "Material Girl," "Smells Like Teen Spirit," "Like a Virgin," "Lady Marmalade," "Silly Love Songs," "All You Need Is Love," "Up Where We Belong," "Don't Leave Me This Way," "Heroes," "In the Name of Love," and "Roxanne." This is just a partial list of songs, as the stage is always tuned for some song and dance action.
All the main characters played are the usual stock archetypes--Nicole Kidman was eye catching as the nightclub star and courtesan who is really a sweetie for a whore, but she was too physically big to be handled in a believable way by Ewan McGregor. He's the sensitive writer type with the pure heart, who falls in love with a woman who makes him pine for her (at least he stays in character for the entire film). I was amused by John Leguizamo as the rascal-like Toulouse-Lautrec, and Jim Broadbent was overpowering in his role as ringmaster of this operation. He seems to be much too stagy a thespian for these more profane Hollywood actors he's surrounded by, as he stood out from them because either he was a much better actor than they were or because he hammed it up too much. In any case, his performance did stick out like someone who is thumbing a ride back to Topsy-Turvy. Yet I felt myself partial to his performance, as in every scene he was in I couldn't help being overwhelmed by his strong presence; though, Kidman's performance was the key one of the film. She handles her part in an admirable way, showing us a lot of leg and feeling for who she was; but, the love story had no sparks and just didn't work right.
It's a film that looked good (lots of garish colors and stardust), sounded fine, and felt so-so. A great escape film in the tradition of Hollywood spectacles, a film that does justice to the cancan dancers of the Moulin Rouge. It's a fun film to let one's hair down, to sit leisurely back with some popcorn and watch this film speed across the screen; while, from time to time peeking in on the jewel-encrusted elephant that goes for Satine's boudoir, or checking in on McGregor's impoverished artist's digs as he slaves over the typewriter with an outside neon sign shining throughout the night (speaking of clichés).
REVIEWED ON 6/9/2001 GRADE: B-
Dennis Schwartz: "Ozus' World Movie Reviews"
http://www.sover.net/~ozus
<EMAIL_ADDRESS>© ALL RIGHTS RESERVED DENNIS SCHWARTZ
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


AnyRealmCollection
public final class AnyRealmCollection<Element> : RealmCollection where Element : RealmCollectionValue
A type-erased RealmCollection
.
Instances of RealmCollection
forward operations to an opaque underlying collection having the same Element
type.
-
The type of the objects contained within the collection.
Declaration
Swift
public typealias ElementType = Element
-
Declaration
Swift
public func index(after i: Int) -> Int
-
Declaration
Swift
public func index(before i: Int) -> Int
-
Creates an
AnyRealmCollection
wrappingbase
.Declaration
Swift
public init<C>(_ base: C) where Element == C.Element, C : RealmCollection
-
The Realm which manages the collection, or
nil
if the collection is unmanaged.Declaration
Swift
public var realm: Realm? { get }
-
Indicates if the collection can no longer be accessed.
The collection can no longer be accessed if
invalidate()
is called on the containingrealm
.Declaration
Swift
public var isInvalidated: Bool { get }
-
The number of objects in the collection.
Declaration
Swift
public var count: Int { get }
-
A human-readable description of the objects contained in the collection.
Declaration
Swift
public var description: String { get }
-
Returns the index of the given object, or
nil
if the object is not in the collection.Declaration
Swift
public func index(of object: Element) -> Int?
Parameters
object
An object.
-
Returns the index of the first object matching the given predicate, or
nil
if no objects match.Declaration
Swift
public func index(matching predicate: NSPredicate) -> Int?
Parameters
predicate
The predicate with which to filter the objects.
-
Returns the index of the first object matching the given predicate, or
nil
if no objects match.Declaration
Swift
public func index(matching predicateFormat: String, _ args: Any...) -> Int?
Parameters
predicateFormat
A predicate format string, optionally followed by a variable number of arguments.
-
Returns a
Results
containing all objects matching the given predicate in the collection.Declaration
Swift
public func filter(_ predicate: NSPredicate) -> Results<Element>
Parameters
predicate
The predicate with which to filter the objects.
Return Value
A
Results
containing objects that match the given predicate.
-
Returns a
Results
containing the objects in the collection, but sorted.Objects are sorted based on the values of the given key path. For example, to sort a collection of
Student
s from youngest to oldest based on theirage
property, you might callstudents.sorted(byKeyPath: "age", ascending: true)
.Warning
Collections may only be sorted by properties of boolean,
Date
,NSDate
, single and double-precision floating point, integer, and string types.Declaration
Swift
public func sorted(byKeyPath keyPath: String, ascending: Bool) -> Results<Element>
Parameters
keyPath
The key path to sort by.
ascending
The direction to sort in.
-
Returns a
Results
containing the objects in the collection, but sorted.Warning
Collections may only be sorted by properties of boolean,
Date
,NSDate
, single and double-precision floating point, integer, and string types.Declaration
Swift
public func sorted<S: Sequence>(by sortDescriptors: S) -> Results<Element> where S.Iterator.Element == SortDescriptor
Parameters
sortDescriptors
A sequence of
SortDescriptor
s to sort by.
-
Returns the minimum (lowest) value of the given property among all the objects in the collection, or
nil
if the collection is empty.Warning
Only a property whose type conforms to the
MinMaxType
protocol can be specified.Declaration
Swift
public func min<T>(ofProperty property: String) -> T? where T : MinMaxType
Parameters
property
The name of a property whose minimum value is desired.
-
Returns the maximum (highest) value of the given property among all the objects in the collection, or
nil
if the collection is empty.Warning
Only a property whose type conforms to the
MinMaxType
protocol can be specified.Declaration
Swift
public func max<T>(ofProperty property: String) -> T? where T : MinMaxType
Parameters
property
The name of a property whose minimum value is desired.
-
Returns the sum of the values of a given property over all the objects in the collection.
Warning
Only a property whose type conforms to the
AddableType
protocol can be specified.Declaration
Swift
public func sum<T>(ofProperty property: String) -> T where T : AddableType
Parameters
property
The name of a property whose values should be summed.
-
Returns the average value of a given property over all the objects in the collection, or
nil
if the collection is empty.Warning
Only the name of a property whose type conforms to the
AddableType
protocol can be specified.Declaration
Swift
public func average(ofProperty property: String) -> Double?
Parameters
property
The name of a property whose average value should be calculated.
-
Returns the object at the given
index
.Declaration
Swift
public subscript(position: Int) -> Element { get }
Parameters
index
The index.
-
Returns a
RLMIterator
that yields successive elements in the collection.Declaration
Swift
public func makeIterator() -> RLMIterator<Element>
-
The position of the first element in a non-empty collection. Identical to endIndex in an empty collection.
Declaration
Swift
public var startIndex: Int { get }
-
The collection’s “past the end” position. endIndex is not a valid argument to subscript, and is always reachable from startIndex by zero or more applications of successor().
Declaration
Swift
public var endIndex: Int { get }
-
Returns an
Array
containing the results of invokingvalueForKey(_:)
withkey
on each of the collection’s objects.Declaration
Swift
public func value(forKey key: String) -> Any?
Parameters
key
The name of the property whose values are desired.
-
Returns an
Array
containing the results of invokingvalueForKeyPath(_:)
withkeyPath
on each of the collection’s objects.Declaration
Swift
public func value(forKeyPath keyPath: String) -> Any?
Parameters
keyPath
The key path to the property whose values are desired.
-
Invokes
setValue(_:forKey:)
on each of the collection’s objects using the specifiedvalue
andkey
.Warning
This method may only be called during a write transaction.
Declaration
Swift
public func setValue(_ value: Any?, forKey key: String)
Parameters
value
The value to set the property to.
key
The name of the property whose value should be set on each object.
-
Registers a block to be called each time the collection changes.
The block will be asynchronously called with the initial results, and then called again after each write transaction which changes either any of the objects in the collection, or which objects are in the collection.
The
change
parameter that is passed to the block reports, in the form of indices within the collection, which of the objects were added, removed, or modified during each write transaction. See theRealmCollectionChange
documentation for more information on the change information supplied and an example of how to use it to update aUITableView
.At the time when the block is called, the collection will be fully evaluated and up-to-date, and as long as you do not perform a write transaction on the same thread or explicitly call
realm.refresh()
, accessing it will never perform blocking work.Notifications are delivered via the standard run loop, and so can’t be delivered while the run loop is blocked by other activity. When notifications can’t be delivered instantly, multiple notifications may be coalesced into a single notification. This can include the notification with the initial collection.
For example, the following code performs a write transaction immediately after adding the notification block, so there is no opportunity for the initial notification to be delivered first. As a result, the initial notification will reflect the state of the Realm after the write transaction.
let results = realm.objects(Dog.self) print("dogs.count: \(dogs?.count)") // => 0 let token = dogs.observe { changes in switch changes { case .initial(let dogs): // Will print "dogs.count: 1" print("dogs.count: \(dogs.count)") break case .update: // Will not be hit in this example break case .error: break } } try! realm.write { let dog = Dog() dog.name = "Rex" person.dogs.append(dog) } // end of run loop execution context
You must retain the returned token for as long as you want updates to be sent to the block. To stop receiving updates, call
invalidate()
on the token.Warning
This method cannot be called during a write transaction, or when the containing Realm is read-only.
Declaration
Swift
public func observe(_ block: @escaping (RealmCollectionChange<AnyRealmCollection>) -> Void) -> NotificationToken
Parameters
block
The block to be called whenever a change occurs.
Return Value
A token which must be held for as long as you want updates to be delivered.


Condition
{{trial.Condition}}
Sponsors
{{trial.Sponsor}}
Identified
{{trial.Identified | number : fractionSize}}
Pre-Screened
% of Identified{{trial.Pre_Screened | number : fractionSize}} ({{(trial.Pre_Screened / trial.Identified) * 100 | number:2 }}%)
Qualified
% of Pre-Screened {{trial.Qualified | number : fractionSize}} ({{(trial.Qualified / trial.Pre_Screened) * 100 | number:2}}%)
Enrolled
% of Qualified {{trial.Enrolled | number : fractionSize}} ({{(trial.Enrolled / trial.Qualified) * 100 | number:2}}%)


Try an ImageMagick command on different test images. Check out the suggestions!
ImageMagick Command:
Suggestions:
Images:


|
- Online Archives - Sixteenth Biennial Meeting of the Philosophy of Science Association Thursday, October 22 - Saturday, October 24 1998 Kansas City, Missouri Conference Resources Kansas City Resources George Gale's Essential Guide to Eating and Entertainment in Kansas City (.pdf format) Airport
| Map
of Kansas City | Weather
|
|


influx
InfluxDB command-line client.
More information: home page
- Connect to an InfluxDB running on localhost with no credentials:
influx
- Connect with a specific username (will prompt for a password):
influx -username username -password ""
- Connect to a specific host:
influx -host hostname
- Use a specific database:
influx -database database_name
- Execute a given command:
influx -execute "influxql_command"
- Return output in a specific format:
influx -execute "influxql_command" -format json|csv|column


Shop
Explore
Browse
{{cate.name | capitalize}}
Browse
{{cate.name | capitalize}}
{{shop.name}}
{{shop.email}}
more


We extend infrastructure!
- brand web-enabled bandwidth
- repurpose end-to-end convergence
- recontextualize front-end networks
- architect plug-and-play e-business
- transition wireless synergies
- innovate synergistic supply-chains
- transition global partnerships
- leverage clicks-and-mortar e-tailers
- orchestrate 24/7 paradigms
- innovate one-to-one users
- architect dynamic paradigms
- transform e-business action-items


PubTal plugins allow the functionality of PubTal to be expanded and customised. Currently support for new content types and new upload methods can be added using plugins.
Plugins are implemented as Python modules which are placed in either the site-packages/pubtal/plugins directory, or in a directory specified using the additional-plugins-dir configuration option. All plugins must implement a module level function called getPluginInfo() which returns a list of the functionality provided by this plugin. The list is comprised of dictionaries that describe the functionality provided by this plugin and provide additional information to PubTal about that functionality.
Each dictionary in the list returned from getPluginInfo() must have a key "functionality". Legal values of for this key are currently :
In addition to the key "functionality" having a value of "content", the dictionary must also contain the following keys:
The two methods defined by SitePublisher.ContentPublisher (other than the constructor) which must be implemented are: publish() and getPageContext()
In addition to the key "functionality" having a value of "upload-method", the dictionary must also contain the following keys:
PubTal Version 3.5


@@include('app/partials/head.tpl', { "title": "Bricks—the modular CSS framework", "description": "TODO" })
@@include('app/partials/nav.tpl', { "hiding": "", "fixed": "navbar--fixed-top", "animate": "fade--down" })Links are of stripped the inconsistent default underline and styled with the brand colour and a subtle underline. The links have a dedicated :hover
and :visited
style. Just include the .link
class and you're good to go!
I’m a pretty-looking link
There are several instances where the link visuals can be spiced up to hint what kind of content awaits on the other end.
External link


Enabling/Disabling Tracking of Link Clicks
How to track the number of times a link is clicked using the Link Control. This option can be used with any of the link types (URL, Page, File or User). Link Tracking information is displayed on the Edit Item page of any link it is enabled for. Enabling this setting records and displays the following additional link information:
- URL: Displays the URL that will be tracked. E.g. http://awesomecycles.biz/LinkClick.aspx?link=59&tabid=84&mid=478&language=en-US. Note: In the below image, more than one language is enabled for the site, therefore the link includes the associated language.
- Clicks: The total number of times this link has been clicked. This total includes clicks on other occurrences of this link on this module. However it does not include clicks on this link for other Links modules or any other types of modules. E.g. Click 3
- Last Click: The time and date when the link was last clicked. E.g. 8/25/2011 2:37:49 PM
Note: This tutorial assumes you are viewing the Link Control, typically located on a Settings page or displayed on an Edit Item page when adding/editing an item such as a link on a module.
- At Track Number Of Times This Link Is Clicked? to enable link tracking. - OR - to disable it.
-
Click the Update button. Note: Link tracking isn't enabled and displayed until the item is updated and you return to the Edit Page for this item.


transactions
payments
processing fees
It is estimated that bitcoin is using approximately 23,312 megawatt hours per day (see electric consumption at blockchain.info/stats (24 hour stats)) of electric for block solving algorithms.
The aim of the gridcoin project is to shift the computational power primarily to Boinc projects while the mining operations become a second priority - so as the network is scaled up, boinc utilization is scaled up in tandem.
The coin miners will be rewarded with a small token subsidy if they fail to mine boinc shares, but a much larger subsidy when mining with boinc.
This digital cryptocurrency allows instant peer to peer transactions, worldwide payments and very low processing fees. The source code is open source and allows everyone to take part in the success of the currency.
Gridcoin is based on the Bitcoin protocol but differs from Bitcoin in that it can be efficiently mined with consumer-grade hardware, therefore is not as likely to be replaced by specialized ASIC mining chips in the future.
Gridcoin provides faster transaction confirmations (2.5 minutes on average) and uses memory intensive scrypt-based proof-of-work algorithms to verify transactions.
Vital Statistics:
Algorithm: Scrypt, Re-target: 30 minutes with 2.5 min block targets, Block reward: 5-150, 5 GRC wihtout Boinc, 6-150 - receiving a calculated subsidy based on boinc utilization.
Total coins: Gridcoin is scheduled to produce approximately 168 million currency units (based on an average block subsidy of 100GRC).
Official Mining Launch Date: 10/16/2013 @ 11:00PM CST
| SHA256: 382d74e187ccdc411daeb42fc70c8e7e43d0cde286747a8a026083e426873e7b |
Its free, and harnesses the unused clock cycles from PC and Video cards to aid in the research for the project goal.
Some of the major projects that you can participate in:
Up-to-date network statistics can be found at Gridcoin Block Explorer Charts.
Source code for Gridcoin-Qt and related projects are available on GitHub.
As a result, merchants get faster confirmation times, while still having ability to wait for more confirmations when selling bigger ticket items.
This provides protection from wallet-stealing viruses and trojans as well as a sanity check before sending payments.
The gridcoin network is therefore scheduled to produce approximately 168 million gridcoins (based on an average subsidy of 100grc), which is 8 times as many currency units as Bitcoin.
|
Instant peer-to-peer transactions Worldwide payments Zero or low processing fees |
|
Bitcoin uses peer-to-peer technology to operate with no central authority or banks; managing transactions and the issuing of bitcoins is carried out collectively by the network. Bitcoin is open-source; its design is public, nobody owns or controls Bitcoin and everyone can take part. Through many of its unique properties, Bitcoin allows exciting uses that could not be covered by any previous payment system. |


Go to the source code of this file.
|
|
template<typename T > |
| using | CompressedVector = Bitvalue< T > |
| |
|
| enum | QuantizationMethod { OCTAHEDRAL,
SPHERICALFIBONACCI
} |
| |
|
|
template<typename T > |
| Vector3f | fc::unquantize (const CompressedVector< T > &cvec) |
| |
|
template<typename T > |
| void | fc::quantize (const Vector3f &vec, CompressedVector< T > &cvec) |
| |
| Vector3f | fc::uniformMapping (const Vector3f &v, const Vector3f &axis, const float ratio) |
| | uniformMapping Uniform mapping from uniquant (Fast lossy compression of 3d unit vectors) More...
|
| |
| Vector3f | fc::inverseUniformMapping (const Vector3f &v, const Vector3f &axis, const float ratio) |
| | inverseUniformMapping Inverse uniform mapping from uniquant (Fast lossy compression of 3d unit vectors) More...
|
| |
| float | fc::computeRatio (const std::vector< Vector3f > &fibers) |
| | computeRatio Compute the minimum dot product of the input fiber (only one) More...
|
| |
| float | fc::computeRatioVerif (const std::vector< std::vector< Vector3f > > &fibers, bool verbose, uint64_t &totalNbPts) |
| | computeRatioVerif Compute the ratio of the input fibers and verify that stepsizes are almost constant More...
|
| |
| float | fc::computeRatio (const std::vector< std::vector< Vector3f > > &fibers, bool verbose, uint64_t &totalNbPts) |
| | computeRatioVerif Compute the ratio of the input fibers without verifying that stepsizes are almost constant More...
|
| |
| template<typename T > |
| void | fc::compressFiber (const std::vector< Vector3f > &fiber, const float ratio, CompressedFiber< T > &cfiber) |
| | compressFiber Compression of the fiber considering its ratio More...
|
| |
| template<typename T > |
| void | fc::compressFiber (const std::vector< Vector3f > &fiber, const float ratio, CompressedFiber< T > &cfiber, float &maxError, double &meanError) |
| | compressFiber Compression of the fiber considering its ratio, computing the obtained error at the same time More...
|
| |
| template<typename T > |
| void | fc::decompressFiber (const CompressedFiber< T > &cfiber, const float ratio, std::vector< Vector3f > &fiber) |
| | decompressFiber Decompress the input fiber More...
|
| |
|
|
float | epsMapping = 0.08f |
| |
|
QuantizationMethod | quantizationMethod = QuantizationMethod::SPHERICALFIBONACCI |
| |
◆ compressFiber() [1/2]
template<typename T >
| void fc::compressFiber |
( |
const std::vector< Vector3f > & |
fiber, |
|
|
const float |
ratio, |
|
|
CompressedFiber< T > & |
cfiber |
|
) |
| |
compressFiber Compression of the fiber considering its ratio
- Parameters
-
| fiber | Fiber to compress |
| ratio | Ratio to use for the compression |
| cfiber | Fiber compressed |
| template | T is the type of the compressed data, either int8 or int16 depending on the precision asked |
◆ compressFiber() [2/2]
template<typename T >
| void fc::compressFiber |
( |
const std::vector< Vector3f > & |
fiber, |
|
|
const float |
ratio, |
|
|
CompressedFiber< T > & |
cfiber, |
|
|
float & |
maxError, |
|
|
double & |
meanError |
|
) |
| |
compressFiber Compression of the fiber considering its ratio, computing the obtained error at the same time
- Parameters
-
| fiber | Fiber to compress |
| ratio | Ratio to use for the compression |
| cfiber | Fiber compressed |
| maxError | Maximum error (at point level) when compressing the fiber |
| meanError | Average error (at point level) when compressing the fiber |
| template | T is the type of the compressed data, either int8 or int16 depending on the precision asked |
◆ computeRatio() [1/2]
| float fc::computeRatio |
( |
const std::vector< Vector3f > & |
fibers | ) |
|
computeRatio Compute the minimum dot product of the input fiber (only one)
- Parameters
-
| fiber | Fiber from which to compute the minimum dot product |
- Returns
- Minimum dot product of the unique fiber
◆ computeRatio() [2/2]
| float fc::computeRatio |
( |
const std::vector< std::vector< Vector3f > > & |
fibers, |
|
|
bool |
verbose, |
|
|
uint64_t & |
totalNbPts |
|
) |
| |
computeRatioVerif Compute the ratio of the input fibers without verifying that stepsizes are almost constant
- Parameters
-
| fibers | Fibers from which to compute the ratio |
| verbose | Parameter to display the maximum angle if true |
| totalNbPts | Variable that will contain the total number of points in the bundle, used for average error computation |
- Returns
- Ratio of the bundle of fibers
◆ computeRatioVerif()
| float fc::computeRatioVerif |
( |
const std::vector< std::vector< Vector3f > > & |
fibers, |
|
|
bool |
verbose, |
|
|
uint64_t & |
totalNbPts |
|
) |
| |
computeRatioVerif Compute the ratio of the input fibers and verify that stepsizes are almost constant
- Parameters
-
| fibers | Fibers from which to compute the ratio |
| verbose | Parameter to display the maximum angle if true |
| totalNbPts | Variable that will contain the total number of points in the bundle, used for average error computation |
- Returns
- Ratio of the bundle of fibers
◆ decompressFiber()
template<typename T >
| void fc::decompressFiber |
( |
const CompressedFiber< T > & |
cfiber, |
|
|
const float |
ratio, |
|
|
std::vector< Vector3f > & |
fiber |
|
) |
| |
decompressFiber Decompress the input fiber
- Parameters
-
| cfiber | Compressed fiber to decompress |
| ratio | Ratio to use for decompression (same than for compression) |
| fiber | Decompressed fiber |
◆ inverseUniformMapping()
| Vector3f fc::inverseUniformMapping |
( |
const Vector3f & |
v, |
|
|
const Vector3f & |
axis, |
|
|
const float |
ratio |
|
) |
| |
inverseUniformMapping Inverse uniform mapping from uniquant (Fast lossy compression of 3d unit vectors)
- Parameters
-
| v | Vector to unmap |
| axis | Axis to use for the spherical cap |
| ratio | Ratio to use for the mapping |
- Returns
- The unmapped vector
numerical instabilities
◆ uniformMapping()
| Vector3f fc::uniformMapping |
( |
const Vector3f & |
v, |
|
|
const Vector3f & |
axis, |
|
|
const float |
ratio |
|
) |
| |
uniformMapping Uniform mapping from uniquant (Fast lossy compression of 3d unit vectors)
- Parameters
-
| v | Vector to map |
| axis | Axis to use for the spherical cap |
| ratio | Ratio to use for the mapping |
- Returns
- The mapped vector


This project is a trial for the creation of a light novel compilation tool, through the use of web scraping. There is such a wide range of websites to comb through for light novels, as such it may be difficult to find the exact book we want to read. Through our website, we hope to make it easier to find the exact book that we want. We would also like to add functionality to discover books through search criteria such as genre, authors, or number of pages and chapters.


Our standards document describes platform, testing, formatting, and best practices for developing applications in javascript. The objectives for these standards are based on the following:
Other Resources:
Every attempt should be made to comply with the ECMA 5 standard and be aware of it's capabilities. At a minimum, 'use strict' should be placed at the top of all function/classes. JSHint will warn if 'use strict' is not found, including support scripts.
Our preferred javascript IDE is WebStorm. We have a roundpeg.xml configuration file to enforce our formatting standard. For Mac users the file goes in ~/Library/Preferences/WebIde50/codestyles. If WebStorm isn't used, we encourage Eclipse with the javascript plugin, Sublime or Mate with appropriate plugins. Any IDE will work but using WebStorm with our configuration settings is the easiest way to create format-compliant code. Using an alternate IDE may require a post processor to help enforce standards.
Our web applications use REST services and WebSockets to exchange data between client and server. Client development requires node to run tests.
Logging for test, development and production debugging is a big part of our JavaScript development. We have developed a Remote Logging lib/utility similar to log4j that is used to log to the local console (Safari, Chrome, FF5, & IE9) as well as to a remote service listener. Developers are encouraged to add log and assert statements to help debug and validate code.
Examples of typical use: log.debug('event handler: ', event.type, ', data: ', event.data); log.info('initialize service'); log.warn('this should not happen here...'); log.error('exception caught', error);
Loggers are always created by ApplicationFactory for major each class. So you would see this:
var MyClass = function(options) {
var clz = this,
log = options.log;
// more code...
// constructor tests
if (!log) throw new Error('MyClass must be constructed with a valid log object');
};
All javascript projects use a standard MVC layout with components, controllers, models, views, services, events, and delegates. Testing packages use a similar layout but add mocks and fixtures. A single index page (index.html) accesses ApplicationFactory to construct application components based on a set of options that inject values and components that are mapped from their DOM counterparts.
Below is an example of a typical project.
project/
app/
assets/
components/
controllers/
delegates/
events/
models/
services/
views/
index.html
build/
application.js
application.css
index.html
app.cache
favicon.ico
config/
Config.js
site-config.json
libs/
mocha/
mocks/
fixtures/
components/
controllers/
delegates/
events/
models/
services/
mocha/
includes.js
Gruntfile.js
Makefile
package.json
Components are instantiated from component factories. All components have full unit tests. Components never reference services but have callback hooks to controllers to request data when needed. Controllers populate data directly to components.
An alternative to creating component classes is to create/use a builder class, usually called ComponentBuilderDelegate. This can be used to build all pages, buttons, panels, tables, etc. for small applications or can be combined with component classes, usually page containers to create larger applications. These components usually rely somewhat on Bootstrap.css.
Building an entire application using components creates a very extensible platform. Pages, views, containers, dialogs and low level components can be specified in configuration and built dynamically as the application loads. But, the downside is that this approach requires a specialized skill set foreign to most HTML/CSS coders.
Controllers are the glue between view/components and data models. Most of their logic concerns event and callback management. At a minimum, each project has at least one controller called ViewController. The view controller coordinates actions between services and UI views and actions.
The controllers package also includes all factories. At a minimum there is a single ApplicationFactory. In larger applications there are service, delegate, and component factories.
Delegates are the worker classes. Workers include parsers, calculators, formatters, validators, etc. Delegates are also created to simply offload work from controllers, data access or service objects. Below is an example of a typical validator delegate. As you can see, this validator actually uses another validation delegate to access a library of validation methods.
var ValidationDelegate = function(options) {
'use strict';
var delegate = this,
log = options.log,
validator = options.commonValidator;
this.validateCountry = function(country, errors) {
log.info('validate the country object');
if (!errors) {
errors = [];
}
validator.validateLength( 'countryCode:', country.countryCode, 3, 10, errors );
validator.validateLength( 'countryName:', country.countryName, 1, 50, errors );
return errors;
};
// constructor validation
if (!log) throw new Error("validation delegate must be constructed with a log");
if (!validator) throw new Error("validation delegate must be constructed with a validation object");
};
The events package includes all custom event types used throughout the system. It is supported by dispatcher class (EventDispatcher or the newer CentralDispatcher) used as the system's central event bus. Event classes should include static constructor methods as well as static event type definitions. Here is a typical example:
var ApplicationStateEvent = function(type, data) {
'use strict';
this.type = type || ApplicationReadyEvent.READY;
this.data = data;
};
ApplicationStateEvent.APPLICATION_READY = 'ApplicationStateEvent_ApplicationReady';
ApplicationStateEvent.createReadyEvent = function(obj) {
return new ApplicationStateEvent( ApplicationStateEvent.APPLICATION_READY, obj );
};
All event handler methods should end with the key word "Handler" and their function parameter should always be "event". This removes any ambiguity or question that this method is invoked by some triggered event, either from the central dispatcher or from a support system (ajax, button clicks, etc).
Callbacks follow the node standard signature of callback(err, result). The naming convention for the callback function is either the word "callback", or somethingCallback, e.g., completeCallback or updateCallback. In any case, the word callback should be at the end of the name.
Callbacks should be defined as functions or methods like this:
var myfunction = function(id, completeCallback) {
var foundCallback = function(err, result) {
if (err) return callback( err, null );
customer = result;
// do some stuff with the customer...
return completeCallback( err, customer );
};
dao.findCustomerById( getPool().getConnection(), id, foundCallback );
};
All data models are stored in the models package. Models are usually simple value objects but sometimes have additional functionality. Below is a typical example of a value object. The constructor accepts a params argument that acts as a copy-constructor. Some of the values are set to defaults. All value members are public. Here are two examples of the data model pattern. var UserQuestion = function(params) { 'use strict'; if (!params) params = {};
this.token = params.token;
this.name = params.name;
this.email = params.email;
this.topic = params.topic;
this.text = params.text
this.questionSource = params.questionSource || 'web';
};
Each service request must have an associated request model used for query, find, and save. These models inherit from abstract classes to insure that the proper userSessionToken accompanies each request.
The services package is were all remote connections are made, usually through Ajax or WebSocket communications. Success and error handling methods are implemented a single class, CommonDataService. Request objects, parsing delegates, and specific data events are required. Application factory configures each data service with the appropriate parser, event class, logger etc. Events are typically listened to and handled in view controllers.
Service methods should always accept a single request object with a "createParams()" method to pull prepared parameters. There are two abstract request classes, AbstractQueryRequest and AbstractUpdateRequest that should be extended to provide a common interface. Request objects are created in the models package and should have associated tests. Common Data Service
All data services use CommonDataService to pull standard json response data from remote servers. This class has a number of supporting classes including request models, parse delegate and an event class with event types to support success and failure for the three implemented methods:query: given a concrete implementation of AbstractQueryRequest, query returns a page-able list of domain objects. Objects are parsed by accessing parseList() in the domain parser save: given a domain class and AbstractUpdateRequest, post the domain class to the server for update or insert. A successful return is always a single data model parsed by parseModel() find: a find request object populated with the domain object's id is sent to the server. Successful response is parsed by parseModel()
The assets folder is where css, images, icons, etc. are stored. The assets folder is ignored for unit tests. Most projects use less to compile css. Including Javascript Files
Before you can run unit tests effectively you will need to install grunt and grunt-cli. See this getting-started page for help...
Tests are organized by package, e.g., controllers, services, delegates, etc. Each controller, component, service, delegate, and data model has it's own set of unit tests. Event classes are also tested mainly for naming consistency and validation.
Tests use mocha/should as the test framework.
All projects have at least one Makefile that help coordinate building and running of tests. For most projects, you can run "make test" to run unit tests and jshint static file tester. Some projects use grunt to actually run test and jshint, others run tests and jshint without the use of grunt. Those projects require that jshint is installed on the target machine.
There is a build task called watch to run the full suite of tests while developing. You can launch this from make by invoking "make watch"
Integration testing is created using two tools, casperjs and selenium. Casperjs tests access phantomjs, a headless browser. Selenium opens a browsers and plays back scenarios.
Most methods defined in javascript classes are public to enable full testing. This is not always practical, so when private variables and methods are required they should be made public for testing using the following convention:
var MyClass = function(options) {
'use strict';
var cls = this,
log = options.log,
myLocalVar = 5;
var myLocalMethod = function() {
};
this.__protected = function() {
return {
myLocalVar:myLocalVar,
myLocalMethod:myLocalMethod
};
};
};
var cls = new MyClass();assert cls.__protected.myLocalVar === 5;assert typeof cls.__protected.myLocalMethod === 'function';
Javascript is single threaded. That's good. But to take advantage of our ever increasing multi-processor world, we need to adopt functional solutions. Thats where asynchronous operations come in.
Javascript applications that run in the browser or in node have asynchronous events occurring all the time. This is especially true in node where most actions return results through asynchronous callbacks rather than direct return values. This takes some time to get used to.
Consider the following recursive function:
var list = getList();
var nextListItem = function() {
var item = list.pop();
if (item) {
// process the item...
nextListItem();
}
};
nextListItem();
The recursive list item processor will work fine if the list is a reasonable size. But, if the list is huge, then one has to worry about the size of call stack. With every iteration it grows by one call, so it may exceed memory limits and fail (in a very bad way) if there are too many iterations. Now consider this small change: var list = getList();
var nextListItem = function() {
var item = list.pop();
if (item) {
setTimeout(function() {
// process the item...
nextListItem();
}, 0);
}
};
nextListItem();
The stack over-flow problem is now eliminated. Why? Because javascript's event system handles the recursion–not the call stack. When nextListItem runs, if 'item' is true (not null) then the timeout function is defined and pushed to the event queue, then the function exits–and the call stack is now clear. When the event queue runs it's timed' out event, the item is processed and nextListItem is recursively called. Again, the method is processed from start to finish without a direct recursive call, so the call-stack is again clear–regardless of the number of iterations.
Now consider this example:
var userList,
cleverProgrammerBonus = 10000;
var userUpdateCallback = function(err) {
if (err) return updateCompleteCallback( err );
nextUser();
};
var nextUser = function() {
var user = userList.pop();
if (user) {
user.pay += cleverProgrammerBonus;
dao.updateUser( user, userUpdateCallback );
} else {
updateCompleteCallback();
}
};
var userFetchCallback = function(err, list) {
if (err) return updateCompleteCallback( err );
userList = list;
nextUser();
};
dao.fetchUsers( userFetchCallback );
As with most functional, asynchronous solutions, it's best to start at the bottom–the dao fetch of users. The fetch callback sets the user list then invokes the recursive nextUser() to get the iteration started. Then the user is updated asynchronously, and when it completes updateUpdateCallback is invoked. This callback continues the recursion by invoking nextUser. This is repeated until the list is empty. There isn't a need for setInterval ( or nextTick() ) because the dao calls to update the user are asynchronous–always invoked from the event queue, not the call stack. So the call stack remains static no matter how many users are in the list.
Its also important to realize that the function dao.updateUser doesn't really start working until nextUser has exited. It's queued to do some work, but not at the direction of the call stack–just the event queue.
Standards are influenced by JavaScript Patterns, written by Stoyan Stefanov and other published coding standards. All source code should be checked with jshint. The code must comply or the tests will fail.
Use mixed case nouns when naming classes, objects, and variables. Classes begin with uppercase, objects and variables use lower case. Constants use all uppercase and underscores. Use verbs to name message receptors, functions, etc. Accessors that provide method based access to private variables should use get or set with the exception of booleans that may us is or has.
Methods that return boolean values should be named using "is" or "has" or "was", i.e., isValid(), wasReceived(), hasMember(). It is important that these methods return only true or false. A common mistake is to let a boolean method return null or undefined to represent false, but this leads to difficult to find bugs.
Braces should be used in all loops and conditional statements. Always place the curly brace on the same line as the statement, never on a line by itself. Curly brace should be proceeded by a single space. Here are a few examples:
// private method
var calculateTotal = function(option) {
if (option) {
// do something
} else {
// do something else
}
while (isRunning()) {
log.debug('running...');
// do something else...
}
};
Javascript has no block scope, just function scope, so variables should only be declared inside functions. The lack of block scope also means that variables should be defined at the top of the function, rather than in line. The preferred style defines multiple variables with a single "var" statement, like this:
var MyClass = function(options) {
"use strict";
var myclass = this,
log = RemoteLogger.createLogger('MyClass'),
dispatcher = options.dispatcher;
// other public access methods
};
JSHint will fail if you don't use this form.
When constructing long strings, you should not use the + operator on multiple lines. It's much more efficient to create an array with a series of "push" calls or in-line [ 'this', 'that' ] then use join to create the string. Here is an example:
var myLongString = [
"the rain in spain",
"falls mainly on the ground.",
"the rain in Seattle falls",
"mainly on the trees."
].join(' ');
At a minimum, each class (psuedo-class) file should have a header that briefly describes the intention of the class. It should also include the date it was created, the author's name, and any dependencies.
Normally, blocks of code that are commented out is a bad practice--that's what source code control is for. But, if you do find the need to comment out a block of code, it's better to use the // rather than /* */ form. The reason is that some regular expressions can contain / and will mess up the compiler. The /* / should be used outside of functions with the exception of Class definitions. Inside functions it's better to use multiple single line comments using //.
The // form should always be followed by a single space, e.g. // this is a comment, not //this...
Version 00.90.01 | darryl.west


public interface SchemaChangeListener
Cluster.register(SchemaChangeListener)
method.
Note that the methods defined by this interface will be executed by internal driver threads, and are
therefore expected to have short execution times. If you need to perform long computations or blocking
calls in response to schema change events, it is strongly recommended to schedule them asynchronously
on a separate thread provided by our application code.| Modifier and Type | Method and Description |
|---|---|
void |
onAggregateAdded(AggregateMetadata aggregate)
Called when a user-defined aggregate has been added.
|
void |
onAggregateChanged(AggregateMetadata current,
AggregateMetadata previous)
Called when a user-defined aggregate has changed.
|
void |
onAggregateRemoved(AggregateMetadata aggregate)
Called when a user-defined aggregate has been removed.
|
void |
onFunctionAdded(FunctionMetadata function)
Called when a user-defined function has been added.
|
void |
onFunctionChanged(FunctionMetadata current,
FunctionMetadata previous)
Called when a user-defined function has changed.
|
void |
onFunctionRemoved(FunctionMetadata function)
Called when a user-defined function has been removed.
|
void |
onKeyspaceAdded(KeyspaceMetadata keyspace)
Called when a keyspace has been added.
|
void |
onKeyspaceChanged(KeyspaceMetadata current,
KeyspaceMetadata previous)
Called when a keyspace has changed.
|
void |
onKeyspaceRemoved(KeyspaceMetadata keyspace)
Called when a keyspace has been removed.
|
void |
onMaterializedViewAdded(MaterializedViewMetadata view)
Called when a materialized view has been added.
|
void |
onMaterializedViewChanged(MaterializedViewMetadata current,
MaterializedViewMetadata previous)
Called when a materialized view has changed.
|
void |
onMaterializedViewRemoved(MaterializedViewMetadata view)
Called when a materialized view has been removed.
|
void |
onRegister(Cluster cluster)
Gets invoked when the listener is registered with a cluster.
|
void |
onTableAdded(TableMetadata table)
Called when a table has been added.
|
void |
onTableChanged(TableMetadata current,
TableMetadata previous)
Called when a table has changed.
|
void |
onTableRemoved(TableMetadata table)
Called when a table has been removed.
|
void |
onUnregister(Cluster cluster)
Gets invoked when the listener is unregistered from a cluster, or at cluster shutdown if
the tracker was not unregistered.
|
void |
onUserTypeAdded(UserType type)
Called when a user-defined type has been added.
|
void |
onUserTypeChanged(UserType current,
UserType previous)
Called when a user-defined type has changed.
|
void |
onUserTypeRemoved(UserType type)
Called when a user-defined type has been removed.
|
void onKeyspaceAdded(KeyspaceMetadata keyspace)
keyspace
- the keyspace that has been added.void onKeyspaceRemoved(KeyspaceMetadata keyspace)
keyspace
- the keyspace that has been removed.void onKeyspaceChanged(KeyspaceMetadata current, KeyspaceMetadata previous)
current
- the keyspace that has changed, in its current form (after the change).previous
- the keyspace that has changed, in its previous form (before the change).void onTableAdded(TableMetadata table)
table
- the table that has been newly added.void onTableRemoved(TableMetadata table)
table
- the table that has been removed.void onTableChanged(TableMetadata current, TableMetadata previous)
current
- the table that has changed, in its current form (after the change).previous
- the table that has changed, in its previous form (before the change).void onUserTypeAdded(UserType type)
type
- the type that has been newly added.void onUserTypeRemoved(UserType type)
type
- the type that has been removed.void onUserTypeChanged(UserType current, UserType previous)
current
- the type that has changed, in its current form (after the change).previous
- the type that has changed, in its previous form (before the change).void onFunctionAdded(FunctionMetadata function)
function
- the function that has been newly added.void onFunctionRemoved(FunctionMetadata function)
function
- the function that has been removed.void onFunctionChanged(FunctionMetadata current, FunctionMetadata previous)
current
- the function that has changed, in its current form (after the change).previous
- the function that has changed, in its previous form (before the change).void onAggregateAdded(AggregateMetadata aggregate)
aggregate
- the aggregate that has been newly added.void onAggregateRemoved(AggregateMetadata aggregate)
aggregate
- the aggregate that has been removed.void onAggregateChanged(AggregateMetadata current, AggregateMetadata previous)
current
- the aggregate that has changed, in its current form (after the change).previous
- the aggregate that has changed, in its previous form (before the change).void onMaterializedViewAdded(MaterializedViewMetadata view)
view
- the materialized view that has been newly added.void onMaterializedViewRemoved(MaterializedViewMetadata view)
view
- the materialized view that has been removed.void onMaterializedViewChanged(MaterializedViewMetadata current, MaterializedViewMetadata previous)
current
- the materialized view that has changed, in its current form (after the change).previous
- the materialized view that has changed, in its previous form (before the change).void onRegister(Cluster cluster)
cluster
- the cluster that this tracker is registered with.void onUnregister(Cluster cluster)
cluster
- the cluster that this tracker was registered with.


Preparation time
over 2 hours
Cooking time
30 mins to 1 hour
Serves
Serves 4
Dietary
James Martin combines sugar, spice and all things nice in this tropical take on a Christmas dessert.
Equipment and preparation: for this recipe you will need an ice cream maker.
For the Christmas pudding ice cream, whisk the egg yolks with 60g/2¼oz caster sugar until thick and creamy.
Place the remaining caster sugar, milk, cream and vanilla seeds and pods in a pan and bring to the boil. Pour the hot milk into the whisked yolks and stir well.
Return the mixture to the pan and cook over a very low heat, stirring constantly with a spatula, until the mixture is thick enough to coat the back of a spoon.
Cool the vanilla mixture, then refrigerate for at least one hour. Strain the mixture into an ice cream maker and churn according to manufacturer's instructions. Just as the ice cream is soft enough to mix, stir in the Christmas pudding and freeze.
For the spiced caramel, place the sugar, star anise, cinnamon and nutmeg into a frying pan and cook, without stirring, until the sugar is melted and just golden-brown.
Whisk in the butter and double cream and bring to a simmer. Cook for 3-5 minutes, or until just thickened then pass through a fine sieve into a clean pan.
For the sautéd pineapple, heat a large frying pan and add the butter. Once hot and melted, add the pineapple and cook for a couple of minutes on each side.
To serve, place the cooked pineapple on serving plates with a spoonful of ice cream. Drizzle the caramel sauce over.


Public Library App
Today is:
This app supports the following operations:
List all books
Add a new book
Update a book
Delete a book
Clear Database
Create test Data


Syrian Army Recaptures 4 Villages in Idlib Province From Militants - Reports
DAMASCUS (Sputnik) - The Syrian army recaptured four villages in the northern province of Idlib from militants over the past four days, Syrian state television reported on Monday.
The Syrian army regained control of the village of Umm Halahil in the southeast of the Idlib province, causing substantial damage to the terrorist group, and also recovered the villages of Dahra-Zarzur and Sir, the broadcaster reported.
Over the past day, the military has also recaptured the village of Al Musharrafah in the province's southeast and taken control of the agricultural areas adjacent to it, the broadcaster said.
As a result of an operation carried out in August, the Syrian military has managed to liberate significant territories in the north of the Hama province and the south of the Idlib province, which were held by terrorists for several years. Major turning points in the conflict were the liberation of the strategic city of Khan Sheikhoun and gaining access to the international Damascus-Aleppo M5 highway.


The simplest form of history request is for a known set of Symbols. This is common for fixed universes of securities, or when you'd like to prepare new securities added to your algorithm. History requests return slightly different data depending on the overload you reach.
History data is returned in an ascending order from oldest to newest. This is required for piping the data into indicators to perform warm-up.
History requests for a known set of Symbols return a Data Frame. Each row of the Data Frame represents the prices at a point of time. Each column of the Data Frame is a property of that price data (e.g. open, high, low, close).
History API calls follow the following pattern: self.History(symbol, bar_count, resolution = null)
# EXAMPLE 1: Requesting By Bar Count: 5 IBM TradeBars, defaulting to security resolution: self.AddEquity("IBM", Resolution.Daily) self.df = self.History(self.Symbol("IBM"), 5)
# EXAMPLE 2: Requesting By Bar Count: 5 IBM Minute TradeBars: self.df = self.History(self.Symbol("IBM"), 5, Resolution.Minute)
# EXAMPLE 3: Requesting By Period: 1 Week IBM TradeBars, defaulting to security resolution: self.df = self.History(self.Symbol("IBM"), timedelta(7)) # Imporant Note: April 19th is Easter Friday, which has a bar EndTime = 20th, is not present.
# EXAMPLE 4: Requesting By Period: 5 Minutes IBM TradeBars: self.df = self.History(self.Symbol("IBM"), timedelta(5), Resolution.Minute) # Important Note: Period history requests are relative to "now" algorithm time. The example above would return 5 minute bars if requested *at* market close. If you wait for 16.05 it will return nothing.
To request history for multiple symbols at a time, you need to pass an array of Symbol objects to the same API methods as above.
Multi-Symbol History API calls follow the following pattern: self.History( symbols[], bar_count, resolution = null )
# EXAMPLE 5: Multi-Symbol History Request. self.df = self.History([self.Symbol("IBM"), self.Symbol("AAPL")], 2)
When requesting a single Symbol, LEAN can infer the type of the returning data is fixed and directly returns an array of bars. This is convenient for quickly warming up an indicator.
// Single Symbol History Method Arguments: var bars = History<Type>(Symbol symbol, int barCount, Resolution resolution = null); var bars = History<Type>(Symbol symbol, TimeSpan period, Resolution = null);
// EXAMPLE 1: 100 Bars of Single Symbol, Specifying Type, Default to Security Resolution: var ibm = AddEquity("IBM", Resolution.Minute).Symbol; var bars = History<TradeBar>(ibm, 100); // Same request but for QuoteBars var eurusd = AddForex("EURUSD", Resolution.Minute).Symbol; var quoteBars = History<QuoteBar>(eurusd, 100);
// EXAMPLE 2: Six Hours of Bars of Single Symbol, Setting Resolution: var ibm = AddEquity("IBM", Resolution.Minute).Symbol; var bars = History<TradeBar>(ibm, TimeSpan.FromHours(6), Resolution.Minute); // Same request but for QuoteBars var eurusd = AddForex("EURUSD", Resolution.Minute).Symbol; var quoteBars = History<QuoteBar>(eurusd, TimeSpan.FromHours(6), Resolution.Minute);
History requests with an array of Symbols objects return an array of slices. This provides a container that supports all data types. For example, a history request for FX-QuoteBars and Equity-TradeBars has the FX data located under slices.QuoteBars
, and the Equity data located under slices.Bars
.
// Multi-Symbol History Method Arguments: var slices = History(symbols[], int barCount, Resolution resolution = null); var slices = History(Symbol[] symbols, TimeSpan period, Resolution = null);
// EXAMPLE 1: Symbol array, 5 Bars, Default to Security Resolution: var ibm = AddEquity("IBM", Resolution.Minute).Symbol; var aapl = AddEquity("AAPL", Resolution.Minute).Symbol; var bars = History(new[] { ibm, aapl }, 5);
// EXAMPLE 2: Symbol array, 6 Hours, Specifying Resolution: var ibm = AddEquity("IBM", Resolution.Minute).Symbol; var aapl = AddEquity("AAPL", Resolution.Minute).Symbol; var bars = History(new[] { ibm, aapl }, TimeSpan.FromHours(6), Resolution.Minute);
Resolution.Minute
is selected.
TradeBar
is assumed for Equity, Futures, Crypto, and Options securities. Assets with QuoteBar data must explicitly specify Quotes to receive their history (Forex, Futures, Options, and Crypto).