background preloader

Programming

Facebook Twitter

How to Tell if MySQL Is 32- or 64-Bit. Orientation and deviceOrientation in Flex Mobile apps. So you want to build a mobile app and tap into the 30+ billion app downloads that are estimated to happen in the next 5 years? Well, one of the first things you’ll have to think about is screen orientation: unlike in a desktop application, the user can rotate the screen through portrait and landscape orientations, both before and while your application is being used. This can be a great thing since your application can take advantage of the different screen dimensions to provide specialized UI but it also means you need to make some decisions about how your app is going to handle these situations. In general, the default configuration for Flex typically does the right thing, especially if you use constraint-based layout settings so that your controls change size and position correctly regardless of how the application is oriented and the screen is sized.

First, some quick definitions: Figure 1: iPad, in its default portrait orientation; Motorola Xoom, by default in landscape orientation. Flex 4.6 * Define views in a mobile application. The ViewNavigator.popView() method returns control from the current view back to the previous view on the stack. When the popView() method executes, the current view is destroyed and the previous View on the stack is restored. Restoring the previous View includes resetting its data property from the stack, For a complete description of the life cycle of a view, including events dispatched during creation, see The life cycle of the Spark ViewNavigator and View containers. The new view is restored with the original data object at the time it was deactivated.

Therefore, you do not typically use the original data object to pass data back from the old view to the new view. Return object type The Object returned by the createReturnObject() method is written to the ViewNavigator.poppedViewReturnedObject property. ViewReturnObject defines two properties, context and object. The poppedViewReturnedObject property is guaranteed to be set in the new view before the view receives the add event.

Using Traits in PHP 5.4 » phpmaster. Minimizing code duplication through better organization and code reuse is an important goal of Object Oriented Programming. But in PHP it can sometimes be difficult because of the limitations of the single inheritance model it uses; you might have some methods that you would like to use in multiple classes but they may not fit well into the inheritance hierarchy. Languages like C++ and Python allow us to inherit from multiple classes which solves this problem to some extent, and mixins in Ruby allows us to mix the functionality of one or more classes without using inheritance. But multiple inheritance has issues such as the Diamond Problem problem, and mixins can be a complex mechanism to work with. In this article I will discuss traits, a new feature introduced in PHP 5.4 to overcome such issues.

The concept of traits itself is nothing new to programming and is used in other languages like Scala and Perl. What a Trait Looks Like Let’s consider this example: Multiple Traits Precedence Order. Flex radar chart component. We’ve released a radar (spider, polar) chart component for Flex as an open source (MIT) project on github. This is abstracted from our Sonarhq product. For the most part we’ve been using the Flex Charting components from Adobe, but this doesn’t include radar charts.

We looked at several commercial packages, but these turned out to be either too expensive, or not flexible enough. There is a free component a vailable at Kap Lap, but it didn’t support the styles we needed to match the design we had. In the end it was easier to produce our own (about a day and a half of work). Download the code or the swc [230KB] file from github and create a new project. This will show a simple chart similar to the one here.

Originally my intention was to extend the flex charting objects in order to implement the chart. Update 24th Aug 2009: New release that fixes issues with drawing the highlight and removing series radar_chart-1.1.swc. Update 16th Jul 2010: Release that works correctly with Flex 4. Radar Chart component from Kap Labs Flex Reporting Package. Data visualization in Flex 4.5 with Kolbert – Radar to Petal Chart « Bishop on Development. Sometimes the data displayed in a Radar Chart can be difficult to intuitively analyse. I read a good article on alternatives to radar charts and wanted to apply the “Petal Chart” in Flex. When you look at the result, you would’nt think that both charts visualize the same data! I used Kap Labs’ Kolbert API to generate a regular Radar Chart, and edited the data source and axis items to create a Flex Petal Chart. The two different data source CSV files can be seen if you right-click, View Source, and go to assets folder.

Radar and Petal Chart - Flex 4.5 using Kolbert Tags: chart, Flex, Kolbert, Petal, Radar. Brain-Computer Interface | Hello Sekati. » Flex4 Vertical Slide Show (use tween and easing) | Flex4Fun | Flex Spark Example and Free Source Download. Flex 101: Creating a Swipe/Slide Effect With Flex - DevelopRIA. Core Flex 4 – Elements vs Children « Bill White's Blog. When I started using Flex 4 I tried to get up to speed by using the new version in a manner similar to its predecessor until I came across roadblocks or when I determined I was able to take advantage of the new features I had heard about such as skinning, states, etc.

I quickly found that there were some obvious Flex questions that I was not able to answer without diving into the API docs and by playing with some examples so I could truly understand what is going on. I knew from past experience that Halo was hiding a lot of the dirty details about what was going on in the display list, but once you start using Spark, you will come to see just how much Halo was really doing under the covers and why Spark is a much more ‘honest’ way of working with the display list. One of the first things I hit was the term ‘elements’. What is an element? Is it the same thing as a child?

Initially I concluded that elements where just another way of saying children (wrong). View Source View Source 1. The Liskov Substitution Principle » phpmaster. Cron and Crontab usage and examples. Cron Cron is a daemon that executes scheduled commands. Cron is started automatically from /etc/init.d on entering multi-user runlevels. Cron searches its spool area (/var/spool/cron/crontabs) for crontab files (which are named after accounts in /etc/passwd); crontabs found are loaded into memory. Note that crontabs in this directory should not be accessed directly - the crontab command should be used to access and update them. Cron also reads /etc/crontab, which is in a slightly different format. Cron then wakes up every minute, examining all stored crontabs, checking each command to see if it should be run in the current minute.

Additionally, cron checks each minute to see if its spool directory's modtime (or the modtime on /etc/crontab) has changed, and if it has, cron will then examine the modtime on all crontabs and reload those which have changed. Only jobs that run at a particular time (not specified as @hourly, nor with '*' in the hour or minute specifier) are affected. Crontab.

Optimizing performance for mobile AIR applications. This section highlights some best practices to improve performance in the mobile applications you build with Flash Professional. Decreasing application startup time To minimize load times, it is important to not bog the application down by loading your entire application all at once. For example, imagine that a game has 100 levels. There is no point in loading all 100 levels even before the title screen is displayed. This means you should not instantiate objects until they are ready to be used. Using an init() function in every class that instantiates objects and variables instead of placing the instantiation code in the class constructor or a global declaration allows for a more controlled environment. In terms of user experience, it is much better to have smaller chunks of load times than one big loading process right in the beginning. Decrease the compile time by disabling warnings mode Set ".visible = false" rather than "alpha = 0" properties to hide instances on Stage.

Flash Platform * HTML Developer’s Guide for Adobe AIR. Flash Platform * AIR development basics. Flex Application Bootstrapping - Totally Custom Preloader. Post - Facebook developers. MySQL: How To Read Binary Log File. Detect Spark List Control Scroll To End « Sönke Rohde. The HipHop Virtual Machine. Facebook looks to fix PHP performance with HipHop virtual machine. Look at the URL of most pages on Facebook, and you'll see a ".php" in there somewhere. That's because Facebook has leaned heavily on the PHP scripting language to develop the Web-facing parts of the site. PHP's popularity and simplicity made it easy for the company's developers to quickly build new features. But PHP's (lack of) performance makes scaling Facebook's site to handle hundreds of billions of page views a month problematic, so Facebook has made big investments in making it leaner and faster.

The latest product of those efforts is the HipHop VM (HHVM), a PHP virtual machine that significantly boosts performance of dynamic pages. And Facebook is sharing it with the world as open-source. Facebook's initial PHP performance efforts had been focused on tuning the Zend Engine—contributing fixes and patches to Zend, and writing C++ based PHP extensions to offload the heavy lifting of application logic. So the Facebook team started to look for other options outside of Zend. A Tour of PHP.INI » phpmaster. Anyone who has a server using PHP has undoubtedly heard of php.ini – it’s the configuration file used to control and customize PHP’s run-time behavior. It provides a simple way to configure settings for such things as: Upload DirectoriesLog ErrorsMaximum Script execution timeFile Upload limit … and so much more. php.ini is the first file PHP looks for when starting up because of the importance of the configuration directives it sets.

However if you make changes to your php.ini, it will requires a server reboot before the changes take effect. A pre-made php.ini file with recommended settings ships with PHP. In this article I’ll give an overview of some important settings I believe you should be concerned with when tweaking your own php.ini file. The location of php.ini depends on the server and how PHP was installed. So let’s begin our tour of the php.ini file, the first stop: the engine directive. PHP Engine engine = On Short Tags short_open_tag = On compared to using full tags: Output Buffering. 10 essential MySQL tools for admins | Networks Asia. 450+ CSS Layouts » HTML & CSS » Design Festival.

d3.js. JavaScript InfoVis Toolkit. Use Appcelerator Titanium to build mobile apps for iPhone & Android and desktop apps for Windows, Mac OS X & Linux from Web technologies. Google Swiffy extension exports Flash to HTML5, ActionScript fans rejoice. PhoneGap. Lots of Flash, Flex, Zend, and PHP samples. Hello AMF What could be better than good old fashioned "hello world? " The "ActionScript" example goes at Zend AMF using a pure ActionScript project. This example uses the Flex framework to connect to that "HelloWorld" PHP class Zend AMF. Sometimes you just need the basics to get you going, and if all the staged builds and various approaches have you down, this is the place to start.

Hello Text You don't see it done too often, but there's no reason that our service calls from Flex have to be XML, SOAP or AMF. Hello XML This is the de facto standard when it comes to services and Flash. Inline You weren't always the magic code man that you are today. Object Yes! Remoting AMF in general likes objects, and Zend AMF is no exception. You say "tomato" and I say "tomato" … Er, something like that. Create your first Flex and Facebook application – Part 1: Build and test locally. When you develop and deploy an app or game on Facebook you need to invoke the Facebook API to login as well as to get details about the user, friends, photos, and other information. There are currently several official SDKs that you can use to perform such tasks via the Facebook Graph API. This article will guide you through the basics of using the JavaScript SDK with ActionScript 3. The Facebook API is simple and supports rapid extensibility without API changes, via the Graph API.

A good place to begin is with these three Facebook JavaScript API calls: FB.init – initialize Facebook APIFB.login - login to FacebookFB.api - perform a Graph API call on Facebook You can call the JavaScript wrappers from ActionScript using flash.external.ExternalInterface. This provides access to the Facebook API from the Flash runtime and enables you to be always up-to-date whenever Facebook changes or updates their official JavaScript APIs (see Figure 1).

Figure 1. Run the app. Figure 2. Facebook-actionscript-api - Adobe ActionScript 3 SDK for Facebook Platform. The new Adobe ActionScript 3 SDK for Facebook Platform API, fully supported by Facebook and Adobe, makes it easy to build applications that combine the strengths of the Flash Platform. Developed by gskinner.com, this class library facilitates the development of Flash Platform applications that communicate with Facebook using the OpenGraph API. The Adobe Flash Platform and Facebook Platform provide the ideal solution for building rich, social experiences on the web. Flash is available on more than 98% of Internet-connected PCs, so people can immediately access the applications, content, and video that enable social interactions. The Facebook Platform is used by millions of people everyday to connect and share with the people in their lives. Together, both platforms allow you to: Share: Create rich interactions for users to share with friends.

Getting Started For tutorials, articles, and videos on using the new API, visit the Facebook page on the Adobe Developer Center. Project History.

Reference

Library. XeerSoft. Resources. Windows. Thunderbird.