Buatlah sebuah function dalam bahasa PHP dengan nama str dengan satu argumen.
Output yang diharapkan seperti dibawah ini:
- Jika argumen diset 1
php| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
| <?php | |
| namespace Helper; | |
| // Select2 helpers for the jQuery based replacement for select boxes. | |
| // See: http://select2.github.io/select2 | |
| // Author: Tortue Torche <tortuetorche@spam.me> | |
| // License: MIT | |
| // | |
| // Installation: | |
| // * Put this file in your 'tests/_support/Helper' directory |
| // Thanks to @robwierzbowski on github | |
| // See https://github.com/nex3/sass/issues/533#issuecomment-11675408 | |
| @function strip-units($value) { | |
| @return $value / ($value * 0 + 1); | |
| } |
| # Thanks to piouPiouM | |
| # | |
| # @see http://stackoverflow.com/questions/9183133/how-to-turn-off-compass-sass-cache-busting/9332472#9332472 | |
| # @link http://pioupioum.fr/developpement/compass-sprites-supprimer-cache-buster.html | |
| # Make a copy of sprites with a name that has no uniqueness of the hash. | |
| on_sprite_saved do |filename| | |
| if File.exists?(filename) | |
| FileUtils.cp filename, filename.gsub(%r{-s[a-z0-9]{10}\.png$}, '.png') | |
| end |
| #!/bin/sh | |
| set -e | |
| git config -f .gitmodules --get-regexp '^submodule\..*\.path$' | | |
| while read path_key path | |
| do | |
| url_key=$(echo $path_key | sed 's/\.path/.url/') | |
| url=$(git config -f .gitmodules --get "$url_key") | |
| git submodule add $url $path |