tag:blogger.com,1999:blog-78347225273191040462023-12-13T03:54:44.785+08:00Nekyouto-TechWhy 'Nekyouto'?
My parents had been mentioning that I had the characteristics of a cat, which is also known as 'Neko' in Japanese. As for 'Kyouto'(京都), it was my favorite city in Japan. Hence by combining 'Neko' and 'Kyouto', you will get 'Nekyouto'. There are also some insignificance reasons behind the name 'Nekyouto'. For example, the last character in my chinese name was pronounced as 'Makoto'(誠) in Japanese.nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.comBlogger165125tag:blogger.com,1999:blog-7834722527319104046.post-10306280992168879422015-08-31T23:02:00.001+08:002015-08-31T23:04:29.220+08:002nd last of the year 2015....<p>Less than a week to the 2nd last IT Show for the year 2015. And have you prepared your shopping list...?</p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><a class="spicebox" title="COMEX 2015" href="https://1.bp.blogspot.com/-O_2FhoPcKjY/VeRpnpjKqCI/AAAAAAABpQk/t_rdDIgYe6c/s800-Ic42-Ic42/download.png" imageanchor="1" ><img border="0" src="https://1.bp.blogspot.com/-O_2FhoPcKjY/VeRpnpjKqCI/AAAAAAABpQk/t_rdDIgYe6c/s144-Ic42-Ic42/download.png" /></a></td></tr><tr><td align="center" valign="middle">
Image taken from 'COMEX 2015' website.<br><br>
By the way, by accessing the official website of 'COMEX 2015', you can<br>
also gain access to information like, 'How to get there', 'The floor plan',<br>
'Contests', etc...<br>
</td></tr></table><br>
<b>Venue:</b><br><ul><li><b>Date:</b> 3 - 6 Sep 2015</li><li><b>Opening Hours:</b> Level 3: 11am to 9pm<br> Level 4 & 6: 12pm to 9pm</li><li><b>Location:</b> SUNTEC Singapore Convention & Exhibition Centre</li></ul><br>
* Click <b><a target="_blank" href="http://www.comexshow.com.sg/">here</a></b> to find out more about 'COMEX 2015'.<br>
^ Click <b><a target="_blank" href="http://itfairsg.com/comex2015/">here</a></b> for the unofficial 'COMEX 2015' site.<br>
(You can gain access to all the pricelist of all the Exhibitor @ 'COMEX 2015'.<br>
Although currently there isn't a lot but the list will gradually increase over<br>
the next few days.)nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-53451717026194638032015-06-17T00:00:00.000+08:002015-06-17T00:00:04.067+08:00Android: Handling ByteBuffer<p>In case you are given a structured byteBuffer and you have to cipher the contents of it, here's a quick start up walk through to it.</p>
<pre class="brush:java;">
//To get relative positioning variables
short version = byteBufferData.getShort();
//Besides for getShort(), there's getInt(), getLong(),
//getDouble(), getChar(). getFloat()
//Or you can use the following to indicate the
//position you want to start to read from
//short shortVar = byteBufferData.getShort(0);
//but if you use getShort() without any parameters,
//it will increase the current position of the
//byteBuffer too. Depending on the function used,
//the position will be increase differently.
//E.g. getChar(), getShort(), increases by 2
//getInt(), getFloat(), increases by 4
//getDouble, getLong(), increases by 8
//But what if there's a String of a certain length?
//For example, you know that the length of the string
//will be 5. You would need to create the corresponding
//byte Array first
final byte[] bytes = new byte[5];
//then you will get the byte Array that matches the length
data.get(bytes);
//then you can pass the byte Array into a String and Voila!!!
//there you go, a String pulled out from the ByteBuffer
String filename = new String(bytes);
//You can use the same steps in the above to control/store
//binary data for other types of Object too. :)
</pre>
* Click <b><a target="_blank" href="http://developer.android.com/reference/java/nio/ByteBuffer.html">here</a></b> to find about the different functions and properties of the 'ByteBuffer' class in<br> 'Android'.nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-6016763210884946062015-03-18T01:11:00.001+08:002015-08-31T22:53:34.584+08:00The first for the year 2015...<p>Less than 24 hours to the first IT Show for the year 2015. Are you drooling or what... Unlike last year, this year it has moved back to 'SUNTEC Singapore Convention & Exhibition Centre'. </p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><a class="spicebox" title="IT Show 2015" href="https://1.bp.blogspot.com/-IG_Ad0BZgt4/VQhd2gE-_9I/AAAAAAAA7Ds/8wJuVdtdjsA/s800/download.png" imageanchor="1" ><img border="0" src="https://1.bp.blogspot.com/-IG_Ad0BZgt4/VQhd2gE-_9I/AAAAAAAA7Ds/8wJuVdtdjsA/s320/download.png" /></a></td></tr><tr><td align="center" valign="middle">
Image taken from 'IT Show 2015' website.<br><br>
By the way, by accessing the official website of 'IT Show 2015', you can<br>
also gain access to information like, 'How to get there', 'The floor plan',<br>
'Contests', etc...<br>
</td></tr></table><br>
<b>Venue:</b><br><ul><li><b>Date:</b> 19 - 22 Mar 2015</li><li><b>Opening Hours:</b> Level 3: 11am to 9pm<br> Level 4 & 6: 12pm to 9pm</li><li><b>Location:</b> SUNTEC Singapore Convention & Exhibition Centre</li></ul><br>
* Click <b><a target="_blank" href="http://www.itshow.com.sg/">here</a></b> to find out more about 'IT Show 2015'.<br>
^ Click <b><a target="_blank" href="http://itfairsg.com/itshow2015/">here</a></b> for the unofficial 'IT Show 2015' site.<br>
(You can gain access to all the pricelist of all the Exhibitor @ 'IT Show 2014'.<br>
Although currently there isn't a lot but the list will gradually increase over<br>
the next few days.)nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-19577781844450381252015-03-08T03:00:00.003+08:002015-03-08T03:02:28.496+08:00Javascript: Text file saving workaround for ie8<p>One might not believe it but according to the statistics on Netmarketshare.com, it shows that Internet Explorer 8 still holds close to 20% of the market share in the browser world. Therefore, you might be coming across tricky situations where there is a need to save some data from the browser into a text file and here's a possible workaround for ie8.</p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><iframe width="100%" height="300" src="http://jsfiddle.net/nekyouto/gokpfr00/embedded/result,js,html/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></td></tr></table><br>
* Click <b><a target="_blank" href="https://www.netmarketshare.com/browser-market-share.aspx?qprid=2&qpcustomd=0">here</a></b> for the statistics taken from Netmarketshare.com.<br>
^ Click <b><a target="_blank" href="https://jsfiddle.net/nekyouto/gokpfr00/">here</a></b> to access the demo that I have created on 'JSFiddle'.<br>
~ Click <b><a target="_blank" href="http://jsfiddle.net/">here</a></b> to test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code<br> editor.nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-9108362316972377032015-01-09T01:54:00.000+08:002015-01-09T01:54:00.111+08:00Android: Taking control of the orientation...<p>It can be pretty irritating when you have a mixture of screens that should be only be appearing in a Potrait or a Landscape orientation only. Therefore here's a quick demo to show you how you can take control of the orientation of your Android App.</p>
Here's the source code of the Main Activity of the Android Application - MainActivity.java
<pre class="brush:java;">
package com.nekyoutoTech.controloverorientation;
import android.app.Activity;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
public class MainActivity extends Activity {
//Dummy Array of Buttons
private Button[] btns = new Button[5];
//Stores a reference of the Application Context
private static Context context;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//Loop through the buttons and assign the Click Listener to them
for(int i = 0; i < 5; i ++){
int resID = getResources().getIdentifier("btn" + i, "id", getPackageName());
btns[i] = (Button) findViewById(resID);
btns[i].setOnClickListener(btnClickListener);
}
context = this.getApplicationContext();
}
/**
* Upon clicking on any of the buttons
*/
OnClickListener btnClickListener = new OnClickListener(){
@Override
public void onClick(View v) {
//Get the String of the button first
Button btn = (Button) v;
String text = (String) btn.getText();
//Depending on the button that was click, let's select the orientation
//that we would want to set for the app.
int orientation;
if (context.getResources().getString(R.string.btn0Str).equals(text)) {
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR;
} else if (context.getResources().getString(R.string.btn1Str).equals(text)) {
orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
} else if (context.getResources().getString(R.string.btn2Str).equals(text)) {
orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
} else if (context.getResources().getString(R.string.btn3Str).equals(text)) {
orientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
} else if (context.getResources().getString(R.string.btn4Str).equals(text)) {
orientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
} else {
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR;
}
//Let's set the orientation of the app now.
setRequestedOrientation(orientation);
}
};
}
</pre>
* Click <b><a target="_blank" href="http://www.mediafire.com/download/fectclrbhn94rp7/ControlOverOrientation.zip">here</a></b> for the source files of the project.<br>nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-66011681871165999872014-11-25T23:01:00.000+08:002014-11-25T23:07:44.080+08:00Javascript: Cloning an object...<p>In Case, you need to do a complete clone of an object in Javascript and you want the original to remain unaffected, then you probably can give this method a go. :)</p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><iframe width="100%" height="300" src="http://jsfiddle.net/nekyouto/9whdo5f6/embedded/result,js,html/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></td></tr></table><br>
* Click <b><a target="_blank" href="http://jsfiddle.net/nekyouto/9whdo5f6/">here</a></b> to access the demo that I have created on 'JSFiddle'.<br>
^ Click <b><a target="_blank" href="http://jsfiddle.net/">here</a></b> to test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code<br> editor.nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-48208318124912521292014-11-16T00:11:00.000+08:002014-11-16T00:11:32.349+08:00Towards the end of 2014...<p>Less than 8 more weeks to the end of 2014. And it's time to start the countdown for the last IT Show for the year 2014...</p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><a href="http://www.sitex.com.sg/" imageanchor="1" ><img border="0" src="https://1.bp.blogspot.com/-8r5vakqY2U8/VGY_HSTQR-I/AAAAAAAA5pU/PRQpdHQ0fNM/s320/2014banner.png" /></a></td></tr><tr><td align="center" valign="middle">
Image taken from 'SITEX 2014' website.<br><br>
The venue for the upcoming event is pretty far, but it's<br>
worth travelling all the way down. As compared to the<br>
venue at 'Suntec Convention & Exhibition Centre', I prefer<br>
the huge spacious space at Singapore Expo. Most importantly,<br>
I can roam around the place freely and quickly, whhich is a<br>
very big (+). :)
</td></tr></table>
<b>Venue:</b><br><ul><li><b>Date:</b> 27 - 30 November 2014</li><li><b>Opening Hours:</b> 11am to 9pm</li><li><b>Venue:</b> Singapore Expo Convention & Exhibition Centre <br> Halls 5 & 6</li></ul><br>
* Click <b><a target="_blank" href="http://www.sitex.com.sg/">here</a></b> to find out more about 'SITEX 2014'.<br>
^ Click <b><a target="_blank" href="https://www.facebook.com/SITEXYourDigitalPlayground">here</a></b> for the Facebook page of 'SITEX 2014' site.<br>
~ Click <b><a target="_blank" href="http://itfairsg.com/">here</a></b> for the unofficial 'SITEX 2014' site.<br>
(You can gain access to all the pricelist of all the Exhibitor @ 'SITEX 2014'.<br>
Although it isn't available yet but it will be populated with lots of price lists and<br>
brochure as the 'show' approaches.)nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com2tag:blogger.com,1999:blog-7834722527319104046.post-42488570642339713702014-11-09T01:09:00.000+08:002014-11-09T01:09:48.041+08:00Javascript: Some useful sites that helps.<p>Frankly speaking, I don't have a fantastic memory and in case, you don't have a fantastic memory, you probably can use the following sites to search for useful examples and references. Even though these sites doesn't provide an example for all everything, but it's a great place to start searching.</p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><a href="http://www.w3schools.com/js/" imageanchor="1" ><img border="0" src="https://1.bp.blogspot.com/-vl3yTHqVTeg/VFz5Rnw4QOI/AAAAAAAA5oo/NjKnM2x3c-4/s320/w3logotest2.png" /></a></td></tr><tr><td align="center" valign="middle">
<b><a target="_blank" href="http://www.w3schools.com/js/">W3Schools</a></b><br>
This has been around for quite some time.<br>
Not only it covers 'Javascript', it also covers coding environment<br>
like 'PHP', 'SQL', 'ASP.NET', etc... Though most of the time it<br>
covers only the basic stuff, but it's a great place to get you<br>
started.</td></tr></table><br>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><a href="http://www.javascripture.com/" imageanchor="1" ><img border="0" src="https://1.bp.blogspot.com/-h9Prt-CqyaA/VFz5Rm9dhBI/AAAAAAAA5ok/nVYkdF2vh5s/s320/javaScripture.png" /></a></td></tr><tr><td align="center" valign="middle">
<b><a target="_blank" href="http://www.javascripture.com/">JavaScripture</a></b><br>
This covers JavaScript only. But with the number of examples that<br>
was provided on the site itself to demonstrate the usage of the<br>
different types of JavaScript syntax, makes this a pretty good<br>
place to start searching.</td></tr></table><br>nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-65252251868719208192014-10-26T00:18:00.000+08:002014-10-26T00:18:40.165+08:00Apache Ant: Pushing your Ant script to a whole new level...<p>If you have been using Apache Ant quite a bit, you will soon realize that it can be pretty annoying at times. You couldn't open up and read a file, you couldn't create Arrays, etc... Therefore there's actually a way to work around it. You can actually use Javascript + Java inside the Ant script environment. And on top of that you can actually manipulate simple basic Ant variables in the Javascript + Java environment.</p>
<pre class="brush:xml;">
<macrodef name="getIndexHtmlContents">
<sequential>
<script language="javascript">
<![CDATA[
//Import the necessary Java classes
importClass(java.io.File);
importClass(java.io.FileReader);
importClass(java.io.BufferedReader);
//We will be reading the value from the Ant Project Property 'filenameProp'
var filenameProp = GWR.getProperty("filenameProp");
//Then we will be using BufferedReader and FileReader to read the contents of the file
var reader = new BufferedReader(new FileReader(new File(filenameProp)));
//Next we will loop through all the contents of the file and store it in a temporary variable
var sCurrentLine;
var strEverything = "";
while ((sCurrentLine = reader.readLine()) != null) {
strEverything += sCurrentLine;
}
//We will printout the contents of the file/temporary variable on the ant console output
println(strEverything);
//Writing the value of the temporary variable and saing it in the Ant Project Property 'fileContents'
GWR.setProperty("fileContents", strEverything);
]]>
</script>
</sequential>
</macrodef>
</pre>
Though you have specified that you will be writing some script in 'Javascript' syntax, it actually allows Java codes to be written inside that <script> block too.<br><br>
* Click <b><a target="_blank" href="http://ant.apache.org/">here</a></b> to find out more about 'Apache Ant'.<br>nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-4109671323603768532014-10-17T02:33:00.000+08:002014-10-17T02:35:22.779+08:00Linux: Mass find and replace a folder of files<p>In the Linux environment, it is pretty easy to loop through a particular type of files to find and replace a particular string using shell script. I hope this helps.</p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle">The following will give you an idea how to get it done.<br>
You need to replace all the {value} with the corresponding values.</td></tr></table>
<pre class="brush:bash;">
#!/bin/bash
varReplace={string_to_replace}
find ./{the_folder}/ -name \*.{file_extension} -type f -print0 | while read -d $'\0' file; do
echo "Processing $file"
sed -i 's/{string_to_look_for}/'$varReplace'/g' $file
done
</pre>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle">The following example will go through all the files with extension (.js)<br>
in the folder 'output', find the string '{my_version}' and replace it with<br>
the string 'v1.0.122'.</td></tr></table>
<pre class="brush:bash;">
#!/bin/bash
varReplace=v1.0.122
find ./output/ -name \*.js -type f -print0 | while read -d $'\0' file; do
echo "Processing $file"
sed -i 's/{my_version}/'$varReplace'/g' $file
done
</pre>nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-72683839820589718792014-10-10T23:48:00.000+08:002014-10-10T23:48:09.594+08:00Simple Javascript Timer Implementation<p>Well basically this is a post meant for myself. I keep forgetting how to get this done. Basically this is a simple implementation of a Timer in Javascript.</p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><iframe width="100%" height="300" src="http://jsfiddle.net/nekyouto/gj2wL0nL/embedded/result,js,html,css/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></td></tr></table><br>
* Click <b><a target="_blank" href="http://jsfiddle.net/nekyouto/gj2wL0nL/">here</a></b> to access the demo that I have created on 'JSFiddle'.<br>
^ Click <b><a target="_blank" href="http://jsfiddle.net/">here</a></b> to test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code<br> editor.nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-70514616098800498262014-10-03T01:23:00.000+08:002014-10-03T01:23:56.231+08:00AngularJS: Input type number and maxlength fix<p>Well, there might be situations that you need to limit the number of characters that you are allowing the user to enter in a numerical text field. Therefore, here's a fix for angularJS.</p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><iframe width="100%" height="300" src="http://jsfiddle.net/nekyouto/a1tg1vyo/embedded/result,js,html,css/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></td></tr></table><br>
* Click <b><a target="_blank" href="http://jsfiddle.net/nekyouto/a1tg1vyo/">here</a></b> to access the demo that I have created on 'JSFiddle'.<br>
^ Click <b><a target="_blank" href="http://jsfiddle.net/">here</a></b> to test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code<br> editor.nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com3tag:blogger.com,1999:blog-7834722527319104046.post-9603436668070512602014-09-28T23:11:00.000+08:002014-09-28T23:11:11.009+08:00AngularJS: ng-repeat with conditioning styling<p>Well, in order to reduce the amount of work, you might be using quite a bit of 'ng-repeat' in your views/html files that uses angularJS. However, there might be a need to style the individual items differently. Therefore...</p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><iframe width="100%" height="300" src="http://jsfiddle.net/nekyouto/5qwx46rw/embedded/result,js,html,css/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></td></tr></table><br>
* Click <b><a target="_blank" href="http://jsfiddle.net/nekyouto/5qwx46rw/">here</a></b> to access the demo that I have created on 'JSFiddle'.<br>
^ Click <b><a target="_blank" href="http://jsfiddle.net/">here</a></b> to test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code<br> editor.nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com1tag:blogger.com,1999:blog-7834722527319104046.post-73456754314192409622014-09-20T21:21:00.000+08:002014-09-20T21:21:28.513+08:00Problem opening an image with alpha transparent channel<p>There might be situations that you might be opening up a png file that was created by someone else and you have to edit it. So here's the question, how can you workaround the problem?</p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><a class="spicebox" title="Default Image" href="https://1.bp.blogspot.com/-R7VhFyAZsEU/VBxWAfh18rI/AAAAAAAA4-s/3gzsYbNMHY4/s800/bg.png" imageanchor="1" ><img border="0" src="https://1.bp.blogspot.com/-R7VhFyAZsEU/VBxWAfh18rI/AAAAAAAA4-s/3gzsYbNMHY4/s144/bg.png" /></a></td></tr><tr><td align="center" valign="middle">
You have a png like the above.</td></tr></table><br>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><a class="spicebox" title="Photoshop result" href="https://1.bp.blogspot.com/-QC5fB9v9Z98/VBxWAAUKuOI/AAAAAAAA4-o/X0Sb87kS6c4/s800/bg-bad.png" imageanchor="1" ><img border="0" src="https://1.bp.blogspot.com/-QC5fB9v9Z98/VBxWAAUKuOI/AAAAAAAA4-o/X0Sb87kS6c4/s144/bg-bad.png" /></a></td></tr><tr><td align="center" valign="middle">
Outcome when you open it using Photoshop.<br>
There's a strange black border around the image.</td></tr></table><br>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle">So here's a workaround for it.<br><br>
First click <b><a target="_blank" href="http://apps.pixlr.com/editor/">here</a></b> to open up 'Photo editor online - Pixlr.com'.<br><br>
Reopen and save the image as a new file.</td></tr></table><br>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><a class="spicebox" title="pixlr.com" href="https://1.bp.blogspot.com/-SRro4IPXNO0/VBxWHc-LFRI/AAAAAAAA4-0/_PUM8W3INtg/s800/bg1.png" imageanchor="1" ><img border="0" src="https://1.bp.blogspot.com/-SRro4IPXNO0/VBxWHc-LFRI/AAAAAAAA4-0/_PUM8W3INtg/s200/bg1.png" /></a></td></tr><tr><td align="center" valign="middle">
This would be the new file that I have created using "Pixlr.com".</td></tr></table><br>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><a class="spicebox" title="pixlr.com" href="https://1.bp.blogspot.com/-SRro4IPXNO0/VBxWHc-LFRI/AAAAAAAA4-0/_PUM8W3INtg/s800/bg1.png" imageanchor="1" ><img border="0" src="https://1.bp.blogspot.com/-SRro4IPXNO0/VBxWHc-LFRI/AAAAAAAA4-0/_PUM8W3INtg/s200/bg1.png" /></a></td></tr><tr><td align="center" valign="middle">
Now, when you open it using Photoshop, you won't be getting anymore<br>
unnecessary black color border. :D Case closed. Happy Days...</td></tr></table><br>
* Click <b><a target="_blank" href="https://pixlr.com/">here</a></b> for the official website of 'Pixlr.com'.nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-73593721988866050932014-07-11T02:00:00.000+08:002014-07-11T02:02:49.115+08:00Devices in the same network...<p>Well, though you might not be doing this frequently, but there might be instance where you might need to scan through the whole network looking for the IP Address of a particular device.</p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle">
I have tried entering the command '<b>arp -a</b>' in command prompt, but<br>
the results ain't as good as the following...</td></tr></table><br>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><a class="spicebox" title="SoftPerfect Research" href="https://1.bp.blogspot.com/-jh-TOQYE7zQ/U77Et-YeqvI/AAAAAAAAsP4/ayuyMciWzuI/s800/softperfect-logo-m.png" imageanchor="1" ><img border="0" src="https://1.bp.blogspot.com/-jh-TOQYE7zQ/U77Et-YeqvI/AAAAAAAAsP4/ayuyMciWzuI/s144/softperfect-logo-m.png" /></a></td></tr><tr><td align="center" valign="middle">
(Logo taken from 'SoftPerfect Research' website.)<br><br>
'SoftPerfect Network Scanner'<br>
As compared to the command '<b>arp -a</b>', this produces a much more<br>
detail results and though there's the troublesome step that requires<br>
you to enter the range of ip that you are scanning, but the results<br>
are far more cleaner and better than the '<b>arp -a</b>' command. :)</td></tr></table><br>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><a class="spicebox" title="SoftPerfect Network Scanner" href="https://1.bp.blogspot.com/-V8yR7W2d3qg/U77RUEx3G4I/AAAAAAAAsQY/1TDnKdhOiN8/s800/main_window.png" imageanchor="1" ><img border="0" src="https://1.bp.blogspot.com/-V8yR7W2d3qg/U77RUEx3G4I/AAAAAAAAsQY/1TDnKdhOiN8/s144/main_window.png" /></a></td><td align="center" valign="middle"><a class="spicebox" title="SoftPerfect Network Scanner" href="https://1.bp.blogspot.com/-SrvYxegSnfM/U77RUdwFdFI/AAAAAAAAsQk/YspRhGx7AY0/s800/main_window2.png" imageanchor="1" ><img border="0" src="https://1.bp.blogspot.com/-SrvYxegSnfM/U77RUdwFdFI/AAAAAAAAsQk/YspRhGx7AY0/s144/main_window2.png" /></a></td></tr><tr><td align="center" valign="middle"><a class="spicebox" title="SoftPerfect Network Scanner" href="https://1.bp.blogspot.com/-rO6T0DW-2ww/U77RUwlLPrI/AAAAAAAAsQo/ZeYgILuYwpw/s800/scr_options3.png" imageanchor="1" ><img border="0" src="https://1.bp.blogspot.com/-rO6T0DW-2ww/U77RUwlLPrI/AAAAAAAAsQo/ZeYgILuYwpw/s144/scr_options3.png" /></a></td><td align="center" valign="middle"><a class="spicebox" title="SoftPerfect Network Scanner" href="https://1.bp.blogspot.com/-FQAPcZNLVHM/U77RUdmXgFI/AAAAAAAAsQg/a2EeFCsY5sE/s800/scr_options2.png" imageanchor="1" ><img border="0" src="https://1.bp.blogspot.com/-FQAPcZNLVHM/U77RUdmXgFI/AAAAAAAAsQg/a2EeFCsY5sE/s144/scr_options2.png" /></a></td></tr><tr><td align="center" valign="middle" colspan="2">
Screengrabs of the software 'SoftPerfect Network Scanner'</td></tr></table><br>
* Click <b><a target="_blank" href="http://www.softperfect.com/products/networkscanner/">here</a></b> to download the software 'SoftPerfect Network Scanner'.<br>
^ Click <b><a target="_blank" href="http://www.softperfect.com/">here</a></b> to find out more about 'SoftPerfect'.nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-8751014572912265512014-07-05T00:23:00.000+08:002014-07-05T00:23:44.209+08:00AngularJS: Simple Debugging...<p>In case you are given an Angular JS based project and you are supposed to do some debugging work, here's a way to get you started with some simple message logging.</p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><iframe width="100%" height="300" src="http://jsfiddle.net/nekyouto/Tz64z/embedded/result,js,html,css/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></td></tr></table><br>
* Click <b><a target="_blank" href="http://jsfiddle.net/nekyouto/Tz64z/">here</a></b> to access the demo that I have created on 'JSFiddle'.<br>
^ Click <b><a target="_blank" href="http://jsfiddle.net/">here</a></b> to test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code<br> editor.nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-79745899001165210872014-06-29T01:48:00.001+08:002014-07-04T23:27:12.305+08:00AngularJS: Simple Animation<p>Here's a simple example on ho to create an animation using AngularJS.</p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><iframe width="100%" height="300" src="http://jsfiddle.net/nekyouto/pLE6E/embedded/result,js,html,css/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></td></tr></table><br>
* Click <b><a target="_blank" href="http://jsfiddle.net/nekyouto/pLE6E/">here</a></b> to access the demo that I have created on 'JSFiddle'.<br>
^ Click <b><a target="_blank" href="http://jsfiddle.net/">here</a></b> to test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code<br> editor.nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-91332406345531033702014-06-21T01:42:00.000+08:002014-06-21T01:43:25.136+08:00Flex: Different FillMode of the Spark Image Component<p>The Flex Spark Image component has this interesting property known as 'FillMode' and this should give you a rough idea what each individual type of 'FillMOde' represents.</p>
Source Code for the main application - 'SimpleImageFillMode.mxml'
<pre class="brush:as3;">
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="100%"
height="100%"
backgroundColor="#CDCDCD">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
[Embed(source="assets/avatar.png")]
[Bindable]
public var imgClass:Class;
]]>
</fx:Script>
<s:VGroup width="100%"
height="100%"
horizontalAlign="center"
verticalAlign="middle">
<s:HGroup horizontalAlign="center"
verticalAlign="middle">
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Label text="Original Image"/>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="450">
<s:Image source="{imgClass}"
width="100"
height="100"/>
</s:HGroup>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle">
<s:HGroup width="150"/>
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Label text="Fill Mode: clip"/>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Label text="Fill Mode: repeat"/>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Label text="Fill Mode: scale"/>
</s:HGroup>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle">
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Label text="Size (80 * 80)"/>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Image source="{imgClass}"
width="80"
height="80"
fillMode="clip"/>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Image source="{imgClass}"
width="80"
height="80"
fillMode="repeat"/>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Image source="{imgClass}"
width="80"
height="80"
fillMode="scale"/>
</s:HGroup>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle">
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Label text="Size (100 * 150)"/>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Image source="{imgClass}"
width="100"
height="150"
fillMode="clip"/>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Image source="{imgClass}"
width="100"
height="150"
fillMode="repeat"/>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Image source="{imgClass}"
width="100"
height="150"
fillMode="scale"/>
</s:HGroup>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle">
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Label text="Size (150 * 100)"/>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Image source="{imgClass}"
width="150"
height="100"
fillMode="clip"/>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Image source="{imgClass}"
width="150"
height="100"
fillMode="repeat"/>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Image source="{imgClass}"
width="150"
height="100"
fillMode="scale"/>
</s:HGroup>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle">
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Label text="Size (150 * 150)"/>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Image source="{imgClass}"
width="150"
height="150"
fillMode="clip"/>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Image source="{imgClass}"
width="150"
height="150"
fillMode="repeat"/>
</s:HGroup>
<s:HGroup horizontalAlign="center"
verticalAlign="middle"
width="150">
<s:Image source="{imgClass}"
width="150"
height="150"
fillMode="scale"/>
</s:HGroup>
</s:HGroup>
</s:VGroup>
</s:Application>
</pre>
* Click <b><a target='_blank' href="http://bestkirdape.freeiz.com/SimpleImageFillMode/">here</a></b> for the demo shown in this post.<br>
^ Click <b><a target="_blank" href="http://www.mediafire.com/download/5351v7ga42mg6p2/SimpleImageFillMode.zip">here</a></b> for the source files for the demo.nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-15368953624599011832014-06-15T23:54:00.002+08:002014-06-15T23:54:27.561+08:00Flex: Hiding the border on a side of a Group...<p>In flex 4, the style 'boderSides' has been taken out, but there's another way to hide the border of a selected side of a box away. And here's a simple example to give you a rough idea on how to get it done. :)</p>
Source Code for the main application - 'SimpleSelectedBorderExample.mxml'
<pre class="brush:as3;">
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
creationComplete="creationCompleteEvent(event)" xmlns:Container="Container.*">
<fx:Script>
<![CDATA[
import Container.SimpleGroup;
import mx.events.FlexEvent;
protected function creationCompleteEvent(e:FlexEvent):void
{
var tempBox:SimpleGroup;
for(var i:int = 0; i < 8; i ++){
for(var j:int = 0; j < 8; j ++){
tempBox = new SimpleGroup();
tempBox.x = i * 50 - 0.5;
tempBox.y = j * 50 - 0.5;
container.addElement(tempBox);
}
}
}
]]>
</fx:Script>
<s:BorderContainer width="100%"
height="100%"
borderVisible="false">
<s:layout>
<s:VerticalLayout verticalAlign="middle"
horizontalAlign="center"/>
</s:layout>
<!-- All the boxes will appear inside this container -->
<s:BorderContainer width="400"
height="400"
id="container"
borderVisible="false"/>
</s:BorderContainer>
</s:Application>
</pre>
Source Code for the Group Class that we are using to repeat the pattern - 'SimpleGroup.mxml'
<pre class="brush:as3;">
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="50"
height="50"
creationComplete="creationCompleteEvent(event)">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
//Are we going to show the left border?
[Bindable]
private var _boolLeft:Boolean = false;
//Are we going to show the right border?
[Bindable]
private var _boolRight:Boolean = false;
//Are we going to show the top border?
[Bindable]
private var _boolTop:Boolean = false;
//Are we going to show the bottom border?
[Bindable]
private var _boolBottom:Boolean = false;
//-1 = border is outside the box
//-0.5 = border is in the middle
//0 = border is inside the box
[Bindable]
private var _typeValue:Number = 0;
//Thickness of the border
[Bindable]
private var _borderThickness:Number = 0;
//Color of the border
[Bindable]
private var _borderColor:uint = 0x333333;
protected function creationCompleteEvent(e:FlexEvent):void
{
//Randomized the showing and hiding of the borders
var rand:Number = Math.round(Math.random());
if(rand == 1){
_boolLeft = true;
}
rand = Math.round(Math.random());
if(rand == 1){
_boolRight = true;
}
rand = Math.round(Math.random());
if(rand == 1){
_boolTop = true;
}
rand = Math.round(Math.random());
if(rand == 1){
_boolBottom = true;
}
_typeValue = Math.round(Math.random() * 2);
if(_typeValue == 1){
_typeValue = -0.5;
}else if(_typeValue == 2){
_typeValue = -1;
}
_borderThickness = Math.round(Math.random() * 2) + 1;
_typeValue = _typeValue * _borderThickness;
}
]]>
</fx:Script>
<!-- Left -->
<s:Line left="{_typeValue}"
top="{_typeValue}"
bottom="{_typeValue}"
visible="{_boolLeft}">
<s:stroke>
<s:SolidColorStroke weight="{_borderThickness}"
color="{_borderColor}"/>
</s:stroke>
</s:Line>
<!-- Bottom -->
<s:Line left="{_typeValue}"
right="{_typeValue}"
bottom="{_typeValue}"
visible="{_boolBottom}">
<s:stroke>
<s:SolidColorStroke weight="{_borderThickness}"
color="{_borderColor}"/>
</s:stroke>
</s:Line>
<!-- Right -->
<s:Line right="{_typeValue}"
top="{_typeValue}"
bottom="{_typeValue}"
visible="{_boolRight}">
<s:stroke>
<s:SolidColorStroke weight="{_borderThickness}"
color="{_borderColor}"/>
</s:stroke>
</s:Line>
<!-- Top -->
<s:Line left="{_typeValue}"
right="{_typeValue}"
top="{_typeValue}"
visible="{_boolTop}">
<s:stroke>
<s:SolidColorStroke weight="{_borderThickness}"
color="{_borderColor}"/>
</s:stroke>
</s:Line>
</s:Group>
</pre>
* Click <b><a target='_blank' href="http://bestkirdape.freeiz.com/SimpleSelectedBorderExample/">here</a></b> for the demo shown in this post.<br>
^ Click <b><a target="_blank" href="http://www.mediafire.com/download/l0zm22c1nscee42/SimpleSelectedBorderExample.zip">here</a></b> for the source files for the demo.nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-83937881610445510222014-06-11T00:44:00.000+08:002014-06-11T00:48:06.699+08:00Disappointed with the last one... I hope that the next one will be better...<p>Went all the way to Expo for the 'PC Show 2014' and this is probably the first time I left a 'PC/IT Show' empty handed... (Not even a single Memory Card...=.=""") Anyway, though this is damn early, but...</p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><a class="spicebox" title="Comex 2014" href="https://1.bp.blogspot.com/-T4yOaF6XXFI/U5NeqDlkKLI/AAAAAAAAsDU/F_OjVBdE0_I/s800/logo_comex_2014.png" imageanchor="1" ><img border="0" src="https://1.bp.blogspot.com/-T4yOaF6XXFI/U5NeqDlkKLI/AAAAAAAAsDU/F_OjVBdE0_I/s144/logo_comex_2014.png" /></a></td></tr><tr><td align="center" valign="middle">
Image taken from 'COMEX 2014' website.<br><br>
And this time round, the location is far more friendlier. It's held at<br>
'Suntec City', which means that you don't need to travel all the way to<br>
'Expo' to purchase all your IT gadgets. By the way, by accessing the<br>
official website of 'COMEX 2014', you can also gain access to<br>
information like, 'How to get there', 'The floor plan', 'On-site and<br>
Online Contests', etc...</td></tr></table><br>
<b>Venue:</b><br><ul><li><b>Date:</b> 28 - 31 August 2014</li><li><b>Opening Hours:</b> 12pm to 9pm</li><li><b>Venue:</b> Suntec Singapore International Convention & Exhibition Centre <br> Levels 4 & 6</li></ul><br>
* Click <b><a target="_blank" href="http://www.comexshow.com.sg/">here</a></b> to find out more about 'COMEX 2014'.<br>
^ Click <b><a target="_blank" href="https://www.facebook.com/ComexITShow">here</a></b> for the Facebook page of 'COMEX 2014' site.<br>
~ Click <b><a target="_blank" href="http://itfairsg.com/">here</a></b> for the unofficial 'COMEX 2014' site.<br>
(You can gain access to all the pricelist of all the Exhibitor @ 'COMEX 2014'.<br>
Although it isn't available yet but it will be populated with lots of price lists and<br>
brochure as the 'show' approaches.)nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-63429064888950502472014-05-29T23:03:00.002+08:002014-05-29T23:03:32.910+08:00AngularJS: IE and inline dynamic style...<p>We saw this interesting bug with AngularJS and inline style with IE browsers. And we finally managed to find a workaround for this problem. And the solution requires ng-style and a separate function. :D</p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><iframe width="100%" height="300" src="http://jsfiddle.net/nekyouto/BYHm5/embedded/result,js,html,css/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></td></tr></table><br>
* Click <b><a target="_blank" href="http://jsfiddle.net/nekyouto/BYHm5/">here</a></b> to access the demo that I have created on 'JSFiddle'.<br>
^ Click <b><a target="_blank" href="http://jsfiddle.net/">here</a></b> to test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code<br> editor.nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com3tag:blogger.com,1999:blog-7834722527319104046.post-1749999080210136282014-05-23T01:03:00.000+08:002014-05-23T01:03:23.615+08:00Flex: Showing and Hiding the Origins of a chart<p>There might be cases where you wanted to show or replace the vertical and horizontal origin's of the chart with a different type of line. Here's a simple example to demo the hiding and showing of the origin of the chart..</p>
<pre class="brush:as3;">
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="completeHandler(event)">
<mx:Script>
<![CDATA[
import mx.charts.HitData;
import mx.charts.series.LineSeries;
import mx.collections.ArrayCollection;
import mx.collections.Sort;
import mx.collections.SortField;
import mx.events.FlexEvent;
import mx.events.ListEvent;
import mx.formatters.DateFormatter;
//Records used in the chart
[Bindable]
private var myData:XML =
<records>
<record>
<x>-7.81</x>
<y>-4.98</y>
</record>
<record>
<x>-2.84</x>
<y>-4.62</y>
</record>
<record>
<x>-8.66</x>
<y>2.52</y>
</record>
<record>
<x>3.56</x>
<y>6.86</y>
</record>
<record>
<x>-9.54</x>
<y>-8.05</y>
</record>
<record>
<x>7.48</x>
<y>0.37</y>
</record>
<record>
<x>9.2</x>
<y>9.5</y>
</record>
<record>
<x>9.32</x>
<y>-1.59</y>
</record>
<record>
<x>1.77</x>
<y>-0.86</y>
</record>
<record>
<x>-8.61</x>
<y>-1.75</y>
</record>
</records>;
private var dateCollection:ArrayCollection;
protected function completeHandler(event:FlexEvent):void
{
// Parsing the xml data into ArrayCollection
var objArray:ArrayCollection = new ArrayCollection();
var tempObj:Object;
for(var i:int = 0; i < myData.record.length(); i ++)
{
tempObj = new Object();
tempObj.x = myData.record[i].x;
tempObj.y = myData.record[i].y;
objArray.addItem(tempObj);
}
// Create the new series and set its properties.
var localSeries:LineSeries = new LineSeries();
localSeries.dataProvider = objArray;
localSeries.yField = "y";
localSeries.xField = "x";
// Back up the current series on the chart.
var currentSeries:Array = mainChart.series;
// Add the new series to the current Array of series.
currentSeries.push(localSeries);
// Add the new Array of series to the chart.
mainChart.series = currentSeries;
}
//We are customizing the datatip / tool tip of the
//chart data.
public function myDataTipFunction(e:HitData):String {
var s:String = "";
s += "x: " + e.item.x + "<br>";
s += "y: " + e.item.y;
return s;
}
]]>
</mx:Script>
<mx:VBox verticalGap="5" width="100%" height="100%"
verticalAlign="middle">
<mx:HBox width="100%" horizontalAlign="center">
<mx:LineChart id="mainChart"
showDataTips="true"
width="95%"
dataTipFunction="myDataTipFunction">
<mx:Stroke weight="2"
alpha="1"
color="#00FF00"
id="horiOriginStroke"/>
<mx:Stroke weight="2"
alpha="1"
color="#FF0000"
id="vertOriginStroke"/>
<mx:backgroundElements>
<mx:GridLines direction="both"
horizontalShowOrigin="{chkHori.selected}"
horizontalOriginStroke="{horiOriginStroke}"
verticalShowOrigin="{chkVert.selected}"
verticalOriginStroke="{vertOriginStroke}"/>
</mx:backgroundElements>
</mx:LineChart>
</mx:HBox>
<mx:HBox width="100%"
horizontalAlign="center">
<mx:CheckBox id="chkHori"
selected="true"
label="Show Horizontal Origin"/>
<mx:CheckBox id="chkVert"
selected="true"
label="Show Vertical Origin"/>
</mx:HBox>
</mx:VBox>
</mx:Application>
</pre>
* Click <b><a target='_blank' href="http://bestkirdape.freeiz.com/SimpleChartOriginAxis/">here</a></b> for the demo shown in this post.<br>
^ Click <b><a target="_blank" href="http://www.mediafire.com/download/46ygvwxe6sdw2n9/SimpleChartOriginAxis.zip">here</a></b> for the source files for the demo.nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-10261020303107093082014-05-16T01:18:00.000+08:002014-05-16T01:18:45.944+08:00AngularJS: 2D Array binding<p>Here's a simple example to demo 2D array binding with AngularJS.</p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><iframe width="100%" height="300" src="http://jsfiddle.net/nekyouto/DkLnx/embedded/result,js,html,css/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></td></tr></table><br>
* Click <b><a target="_blank" href="http://jsfiddle.net/nekyouto/MNC76/">here</a></b> to access the demo that I have created on 'JSFiddle'.<br>
^ Click <b><a target="_blank" href="http://jsfiddle.net/">here</a></b> to test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code<br> editor.nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-9684695910315466382014-05-10T02:00:00.000+08:002014-05-10T02:00:01.368+08:00Playing with Google Search :)<p>Google search isn't just a search tool. It also comes with...</p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><a class="spicebox" title="Calculator" href="https://1.bp.blogspot.com/-UBeuTZm5498/U20UCROMdrI/AAAAAAAAotc/2bWOQofGosg/s800/SNP_676F174E5C6C4FFEC0120BF0BE82030BB3B4_3285000_en_v1.png" imageanchor="1" ><img border="0" src="https://1.bp.blogspot.com/-UBeuTZm5498/U20UCROMdrI/AAAAAAAAotc/2bWOQofGosg/s144/SNP_676F174E5C6C4FFEC0120BF0BE82030BB3B4_3285000_en_v1.png" /></a></td></tr><tr><td align="center" valign="middle">
'Calculator'<br>
Click <b><a target="_blank" href="https://www.google.com/search?q=calculator&oq=calculator&aqs=chrome.0.69i57j69i60j69i65j69i61l2.1044j0&sourceid=chrome&ie=UTF-8&brd=1">here</a></b> to give the 'Calculator' a go.</td></tr></table><br>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"><a class="spicebox" title="Unit Converter" href="https://1.bp.blogspot.com/-OxJSsW3cLRc/U20UCZaFoHI/AAAAAAAAotg/fI6CQtwpEDk/s800/SNP_D6C764E2D25B1E066AE65FE879159F0F7A2D_4488319_en_v1.png" imageanchor="1" ><img border="0" src="https://1.bp.blogspot.com/-OxJSsW3cLRc/U20UCZaFoHI/AAAAAAAAotg/fI6CQtwpEDk/s144/SNP_D6C764E2D25B1E066AE65FE879159F0F7A2D_4488319_en_v1.png" /></a></td></tr><tr><td align="center" valign="middle">
'Unit Converter'<br>
Click <b><a target="_blank" href="https://www.google.com/search?q=unit+converter&oq=unit+converter&aqs=chrome.0.0j5j0l2j69i61j69i62.1256j0&sourceid=chrome&ie=UTF-8&brd=1">here</a></b> to give the 'Unit Converter' a go.</td></tr></table><br>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle">Click <b><a target="_blank" href="https://support.google.com/websearch/topic/4386094?hl=en&ref_topic=3036132">here</a></b> for more interesting search results in Google.</td></tr></table>nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0tag:blogger.com,1999:blog-7834722527319104046.post-34760862993525278632014-04-25T01:36:00.000+08:002014-04-25T01:36:40.444+08:00HTML: Post your data into a popup window<p>Rather than posting the data to a new page, you might need have to post the data to a popup. Therefore, this would help you to get a rough idea on how to do that. (Things get pretty interesting when you learn new stuff everyday. :D)</p>
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" valign="middle"></td></tr><tr><td align="center" valign="middle"></td></tr></table>
Source code of the main html file - index.html
<pre class="brush:html;">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Simple Form</title>
<script language="javascript" type="text/javascript">
function submitForm(formName){
var popupWin = window.open("",formName,"status,height=540,width=500,resizable=yes,scrollbars=yes");
popupWin.focus();
}
</script>
</head>
<body>
<form action="formResults.php" method="post" name="myForm" target="popupWin" onsubmit="javascript:submitForm(this.target);">
Name:<br /><input name="name" type="text" size="50" maxlength="50" /><br />
Address:<br /><input name="address" type="text" size="50"/><br />
<input name="submit" type="submit" value="Submit the form data to a popup"/>
</form>
</body>
</html>
</pre><br>
Here's the simple form that I would be posting the data to - formResults.php
<pre class="brush:php;">
Your name is:
<br />
<?php
echo $_REQUEST["name"]
?>
<br />
<br />
Your address is:
<br />
<?php
echo $_REQUEST["address"]
?>
</pre>
* Click <b><a target='_blank' href="http://bestkirdape.freeiz.com/postFormDataToPopup/">here</a></b> for the demo shown in this post.<br>nekyoutohttp://www.blogger.com/profile/06711471585570952269noreply@blogger.com0