Eclipse prevent debug to break at first line of file
Eclipse IDE Prevent debuger to break at first line of file
Project > Properties > PHP > Debug", unselect "Break at First Line"
or
Windows -> Preferences -> PHP -> Debug" and uncheck "Break at first line".
or
Run > Debug Configurations > PHP Web Application" and unselect "Break at first line" in all the configurations.
Restart Eclipse
Date: 09.06.2020 - 20:2377LW NO topic_id
AD
Další témata ....(Topics)
Kontrola v javascript zda funkce existuje
Check if a Javascript Function Exists or Is Defined.
function myFunctionName() {
alert('I am myFunctionName');
}
if (typeof myFunctionName == 'function') {
myFunctionName();
}
Pokud vytvářite novou instanci nějakého objektu, musíte použít klíčové slovo new
class myClass {
private $var = 'Who I am? ';
function __construct($val){
$this->var .= $val;
}
function fc()
{
print 'Hello from myClass <br>';
print $this->var;
}
}
$myInstance = new myClass('I am a variable');
$myInstance->fc(); // Hello from myClass <br>Who I am? I am a variable
Example code
header("HTTP/1.1 301 Moved Permanently");
header("Location: https://www.newsite.com/new-page.php");
header("Connection: close");
exit();
If using file name without .php as part of smoothly url - example:
$fileName = basename(__FILE__, '.php');
header("HTTP/1.1 301 Moved Permanently");
header("Location: https://www.mysite.cz/auto-moto/".$fileName."/");
header("Connection: close");
exit();
Date: 23.07.2020 - 12:31Jak zabránit kopírování textu stránky v prohlížeči.
Do tagu body vložíme následující eventy:
oncontextmenu="return false" onmousedown="return false" onselectstart="return false" ondragstart="return false"
Tag body by mohl vypadat následovně:
<body oncontextmenu="return false" onmousedown="return false" onselectstart="return false" ondragstart="return false">
Getter a Setter
Získej nebo Nastav.
Michal už není Váš kamarád, tak jej změníte pomocí set:
Získej nebo Nastav.
Třídy v javascript dovolují použití get a set instrukci.
get vrátí hodnotu určité zadané proměnné.
set jí může změnit.
class Person {
constructor(name) {
this.personName = name;
}
get pname() {
return this.personName;
}
// i kdyz set vypada jako funkce, musi mit pouze jeden parametr
set pname(x) {
this.personName = x;
}
}
var myFriend = new Person("Michael");
Jméno osoby přítele získáme například:
var strMyFriendName = myFriend.pname; // bez () na konci!!!!!!
alert(strMyFriendName);
Michal už není Váš kamarád, tak jej změníte pomocí set:
// hodnota se nepřirazuje do závorek (), ale pomocí = rovná se!!!!
myFriend.pname = "Renata";
strMyFriendName = myFriend.pname;
alert(strMyFriendName);
Editace: 9. 6. 2020 - 20:23
Počet článků v kategorii: 77
Url:eclipse-prevent-debug-to-break-at-first-line-of-file