Monday, October 24, 2016

UPDATE - October 2016 / new project

Been a while since my last post on this blog. Fact is - I haven't been doing much programming lately but am about to undertake a large project on information management and employing advanced and logical data systems to support and in some cases, automate and even drive decision making and workflows in a very complex, global, real world process that generates about 50,000 distinct pieces of non-electronic outputs every year.

More on this to follow in the coming days.





Friday, June 21, 2013

MySQL foreign key constraints


Below are explanations for MySQL's foreign key constraints:

1. ON DELETE RESTRICT

This means that a given parent row cannot be deleted if a child row referencing to it exists. It can be deleted only if there are no referencing child rows.
Modern database systems make this clause redundant as this would be default behavior of any foreign key. I am not sure which versions of MySQL include this as default, still wouldn't hurt keeping this clause.


2. ON DELETE CASCADE

ON DELETE CASCADE means that if a given parent row is deleted then all referencing child rows will also be deleted.

3. ON DELETE SET NULL

ON DELETE SET NULL means that if a given parent row is deleted then all referencing child rows will be set to NULL.

4.  ON DELETE NO ACTION

Same as ON DELETE RESTRICT, that is, a given parent row cannot be deleted if a child row referencing to it exists.

Friday, June 22, 2012

ASP.NET on a Macintosh

Greetings all,

This has been a question running through many minds, can one do ASP.NET programming on a Mac. Well I have just tried it out and it works!

So far, I tried only basic scripts and these executed perfectly on my MacBook Pro. Can't wait to dive deep into it!

Stay tuned for updates...

Monday, June 18, 2012

Moved to Thailand -- Internet!?

Greetings fellow programmers and computer people!

I have recently moved to Thailand and found a new place to stay, now only thing remaining before I can start churning out one line of code after another and sharing it with the wider world outside my MacBook (x2) and MacBook Pro is getting the wire to the outside world -- yes, I am talking about Internet!

My apartment has free wireless for its residents but the speed is terrible, now I am trying to get a line of my own -- easier said than done -- in fact the problem is finding a good source of information, there are many many websites, unfortunately all in Thai.

So, now being the the helpful kind I am  (yeah right!!!), I am sharing unofficial Google Translation translated versions of pages that I found helpful, also included are the URLs of the pages and the Thai versions as they appear on these pages.

Please note that I take no responsibility for the text underneath, I have simply copy pasted the Thai version and the version translated by Google Translation (Link to translation), page version as of 19 June 2012, 09:45 local Thai time.


Mi-Fi (from TrueCorp)

Specifications:
  •  
  • - รองรับการแชร์อินเตอร์เน็ตแบบ Wi-Fi,
      เข้าใช้งานได้พร้อมกัน 5 เครื่อง
  • - รองรับเครือข่าย 3G/HSPDA คลื่นความถี่
      850/1900/2100 MHz
  • - รองรับความเร็วสูงสุด 7.2 Mbps
      (Download) และ 5.7 Mbps (Upload)
  • - หน้าจอแสดงผล OLED แบตเตอรี่
      1500 mA, ใช้งานได้นาน 4 ชม.


- Support for shared Internet access Wi-Fi,. Access 5 computers at once. 
- Support for network 3G/HSPDA spectrum. 850/1900/2100 MHz.
- Supports a maximum speed of 7.2 Mbps. (Download) and 5.7 Mbps (Upload). 
- OLED screen displays the battery. 1500 mA, up to 4 hour

Tuesday, April 17, 2012

Search engine optmization for Cultures-Connect

Search engine optimization for Cultures Connect (www.cultures-connect.net) is a project that I have just taken up, it involves comprehensive search engine optimization and promotion of the website. In addition to employing traditional SEO techniques, customized content is also being developed for the website.

Cultures-connect is an initiative of two social and cultural anthropologists and it is conceived as a platform for exchanging ideas and networking individuals interested in inter-cultural encounters. It also aims to promote cultural exchanges on a high level. The specialties of the institution involve organizing specialized travel, launching social projects and anthropological research.

Personally, while working on this project, I have found that it is engaged in wonderful work in remote Himalayan communities, I encourage you to visit their website, not only to see my work, but more to see their work and be inspired by them.

Tuesday, April 10, 2012

Report about the 100-day campaign website on CNN

It is not often that a drop in the ocean feels like much, infact I will still call an action I took few months back as a mere drop in the ocean, but I am proud that I was atleast able to to make this one drop contribution.

I developed the website for the 100-day campaign against caste-based discrimination and untouchability, http://www.100daysagainstcastediscrimination.com. At the end of its 100-day activism, the website proudly received pledges from more than 1600 people who committed themselves to end caste-based discrimination and untouchability practices.

I was especially gratified to see the website being featured on the CNN iReport website, http://ireport.cnn.com/docs/DOC-676684. Rikke Nöhrlind, Coordinator of International Dalit Solidarity Network noted, “The campaign is a fantastic initiative and we would like to encourage everyone to go to the website and register their commitment to help end one of the biggest human rights issues the world is facing today.”
Read the complete CNN iReport at http://ireport.cnn.com/docs/DOC-676684

Sunday, January 15, 2012

Staying safe from MacDefender, MacProtector or MacSecurity malwares

According to the Apple KnowledgeBase article (http://support.apple.com/kb/HT4650),

This “anti-virus” software is malware (i.e. malicious software). Its ultimate goal is to get the user's credit card information which may be used for fraudulent purposes.

The most common names for this malware are MacDefender, MacProtector and MacSecurity.

A recent phishing scam has targeted Mac users by redirecting them from legitimate websites to fake websites which tell them that their computer is infected with a virus. The user is then offered Mac Defender "anti-virus" software to solve the issue.

Apple released a free software update (Security Update 2011-003) that will automatically find and remove Mac Defender malware and its known variants.

The Resolution section below also provides step-by-step instructions on how to avoid or manually remove this malware.

For details visit:
http://support.apple.com/kb/HT4650

Wednesday, December 28, 2011

Trying out MAMP!

As this year comes to an end and 2012 is just lurking around the corner, I feel the sudden urge to try something new and write about it.

So here goes, over the next few days, I will be trying out the MAMP server environment and writing about it.

What exactly is MAMP?
MAMP stands for Macintosh, Apache, MySQL and PHP and for years has offered the perfect solution for a local developing environment under Mac OS X. The MAMP is also available free of charge for smaller projects.*
MAMP is a development I have heard a lot about and so far, I did not feel the need to migrate as my own (stock) configured Apache, MySQL and PHP works wonders, not saying that they still don't work wonders. But one thing that I read about MAMP PRO got my ears up:
With MAMP PRO, you can easily connect your local server with an existing Dynamic DNS provider, as for example dyndns.com. Making it very simple to quickly make the results of your work accessible externally for superiors and prospective customers. And because you can set up many virtual hosts, you can easily offer alternative configurations or suggestions.*
So keep checking back as I delve into this subject and write back what I find.

[* = quotes from MAMP's website: http://www.mamp.info/en/mamp-pro/]

Tuesday, November 8, 2011

Important message regarding Preeti-Unicode Utility

Important message regarding Preeti-Unicode Utility for Non-Profit or Social Organizations

If you or your organization is involved in non-profit, social or other kind of work that aims for the good of the entire society, or you are a researcher or scholar, and need to use this software, please contact me through email regarding the nature of your work.

For such work, no amount would be charged for the system.

My contact details can be found on my website at http://www.vibhumishra.com or http://www.vibhumishra.com/contact.php

Thank you,

100 day campaign against caste discrimination and untouchability


Despite national legal standards and international obligations, caste discrimination and untouchability practices are still prevalent in Nepal, particularly in rural parts of the country.

To widely disseminate the content of the recently promulgated Caste-based Discrimination and Untouchability (Offence and Punishment) Act 2068 to ensure its effective implementation, the United Nations Human Rights Office in Nepal (OHCHR-Nepal) and the National Dalit Commission have jointly launched this campaign.

On 16th September, the President of Nepal officially inaugurated the launch of the campaign and over a 100 participants, including Government representatives, Human Rights Defenders and media personalities, took part in the campaign's first National Consultation programme organized later in the day.

The ultimate goal is to ensure that victims as well as their family members are able to invoke the rule of law in order to access justice. A culture of accountability must replace the present culture of impunity in Nepal.

To pledge your commitment to end practices of caste discrimination and untouchability, visit the campaign website: http://www.100daysagainstcastediscrimination.com and make your mark today!

Wednesday, October 12, 2011

Flash - XML - MySQL - PHP integration project

It has been a while since my last post, though I did not do much or did do a lot... strange that I can't remember, I did infact finish one project.

The project involves Flash - XML - MySQL and PHP integration. Primarily using Action Script, this is a campaign web presence and I urge to visit the website http://www.100daysagainstcastediscrimination.com/

On a side note, I will also encourage everyone, even if you who are not in Nepal or do not do any work related to human rights or social inclusion, to pledge your commitment to end caste discrimination and untouchability practicies. By getting people to know about these ghastly practicies in which people of "certain" communities are treated as "untouchables", and are subjected to inhumane acts and at times even killed for "violating" these so called norms.

Nepal has recently enacted a new law that outlaws such practicies and discrimination based on caste. This campaign aims to raise public awareness about the law and to advocate for its effective implementation.

Jointly undertaken by the United Nations Human Rights Office in Nepal (OHCHR-Nepal) and the country's National Dalit Commission, the campaign was started on 16 September and will continue until 24 December.

Make your mark - pledge your commitment - spread the word!
http://www.100daysagainstcastediscrimination.com/

Sunday, August 7, 2011

Unicode to Preeti Conversion - Mac OS X 10.7 "Lion" compatibility

Regarding compatibility for the Macintosh OS X version of this utility, the last release of the project, 0.8.4b (for Mac OS X 10.6.6) should work on Lion.

People who tried this version on OS X 10.7 have reported no issues, if you are using an earlier version of the Converter and encounter problems in Lion, please upgrade to version 0.8.4b.

Meanwhile, I continue to work on a release for a full "Lion" version. Support will be gradually added for converting Unicode to other fonts (including Hindi fonts) continues.

The last stable version, 0.8 already has support for converting following fonts:
  • Preeti, to and from, Unicode
  • Kantipur, to and from, Unicode
  • Fontasy Himal, to, Unicode
For regular updates, please visit: http://www.vibhumishra.com/unicode-preeti.php

Thursday, July 22, 2010

Discrimination kills - Maternal mortality and human rights

Though this is not on a programme subject, it is something very important - the importance of which cannot be expressed even if all lines of code written in the world so far or will be written is raised to the power of nth degree where n is all lines of code written in the world so far and be written...
Please share this documentary as widely as you can in your blogs, on Facebook, through emails etc...




Discrimination kills - Maternal mortality and human rights

Discrimination against women leads to preventable deaths and injuries during pregnancy and child birth. Each year hundred of thousands of women and girls die and millions more become disabled as a result of complications during pregnancy and child birth.

A study by United Nations Human Rights office (OHCHR) finds a clear relationship between maternal mortality and morbidity and violations of human rights.

------
http://www.youtube.com/unohchr

The study by the UN Human Rights office is produced under the request of the Human Rights Council.

The short documentary is the story of a widower whose wife died during childbirth. He speaks of how his wife's death could have been prevented. The UN human rights office says discrimination against women is causing unnecessary deaths and injuries during pregnancy and childbirth.

For more details on this and other works of OHCHR, visit their global website: www.ohchr.org or the website of its Nepal office: nepal.ohchr.org

Sunday, July 18, 2010

PHP/MySQL based Content Management System (CMS)

I have just finished the development of a PHP/MySQL based Content Management System (CMS). Below is a low-resolution screen-shot of the system.

Details about this system can be viewed on my website at http://www.vibhumishra.com/index.php?projects&cms_1

There are two versions of this system, one with an ordering component which will let one do business online and the other without this component, some of the other features (common to both versions) include:
  • Display web-based advertisements such as Google AdSense ads.
  • Ability to publish pages straight away, save drafts and archive pages.
  • Flash and other multimedia integrated.
  • Tracking individual page hits, user browsing trends and other information.
  • Full-featured password-protected administrator side, including with Secured HTTP (https://) support (server feature).
  • 3-customizable colour themes (customizable by site visitors).
  • Multiple font support (not restricted to standard web fonts).
A screen shot of the CMS, (populated with dummy data):

Friday, July 16, 2010

Enabling PHP on stock Mac OS X 10.6 Snow Leopard

A quick way of enabling the stock installation of PHP on Mac OS X 10.6 "Snow Leopard". You may use either the Terminal or the user interface of the Finder.

1. Go to "/etc/apache2"

2. Use either of the options:

2.a. If using Finder: Give yourself access privileges (read-write access) to file "httpd.conf" and open the file using your favourite text editor

2.b. If using Terminal: Using your favourite text editor (vi, pico etc), using sudo open the "httpd.conf" file.

3. Uncomment (remove the #) in front of line:
LoadModule php5_module libexec/apache2/libphp5.so
4. Add the following lines (preferably at the end of the document so that it is easier to debug later if required):
#IfModule php5_module$
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
</IfModule>
In the above, replace # with an "<" and the $ with an ">"

5. Try by running a test php page.

<?php phpinfo(); ?>

In the above, replace # with an "<" and the $ with an ">"

Tuesday, February 23, 2010

Object Oriented Programming and Polymorphism in PHP

Introduction:

One of the greatest strengths of any programming language is its Object Orientation and from this comes Polymorphism, way back when I was in college, I studied this section of programming with immense interest and while at first, avenues for its implementation were very limited this is growing day by day.

Following are some examples and implementation of these concepts.

Example:

All Object Oriented Programming languages (OOP languages) offer some form of polymorphism. Following is an example of implementation of polymorphism using PHP:


interface vehicle{
function getType();
function getCapacity();
}

abstract class baseVehicle implements vehicle{
protected type = $type;
}

function getType(){
return ($this->type);
}
}

class motorbike extends baseVehicle{
function getCapacity(){
return ("2 people");
}
}

class car extends baseVehicle{
function getCapacity(){
return ("5 people and 400 litres of boot space");
}
}

class truck extends baseVehicle{
function getCapacity(){
return ("3 people and 10 tonnes of cargo space");
}
}

$vehicleArray = array(
new motorbike("Enfiled Bullet Motorcycle"),
new car("Tata Indigo Station-wagon"),
new truck("Leyland Flatbed Truck")
);

foreach ($vehicleArray as $vehicleData) {
echo $vehicleData->getType() . " - " . $vehicleData->getCapacity() . "\n";
}

Output:

Enfiled Bullet Motorcycle - 2 people
Tata Indigo Station-wagon - 5 people and 400 litres of boot space
Leyland Flatbed Truck - 3 people and 10 tonnes of cargo space

If there are any questions or feedback regarding this, please post in the comments box!

Monday, November 23, 2009

Examples of Flash Charts and Graphs soon

I will try to upload some examples and screen-shots of some graphs and charts generated through Flash which gets in the data from databases or XML files.

Check in soon!

Monday, October 12, 2009

Implementation of PHP-Flash-XML - Realtime Graphs!

Hi all,

One great implementation I have of PHP-Flash-XML project is for generating real time graphs. I already have this working for Pie Charts, Bar Graphs and Line Graphs. Now I am working on Line Graphs with 2 or more variables and scatter plots.

For more details about this project, see my website, http://www.vibhumishra.com/index.php?php-flash-xml.

More updates soon...

Wednesday, August 26, 2009

PHP - XML - Flash Integration

Since the past few months, I have been working on projects involving a great deal of PHP, XML and Flash integration.

Some common example of such integration are dynamic Flash websites, XML-based Flash applications, components for PHP-based websites, the list is endless.

Examples and sample of this work can be seen on my website: www.vibhumishra.com. Over the next few days, I will be putting some samples of the ActionScript involved on this blog as well.

Friday, June 12, 2009

Updates & Examples of Python coming soon

Hi all,

I haven't been able to update this blog all that often but I will do so very soon.

Just a few quick updates:

1. Along with this blog, do visit my website too, it has a comprehensive list and details of many projects I have been working on - including the Unicode to Preeti converter. The address of my website is http://www.vibhumishra.com

2. I will be putting a number of great example code for those of you starting to learn Python as well as some higher end examples for the more experienced programmers, do check back in soon.

All for now - Please send in your comments - I would love to hear from you!