=== apogee is now known as ApOgEE | ||
ApOgEE | salam | 05:03 |
---|---|---|
excalibr | ApOgEE~ | 07:14 |
ApOgEE | oit excalibr | 07:18 |
excalibr | lama tak nampak kat sini | 07:18 |
ApOgEE | bizi | 07:19 |
excalibr | projek penuh tangan eh | 07:19 |
excalibr | hehe | 07:19 |
ApOgEE | boleh la.. alhamdulillah | 07:19 |
ApOgEE | apa cerita | 07:20 |
ApOgEE | ? | 07:20 |
fairuz | salam, helo rakan2 | 07:21 |
ApOgEE | http://tolololpedia.wikia.com/wiki/Halaman_Utama | 07:27 |
ApOgEE | salam fairuz | 07:27 |
fairuz | wsalam ApOgEE | 07:28 |
fairuz | website apa tu ApOgEE | 07:31 |
ApOgEE | haha... entah hapa tah | 07:34 |
ApOgEE | http://tolololpedia.wikia.com/wiki/Bahasa_Kelantan | 07:40 |
ApOgEE | entah apa2 entah | 07:40 |
excalibr | hahaha | 07:45 |
excalibr | lwk la pulak | 07:45 |
fairuz | haha | 07:53 |
ApOgEE | asalnya aku jumpa mende ni http://uncyclopedia.wikia.com/wiki/Main_Page | 08:02 |
ApOgEE | wiki yang karut ... haha | 08:02 |
excalibr | eh yg *dramatica tu dah takde ke | 08:04 |
excalibr | lupa nama wiki tu | 08:05 |
ApOgEE | http://encyclopediadramatica.se/Main_Page | 08:08 |
excalibr | ApOgEE: ko reti python kan? nak tanya byk soalan newbie boleh tak | 08:09 |
ApOgEE | excalibr: tanya la | 08:13 |
excalibr | aku baru berjinak2 dgn py. skrg stuck degn konsep class :( | 08:16 |
excalibr | apa tujuan prefix "self." kat variabe dlm func dlm class | 08:16 |
ApOgEE | self tu maksudnya instance class tersebut | 08:18 |
excalibr | mmg kena letak ke | 08:19 |
excalibr | yg self kat def tu pulak? def play(self): | 08:20 |
ApOgEE | ia untuk variable yg ko nak pakai kat dalam kelas tersebut | 08:20 |
ApOgEE | self tu merujuk kepada instance kelas ko | 08:20 |
ApOgEE | misalnya ko buat kelas kereta | 08:21 |
ApOgEE | kelas tu hanya acuan.. | 08:21 |
ApOgEE | bila ko instantiate class tu, ia jadi objek | 08:21 |
ApOgEE | objek tu la yang ko guna untuk method dan variable yg ada dlm kelas | 08:21 |
ApOgEE | cth: class kereta | 08:22 |
ApOgEE | objek: kancil = new kereta | 08:22 |
ApOgEE | objek 2: kenari = new kereta | 08:22 |
ApOgEE | objek 3: kelisa = new kereta | 08:23 |
ApOgEE | self merujuk kepada objek kancil, kenari atau kelisa | 08:23 |
excalibr | mm..i think i get the idea | 08:24 |
ApOgEE | bagus | 08:24 |
ApOgEE | self is an object reference to the object itself, therefore, they are same. Python methods are not called in the context of the object itself. self in Python may be used to deal with custom object models or something. | 08:25 |
excalibr | variable yg kita set dlm func tu global ke | 08:25 |
excalibr | boleh di akses dari func lain dlm class tu? | 08:26 |
ApOgEE | ya, variable tu boleh diakses | 08:31 |
ApOgEE | excalibr: ni contoh http://pastebin.ubuntu.com/993823/ | 08:37 |
excalibr | baiknya cikgu ni siap bagi contoh lol | 08:37 |
ApOgEE | hehehe | 08:38 |
ApOgEE | takut tak paham... | 08:38 |
excalibr | oh tulis print(..) pun boleh gak eh | 08:40 |
ApOgEE | aku kenkadang tersasul guna bahasa Gallifreyan, tu yg takut orang tak paham tu.. :P | 08:42 |
excalibr | haha | 08:43 |
fairuz | online compiler/intepreter http://ideone.com/Gg0xs :) | 08:43 |
excalibr | yg variable scope tadi tu | 08:43 |
excalibr | global dlm satu script tu ke atau class tu je..klu nak buat local..scope dlm def atau class | 08:44 |
ApOgEE | fairuz: cool... | 08:44 |
excalibr | camna? | 08:44 |
ApOgEE | excalibr: global dalam skrip tu pun boleh.. yg penting ko letak object name kat depan... mcm cth aku mm.myval tu | 08:46 |
ApOgEE | myval tu adalah variable dalam kelas kereta yg dicipta ketika __init__ | 08:46 |
ApOgEE | kemudian aku boleh panggil/guna dalam function tambah dlm kelas sama dgn guna self. | 08:47 |
ApOgEE | kemudian aku boleh guna dalam skrip juga dgn letak nama objek 'mm' kat depan dia | 08:47 |
ApOgEE | so, kat mana lagi nak diglobalkan? | 08:48 |
ApOgEE | luar skrip? | 08:48 |
excalibr | jap.. init ni otomatik di call ke masa kita run mm = kereta() | 08:49 |
fairuz | excalibr: Pakai py untuk apa tu. | 09:42 |
ApOgEE | excalibr: __init__ tu class constructor. ko tau object oriented tak? kalo tak tau, sila buat homework.. | 10:08 |
ApOgEE | ok, aku nak balik dah.. see u later | 10:08 |
excalibr | fairuz: saje-saje belajar..buat scripting kat server | 11:21 |
fairuz | oo | 11:52 |
fairuz | sampai pakai class tu buat scripting. :D | 11:53 |
fairuz | wb EgyParadox | 12:04 |
EgyParadox | thanks fairuz | 12:04 |
fairuz | EgyParadox: I think you always hang out on #git? Please teach me how to push a new change on gerrit. :) | 12:06 |
EgyParadox | no I sadly dnt | 12:06 |
fairuz | Oh, it was hyperair, sorry :) | 12:07 |
fairuz | hyperair: ping | 12:07 |
excalibr | fairuz: curious sbnarnya..tengok skrip org lain ada class..aku tak pernah main dgn oop | 12:12 |
excalibr | tbh | 12:12 |
fairuz | oo | 12:13 |
fairuz | Aku slalu scripting pakai bash ja. :) Tak pernah lagi scripting pakai python. Pakai python untuk buat graph ada la. | 12:13 |
excalibr | umm bash ok la..tapi ada benda tak leh buat dgn bash | 12:15 |
excalibr | mcm floating point arithmetic | 12:16 |
fairuz | excalibr: yup betul. Aku setakat nak launch beberapa command dengan nak buat processing log ja | 13:07 |
fairuz | tak buat kira2 yang precise sangat | 13:07 |
fairuz | excalibr: tapi untuk float, bleh pakai bc | 13:11 |
fairuz | contoh mcm echo '4/5' | bc -l | 13:12 |
penreturns | \o/ | 13:54 |
hyperair | fairuz: pong | 13:58 |
fairuz | hyperair: Baru nak tanya pasal gerrit, tapi mcm dah ok. :) | 13:58 |
hyperair | oh okay =) | 13:59 |
hyperair | i haven't used gerrit before, so can't help anyway | 13:59 |
fairuz | :) | 13:59 |
fairuz | By the way, I have this commit-msg hook where it adds a change-id (for gerrit). I just added this hook, so my old commits don't have the change-id in them. How to make git apply the hook to the old commits? A rebase? | 14:02 |
penreturns | oh | 14:03 |
penreturns | salah masok channel | 14:04 |
hyperair | fairuz: filter-branch | 14:06 |
hyperair | fairuz: but i don't think you can use the hook as is without modifications. | 14:06 |
fairuz | hmm | 14:11 |
fairuz | I will try to rebase first since it's easy and I can see if the hooks are called or not. | 14:26 |
fairuz | hyperair: Normally, why people use filter-branch? | 14:26 |
fzlamn | woot woot... | 14:39 |
fairuz | fzlamn: woot | 14:40 |
penreturns | weewweetttttttttttttttt | 14:40 |
fzlamn | oit.. ko buat apa? layan radio ek. | 14:42 |
penreturns | haah | 14:43 |
penreturns | hehhehe | 14:43 |
penreturns | ngan susah sebut kat wassap | 14:43 |
penreturns | :p | 14:43 |
hyperair | fairuz: because filter-branch is automated? | 23:20 |
hyperair | fairuz: with rebase you would need to commit --amend each one. | 23:20 |
hyperair | also, if you don't do your rebases correctly, you'll end up squashing your history into a flat one | 23:21 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!