05/20/15

My WordPress .htaccess file

Here is what my .htaccess file looks like, Also with a brief rundown on what it does. Since this is a WordPress multisite installed in a subdomain, most of which I got from the WordPress Codex.

The default WordPress Multisite .htaccess for Subdomains

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ – [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]

This protects your .htaccess/htpasswds, wp-config.php, error_log, php.ini

<FilesMatch “^.*(error_log|wp-config\.php|php.ini|\.[hH][tT][aApP].*)$”>
Order deny,allow
Deny from all
</FilesMatch>

This prevents directory browsing. Typing jaren.cudilla.net/wp-includes would lead you to a 404 page.

#Disable directory browsing
Options All -Indexes

Expires headers to reduce server load and Increase page load time, it tells the browser to load a cached version of the page

<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Default directive
ExpiresDefault “access plus 1 month”
# My favicon
ExpiresByType image/x-icon “access plus 1 year”
# Images
ExpiresByType image/gif “access plus 1 month”
ExpiresByType image/png “access plus 1 month”
ExpiresByType image/jpg “access plus 1 month”
ExpiresByType image/jpeg “access plus 1 month”
# CSS
ExpiresByType text/css “access plus 1 month”
# Javascript
ExpiresByType application/javascript “access plus 1 year”
</IfModule>

This is for leverage browser caching, according to GTmetrix, “browser caching is important because it reduces the load on your web server, which ultimately reducing the load time for your users.”

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg “access plus 1 year”
ExpiresByType image/jpeg “access plus 1 year”
ExpiresByType image/gif “access plus 1 year”
ExpiresByType image/png “access plus 1 year”
ExpiresByType text/css “access plus 1 month”
ExpiresByType application/pdf “access plus 1 month”
ExpiresByType text/x-javascript “access plus 1 month”
ExpiresByType application/x-shockwave-flash “access plus 1 month”
ExpiresByType image/x-icon “access plus 1 year”
ExpiresDefault “access plus 2 days”
</IfModule>
## EXPIRES CACHING ##

To Enable Gzip Compression, plus compressing static data.

<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml

# Remove browser bugs + Reduce pages weight by compressing static data
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent
</IfModule>

This tells the browser to actually serve a cached version or the actual page. “Cache-Control directives control who can cache the response, under which conditions, and for how long” snippet from the tldr version on Google Developers.

# BEGIN Cache-Control Headers
Header set Cache-Control “public”
Header set Cache-Control “private”
Header set Cache-Control “private, must-revalidate”
# END Cache-Control Headers

To save more bandwidth

# BEGIN Turn ETags Off
Header unset ETag
FileETag None
# END Turn ETags Off

I could still add this. According to Smashing Magazine‘s 10 Useful WordPress Security Tweaks will protect from script injections. In the light of my recent post Cleaning a defaced WordPress site. This maybe useful, extremely useful.

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]

Cool Links

Other Fine reads

 

 

05/13/15

Cleaning a Defaced WordPress Site

If you have recently experienced your WordPress site defaced or hacked. You may have found the urge to call your webhost and give their customer service hell. But fixing/cleaning this is fairly simple, you can lessen your stress and lower your heart rate by fixing the website first. Then if all else fails, GO BUG YOUR WEBHOST!

 

Depends on the level of defacing, other hacks would just overwrite the index.php on your root folder, others would be theme-based hacks/defacing, it could be the theme’s header files or other files or a plugin with a  known exploit like revslider there would also be new files uploaded to your webserver (i.e. malicious scripts, upload scripts etc.), while the page is defaced, it also affects your .htaccess file with a redirect to let’s say a pharmacy site, a russian dating site, a michael kors online shop.

Couple of things needed

  • SSH/Shell access – PuTTy  If your webhost allows shell access, For cloud hosted websites,that’s 2 less tools needed for the repair. For cPanel hosted sites, I always stick to either cPanel’s file manager and editor or I use the following tools below.
  • FTP client – I use Filezilla, free download easy to use, fast, stable. What more can you ask for?
  • Notepad / text editor – I suggest Notepad++, better than the normal notepad as it displays scripts color coded and display line numbers for easy debugging.
  • backups (website files / database) this can be either done manually, dumping your mysql db and copying your public_html/www folder to your local computer or through cPanel’s backup wizard or if your webhost has set backups automatically through WHM. For cloud hosted websites, depends on your host if they have automatic backups.

Sites you can check :

You can check phpxref for cross referencing default wordpress files to your modified index.php file. For the default wordpress .htaccess you can check the wordpress codex. This site has saved me a couple of times, Sucuri.net’s Sitecheck gives you information regarding what type of infection your site has.

Important things to check :

  • File and directory permissions – CHMOD 755 for directories and CHMOD 644 for Files
  • Timestamps – If you have not recently modified your WordPress site, any change in the file’s timestamp “last modified date” is cause for suspicion.

If your index.php file is different from what is typed here chances are your index.php file has already been modified. All you have to do is to copy this code delete everything on your current index.php file and paste the code below.

<?php
/**
* Front to the WordPress application. This file doesn’t do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/

/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define(‘WP_USE_THEMES’, true);

/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . ‘/wp-blog-header.php’ );

 

Save the file, and reload your website. If it shows your WordPress main page, then you’re done. Otherwise you have to check you current theme’s files or better yet get a new theme.

If you are using shell access you can setdomain or setuser (if allowed by your webhost). To find hacked websites/malwares – malwares, script injections has similarities which we can easily find by searching every php file on the server

On PuTTy
You can setdomain [domain] my setdomain command does not work that is why I use setuser [domain ftp username]
copy/paste on putty or type it if your feeling lucky.
find . -type f -name ‘*.php’ | xargs egrep -i “(eval|base64_decode) *\(” > hackdwscheck.txt
This will find and check every .php file with the words “eval base64_decode” and writes it on hackdwscheck.txt (this will show a couple of php files with the searched criteria “eval base64_decode”) but you will notice that a hacked file will display something like “<?php eval(base64_decode(“ZDERagfsfdg455aRSgt565GERH656htgpOwpp…” that would be around 5000 to around 50000 characters long.
You can view and specifically modify or remove that entry on the file listed.
A more detailed article will be written next using SSH, troubleshooting cPanel hosted websites, etc.
Another tip, you may want to keep WordPress and it’s plugins updated to patch those security loopholes.
Got Other TIPS, share it on the comment area below.
You may also want to read this …
03/22/15

Fix PS3 YLOD with a Heat Gun and Toothpaste+Vaseline

My beloved PS3 (CECHG01) died a couple months ago and I had no time, no cash to have it fixed. Browsing through the internet, I watched a couple of videos about quick fixes (towel+hair dryer trick) but I’m not sure about that fix as I’ve also read horror stories about it. Mine’s a 40gb ,heck I still have Assassin’s Creed 3 that I was unable to remove when it YLOD’ed on me. I managed to remove the disk first by turning off the main power then holding the eject button and turning the main power back to start the fan test then ejected the disk. Yey!

English: The Sony PlayStation 3 console. This ...

(Photo credit: Wikipedia)

 

And I came across these videos from Youtube

  These videos are very easy to follow. Watch them first If you are doing this for the first time. I’m ready to bury my PS3 so if does work or not it’s ok.

 What got me convinced to open my PS3 and resurrect it is this video with explanations that are very practical and believable.

  PS3 how to open your Playstation 3 and get it ready for repair

 After opening up my PS3 cleaned it, removed the dried out thermal paste with rubbing alcohol. I went to look for my thermal paste which I later realized that I haven’t got any, now I don’t have the time to go to the store and buy one. So I opted for the alternative Toothpaste+Vaseline (check out the post on how to do it : Toothpaste+vaseline Adventures!!!), I’ll try the diaper rash cream (As seen on this post : Homemade Thermal Grease) next until I can buy a thermal paste if I have time. Although this fix is temporary, it’s fun to macgyver something and make it work. If my PS3 dies on me again. I’ll just buy a PS4!!!

But in the meantime, it’s time to play Sleeping Dogs and Watchdog again, baby!

11/12/14

Troubleshooting Checklist (Downed Websites)

Troubleshooting a downed website? Here’s a simple checklist to get you started.

Try another site. Check sites such as google.com, yahoo.com or any other site? If you can’t view/access any  of those sites, then it is likely a problem internet connection. If other sites work and yours doesn’t, go to ISUP.me and see if it’s “just you” or if the site is “really down.” By knowing if the site is not showing just for you, you can isolate the cause of the issue (internet connection, browser issue)

Clear the Cache and Temporary internet files – Clearing cookies and history files can really help your browser work at optimum level.

Restart your browser – Depending on your settings) this will auto-clear your cache, history, and cookies.

    • Try a different device – Use another computer, a laptop and tablet, and even your phone.

Do a Reboot – If you’re at your home computer,  Rebooting your computer as well as your modem and router can work wonders. Sometimes stubborn OS’es tend to keep a faulty driver/software running. A quick reboot can force those malfunctioning software/drivers to close.

 

Helpful Online Tools.

    • Pingdom, a website downtime monitoring service, that can point out possible issues that may cause errors in the long run.

 

    • GTmetrix, a website speed and performance optimization service, more details on how to speed up and check for possible issues that may lead to a slow loading website and even to a downed website.

 

 

If the site displays an error message, take a screenshot, or copy the error message so you can search for the cause and fix, maybe you’re not the only one experiencing this.

Check the DNS and Zone records – you can do a quick DIG for A records, Name servers etc via this online tool Web-based Dig from ringofsaturn.com. If you are maybe pointing it to the correct host, if all seem to check out correct that it may possibly be a problem with your host.

Do a quick WHOIS – As it maybe a possible account related issue go to Who.is . Upon doing a WHOIS, if the result is anything but active then it may possibly be a reason why the site is down. (expired domain name registration, domain locked, etc)

It may possibly be a CMS issue. – Popular CMS like WordPress, Joomla, Drupal have their strengths and weaknesses and also their vulnerabilities. To detect what CMS your domain has go to WhatCMS.org. Once you know what CMS you have you can better troubleshoot your issue as there are CMS specific hacks and exploits.

  • Database Issue –  either it’s a wrong database username or password, or your database host is down.
  • Coding Issue – faulty plugins, irresponsible coding can lead to many problems make sure to update to the newset version of plugins and CMS.
    • Malware, SQL injection, defacing – are but examples of why a website can be down, this all boils down to unsecure web files, make sure that permissions are set CHMOD 644 for files and CHMOD 755 for directories. Also securing your .htaccess is a must . Check out my post regarding Cracking down on SPAM it’s regarding WordPress but it points out nifty details about securing your .htaccess file.

 

What’s your troubleshooting checklist? Care to share? comment below.

 

11/1/14

Back In Action

Wow, I haven’t updated this blog for months now. I have been busy at work and with my baby girl. But now it’s time to revive this blog and continue with my passion: Writing.

I have lined up a couple of topics mostly based on what I do everyday at work, I might throw a couple of random topics like gaming and such.

  • Domain/Website troubleshooting
  • Database connection issues
  • htaccess tips
  • WordPress Troubleshooting
  • Common WordPress Errors
  • Troubleshooting Checklist
  • Common Email Errors
  • Blogging stuff, Tips and Tricks
  • Nifty time-wasting stuff
  • Cool games, Apps
  • Neat Gadgets and stuff
  • Awesome toys

I will try to post everyday but I will start with 3 times a week. Check out my new posts every Monday, Wednesday, and Friday.

05/30/14

Increasing Max File Uploads for WordPress (Media Uploads)

You are blogging, your mind set on crunching all of those ideas wandering in your head, after finishing your final draft, you attempt to add pictures, videos but you get stopped by this.

wp-go-jaren-upload-new-media

Your maximum upload file size set to 1MB which for me works fine, but in case I need to upload a MP3, or a video file that would be a problem. As we know by default, most shared servers allow up to 8 or 16 MB. There’s no reason to upload an image greater than 1 – 2 MB in size. But some of still want to be bad and bend/break the rules to our advantage.

There are a couple of ways to achieve this:

 

  • Functions.php – On WP-admin dashboard, go to Themes > Editor then look for Theme Functions (functions.php)
    • @ini_set( ‘upload_max_size’ , ’32M’ );
    • @ini_set( ‘post_max_size’, ’32M’);
    • @ini_set( ‘max_execution_time’, ‘300’ );
  • .htaccess (you can check out my recent post on .htaccess modification)
    • php_value upload_max_filesize 32M
    • php_value post_max_size 32M
    • php_value max_execution_time 300
    • php_value max_input_time 300
  • PHP.INI – either you create or edit a PHP.INI file

If you are on a shared host, a php.ini file may not be in your directory. If that’s the case then we need to create a file called php.ini and upload it in the root folder. In that file add the following code:

    • upload_max_filesize = 32M (you can try 200M, even more like 1024m which is overkill)
    • post_max_size = 32M
    • max_execution_time = 300 (maximum time in seconds a script is allowed)

Keep in mind that file upload is not set by WordPress that’s why some would have a default size of 2MB, 8MB even 64MB it’s set by your webhost

You may also want to create/upload a PHPINFO.PHP file to check, to do that create a file named PHPINFO.PHP and add the following lines of code

<?php

echo phpinfo();

Save the file. upload to the directory you have your WordPress installed.  Call the script from your browser.

yourwebsite.com/phpinfo.php

 

Enhanced by Zemanta
05/27/14

WordPress Default .htaccess file

Knowing your .htaccess file is vital as with the .htaccess file you can do tons of stuff to your WordPress blog.  If you have a habit of trying out new plugins, installing them, removing them, etc. you also have to be aware that a corrupted .htaccess file can bring your site down due to plugins and other things. Knowing what to do and how to fix the .htaccess file can save a lot of face rolling and hair pulling.

 

Let’s start with your default WordPress .htaccess file

Root

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress

Subfolder

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /subdirectory/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /subdirectory/index.php [L]
</IfModule>
# END WordPress

For .htaccess modifications always make a backup copy so if ever you mess up you can always load a fresh copy and start again.

To start modifying your .htaccess you need to locate your .htaccess file with these tools:

  1. cPanel‘s File Manager (inline code editor)
  2. FTP Client with a text editor – at default setting the files are hidden, set your FTP client to show hidden files. I use Filezilla and have it set, so that everytime I right click on the .htaccess file it would download the file and open it up in Notepad++ after doing my modifications and saving it, Filezilla will prompt you to either discard local file and/or finish editing
  3. WordPress PluginWP Htaccess Editor – I haven’t tried this but this is probably what I’m going to install next, if I’m planning more .htaccess mods.

Finding the location of the .htaccess file

The .htaccess file for WordPress should be in the folder where you installed WordPress. In the root folder, if you installed WordPress in the root directory or it could in a subfolder if you installed WordPress in a sub folder (/wp, /blog, /other, etc.).

yourwebsite.com/.htaccess
yourwebsite.com/wordpress installation/.htaccess

 

Enhanced by Zemanta
05/25/14

Cracking Down on SPAM

 

Cracking down on SPAM, I left this blog alone for quite some time, due to my recent attack where my blogs where defaced and my cPanel details got compromised so we had to start from a backup that wasn’t compromised. After loading a backup, I saved on my computer which was dated Feb 1st. I lost a couple of posts/articles all to thanks to those hackers and spammers.

SPAM

SPAM (Photo credit: AJC1)

I retired my D3 blog because of these SPAM comments, messages.

A couple of things I did for more added security.

  1. Removed Contact Form and replaced it with Contact Form 7
  2. Added reCaptcha Plugin for CF7
  3. Installed Bad Behavior

There’s no guarantee that I can stop Spam 100%, but it should give me a fighting chance, a spambot would be stopped immediately by these countermeasures. A human spammer may still be able to get through to my defenses, but I’m not going to give up without a fight.

I also modified my .htaccess for protection, also my wp-config.php and /wp-content.

  • Securing your .htaccess – since the .htaccess is one of the most important file on your website. Naturally protecting it is one of the most vital things to do. With this simple code you can stop hackers from accessing your .htaccess file.

<files ~ “^.*\.([Hh][Tt][Aa])”>
order allow,deny
deny from all
satisfy all
</files>

 

  • WP-Config.php – If you’re running WordPress like me then the next important file is wp-config.php, because this config file contains the login information, and other useful bits of info. For more detailed Info : Hardening WordPress

<files wp-config.php>
order allow,deny
deny from all
</files>

  • Protect the /Wp-Content folder – The wp-content folder/directory another important area in your WordPress website.  Why? This is is where your themes, plugins, images, videos, and cached files are located. Securing this folder is also a priority. This is also a main target of hackers, having access to this folder means they upload a script to suit their purpose. For this to work create a new .htaccess inside your /wp-content directory/folder. Got the inspiration from a post on Creative Bloq – Protect WordPress sites with .htaccess

Order deny,allow
Deny from all
<Files ~ “.(xml|css|jpe?g|png|gif|js)$”>
Allow from all
</Files>

 

More on .HTACCESS

 

Enhanced by Zemanta
01/25/14

Making Money Online is Hard

Making money off the internet is not easy at it seems. There are a lot of sites/people out there, telling us that it is very easy to make money off the internet.

1. Blogging

I heard people saying that making money blogging is very easy, “If you want easy money just make a blog, post an article put Google ads and get paid!” I try to explain to them that although it is the basic concept of earning through blogging, a lot of people I know tend to forget the real aspects of blogging and why you need to post articles, do research, post relevant information, SEO, Ad placement, blah,blahs, the kitchen sink, the works after that blogging doesn’t seem very easy at all. It’s more harder if you explain the details. What they don’t know or not aware is that you have to write articles that people want to read first, do research on the next post, and stick to the blog format, blog posting schedule and do it daily or weekly. Sure, it’s hard work but then again all jobs, require you to work hard if you want to reap big rewards later. Blogging is not a get-rich quick scheme, it’s a result of hardwork, dedication, perseverance and the love of sharing/giving information to those that need them.

There’s a couple of things that I always tell people if they want to pursue bloggging, they have to find their center, write what they love about and stick to it.

If you build it, they will come.(Kevin Costner and Field of Dreams springs to mind) True but there are still other thing you need to consider when monetizing your blog.

But making money is not a straightforward thing; nor is it easy. Hard work and patience are involved. You also need to work smartly and strategically.
Starting a blog just like that in a random niche, posting rehashed content or pointless content will never get you there.

The Truth about blogging is that everyone claims they know how to do it better, yes there are certain guidelines that you have to follow to be successful in blogging.

Yes, It’s all about hardwork not just copy and paste, you also have to think smart, strategize and not steal other people’s content and passing it as your own.

2. Ads, Affiliate Marketing, Internet Marketing, Referral Marketing, Site Monetization, Link Shortening Services

This is it! ways to make money of your blog, our most favorite topic but very hard to achieve. HOWS and WHYS start flying and racing in your mind. You can’t just make an article then put ads and expect to win big. No it’s about that. We missed the crucial part, relevant, original information/post. Well copy/pasted articles will get you nowhere fast, plus an imminent ban from ad sites like Google Adsense and Yahoo Publishers Network. There are tons of sites that offer blog monetization but they also have a criteria for accepting/rejecting your blog for monetization. Though most of these won’t get you millions quick with patience it should get you going. Nobody went rich overnight unless you basically stole the money. you can go either way part-time or full-time without proper motivation it won’t get you anywhere.

To name a few that can help you start in your blog monetization frenzy here’s my list :

  1. Google Adsense
  2. Youtube
  3. Chitika
  4. Amazon Associates
  5. Adf.ly

You can also register your blog and do some posts, advertise other sites on your blog – rent your blog space for ads

  1. Payperpost
  2. Blogsvertise
  3. Payu2blog

Refer others so you can benefit from them too! like

  1. Paypalback then there was also a refer-a-friend for Paypal
  2. Xoom’s Refer a Friend which both of you can earn $15 eGiftCard, if they sign up. :)
  3. adf.ly

PTC (paid to click) sites, Typing, Data-Entry, Work From Home, Translation services

There a lot of sites that promise you can make up to $100 even $500, but you also have to double check the credibility of these sites. Most sites are scams, most of them ask you to refer others so you can “cash in” your earnings. Some ask you to “buy” referrals so you can earn more. I tried some of these PTC sites and even checked out some of the typing jobs (or like some captcha typing jobs) with PTC sites being free, and you just have to stay on a certain page ofr like 10-15 secs and you get $0.001- 0.0001 cent per ad, unless you can browse them for 5-6 hours a day it won’t make much difference you spend more with electricity / internet connection than you earn. Not a valid option for living off the internet. But if you think of it, Making money with PTC sites may get you a couple of additional bucks, but don’t bet on it to supplement your income.

 Some Articles I’ve read and found interesting

Enhanced by Zemanta
01/24/14

Display Query Results in MS Access using Mutiple Fields and 1 Text box with DCOUNT()

In Continuation of my recent post : Civil Registry App in Microsoft Access – Finally!

Encountered an issue in access where I need to get the values of Gender and Age.

Display Query Results in MS Access using Mutiple Fields and 1 Text box with DCOUNT().

Now What I need to do is to count the total number of male or female residents based on the age using the query, and I need to display those calculated values in a textbox. After sorting and scouring info in the web.

I decided to use DCOUNT().

I translated the problem with an SQL statement.

Select Count (AGE) and (Gender) From TotalPOP as totalpopbyage Where AGE = 24 and gender = female

using Dcount(name of field, queryname, criteria)

I tried =DCount(“AGE”,”totalpop”,” AGE = 24 AND gender=’female'”)

because of the dcount format I was following, errors kept showing if I added both criterias gender and age but it works fine with just one criteria

until I came up with this by accident.

=DCount(“gender” And “AGE”,”totalpop”,” AGE = 24 AND gender=’female'”)

… sometimes the solution is in front of our noses, it’s how you look at it.

Basically reviewed these articles for the solution.

I’ll be back with more misadventures and my quick fixes.

Enhanced by Zemanta
01/18/14

5 Peso Fund (52 Week Challenge) and other challenges

January 2014, THIS IS MY BIRTHDAY!! Happy Birthday to me! I’m gonna start this year with a challenge that I’ve been doing this past few years now and so far, It wielded great results. I’m gonna introduce my chart :  my 52 Weeks (5 pesos) earning chart, great for the kids too.

You already know how this goes, you start week 1 with 5 Peso then on the next week you add 5 pesos again and so on.

Incrementing 5 Peso Fund (52-Week challenge)
Week +1 Php5.00 Week +27 Php140.00
Week +2 Php10.00 Week +28 Php150.00
Week +3 Php15.00 Week +29 Php160.00
Week +4 Php20.00 Week +30 Php170.00
Week +5 Php25.00 Week +31 Php180.00
Week +6 Php30.00 Week +32 Php190.00
Week +7 Php35.00 Week +33 Php200.00
Week +8 Php40.00 Week +34 Php210.00
Week +9 Php45.00 Week +35 Php220.00
Week +10 Php50.00 Week +36 Php230.00
Week +11 Php55.00 Week +37 Php240.00
Week +12 Php60.00 Week +38 Php250.00
Week +13 Php65.00 Week +39 Php260.00
Week +14 Php70.00 Week +40 Php270.00
Week +15 Php75.00 Week +41 Php280.00
Week +16 Php80.00 Week +42 Php290.00
Week +17 Php85.00 Week +43 Php300.00
Week +18 Php90.00 Week +44 Php310.00
Week +19 Php95.00 Week +45 Php320.00
Week +20 Php100.00 Week +46 Php330.00
Week +21 Php105.00 Week +47 Php340.00
Week +22 Php110.00 Week +48 Php350.00
Week +23 Php115.00 Week +49 Php360.00
Week +24 Php120.00 Week +50 Php370.00
Week +25 Php125.00 Week +51 Php380.00
Week +26 Php130.00 Week +52 Php390.00
Grand TOTAL!! 8645

That’s just for 5Philippine Peso, it’s not much but it still helps during the Christmas Season, when we are all so desperate for cash. Start saving now! You can Also do this with higher denomination. Like 10 Pesos

Incrementing 10 Peso Fund (52-Week challenge)
Week +1 Php10.00 Week +27 Php270.00
Week +2 Php20.00 Week +28 Php280.00
Week +3 Php30.00 Week +29 Php290.00
Week +4 Php40.00 Week +30 Php300.00
Week +5 Php50.00 Week +31 Php310.00
Week +6 Php60.00 Week +32 Php320.00
Week +7 Php70.00 Week +33 Php330.00
Week +8 Php80.00 Week +34 Php340.00
Week +9 Php90.00 Week +35 Php350.00
Week +10 Php100.00 Week +36 Php360.00
Week +11 Php110.00 Week +37 Php370.00
Week +12 Php120.00 Week +38 Php380.00
Week +13 Php130.00 Week +39 Php390.00
Week +14 Php140.00 Week +40 Php400.00
Week +15 Php150.00 Week +41 Php410.00
Week +16 Php160.00 Week +42 Php420.00
Week +17 Php170.00 Week +43 Php430.00
Week +18 Php180.00 Week +44 Php440.00
Week +19 Php190.00 Week +45 Php450.00
Week +20 Php200.00 Week +46 Php460.00
Week +21 Php210.00 Week +47 Php470.00
Week +22 Php220.00 Week +48 Php480.00
Week +23 Php230.00 Week +49 Php490.00
Week +24 Php240.00 Week +50 Php500.00
Week +25 Php250.00 Week +51 Php510.00
Week +26 Php260.00 Week +52 Php520.00
Grand TOTAL!! 13780

 

now if this was possible. I’d do this but i’ll just stick to my 5,10 and maybe even 50 pesos. But with the double effect. I may as well buy the whole world.

Doubling your 1 Peso Weekly (52-Week challenge) Earn and save much to buy the World in 1 year!!!
Week +1 Php1.00 Week +27 Php67,108,864.00
Week +2 Php2.00 Week +28 Php134,217,728.00
Week +3 Php4.00 Week +29 Php268,435,456.00
Week +4 Php8.00 Week +30 Php536,870,912.00
Week +5 Php16.00 Week +31 Php1,073,741,824.00
Week +6 Php32.00 Week +32 Php2,147,483,648.00
Week +7 Php64.00 Week +33 Php4,294,967,296.00
Week +8 Php128.00 Week +34 Php8,589,934,592.00
Week +9 Php256.00 Week +35 Php17,179,869,184.00
Week +10 Php512.00 Week +36 Php34,359,738,368.00
Week +11 Php1,024.00 Week +37 Php68,719,476,736.00
Week +12 Php2,048.00 Week +38 Php137,438,953,472.00
Week +13 Php4,096.00 Week +39 Php274,877,906,944.00
Week +14 Php8,192.00 Week +40 Php549,755,813,888.00
Week +15 Php16,384.00 Week +41 Php1,099,511,627,776.00
Week +16 Php32,768.00 Week +42 Php2,199,023,255,552.00
Week +17 Php65,536.00 Week +43 Php4,398,046,511,104.00
Week +18 Php131,072.00 Week +44 Php8,796,093,022,208.00
Week +19 Php262,144.00 Week +45 Php17,592,186,044,416.00
Week +20 Php524,288.00 Week +46 Php35,184,372,088,832.00
Week +21 Php1,048,576.00 Week +47 Php70,368,744,177,664.00
Week +22 Php2,097,152.00 Week +48 Php140,737,488,355,328.00
Week +23 Php4,194,304.00 Week +49 Php281,474,976,710,656.00
Week +24 Php8,388,608.00 Week +50 Php562,949,953,421,312.00
Week +25 Php16,777,216.00 Week +51 Php1,125,899,906,842,620.00
Week +26 Php33,554,432.00 Week +52 Php2,251,799,813,685,250.00
Grand TOTAL!! 4.5036E+15

Until week 10, its still realistic but for the incoming weeks, nobody eats, nobody spends and how the heck can I get 9384579284758243758 in a week!! :) LOL

I guess have to put a ceiling on how much I can deposit, haha it’s insane to generate that much money and then double it, but really if it’s insanely possible…..

Now, an issue sprang up in my head while I was typing this. “Where do I save this? Where do I put the money, I saved?”

I present 3 options :

  1.  Open up a savings account with no or the lowest initial deposit (safest mode so as not to “accidentally” use your savings until the right time).I already have a savings account. no biggie. you can always go to option 2.
  2. get a cheap piggy bank, then again you can always smash it up and ruin the challenge.
  3. Get an expensive piggy or a safe, now the problem with a safe is that you know the combination (wife comes along and helps you “forget” the combination). and you still have to shell out the cash and the purpose of saving money is defeated.

THE MOST IMPORTANT WAY TO SAVE MONEY!

Have the Wife/Girlfriend keep your money. It’s a win-win situation!

Enhanced by Zemanta