Saturday, June 25, 2011

attending mass and minesweeping

214 comment(s)
today's highlight:
attend mass with rizza later @ around 6PM

routine check:
read 20 pages of a random book [✔]
answer a programming problem [✔]

p90x [after i eat **currently eating*]
ojt assignment (HIG) [after i return from mass]

senior project [from 10 - 12 midnight later]



anyway, i feel a mix of disappointment and success coz i got this minesweeper program running correctly (see below).,. I tried to have inputs that would exhaust the program however when I attempted to submit them (three times) to the online judge http://www.programming-challenges.com/ it returns to me "WRONG ANSWER" displayed in blinking text at the center of the browser.,XDXD as if to mock me and say "nyahaha., wrong answer!".,.,LOL.,XDXD well i hope i'll be able to figure it out eventually but for the meantime **pats myself at the back* i'm seeing progress.,XDXD

i love being able to bounce back from sickness., My Mind, Body and Soul are actually aching (in a good way) from the yoga i had yesterday.,.LOL.,XDXD haha., i giggle everytime the instructor says "and you've survived that side" after being in a balance pose using the left feet coz i know he's not sugarcoating it., you really need to survive.,XDXD my legs were on fire after the whole thing., but my soul was refreshed and was giving out hip thrusts .,XDXD (LOLwut?.,XD)

i love you guys., **hugs*
/**************************************************************************
* neithan_minesweeper.cpp *
* jonathancasano@gmail.com *
* problem: minesweeper problem (simulate a minesweeper game) *
**************************************************************************/

#include

using namespace std;

int main () {
int num1, num2;
int inputcounter = 1, minecounter = 0;
char field [105][105] = {0};
while (cin >> num1 >> num2 && num1 != 0 && num2 != 0)
{
if (inputcounter > 1) cout << endl;

for (int i = 0; i < num1; i++)
for (int j = 0 ; j < num2; j++)
{
cin >> field[i][j];
}

//output the results to the screen
cout << "Field #" << inputcounter << ":" << endl;
//increment counter
inputcounter++;

//okie na
for (int f = 0 ; f < num1; f++)
{
for (int z = 0 ; z < num2; z++)
{
if (field[f][z] == '*')
cout << field[f][z];
else
{
for (int n = f-1; n <= f+1; n++)
for (int c = z-1; c <= z+1; c++)
{
if (field[n][c] == '*')
minecounter++;
//cout << field[n][c] << " ";
}
cout << minecounter;
minecounter=0;
//cout << endl;
}
}
cout << endl;
}
}

return 0;
}


◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇

Saturday, June 18, 2011

passwords and doodles

98 comment(s)

/*
Today I received an e-mail coming from my online sister namine (yah i have an online sister now... >w<). I enjoyed reading what she sent me... she even made this cute doodle., =]

made me realize that i wanna make time for things that i need to do. Since last week i've been rattled by the tsunami of requirements the school is asking of us graduating students. But it was only after reading namine's e-mail that i clearly saw that i was being too intimidated to face those requirements coz i was looking at them as a whole and all at once., and it's not helping me progress at all. upon writing my response to her i came upon formulating how i think i would survive this school year., =]

this year i only have one rule: everyday should have a highlight.

like MONDAY : consultation with sir Allan for the Senior Project
TUESDAY: finish chapter 7 of the iPhone SDK book

and it doesn't have to always be an academically serious higlight

FRIDAY : Learn to speak a hundred english words with an irish accent

and the addition to the rule would be: while having that highlight, maintain the important routines

...which upon self deliberation while doing some mysterious hand gestures of magic (XD), turned out to be

(1) read 20 pages of any book (i recently cleaned my room and identified those i wanna read) which has nothing to do with academics [ 30 minutes ] (2) solve a programming problem [ 2 hours ] (3) p90x [ 2 hours ] (4) blog about the day [ 30 minutes ] (5) send a text message to rizza [ 1 minute ]

so that's five hours + plus the 13 hours mashup that i'll be spending for the Senior Project Development and the On the Job Training

good luck to me., >w<.

this year is gonna be LEGEN - wait for it., and i hope your not lactose intolerant coz the next word is gonna be - DAIRY!!.,., LEGENDARY!.,xD (barney stinson - how i met your mother)

haha.. here's what i have so far
*/

/**************************************************************************
* neithan_passwords.cpp *
* jonathancasano@gmail.com *
* problem: to ensure increased security, the company network manager *
* introduced a set of rules regarding passwords *
* *
* ✔ (1) passwords must consist of a mixture of lowercase and *
* numerical data only. *
* ✔ (2) passwords must be between 5 and 12 characters in length *
* (3) passwords must not contain any sequence of characters *
* followed by the same sequence *
**************************************************************************/

// fudge! let's begin XD

#include <fstream>
#include <string>
#include <sstream>
#include <iostream>
#include <stdio.h>

using namespace std;

string validate (string password){
//everytime a password gets rejected i should flag in 1
int pflag = 0;
int hasNum = 0, hasLet = 0;

//check for "presence of uppercase lettahs"
for (int i = 0; i < password.length(); i++)
{
if (password.length() < 5 || password.length() > 12)
{
pflag = 1; break;
}
if ((int)password[i] >= 65 && (int)password[i] <= 90)
{
pflag = 1; break;
}
else
{
if ((int)password[i] < 58) hasNum = 1;
if ((int)password[i] > 96) hasLet = 1;
(hasNum && hasLet) ? pflag = 0 : pflag = 1;
}
}

if (pflag == 0)
return "accepted";
else
return "rejected";
}

int main (){
string password;

fstream infiler;
infiler.open("passwords.in");

if (infiler.is_open())
{
while (infiler >> password)
{
cout << validate(password) << endl;
}
}

infiler.close();
return 0;
}


/*
RESULTS:

passwords - remarks

cakeshop - rejected because it contains no numerical digit
ab34 - rejected because it's too short
A567xcz - rejected because 'A' is not allowed
9apple8 - accepted (coz i still did not code number three) but should actually be rejected because 'p' is immediately followed by 'p'
03bananas - accepted but should actually be rejected (same reason) because 'an' is immediately followed by 'an'
123xy123 - accepted ('123' does not immediately follow '123')


Well that's about what i finished in two hours. I can imagine sir Allan (our dean) telling me, "Iyan lang??!!" (is that all??!!). orz... it's been a while since i programmed, at least that's how i feel.

I presently struggle with getting the third condition into code...(the one without the check mark) That's something i'll save i guess for tomorrow's two hours..

for now I feel glad i'm starting with a new schedule; Academics and Life combined. I wish to stick to this. see you tomorrow then., =]
*/

◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇

Wednesday, June 15, 2011

DAD ( my post for father's day )

17 comment(s)
It was the nineteenth of April in the year 1999, a date that i cannot forget, when i last felt the warmth of my father's hands...

Sadly they weren't affectionate caresses, they were thundering slaps delivered to my seven year old face.

My father is an OFW working at saudi arabia as a mechanical engineer. If i were to sum up the span of time i was able to spend with him in this lifetime, i would pretty much say it's around 90 days (yah, a good three months). He signed this contract that pinned him to work for his company for eight straight years, meriting only mid set breaks of about a month after the contract expires, which he uses to come home and visit us. This same contract however is again renewed. Hence, the round-robin cycle of '8 years in Saudi and a month in the philippines' .

It was a sunny morning, that monday of April nineteen when i woke up early for the sole purpose of locking the front door (coz i'm gonna be all alone in the house) when father and mother leaves for their trip to father's hometown, in 'Albay', to visit father's parents. Due to the excitement of having father around, i woke up three hours early. These hours i spent cleaning the house; This i did coz it was summer vacation (April - May) and a normal day for a seven year old neithan would be to play PS1 morning til afternoon then do the household chores at around 4pm for them to be done at around 5pm just in time before mother comes home from work. So i figured., if i clean the house now, I won't have to stop playing at 4pm., *evil grin*.

I was done cleaning the bathroom when mother woke up and prepared breakfast for us. and by the time father woke up an hour after, i was on my last stop of places to clean, the living room. I kissed him goodmorning, and he grabbed his towel on his way to the bathroom leaving the remark, "don't miss cleaning the space under your study table ok?". Those words were magical, it's still pretty early so it's accurate to say i was cleaning everything half awake, but as soon as father said those words, it was like feeling the adrenaline in me automatically activate. So I did just that.

I remember being so detail-oriented as i was cleaning the 'space under the study table'. Every piece of ripped paper I meticulously threw in the trash. The table was on the carpet so i lifted that table (which was at that time the heaviest thing i consciously tried to carry) and swept the carpet with a hard broom until it felt new when I rubbed my feet against it. I sprayed perfume over that space (LOL), I wanted that "good job" remark from him so bad I was being gay over the task. I got the floral decoration that my mom bought to put into the adjacent side of the room near the area that he wanted cleaned. It was perfect... I was patting myself on the back metaphorically. I was standing in front of that study table like a welsh guard waiting for my father to pass by and notice, protecting the space under that table like it was where the crown jewels were kept.,XD

A few minutes after i heard the Bathroom door open. I stood straight at attention... I felt footsteps rushing towards the living room.,, Dad always does that., the heavy-running-after-the shower-into-mother's-room ninja moves in order of the water in his hair not to fall on the waxed floored... I started mind setting. "a few moar minutes neithan, he still has to suit up so be patient and guard that space"...

It was to my surprise that he proceeded to the living room. Words weren't even needed for me to know he was looking for me. In his hand was three sheets of papers stapled together. Written in it were a lot of questions, a lot of answers, a few check marks and a lot of circular red marks. It was my instant reaction to rewind my subconscious to three days before, when at school the midterms exam for the mathematics subject was returned, with me getting 60 out of a hundred. (sidenote: 60/100 is failed, 75/100 is the cutoff for passing an exam in our school). Dad must have looked into the pockets of my uniform coz our laundry bin is inside the bathroom. I purposely left it there coz i wanted mom to find out (coz she does the laundry) and talk about it mother to son.

Talk about defense mechanisms when i suddenly blurted out, "pa oh, malinig na po si study table" (dad, look, the study table's now clean). Without even a squint in his eyes, he shoved the papers into my face. i was still holding the hard broom (imitating the welsh guard remember? XD) grasping it's wooden body in case i needed to retaliate. But as soon as the papers fell and my line of sight wasn't anymore blocked by the paper, the next sensations i felt were ripping open-handed slaps to both my left and right cheeks., well, his hands were big, so it's actually kinda like left and right parts of my head. It took only two of those 10 slaps for me to let go of the broom. Partly because i admitted defeat, and majority of the parts because I wasn't expecting that to happen., a few minutes ago i was expecting a Hug., those big old father hugs i see in movies where the kids are tossed into the air., It never occurred to be that I'll get my brains slapped out of me instead.

Mother came rushing towards us, trying to stop father. I'm glad she did. It was only when mother argued that I get honors during recognition days even as I fail some of the exams that father started to calm down. After that mother returned the floral decorations i took and brought them back to the adjacent part of the room. Away from my masterpiece; "the space under the study table".

The next day was father's flight. he's to leave at 9PM. Since I was seven, i had my bedtime, 7PM. I never did stick to my bedtime when father wasn't around, when he was around though I had to sleep at seven or else. This was where i imagined that on the last day of his stay, i'm gonna assert myself and say 'dad, i wanna go with mom when she drives you to the airport'. But as i recall, i slept at five in the afternoon, and never even woke up to take a pee, until the next morning.

Until now he's still finishing the contract, so technically i grew up without him (and boy was it rough, but that's another story), and it's only now that i'm in my "on the job training phase" that i realized how i compromised my childhood to make up for the loss of not having a father around, and ended up having abandonment issues which at a point in my highschool life ruined me a bit.

I'm a 'B+'. All my life i've always wanted to be an 'A'... During the time when father wasn't around my eldest brother started to go off track (rebelled because of a similar experience he got from father). He was in highschool when he started to smoke, started to drink,. and started having bad company. It got to the point when he's already alcohol depended and at the peak of his being drunk, would try to hurt mother when mother wouldn't give him money to buy his drinks. being only 12 i became the one labeled by my batchmates as the "another-day, another-house-to-sleep-in-guy" for that was the setup my mother and I agreed upon in order for me to continue studying without the threat of my elder brother's drunkenness. I have friends in my batch who I ask permission from if i could stay in for the night in their house. Typically that was about four different houses each week. Once though, i stayed in for a whole six months coz the family said they loved having me around. As much as i wanted to excel, i honestly was affected by the setup. The willingness to learn died in me. It was only during the time when i stood up to my brother and forced him out the house (he was skinny from all the drinking and marijuana so i won the fist fight) that my mom and I lived happily then on. After a year or two elder brother came to his senses and started maintaining a shop in Penafrancia (about 3 Km. from our house). However, the damage inflicted to me by those six good years of him being an asshole robbed me of the life i could've had.

Up to now i still think of what my guidance counselor said to me, "I imagine you doing great things neithan, and I know you're mature enough to know that right now (fourteen years old me), you're far away from being in the position to do them."

Which is why now, I'm so pressuring myself to do well in college, to land a high paying job, and to be rich enough to buy my own house. I only have a good year left before my father's contract expires, and this time it's gonna be for good coz my father is already 62 years old. Come this march, I wanna be already connected to a company from where i could earn money enough to buy myself a small house. I would never, not even in my dreams nor in my nightmares, picture myself living with my father again. I know it's harsh, I love him and all, but I felt as if i dodged a bullet not having to live with him as I grew up.

There is this friend of ours who we keep teasing about his dad. She's cared for in a way we find protective. When we're on skype at around 9PM-10PM, whenever she would say, "DAD " we instantly reply "bye! see you tomorrow" coz it's verbatim that she's being sent to bed already.,XD Although it comes across as authoritative., I kinda wish I felt cared for in a similar way.

I always wanted to do the classic son to father phrase, "Hey dad, *insert useless action words that you think your father would love*".,, 'Hey dad! i can run faster than sparky!, Hey dad! i can juggle! Hey dad look! I'm not anymore falling when I'm riding a bike. Hey Dad! the space under the study table is so freaking clean! yah i did that dad, I cleaned it all up, cleaned it all up for you!'.,.

If i had my friend's dad. I'd never Not be in a conversation with him. To us guys it means a lot that you're assured that if you fall, someone is there to watch you get up.,, I didn't say help., I said 'watch'., That's pretty much a huge chunk of what we need.. And by the looks of how my friends tells her stories about her dad.., he's a darn good watcher.

This post., I wish it to be my contribution to the depression felt by most of the guys in the AGD. I know times can be tough and life can be rough (oooh that rhymes).,., but remember that being happy is a choice, and the world can only be nice if we want to see it as nice., =]

I've googled up a book entitled "happiness in a nutshell" by Andrew Matthews
Little bits of happy thoughts <- DL link
here's the password for the .rar file after you've DL'd it - www.AvaxHome.ru

Take time to read it and if you liked it you could try to search his book 'being happy' which helped me a lot in recovering from the several years of fails i had... and don't worry., there's nothing about religion in it, only pointers on how to change a little how you do things everyday., =] I love you guys, it pains me to see us on our lows. And Although what i really wanna say is "I'll be there for you".,., what's really gonna happen is that "You'll be there for you"., but be assured that I'm gonna be so ecstatically happy about anything you've come to accomplished may it be little or big, academic or athletic, anything at all.

I believe in you. and I'm not just saying that. read this next one out loud "I believe in you". you've been doing so well.,., c'mon, nobody wakes up and says to himself "**yawn* what a great day to ruin myself" right?.,.,.., everyday you've been waking up hoping that this day will be better than yesterday.,, you've been living your life the best way you know how., **pats shoulders* **hugs reader*

i want you to watch this...
Your Daily Affirmation Video <- video! =]
watch it to the end ok?

and as the instructions say., watch it everyday for 2 months (so that it becomes a habit). I'm not promoting anything., I'm just saying it worked for me., The mindset of trying to be a better person each day will work wonders for anyone, no book should tell us that.

Sorry for the crappy explanation of stuff., I just wanna convince you that you're worth it, you're experiences and frustrations clouded your mind so much that you forgot how awesome you are.,., I wanna bring the awesome you back to life.,XD so.,.,***superHug!!!!!*

P.S.
Being the same human being as you are, my mind could get clouded as well, which it definitely will sometime in the future, (i'm trying my best for it not to. =]) please remind me of the same thing when it's me who's going through a hard time. I love you very much.,


◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇

Wednesday, June 1, 2011

A promise to be healthy., =]

0 comment(s)
yes, it's already 4 in the morning., X_x but don't worry i'll sleep until noon after this post. XD And this should be a short one., =] earlier at around 10pm (technically yesterday) I had to say goodbye to my Anime Graphics and Design (AGD) family who were on skype in order for me to be able to do this thing...

Well to put it shortly it's been two weeks since i started to fully commit myself to doing this workout i found in the internet... and since at daytime i busy myself with doing covers (the latest so far is the one for moechi/fenris/chihaya/ayin (lol so many nicknames)), the only time in a 24 hour period that i can squeeze the workout into is at 12 midnight.,XD yeah., i am pretty weird., but it good coz i get to enjoy an extra meal after, and i actually am eating right now., recovery food!!., =]

below are two pictures., the first one I took with the help of a mirror,.,. just to monitor the progress. Using my classmates term, the cuts for the upper abs are now slowly showing., so.,..,good job so far i guess.,XD It's funny i took the pic wearing the cap i wore in my profile pictures for facebook and YT., I figured it would make it more authentic that 'that's me'.,and hey, it could be my thing... Like when i get a new camera and I do covers with actual videos of me playing the guitar.,maybe i could wear the same cap in all of those covers.,lol.,just to give my YT vids more identity. Now in the second one i forgot to take off my glasses.,so yah, the nerd that i am.,XDXD **fudge how could i've forgotten to take those off **facepalm**



so i remember saying this blog is for YT related stuff... but i'm still trying to get the hang of using the diaryBlog.. I kinda screwed up with the whole "upload images" thing over there.. so let this be here for a while.,

wait, i'll try to come up with YT related ishtuff.,., hhmmm., i'm finished with the instrumentals of pierrot (miku hatsune).. I made it kinda alternative rock, patterned after the alternative rock version by SENKA if i'm not mistaken., but i'm still waiting for chihaya's invite for us to practice, we'll be singing male and female parts. It's the first seriously sounding duet i'll ever have.,XD so gudluck with that.,,

while waiting for chihaya, I manage to finish an english cover for a song made by a filipino band "parokya ni Edgar (parish of Edgar)" entitled "Victor could", as my way of giving myself something easy.,XDXD you see, after doing the japanese cover, I was like "darn, japanese songs are so hard to cover coz they make use of rich, long and modified chords" like B#m7sus/A and G#m_no3rdString.,.,,.fudge!!!.,.,., doing 'Victor could' that plays G,Em,C,D over and over again felt like a cool water on a summer's day..,XD

Planning to upload those, at the same time., before the formal semester starts.,
________________________________________________________

I really wanted to study at the University of the Philippines, which was miles away but still in the philippines, but mom was ill during the time when it was the last day of making the decision regarding where to study., I couldn't be in a place far away from her knowing that she's aching.,.,

so here I am., not that i'm regretting anything., i ended up being in a great university and i love my mom.,..,it's just that personally.,., I wanna stay healthy., coz when the day comes that i'd already have a kid who's about to make that decision on where to continue his studies.,I wouldn't want to be sick so as to keep him from chasing his dream... so let's get those six pack abs neithan.,XD!! haha.,
________________________________________________________

i love you guys a lot., **hugs*

P.S.

the blue writings on the first pic., mmm., those are my reminders.,XDXD i kinda just write them in the mirror coz it's big and i can't NOT notice it everytime i get ready for the day., =]

i love you guys a lot again., **hugs*

◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇