Digged into the source code to find out how to list all the documents mapped in a document manager.
1 2 3 4 | |
Digged into the source code to find out how to list all the documents mapped in a document manager.
1 2 3 4 | |
In order to add extra variable in a Symfony 2 form type(in this example, the legend) in FormView, you have to implement this in your form type class.
1 2 3 4 5 6 7 8 9 10 11 12 | |
In this example, we want to get only “Campus 1″ as a string returned.
1 2 3 4 5 6 7 8 9 10 11 12 | |
In a normal jQuery function, if you want to get content of a node. You would come up with something like this
1
| |
However, this is a bad idea. All of the text including the node and spacing will be preserved in the result. It is not what we want. Instead of using .text() function, using a method like this would be helpful
1
| |
(“ele” should be a javascript element, not jQuery object.)
This will trim all the whitespace, and return only the value we wanted.
As I’m working on my JamTube web (it is online now!), I have to seek a way to easily update my code to production environment.
I have chosen Capifony which as far as I know the most complete solution so far.
However, getting it setup with MAMP on a Lion server is not easy. After many tries and putting things together, finally I have came up the deploy file that should work all the way in.
I hope this could save you or others lots of time on deployment.
I have recently discovered a ways to speed up my composer cloning process
1 2 3 4 5 6 | |
This would change protocol use to clone from git (by default) to https which is much faster.
Since Doctrine didn’t provide any convenience methods which can remove an embedded document straight away. Here is the method that I have used.
1 2 3 4 5 6 7 8 9 10 11 | |
Trying out a blogging system for hacker ;)