サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
体力トレーニング
codeutopia.net
The other day I uploaded a new experimental project on GitHub – A Haskell PHP parser / evaluator. It doesn’t understand 100% of all PHP syntax, but it was an interesting experiment nevertheless. Here’s some insights and other thoughts from working on the code. Why?! Why not? I had wanted to experiment in writing a parser in Haskell for a while, and the thought of writing a small language of my own
Typically when working on code that has tests, you would want to make sure your tests pass when you share your code with other people. It’s generally a good idea to run the tests once in a while too, but why do it manually when you can automate? In this post I’ll show a simple shell script you can use to plug into git, and automatically run your testsuite and optionally reject a push with failing
Since PHP 5, there has been a bundle of built-in exceptions – the “SPL exceptions” – in PHP. However, the documentation for these classes is quite lacking in examples, and it can be difficult to understand when you should be using them. The short answer is always. You’ll find a longer answer if you continue reading :) There is also a french translation of this post, by Frédéric Blanc. What are the
I’ve been working on a Java app which needed Rhino for scripting. The app would need to run untrusted JavaScript code from 3rd parties, so I had to find a way to block access to all Java methods, except the ones I wanted. This would not be a problem if there was an easy way to disable LiveConnect – the feature of Rhino which provides java access to scripts – but there is no such thing. However, af
In this third post of the series, I’ll talk about using dynamic ACLs: How to store an ACL in a database, and construct it from there when needed. This post builds on the things introduced in part 1 and part 2. We will first look at a simple example with users and pages, and then we’ll have a more complex example, involving building a much more complex ACL with inheritance, role types and other stu
Some frameworks like Django and PRADO have the concept of view inheritance, or a “master page” like in ASP.NET. Essentially it’s a similar idea as Zend_Layout is in Zend Framework, but the difference is that you can define the master/parent view inside the view itself. For example, in Django {% extends "base.html" %} would make the current template extend “base.html”, and you then you can define b
Originally posted in my old blog at My Opera Coming on again with the Smarty and Zend View related articles, let's this time take a look at how to get Zend's View Helpers running with Smarty. Other examples for this that I have seen use a syntax like this: {helper helper=Url p='array(something)' p2=stuff}, which is kind of ugly and the array parsing is done with eval, and we know that Eval is Evil
このページを最初にブックマークしてみませんか?
『codeutopia.net』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く