Sunday, May 12, 2019

Hatten Property in Melaka (Buyers Feedback)

This post is about Hatten Property which is the developer for the Element Mall, Vedro Mall, Harbour City, SilverScape, Imperio, Pahlawan,.Hatten Hotel and more...


The CEO of Hatten Group Sdn Bhd is Dato Colin Tan.

What do you think about the development projects from Hatten in Melaka? Share your thoughts in the Comment section.

Saturday, September 21, 2013

EXCEL Text/CSV File Import: How to prevent Excel from converting a text value to numeric value

Came across this irritating problem. I have a text file (csv) that I want to import into excel. Some of the columns in the text are numbers but they have leading zeros.
For example:
UserID,UserName,UserAge
00123,TestUser01,21
01221,User02,23

When you import such a text file into Excel, it will convert the UserID into NUMERIC value instead of a TEXT value. Thus resulting in the truncation of the leading zero.

This is also true when you are trying to import a DATE value. Excel will automatically convert it into a date, but if your text file does not use the standard MM/DD/YYYY format, it will screw up.

To prevent Excel from automatically converting these data, you will need to tell Excel to maintain them as TEXT field. To do this, put the text value into a ="" qualifier. This is what you do in the .csv file:

UserID,UserName,UserAge
="00123",TestUser01,21
="01221",User02,23

When you import it, the 00123 will remain as 00123. Or if it is a custom date field, it will remain as text value.

Hope this helps someone out there. You can always contact me at joseph.lee (at) f s.com.my (it is done this way purposely from preventing spam email crawler).

Wednesday, September 18, 2013

MQL4 (Forex): EA to show Price Range of Currency Pair

Ever wanted to know what is the maximum price range for a particular currency pair?
For example: You want to know the largest/average monthly price range for GBPUSD for the past 12 months?

Here's a code for this. I've also added the LongSwap and ShortSwap interests. For those who are looking for a cross-broker Swap Hedge (one-side pay swap interest, one-side do not charge swap interest), this is useful to know which currency pair pays the highest interest.

I've also included a SwpIndex especially for those who are exploring the Interest Swap Hedging trying to figure out which currency pair is the best for that purpose. Basically, it takes into consideration the Interest Swap paid/charge, the longest price range for that period and also the (current) spread. These are the factors that determine the most suitable pair for this purpose.

Drop this EA on each of the currency pair chart in MT4 (MetaTrader 4).

//+------------------------------------------------------------------+
//|                                            PriceRangeOfChart.mq4 |
//|                                             http://www.fs.com.my |
//+------------------------------------------------------------------+
#property copyright "Copyright 2013, EMail: joseph.lee [a.t.] f s.c o m.my"
#property link      "http://www.fs.com.my"

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
double viPricePerPip = 0.0001;
double viPointsToPip = 1;
string vsLeftTab = "                                   ";

//=================================================
int init() {
if((Digits == 2) || (Digits == 3)) {viPricePerPip = 0.01;}
if((Digits == 3) || (Digits == 5)) {viPointsToPip = 10;}
}
//=================================================
int start() {
int viIndex;
double viLength;
double viStartTick = GetTickCount();

double viSpread = (Ask-Bid)/viPricePerPip;
double viPipValue = MarketInfo( Symbol(), MODE_TICKVALUE) * viPointsToPip;

int pvaiCandlePeriods[5];
pvaiCandlePeriods[0] = 7;
pvaiCandlePeriods[1] = 12;
pvaiCandlePeriods[2] = 14;
pvaiCandlePeriods[3] = 24;
pvaiCandlePeriods[4] = 30;

double viSwapLongInPips = MarketInfo( Symbol(), MODE_SWAPLONG );
double viSwapShortInPips= MarketInfo( Symbol(), MODE_SWAPSHORT );
string pvsDisplay = "";
for(viIndex=0; viIndex viLength = fniGetAvgCandleLen(pvaiCandlePeriods[viIndex]);
pvsDisplay = pvsDisplay + "\n" + vsLeftTab + "Avg Candle (" + pvaiCandlePeriods[viIndex] + "): " + DoubleToStr(viLength,1) + "pips, ";
pvsDisplay = pvsDisplay + "SWPIndex: ";
if( viLength != 0 ) {
pvsDisplay = pvsDisplay + DoubleToStr(1000*viSwapLongInPips/(viLength*viSpread), 2 ) + " / ";
pvsDisplay = pvsDisplay + DoubleToStr(1000*viSwapShortInPips/(viLength*viSpread), 2 );
}
}
pvsDisplay = pvsDisplay + "\n";
for(viIndex=0; viIndex viLength = fniGetLongestCandleLen(pvaiCandlePeriods[viIndex]);
pvsDisplay = pvsDisplay + "\n" + vsLeftTab + "Longest Candle (" + pvaiCandlePeriods[viIndex] + "): " + DoubleToStr(viLength,1) + "pips, ";
pvsDisplay = pvsDisplay + "SWPIndex: ";
if( viLength != 0 ) {
pvsDisplay = pvsDisplay + DoubleToStr(1000*viSwapLongInPips/(viLength*viSpread), 2 ) + " / ";
pvsDisplay = pvsDisplay + DoubleToStr(1000*viSwapShortInPips/(viLength*viSpread), 2 );
}
}

Comment(
 "\n" + vsLeftTab + "Chart Candle LENGTH (" + Symbol() + ")\n" + vsLeftTab + "======================"
, "\n" + vsLeftTab + "Current Ask/Bid: "
+ DoubleToStr( Ask, Digits ) + " / "
+ DoubleToStr( Bid, Digits )
+ " (" + DoubleToStr(viSpread,1) + "pips Spread)"
+ " Pip Value: $" + DoubleToStr(viPipValue,2)
, "\n" + vsLeftTab + "Swap Long/Short: "
+ DoubleToStr(viSwapLongInPips, 2) + "pips / "
+ DoubleToStr(viSwapShortInPips, 2) + "pips"
, "\n"
, pvsDisplay
);
return(0);
}
//====================================================================
double fniGetAvgCandleLen( int pviCount ) {
double viTotalValue = 0.0;
for( int viIndex=1; viIndex<=pviCount; viIndex++ ) {
viTotalValue += (iHigh( Symbol(), 0, viIndex ) - iLow( Symbol(), 0, viIndex ))/viPricePerPip;
}
if( pviCount != 0 )
return( viTotalValue/pviCount );
else
return( 0 );
}
double fniGetLongestCandleLen( int pviCount ) {
double viLength = 0.0;
double viLongest = 0.0;
for( int viIndex=1; viIndex<=pviCount; viIndex++ ) {
viLength = (iHigh( Symbol(), 0, viIndex ) - iLow( Symbol(), 0, viIndex ))/viPricePerPip;
if( viLength > viLongest ) viLongest = viLength;
}
return( viLongest );
}
double fniGetShortestCandleLen( int pviCount ) {
double viLength = 0.0;
double viShortest = 0.0;
for( int viIndex=1; viIndex<=pviCount; viIndex++ ) {
viLength = (iHigh( Symbol(), 0, viIndex ) - iLow( Symbol(), 0, viIndex ))/viPricePerPip;
if( viLength < viShortest ) viShortest = viLength;
}
return( viShortest );
}
//====================================================================

Saturday, February 12, 2011

SQL Server, Multiple-step OLE DB operation generated error.

PROBLEM: SQL Server,  Multiple-step OLE DB operation generated error.

ISSUE: There are some really technical reasons that causes this error message. HOWEVER, most of the time, it is just a simple Data Type error.  A very easily overlooked error would be like:
in the SQL table, a field is defined as DATE, but in the program, you're trying to assign a DATETIME value to it.  Since there is a TIME element in the DATETIME field, it cannot fit into the DATE field in the SQL server thus causing this problem.

RESOLUTION: Change the DATE field in SQL table into DATETME.

Wednesday, November 24, 2010

Soccer Tipster Con-man ( Aldo Ndoka from Albania )

I just want to document it down on the internet in case that someone try to search for this information. It is a about a con-man selling football (Soccer) tips on facebook (goes under the name of Unibet Match, but I guess his name will change too).

This Aldo Ndoka is a con-man selling FIXED match tips (ie, fixed match on football). 10000% accurate FIXED tip with 30 odds (ie, $1 to $30 payout). The price of his tip is in the region of EUR150-EUR200. His level of English is not very good. Basically it is HT/FT kind of combo for non-mainstream leagues.

He claim to be from Sweden, and a few countries and ask for payment via Wester Union only. Payment will be for Aldo Ndoka of Albania (regardless to where he claims he is from).  I am specifically identifying Aldo Ndoka here because this is where the money goes to. He can have different names, but he will run out of names to receive money sooner or later if everyone write down his name on the internet. It's ok if you think me stupid to buy soccer tips. I just want people to know about this.

Below is a transcript of the facebook messages.  Good luck and cheers.




Unibet Match November 21 at 10:56pm Report

You have to go to Western Union say my name , surname , country, and to send me the code of payment to receive my money ! in a manual way
Joseph Lee November 21 at 10:57pm
mmm... in that case, if you buzz me with a fix match on a fri night (GMT +8) for a match on the next da, there is no way I can get money to you ...
Unibet Match November 21 at 11:14pm Report
FIXED MATCH for Tuesday 23.11.2010
Odd=30.00
Price=200 Euro
Payment=Western Union

Name=Aldo
Surname=Ndoka
Country=Albania
Joseph Lee November 22 at 4:29pm
Sent Western Union as spoken.
I sent EUR220 instead of EUR200. Take it as credit. If you're good, we can do more business and we can deduct from it later.

Sender:
MTCN: 495-070-1068
TOTAL AMOUNT: EUR 220
-------------------
Exchange Rate: 0.22877930
Send Charge: MYR100
Total: (MYR 1,061.63)
Unibet Match November 22 at 5:00pm Report
Ok our deal is completed now. My FIXED is tomorrow on Tuesday and starts on 20:45 . I will send my fixed about 15:00 hr today !!
Unibet Match November 23 at 12:32am Report
My FIXED MATCH for Tuesday 23.11.2010 is :
England League 1
Time=20:45
Peterborough - Leyton Orient
Tip=2/1
Odd=30.00
Stake=100 %

This match is FIXED and please don't share with anyone !!
Our deal is completed now ! Good Luck tomorrow !!
Everything is okay now ??
Joseph Lee November 24 at 10:01am
your tip didn't work. I lost almost EUR2,000 ...
Unibet Match November 24 at 7:36pm Report
I am really sorry my friend, i couldn't inform you that i received new matches with odd=30 with email , i received Barnet - Gillingham 1/2 and passed very easy !!! I understand you very good, and i am so sorry with you ..
Joseph Lee November 24 at 8:35pm
you told me it is 10,000% accurate and it has NEVER go wrong before.
I am upset. You have to make it up to me.
Unibet Match November 24 at 9:05pm Report
I am so sorry with you, i am furious too, i lost 4700 Euro !!!
I promise if you take my next FIXED i will give 1 more match free with Odd=15 to repay that mean : You buy Odd=30 and will get free Odd=15 , i promise if i fail again this time, i will send you 2000 Euro !!!
You decide ... my offer is great ...
Joseph Lee November 24 at 9:16pm
I won't pay you anymore coz you told me it is 10000% at the first place. When you want to sell your tip to me, you are so confident. But now, I am not confident with you, even if you tell me it is 1,000,000% accurate.

You have to give me 2 ACCURATE tip to cover back my losses. I do not want your EUR2,000 because you can just run away. I want 2 more of your ACCURATE tip so I can make back my money. Even if it is Odd 10.

Otherwise, you're just a con-man, cheating people.
Joseph Lee November 24 at 9:16pm
You have to give me 2 ACCURATE tips FREE so I can win back my money. and make sure it is ACCURATE!
Unibet Match November 24 at 9:20pm Report
Sorry , i can't accept insults because i am 33 years married and i am serious person, but i promised man if you take my next you will have 1 more odd=14 free as a repay for last deal !
You decide ....
Joseph Lee November 24 at 9:23pm
that means you're not even confident with your own tip. You don't dare to prove that your tip is accurate even after you sold me bad tip! If you are so sure of your tip and that you've NEVER lost before, you should give me your next tip for FREE to make sure I earn back my money.
Unibet Match November 24 at 9:37pm Report
My friend i am sorry i can't offer my FIXED MATCH with Odd=14 or Odd=30 without money because for Odd=14 i pay over 800 Euro to have the info and for Odd=30 i pay over 2500 Euro to UNIBET BETTING COMPANY have the info and i am monitoring all time from Unibet Betting Company here and i can't do nothing to break their rules !!! Do you understand me ?
Joseph Lee November 24 at 9:44pm
It is obvious that you're a con-man ALDO NDOKA of Albania.
I paid you EUR220 for your 10,000% accurate fixed tip which you have never lost before. The tip you sold me failed. You do not dare to give me another free tip so I can make back my money (even though you are so sure that this is a special case that you tip failed. But instead want me to pay you more money to buy more tip from you.

Obviously a con-job. I will tell everyone I know in the betting world about you Aldo Ndoka.
Unibet Match November 24 at 9:47pm Report
No my real name is Fadil Hoxha and i live in Sweden, the name that i send you was not correct i tried to joke with you and i won, cry baby vry, i didn't know that you were a stupid person, ahahahaahahaha i am enjoying this situation !! My Friend Henrik Svensson want to talk with you will you accept it ? He is from MALMO ??? REspond me ...
Unibet Match November 24 at 9:50pm Report
You have my passport you can do what you want with it no problem for me, did you really send that money ? I didn't know that you are a big stupid !!!!!!!
Joseph Lee November 24 at 9:53pm
oh well, at least I know for sure you're a con-man. you have a nice day.
Unibet Match November 24 at 9:54pm Report
I don't have time to lose, bye
Joseph Lee November 24 at 10:01pm
:D nah, you probably conned someone to give you that identity card... I'd go with Aldo Ndoka of Albania. Will probably just publish it over the internet. So, at least you won't be able to receive money from that name/country anymore. Good luck. Bye
Unibet Match November 24 at 10:21pm Report
I was joking jajajajajjjjajjaaja !!!!!!!!!!!!

you can do what you want ..............

Thursday, October 28, 2010

Really Cheap Cell Phones

I have been running around trying to find a cheap phone to double up as my support lines. I hate it when ppl start calling me for support with my primary line. Have been thinking of a cheap motorolla phone. My previous motorolla phone have lasted me for like past 8 years and it is still working!!  I cannot believe it. Anyway, I bump into this http://www.cheap-electronic-store.com/deptCellPhones.asp which sells some really neat stuff.  I am quite interested with the Android phones. There is 1 that's pretty cheap!  maybe I can now start to afford these stuff. While I'm at it, maybe learn up Android programming as well! *lol*  Too bad they don't carry those nifty Made in China iPhones. It would be nice, but then again, not sure of the legality of that. Anyway, I like some the dual sim phones over there too.

Monday, October 18, 2010

SQL ERROR: Cannot create new transaction because capacity was exceeded

PROBLEM:
I get this error: Cannot create new transaction because capacity was exceeded. when I do an ADODB BeginTrans.

SOLUTION:
I do not understand why, but apparently, it is because the cursor adUseServer doesn't seems to support it. I have to switch to adUseClient for the purpose of the BeginTrans/Commit; and later switch back to adUseServer for regular statements.

ENVIRONMENT:
I uses MDAC 2.8 on Microsoft SQL Server 2008 and ASPX. I notice this happens after I apply some patch on the Windows 2008 Web Edition.