We have just launched the new website revamp of our client: Go-Trendy.com. Go-Trendy is an online trendy fashion shop focusing on Hong Kong, Japanese and Korean fashion. Total time taken for us to revamp this website is 1 week. Here is final product: Homepage: Products...
“The only way to achieve the impossible is to believe it’s possible.” – from “Alice in Wonderland” Eduardo Saverin – Facebook legend living in Singapore Tham Yuen-C Straits Times Site’s co-founder set up a software development firm here last year, but has maintained a low profile. The other Facebook legend – the one who fell out with co-founder Mark Zuckerberg – has set up a software development company in Singapore. Mr Zuckerberg is chief executive officer of the world’s most popular social networking site. His former collaborator, Mr Eduardo Saverin, 28, is one of three people behind Web technologies company Anideo, with offices in Singapore and Miami, Florida. The Brazil-born billionaire is said to have been living in Singapore since last year, and the Singapore outfit of his firm was registered under his name in October last year. His two partners are fellow Harvard University graduates, one of whom had worked with him on a job search site in 2005. Since technology site TechCrunch posted a blog last Thursday about him being in Singapore, netizens – here and abroad – have been speculating about his whereabouts. A film, The Social Network, based on the story of the two co-founders, is currently showing in cinemas around the world. Mr Saverin is portrayed in the movie as the more affable and charming character, in contrast to its depiction of Mr Zuckerberg as a socially inept geek who is also the more cunning of the two. Mr Saverin was Mr Zuckerberg’s partner in 2004 when, as Harvard students, they started thefacebook.com, a website that evolved into Facebook. But the duo fell out...
Recently I need to insert 400+ rows of data into an eight year old MSSQL 2000 and MSSQL 2008 database. It’s really a pain in the ass if I have to do it by hand or learning a new tool to do it. Luckily, I can use ActiveRecord to do that easily thanks to activerecord-sqlserver-adapter and and auto table field mapping of ActiveRecord. Here is a quick step-by-step guide: Install Ruby on Windows machine (that run SQL server). Download One-Click Ruby Installer for Windows for Ruby 1.8.6 P26 at http://rubyforge.org/frs/download.php/29263/ruby186-26.exe And install it. If you use the default setting, it will setup ruby at c:ruby folder with rubygem 0.9.3 Update RubyGems Open “Command Prompt” cd c:rubybin gem update –system Install ActiveRecord with SQLServer Adapter gem install activerecord-sqlserver-adapter –source=http://gems.rubyonrails.org If the installation result is: Successfully installed activesupport-2.2.2 Successfully installed activerecord-2.2.2 Successfully installed activerecord-sqlserver-adapter-1.0.0.9250 3 gems installed Create a DSN (Data Source Name) Luckily I can reuse DNS from current ASP project so I don’t need to create new one. If you have to, you can follow guideline in [1]. Setup connection and create property ActiveRecord based classes require “active_record” ActiveRecord::Base.establish_connection( :adapter => “sqlserver”, :mode => “odbc”, :username => “yourusername”, :password => “yourpassword”, :dsn => “yourDSN” ) class AnyNameYouWant < ActiveRecord::Base set_table_name “TableNeedToAccess” set_primary_key “PrimaryID” end Start irb by: cd c:rubybin irb And paste above chuck of code in to irb. From now, you can use ActiveRecord based classes to read/write/add/remove SQL Server table as in a Rails script/console environment. I also got a problem with Time.mktime and need to some code adjust by hand Open c:rubylibrubygems1.8gemsactiverecord-sqlserver-adapter-1.0.0.9250libactive_recordconnection_adapterssqlserver_adapter.rb Replace “Time.mktime” by “Datetime.new”...
mysqldump can retrieve and dump table contents row by row, or it can retrieve the entire content from a table and buffer it in memory before dumping it. Buffering in memory can be a problem if you are dumping large tables. To dump tables row by row, use the –quick option (or –opt, which enables –quick). The –opt option (and hence –quick) is enabled by default, so to enable memory buffering, use –skip-quick. Backuping a single table from a database mysqldump -u -p database_one table_name > /var/www/backups/table_name.sql Restoring the table into another database mysql -u -p database_two <...
There are always needs to build E-commerce sites with Credit Card transactions securely and seamlessly. In Singapore market, eNETs is the most well-known company providing payment gateway services. Up to now, eNETS only provide API for .NET and Java platform. In this post, I will show you my solution to integrate eNETS and Ruby on Rails via Java. Steps: 1. Build JAR file to submit payment info to eNETS, i named it enets.jar. This jar file will return output from eNETS to console in text format. I attached sample program built with NetBean, you can download it here: eNETS. After downloading, you just copy that folder to your NetBean projects folder as shown in below image. 2. Follow eNETS guideline, change setting for java security as well as generate merchant.priv.pgp.asc, merchant.pub.pgp.asc. 3. Change config: log4j.properties, NETSConfig.xml 4. Build enets.jar file from source files in NetBean. Right click on project root, Clean and Build. 5. Generate command to execute enets.jar, something like this: “java -jar #{RAILS_ROOT}/vendor/extensions/payment_gateway/lib/enets/eNETS.jar #{mid} #{tid} #{paymentMode} #{amt} #{currency} #{merRef} #{submitMode} #{merCertId} #{pan} #{expiry} #{stan} #{paymentType} #{successURL} #{successURLParams} #{failureURL} #{failureURLParams} #{notify_url} #{notify_url_params} #{name} #{cvv} #{post_url} #{post_url_params} #{cancel_url} #{cancel_url_params} #{bill_first_name} #{bill_last_name} #{bill_initial} #{bill_addr1} #{bill_addr2} #{bill_coy_name} #{bill_city} #{bill_state} #{bill_zip_code} #{bill_country} #{bill_mobile_num} #{bill_phone_num} #{bill_fax_num} #{bill_email} #{ship_first_name} #{ship_last_name} #{ship_initial} #{ship_addr1} #{ship_addr2} #{ship_coy_name} #{ship_city} #{ship_state} #{ship_zip_code} #{ship_country} #{ship_mobile_num} #{ship_phone_num} #{ship_fax_num} #{ship_email} #{shopper_ip_addr} #{product_format} #{product_details} #{gw_url}” 6. Run enets.jar from ruby console with output = %x[#{command}]. %x[] command will store output to output variable for later processing. It is not the same as system() or exec() ruby command. Read more on Jay Fields’ blog: Ruby Kernel system, exec and %x 7. Parse results returned...
web designer singapore,mobile apps singapore,singapore web design,singapore mobile application developer,website developer singapore,web design company singapore,web development singapore,website designer singapore,design agency singapore,graphic designer in singapore,mobile application development singapore,website development singapore,mobile game developer singapore,web application singapore,app developer singapore,singapore mobile app developer,ruby on rails developer singapore,developers in singapore,developer in singapore,singapore app developer,app development singapore,mobile apps development singapore,android developer singapore,singapore web design services,ios developer singapore,web design singapore,website design singapore,singapore web development,design firms in singapore,mobile app developer singapore,mobile app development singapore,web design services singapore,mobile application developer singapore,singapore website design,web development company singapore,mobile developer singapore,ios app development singapore