Quantcast
Channel: bitPrison.net - Web development
Browsing latest articles
Browse All 23 View Live

Easy colour syntax highlighting on webpage

Publish your source code on web with colour syntax highlighting.For example: How to send correct UTF-8 mail in PHP This article is contain a PHP code what is syntax highlighted and all PHP function is...

View Article



How to generate dynamic javascript files with Ruby on Rails?

The problemI want to write JavaScript files that use dynamic informations via Ruby on Rails. I think my solution also works with rails 2 and 3. What can dynamic JavaScript do for you? You can write...

View Article

PHP: How to get public properties of object

Sometimes you need all public properties of an object. I've also met this problem. I tried to find some usable native function on php.net, but the only native solution is the ReflectionProperty class....

View Article

Image may be NSFW.
Clik here to view.

PHP GD2 vs Imagick

OriginalGD2 thumbnailImagick thumbnail<?php//include('tmp/Timer.php');function gd_thumbnail($filename, $width = 200, $height = 200) {    $source =...

View Article

How can you generate thumbnail with php?

You can read about two popular thumbnail generating methods in this article. The first method requires GD library. If you select the other way you need Imagick which is a native php extension to create...

View Article


PHP: easy to use open-source Timer class

I share my Timer class with you. This is an easy to use class. If you use this you will never have to think about the way of execution time measuring.PHP Timer class<?php/** * Usage: * $timer = new...

View Article

How to install Phusion Passenger for ruby 1.9.2

There are some easy steps to install Phusion Passenger for ruby 1.9.2 and apache2 on Ubuntu Linux. 1. Install rvm system wide sudo bash < <( curl -L http://bit.ly/rvm-install-system-wide )2....

View Article

Compass and 960gs comparison

I've read a great article about 960.gs and compass comparison. This article may help you chose the right CSS framework for your project.Blog categories:  Programming Web developmentBlog tags:  web css...

View Article


How to use Padrino with mongodb

Padrino is a ruby framework built upon the excellent Sinatra Microframework.$ padrino g project blog -d mongomapper -t rspec -s jquery -e haml -c compass      create        create  config.ru...

View Article


Deploy rack applciaton

Make config.ru with following content:require 'rubygems'require 'sinatra'require './my_sinatra_application.rb'run Sinatra::Application You have to run bundle command. This will be install all necessary...

View Article

Clickable flash banner on HTML page

See the following code:<div style="background-color: #fff; border: 1px solid #000;"><OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="214" HEIGHT="200"...

View Article

HTML number formatting with PHP

Here is my HTML number formatter. Sometimes the browsers wrap the numbers along thousand separator or decimal pont, but this function prevents this event.function html_number_format($number, $decimals...

View Article

How to use function value as default argument value?

function foo($year = date('Y')) {  // this is invalid} So, how should do it?define('THIS_YEAR', date('Y'));function bar($year = THIS_YEAR) {  // this is valid}Blog categories:  Programming Web...

View Article


how to install Ruby on rails webshop?

You have installed RoR3 and now you want to install a rails3 webshop.I think the best solution is Spree. This is the only rails3 based e-commerce solution at this time.How do you install this...

View Article

Rails 3 Content Management Systems (CMS) - 2011

I've collected all open source CMS based on rails 3.x.Rails CMS/Wiki/ForumThis is a very simple but feature rich CMS framework. It is good startpoint for a new rails project what will be wiki, Forum or...

View Article


Resolve Ruby on Rails UTF-8 error message: invalid multibyte char (US-ASCII)

I got the following error when i run a rake db:seed command on may RoR application:invalid multibyte char (US-ASCII)I found the soution and the error has gone away:You should add a line to your file:#...

View Article

Locomotive CMS

Today, I found a really good CMS. I'm looking for ruby 3 CMS for a while. I found this CMS solution that use my favorite NoSQL database system: MongoDB. I think multi site feature is rare in ror...

View Article


PHP normalize function

I post my normalization function. This function find all illegal characters (like: Ő, Ű, ú, í, etc. ) and replace it to latin1 chars. (like: O, U, u, i, etc.) This function works for me on hungarian...

View Article

jQuery link click href value

I've wrote these words on google. And I don't find the exact solution.The problem: What Should I write in the href? If I write # sign then browser go to the top of page. I wouldn't like to go to the...

View Article

Fastest and easy to use URL shortener

Here is my favorite URL shortener tool: RX.hu. This is fast and really easy to use URL shortener. There are some alias for it: resize-linx.com, resize-links.com, resizelinks.com, etc. All of these are...

View Article

Open Source CRM Comparison

I would like to choose an ideal CRM for a client. It must be open source. But I don't know CRM systems. I'm starting discover world of CRM systems by this post.1. ZurmoPro: Awesome design and user...

View Article


Image may be NSFW.
Clik here to view.

HTTP AUTH logout method

This code cause logout feeling for your user. The browser will ask again the username and password.<?php  header('WWW-Authenticate: Basic realm="protected area"');  header('HTTP/1.0 401...

View Article


Install Postgresql on Mac OS X

Here is the steps how you can install postgresql on Mac OS X:1. install homebrewruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" 2. install postgresqlbrew install postgresql...

View Article
Browsing latest articles
Browse All 23 View Live




Latest Images