This file contains 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
var myObject = { | |
value: 1, | |
increment: function (inc) { | |
var inc_type = typeof inc; | |
var that = this; | |
var minus = function () { | |
return that.value - 5; | |
}; | |
this.value += (inc_type === 'number')? inc : 1; |
This file contains 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
# -*- coding: utf8 -*- | |
import os | |
import time | |
from subprocess import Popen | |
print("# Create zombie process (PID: %s)" % os.getpid()) | |
child_process = Popen(['/usr/local/bin/python', 'zombie.py']) | |
print("# Fork child-process (PID: %s)" % child_process.pid) |
This file contains 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
// ############ EXAMPLE ############ | |
// CASE1 | |
var obj = { | |
prop: 'EWJO', | |
sub_func: function () { | |
var user = obj.sub_func2(); | |
console.log('Hello ' + user); | |
}, | |
sub_func2: function () { | |
return this.prop; |
This file contains 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 | |
if (!isset($conf)) { | |
$conf = 1; | |
} | |
$conf += 1; | |
return $conf; |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>My First React Example</title> | |
</head> | |
<body> | |
<div id="greeting-div"></div> | |
<script src="https://fb.me/react-15.0.0.js"></script> | |
<script src="https://fb.me/react-dom-15.0.0.js"></script> |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>My First React Example</title> | |
</head> | |
<body> | |
<div id="greeting-div"></div> | |
<script src="https://fb.me/react-15.0.0.js"></script> | |
<script src="https://fb.me/react-dom-15.0.0.js"></script> |
This file contains 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
module.exports = { | |
entry: { | |
app: './src/app.js' | |
}, | |
output: { | |
path: __dirname + '/dist', | |
publicPath: "/assets/", | |
filename: '[name].bundle.js' | |
}, | |
devServer: { |
This file contains 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
var React = require('react'); | |
var ReactDOM = require('react-dom'); | |
var RandomMessage = React.createClass({ | |
getInitialState: function () { | |
return { message: "Hello, React!" }; | |
}, | |
onClick: function () { | |
var messages = ['Hello, DalkStudy', 'Hello, Jonnung', 'Hello, Gaerae']; | |
var randomMessage = messages[Math.floor(Math.random() * 3)]; |
This file contains 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
// CommonJS style | |
var React = require('react'); | |
var ReactDOM = require('react-dom'); | |
var Greeting = React.createClass({ | |
render: function () { | |
return ( | |
<p> Hello, Dalk Study</p> | |
); | |
} |
OlderNewer