I made myself a class make some basic operations, like adding and subtracting days, months or years from a date, and return in mysql-ready format or timestamp. A class made for PHP CodeIgniter Framework.
{ 4 comments }
I made myself a class make some basic operations, like adding and subtracting days, months or years from a date, and return in mysql-ready format or timestamp. A class made for PHP CodeIgniter Framework.
{ 4 comments }
There are many ways to manage big XML files in php. When I say large, is really large, 10, 20, 30 mebabytes. If we were open a file like this on a common server, we certainly will have a time-out error. This is because we usually use SimpleXML functions. This extensions is, in fact, a “Tree-based parser”, just like “DOM Parser”. They work great in small-medium XML files (~1MB). They put the whole content on memory, and then, parse it. But when we face a big content, the only option is the “Stream-based parsers”. These are more efficiently and faster, because it read the file on demand, and don`t crush your server`s memory.
{ 7 comments }
Existem vários métodos para manipular arquivos XML grandes. Quando digo grandes, são realmente grandes, 10, 20, 30 mega. Se fossemos abrir um arquivo desses em um servidor comum, certamente a operação ia terminar com um “time-out”. Isso porque geralmente usamos as funcoes da extensão SimpleXML. Esta extensão tem um “Tree-based parser”, assim como o “DOM [...]
{ 4 comments }
Hoje eu vou dar alguams dicas que eu uso em todo projeto envolvendo CI. Primeiro, no “url_helper“, eu fiz a seguinte modificação na função base_url() …
{ 2 comments }
Hello, Today I’ll post few modifications I use on every CI project. First, on the “url_helper“, I made this modification oon base_url() function …
{ 1 comment }
After a long pause, here am I. Well, there’s a few tutorials around, including the official CI wiki suggesting a more friendly pagination implementation, with page numbers on the link, because the actual CI pagination works with the offset from the database. The code I use today is from the official wiki, but the search [...]
{ 5 comments }
Depois de longa pausa, cá estou. Bom, existem alguns tutoriais e artigos por aí, inclusive no wiki do CodeIgniter explicando como usar uma paginação mais coerente. Digo isso pois a paginação atual do CI trabalha com o offset do SQL, e não com o número da página em si. O código que uso hoje foi [...]
{ 1 comment }
The guys from Pico and Sofa made a visual Subversion Client for Mac OS X (10.4.9 or higher). “Whether you’re a designer, developer, editor or project manager, chances are you already have plenty on your mind. Versions saves you the hassle and makes working with Subversion easy for your entire team. Thanks to Versions’ clear-cut [...]
{ 2 comments }
Encontrei uma maneira rápida e fácil de usar várias línguas com templates. Acho que não é um sistema de templates de verdade, mas por enquanto, está dando conta do recado. Depois da configuração inicial do meu CodeIgniter, decidi implementar um sistema de várias linguas. Seguindo esse tutorial, notei que cada página (view) traduzida é na [...]
{ 6 comments }