rom

SGBG seeks steps to stop corona spread from red zones

SGBG seeks steps to stop corona spread from red zones




rom

Contrast agents III [electronic resource] : radiopharmaceuticals from diagnostics to therapeutics / volume editor, Werner Krause ; with contributions by R. Alberto [and others]

Berlin ; New York : Springer-Verlag, [2005]




rom

'How Can I Keep from Singing?'




rom

Navy ship with 698 evacuees departs from Male for Kochi

Indian envoy lauds Maldives govt. for its ‘wonderful support and helping hand’ in evacuation




rom

Jewellers witness encouraging response from customers on their digital platforms for Akshaya Tritiya

Mr. Ajoy Chawla, CEO, Jewellery Division at Titan Company Limited said, "All 328 Tanishq stores remain shut this year and hence it would be unfair to compare numbers with last year. But the overall customer response to tanishq.co.in from key metros and even with tier-2 and tier-3 towns has been extremely encouraging.




rom

New insights on antiviral probiotics: from research to applications / Imad Al Kassaa

Online Resource




rom

Comprehensive Accounts of Pharmaceutical Research and Development: From Discovery to Late-Stage Process Development. / Ahmed F. Abdel-Magid, editor, Jaan A. Pesti, editor, Rajappa Vaidyanathan, editor ; sponsored by the ACS Division of Organic Chemistry

Online Resource




rom

Comprehensive accounts of pharmaceutical research and development: from discovery to late-stage process development / Ahmed F. Abdel-Magid, editor, Jaan A. Pesti, editor, Rajappa Vaidyanathan, editor ; sponsored by the ACS Division of Organic Chemistry

Online Resource




rom

Anti-aging drugs: from basic research to clinical practice / edited by Alexander M. Vaiserman

Online Resource




rom

Novel Psychoactive Substances: Policy, Economics and Drug Regulation / Ornella Corazza, Andres Roman-Urrestarazu, editors

Online Resource




rom

Chromatographic fingerprint analysis of herbal medicines.: thin-layer and high performance liquid chromatography of Chinese drugs / Hildebert Wagner, Stefanie Püls, Talee Barghouti, Anton Staudinger, Dieter Melchart, editors

Online Resource




rom

Polymeric gene delivery systems Yiyun Cheng, editor ; with contributions from Narsireddy Amreddy [and more]

Online Resource




rom

The peyote effect: from the Inquisition to the War on Drugs / Alexander S. Dawson

Hayden Library - RS165.P44 D39 2018




rom

Pharmacological properties of native plants from Argentina / María Alejandra Alvarez

Online Resource




rom

Kava: from ethnology to pharmacology / edited by Yadhu N. Singh

Online Resource




rom

Nanomedicine for the treatment of disease: from concept to application / editors, Sarwar Beg, Mahfoozur Rahman, Md. Abul Barkat, Farhan J. Ahmad

Online Resource




rom

Fat Bats Withstand Effects of White-nose Syndrome

 BCI announced today that two of its esteemed scientists, Tina Cheng and Winifred Frick, published a paper in the Journal of Animal Ecology 




rom

Fungus that causes bat-killing disease White-nose Syndrome is expanding in Texas

BCI announced today that early signs of the fungus Pseudogymnoascus destructans (Pd) have been detected at one of the world’s premier bat conservation sites, Bracken Cave Preserve




rom

The line between Events and Promises

In this post I will talk about Events and Promise limits, trying to fill all gaps with a 498 bytes sized library called notify-js.




rom

On Cancelable Promises

Update
The awesome Lie function got improved and became an official module (yet 30 lines of code thought). Its name is Dodgy, and it's tested and even more awesome!


Ifeverydevelopertalksaboutsimilarissues with Promises, maybe we should just drop our "religion" for an instant and meditate about it ...

Not today though, today is just fine

We've been demanding from JS and Web standards to give us lower level APIs and "cut the crap", but we can do even more than that: simply solve our own problems whenever we need, and "cut our own crap" by ourselves and for our own profit, instead of keep moaning without an outcome.
Today, after reading yet another rant about what's missing in current Promise specification, I've decided to write a very simple gist:


After so many discussions and bikeshead about this topic, I believe above gist simply packs in its simplicity all good and eventually bad intents from any voice of the chorus I've heard so far:
  1. if we are in charge of creating the Promise, we are the only one that could possibly make it abortable and only if we want to, it's an opt in rather than a default or a "boring to write" subclass
  2. it's widely agreed that cancellation should be rather synonymous of a rejection, there's no forever pending issue there, just a plain simple rejection
  3. one of the Promise strength is its private scope callback, which is inevitably the only place where defining abortability would make sense. Take a request, a timer, an event handler defined inside that callback, where else would you provide the ability to explicitly abort and cleanup the behavior if not there?
  4. being the callback the best pace to resolve, reject, and optionally to abort, that's also the very same place we want to be sure that if there was a reason to abort we can pass it along the rejection, so that we could simply ignore it in our optionally abort aware Promises, and yet drop out from any other in the chain whenever the rejection occurs or it's simply ignored
  5. the moment we make the promise malleable from the outer world through a p.abort() ability, is also the very same moment we could just decide to resolve, or fully fail the promise via p.resolve(value) or p.reject(error)
As example, and shown in the gist itself, this is how we could opt in:

var p = new Lie(function (resolve, reject, onAbort) {
var timeout = setTimeout(resolve, 1000, 'OK');
// invoking onAbort will explicit our intent to opt-in
onAbort(function () {
clearTimeout(timeout);
return 'aborted'; // will be used as rejected error
// it could even be undefined
// so it's easier to distinguish
// between real errors and aborts
});
});
After that, we can p.abort() or try other resolve or reject options with that p instance and track it's faith:

p.then(
console.log.bind(console),
console.warn.bind(console)
).catch(
console.error.bind(console)
);
Cool, uh? We have full control as developers who created that promise, and we can rule it as much as we like when it's needed ... evil-laugh-meme-here

Cooperative code

In case you are wondering what's the main reason I've called it Lie in the first place, it's not because a rejected Promise can be considered a lie, simply because its behavior is not actually the one defined by default per each Promise.
Fair enough for the name I hope, the problem might appear when we'd like to ensure our special abortable, resolvable, rejectable own Promise, shouldn't be passed around as such. Here the infinite amount of logic needed in order to solve this problem once for all:

var toTheOuterWorld = p.then(
function (data) {return data},
function (error) {return error}
);
// or even ...
var toTheOuterWorld = Promise.resolve(p);
That's absolutely it, really! The moment we'd like to pass our special Promise around and we don't want any other code to be able to mess with our abortability, we can simply pass a chained Promise, 'cause that's what every Promise is about: how cool is that?

// abortable promise
var cancelable = new Lie(function (r, e, a) {
var t = setTimeout(r, 5000, 'all good');
a(function () { clearTimeout(t); });
});

// testing purpose, will it resolve or not?
setTimeout(cancelable.reject, 1000, 'nope');
// and what if we abort before?
setTimeout(cancelable.abort, 750);



// generic promise, let's log what happens
var derived = cancelable.then(
function (result) { console.log('resolved', result); },
function (error) { error ?
console.warn('rejected', error) :
console.log('ignoring the .abort() call');
}
).catch(
function (error) { console.error('cought', error); }
);

// being just a Promise, no method will be exposed
console.log(
derived.resolve,
derived.reject,
derived.abort
);

Moaaar lies

If your hands are so dirty that you're trying to solve abort-ability down the chain, don't worry, I've got you covered!

Lie.more = function more(lie) {
function wrap(previous) {
return function () {
var l = previous.apply(lie, arguments);
l.resolve = lie.resolve; // optional bonus
l.reject = lie.reject; // optional bonus
l.abort = lie.abort;
return Lie.more(l);
};
}
if (lie.abort) {
lie.then = wrap(lie.then);
lie.catch = wrap(lie.catch);
}
return lie;
};
We can now chain any lie we want and abort them at any point in time, how cool is that?

var chainedLie = new Lie(function (res, rej, onAbort) {
var t = setTimeout(res, 1000, 'OK');
onAbort(function (why) {
clearTimeout(t);
return why;
});
})
.then(
console.log.bind(console),
console.warn.bind(console)
)
.catch(
console.error.bind(console)
);

// check this out
chainedLie.abort('because');
Good, if you need anything else you know where to find me ;-)
How to opt out from lies again?

var justPromise = Promise.resolve(chainedLie);
OK then, we've really solved our day, isn't it?!

As Summary

Promises are by definition the returned or failed value from the future, and there's no room for any abort or manually resolved or rejected operation in there.
... and suddenly we remind ourselves we use software to solve our problems, not to create more, so if we can actually move on with this issue that doesn't really block anyone from creating the very same simple logic I've put in place in about 20 well indented standard lines, plus extra optional 16 for the chainable thingy ... so what are we complaining about or why do even call ourselves developers if we get stuck for such little effort?
Let's fell and be free and pick wisely our own footgun once we've understood how bad it could be, and let's try to never let some standard block our daily job: we are all hackers, after all, aren't we?




rom

Geographical information systems theory, applications and management: second International Conference, GISTAM 2016, Rome, Italy, April 26-27, 2016, Revised selected papers / Cédric Grueau, Robert Laurini, Jorge Gustavo Rocha (eds.)

Online Resource




rom

Ecotourism's promise and peril: a biological evaluation / Daniel T. Blumstein, Benjamin Geffroy, Diogo S. M. Samia, Eduardo Bessa, editors

Online Resource




rom

Endeavouring Banks: exploring collections from the Endeavour voyage, 1768-1771 / Neil Chambers, with contributions by Anna Agnarsdottir, Sir David Attenborough, Jeremy Coote, Philip J. Hatfield and John Gascoigne

Hayden Library - G420.B18 C43 2016




rom

Tourism, Territory and Sustainable Development: Theoretical Foundations and Empirical Applications in Japan and Europe / João Romão

Online Resource




rom

Imagery and GIS: best practices for extracting information from imagery / Kass Green, Russell G. Congalton, Mark Tukman

Rotch Library - G70.4.G743 2017




rom

Perspectives on rural tourism geographies: case studies from developed nations on the exotic, the fringe and the boring bits in between / editors, Rhonda L. Koster and Doris A. Carson

Online Resource




rom

Switching to ArcGIS Pro from ArcMap / Maribeth H. Price

Rotch Library - G70.212.P745 2019




rom

Numerical bifurcation analysis of maps: from theory to software / Yuri A. Kuznetsov, Hil G.E. Meijer

Hayden Library - GA108.7.K89 2019




rom

Why North is up: map conventions and where they came from / Mick Ashworth

Rotch Library - GA203.A84 2019




rom

Theatre of the world: the maps that made history / Thomas Reinertsen Berg ; translated from the Norwegian by Alison McCullough

Rotch Library - GA105.3.R4513 2018




rom

Atlas: a world of maps from the British Library / Tom Harper

Hayden Library - GA195.L66 B75 2018




rom

Tourism development in post-Soviet nations: from Communism to Capitalism / Susan L. Slocum, Valeria Klitsounova, editors

Online Resource




rom

Innovation in Service Industries: An Investigation of the Internal and External Organizational Contexts from the Laboratory of Real Estate.

Online Resource




rom

Industry 4.0 from the MIS perspective / Sevinc Gülsecen, Zerrin Ayvaz Reis, Murat Gezer (eds.)

Dewey Library - HD45.I5328 2019




rom

From industrial organization to entrepreneurship: a tribute to David B. Audretsch / edited by Erik E. Lehmann, Max Keilbach

Online Resource




rom

Managing transformation projects: tracing lessons from the Industrial to the Digital Revolution / Mark Kozak-Holland, Chris Procter

Online Resource




rom

Incubators in Developing Countries and their Benefit from Regional Resources: A Case Study in Namibia / by Roman Liedtke

Online Resource




rom

Developing global leaders: insights from African case studies / Eva Jordans, Bettina Ng'weno, Helen Spencer-Oatey

Online Resource




rom

Knowledge risk management: from theory to praxis / Susanne Durst, Thomas Henschel, editors

Online Resource




rom

Business ethics from antiquity to the 19th century: an economist's view / David George Surdam

Online Resource




rom

Business ethics from the 19th century to today: an economist's view / David George Surdam

Online Resource




rom

The Hollywood war film : critical observations from World War I to Iraq / Daniel Binns

Binns, Daniel, author




rom

Timothy Gedge [manuscript] / adapted by Ken Methold ; from the novel, The Children of Dynmouth, by William Trevor

Methold, Ken, 1931-




rom

What philosophy wants from images / D.N. Rodowick

Rodowick, David Norman, author




rom

Outnumbered : from Facebook and Google to fake news and filter-bubbles -- the algorithms that control our lives / David Sumpter

Sumpter, David J. T., 1973- author




rom

Shakespeare and Indian cinemas : 'local habitations' / edited by Poonam Trivedi and Paromita Chakravarti




rom

Color: a visual history from Newton to modern color matching guides / Alexandra Loske

Hayden Library - QC494.7.L67 2019




rom

Singular electromagnetic fields and sources / J. van Bladel

Online Resource




rom

Resonant tunneling diode photonics: devices and applications / Charlie Ironside, Bruno Romeira, José Figueiredo

Online Resource




rom

Submarine landslides: subaqueous mass transport deposits from outcrops to seismic profiles / Kei Ogata, Andrea Festa, Gian Andrea Pini, editors

Online Resource