web design and more

Change the default image path in custom module

For custom module I needed to change the default image path (media/images) to a custom path (skin/frontend/default/theme/…). Here is the solution for the admin part of my module: 1. Create a folder in your module: app/code/local/[Namespace]/[Module]/Block/Adminhtml/[Module]/Helper/Image.php 2. Define a class… Continue Reading →

How to analyse Twitter data

Minning the Social Web becomes more popular among programmers.  Lets have a look on how to get access to Twitter data. First you need to set up an app with Twitter and get your  OAuth credentials. Next you need to … Continue Reading →

How to change the collation for all columns?

If you want to change the collation / character set not only for one column but for the whole table going through all columns with phpMyAdmin is quite time consuming continue reading this. Instead just use this SQL statement: ALTER… Continue Reading →

Search & Replace string in MySql

If you need to replace some string (or part of it) in a column you can use the REPLACE function in MySql. Here is an example: UPDATE table_name SET column_name = REPLACE(column_name, ‘string_to_be_replaced’, ‘new_string’) If you want to change only… Continue Reading →

Find duplicate entries in a table

If you want to find duplicate entries in a table you can use this command: SELECT column_name, COUNT(*) c FROM table_name GROUP BY column_name HAVING c > 1; column_name: the name of the column in tablename where you want to… Continue Reading →

Combine csv files from one directory

One way of combining csv files in R: filenames

Bayes theorem

Ever wondered how to calculate this in R? Here is the function: bayes_gotit

Plesk wordpress installation

Plesk will install wordpress in its own subdirectory /wordpress by default. After the installtion you won’t be able to change the web site root directory in Plesk. Follow this steps, if you want your wordpress installation accessible directly from your… Continue Reading →

© 2018 web-design2 — Powered by WordPress

Theme by Anders NorenUp ↑