Last week I released new online service: MD5 Online.
It provides online encryption and decryption functionality of MD5 hashes.
09 October, 2008
20 September, 2008
Flex - autoscrolable text area
Need TextArea with automatic scrolling to bottom?
This is not trivial, but simple:
emc\components\AutoScrollableTextArea.as
For example, it is useful for outputting log information.
This is not trivial, but simple:
emc\components\AutoScrollableTextArea.as
package emc.components {
import mx.controls.TextArea;
public class AutoScrollableTextArea extends TextArea {
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);
verticalScrollPosition = textField.numLines;
}
}
}For example, it is useful for outputting log information.
18 September, 2008
PHP - roots list
Unfortunately, I don't know another way how to resolve all roots (drives) under Windows:
Somebody know?
public function getRoots() {
$roots = array();
for ($i='A'; $i<'Z'; $i++) {
$disk=$i.':\\';
if (is_dir($disk) && is_readable($disk))
$roots[] = $disk;
}
return $roots;
}
Somebody know?
Namespaces for custom Flex components
Flex (MXML) allow to declare custom components via xmlns declaration.
Like this:
This way is useful when amount of custom components not too much and all components are located in the one or two packages.
But what about real namespaces like in Flex itself ("xmlns:mx="http://www.adobe.com/2006/mxml"); for huge amount of components?
It is possible to consolidate declaration of all components in the single file.
Like this:
manifest.xml
How do you like it?
Like this:
<mx:Box xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:emc="emc.components.navigator.*">
This way is useful when amount of custom components not too much and all components are located in the one or two packages.
But what about real namespaces like in Flex itself ("xmlns:mx="http://www.adobe.com/2006/mxml"); for huge amount of components?
It is possible to consolidate declaration of all components in the single file.
Like this:
manifest.xml
<?xml version="1.0"?>put this file into the project sources directory and add this argument to the MXML compiler:
<componentPackage>
<component id="Navigator" class="emc.components.navigator.Navigator"/>
<component id="Editor" class="emc.components.editor.Editor"/>
<component id="Console" class="emc.components.console.Console"/>
<component id="SmartTruncableLabel" class="emc.components.SmartTruncableLabel"/>
<component id="AutoScrollableTextArea" class="emc.components.AutoScrollableTextArea"/>
</componentPackage>
-namespace=http://xantorohara.110mb.com/emc,sources/manifest.xmland then use this components in the MXML files via this declaration:
<mx:Box xmlns:mx="http://www.adobe.com/2006/mxml"and insert component into your application:
xmlns:emc="http://xantorohara.110mb.com/emc">
...
<emc:SmartTruncableLabel id="titleLabel" styleName="filePanelTitleLabel" width="100%" />
...
How do you like it?
Simple URL rewrite rule for Apache
These strings in the ".htaccess" file redirect HTTP query from "worker.xml" file to "worker.php":
So, it is possible to create XML (or another) facade around PHP (or another) server-side implementation.
RewriteEngine on
RewriteBase /worker
RewriteRule worker.xml worker.php
So, it is possible to create XML (or another) facade around PHP (or another) server-side implementation.
Subscribe to:
Posts (Atom)