The next version 0.8 (currently dev) helps with that.
The next snippet creates a CRS called Metric, while similar to the Simple CRS, this one has a scale of exactly 1 meter and is not bounded by degrees of latitude/longitude.
Additionally, the next snippet is a patch to the Scale Control, that goes away with the Earth CRC and uses our custom one to display a perfect meter scale (and imperial, bah).
Looking at the network panel today gave me a ponder, what is this gaping hole over here?
Since you already know my answer, here is a before/after with the “hole” in black.
How to debug this?
Another great tool from Chrome, Timeline, gives us more information. Get a light page, start the recording, reload then stop the recording. You should get something like this.
Under injected.js you can find what you need to cut, clicking on bigger blocks mostly gets you the name of the offending plugin.
I love Chrome plugins, I even made one out of frustration over Facebook’s interface one day. But many need to do their magic on each and every page load, even if you don’t need them to. While some plugins are just plain badly developed, using up this time to load in here when they really isn’t a good reason to (I could list a few but I’ll file bug reports before I publicly shame), are there some that you would accept a speed hit from?
Ad blockers for one; I get the occasional frantic call from people that had their PC infected, that can’t close a window no matter how many times they clicked close and that get stuck on a pay-wall for software that should be free. Not going away soon.
Just a small update for ScreenSave, port back to Joomla! 2.5
There are a lot of libraries out there that give you really advanced and configurable tooltips, but what to do when you just need a simple one that does not eat up bandwidth and doesn’t clog up your app?
Here’s my take on that:
My way of lazy-loading google maps and ubilabs jquery.geocomplete.js
Here is a quick conversion to SCSS for a plugin I’m using for AngularJS.
During my Udacity Class CS258 I was introduced to Coverage.py. You can read up on Code Coverage on Wikipedia but I would also recommend the free course on the subject via Udacity.
To get Coverage.py running on your installation, the easiest way is using the console command easy_install. If you are using PythonPortable, you need to navigate to App\Scripts before executing the following command:
Easy, wasn’t it?
PyScripter is a neat IDE packaged with PythonPortable. It has a feature called External Tools (found under the menu Tools->Tools). To make a neat shortcut you can “Configure Tools..” under the same menu.
Here are two shortcuts, one for running coverage on one file, the other for constructing the HTML:
Parameters=run $[ActiveDoc-Short] $[CmdLineArgs]
Just pasting this inside PyScripter.ini does require some additional fiddling, so I recommend just using the gui. The new commands will appear inside Tools->Tools. The generated HTML will be inside the scripts working directory.
Now go do some coverage testing!
Wise Timetable is a software for scheduling used by many universities and schools.
This gist https://gist.github.com/3937963 is a PHP script to parse the classes using the specified courses and convert them to a format most calendar software can read.
Thus one can grab the schedule with eq. Google Calendar or any other web/desktop/mobile app.
Making a script to check, update and add a set of records to MySQL can be quite daunting. And even when done, the script will be slow. Luckily, there is a way to do this with a simple and fast SQL command.
LOAD DATA LOCAL INFILE '/location/on/drive' -- the location of the CSV
REPLACE INTO TABLE mytable -- table to 'replace' in to
CHARACTER SET charset_name -- the character set the CSV is in
FIELDS TERMINATED BY ';' -- character between fields
OPTIONALLY ENCLOSED BY '"' -- character to enclose fields
ESCAPED BY '"' -- excape character
LINES TERMINATED BY '\n' -- end of line character
IGNORE 1 LINES; -- ignore n lines, useful if first line is a header
(id, name, location, @phonenumber) -- fields, use @ to name a field that does not corespond to a existing column
SET contact=CONCAT('Phone number: ',@phonenumber) -- maybe use the new name to set a column value
The keyword LOCAL is used to specify, that the given file is relative to the client, from which the script was run, otherwise, the path relative to the server would be used.
REPLACE replaces the lines, that have a matching unique field. IGNORE ignores them.