顯示具有 WJ Working Journal 標籤的文章。 顯示所有文章
顯示具有 WJ Working Journal 標籤的文章。 顯示所有文章

2012年5月26日 星期六

2012年5月25日 星期五

Programming Working Journal

Check-in: tired, but look forward to the day of programming.

Planned 07:00-13:00 6h

- JS finish Steve's assignment
- JQuery finish Steve's assignment
- Re-build TEDxGongguuan

JS Steve's assignment

List of mistake:
- First append, and then change style.
- Get stuck because of typo of word
-> Use double click to check the variable
-> Must seriously think about getting it more compact

JS-> getElementById vs. directly calling the variable, needs the former to insert text node.

Attack:
1. http://www.w3schools.com/jsref/dom_obj_style.asp
2. Just refer to Steve's original assign.

a. Use table
b. Use border

2012年5月23日 星期三

Programming Working Journal

Check-in: Full and a bit tired.

Actual: 09:15- 11:30 2h15min
Get long time error because the clause wasn't within body.

Planned Schedule: 09:15-12:00. 2h 45.

Finish w3 school about Javascript part.

- difference between break and continue
-> continue break loop, for the next loop.

- Object; For...in statement
->var person={fname:"John",lname:"Doe",age:25};
var x;
for (x in person)
{
document.write(person[x] + " ");
}



2012年5月21日 星期一

Programming Working Journal

Check-in: Full. A bit tired.
attack plan 20 h DP.
- start with Steve's tutorial, and exercise.
- went through w3 school quickly
- rebuild TEDxGongguan.com

Actual
20:50-23:00 w3 school

Planned Schedule:
20:50-23:30 revisit Steve's tutorial



Goal:
JQuery/Java Script
Download HTML 5.


Steve's Tutorial week 6 JQuery

Steve's Assignment week 6

w3
- try .js, external javascript file 
- Case sensitive.
- document.getElementById('x').innerHTML="y"
->Change x to y.
- document.write(x)
-> seems to be how to echo something in JS
- If you add a number and a string, the result will be a string!

-variable=(condition)?x:y
- a=[1, 2, 3, 4]
-> That's how to write array

- switch(){
 case 1:
 case 2: document.write("this is good");
 break;
}

2012年5月19日 星期六

Programming Working Journal

Check-in:

Actual 07:00-11:30 (- 1h breakfast+snakes)


Good job on nailing most of the function, and get a lot of practice. You know how to use the basics of them, add oil. Remember the joy of writing for($i=0, isset($a[$i]), $i++)!
 
add oil muyueh, one step at the time.
Be so good that they can't ignore you.



07:00-11:30 4h30
Need to finish all term, and practice practice practice.





Baptiste mentioned that a good programming, apart from the execution detail; should really be how one look at the big picture of the problem.
-> He is continued exposed to positive swarm effect.

Continue on the log in page problem:

- whether it is possible to write one empty check code for both password and name
-> Kind of a variable filed
- Do we/how to md5 the password before it is even it is send out?
-> might need to dis-activate the field.



2012年5月18日 星期五

Programming Working Journal

Check-in: 6:10 am A bit hungry, but feeling great to be able to start the day that early.

Actual:
Good morning start, the effect was great. Just don't get distracted.
Spend 2 h on figure out how to send question on stock overflow, have not succeeded yet. 

06:30- 12:30 Continue to break the Thursday list ( 90 min)
Practice, practice and practice the skill
re-write the log-in system.


Question that remains unsolvable after 1 hour:
How add/remove quotation mark?

So that I can do the following:

echo substr('abcdef', 0, -3); // expecting output: abc
echo addquote(substr('abcdef', 0, -3)); // expecting output:substr('abcdef', 0, -3)

2012年5月17日 星期四

Programming Working Journal

Check-in: Tired, but fine.

Actually:
20:40-23:26 (-20 min nap) Great! Make some major progress with term you didn't know before : )
Schedule:
20:40-23:40 (3h) Google unknown term/method of the log in system, rewrite it.
Trim; md5; function, false-true variable

Reading https://github.com/simfatic/RegistrationForm/blob/master/source/include/fg_membersite.php

Need to understand the following, get a quick google search, and practice to use it to write code:
- define
 http://www.w3school.com.cn/php/func_misc_define.aspdefine("Aaaa", "Hello world")
echo "Aaaa";
-> appear Hello world
- array_push
-> add multiple things to the end of array
array_push($a, "tik", "nik");
-> $a([5]->tik, [6]->nik)
- print_r($a)-> return everything of the $a array!
- print
To be exploredhttp://php.net/manual/en/function.print.php
- $bret?sometimes refer as $bRetMight be the same thing as boolean return ($breturn)
- $this->sitenamehttp://stackoverflow.com/questions/1523479/what-does-the-variable-this-mean-in-php"The pseudo-variable $this is available when a method is called from within an object context." from php.net
It is used under an object oriented environment.I guess my question was, why do we need $this.
Then, it make sense to use it as the following show: 
function a($x){ return $this->error_hash;}
As the function can be later been called within a class.
related: difference between self and $this http://stackoverflow.com/questions/151969/php-self-vs-this
more on object oriented programming:
http://www.phpfreaks.com/tutorial/oo-php-part-1-oop-in-full-effecthttp://www.phpfreaks.com/tutorial/oo-php-part-1-oop-in-full-effect
Otherhttp://en.wikipedia.org/wiki/Php#Release_historyhttp://us3.php.net/manual/en/language.oop5.basic.php

- !isset
isset is use to see whether a variable has been set
-> if it is "unset" or equal to "null" it will return with false
http://php.net/manual/en/function.isset.php
- empty
http://php.net/manual/en/function.empty.php
empty= isset+ "" + $a=0 +false
http://php.net/manual/en/function.empty.php

-----------------------------2012.5.19 --------------------------------------------------------------

- substr(md5(uniqid()),0,10)
-> substr is a difficult one.


- if(!result|| mysql_num_rows($rows)<=0)
-> mysql_num_rows() and mysq_affected_rows()
the former for counting the number we have last SHOW or SELECT;
and the later includes number for INSERT, DELETE and other.
http://php.net/manual/en/function.mysql-num-rows.phphttp://www.php.net/manual/en/function.mysql-affected-rows.php

- return true/falsePracticing.
- explodehttp://php.net/manual/en/function.explode.phpcut down string into array of substring.
explode(" ", $sting)
<?
$strin="This is a wonderfull day ";
$strin2= array(3, 4, 5, 6, 9);
$strin3=315634223233233;
$strin4="Taiwan (i/?ta??w??n/ ty-wahn; Chinese: 臺灣 or 台灣; pinyin: Taiw?n; see below), officially the Republic of China (ROC; Chinese: 中華民國; pinyin: Zh?nghua Minguo), is a state in East Asia. Originally based in mainland China, the Republic of China now governs the island of Taiwan (formerly known as Formosa), which forms over 99% of its current territory,[f] as well as Penghu, Kinmen, Matsu, and other minor islands. Neighboring states include the People's Republic of China to the west, Japan to the east and northeast, and the Philippines to the south. Taipei is the capital city and economic and cultural centre of the country,[1] and New Taipei is the most populous city.";
$tran_space=explode(" ",$strin);
print_r($tran_space);
echo "</br></br></br>";
//$tran _null=explode("",$strin);
//print_r($tran_space);
//echo "</br></br></br>";
$tran_array=explode(",", $strin2);
print_r($tran_array);
echo "</br></br></br>";
$tran_3=explode("3", $strin3);
print_r($tran_3);
echo "</br></br></br>";
$tran4=explode("Taiwan", $strin4);
print_r($tran4);
echo "</br></br></br>";
$tran5=explode(".", $strin4);
print_r($tran5);
?> 

- strlen()
http://php.net/manual/en/function.strlen.phplength of string;
"Null"=0
"-2"= 2
"Hello world"=12
- Difference between 'apostrophe' and "Quotation"
->Can use variable ($a->7) in the Quotation, while within apostrophe, variable remains the same($a->$a)
http://bytes.com/topic/php/answers/750143-difference-between-quotation-apostrophe-php
 - preg_match
search for a regular expression http://php.net/manual/en/function.preg-match.phpI am still not familiar with regular expression; this will help me to write filter; and e-mail related function.related: in_array() search an array for a specific value.
-is_numerichttp://php.net/manual/en/function.is-numeric.php

-require_once("class,phpmailer.php");




There is something interesting about this expression, study it more: 


<?php
$tests 
= array(
    
"42",
    
1337,
    
"1e4",
    
"not numeric",
    array(),
    
9.1);

foreach (
$tests as $element) {
    if (
is_numeric($element)) {
        echo 
"'{$element}' is numeric", PHP_EOL;
    } else {
        echo 
"'{$element}' is NOT numeric", PHP_EOL;
    }
}
?>






2012年5月12日 星期六

Programming Working Journal

2012.5.13

Reflection: Reading new code is actually complex, get to distracted about every detail. Spend a lot of time learning what "class" is (still not sure how to use private class). Need to have higher ratio of omission.

Current step for learning new part:
Get Broad picture first(Neglect everything unless you are stuck. )-> Look at line of code from the most important part-> List down what you don't understand-> Break and Conquer 

List of outstanding:
- Understand $this
- Understand private and public class
- Practice the above mentioned.

Check-in:
7:40 am wake up
08:00-09:20 Writing about KK and thoughts about programming. Actual.
09:20-12:30 Deliberate Practice on:
  1. log-in system;  Actual.(But is still there.)
  2. think about how to reproduce Market Intelligence Platform
    a. log-in system
    b. what you see is what you can change (Google Site superficial)
    c. Newsletter Form
    d. automatically generate new page
    e. tag; crossed-tag analytic
    f. RSS feed auto-capture
Afternoon: Read, Get some sport and write. Actual(walk 90 min, write, watch TED).
18:00-22:00 Deliberate Practice  Actual(21:00-23:00) 

Resource:
Using 'this' and '$this'
http://stackoverflow.com/questions/7234282/what-is-the-reason-for-var-this-this

Random String
Random String-> Usually created with a string+timestamp
Use random string to md5 hash with password


http://www.random.org/strings/?num=1&len=15&digits=on&upperalpha=on&loweralpha=on&unique=on&format=html&rnd=new


Watch later:
http://www.netmagazine.com/features/2011-review-15-web-conference-talks-you-need-watch

2012年5月6日 星期日

Programming Working Journal

2012.5.6

Target:
- Need log in to see content.
- Practice AJAX

Read "我是亞桑傑" (Julian Assange: The Unauthorised Autobiography)
Information helps to form multi-narrative, and this is important.
Needs to be a great hacker to build a secure mechanism. He has been hacking since he was 16, reaching  10 years/10,000 hours of practice very early.

Interested to know that he doesn't seem to have any interaction with the Chinese internet, given that he seems to have hacked many major network, this seems very strange.

Wikileaks had a lot of information, and he seems to have a way to proceed through 70,000 entries. The way of how he organized the data might be very interesting.

List of absorbing:
Complete package about login on github.
https://github.com/simfatic/RegistrationForm#readme

Read Getting Real
https://gettingreal.37signals.com/

Read out of control
http://www.kk.org/outofcontrol/


Trim: a php function that removes white space.
Usually used for password so that white space can be removed.
http://www.w3schools.com/php/func_string_trim.asp

Form and check box best practice
http://www.html-form-guide.com/php-form/php-form-checkbox.html
- Dynamics form
- Hide password
- Multiple Check box
- Check whether a sample is checked

Login form using PHP
http://www.html-form-guide.com/php-form/php-login-form.html
Complete package about it on github:
https://github.com/simfatic/RegistrationForm


Passing php variable
http://www.html-form-guide.com/php-form/php-form-variables.html

Session Best Practice
http://www.html-form-guide.com/php-form/php-order-form.html

2012年4月30日 星期一

Programming Working Journal

2012.5.1

Check-in: 10:20 am
Full with breakfast, not that much awake, but ready.

10:20- 13:20 (3h) Re-work on the back-end function, revised php my admin revised/select/add function.
Cannot see if it is not log in, admin.
14:30-19:00 (4h 30) Use AJAX to rebuild the wall function


2012年4月28日 星期六

Programming Working Journal

Check-in: 12:34 pm
Back from Hannover Messe, Germany. A little bit messy in the table, bit tired, but good mood. Thinking that even there is so much trouble, but I can have a bunch of free time focus on programming makes me smile.

Goal today:
13:00-18:00
Make a board.
- Add function such as 隱藏.
- Be as user friendly as wretch.
- Create a back-end administrator system.
- Study how wretch do it.

Make a facebook copy.
- "leave a message" appears clicking the button, using AJAX

19:00-21:00
TEDxGongguan
Reply e-mail and other

2012年4月15日 星期日

Programming Working Journal

Check-in: pleine forme

Actual:
09:40-13:00
15:00-19:00 finish mysql database update, session setting

Schedule:
- 09:40-13:00 3h php mysql finish homework; interfacing with tedxgongguan
- 14:00-19:00 5h Javascript JQuery homework

Next working session will be 5/5- 5/6

Still need to figure out how to config phpmyadmin on the internet
http://phpbb-tw.net/phpbb/viewtopic.php?t=16221
http://www.hmes.kh.edu.tw/~jang/phpmyadmin.html

2012年4月14日 星期六

Programming Working Journal


Check-in: okay, just read articles concerning productivity on study hack. Wish to implement it.

Actual
- 11:00-12:00
- 14:00-16:00 3h on Karel the Robot

- 19:00-23:00 MySQL database; initiation
   yet to learn how to use php to communicate with database.

Schedule:
- 11:00-13:00 Javascript  CS 106a
- 14:00-17:00 MySQL database; initiation
- 1900- 23:00 The basic, create at workable database for TEDxGongguan.com
/blue print on how to use to create a page administrator.


For phpmyadmin:
start with this:
http://elearning.stut.edu.tw/media/dreamx/db/db_phpmyadmininstall.htm
http://www.php-mysql-tutorial.com/wikis/mysql-tutorials/getting-started-with-mysql.aspx


phpmyadmin initiation page:
http://localhost/phpmyadmin/index.php

Account for phpmyadmin: "root"


useful guide for phpmyadmin:
http://www.php-editors.com/articles/sql_phpmyadmin.php

2012年4月7日 星期六

Programming Working Journal TEDxGongguan.com

Check-in: 10:24

Goal: Build TEDxGongguan.com website

1. Start with the core function

- Ask people whether we can use the video
- Revised the video
- Complete the feedback form

2012年3月30日 星期五

Programming Working Journal

2012.3.31 10:30

Milestone: Successfully request facebook php, change the bug within the facebook php; w/ a registration page and the php page, successfully read the user's data.

http://lazzytour.net/muyueh/2012331/

Check-in: Calm, going to travel.

Goal for the spring vacation
- TEDxGongguan

- Get done with cadeacademy?
- Facebook Php require_login
- Paul Graham Translation.
- CS 106 a


Chinese Facebook Fans Page for website development.

http://projecteuler.net/
http://rails-101.logdown.com/

2012年3月21日 星期三

Programming Working Journal

2012.3.21

22:00 ok mood
Try out Facebook PHP for the last time. Otherwise, start working on TEDxGongguan website, and apply scholarship.

http://milkyapp.blogspot.com/2012/01/php-sdk-3-7.html
https://github.com/facebook/php-sdk/downloads
http://www.wretch.cc/blog/u2420123/213965

http://sofree.cc/output_buffering/

2012年3月17日 星期六

Programming Working Journal 2012.3.18

12:00 pm

Check-in: Nervous about being slow, and never seems to pull off one day.
I will be just fine, keep faith in yourself.

It seems like the biggest problem is that I have a doubt, on whether this is what I truly want to do for the long term. Present seems to be good enough.

This makes me think of why I want to learn programming. Because you have great observation and great idea. And sometime, you are the only one that is convinced that this is a great idea, so there are no people but you to test this idea.

And I guess that you are just curious to know, whether the idea will work or not. It is this kind of curiosity, that you will regret the day you died.

"What about that idea? Will that ever flies?"

Goal today: Need to finish facebook page function: people must log in to see.

Decide to go to hot spot and take a day off.