A Legend Back to Town (2013 - 2018)

It's been a while since my last post some years ago, but anyway... welcome home again. So, I'd like to talk about how curious I was on how PowerBI works that successfully lead me to develop a similar one (a super duper mini typically at least) for audit summary report purposed.

And now I'm proud to introducing this LiteBI® - a simple stand alone software to perform highlighted charts data from single drag and drop Excel file.


LiteBI® basically built from customized modules of SheetJs (https://github.com/sheetjs), LinqJS (https://lnkd.in/fHgrzHt) and Google Charts API (https://lnkd.in/fWjHwJF) based on ACFE (Association of Certified Fraud Examiners) report framework (http://www.acfe.com/).

And somehow - for the good news - it reveals the mistery of querying data under client side JavaScript. No more server side processing needed nor also the database! But of course for the bad news, there's 2 out of (at least) 30 charts and tabel must be done on this LiteBI® core 😨

Labels: , ,

  Post a Comment Bookmark and Share

Super Swipe Feature from BB10

Good bye sand clock! And greeting for BB10, a new baby born OS for future Blackberry embryo. As tons news from internet what inside in BB10, actually there's also tons features needed to improve this OS. But before they continue to make a really mature model in upcoming versions, let end-user learn and decide how they experience for the UI as what I called as super swipe device in baby OS - the BB10.

The important thing that user need to compromised is the UI swipe tips and trick, since there's no back button or common navigation found on it as others devices. So here I made this short guidance for user that new to BB10 device; Z10, Q10, A5 or any of touchscreen BlackBerry device which using BB10 or later as it OS.

The Home Screen
This is how you'll move around the home screen on your BB10 device. You can get to your messages in the BlackBerry hub by swiping from left to right.



Get back to all your apps by swiping from right to left. Swipe left or right to find apps on the home screen. Or by simply choosing screen number from bottom  of the display.



To get out of any app, touch the bottom edge of the glass and slide your finger up.



Swiping up will bring you to your recent apps on the home screen. That's how to navigate you BB10 device.

Going Home
The most important gesture for your BB10 device is waking up and unlock it by touching the bottom edge of the glass and sliding your finger up.



The same gesture will get you out of an app. Touch the bottom edge of the glass and slide your finger up.



Remember: Sliding up from bottom edge of the glass will take you to the home screen again.

Showing Options
These will show you how to access the top menu on your BB10 device. While on the home screen, you can get to device settings by touching the top edge of the glass and sliding your finger down.



While in an app, the same action will show you options specifig to that app.



Remember: Sliding down from the top edge of the glass can reveal more.

Notifications
Here's an easy way to peek at your notifications and jump to your messages on the BlackBerry Hub. You can check your notifications by touching the bottom edge of the glass and slowly sliding your finger up.



Or jump straight to the BlackBerry Hub. Touch the bottom edge of the glass then slide up and to the right.



Now you know how to check your notifications and messages.

Virtual Keyboard
The tips on how to use the keyboard is the power of BB10 devices. When you start typing, a prediction will appear above the next letter of the word. To select that word, simply swipe your finger up from that letter.



Swiping down on the keyboard will display number and symbols.



To delete a word, swipe across the keyboard from right to left.



To hide the keyboard, press and hold the space-bar.



You can also swipe down on the keyboard with two fingers to hide it.



Another Trick
To restart BlackBerry Hub, simply swipe from the right top edge of the glass and diagonally slide to the left until the center of the screen and do it for 5 times.



Others trick is the same with others touchscreen device, such as internet browser, pictures app or PDF reader. If they apply to that app, you can use content gestures to let you directly manipulate content just like zooming in or out, peeking or scrolling.

Anyway, Good bye sand clock!

Labels: , , , ,

  Post a Comment Bookmark and Share

Elevating User Account Control with Delphi

If you have medium size of Delphi based application that required some privileges access to Windows OS particularly, then you might face problem with User Account Control (UAC). User Account Control (UAC) is a technology and security infrastructure introduced since Microsoft's Windows Vista. It aims to improve the security of Windows by limiting application software to standard user privileges until an administrator authorizes an increase or elevation. However without privileges access, application that need access to system folder or database might impact to failure.

This time lesson will share you 2 alternatives how the application "playing" with UAC. The first option order user to elevating the authorization manually by executing application using Run As Administrator from right click context menu of the EXE binary. While last option inject an embedding code to elevating user automatically. Both alternatives options came with the same scenario, a login form with Login button enabled if user has full privileges access, and so on in contrary. Let the learn begin, and here the detail explanation:

1. Detecting Elevation Level with ElevationType
We know that UAC only affect with OS greater than Windows XP, so you need also to detect what kind of OS version where the application currently running on. In order so, put below function on the code:

function osver: string;
begin
result := 'Unknown (Windows ' + IntToStr(Win32MajorVersion) + '.' + IntToStr(Win32MinorVersion) + ')';
case Win32MajorVersion of
        4:
                case Win32MinorVersion of
                        0: result := 'W95';
                        10: result := 'W98';
                        90: result := 'WME';
                end;
        5:
                case Win32MinorVersion of
                        0: result := 'W2K';
                        1: result := 'WXP';
                end;
        6:
                case Win32MinorVersion of
                        0: result := 'WVista';
                        1: result := 'W7';
                end;
end;
end;

Then, you can put elevation user account detector on form onShow event just like code below :

procedure TForm1.FormShow(Sender: TObject);
const
TokenElevationType = 18;
TokenElevation     = 20;
TokenElevationTypeDefault = 1;
TokenElevationTypeFull    = 2;
TokenElevationTypeLimited = 3;

var
token: Cardinal;
ElevationType: Integer;
Elevation: DWord;
dwSize: Cardinal;
RunAsAdministrator:boolean;
level: string;
begin
SB.Panels[0].Text:='OS type: ' + osver;

// Run As Administrator Validator
RunAsAdministrator:=false;
if OpenProcessToken(GetCurrentProcess, TOKEN_QUERY, token) then
        try
        if GetTokenInformation(token, TTokenInformationClass(TokenElevationType), @ElevationType, SizeOf(ElevationType), dwSize) then
                case ElevationType of
                        TokenElevationTypeDefault:  RunAsAdministrator:=false;
                        TokenElevationTypeFull:     RunAsAdministrator:=true;
                        TokenElevationTypeLimited:  RunAsAdministrator:=false;
                else
                        RunAsAdministrator:=false;
                end
        else if (osver='W95') or (osver='W98') or (osver='WXP') then RunAsAdministrator:=true;

        if GetTokenInformation(token, TTokenInformationClass(TokenElevation), @Elevation, SizeOf(Elevation), dwSize) then
                begin
                if Elevation = 0 then RunAsAdministrator:=false
                else RunAsAdministrator:=true;
                end
        else if (osver='W95') or (osver='W98') or (osver='WXP') then RunAsAdministrator:=true;

        finally
        CloseHandle(token);
        end;

level:='(Administrator)';
btnLogin.Enabled:=true;
if not RunAsAdministrator then
        begin
        level:='(NOT Administrator)';
        btnLogin.Enabled:=false;
        end;
SB.Panels[0].Text:=SB.Panels[0].Text + ' ' + level;
end;

That's all. Try to execute the application in Windows 7, here's what I've got:



The Login button disabled since the application not executed with Run As Administrator context menu.



But, if the application running from Run As Administrator, the Login button now enabled!



Note that above code will not impact on Windows XP, since OS assumed that user running it as Administrator account even it executed from context menu or not.



2. Elevate Execution Level by Manifest file
Create a .manifest file :



Save it as .manifest. Continue to create a .rc file and named it as .rc.



Ah... don't forget to save the .manifest and .rc file in the same folder with the application source code. Then, continue to open command prompt, switch to directory where brcc32.exe (Borland Resource Compiler) exist and gives below syntax:



After the syntax succesfully compiled, it will automatically created a .res and .rec.



Back to the application source code and move to Project Manager window, right click to Project Files and point to View Source menu.



On .DPR menu, gives a line syntax after $R compiler directive just like picture below:



Finished! You may test the application and see what the different between options no #1 and #2.



Have a great fuckin' day!

Labels: ,

  Post a Comment Bookmark and Share