Tuesday, July 12, 2011

Why installing wordpress in a subfolder is a good idea

Even after building a few Wordpress websites, I often get to a point when I am looking for directions on how to do the obviously simple stuff. One such thing is how to make sure your browser knows that the wordpress website is not in the root folder. A little digging around got me to this helpful step by step manual at www.askwpgirl.com.

“Moving” WordPress from Subdirectory to the Site’s Root Directory

1. Install WordPress as you normally would, but instead of installing it in the root directory (ie in the www or public_html directory), install it in a subdirectory in the www or public_html folder.

2. Once you’ve completed your design work, adding pages to the site, etc., login to the WordPress Dashboard. From the Settings -> General tab, set your WordPress address URL to the subdirectory you installed WordPress in (without the trailing slash). Note: This will already be displayed in the WordPress address field, so you don’t have to change it. What you do need to change is the Site address URL. Set this to your site’s root address (without the trailing slash).

3. Next, MOVE (do not copy) the index.php file that is in the WordPress application directory to the root directory. You can usually do this in an FTP application by selecting the file and choosing Move. (Do not move the index.php file in the themes folder or any other folder.) (Note: If you have a site already in the root directory, such as an old static html site, then you should backup and delete those files first.)

4. In a text or HTML editor, open the index.php file that you just moved and change the location of your wp-blog-header.php to the new location.

Example: if your WordPress installation folder is ‘mywp’, you would change:

to

5. Visit the site and click an interior page to make sure it displays correctly. If it doesn’t, you may need to update your permalinks (Settings -> Permalinks and click Save Changes). If you still cannot access your interior pages, then the .htaccess may need to be moved to the same location as the index.php file (i.e. the root directory). This is not necessary on all web hosts. Be sure to update the permalinks again after you move the .htaccess file.

Remember that your login and registration links will still be http://www.yoursite.com/mywp/wp-login.php.

Now, when people visit your site, they will see all the URLs of all the pages and posts as if you had installed WordPress in the root directory, and you will have a neat WordPress directory behind the scenes.

Saturday, May 1, 2010

One step closer towards the USSA...

President Obama at a recent rally in IL: "I do think at a certain point you have made enough money".

He himself has made $5 mil last year. Does he think it is Enough? Or like most Democrats, does 'Enough' apply only when it belongs to others?

Monday, April 12, 2010

Nancy Pelosi on why Obamacare should be passed

"We have to pass the bill so you can find out what's in it."

Tuesday, February 3, 2009

Poordog Millionaires?

The so called economic stimulus bill that has been recently making the rounds in the US Capitol is fast becoming unpopular with normal thinking citizens for the ghastly amount of funding that is being proposed for different sectors of the government. It looks like this bill has really been designed to stimulate government spending, not the economy. And as if to add salt to our ‘economic’ wounds, almost all of this spending has no direct bearing on the economy at least for the next two years, by which time most economies will be able to get out of the rut with no help at all. A country like the US can surely get out of a recession within two years; it will be a brilliant (and nothing short of magical) feat if we can accomplish the feat in spite of such back breaking and nerve wrenching expenditure bills.

It is pretty obvious that the fundamentals of the economy are strong enough to be able to engineer a recovery in two years. But it is bills like these that gnaw at these very fundamentals thus making it even more difficult for industry to stage a comeback. The best option is tax cuts across the board as such a move would broaden the net and put spending money in the hands of individuals and corporations who are more likely to spend it much more faster and more directly than any government can. However, if the current policy makers prefer funding government policies at the expense of industry and trade, there is a compromise solution that might work better and turn around the recession faster (at least in the short term) than the current proposed spending bill. Of course, this would hit industry and trade badly, but aren’t those evil corporations supposed to be banned anyway? This compromise solution would not ban them, but it may entice some of the owners to ditch their ‘rich’ corporate lifestyles forever!

In true Obama style of spreading the wealth, why not spread the spending around? ‘Distribute’ the $800 billion plus amount equally among all tax paying citizens of the USA. Maybe we can change that to include all tax paying residents of the USA and then include the non tax paying citizens also (just so that the vote bank doesn’t get annoyed). Wondering how this will fund the government? The way government is always funded – taxes! Tax the amount thus distributed at source at the prevailing rates. So, every recipient will become rich overnight and for once all of the taxes can be collected at the highest possible tax rate. With one swipe, the government will be flush with additional money and everybody will become rich (at least for a few days) and it will be up to each recipient to decide if they want to stay rich or if they want to spend their way to poorness! We can safely bet that at least two out of three Americans will go on a spending binge which will in turn trigger our sleeping economy and put it into overdrive as spending increases dramatically. This in turn will mean more jobs as well as more tax dollars for the federal government.

This will give rise to a few problems like people not turning up for work or not buying lottery tickets for a while, but once the new found money dries up, things will change. To help matters, government can stipulate that recipients cannot leave their current jobs for a year from the time the plan is announced. This will also give all recipients the chance to experience a rich lifestyle. Within a year, either they have spent most of their ‘aid’ or they have made enough intelligent decisions to be able to stop working if they want to.

Meanwhile, the government of the day can openly use the tax dollars thus generated to foster its pet welfare projects and help take the USA that much closer to the USSA (United Socialist States of America). And hopefully, nobody would object as they would all be too busy spending/minding their new found wealth. 

Tuesday, November 4, 2008

Convert amount to words in RPG ILE

I have had a situation where the amount had to be converted into words so that it can be printed on checks. A little googling got me to this solution. I had to convert it to the free form version for my use. There might be other/better versions out there, but this worked for me. You can find the original version (if the link is still active) here

      //  =============================================================
      //  =  Service program... NbrToWords / CvtNbrToWords           
      //  =  Description....... Service program to convert a number   
      //  =                     to words                                                          
      //  =  Amount needs to be converted into words for printing on  
      //  =  checks.                                                  
      //  =                                                          
      //  =  CrtRPGMod  Module( Your library/NbrToWords )       +             
      //  =             SrcFile( Your library/YourSrcFile )                  
      //  =                                                           
      //  =  CrtSrvPgm  SrvPgm( Your library/NbrToWords )       +            
      //  =             Export( *All )                  +            
      //  =             ActGrp( *Caller )                            
      //  =============================================================

     H NoMain

      //  -------------------------------------------------------------
      //  -  Procedure prototypes                                     -
      //  -------------------------------------------------------------

     D CvtNbrToWords   Pr           200A
     D  Number                       15S 0 Value

      //  -------------------------------------------------------------
      //  -  Global variables                                         -
      //  -------------------------------------------------------------

     D MaxGrps         C                   5

     D Words           S             13    Dim(99)
     D                                     CtData

     D Grps            S              8    Dim(MaxGrps)
     D                                     CtData

      //  =============================================================
      //  =  Procedure:   CvtNbrToWords                               
      //  =  Description: Convert number to words                     
      //  =============================================================

     P CvtNbrToWords   B                   Export

      //  -------------------------------------------------------------
      //  -  Procedure interface                                      -
      //  -------------------------------------------------------------

     D CvtNbrToWords   Pi           200A
     D  Nbr                          15S 0 Value

      //  -------------------------------------------------------------
      //  -  Variable declarations                                  
      //  -------------------------------------------------------------

     D AlphaNbr        S             15

     D WorkFld         DS
     D  Work3                         3
     D  Work2                         2    Overlay( Work3 : 2 )
     D  Work1                         1    Overlay( Work3 : 1 )

     D Count           S              5I 0
     D Pos             S              5I 0
     D Idx             S              5I 0

     D RtnWords        S            200A   Inz

      //  -------------------------------------------------------------
      //  -  Convert number to words - logic                          -
      //  -------------------------------------------------------------

      /Free

           Select;

           When Nbr = *Zero;
             RtnWords = 'zero';

           Other;
             If Nbr < *Zero;
               RtnWords = 'negative';
               Nbr = Nbr * -1;
             EndIf;

             EvalR AlphaNbr = %EditC(Nbr:'X');

             DoW Count <>
               Count += 1;
               Pos = (Count * 3) - 2;
               Work3 = %Subst(AlphaNbr : Pos : 3);

               If Work3 <> '000';

                 If Work1 <> '0';
                   Clear Idx;
                   Idx = %Int(Work1);
                   RtnWords = %TrimR(RtnWords) + ' ' +
                              %TrimR(Words(Idx)) +  ' hundred';
                 EndIf;

                 If Work2 <> '00';
                   Clear Idx;
                   Idx = %Int(Work2);
                   RtnWords = %TrimR(RtnWords) + ' ' + %TrimR(Words(Idx));
                 EndIf;

                 RtnWords = %TrimR(RtnWords) + ' ' + %TrimR(Grps(Count));

               EndIf;
             EndDo;

           EndSl;

           RtnWords = %Trim(RtnWords);

           Return RtnWords;

      /End-Free

     P CvtNbrToWords   E

** CtData Words
one
two
three
four
five
six
seven
eight
nine
ten
eleven
twelve
thirteen
fourteen
fifteen
sixteen
seventeen
eighteen
nineteen
twenty
twenty-one
twenty-two
twenty-three
twenty-four
twenty-five
twenty-six
twenty-seven
twenty-eight
twenty-nine
thirty
thirty-one
thirty-two
thirty-three
thirty-four
thirty-five
thirty-six
thirty-seven
thirty-eight
thirty-nine
forty
forty-one
forty-two
forty-three
forty-four
forty-five
forty-six
forty-seven
forty-eight
forty-nine
fifty
fifty-one
fifty-two
fifty-three
fifty-four
fifty-five
fifty-six
fifty-seven
fifty-eight
fifty-nine
sixty
sixty-one
sixty-two
sixty-three
sixty-four
sixty-five
sixty-six
sixty-seven
sixty-eight
sixty-nine
seventy
seventy-one
seventy-two
seventy-three
seventy-four
seventy-five
seventy-six
seventy-seven
seventy-eight
seventy-nine
eighty
eighty-one
eighty-two
eighty-three
eighty-four
eighty-five
eighty-six
eighty-seven
eighty-eight
eighty-nine
ninety
ninety-one
ninety-two
ninety-three
ninety-four
ninety-five
ninety-six
ninety-seven
ninety-eight
ninety-nine
** CtData Grps
trillion
billion
million
thousand
                                                 

Mom of all Bailouts - smart timing?

One thing about the bailout package for the US financial sector that stumps me is the timing of it all. It is so obvious that the timing would work to the advantage of the Democrats that it begs the question: why did Bush go along with the plan?

Did President Bush have something else at the back of his mind when he initiated this move? By proposing to inject about a trillion greenbacks into the financial world, was he trying to preempt a prospective Obama presidency from having the leverage to be able to spend more in the future? Was he trying to somewhat limit the ability of the future President to spend beyond his means? If that was the objective, how is it all going to play out for a prospective McCain Presidency?

The way I see it, regardless of the promises made on the stump, the big spending initiative right at the cusp of the elections will change the way the next administration will have to govern. President Bush has, with one swipe, put a damper on the Democrat thirst for over-spending by doing exactly what they would want to do – increase spending! Obama has already been talking about a trillion in additional spending during his administration and President Bush’s action will somewhat limit his ability to deliver on that promise. Even if he does do that, he will have to do it by either raising taxes higher or by spreading the tax net wider which will surely make him pretty unpopular, thus clearing the playing field for a much more conservative future administration. As a bonus, an Obama win effectively puts off a possible Clinton Presidency by at least 8 years!

If McCain wins the Presidency, it will be upto him and Palin to come up with innovative ways to fund the bailout package without increasing the tax rates. They will act as an effective counter check to the spend-thirsty Congress. Of course, even they will be limited and cash strapped, but if they are dead serious about eliminating earmarks, they will be able to find the dough to fund their campaign promises.

No matter how this election pans out, President Bush’s last spending initiative is sure to leave the next administration with a bigger challenge then they had initially bargained for. One of my major gripes with President Bush’s policies has been his liberal spending throughout his term, but if he really did initiate the biggest of them all to help limit future spending, touché!

Thursday, October 16, 2008

Why Chiru should tackle corruption

Can we achieve all round prosperity?

Difficult but do-able. Andhra Pradesh is already on the path to higher prosperity, thanks in large part to the previous two administrations. True, there have been obstacles and distractions on the way that we could have done without. And there is rampant corruption that has become deep rooted in the administration that is preventing more rapid development. There have been difficulties that regular people have had to face all along this path and much of this has been the result of rampant corruption.

This is where Chiranjeevi should focus his efforts. This role will not only be a continuation of what he has depicted in a multitude of films (thus making it easier for him to bring this topic to the fore), but dealing with it will also help our state come to the front of the ladder when it comes to overall development. Corruption has been the root cause of many of the problems common people have been facing since independence. To effectively take care of this animal, Chiru has to live for the fight day in and day out. Sure, there will be people within his party and amongst his close family and friends who might already be salivating at the prospects of having a go at a piece of the corruption pie and that is what Chiru will need to address up front. Like the saying goes, cleanup begins at home. Half the battle would be won if he makes it clear that he will not tolerate any corruption from any of his party members. With that out of the way, he will be able to campaign on the anti-corruption slogan.

Once Chiru gets settled down in his new role (that is our hope and objective right?), he should concentrate on efforts to weed out corruption in any shape or form. He might convey his seriousness by forming an anti-corruption ministry and giving it all the powers that it needs to help wipe out corruption from the state, city and local government wings. Incidents of corruptions should be treated as offences against the state and officers indulging in it should be punished. This maybe done by using a graded approach structured on the lines of the point system which is used by police across the world to write up offensive motorists. Offenders can be given points and the number of points earned would determine the severity of punishment. Punishment can range from warnings to demotions to termination with a bad rec. Such a standard should be worked out during the campaigning itself thus letting everybody know that Chiru means business and that he is willing to walk the talk.

 Most Indians are aware that enforcement is a problem anywhere in India and Chiru should signal that he is not going to allow that to happen under his watch. Setting up an anti-corruption ministry whose sole purpose will be to collect information/complaints from the citizens and to act on them by investigating the charges and enforcing the corruption-point system if needed will send a signal to the repeated offenders that they will not be able to get away from the law this time. Consistent enforcement, will over time, make sure that corruption will be reined in thus opening the doors for a more prosperous and happy Andhra Pradesh. Hopefully, this will set an example for the rest of the nation to follow. And Chiru will, forever, become another visionary leader that our state can feel proud of!

Is Obama the medicine America needs?

With but a few weeks to go for the final vote to be cast and the verdict to be sealed and most polls suggesting that Americans are leaning towards an Obama presidency, one cannot but stop and wonder why, for the first time, the US is on the cusp of choosing the most socialist and communist administration in its history.

From another perspective, the recent economic crisis more than anything else, seems to have dwarfed this fact and turned the tide in Obama’s favor; for now. Once the dust settles down and Americans take the time to ponder over their choice, they will realize that by choosing Obama, they have indeed chosen more of the same vis-à-vis Jimmy Carter. And as time goes by, they will realize that more of the same a la George Bush (though, in my opinion, McCain is more liberal than George Bush) would have been way better for their day to day lives than more of the same a la Jimmy Carter. Of course, by then, it will be too late for them to reverse their choice, at least for another four years. Atleast they would have figured out that Obama might as well been referring to himself when he was suggesting 'more of the same' while on the stump.

The US would be in for much worse conditions with the Obama socialists taking control of the markets and maybe even the daily lives of regular citizens pretty much like what Chavez has been doing in Venezuela over the past few years. This might be the exact medicine that is needed by Americans to jolt them out of the make-believe world that they have been relentlessly prodded into both by a swooning media as well as the fluffy words of Obama that he will deliver them from all the difficulties that they have been facing with a worsening economy. So taken in are they that they don’t have the inclination to go over Obama’s ‘non-achievements’ over the past two decades. We need not dig deep to realize that Obama has mostly been more about sound words and speeches rather than sound judgment. It is no secret that he is the most liberal Senator in the current Congress. There is the prospect that Obama’s USA can, for the first time in history, be positioned as being more socialist than Putin’s Russia or Wen’s China. It looks like none of these arguments will matter for now as most of his supporters tend to paint such arguments as a racial slur rather than take them at face value.

Obama’s tax and wealth redistribution policies might work well in countries where people have been subjugated for generations together, but in a country like the USA where entrepreneurship is rampant, they are deemed to fail. But before they fail, it is going to look like they are succeeding which will prompt him to up the ante. When he does that, the economy is going to take a turn for the worse and Americans will begin to realize the foolhardiness of their decision of electing Obama - albeit a tad late. The souring economy will act as a medicine to rejuvenate regular Americans to wake up and take action at the next elections, but not before putting up with a lot of pain and hardship; a bitter dose of medicine that an Obama administration will force upon them.

It will be much more difficult to turn the country around after four years of a Jimmy Carter like economy, but if Americans could stomach the medicine doled out to them three decades ago and still bring into office a man who single handedly turned around the economy, they can sure do it again. But they will need to elect (pun intended) to take their medicine first.