Wednesday, July 11, 2012

IB API, reqMktDataEx : error code 200 no security definition has been found for the request


Have you ever encountered this error? I can't figure out for the life of me what is wrong with my IContract. I've made it exactly as it is on the VB.NET sample they included but I'm still getting "error code 200".

I tried using reqMktData() and thankfully it worked! But I am not satisfied. I want to find out what's wrong with my IContract. Here's the inspection before the parameters are passed to reqMktDataEx()

If you've encountered the same error, please share on how you solved it.

EDIT 5 minutes later:

I solved it damn it.

After calling Tws.CreateContract(), do not change IContract.conId ..

why do I need hours to solve such problems... these guys need to work on their documentation.

=======================
oTws.reqMktDataEx(quote.TickerId, quote.contractInfo, quote.GenericTicks, (int)quote.Snapshot);




+ quote


quote.GenericTicks
string

quote.Snapshot 0 int?

quote.TickerId 1 int
- quote.contractInfo {System.__ComObject} TWSLib.IContract {System.__ComObject}
+ [System.__ComObject] {System.__ComObject} System.__ComObject

comboLegs null dynamic

conId 1 int

currency USD string

exchange SMART string

expiry
string

includeExpired 0 int

localSymbol
string

multiplier
string

primaryExchange NASDAQ string

right
string

secId
string

secIdType
string

secType STK string

strike 0 double

symbol AAPL string

underComp null dynamic
- Dynamic View Expanding the Dynamic View will get the dynamic members for the object

comboLegs null

comboLegsDescrip
System.String

conId 1 System.Int32

currency USD System.String

exchange SMART System.String

expiry
System.String

includeExpired 0 System.Int32

localSymbol
System.String

multiplier
System.String

primaryExchange NASDAQ System.String

right
System.String

secId
System.String

secIdType
System.String

secType STK System.String

strike 0 System.Double

symbol AAPL System.String

underComp null
=======================


IBAPI, TWS API, TWSAPI,

Thursday, June 28, 2012

Is Lazada Philippines a scam?

MY experience purchasing at www.lazada.com.ph . A scam or not?

Update Jul 13:

So in the end, I decided to refund my order since more than a month passed since I paid for the item. It seems like they don't track how my orders have been placed on a particular item so what they have in inventory will not match what is displayed on the website. A TYPICAL CASE OF OVERBOOKING -- similar to what budget airlines do. This is the primary reason why potential lazada.com.ph SHOULD AVOID PURCHASING. Imagine how much hassle it would cost you if you paid for an item but you are kept in the dark whether it will arrive or not -- for more than a month. A call from them would have mitigated my frustration BUT THERE WAS NO CALL NOTIFYING ME THAT I WON'T BE RECEIVING MY ITEM. At first, I had to contact them by email which took 5 days to more than a week before I got a response and some were ignored. I tried their hotline which usually made me wait for 5-10minutes and give a different response every time and different from their online support. Imagine doing this for a month. They promise to call you once they get an update but they never do unless you call them a third time within a day. Holy crap impossible. Online merchants from sulit and tpc do way better than these guys.

When I finally decided to refund the item, they said that it would take 1-3 business days. But really, I had to follow up 3 times and took 5 days for it to be refunded. Add the 3day check clearing time to that and it took a grand total of 8 days. They said that they'll email me a scan of the deposit slip but all that I got is a text email 2 days after the check was deposited in my account.

In the end, I finally bought the item from a merchant in tpc. I had to spend 180p for the shipping and it cost 500p more in total. They have a promo that gives 300 pesos discounts on orders 1200p up. The item I was ordering costs approx 1100k+, so I decided to order another item that costs 350+ so that I can avail of the promo. The thing is that the 300p discount will be divided on the items. The 1100+ item got the 250+ discount and the 350+ item got about 50p discount. I received the 350+ item a week after I paid for the item which is the item I did not really need. And the 1100+ peso item that I really intended to buy did not arrive. I only got the item I did not intend to buy which I paid 300 pesos for. I RECEIVED THE ITEM I DID NOT REALLY WANT, AND PAID FOR IT WHICH WOULD HAVE BEEN ALMOST FREE IF I RECEIVED THE INTENDED ITEM. YES, THAT'S RIGHT. I FEEL LIKE I WAS SCAMMED into buying an item that was supposed to be free.

So, this transaction cost me:

About an hour to pay for the items
Over a month of waiting
Hours emailing support
Hours waiting on their hotline
Mental torture because of missed promises
40% more cash spent on the actual item


Final Verdict on lazada.com.ph:

DEFINITELY AVOID AT ALL COSTS.
*Unless you live in metro manila and you can avail of Cash on Delivery (COD) then you'll have more peace of mind since you won't be charged unless the items arrive. The only case I'll warn you is if they ship the items individually, and the cheaper items arrive first, then you are probably in trouble.



------------------------------

It might be a legit business but god damn are they disorganized. one of the items i ordered didn't arrive because they said that it's out of stock. THEY hAD THE FRIGGIN ITEM LISTED ON THEIR WEBSITE FOR 7 DAYS AFTER  I RECEIVED THE FIRST ITEM SO WHY ARE THEY TELLING ME THAT IT'S OUT OF STOCK. WHY DID THEY HAVE IT LISTED FOR 7 DAYS IF THEY HAVE NO STOCK.

If I were you, look somewhere else. god damn.

Friday, April 27, 2012

FREE Courses from Stanford and other famous universities


More free classes are available from Standford and other famous universities. How I wish these were available during my time at college. They would have been a great supplement to my professors. Maybe you might be wondering why there are still universities while you can attend online. It's not really the lectures, it's the environment in a university that drives people to do go there. Having a place to study and find people to talk to is the best environment for innovation as opposed to being cooped up in a room. It may work for some people but for most it isn't really inefficient. Just imagine the difference between asking an expert and looking through a book for an answer.

Anyway, you can find these free courses on www.udacity.com and coursera.org

Some of the courses available are:


@Udacity.com
cs101: Building a Search Engine
cs212: Design of Computer Programs
cs253: Web Application Engineering
cs262: Programming Languages
cs373: Programming A Robotic Car
cs387: Applied Cryptography


@coursera.org
 Coursera offers a wider variety of courses, not just computer science.  You can see the full list on https://www.coursera.org/courses


Tuesday, March 6, 2012

Globe Tattoo Broadband Bandwidth Download Cap Limit : What is your real speed?

ERRATA: may dagdag palang 699 ang PLDT DSL 1.5mpbs 999 dahil hindi pala ito puwedeng kunin na walang landline. But now, PLDT DSL has a similar offer 1299 1mpbs+landline.

Yes.. May limit, may cap, ang downloads.. according sa TPC thread:

http://www.tipidpc.com/viewtopic.php?tid=255402&page=7

ay meron. confirmed.

2mbps + Landline = 1299
Bandwidth cap: 150GB/month WITHOUT Speedboost
3GB/day WITH Speedboost

Pag na reach mo na ang CAP, 30% na lang ng speed mo so 600kbps. Pero yung iba sabi 300kbps lang daw kahit 2mbps. baka typo lng naman..

2mbps ang globe tapos may landline pa! 1299 lang! ang mura di ba?? mura nga ba?? KASO MAY LIMIT!
1.5mbps PLDT DSL internet lang 999! parang mahal!
anu ba talaga??? mas sulit nga ba ang globe kahit may LIMIT?? o ang PLDT na 1.5mbps pero walang limit???



MONTHLY REAL SPEED COMPUTATION 12hours/day FULL USE.

Hmmn... Kung adik ako...

Assume natin wasak lagi 2mbps dahil may 3 nagamit ng net sa bahay.. 12 hours nag iinternet... everyday..

2mbit / s * 12 hours/day * 60minutes/hour * 60 seconds/minute * 1byte/8bits =  10,800 mbyte/day

Kung 150 gig ang limit... it will take only __ days para maubos.

150,000mbytes / 10800mbyte/day = 13.89 days.

13.89 days lang ubos na ang cap.

so the remaining 16.11 days ay 30% ng 2mbps = 600kbps lang ang speed mo....

so ang totoong speed mo within 30 days ay.....

(16.11 days * 2mpbs * 30% + 13.89 days*2mpbs ) / 30days =  1.2482 mbps

tama ba computation ko??? lewlz... this is an approximation na 12hours lang online.. pano pa kung 24hours bukas pc?? whew. pldt n lng cguro 999 1.5mbps.



24 HOUR/day ONLINE REAL SPEED.



2mbit / s * 24 hours/day * 60minutes/hour * 60 seconds/minute * 1byte/8bits =  21,600 mbytes/day

Cap 150 GB will be expended in ___ days:

150,000mbytes / 21600mbyte/day = 6.94 days.

so the remaining 23.06 days ay 30% ng 2mbps = 600kbps lang ang speed mo....

so ang totoong speed mo within 30 days ay.....

(23.06days * 2mpbs * 30% + 6.94 days*2mpbs ) / 30days =  0.923867 mbps


Ay susmaryosep...... so Kung 24 hours ka online panalo ka pa rin sa PLDT na 1.5mbps.. sheeesh. well sino nga naman ba ang mag aabala magonline 24hours. nangyayari lang to kung tatlo kayo sa bahay tapos relyebo kayo dahil sa trabaho.. sa mga dadownload dyan 10 - 24hours at di naman kailangan ng landline palagay ko mas maigi PLDT DSL 999 1.5mbps all else equal.

Kung ayaw mo macap, dapat ang average hours lang ng download mo per day ay:

5000mbytes / 2megabits/s *8bits/byte* 1minute/60seconds * 1hour/60minutes   = 5.55 hours of full downloads.



Conclusion KO:

GLOBE 1299 2mbps DSL + Landline:
1. Kung di naman kayo paladownload at tamang FB youtube lang less than 6hours/day... ok sya siguro dahil di nyo mauubos yung 150GB a month.
2. Kung kailangan ng landline sulit. NOTE: di ko alam landline quality ng globe.
3. Sa mga Gamer.. Mataas ping nya sa ibang lugar. lalo na wimax.
4. In General: Kung di ka naman paladownload ng malalaking files pero pag kailangan mo ng extra speed pag nag online ka at kailangan mo ng landline ay puwede ang GLOBE DSL sayo..

PLDT 999 1.5mbps DSL:
1. Kung pala download ka at 10-24hours/day ka nagdadownload
2. Sa experience ko stable ang ping ng PLDT DSL kaya ok sya sa gaming.
3. Sa streaming, kung di naman HD yan.. palagay ko naman walang epek yung diprensya nilang 500kbps. At dahil WALANG CAP ang PLDT, umasa kang di babagal yang youtube streaming anyday.
4. In General: Kung araw araw ka nagdadownload at youtube at gaming tapos di mo maafford na bumagal ang speed mo ng 600 kbps at di mo kailangan ng landline ay PLDT DSL ang malamang na mas kailangan mo.



Kung kelan nyo tulong sa computation with your needs I'll try to help. Wala ako masasabi sa line quality marami nyan info sa net. pero yung computation ng actual needs nyo I can help. kung may mali ako sa computation pakicomment!

TAGS:

GLOBE DSL MAS SULIT sa PLDT DSL? ang katotohan
GLBOE DSL 1299
GLOBE DSL 1299
2mbps + landline
PLDT DSL 999
1.5 mbps
THE TRUTH ABOUT GLOBE'S SPEEDS.
GLOBE OR PLDT DSL?
WHICH IS FASTER GLOBE DSL OR PLDT DSL?

Saturday, October 1, 2011

WinToFlash Missing or Corrupt: hal.dll bootsect.dos

 I/O Error accessing boot sector file multi(0)disk(0)partition(1)\bootsect.dos
 "Windows could not start because the following file is missing or corrupt: \system32\hal.dll"


Are you having a missing hal.dll error after installing xp from a USB flash drive made by WinToFlash??? The solutions I found didn't work or were too complicated. If you get the error below, all you need to do is boot from the same USB flash drive again. When the splash screen appears, just select the option below the DEBUG option (DEBUG is the third option, so select the fourth). No need to edit the boot.ini for now, you could do it later when you can use windows already.

NOTE: If the fourth option doesn't work, try the other options BUT remember their partition number. The partition number is the number enclosed by parenthesis after the word partition in the option label.


NEXT STEP:  editing boot.ini

How to edit the Boot.ini file in Windows XP




Wednesday, September 28, 2011

Machine Learning Posted Lectures as of Sep 28W11


Do you want a preview of what you'll learn when you take Stanford's FREE Machine Learning Class? Here are the posted lectures as of Sep 28, Wednesday, 2011. The class officially starts on Oct 10M11 but they have decided to have a few lectures posted in advance.

Machine Learning Preview:

I. INTRODUCTION

  • Welcome
  • What is Machine Learning?
  • Supervised Learning
  • Unsupervised Learning

II. LINEAR REGRESSION WITH ONE VARIABLE

  • Model Representation
  • Cost Function
  • Cost Function - Intuition I
  • Cost Function - Intuition II
  • Gradient Descent
  • Gradient Descent Intuition
  • Gradient Descent For Linear Regression
  • What's Next

III. LINEAR ALGEBRA REVIEW (OPTIONAL)

  • Matrices and Vectors
  • Addition and Scalar Multiplication
  • Matrix Vector Multiplication
  • Matrix Matrix Multiplication
  • Matrix Multiplication Properties
  • Inverse and Transpose


Intro to Databases Posted Lectures as of Sep 28W11


Do you want a preview of what you'll learn when you take Stanford's FREE Introduction to Databases class? Here are the posted lectures as of Sep 28, Wednesday, 2011. The class officially starts on Oct 10M11 but they have decided to have a few lectures and assignments posted in advanced.

Database Class Preview:

INTRODUCTION

  • Introduction to the course (14 min)

RELATIONAL DATABASES

  • The relational model (9 min)
  • Querying relational databases (6 min)

XML DATA

  • Well-formed XML (13 min)
  • DTDs, IDs & IDREFs (18 min)
  • XML Schema (13 min)

RELATIONAL ALGEBRA
Prerequisite: Relational Databases

  • Select, project, join (18 min)
  • Set operators, renaming, notation (20 min)

SQL
Prerequisite: Relational Databases; Recommended: Relational Algebra

  • Introduction to SQL (5 min)
  • Basic SELECT statement (10 min)
  • Table variables and set operators (11 min)
  • Subqueries in WHERE clause (20 min)
  • Subqueries in FROM and SELECT (8 min)
  • Aggregation (25 min)
  • NULL values (6 min)
  • Data modification statements (15 min)