Do you need a PHP programmer?
Use my services as a freelance PHP programmer by hiring me to do PHP programming on your website project.

I have built many custom PHP applications like project managers, classified ad websites and content management systems. I also work with open source applications such as WordPress, online shopping cart websites like Magento and develop content management systems like Joomla.

Showing posts with label others. Show all posts
Showing posts with label others. Show all posts

Monday, December 24, 2012

Add New Font for Dompdf

Hi Hallo,
In this post we will talk about PDF file conversion exactly DomPDF.
It allows direct conversion of HTML files to PDF files. But I found some issues when I was using this module, when I tried to generate pdf file, the result was not same as my html file. Some of fonts didn't apply in the pdf file. I goggled the web and found some solutions. And now I solved it.
I will share how to add your own font for dompdf,

1. For the simple step please go here DOMPDF web-base
2. Complete the form and upload your own font


  Make sure your dompdf version same with version in the form and Go

3. Download and extra the result (.zip). then Copy the contents of the result( .tff, .ufm) to your DOMPDF fonts folder (typically located at dompdf/lib/fonts).

4. If you have not previously installed fonts, you can rename the file dompdf_font_family_cache.sample(this file from the archive) to be dompdf_font_family_cache.dist.php (located at dompdf/lib/fonts). If you have previously installed fonts you will need to copy the relevant entry from the sample file into dompdf_font_family_cache.dist.php file.
Below is example for add some entry to dompdf_font_family_cache.dist.php


5.  Once you have taken these steps your font should be installed and ready to use.

Hope it can help, but if you still have any question
Please feel free to write your comment below.

Kind regard,
Bayu Prawira

Tuesday, December 18, 2012

Credit Card Number for Tester

When make new program or system with payment method, programmers always need credit card number tester to test and make sure their program work well.

So the table below contains a number of credit card numbers that can be used to test credit card handling software. None of these numbers will work when trying to buy something (if you hadn't guessed).

Card Type Number
Master Card (16 Digits) 5105105105105100
Master Card (16 Digits) 5555555555554444
Visa (13 Digits) 4222222222222
Visa (16 Digits) 4111111111111111
Visa (16 Digits) 4012888888881881
American Express (15 Digits) 378282246310005
American Express (15 Digits) 371449635398431
Amex Corporate (15 Digits) 378734493671000
Dinners Club (14 Digits) 38520000023237
Dinners Club (14 Digits) 30569309025904
Discover (16 Digits) 6011111111111117
Discover (16 Digits) 6011000990139424
JCB (16 Digits) 3530111333300000
JCB (16 Digits) 3566002020360505

source : http://www.crazysquirrel.com/finance/test-cc.jspx

Best regard,
Bayu Prawira

Thursday, December 13, 2012

Simple Multiple Marker, Calculation Route, Custom Marker on Google Map

Hi Hallo, ,
Today I will share some code to make simple multiple marker on Google map. This code will show a google map in your web page with a place marker base on your locations. You can also custom the icon marker by yourself and active or inactive the calculation route.

Ok, You can see for the demo below:




So now, we start the code,
1. First we must define our code with google map api and jquery

<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>


2. Copy paste code below, make sure the code between <head>{your script}</head>

<script type="text/javascript">
 var map;
 var directionDisplay;
    var directionsService = new google.maps.DirectionsService();
 var global_markers = [];
// Represent your location here    
 var markers = [[-8.580467, 115.163001, 'My Home - Kekeran, Mengwi, Bali'],[-8.724085,115.180407,'Office - Simpang siur, Kuta, Bali']];

 var infowindow = new google.maps.InfoWindow({});

 function initialize() {
  directionsDisplay = new google.maps.DirectionsRenderer({suppressMarkers:true});
  geocoder = new google.maps.Geocoder();
  var latlng = new google.maps.LatLng(-8.580467, 115.163001);
  var myOptions = {
   zoom: 11,
   center: latlng,
   mapTypeId: google.maps.MapTypeId.ROADMAP
  }
  map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

  directionsDisplay.setMap(map);
  
  // if you don't want to use  calculation route, inactive calcRoute() function
// and call addMarker() here 
calcRoute(); 
  }

 function addMarker() {
  for (var i = 0; i < markers.length; i++) {
   // obtain the attribues of each marker
   var lat = parseFloat(markers[i][0]);
   var lng = parseFloat(markers[i][1]);
   var trailhead_name = markers[i][2];

   var myLatlng = new google.maps.LatLng(lat, lng); 
   // customize the content buble here
   var contentString = "<html><body><div><h2>" + trailhead_name + "</h2></div></body></html>";
   // customize icon marker here
   var icon_img = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRmdVDVsRgbZXd4aoyhWNjP2px16J4nwpvLym4MrMLWEyzGBiTDRe_NDQHL5FU4QYJow0iN_WehzhIbReVMB6enMGtO1kb-xHTDEi83Rcp9RMh1k_Cb5SdqYoFQHCWYZBvrDpvB_Ta2l77/s1600/location.png";

   var marker = new google.maps.Marker({
    position: myLatlng,
    map: map,
    icon: icon_img,
    title: "Coordinates: " + lat + " , " + lng + " | Trailhead name: " + trailhead_name
   });

   marker['infowindow'] = contentString;

   global_markers[i] = marker;

   google.maps.event.addListener(global_markers[i], 'click', function() {
    infowindow.setContent(this['infowindow']);
    infowindow.open(map, this);
   });
  }
 }

 function calcRoute() {

        start  = new google.maps.LatLng(-8.580467, 115.163001);
        end = new google.maps.LatLng(-8.724085, 115.180407);
        var request = {
            origin: start,
            destination: end,
            travelMode: google.maps.DirectionsTravelMode.DRIVING
        };
        directionsService.route(request, function(response, status) {
   if (status == google.maps.DirectionsStatus.OK) {
     directionsDisplay.setDirections(response);
     addMarker();
   }
  });
    }

 window.onload = initialize;
</script>


3. Add new css for map (in <head> container)

<style type="text/css">
 #map_canvas{
    width: 400px;
    height: 300px;
 }
</style>


4. Then the last step, create the html code

<div id="map_canvas"></div>


Ok well done, save your file and try to run it.
Download complete source here
Hope it usefull, if there any question, just write your comment below.
I will replay asap ^^

Best regard,
Bayu Prawira

Sunday, September 16, 2012

Download Crack/Keygen Dreamweaver Cs5

Adobe® Dreamweaver® CS5 is the industry-leading web authoring and editing software that provides both visual and code-level capabilities for creating standards-based websites and designs for the desktop, smartphones, tablets, and other devices.

Dreamweaver is one of the most popular tools for developers.  It provides a range of functionalities and supports almost every technology that is in use today over the web.  I came across this wonderfull keygen that can help you activate your trial version of Dreamweaver CS5 to full version . There are some steps and precautions that you will have to follow while using this keygen .
  1. Download a trial version of Dreamweaver CS5 from Adobe website.
  2. Then install the trial version of the software. The trial version is of 30 days. 
  3. Now extract the rar keygen folder and execute the keygen .
  4. A key will be generated , copy the key and paste it in the activation region in Dreamweaver CS5 .
  5. Your version will be full now.
If the key gets blocked then again follow the same steps to activate a new key and keep enjoying the full version.

Download Keygen Here.

Best Regard,
Bayu Prawira

Friday, September 7, 2012

Easy Install Trac with VisualSvn Server on Windows 7

Hi Haloo, ,
On this post we will talk about "Trac Installation",
Trac is an enhanced wiki and issue tracking system for software development projects. Trac uses a minimalistic approach to web-based software project management. Read more about Trac here.

Ok, now I will explain step by step of Trac installation.
1. Install VisualSVN Server 2.1 using default settings, or download software here.
2. Make sure your machine already installed Tortoise SVN, download software here .
3. Download Trac for VisualSVN Server here VisualSVN-Server-Trac-2.1.1.21699.zip.
    Unzip it to C:\Program Files\VisualSVN Server directory.
    Then reboot system.
4. Create folder C:\Trac and allow "Full control" access.
5. Open VisualSVN Server Software, create new user
    username : bayu
    password : bayu

6. Create new Repository. Right click on Repositories folder -> Create New Repository
    (remember to give checked on create default structure)


7. Take look on Your Repositories of your VisualSVN Server.


 8. Then follow some steps below.
     -  Right click on your project repository -> Properties -> Add -> Add your user -> Ok

     
 - Copy trunk url of your repository


- Checkout your repository trunk by tortoise svn (Please take look on image below)



9. Then try to look on your repository root, D:\Repositories\projecttest (trunk folder will checked green).
10. Make new folder inside trunk folder, D:\Repositories\projecttest\trunk\project. and add the folder by tortoise svn.


11. Add system variable for your system
      Control Panel -> system and security ->system -> advanced system settings -> Environment variable -> New




 
     PythonHome = C:\Program Files\VisualSVN Server\Trac\python

12.  Open command prompt and goto C:\Program Files\VisualSVN Server\trac directory


13. Input you project details     
  1. Project Name set to projecttest
  2. Database connection string, hit Enter for default
  3. Repository type, hit Enter for default of svn
  4. Path to respository, D:/Repositories/projecttest

For the success result will give you "Congratulations!" text.



 14. Add the following text to file C:\Program Files\VisualSVN Server\conf\httpd-custom.conf

LoadModule python_module "trac/python/mod_python_so.pyd"
LoadModule authz_user_module bin/mod_authz_user.so
<Location /trac>
  SetHandler mod_python
  PythonInterpreter main_interpreter
  PythonHandler trac.web.modpython_frontend
  PythonOption TracEnvParentDir C:\Trac
  PythonOption TracUriRoot /trac

  AuthName "Trac"
  AuthType Basic
  AuthBasicProvider file
  AuthUserFile "D:/Repositories/htpasswd"

  Require valid-user
</Location>
 


15. Open your lovely browser and try to access http://localhost/trac or https://localhost/trac (if you are using secure connection) in a browser, enter username and password.

16. If you still have problem or can not access http://localhost/trac, change the port of visualSVN server.
      Open your visualSVN server -> open the properties dialog box for the current selection -> network tab -> change the port to 8000.


- Restart your VisualSVN Server (menu bar "Action" -> Restart), then look for your server url and port



on mine is https://admin-PC:8000/svn/  but try to open this page https://admin-PC:8000/trac/projecttest





Ok, finished all. Now you can manage your project management.
Hope it helpful for all, but if you still have questions just write your comment below

Best regard from Bali,
Bayu Prawira