목록전체보기 (47)
INSPECT
https://gist.github.com/wikibook/5881873
루아(Lua)에서 'nil'은 아무것도 아닌 값의 의미를 가진다.nil자체가 자료형이자 값이기 때문에 변수에 대입도 가능하다. 출처: http://studymake.tistory.com/511
[MySQL] root 비밀번호 변경하기 MySQL을 처음으로 설치한 초기에는 root사용자의 암호가 설정되어 있질않습니다.따라서, MySQL을 설치한 후에 바로 MySQL root사용자의 암호를 설정해주어야 합니다.변경한 이후에도 가끔씩(혹은 정기적으로) MySQL의 root사용자 암호를 변경해 주는 것이 보안을 위해서 좋습니다.MySQL의 root사용자 암호를 변경하는 방법에는 다음과 같은 방법이 있습니다. 방법1. mysqladmin이라는 명령어 사용/usr/local/mysql/bin에 보면 mysql데이터베이스를 관리할 수 있는 몇가지 유용한 명령어들이 있습니다.이중 mysqladmin이라는 명령어는 mysql을 시작, 종료, 재시작등을 할 수 있는 아주 중요한 명령어입니다.이 명령어를 이용하여..
What's a Symbol?You can think of a Ruby symbol as a sort of name. It's important to remember that symbols aren't strings:"string" == :string # false Above and beyond the different syntax, there's a key behavior of symbols that makes them different from strings: while there can be multiple different strings that all have the same value, there's only one copy of any particular symbol at a given ti..
http://mcchae.egloos.com/m/11249290 https://pymotw.com/2/cgitb/
Introduction to HashesWe know that arrays are indexed with numbers that start with 0 and go up to the array's length minus one. (Think about it: an array with four elements has the indices 0, 1, 2, and 3.)But what if we want to use numeric indices that don't go in order from 0 to the end of the array? What if we don't want to use numbers as indices at all? We'll need a new array structure called..
Next!The next keyword can be used to skip over certain steps in the loop. For instance, if we don't want to print out the even numbers, we can write:for i in 1..5 next if i % 2 == 0 print i end In the above example, we loop through the range of 1 through 5, assigning each number to i in turn.If the remainder of i / 2is zero, we go to the next iteration of the loop.Then we print the value of i. T..
variable_name = gets.chomp gets is the Ruby method that gets input from the user. When getting input, Ruby automatically adds a blank line (or newline) after each bit of input; chomp removes that extra line. (Your program will work fine without chomp, but you'll get extra blank lines everywhere.) As you might have noticed, Ruby's not really returning any feedback to us. We want to be able to see..
[CSS] 웹 폰트 사용하기 대표적인 웹 폰트 제공 사이트- Google Fonts http://www.google.com/fonts- Google Fonts Early Access http://www.google.com/fonts/earlyaccess 영어 이외의 글자는 Google Fonts Early Access에서 가져다 쓰면 된다.Ctrl+F 로 Korean을 찾아 쓰면 된다. 원하는 폰트를 찾으면 링크와 사용법이 나온다. @import url(http://fonts.googleapis.com/earlyaccess/nanumpenscript.css);위 링크를 css에 삽입한 뒤 font-family: 'Nanum Pen Script', cursive;사용법 대로 적용해주면 된다. 이런식으로 웹..