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 | |
echo "hello world!"; | |
?> |
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 | |
echo "hello world | |
This is editable version"; | |
?> |
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
class TextInserter{ | |
constructor(selector, text){ | |
this.selector=selector | |
this.text=text; | |
this.field=$(selector).get(0); | |
this.value=$(selector).val(); | |
this.start=this.field.selectionStart; | |
this.finish=this.field.selectionEnd; | |
this.putText(); |
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
jQuery.fn.JqTexInserter = function(text) { | |
this.each(function() { | |
var start=$(this).get(0).selectionStart; | |
var finish=$(this).get(0).selectionEnd; | |
var str=$(this).val(); | |
str=str.substr(0,start)+text+str.substr(finish); | |
$(this).val(str); | |
},text); | |
} |
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> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
</head> | |
<body> | |
<div><textarea id="mytextarea"></textarea></div> | |
<div><button>click</button></div> |
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 | |
namespace ddd; | |
if(!class_exists('WpThumbnail')){ | |
class WpThumbnail{ | |
private $tempImgFile; //path to temfile | |
private $tempImgPngFile; //path to png temp file |
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(!class_exists('A')){ | |
class A{ | |
function __construct(){ | |
echo __CLASS__."<br>"; | |
} | |
} | |
} | |
?> |
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 | |
namespace ddd; | |
if(!class_exists('Plugin')){ | |
class Plugin{ | |
function __construct(){ | |
$this->loadCore(); | |
} |
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 | |
namespace test1; | |
if(!class_exists('AutoLoader')){ | |
class AutoLoader{ | |
private $dirs; | |
public function __construct(){ |
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 | |
namespace test1; | |
if(!class_exists('SplAutoLoader')){ | |
class SplAutoLoader{ | |
private $nameSpace; | |
private $dirs; | |
public function __construct($nameSpace){ |
OlderNewer