„Snappy is a PHP5 library allowing thumbnail, snapshot or PDF generation from a url or a html page. It uses the excellent webkit-based wkhtmltopdf and wkhtmltoimage available on OSX, Linux, Windows.“
Cocycles is a online code search engine for open source code. Source code is being organized by code pieces and what those pieces can actually do.
Unlike other i18n/l10n libraries, webL10n supports:
l10n-*
attributes are automatically translated when the document is loaded;%s
tokens;TWIG is always part of my development process, allowing me to easily update handling and apply changes for my customers.
Nice to see Timber (TWIG integration for WordPress) reach version 1.0.
Wolfram Alpha‘s computational knowledge engine or answer engine developed by Wolfram Research, which can be consumed as a service as well. Users submit queries and computation requests. Wolfram Alpha then computes answers and relevant visualizations from a knowledge base of curated, structured data that come from other sites and books. 2000 non-commercial API calls per month are free.
They provide a nice set of API Language Libraries to get you started.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
<?php $appID = 'PLACE_YOUR_APP_ID_HERE'; if (!$queryIsSet) die(); $qArgs = array(); if (isset($_REQUEST['assumption'])) $qArgs['assumption'] = $_REQUEST['assumption']; // instantiate an engine object with your app id $engine = new WolframAlphaEngine( $appID ); // we will construct a basic query to the api with the input 'pi' // only the bare minimum will be used $response = $engine->getResults( $_REQUEST['q'], $qArgs); // getResults will send back a WAResponse object // this object has a parsed version of the wolfram alpha response // as well as the raw xml ($response->rawXML) // we can check if there was an error from the response object if ( $response->isError() ) { ?> <h1>There was an error in the request</h1> </body> </html> <?php die(); } ?> |
SPLIT PANES / DOCKER allow you to display multiple areas, either side by side or one on top of each other. Nested layouts are often part of it. By dragging a divider that appears between the areas, the user can specify how much of the total width / height goes to each area.
I have been building a backend interface in the past weeks, that forced me to look into ways to organize the workspace more efficiently . I could code my own splitter, but is not a priority right now and makes no sense to always reinvent the wheel :)
Here some of the options out there…
This uses the jQuery UI draggable component and provides limited options :)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
$('.splitter').draggable({ axis: 'x', containment: '#content', distance: 0, drag: function(event, ui) { var width = $('#content').width(); $('#content .leftpane').css({ width: ui.position.left + 'px' }); $('#content .rightpane').css({ left: ui.position.left + 1 + 'px', width: (width - ui.position.left + 1) + 'px' }); }, refreshPositions: true, scroll: false }); |
Zombie.js is a lightweight framework for testing client-side JavaScript code in a simulated environment. No browser required.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
const Browser = require('zombie'); // We're going to make requests to http://example.com/signup // Which will be routed to our test server localhost:3000 Browser.localhost('example.com', 3000); describe('User visits signup page', function() { const browser = new Browser(); before(function(done) { browser.visit('/signup', done); }); describe('submits form', function() { before(function(done) { browser .fill('email', 'zombie@underworld.dead') .fill('password', 'eat-the-living') .pressButton('Sign Me Up!', done); }); it('should be successful', function() { browser.assert.success(); }); it('should see welcome page', function() { browser.assert.text('title', 'Welcome To Brains Depot'); }); }); }); |