Pinoy Thread v.4

Status
Not open for further replies.

TechnoMagus

Registered User
英雄メンバー / Eiyuu Menbaa / Hero Member
Joined
Jan 13, 2007
Messages
1,970
Reaction score
27
Gender
Hidden
Country
Antarctica
Re: The Pinoy Hang Out Thread v. 4

re: names
nag-search ako sa friendster ng pangalan ko... then to think that TWO other pinoys have the same name! wtfh!!!!

@all progs out there (esp yonie-sama)

eto na bago kong prob. pano ipaparse ang string to date? here's the lines of code:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection cn = DriverManager.getConnection("jdbc:odbc:DataBase","","");

Statement st = cn.createStatement(
ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
//commandline to get item from database
ResultSet rs = st.executeQuery("SELECT * FROM tblTrans WHERE R_Name ='"+tfFirst.getText()+"' AND R_Last = '"+tfLast.getText()+"'");

rs.last(); //gets last string
rs.beforeFirst(); //gets topmost value

while(rs.next()) //gets all values returned
{
vnum = rs.getString(1);
vtitle = rs.getString(4);
vquantity = rs.getString(6);
daterent = rs.getString(7);
returned = rs.getString(10);

fillunreturned(ctr); //ignore this; it's for filling up a table
ctr++;
}
System.out.println("vnum"+vnum);
System.out.println("returned"+returned);


System.out.println(""+D); //prints out the date

SimpleDateFormat sdf1 = new SimpleDateFormat("M dd yyyy", Locale.getDefault()); //date format
String dateToReturn = sdf1.format(returned); //problem area, should format the string into date
System.out.println(""+dateToReturn);

please help...
re: code
use the wrap code tags when posting code like this....
Code:
Hello World! :o :D
para hindi ganito lumabas... :o :D

re: parsing...have you checked the classes under java.text at java.util.regex ?


re: names
ako nga ilang pages ata ung kapangalan ko... :notrust
tapos meron pang p0rn star :grin at saka example sa accounting book!! WTF!!!!!!
 
Last edited:

hunter71485

Registered User
MH中毒 / MH Chuudoku / MH Addicted
Joined
Sep 6, 2006
Messages
5,483
Reaction score
462
Age
41
Gender
Hidden
Country
Storm's End
Re: The Pinoy Hang Out Thread v. 4

ok.... thx for teh wrap-up codes thingy. di ko talaga alam ang vbulletin...

@java.text & java.util.regex

ginamit ko na lahat... no use...
 

Paper

Registered User
有名人 / Yuumeijin / Celebrity
Joined
May 3, 2006
Messages
3,814
Reaction score
252
Gender
Male
Country
Earth Kindom
Re: The Pinoy Hang Out Thread v. 4

@names- thats one of the reasons why i chose my name.....i googled it and i only got my profile pages from blogspots and forums :XD
 

TechnoMagus

Registered User
英雄メンバー / Eiyuu Menbaa / Hero Member
Joined
Jan 13, 2007
Messages
1,970
Reaction score
27
Gender
Hidden
Country
Antarctica
Re: The Pinoy Hang Out Thread v. 4

@names- thats one of the reasons why i chose my name.....i googled it and i only got my profile pages from blogspots and forums :XD
pati ung iba mo pang aliases? like ...ikari.... ooops! :grin

ok.... thx for teh wrap-up codes thingy. di ko talaga alam ang vbulletin...

@java.text & java.util.regex

ginamit ko na lahat... no use...
well, imho, all the building blocks are there! just the matter or reconstructing it! regular expressions are VERY powerful!
in fact u have to use lex and yacc in c to get that functionality in java! pattern searching lang naman yan d ba? no complicated grammars? if so...the regex classes are all u need! sakit nga lang ng ulo ung pag-come up ng right pattern, hehehe...:D kaya mo yan! :kkthumbs
 

Paper

Registered User
有名人 / Yuumeijin / Celebrity
Joined
May 3, 2006
Messages
3,814
Reaction score
252
Gender
Male
Country
Earth Kindom
Re: The Pinoy Hang Out Thread v. 4

@KTS: bwwaarrrggghhh!!!!! :pwned :guns :laser :chair :smack :spank :fishslap :fry :bash ;bash
 

hunter71485

Registered User
MH中毒 / MH Chuudoku / MH Addicted
Joined
Sep 6, 2006
Messages
5,483
Reaction score
462
Age
41
Gender
Hidden
Country
Storm's End
Re: The Pinoy Hang Out Thread v. 4

@KTS

tomorrow na deadline... nasa isip ko nang i-drop ang project...T_T
 

Musashi Gen

Registered User
英雄メンバー / Eiyuu Menbaa / Hero Member
Joined
Nov 3, 2006
Messages
507
Reaction score
1
Gender
Male
Country
Philippines
Re: The Pinoy Hang Out Thread v. 4

@ bakashinjinsan > san ako makabasa sa manga version ng BECK?!? BTW, accept my YM invite...hehehe
 

hunter71485

Registered User
MH中毒 / MH Chuudoku / MH Addicted
Joined
Sep 6, 2006
Messages
5,483
Reaction score
462
Age
41
Gender
Hidden
Country
Storm's End
Re: The Pinoy Hang Out Thread v. 4

YM? may YM kayo?! ako wala....(pero yahoo! mail ang gamit ko...)
 

bakashijinsan

Registered User
英雄メンバー / Eiyuu Menbaa / Hero Member
Joined
Sep 20, 2006
Messages
1,660
Reaction score
9
Gender
Male
Country
Philippines
Re: The Pinoy Hang Out Thread v. 4

@MG

Try Mangatrades dude. Dami naman dun e. Or Vnmanga.

Na-accept na kita sa YM! :D
 

hunter71485

Registered User
MH中毒 / MH Chuudoku / MH Addicted
Joined
Sep 6, 2006
Messages
5,483
Reaction score
462
Age
41
Gender
Hidden
Country
Storm's End
Re: The Pinoy Hang Out Thread v. 4

@MG
meron din sa mangavolume.com....


MAJOR EDIT:

tapos na problema ko sa parsing ng date. langya. substring lang pala ang hinahanap ko. ngayon nako-compare ko na ang mga dates ngayon, hindi ko na sina-subtract; ang ginawa ko e if-else statement tulad ng ganito...
if(currentMonth <=recordedMonth)
{
if(currentDay <= returnDay)
{
penalty = 0;
}
else
{
penalty = 50;
}
}
else
{
penalty = 50;
}

and IT WORKS! ang problema na lang e kung mai-apply ko yan within 8 hours kasi tomorrow 10 AM ko ipe-present yan.... -.-;
 
Last edited:

TechnoMagus

Registered User
英雄メンバー / Eiyuu Menbaa / Hero Member
Joined
Jan 13, 2007
Messages
1,970
Reaction score
27
Gender
Hidden
Country
Antarctica
Re: The Pinoy Hang Out Thread v. 4

@hunter
seems that the simplest way is the best way! kaya yan! :kkthumbs

re: latest bleach dub
quote ko lang ung comment ko sa ep....
I see a glimmer of hope when i heard ukitake's dub...and ichigo's mom too...makes up for the grand fisher's dub and the other shinigami...and oh, yasmien actually went the extra mile in the scene where she's torn between helping ichigo or not!...everything else...'nuff said...
bakit naman kc ang dinub ng mga starstruck e ung mga bida/regulars?!?!? mas maganda, ung mga hollow na lang at saka ung mga pasulpot-sulpot na extra characters na lang--esp ung mga magiging bagong mod-souls! :grin
kung ganun, maski lahat pa ng starstruck sa lahat ng batch, mapagtitiyagaan ko ung dub nila!
pero mas bagay ung sa hollow cla kase tsinutsugi rin sila after a few scenes! harharhar....i don't have to say that they deserve it.... :loool
 
Last edited:

baboysai

Pink Warrior
伝説メンバー / Densetsu / Legendary Member
Joined
Nov 11, 2006
Messages
13,956
Reaction score
2,293
Gender
Female
Country
Philippines
Re: The Pinoy Hang Out Thread v. 4

@MG, pwede online reading sa Spectrum.net. Dun ko siya una naencounter, akshally.

@l4pb, ang touching naman ng story ng band mo hehe. Inspired by beck.

@KTT, want a roman sounding name that ends with -us? Technomagus. :loool
anyway, maganda ba ang lupin? Is it the same lupin as the anime?

-
hey! Di ko napansin, Hero member na pala ako haha.

Gising pa ko guys- di na ako matutulog kasi 3 am I'll be heading for the airport and goodbye internet nanaman. -_- Siguro mga May 5 pa ako ulit makakanet. How sad. Makakailang pages na kaya ang Pinoy Hang out?
 
Last edited:

hunter71485

Registered User
MH中毒 / MH Chuudoku / MH Addicted
Joined
Sep 6, 2006
Messages
5,483
Reaction score
462
Age
41
Gender
Hidden
Country
Storm's End
Re: The Pinoy Hang Out Thread v. 4

@lupin
mukhang tanga si janno gibbs. siya yung zenigata equivalent ng lupin iii. inspector clavio?! lalaking-lalaki ang pangalan tapos mahilig tumili... anyways, yung mga taong tulad ko lang ang hindi makaka-"see thru the disguise" nila....(halos makabangga ko na si iwa moto ng harapan di ko pa nakilala...)
 

yoniekai

Manga Editor
有名人 / Yuumeijin / Celebrity
Joined
Jul 24, 2006
Messages
3,799
Reaction score
405
Gender
Male
Country
Philippines
Re: The Pinoy Hang Out Thread v. 4

go golden state! go chicago!!! :D

@bbsai: i saw your blog, cant help posting something :)

@lupin: who cares? EHRA. KATRINA. dont cancel the show!

@hunter: medyo naconfuse ako sa code m, kase sabi m c1, supposed to be cal1 :sweat, anway

import java.util.*;

public class Example {
public static void main(String[] args) {
Calendar cal1 = new GregorianCalendar(2006, Calendar.APRIL, 1);
Calendar cal2 = new GregorianCalendar(2006, Calendar.APRIL, 3);
rollback(cal1);//resets time to 12 midnight
rollback(cal2);//resets time to 12 midnight

long diff = cal2.getTimeInMillis() - cal1.getTimeInMillis(); //converts dates to milliseconds, then does difference function
long millisPerDay = 1000 * 60 * 60 * 24;//converts day to milliseconds
long days = diff / millisPerDay;
long remainder = diff % millisPerDay; //gets number of days
long remainderMillis = remainder % 1000;
remainder /= 1000;
long remainderSeconds = remainder % 60; //gets seconds
remainder /= 60;
long remainderMinutes = remainder % 60; //gets minutes
remainder /= 60;
long remainderHours = remainder; //gets hours

System.out.println("days="+days+" hours="+remainderHours+
" minutes="+remainderMinutes +"seconds="+remainderSeconds+
"millis=%d"+remainderMillis);
}
//resets the day's clock to midnight
static void rollback(Calendar cal) {
cal.set(Calendar.HOUR_OF_DAY, 0);
cal.set(Calendar.MINUTE, 0);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
}
}

OUTPUT:
days=2 hours=0 minutes=0 seconds=0 millis=0




ang gusto kong mangyari e ganito:
ung c1 yung date rented (yung date na in the records), ung c2 e yung current date (yung kukunin ng program). ngayon dahil 'static' ang c1 at c2, hindi ko siya magamit sa pagcompute ng penalty rate ng video system.

at dahil ang c1 ay kukunin pa sa records, naka-String format pa siya. hindi ko siya mai-parse sa integer, samantalang ang c2 ay naayos ko na.

i usually dont use the library as i always end up "reinventing the wheel" (which is bad) but you you need to separate the values in order for a successful parsing. plus i think it's better to use objects than methods as polymorphism will be most useful in this prob :amuse

@names: ang weird ng mga names ng anak niyo! haha. i dont know, i dont plan on having kids... nor a wife... i dont want burdens! let me be free to "socialize" with anybody i want :jk
 

miyi

Registered User
英雄メンバー / Eiyuu Menbaa / Hero Member
Joined
Mar 12, 2007
Messages
625
Reaction score
25
Gender
Male
Country
United States
Re: The Pinoy Hang Out Thread v. 4

yoniekai, you follow basketball too? that's awesome, there's so little activity in the sports section, I get lonely in there. So if you're bored and want to talk about sports, don't hesitate to visit there.

How about the Lakers huh? it's becoming a series again, I thought they were completely done for a little bit.

anyway, I'm just stopping by. Ang galing nyo talaga, nasa page 6 na tayo!

ok, venting moment:

I have so much homework, I'm stressing out. Midterms in 4 days, and it's so loud in my house I can't concentrate/study. [/rant]
 

yoniekai

Manga Editor
有名人 / Yuumeijin / Celebrity
Joined
Jul 24, 2006
Messages
3,799
Reaction score
405
Gender
Male
Country
Philippines
Re: The Pinoy Hang Out Thread v. 4

i didnt notice there was a sports section :sweat, okay im definitely going there
 

hunter71485

Registered User
MH中毒 / MH Chuudoku / MH Addicted
Joined
Sep 6, 2006
Messages
5,483
Reaction score
462
Age
41
Gender
Hidden
Country
Storm's End
Re: The Pinoy Hang Out Thread v. 4

sports are only exciting to watch when they're already playing for championship.^^;
 

mangadictus

Intl Translator
有名人 / Yuumeijin / Celebrity
Joined
Mar 9, 2006
Messages
3,217
Reaction score
225
Gender
Hidden
Country
Abu Dhabi
Re: The Pinoy Hang Out Thread v. 4

whuZAAAAAAAAAAA!!! Taena what a day! 4 tooth extractions, 8 pastas and cleaning.. grabe! ang sayang magpasampal! wekkekeke
 

hunter71485

Registered User
MH中毒 / MH Chuudoku / MH Addicted
Joined
Sep 6, 2006
Messages
5,483
Reaction score
462
Age
41
Gender
Hidden
Country
Storm's End
Re: The Pinoy Hang Out Thread v. 4

@MD
grabe naman yan... kulang na lang full denture na ...
 

TechnoMagus

Registered User
英雄メンバー / Eiyuu Menbaa / Hero Member
Joined
Jan 13, 2007
Messages
1,970
Reaction score
27
Gender
Hidden
Country
Antarctica
Re: The Pinoy Hang Out Thread v. 4

MD! musta na? grabe kelangan bang gawin yan para sa kuwait?
 
Status
Not open for further replies.
Top