- Herşey bir
Object(Nesne) - Her
ObjectBasicObjectden türemiş. (Objective-C NSObject gibi...) Object.methodsile o nesneye ait tüm method'larObject.methods.inspectstring olarak method'lar- Mutlaka bir şey geriye döner. Hiçbir şey dönmese
nildöner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/local/bin/ruby | |
| # A script to download the latest episodes from railscasts.com | |
| # | |
| # author: modsaid <mahmoud@modsaid.com> | |
| # mechanize support: Hossam Hammady <github@hammady.net> | |
| # gem install mechanize | |
| require 'rubygems' | |
| require 'mechanize' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Filter to check for CSRF attacks from the ajax requests. | |
| */ | |
| Route::filter('csrf_header', function() | |
| { | |
| if (Session::token() != Request::header('x-csrf-token')) | |
| { | |
| throw new Illuminate\Session\TokenMismatchException; | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This script creates a new project (or site) under /var/sites and creates | |
| # new virtual host for that site. With the options a site can also | |
| # install the latest version of Laravel directly. | |
| # This script was originally based on the following script by @Nek from | |
| # Coderwall: https://coderwall.com/p/cqoplg | |
| # Display the usage information of the command. | |
| create-project-usage() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.FileDescriptor; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.io.OutputStream; | |
| import java.io.PrintStream; | |
| public class HelloWorld{ | |
| private static HelloWorld instance; | |
| public static void main(String[] args){ | |
| instantiateHelloWorldMainClassAndRun(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function showModal($id, array $data = []) | |
| { | |
| $toJSON = json_encode($data); | |
| return "showModal('$id', $toJSON)"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Helper function. | |
| if (! function_exists('timer')) { | |
| function timer($expression) | |
| { | |
| $start = microtime(true); | |
| if ($expression instanceof Closure) { | |
| $expression(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Twitter</title> | |
| <link rel="stylesheet" type="text/css" href="./css/tailwind.css"> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | |
| </head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| URL::macro('social', function ($name, $replacement = '#') { | |
| return array_get([ | |
| 'facebook' => 'https://www.facebook.com/mypage/', | |
| 'instagram' => 'https://www.instagram.com/mypage/', | |
| 'pinterest' => 'https://nl.pinterest.com/mypage/', | |
| ], $name), $replacement); | |
| }); |
OlderNewer