Tuesday, September 29, 2009

C++/CLI Property Data Types




Why isn't the code below working

[ConfigurationPropertyAttribute("FromDate", IsRequired=false)]
property DateTime^ FromDate
{
DateTime^ get() { return (DateTime^)this["FromDate"]; }
void set(DateTime^ value) { this["FromDate"] = value; }
}

[ConfigurationPropertyAttribute("ToDate", IsRequired=false)]
property DateTime^ ToDate
{
DateTime^ get() { return (DateTime^)this["ToDate"]; }
void set(DateTime^ value) { this["ToDate"] = value; }
}


while the one below does:


[ConfigurationPropertyAttribute("FromDate", IsRequired=false)]
property DateTime FromDate
{
DateTime get() { return (DateTime^)this["FromDate"]; }
void set(DateTime^ value) { this["FromDate"] = value; }
}

[ConfigurationPropertyAttribute("ToDate", IsRequired=false)]
property DateTime ToDate
{
DateTime get() { return (DateTime^)this["ToDate"]; }
void set(DateTime^ value) { this["ToDate"] = value; }
}

Floods at Metro Manila, worst in 20 years.

Amf. Di ko akalain babahain kami dito. 3 years na ko nangungupahan dito sa pasay ngayun lang bumaha dito. AT HANGGANG TUHOD PA, sa magallanes mrt daw hanggang dibdib! lalangoy ka hahaha! amf.

neways, musta na kayo mga batchmate ko sa Roosevelt College Rodriguez, our beloved school we learn and grow? mayaman na ba kayu???? bigyan nyo ko trabaho? yung petiks>???

nga pala, I'm looking for a book, baka may makita kayo sa bangketa o meron kayu pero sinukuan nyo na bibilin ko sa inyo at 80%/50% orig price. eto sila:

Title: Pro Visual C++CLI and the .NET 3.5 Platform
Author: Stephen R. G. Fraser
ISBN: 978-1-4302-1053-5

or

Title: Pro Visual C++CLI and the .NET 2.0 Platform
Author: Stephen R. G. Fraser
ISBN: 1-59059-640-4

Salamas!

Thursday, September 10, 2009

Wrap an Adobe Acrobat 7 Application inside a tab control.

I'm currently studying how to wrap an Adobe Acrobat 7 Pro application in a tab control. No luck yet.

Edit::

Found candidate at http://blogs.msdn.com/mhendersblog/archive/2005/09/23/473065.aspx . Testing now.

Wednesday, September 9, 2009

Smart Bro Plan 999 now 1mpbs (formerly 512kbps)

Now that my crappy 250 kbps capped Sun Broadband Wireless is terminated, I'm looking for a new ISP. I was checking Smart Bro's website for their plans and guess what, their fixed wireless broadband (plan 999) is now burstable up to 1mbps! The last time I checked, at the beginning of August maybe, this plan only had a maximum burst speed of 512kbps only. Now that's a sweet deal if you know people near you are getting good service. Just remember, like any other ISPs, Smart bro has a few quirks and unsatisfied customers and it's wireless so be prepared. So it's always best to know a person who has hands-on experience as a basis whether an ISP delivers or not.

Really, I was disappointed with my former ISP, Sun Broadband Wireless. They were delivering 2mbps most of the time from January until the last week of May then it dropped to 640kbps(even off peak hours) then to 250 kpbs. That's really unacceptable since they are giving upload speeds of 350 kbps. Their throttling of the promised 2mbps down to 250kbps is simply absurd.

But, even if after the warning I gave yo and you're still really eager to get Sun Broadband Wireless, I suggest you read the feedbacks at http://tipidpc.com/viewtopic.php?tid=148559 then reconsider twice, then thrice.

fatal error C1093: API call 'ImportFile' failed '0x80070003' : ErrorMessage: The system cannot find the path specified.

If you encounter this error when compiling a c++ source, then you probably moved you're project from one computer to another and you're using precompiled headers. To fix this problem, simply delete the stdafx.obj in the Release or Debug folder of your project.

EDIT:

You can also solve this problem by going to the Build Menu > Clean Solution.

Philippines fell from Rank 71 to 87 in the Global Competitiveness Index

The Philippines fell from rank 71 to 87 out of 133 economies listed in the Global Competitiveness Report . The Global Competitiveness Report is a yearly report published by the World Economic Forum. The report "assesses the ability of countries to provide high levels of prosperity to their citizens. This in turn depends on how productively a country uses available resources. Therefore, the Global Competitiveness Index measures the set of institutions, policies, and factors that set the sustainable current and medium-term levels of economic prosperity."


Let's hope that the upcoming elections would improve the country's economic standing.

Tuesday, September 8, 2009

Acrobat::AcroApp::GetPreference(short nType)

What the hell is nType? I wonder. I looked at the Acrobat IAC documentation and it pointed me to the Acrobat and PDF Library API Reference. Guess what, nType isn't even there. Instead, GetPreference's parameter isn't a short but an AVPrefTypes. I looked at the definition of AVPrefTypes and it gave me...... Nothing. All it had in the AVPrefTypes is:


typedef ASUns8 AVPrefsType
A structure containing values that specfiy the Acrobat viewer's preferences settings. Can contain up to
255 entries.

Related Methods:
AVAppGetPreference
AVAppSetPreference Bit-flag ASUns32 constants for use with AVDocPrintParams.


Really. LOL. What kind of documentation is that? Acrobat SDK might have the worst the documentation ever. I had to look in the header just to find out what the hell AVPrefsType is. The header containing AVPrefType seems to be located in the header file AVPrefsD.h

Below is the contents of AVPrefsD.H which can be found in \Adobe Acrobat 7.0.5 SDK\PluginSupport\Headers\API\

Scroll down and Look for the RED text for something hilarious. I couldn't have imagine that I'll find this in the documentation of some big shot company. LOL.


//AVPrefsD.H

/*********************************************************************

ADOBE SYSTEMS INCORPORATED
Copyright (C) 1996-2003 Adobe Systems Incorporated
All rights reserved.

NOTICE: Adobe permits you to use, modify, and distribute this file
in accordance with the terms of the Adobe license agreement
accompanying it. If you have received this file from a source other
than Adobe, then your use, modification, or distribution of it
requires the prior written permission of Adobe.

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

AVPrefsD.h

- Defines AV_PREFERENCES, the list of AVAppPreferences.

*********************************************************************/

/* **ER 1/31/96
** WARNING!
** Do not ever add preferences to the middle of _t_APrefsType! Always append.
** If you are not certain that you understand our preferences system,
** find somebody who does who can help you.
Messing with the preferences
** can cause a lot of problems, some of which can be subtle and hard to find.
** Additionally, be sure to update AVExpt.h in the SDK so that plug-ins can
** see your changes.
*/

/* Items which are declared AVS are either strings or structures, both
** of which require special handling when establishing defaults, etc.
** Also, any item marked AVS requires modifications to the preferences
** code on Mac. String items are stored in a separate record, and
** non-string items require some special handling in SetProcIndep.
** (We could avoid the later problem by separating AVS into two
** defines, one for structures which can be copied as-is and one
** for strings and other pointers. But not now.)
*/

/*
* AVP(a, b) does not quite cover all cases
* AVX(a, b) used only for avpShortMenus
* AVS(a, b) for prefs which are structures or strings
* initializing defaults needs to be special-cased
* AVU(a, b, c) used for obsolete preferences
* AVPSTR(a) used for char* strings
* AVPVOIDP(a) used for void* objects
*/

/* DO NOT ADD ANY PREFERENCES TO OR REMOVE ANY PREFERENCES FROM HERE -- these preferences used to use
** the original preference API. This section is for retaining backwards compatibility
** with the original API.
**
** Use AVAppSetPref___() and AVAppGetPref___() for new preferences.
**
** Ask someone if this isn't clear.
*/


#define AV_PREFERENCES \
AVP(avpPrefsVersion, ASInt32) \
AVP(avpOpenDialogAtStartup, ASBool) \
AVP(avpShowSplashAtStartup, ASBool) \
AVP(avpShowToolBar, ASBool) \
AVP(avpRememberDialogs, ASBool) \
AVX(avpShortMenus, ASBool) /* omitted from AVPrefsRec, included in AVPrefsType */ \
AVP(avpDefaultOverviewType, PDPageMode) \
AVP(avpDefaultZoomScale, ASFixed) \
AVP(avpDefaultZoomType, AVZoomType) \
AVP(avpShowLargeImages, ASBool) \
AVP(avpGreekText, ASBool) \
AVP(avpGreekLevel, ASInt32) \
AVP(avpSubstituteFontType, PDSubstFontPref) \
AVP(avpDoCalibratedColor, ASBool) \
AVP(avpSkipWarnings, ASBool) \
AVP(avpPSLevel, ASInt32) \
AVP(avpShrinkToFit, ASBool) \
AVP(avpCaseSensitive, ASBool) \
AVP(avpWholeWords, ASBool) \
AVS(avpNoteColor, PDColorValueRec) \
AVPSTR(avpNoteLabel) /* MAX_NOTE_LABEL */ \
AVP(avpMaxThreadZoom, ASFixed) \
AVP(avpEnablePageCache, ASBool) \
AVS(avpFullScreenColor, PDColorValueRec) \
AVU(avpFullScrolling, ASBool, 1) /* AVU => obsolete */ \
AVP(avpMaxPageCacheZoom, ASFixed) \
AVP(avpMinPageCacheTicks, ASInt32) \
AVP(avpMaxPageCacheBytes, ASInt32) \
AVP(avpDrawMissingThumbs, ASBool) /* AVU => obsolete */ \
AVP(avpFullScreenChangeTimeDelay, ASInt32) \
AVP(avpFullScreenLoop, ASBool) \
AVP(avpThumbViewScale, ASFixed) \
AVP(avpThumbViewTimeout, ASInt32) \
AVPSTR(avpDestFitType) /* MAX_FIT_TYPE */ \
AVP(avpDestZoomInherit, ASBool) \
AVP(avpHighlightMode, ASInt32) \
AVP(avpDefaultSplitterPos, ASInt32) \
AVU(avpThreadIndicator, ASUns32, 2) /* AVU => obsolete */ \
AVP(avpMaxCosDocCache, ASInt32) \
AVP(avpPageUnits, PageUnitsType) \
AVPSTR(avpNoteFontName_Deprecated) /* MAX_FONT_NAME */ \
AVP(avpNoteFontSize_Deprecated, ASInt32) \
AVPSTR(avpRecentFile1) \
AVPSTR(avpRecentFile2) \
AVPSTR(avpRecentFile3) \
AVPSTR(avpRecentFile4) \
AVS(avpHighlightColor, PDColorValueRec) \
AVP(avpFullScreenUseTimer, ASBool) \
AVP(avpAntialiasText, ASBool) \
AVP(avpAntialiasLevel, ASInt32) \
AVP(avpPersistentCacheSize, ASInt32) \
AVP(avpPersistentCacheFolder, ASPathName) \
AVP(avpPageViewLayoutMode, PDLayoutMode) \
AVP(avpSaveAsLinearized, ASBool) \
AVP(avpMaxOpenDocuments, ASInt32) \
AVP(avpUseHostFont, ASBool) \
AVP(avpMarkHiddenPages, ASBool) /* DON'T SAVE TO DISK */ \
AVPSTR(avpFullScreenTransitionType) \
AVP(avpFullScreenClick, ASBool) \
AVP(avpFullScreenEscape, ASBool) \
AVP(avpFullScreenCursor, ASInt32) \
AVP(avpOpenInPlace, ASBool) \
AVP(avpShowHiddenAnnots, ASBool) /* DON'T SAVE TO DISK */ \
AVP(avpFullScreenUsePageTiming, ASBool) /* DON'T SAVE TO DISK */ \
AVP(avpDownloadEntireFile, ASBool) \
AVP(avpEmitHalftones, ASBool) \
AVP(avpShowMenuBar, ASBool) /* DON'T SAVE TO DISK */ \
AVP(avpIgnorePageClip, ASBool) \
AVP(avpMinimizeBookmarks, ASBool) \
AVP(avpShowAnnotSequence, ASBool) \
AVP(avpUseLogicalPageNumbers, ASBool) \
AVS(avpASExtensionDigCert, ASExtensionEncryptedDigitalCertificateRec) \
AVP(avpShowLeftToolBar, ASBool) \
AVP(avpAllowOpenFile, ASBool) \
AVPVOIDP(avpNoteLabelEncoding) \
AVP(avpBookmarkShowLocation, ASBool) \
AVP(avpUseLocalFonts, ASBool) \
AVPSTR(avpCurrCMM) \
AVP(avpBrowserIntegration, ASBool) \
AVP(avpBrowserCheck, ASBool) \
AVP(avpPrintAnnots, ASBool) \
AVP(avpSendFarEastFonts, ASBool) \
AVP(avpSuppressCSA, ASBool) \
AVP(avpAntialiasGraphics, ASBool) \
AVP(avpSecureOpenFile, ASBool) \
AVP(avpPaperSize, ASInt32) \
AVP(avpTrustedMode, ASInt32) \
AVP(avpTrustedModeOverride, ASInt32) \
AVP(avpShowUnixEula,ASBool) \
AVP(avpCMS, ASUns32) \
AVP(avpCMM, ASUns32) \
AVPSTR(avpWorkingRGB) \
AVPSTR(avpWorkingCMYK) \
AVPSTR(avpWorkingGray) \
AVP(avpBlackPointCompensation, ASBool) \
AVP(avpHostBasedCM, ASBool) \
AVP(avpAntialiasImages, ASBool) \
AVP(avpDoUpdate, ASBool) \
AVP(avpUpdateFrequency, ASUns32) \
AVP(avpShowUpdateDialog, ASBool) \
AVP(avpLastAcrobatUpdateCheck, ASUns32) \
AVP(avpDisableAcrobatUpdate, ASBool) \
AVPSTR(avpOverrideAcrobatUpdateURL) \
AVP(avpLastWebServicesUpdateCheck, ASUns32) \
AVP(avpDisableWebServicesUpdate, ASBool) \
AVP(avpEnableDDR, ASBool) \
AVP(avpColorArtifactRemoval, ASInt32) \
AVP(avpGamma, ASInt32) \
AVP(avpDirectDraw, ASBool) \
AVP(avpSaveVM, ASBool) \
AVPSTR(avpColorSettingsFile) \
AVPSTR(avpPrinterSpace) \
AVP(avpAccessColorPolicy, ASInt32) \
AVP(avpAccessOverrideDocColors, ASBool) \
AVS(avpAccessTextColor, PDColorValueRec) \
AVS(avpAccessBackgroundColor, PDColorValueRec) \
AVP(avpShowGrid, ASBool) \
AVP(avpSnapToGrid, ASBool) \
AVP(avpGridWidth, ASFixed) \
AVP(avpGridHeight, ASFixed) \
AVP(avpGridSubdivisions, ASInt32) \
AVS(avpGridColor, PDColorValueRec) \
AVP(avpGridHOffset, ASFixed) \
AVP(avpGridVOffset, ASFixed) \
AVS(avpGridMinorColor, PDColorValueRec)\
AVP(avpAllowByteRangeRequests, ASBool) \
AVP(avpUsingAreaBoxNames, ASBool) \
AVP(avpSoftProof, ASBool) \
AVPSTR(avpProofingSpace)\
AVP(avpEmitTileMarks, ASInt32) \
AVP(avpSlugs, ASBool) \
AVP(avpShowOverprint, ASBool) \
AVP(avpPrintOverprint, ASBool) \
AVP(avpNoteOpacity, ASFixed) \
AVP(avpProofInkBlack, ASBool) \
AVP(avpProofPaperWhite, ASBool) \
AVP(avpOptimizeForSpeed, ASBool) \
AVP(avpAccessPageMode, ASBool) \
AVP(avpAccessMaxDocModePages, ASInt32) \
AVP(avpShowTransparencyGrid, ASBool) \
AVP(avpHoveringPopups, ASBool) \
AVP(avpFullScreenMonitor, ASInt32) \
AVP(avpOpenNewDocument, ASBool) \
AVP(avpOpenAsPDFFilterIndex, ASInt32) \
AVP(avpSaveAsFilterIndex, ASInt32)\
AVP(avpHideTabsCompletely, ASBool)\
AVP(avpPrintUsingWorkingSpaces, ASBool)\
AVP(avpDisplayRightsDialog, ASBool) \
AVP(avpCacheFormData, ASBool) \
AVP(avpEmitPostScriptXObjects, ASBool) \
AVP(avpWrapLongBookmarks, ASBool) \
AVP(avpAccessReadOrderOverride, ASBool) \
AVP(avpAccessReadOrder, ASInt32) \
AVP(avpFullScreenIgnoreTrans, ASBool) \
AVP(avpUsePenForInput, ASBool) \
AVP(avpUseSysSetting, ASBool) \
AVP(avpPixelsPerInch, ASInt32)

/* DO NOT ADD ANY PREFERENCES TO OR REMOVE ANY PREFERENCES FROM HERE -- these preferences used to use
** the original preference API. This section is for retaining backwards compatibility
** with the original API.
**
** Use AVAppSetPref___() and AVAppGetPref___() for new preferences.
**
** Ask someone if this isn't clear.
*/

//== End of AVPrefsD.H

Lol. Really, who could understand your system if it's poorly documented. Come on.

Monday, September 7, 2009

Convert String^ to array<unsigned char,1>

Needed when using Write() method of IO::FileStream class


UTF8Encoding Class

Represents a UTF-8 encoding of Unicode characters.

Namespace: System.Text
Assembly: mscorlib (in mscorlib.dll)