Latest Posts

Mikhail Bulgakov, Morphine (1926)

Mikhail Bulgakov, Morphine (1926), 55p

Bulgakov’s Morphine is a simple short story that uses his experience as a doctor and morphine addict in simple diary form. The most beautiful aspect of Morphine is the evidence of what a great short story requires, a genuine heartfelt compassion, the experience of real life, maybe the auto-biographical element sets the quality of any short story apart from a fantasy story. I’m a big fan of fictionalized auto-biographical material, Morphine proves why. The story reads easily in a day, without losing attention, as if it was written in equal amount of time.

Elena Ferrante, The Days of Abandonment (2002)

Elena Ferrante, The Days of Abandonment (2002), 188p

With the popularization of the literary markets, apparently an inevitable consequence of following a purist American theology of Capitalism, eliminating all public investments to balance the public good out of the equation of interest, it can be difficult to find elevating literary writers these days. I have almost completely stopped sifting through the may top ten lists, awards and nominations like the homeopathic New York Times best seller list, such a Mayan veil and scam of literature was never invented before, or the New Yorker with its blase short stories that fail to shock any man with a real taste for life. How can one take the American literary landscape every serious again, it’s worth a novel full of labyrinths.

But Elena Ferrante, if for a moment we consider this her real name, has the true spirit of an author, she feels enough has been done to a book once it has been written, once she has poured her confessions to paper and added an artificial construct to make it credible. Once in print, only the reader can add meaning to a story. I believe strongly that only out of such absence of vanity, out of such love for the imagination that reality is shunned, and certainly the false desire to be in the public spotlight, can bring forth any literature close to being worth reading.

One can place some remarks to the almost fantastical scene of the protagonist taking the ‘key’ into her mouth in order to ‘unlock’ the ‘door’. This is almost a childish mistake of heavy symbolism in a too easily recognizable form, but apart from this scene that sadly lasts for pages, the book remains true to credible fiction, and though she perhaps could dig deeper into her self and add more revealing reflections of her human soul, the book carries a reflective burden with it. Another point of criticism is that women tend to identify with being victimized too easily, and this book is no relief from it, not a very emancipated protagonist perhaps. It’s not how Marguerite Duras would have witnessed the story.

But nevertheless, Ferrante delivers a true novel of the human soul, and The Days of Abandonment is a mirror to many.

The New Yorker, Women on the Verge, The fiction of Elena Ferrante, by James Wood (21 January 2013)

Keith Devlin, The Man of Numbers (2011)

themanofnumbers_keithdevlin_2011 Keith Devlin, The Man of Numbers (2011) is a largely historical biography about Leonardo Bigollo (~1170 – ~1250 CE), better known in his own time as Leonardo Pisano or in our time as Leonardo Fibonacci.

Fibonacci is best known for the sequence of Fibonacci numbers (1,2,3,5,8,13,21… etc), whose limit of ratios we know as the Divino Proportion coined by Luca Pacioli (1445-1517), the Golden Ratio coined by Martin Ohm (1792-1811), or as it is called in Euclid’s Elements, the extreme and mean ratio. Fibonacci numbers are only one of several mathematical puzzles posed in his Liber Abaci (1202), the Book of Calculation, a teaching book for mercantile administration, in which Leonardo describes the basics of the Hindu-Arab counting system, at the time largely unknown in Europe, where the Roman and medieval systems were still dominant. Devlin argues that the Liber Abaci caused a mathematical revolution that facilitated the mercantile boom of the Renaissance.

The book by Devlin is a little light on facts and mathematics, though none are absent, maybe because there are only few historic facts known about Leonardo, and because most of the math in our time sounds like very basic modern mathematics described in very cryptically described textual puzzles. If you really want to know everything about Fibonacci’s influence, you should read the translation of the Liber Abacci. If you really want to know everything about the mercantile revolution, you should read perhaps about Cosimo de’ Medici (1389-1464), or about the scientific revolution, you should read perhaps about Galileo Galilei (1564-1642).

 

Send a multipart/form-data request in PHP

GET

To List your current indexes with ‘standard’ flavor use a GET request to the List Indexes API.


$url_listindexes = 'https://api.idolondemand.com/1/api/sync/listindexes/v1';
$params1 = 'flavor=standard&apikey='.$apikey;
$response = file_get_contents($url_listindexes .'?'.$params1);
if($response) { $json = json_decode($response); if($json){ $indexes = $json->index; } return $indexes; }

POST

POST multipart/form-data with native PHP


function send_multipart_post_message($sync_or_async, $json1){
$url = "https://api.idolondemand.com/1/api/".$sync_or_async."/addtotextindex/v1";
// using WordPress custom functions to retrieve index and apikey
$index1 = wp_idolondemand_get_setting('index');
$apikey = wp_idolondemand_get_setting('apikey');
$eol = "\r\n";
$data = '';
$mime_boundary=md5(time());
//
$data .= '--' . $mime_boundary . $eol;
$data .= 'Content-Disposition: form-data; name="apikey"' . $eol . $eol;
$data .= $apikey . $eol;
$data .= '--' . $mime_boundary . $eol;
$data .= 'Content-Disposition: form-data; name="index"' . $eol . $eol;
$data .= $index1 . $eol;
$data .= '--' . $mime_boundary . $eol;
$data .= 'Content-Disposition: form-data; name="json"; filename="allposts.json"' . $eol;
$data .= 'Content-Type: application/json' . $eol;
$data .= 'Content-Transfer-Encoding: base64' . $eol . $eol;
$data .= base64_encode($json1) . $eol;
// alternatively use 8bit encoding
//$data .= 'Content-Transfer-Encoding: 8bit' . $eol . $eol;
//$data .= $json1 . $eol;
$data .= "--" . $mime_boundary . "--" . $eol . $eol;
$params = array('http' => array(
'method' => 'POST',
'header' => 'Content-Type: multipart/form-data; boundary=' . $mime_boundary,
'content' => $data
//'proxy' => 'tcp://localhost:8888' //use with Charles to catch http traffic
));
$ctx = stream_context_create($params);
$response = file_get_contents($url, FILE_TEXT, $ctx);
return $response;
}

(more…)

Vignettes of Lost Men: Stephen Crane

Stephen Crane wrote ‘we are the most successful in art when we approach the nearest to nature and truth.’ He described the inconsistent vocation of the soul of man and the incapacity of man to uphold a straight moral line. His novel the Red Badge of Honor gave him considerable success, and is perhaps a great read to reflect on the choices of former POW Bowe Bergdahl. Now forgotten and sinking to the lesser bowels of history, another unconventional thinker and a flickering light of guidance, lost to our collective memory. We are all in an open boat, at risk to capsize as soon as we shift our positions, so we stay put and drift along.

New Yorker: The Hectic Career of Stephen Crane

[JavaScript] Find Related Concepts as D3js Bubble Chart

The Find Related Concepts API from IDOL OnDemand returns the most relevant terms and concepts from related documents. Here’s represented as a D3 Bubble Chart. Thanks to incredibly good work by Mike Bostock. For a description of the API go here https://www.idolondemand.com/developer/apis/findrelatedconcepts#overview
For D3 Data-Driven Documents go here: http://d3js.org

HTML5 and JavaScript: Flip an Image using HTML5 Canvas

See the working code example on jsfiddle.


<!DOCTYPE html>
<html>
<head>
<title>Flipping an Image Horizontally and Vertically</title>
<script src="jquery-1.11.1.min.js"></script>
<script type="text/javascript">
var imageurl = null;
//
$(document).ready( function() {
$('#loadimage').click(function() {
urlProvided();
});
$('#mirrorh').click(function() {
mirror(1,0);
});
$('#mirrorv').click(function() {
mirror(0,1);
});
});
//
function urlProvided() {
var userinput = document.getElementById('imageurl');
imageurl = userinput.value;
loadImage();
}
function loadImage(){
//
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
//
var img = new Image();
img.src = imageurl;
img.onload = function(){
ctx.drawImage(img,0,0);
};
//
var w = img.width;
var h = img.height;
canvas.width = w;
canvas.height = h;
}
//
function mirror(mirrorh,mirrorv){
//
var canvas=document.getElementById('canvas');
var ctx=canvas.getContext('2d');
//
var img = new Image();
img.src = imageurl;
//
ctx.clearRect(0,0,canvas.width,canvas.height);
ctx.save();
//
var w = img.width;
var h = img.height;
if(mirrorh){
ctx.scale(1, -1);
ctx.translate(0, -h);
}
if(mirrorv){
ctx.scale(-1, 1);
ctx.translate(-w,0);
}
ctx.drawImage(img,0,0,img.width,img.height,null,null,w,h);
ctx.save();
}
</script>
</head>
<body>
<div>
Your image URL: <input type="text" id="imageurl"></input><button id="loadimage">load image</button>
</div>
<div>
<button id="mirrorh">mirrorh</button>
<button id="mirrorv">mirrorv</button>
</div>
<div>
<canvas id="canvas"></canvas>
</div>
</body>
</html>

The Perception of Sea Time

she dances like bouncing particles
on top of the foaming waves
a venus rising out of passing water
from the splashed semen of Uranus

she moves like the soul a ship
a glazing stare of round fish eyes
hiding under the surface fleece
like the faring sea I see

then feel the sudden calm
before the rush of changing motion
a roaring gust of salty wind
that combs through her light blond hair

awning layers of hovering clouds
along the singing circles of air
casting a landscape of shadows
on the ocean’s running blues