Wednesday, May 18, 2016

Why I am never a Loyalist (a Political Issue)

While I do not want to involve politics on my blog, I will make an exception for these thoughts; hoping it can reach more of my countrymen.

I am not a loyalist, never was and never will be, even with du30 no matter how good I see he is.  Because most of the times being a loyalist clouds a person's perspectives, and that I won't let happen to me.   Studying du30's character, he does not want it too.  He wants people to correct him if he is making a mistake too.

I don't want to be a loyalist for my need to see the good and acknowledge the faults.  The same way I like my friends and family members to see and treat me too.  Then to balance those visible actions out to build a more accurate composition and assumption of a person's character.

I can never be a loyalist because I don't and will never blindly follow anyone without analyzing the implications of a move.

The problem with us, Filipinos, is most of us has this personality disorder (yeah it is a disease) of following blindly a leader, from the baranggay level up to the highest position.  "Sabi ni kapitan, sabi ni boss tsip, gawin daw natin yan!"  "Hindi ba bawal yan?"  "Walang bawal bawal, sagot ni kapitan at konsehal yan".  How I wish we should learn to question and oppose our leader if what he/she is doing is wrong.  Hey, nobody is born perfect so learn to acknowledge their mistakes, and oppose those.

Another problem that I see is we filipinos are in awe of those in power thinking of them as "royal bloods" and that leads to us ourselves enabling them to build political dynasties.  Once a person was voted to hold a higher position, we gave them more powers by also voting for their family members to hold other positions in the government too when they decided to run because the thinking is they are "entitled" or mostly suited than others to do that; again because of that royal blood mentality.

We also view the politics like a beauty contest where popularity is a major factor.  And this resulted to some movie actors/actresses holding key government positions.  I am not saying they are not capable to hold those positions as there are some who has the interest of their community at heart like Gov. Vilma Santos; to name one. I am just saying that we based hugely our casting of votes on popularity, not even minding to do a research on a candidate.

With this attitudes of ours,  political dynasties of families are born on parts of the country (Josons, Marcoses, Umalis, Ampatuans, Binays, Aquinos; to name a few).  Later we come to regret this but it is too late.  Later we shout at the abuse we get.  And whose fault is it anyway?

Most of you forgets that they (government officials) are elected to "serve" the country and its people and not to be "revered" as the almighties.  And that we should be more in power and has the right to question their wrong actions.

I am never a loyalist  as I can easily see beyond facades, beyond sweet talks and empty promises during election time.  Because I don't easily believe in words but look at existing and previous works.

Having said, as this write up has been spawned by my post of Marcos' accomplishments, I came into conclusion long time ago that Filipinos have been deceived by cries of oppression and how bad martial law is.  Because when I put  the next governments in comparison, I saw only more rampant corruptions and sweet talks with the later regimes.  I saw that those self-claimed victims of martial law are the ones who have benefited the most on the next regimens, financially and politically; massively.

And since they enjoy fully those benefits, they continue to use until now the bad side of marcos' regime as propagandas to hold us in our necks forcing us to look only on what they want us to see.  Not surprisingly because if and when you look around and compare their achievements, collectively all of them lack in comparison with what the late Marcos has done.  Way way down below.

What makes me angrier is they are aided by paid and bias medias, just to continuously misdirect the attentions of the citizens so we will only focus on the "bad sides" of marcos.  These sleight of hands should stop.  I urge everyone, when they start shouting about the past, look instead in the current and see what they've done.  Doing so will lift the fog that is hiding their own corruptions, malpractices, and non-accomplishments & very poor jobs.  The things they don't want us to see and the reason for misdirection and mind conditioning.

It is not bad to be a loyalist people, but don't be a blind loyalist following your chosen leaders even though when they are wrong.

And finally, I AM A LOYALIST!  My loyalty though is towards my country for I want what is good for it and abhor the bad things they are doing to it.  So I will support those that have proven by actions to have the country's interest by heart.  No matter who he/she is, no matter what parties they are in.

Be a real and proper loyalist my friend.

Friday, April 15, 2016

APPEND FROM fails on Memo (VFP)

It appears that APPEND FROM command has an undocumented behaviour which is it cannot transfer its values into a Memo Field.  So in cases where you want to append data from say a csv, text or other types and your destination table has a memo field, then forget about this command.

Inside foxite forum, this exact problem causes a member to search for a way to achieve getting the values of a column of a CSV file that has more than 256 characters (definitely a candidate for a memo field type).  And APPEND FROM cannot simply just do that.

Having said, an alternative way to transfer data from a CSV file to our table with memo fields is to use excel automation.  It is quite simple really to do that.  Here is a small snippet for that:


Create Cursor junk (familyid i, Name c(60), Description M)

Local lcFile, loExcel As Excel.Application, lnLastRow
lcFile = Getfile("csv")
If !Empty(m.lcFile)
      loExcel = Createobject("excel.application")
      With loExcel
            .Workbooks.Open(m.lcFile)
            For lnloop = 2 To .Cells(1, 1).CurrentRegion.Rows.Count
                  Insert Into junk (familyid, Name, Description) Values ;
                        (.Cells(m.lnloop,1).Value,.Cells(m.lnloop,2).Value,;
                        .Cells(m.lnloop,3).Value)
            Next
            .ActiveWorkBook.Close
            .Quit
      Endwith
      Go Top
      Browse Normal
Endif



Using his sample data, here is the result of said automation:



And that is it, an easy way to import data from a CSV file (or any other files that excel supports) into our tables including ones for Memo fields.  Cheers!


Wednesday, April 13, 2016

ExcelExport

This is the counterpart of ssToExcel2 of ssClasses.  




Unlike ExcelPivot, this one simply transfers your cursor/table into excel with added formats, titles, etc.  An example is a ledger as shown at the bottom hereof

New properties

  • _PaperSize (1 = letter (Default), 3 = tabloid, 4 = ledger, 5= legal, 7 = executive, 8 = A3, 9 = A4, 11 = A5, 66 = A2, 119 = 11x17 size)
  • _MarginLeft, _MarginRight, _MarginTop, _MarginBottom (all Defaults to 1 inch)
  • _WithFooter (Default is .F.)
  • _Orientation (1 = Portrait (Default), 2 = Landscape)
  • _scaling (For zooming of sheet, default is 100)
  • _isProper = to turn the field names into PROPER() (Default or .T.) or UPPER() (.F.)
Miscellanous:
  • Added Progressbar (ProgBarX class)
  • Replaced Default body font from Tahoma to Calibri
  • Cleaned codes, speed up automation a bit
Shown below is what I meant by exporting cursor result to excel using this class on a spreadsheet with added features. Please note that with this class, it us entirely possible to do that even when you have zero automation knowledge.

Available only to ssUltimate subscribers.

ProgBarX

A simple progress bar which I created to replace the WAIT WINDOWs I put in ExcelPivot and ExcelExport classes.

Late last week, I decided to add more features onto it so its usage can go beyond those two classes such as for my other looping needs.

Progressbar on SQL SELECT

After that, I decided to see how I can incorporate this to an SQL SELECT as well, a desire which most of us share.  Here is how it looks like when incorporated on an SQL SELECT





SQL SELECT..  INTO CURSOR TEST RESULTS

* Update, April 14, 2016

Thought of another way to slash the overhead of progressbar on SQL SELECT.

Test is performed on our requested items for 9 years joining 5 tables in the process.   The SQL SELECT produces a cursor with  51,743 records:

- standard SQL SELECT (not using this class), average elapsed time on multiple runs is 1.83 seconds

- with ProgBarX showing records being processed, the bar and  percentage of completion (via SQLBar() method of class),
 average elapsed time is 4.50 seconds.

- with ProgBarX showing only the progress bar and percentage of completion via its SQLBarNoRec() method, average elapsed time of 3.72 seconds.

Again, the test is done on a 9-year dataset.  If it will be just within months or a year, the overhead will be less than a second.

The beauty of this is now we can see the number of records and its percentage of completion as those are created by an SQL SELECT.

Not only that, visual is the key.  Without a progressbar showing records being processed by an SQL SELECT with huge number of records, it appears to be slower than the one with ProgBarX.  That, of course, is an illusion as users do not like staring at the screen wondering what the hell is going on.  Users never like to unknowingly wait.

With this in place,  it provides users a real-time live feedback of what's going on behind the sql select processes as it shows the number of records being processed so far and can give them estimates on how much more to wait via the progressbar and percentage of process completion.  It also shows them that the app is currently doing something and has not frozen, as some tend to wonder or think on SQL SELECTs resulting to huge number of records.

This class though is only available for ssUltimate users.  The one added onto ssClasses does not have the latest features including that capability to show progress of an SQL SELECT.

A demo form for this is now available for my subscribers:




Interested in being a subscriber?  Email me at ss.classes.jun at gmail.com

Cheers!





Thursday, January 7, 2016

CalendarX

February 8 Update:

  • Introduced Localization via .Language property (0=Indonesian, 1=English, 2=Italian, 3=Spanish, 4=Turkish, 5=Romanian).  For other subscribers who hasn't submitted me yet the equivalent of days and months on their local language, please submit to me.  I also need the local word for "Today".



  • Fixed bug on improper end of month that happens when we click on the month picker.

====

This is based on my DTPickerX's idea of a faster date navigation/selection.  Have 3 return values:

.Value = date value
._bom = Beginning of Month
._eom = End of Month

Use Click event to perform other things as we change/select dates.  Here is how some classes of ssUltimate library looks on form.


Wednesday, January 6, 2016

Popup Calculator

I was popped yesterday by a fellow developer who showed me his form using ssDropCalc saying he is very satisfied with ssClasses library.  Thinking that others are really using said class, I decided to create a counterpart of that today for ssUltimate.  Of course, it has to be better.

What is PopCalc?

This is the counterpart of ssDropCalc of ssClasses but is better in many ways


  • Better Look
  • Unlike ssDropCalc which is a container class, this one is a control class
  • This one does not switch between formula and values.  The formula is simply shown on the popup calculator but it always returns the value
  • Better hotkeys (hover the mouse to see)
  • Highlights the keys pressed (if you do not want to use mouse)
  • Easier to use


Using on Form

Drop it and resize if you want.  On focus, this auto-pops the popup calculator and with starting value of what you put there (default is zero unless you change it via code, e.g., this.value = 123)




To exit the popup portion, either click outside, press Esc or press Enter (hotkey to pressing = sign) on your keyboard. To forcefully pop it up again if you want, press down arrow or Ctrl+Down Arrow keys.

Using on Grid

This is easier than ssDropCalc in that all you need to do is drop it down to a selected column of numeric value.  It will then take ownership of that column without setting anything further by doing the following:


  • Inheriting ControlSource
  • Inheriting Font Name and Size
  • Inheriting Alignment
  • Making itself the CurrentControl
  • Setting Column's Sparse = .F.



When used on Grid, the popup calculator won't auto-pop (by design).  The shortcut to pop it up is Ctrl+Down Arrow Keys.

There you are, the latest addition to ssUltimate!  The only thing I am not that satisfied is because I used here ButtonX class for better look, then there is a bit (nanosecond) delay in popping up form as it has to redraw those buttons on loading of popup calculator.  But I still prefer it than creating several images for those buttons.


Added January 7, 2016

Added/Utilized these properties:

Classic Property - Whether to use native commandbuttons (default or .T.) or ButtonX (.F.).  While buttonx looks cooler, there is that nanosecond delay that some of you may not like, thus this option.

Themes - Affects only Classic popup calculator, whether Themese are used or not on those native commandbuttons

SpecialEffect - Affects only Classic popup calculator.   Using the control class' SpecialEffect property so I won't need to add another myself, ignore what is shows:

Control Class                  Effect on Classic Popup
0 = Raised                     0 = 3D (Default)
1 = Sunken                     1 = Plain
2 = Flat                       2 = HotTracking




Wednesday, December 30, 2015

DTPickerX (new)

February 8 Update:

  • Introduced Localization via .Language property (0=Indonesian, 1=English, 2=Italian, 3=Spanish, 4=Turkish, 5=Romanian).  For other subscribers who hasn't submitted me yet the equivalent of days and months on their local language, please submit to me.  I also need the local word for "Today".
  • Fixed bug on improper end of month that happens when we click on the month picker.


====

So what is this latest class that is also now part of ssUltimate?

DTPickerX is a unique DateTime picker.  Unique in its look and unique in its functions.  Right now it has three levels via nLevel property:


  • nLevel = 1  (Month and Year picker)
  • nLevel = 2  (Date, Month and Year picker)

  • nLevel = 3 (or any other values, full date and time picker)




The class auto adjusts based on the nLevel property value (default is 2)

Return Values:
  • .Value = is the date value
  • ._BOM = is the beginning of the month value
  • ._EOM = is the end of the month value
  • .cTime = is the military time portion in character type, e.g., 16:35 
  • ._DateTime = is the complete DateTime value
  • .nDay = is the numeric day of the date value
  • .nMonth = is the numeric month of the date value
  • .nYear = is the numeric year of the date value

Objects inside the popup form:
  • The calendar control class is adjusted awesome Ony Too's _calendar control class (no need to reinvent the wheel)
  • The MonthYear control class is derived from my MonthPicker form class
  • The Time control class is a new control class consisting of two spinners, one for hour and another for minutes


Why create a new class like this when there are already others out there in the web?

For starter, I want something unique.  Another is I want something that is faster in navigation or date selection.  The combination of the MonthYear class makes it possible as you can easily spin or scroll the year up and down plus select a corresponding Month way much easier and faster than the existing date pickers out there.  Plus I wanted something that can have the time as well.

So there you are, the latest awesome addition to my classes inside ssUltimate.  Subscribers will be updated next year.  Cheers!

How to be a Subscriber?

Interested in being a part of ssUltimate Subscribers and users?  Email me on ss.classes.jun at gmail.com for several subscription payment options.  For new subscribers starting January 2016, subscription fee will now be USD 35.  The library comes with a demo project, source code included.  Subscription fee is one time payment and subscribers receive free update now and then.

Where do those subscription fee go?


I maintain a separate account for that.  Majority of those funds are stuck inside paypal at the moment pending linking of a visa card from me (I haven't taken the time to do that yet since I started ssClasses).  So I cannot withdraw those.

These subscription fees are my funds in assisting other contributors on the web who are sharing their tools, in assisting some forums, and in contributing to Wikipedia (c'mon guys, let us help wikipedia, they need funds).  

Most of the funds are set aside to contribute to flood victims in the area where I live in the Philippines.  A little portion I give to my sister as a gift for her effort in getting those via Western Union (my preferred payment these days), the rest she holds for future donations to flood victims per my request.  None goes to my own pocket.  None used for my own expenses.  

By subscribing, you get an awesome tool, and you are likewise helping others who are in need through me (flood victims).  Though we remain anonymous when we do so. So don't be thrifty! :) 

Next Update to Subscribers

After I posted what's inside ssUltimate library, I have updated existing subscribers.  And sends the same to new subscribers.  The next update will be on January 2016.  

This was not included because I have not thought of this one yet during that time.  While I have tested this new class to my satisfaction, I will still have to do some further testings.  I have more plans for new features of this class.

For a list of what's inside ssUltimate library, check this out:  http://sandstorm36.blogspot.com/2015/12/whats-on-ssultimate-library.html
Related Posts Plugin for WordPress, Blogger...