Archive for January, 2010

 

Apple Reveal iPad

0

After so much expectation, a new family member of Apple named iPad, has seen the light. Steve Jobs introduced it in his annual San Francisco event and has already produced long queues to book on major stores.

IPad is called, weighs just 680 grams, and is thin, only 13,4 mm. This is the newest member of the Apple that was released yesterday. Steve Jobs, CEO of the firm, on its annual event in San Francisco released its new device to thousands of expectant people. And that, along with the iPhone, which was introduced three years ago, has become one of the biggest releases of the company, preceded as usual by numerous rumors that echoed on the Internet.

The new device has been born to close the ‘gap’ between smartphones and netbooks. Can navigate the web, send emails, view photos and videos, listen to music and reading e-books (the firm opened a store of electronic books, iBookstore, coinciding with the availability date of the iPad in March). But in addition, Apple has designed a new version of iWork, productivity suite of applications for desktop computers own specifically designed for multi-touch for the new iPad. With Pages, Keynote and Numbers The user can create formatted documents, presentations with animations and transitions, and spreadsheets with statistical graphs, functions and formulas.

In general, includes 12 new applications developed especially for the iPad and, according to Apple, it works with virtually all of the more than 140,000 applications available on the App Store, including those already purchased by the user for the iPhone or iPod Touch.

The user will see all these applications on a 9.7 inch screen and LED backlight, which includes winning IPS technology for crisp and clear, with a viewing angle of 178 degrees. All applications will work in both portrait or landscape, changing automatically and dynamically between views when the user rotates the iPad in any direction. In addition, applications will run on the chip itself A4 Apple.

For connectivity, the new device will offer two versions: one with comnicación Wi-Fi 802.11n, and the other with Wi-Fi and 3G, which supports speeds up to 7.2 Mbps on HSDPA networks.

Finally, adding that the company has launched a new software development kit (Software Development Kit or SDK) for developers to create applications designed to take advantage of the capabilities of the iPad.

Prices

Although the iPad will be available worldwide beginning in March, only been realized prices for the U.S., which depend on the storage device and wireless connection type you wish:

- The U.S. MSRP is $ 499 for the 16GB model,
- Cost $ 599 for 32 GB model,
- And $ 699 the 64 GB model

IPad models with Wi-Fi + 3G will be available in April in the U.S. and certain countries. U.S. Retail pricing be:
- $ 629 for 16 GB model,
- $ 729 for 32 GB model,
- And $ 829 the 64 GB model

Tweet this!Tweet this!
 

Php Frameworks

1

I decided to jump over the MVC (Model View Controller) pattern and on one of my linkedin groups I drop a question:

Which one is best?

A huge amount of PHP programmers started to join this discussion writing their personal PHP Framework tastes, providing me with a huge list of Frameworks I would like to share with you. I don’t say that one is best that another, as one of the members said, there is no ‘best PHP MVC Framework, is whatever suits you best on your project goals’.

I know the list could be much bigger, if you know more PHP Frameworks to add to this list, please comment and I will update it.

Tweet this!Tweet this!
 

Get Latitude and Longitude with Google Maps V3

7

I would like to share with you a little piece of code that I find quite useful in my applications. I do create lots of guides that require a small utility to find out the latitude and longitude of a business location from a control panel in order to display the maps appropiately on the Web. Here I will do my best to explain a step procedure on how to do that -once you know the procedure, it is easy to create plugins or whatever you wish to do.

Step 1

First of all, lets make a reference to the new version of Google Maps. Check that we have to specify a parameter sensor=false. To find out more about this parameter please follow this link.

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

Step 2

Now we are going to write the HTML tags on the BODY of our document that will hold the map and the controls that will hold latitude, longitude and zoom level references. Also, see the CSS that control the size of the map holder.

<style>
div#gmap {
width: 100%;
height: 300px;
}
</style>
<body>
<center>
<!-- MAP HOLDER -->
<div id="gmap"></div>
<!-- REFERENCES -->
lat:<span id="lat"></span> lon:<span id="lon"></span><br/>
zoom level: <span id="zoom_level"></span>
</center>
</body>

Step 3

Now, we are going to write the function that will display the map when the document loads. The function, that we will call ‘initialize’ has different parts that we will describe now:

Part 1

Setting the map zoom level and its position in the world:

var myLatlng = new google.maps.LatLng(38.971154274048345,1.415863037109375); // IBIZA :)
var myOptions = {
zoom: 16,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById("gmap"), myOptions);

Part 2

Placing a marker on the map specifying its center position (please refer to above code for LatLon location).

// marker refers to a global variable
marker = new google.maps.Marker({
position: myLatlng,
map: map
});

Part 3

Now, the events that will take control of the marker center re-positioning and placing the information on the correspondent document objects (lat, lon, and zoom level).

// if center changed then update lat and lon document objects
google.maps.event.addListener(map, 'center_changed', function() {
var location = map.getCenter();
document.getElementById("lat").innerHTML = location.lat();
document.getElementById("lon").innerHTML = location.lng();
// call function to reposition marker location
placeMarker(location);
});
// if zoom changed, then update document object with new info
google.maps.event.addListener(map, 'zoom_changed', function() {
zoomLevel = map.getZoom();
document.getElementById("zoom_level").innerHTML = zoomLevel;
});
// double click on the marker changes zoom level
google.maps.event.addListener(marker, 'dblclick', function() {
zoomLevel = map.getZoom()+1;
if (zoomLevel == 20) {
zoomLevel = 10;
}
document.getElementById("zoom_level").innerHTML = zoomLevel;
map.setZoom(zoomLevel);
});

Part 4

Initialize the document objects with default information

document.getElementById("zoom_level").innerHTML = 16;
document.getElementById("lat").innerHTML = 38.971154274048345;
document.getElementById("lon").innerHTML = 1.415863037109375;

Step 4

Finally, we have to write the function that will reposition the marker on ‘zoom_changed’ map event and call the ‘initialize’ function on window load event.

function placeMarker(location) {
var clickedLocation = new google.maps.LatLng(location);
marker.setPosition(location);
}
window.onload = function(){initialize()};

And that’s it, we have a great utility to plug onto our projects in order to find out the latitude and longitude of an address.

DOWNLOAD

I have included the working version of this tutorial for you to download. If you make any changes on the code in order to improve/add more functionality to it (that is easy fellows), please share it here with us.

http://www.ramirezcobos.com/wp-content/plugins/downloads-manager/img/icons/default.gif download: Get Lat Lon Finder (1.41KB)
added: 22/01/2010
clicks: 2542
Tweet this!Tweet this!
Internet Explorer Holes

Germany recommends not using Internet Explorer ‘for security’

0
Microsoft recognizes that the security of their browser failed to recent attacks on Google
Europa Press News

The Federal Office of Information Security from Germany, warned Internet users to find an alternative to Microsoft’s Internet Explorer (Firefox, Chrome, Safari) ‘to ensure their security’, after Microsoft recognized that their browser failed in the recents attacks to Google’s sytems.

However, according BBC Channel, Microsoft rejected the advice of the Federal Office, saying that the risk to their users was low and by improving the security settings in Internet Explorer would solve the problems.

Nevertheless, German authorities said that even improving its security settings would make IE completely safe for Internet navigation. Microsoft spokesman in Germany, Thomas Baumgaertner, said the attacks were carried against Google by “highly motivated people, with very specific purposes”.

There was a time when I was completely in love with Internet Explorer -I was a begginer web programmer, eleven years a go, but for some reason, that beloved browser, which I constantly used for my Web applications to internal LAN users became a full nightmare on the real WWWorld. I truly don’t understand why the hell is needed so many browsers on the net, why the engine is not made ‘standard’ and then companies offering browsers differ for the added options (themes, plugins, etc…). That could be a dream, one single CSS, JS, HTML engine, just to make the life of the programmer ‘easier’.

I am glad of this new, I am sick of the constant effort of companies to get the ‘monopol’ of something, sick of the confussion and sick of the nightmares that every designer has to go in order to make a great site.

Hope we all follow that campaign. I, in my new project, will include the TOO COOL FOR INTERNET EXPLORER stick. Guys of Microsoft, please open your eyes… get real, stop creating silly tools in order to get onto the market fast and then try to fix your mistakes with patches and updates.

Too Cool for Internet Explorer

Too Cool for Internet Explorer

Tweet this!Tweet this!
Picture-121-300x157

jQuery 1.4 -Are you ready?

0

jQuery lovers, today, 14th of January, the programmers of jQuery celebrate its anniversary releasing a new version of this wonderful library. Better iFrame support, great new shorthands, I don’t know what to say fellows but I am eager to find out what its new features are capable of.

The jQuery programmers not happy with a new release has also created a new  jQuery API site. Check what they have done on their API site here.

John Resig will announce 1.4 release details tomorrow but meanwhile, you can download it and see for yourself.

Also, if you want to learn more about what is new in jQuery 1.4 then you might find the following resources useful:

  1. 14 Days of jQuery
  2. Official jQuery Blog
  3. jQuery 1.4 Cheatsheet
  4. jQuery on Tweeter

Check what is new or changed on this new release here.

Happy birthday jQuery! Thanks for the good work!

Tweet this!Tweet this!
 

Fixing 500 Internal Error on Xampp

1

First of all, let’s talk about XAMPP a bit. XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use – just download, extract and start.

There are three types of distribution (Windows, Linux and Mac). I am not going to discuss anything about XAMPP, I think that with a visit to their site you will all the info required to install and run this wonderful package.

What I want to concentrate on is that when trying to use a regular .htaccess in a specific folder, Apache fires a beautiful and really annoying (it is not very well explained why this error happens when it happens) 500 Internal Error.

Finding the problem

Well, I went to the httpd.conf file to see what was going on and found the problem. The problem is that XAMPP Apache version has a very strict security on allowing users to modify its default settings -and its default settings are AllowOverride None:

AllowOverride AuthConfig

Solution

Just go to the Directory directive and change AllowOverride AuthConfig to AllowOverride All and thats it.

<Directory "/Applications/xampp/xamppfiles/htdocs">
Options Indexes FollowSymLinks ExecCGI Includes
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
# AllowOverride AuthConfig
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Tweet this!Tweet this!
 

EzRegAPI OCX Control

0

Here is another Activex Control I have created on the old times of Visual Basic. This time, it easiest the tasks of a programmer to use the registry API functions of Windows.

Visual Basic was one of my preferred languages when I started programming, everybody thought that it was a very slow programming language and, even more, it was not a true programming language. My love for this pseudo-language was so strong that I decided to prove to everybody that, with a bit of tweaking here and there and making use of the DLL libraries, I could speed up the application 10 times more.

And that happened, nevertheless, API programming was not easy to do and if you failed to ‘translate’ the variable types of the function called to that of Visual Basic, you could probably end up with a ‘crash’ or ‘out of memory’ error.

This is why I created these ActiveX Controls, so to help others providing a simpler and already translated code to make use of the API functions without worrying about a crash of their programs.

This is what I wrote back then (remember, I was a new born programmer -script kid)

Well, most of the people I know studying our so-loved Visual Basic language find really hard to learn and very time-consuming the way to implement the power of API functions into VB programs. Even for the most simple thing is a time-consuming operation: find and insert necessary functions, constants, and then know exactly the steps to do in order to use the functions appropriately. It is true that VB6 environment provides some templates and that you can create your own to do the job, but sometimes those templates have to be re-shaped to suit the needs of a new project.
That’s why I have started a series of ActiveX controls that will help not only beginners but to all those lazy programmers that, like me, doesn’t like to spend too much time doing research/re-shape and just want to design and code like maniacs.

How to use

The download zip package has a well written help file. You will find everything you need in it.

Download

http://www.ramirezcobos.com/wp-content/plugins/downloads-manager/img/icons/default.gif download: EzRegAPI OCX Control (203.05KB)
added: 12/01/2010
clicks: 731
Tweet this!Tweet this!
 

Build iPhone Web Apps with iWebKit

1

Iwebkit is the revolutionnairy open source development kit used to create high quality iPhone and iPod touch websites in a few minutes. In the first 4 months of it’s existance the pack has greatly evolved from a basic idea to a project that has reached worldwide fame!

This Open Source Free Development Kit is accessible to anyone even people without any html knowledge and is simple to understand. In a couple of minutes you will have created a full and profesional looking website.

Awesome new and advanced features offered by no pack in the world like a custom popup and iphone-style form elements.

Check out their website: http://iwebkit.net/

And their demo: http://demo.iwebkit.net/

Tweet this!Tweet this!
 

SWFUpload_0_0. Error HTTP Status: 403 Solved

0


SWFUpload is a client-side file upload tool originally developed by Vinterwebb.se. It uses a combination of Flash and JavaScript to provide file upload functionality beyond what the basic browser provides with the <input type=”file” /> tag.

The main features that SWFUpload provides are:

  • The ability to select multiple files in the file browser dialog.
  • AJAX-style uploading without a page refresh.
  • Upload progress events.
  • Namespaced classes compatible with other JavaScript libraries (i.e., jQuery, Prototype, etc.).
  • Flash 9 and Flash 10 support. (Flash 8 support dropped in version 2.2.0)

SWFUpload is different from other Flash based upload tools because of the philosophy behind its design. SWFUpload gives developers control by leaving the UI in the browser (as much as possible). Developers can use XHTML, CSS, and JavaScript to tailor the upload UI to the needs and style of their site. Upload status updates are made through a set of simple JavaScript events. The developer uses these events to update the webpage as the file upload progresses.

How to use it

I am not going to explain how to use it, if any of you are interested on it, SWFUpload guys have developed a very good site explaining its full functionality.

The problem

After successfully installing the component on one of my projects and working amazingly good on the local computer, when I uploaded the project to the server where I contracted the hosting, suddenly I had an error: SWFUpload_0_0. Error HTTP Status: 403.

I google to find a solution to my problem and found tons of people having the same issue and the answers where always the same. For example:

“You are getting a 403. Which means “forbidden”. This is something on the web server that you’ll have to figure out.SWFUpload doesn’t save the file. It just uploads it to your upload_url (upload.php). You need to add PHP code that saves the file. In PHP the uploaded file is found in $_FILE["Filedata"] by default.”

Say what? I looked at my server’s configuration, checked folder permissions, reviewed my JS and PHP code… NOTHING. Then I thought it was something wrong with server POST Payload checks. Normally, this security configuration is disabled by default on Apache Servers but my provider ‘could’ possibly had this security check on. I had to try and…

Solution

I solved the issue by creating an .htaccess file and writing the following in it:

SetEnvIfNoCase Content-Type “^multipart/form-data;” “MODSEC_NOPOSTBUFFERING=Do not buffer file uploads”

Hope this also works for those having the same issue.

Happy New Year BTW!

Tweet this!Tweet this!
 

eyeOS a ‘very close’ Web Operating System

0

eyeOS a Web Operating System

I would like to talk to you about an open source Web application that I have followed since its beginnings: eyeOS. This application started with the goal to become a true Web Operating System and now the guys call it Open Source Cloud Computing’s Web Desktop. Even though the idea of having the system files on a server and have ‘dumb’ clients is not new, these guys have created a great tool and nowadays they even work in conjunction with the IT monster IBM.

Maybe the dreamed future of every System Administrator is near, where they do not need to have certain operating system installed on their computers and everything, every little detail, is managed from a server. Client computers just having a ‘web browser’ and a reliable network bandwidth (most LAN do have it) will reduce enormously companies costs and Microsoft’s pocket :)

Even though I think is a great tool I dislike their interface (sorry guys), it looks far too much like Windows and I think… that nowadays we could provide a better and more intuitive interfaces for clients. Not everybody is a guru folks and not everybody needs to learn Windows to use a computer. Best days are about to come but meanwhile, congratulations eyeOS.

ScreenShoots


Tweet this!Tweet this!
Go to Top