Thursday, July 2, 2015

While loop ( Example python 3.3)

While loop
If you want to keep running the same piece of  code many times in some specific condition, we could be provide loops method.

Loops must have the loop condition that may be true or false.
These of code is called loop body for a loop.






















answer = "no"    ---->     first declared  the variable answer for store a string  
while answer == "no":   ---> the loop condition
answer = input("Are we there? ")  --> The loop body
print("We're there!")   --> final out put 

























print ("Welcome!")
guess = 0
while guess != 5:
    g = input("Guess the number: ")
    guess = int(g)
if guess == 5:
    print("You win!")
else:
    if guess > 5:
        print("Too high")
    else:
        print("Too low")

print("Game over!")



Source form : Orelly Head First Programming

Tuesday, December 9, 2014

Regular Expressions: Special Characters

We need to using the following  attribute  when applying something  regular  expression object to describes a pattern of characters.



Monday, November 10, 2014

CSS selectors

CSS selectors

Selectors are important role for using CSS (Cascading Style Sheets) on web design.
Typically most common and widely selectors could been divided into 5 categories.


  • Types of selector Class
    ID, Universal and Pseudo-classes can be used to target different
    elements in HTML.
  • Class Selectors
    Classes can be applied to as many elements as you want, and CSS
    can be used to target them.
  • ID Selectors
    An ID can only be applied to one element in a document, and can be
    combined with classes.
  • Descendant Selectors
    Descendant selectors can be used to target elements based on the
    ancestors, for example a <h2> inside a <div> with a class of planet
  • Pseudo-Classes
    Pseudo-classes can be used to style elements based on user
    interaction, for example a link that has been visited.


Tuesday, October 7, 2014

PHP Full Text Search Error

When you run the php website involved to full text search  that might be occurs this problem.

SQL query :

 
$q = "SELECT uname,post_date,subject,message FROM forum WHERE MATCH (message) 
AGAINST ( '$target') ORDER BY post_date ASC";


“Warning: mysqli_num_rows( ) expects parameter 1 to be
mysqli_result, boolean"

Database engine type : innoDB


You need to choose Full Text Search for the table.



SQL syntax :

ALTER TABLE FORUM ADD FULLTEXT(column )

Example



ALTER TABLE table_test  ADD FULLTEXT(message_test)

Thursday, September 18, 2014

SHA1 encryption

When we have to involved to develop a interactive web site such as online forum or e commercial simultaneously we need to store and protect the information of user. Password security problem would be usually occurs to mostly website. Developer should be considered majority of scenario or circumstances for choosing a appropriate method for password encryption. SHA1('$p') is a function for protecting a password. The acronym SHA stands for Secure Hash Algorithm, which is a security measure created by the US National Security Agency. It instructs MySQL to encode the password by converting it to a string 40 characters.





 SQL syntax:


 VALUES (' ', '$fn', '$ln', '$e', SHA1('$p'), NOW() )";

Saturday, September 6, 2014

Shibuya Hikarie Gorgeous building short movie

Shibuya Hikarie

Gorgeous building short movie 
 The Shibuya Hikarie (渋谷ヒカリエ) is a Tokyu skyscraper and retail complex completed in 2012 and located in the Shibuya shopping district of Tokyo, Japan

Thursday, September 4, 2014

Max and Min-width Properties and Pre tag



Max and Min-width Properties and Pre tag


When we want to our website design or other web application suitable displaying for different device, you should be setting the max-width and min-width properties. Most of browser support ( IE7-> Firefox )

 
 
div {
min-width : 200px;
max-width : 500px;
padding : 5px;
border : 1px solid #000000;
}

 
 

If you would like to preserves both spaces and line breaks in your content.
Please  using the <pre>  tag

<pre>
Westlife

I Have A Dream

    :Bjorn Ulvaeus、Benny Andersson
    :Bjorn Ulvaeus、Benny Andersson

    I have a dream, a fantasy
    To help me through reality
    And my destination makes it worth the while
    Pushing through the darkness still another mile
    I believe in angels

  </pre>









Friday, June 8, 2012

Seafood set by Wong Chi Fung for JIA Inc

Seafood set by Wong Chi Fung for JIA Inc



yychen's 的頭像
Joined: 2010-05-26
Points: 76

Thursday, December 30, 2010

Cocoon - "Oh My God"





Directed by Roger Haus & Matteo Crinelli

Cocoon: Mark Daumail & Morgane Imbeaud.

Wednesday, December 22, 2010

BMW M3. 25 years.

Virgin Atlantic plane livery time-lapse movie


This is a time lapse video of a Boeing 747 being repainted with its new livery, designed by johnson banks. It takes 13 days. This video was made for Virgin Atlantic by Vivid Photo Visual.

Tuesday, December 21, 2010

PATHS OF HATE long trailer by Platige Image





DIRECTOR Damian Nenow
SCRIPT Damian Nenow
EXECUTIVE PRODUCERS Piotr Sikora, Jarosław Sawko, Tomek Bagiński
PRODUCER Marcin Kobylecki
PRODUCTION MANAGER Marta Staniszewska
3D GRAPHICS Jarosław Handrysik, Jakub Jabłoński, Rafał Kidziński, Bartłomiej Kik, Bartosz Opatowiecki, Kamil Pohl, Krzysztof Rusinek, Łukasz Skurczyńśki, Marcin Stępień, Piotr Suchodolski, Dominik Wawrzyniak
EDITOR Damian Nenow
IT Tomasz Kruszona, Piotr Getka, Łukasz Olewniczak
MUSIC Jarosław Wójcik
SOUND Genetix Studio, Maciej Tęgi
SOUND PRODUCER Jarosław Wójcik
MUSIC PERFORMED BY Jarosław Wójcik, Paweł Piechura, Ramez Nayyar
VOCAL Radosław Zander
MUSIC MIX Rafał Smoleń
SOUND RECORDING IN DOLBY DIGITAL EX Tomasz Dukszta, C.A.S., Maciej Tęgi, Jarosław Wójcik
MASTERING DOLBY Tomasz Dukszta, C.A.S.
HEAD OF STUDIO 1 WFDiF Wojciech Hamer
TECHNICAL SERVICE STUDIO 1 WFDiF Mieczysław Karwicki, Jan Kozłowski, Leszek Micewski
HEAD OF FILM LABORATORY WFDiF Małgorzata Rogulska
PRINT LABORATORY WFDiF Jarosław Migała, Jacek Cieśliński