Member Avatar
Topic by rproffitt in Microsoft Windows
It's a cool thing to look out for. Thanks for the update :) Reply by ryantroop
Member Avatar
AndrisP 168 Replied To a Post in simple PHP OOP
Topic by davy_yg in Web Development
php
you can call destructor by set object to `NULL` e.g.

$stefan = new person();
$jimmy = new person();
$stefan->set_name('stefan');
$jimmy->set_name('jimmy');
echo "Stefan Full Name : ".$stefan->get_name();
echo "Jimmy Full Name : ".$jimmy->get_name();

$stefan = NULL;
$jimmy = NULL; Reply by AndrisP
Member Avatar
AndrisP 168 Replied To a Post in simple PHP OOP
Topic by davy_yg in Web Development
php
Also edit functions:


function set_name($new_name){
$this->name = $new_name;
}

and

function get_name(){
return $this->name;
} Reply by AndrisP
Member Avatar
AndrisP 168 Replied To a Post in simple PHP OOP
Topic by davy_yg in Web Development
php
... or call constructor with param:

$stefan = new person('Stefan'); Reply by AndrisP
Member Avatar
Topic by rproffitt in Microsoft Windows
Let's put on our lab coat. We're going in.

"Any process that has more than a ten thousand handles open at any given point in time is likely either poorly designed or has a handle leak, so a limit of 16 million is essentially infinite..."
- https://blogs.technet.microsoft.com/markrussinovich/2009/09/29/pushing-the-limits-of-windows-handles/

Later he reveals … Reply by rproffitt
Member Avatar
davy_yg 2 Replied To a Post in simple PHP OOP
Topic by davy_yg in Web Development
php
I still getting this error:

Fatal error: Uncaught ArgumentCountError: Too few arguments to function person::__construct(), 0 passed in C:\xampp\htdocs\TEST\program_3_OOP_PHP.php on line 7 and exactly 1 expected in C:\xampp\htdocs\TEST\class_lib.php:10 Stack trace: #0 C:\xampp\htdocs\TEST\program_3_OOP_PHP.php(7): person->__construct() #1 {main} thrown in C:\xampp\htdocs\TEST\class_lib.php on line 10

class_lib.php

<?php

class person {

var $name;

function __construct($person_name){ … Reply by davy_yg
Member Avatar
AndrisP 168 Replied To a Post in simple PHP OOP
Topic by davy_yg in Web Development
php
Edit `__constructor` to `__construct` and `__destructor` to `__destruct`.
If you define function with required argument then you cant initialize it without argument e.g.
Constructor with required argument:

function __construct($person_name){
echo "Initialize class";
$this->set_name($person_name);
}

Same contructor but argument is optional (set default value):

function __construct($person_name=NULL){
echo "Initialize class";
if($person_name !== … Reply by AndrisP
Member Avatar
rproffitt 1,117 Replied To a Post in PHP Enginee
Topic by davy_yg in Web Development
php
Why not install a current XAMPP?

https://www.apachefriends.org/index.html notes PHP 7.2.4 which is today's current stable version at http://php.net/downloads.php

As to your first question, I feel you forgot some words. From your prior posts it's clear you know what PHP is. Reply by rproffitt
Member Avatar
Featured rproffitt 1,117 Replied To a Post in Making a Magic Mirror
Topic by kes166 in Linux and Unix
So video calls? https://www.google.com/search?q=video+conferencing+raspberry+pi seems to note projects that have been kicking around for 4 or more years. My bet is you'll have to tailor such to your exact needs but that's what you as a programmer or one of your team members gets to do.

Don't get me wrong … Reply by rproffitt
Member Avatar
davy_yg 2 Marked Solved Status for simple js program
program1.php

<html> <header> <script>

function myFunction(p1, p2) {
return p1 * p2;
}
document.getElementById("demo").innerHTML = myFunction(4, 3);
</script> </header> <body> <div id="demo"></div> </body> </html>

I don't understand why the above code does not show any value?

and why this one does?

program2.php

<html> <body> <div id="demo"></div> <script>
function myFunction(p1, p2) … Topic by davy_yg in Web Development
Member Avatar
davy_yg 2 Created PHP Enginee

What is PHP Enginee?

If Xampp is the web server, then is the php enginee apart of the web server?

http://www.php.net/downloads.php

Can you upgrade the php enginee - to support a higher version of php without uninstalling the xampp?

Thanks for advice. Topic by davy_yg in Web Development
php
Member Avatar
Topic by Newspiderman888 in Search Engine Strategies
Ways to improve website traffic and page ranking:
Unique content
Using heading tags and keywords
Backlinks
Article directory submission
Submit site or blog to web directories
Identifying broken links and fixing them. Reply by Rachana_3
Member Avatar
alan.davies Replied To a Post in simple PHP OOP
Topic by davy_yg in Web Development
php
$stefan->set_name('stefan');
$jimmy->set_name('jimmy'); Reply by alan.davies
Member Avatar
Featured kes166 37 Created Making a Magic Mirror
I'm looking for software that will allow someone at one end to talk into a camera and stream to a Raspberry Pi on the other end. It's going to be a prop for a live action role play game I'm running for later in the year and I'd like to … Topic by kes166 in Linux and Unix
Member Avatar
davy_yg 2 Created simple PHP OOP
Hello,

I try to create a simple OOP PHP that shows an error:


class_lib.php

<?php


class person {

var $name;

function __constructor($person_name){
echo "Initialize class";
}

function set_name($new_name){
$this->name($new_name);
}

function get_name($new_name){
return $this->name($new_name);
}

function __destructor(){
echo "end class";
}
}

?>


program3.php

<?php include("class_lib.php"); ?> <?php

$stefan = … Topic by davy_yg in Web Development
php
Member Avatar
Topic by HAMMAD_5 in Community Center
I don't much care for Qwant's policy of serving up news I did not request. Reply by Reverend Jim
Member Avatar
Topic by rproffitt in Microsoft Windows
@ryantroop. Since I can't get into the driver and app's source code I can only speculate where the issue is.

But since ripping out the old and installing the new did find a thousand fold difference it's clear that the developer was the issue. Microsoft? The fact the OS stood … Reply by rproffitt
Member Avatar
Topic by rproffitt in Microsoft Windows
Is this a MS issue or just developers being lazy and not putting their toys away? (or both)

How many of those handles may have been ghosts that are just doing nothing? How many were socket connections that were active instead of using select or IOCPs? Reply by ryantroop
Member Avatar
Reverend Jim 2,245 Replied To a Post in Can we use bing instead of Google?
Topic by HAMMAD_5 in Community Center
I don't much care for Qwant's policy of serving up news I did not request. Reply by Reverend Jim
Member Avatar
From Stadock's newsletter I read "Handles are killing your PC" and checked in on the apps and handles to discover the stock Killer Network app was way out there at over 906,000 (906 THOUSAND) handles. This was a pretty interesting find and had me off to the maker for latest … Topic by rproffitt in Microsoft Windows
Member Avatar
Gribouillis 1,391 Replied To a Post in Can we use bing instead of Google?
Topic by HAMMAD_5 in Community Center
You can try [Qwant](https://www.qwant.com/) [Qwant](https://www.qwant.com/?q=foobar&t=all), although it is said to be bing + privacy. Reply by Gribouillis
Member Avatar
ryantroop 115 Replied To a Post in simple js program
Topic by davy_yg in Web Development
Javascript (JS) is a top down JIT. Which means if the DOM element exists before the JS gets called, it will be available for use.

In example 1, your function declaration and call happen before "demo" is available on the DOM (in the body element, however you want to think … Reply by ryantroop
Member Avatar
rproffitt 1,117 Replied To a Post in simple js program
Topic by davy_yg in Web Development
I think I see why. In program1 line 6 calls out an element "demo" and there is no such element.

Answer? "Bum code does nothing." Reply by rproffitt
Member Avatar
rproffitt 1,117 Replied To a Post in simple php
Topic by davy_yg in Web Development
php
In this example it's all about order of execution. Line will have to call Multiply() to make the output string and since your function echo'd something then your example shall echo the mulitiple first then your line 14 text is output.

I see no mystery here at all. Reply by rproffitt
Member Avatar
davy_yg 2 Created simple php

program2.php

<html>
<header>
</header>

<body>

<?php

function Multiply($x, $y)
{
echo $x * $y;
}

echo 'Multiply : '.Multiply(2,3).'<br><br>';

?>

</body>

</html>

Why the result of the above program is :

6Multiply :

instead of

Multiply : 6

Any clue? Topic by davy_yg in Web Development
php
Member Avatar
davy_yg 2 Created simple js program
program1.php

<html> <header> <script>

function myFunction(p1, p2) {
return p1 * p2;
}
document.getElementById("demo").innerHTML = myFunction(4, 3);
</script> </header> <body> <div id="demo"></div> </body> </html>

I don't understand why the above code does not show any value?

and why this one does?

program2.php

<html> <body> <div id="demo"></div> <script>
function myFunction(p1, p2) … Topic by davy_yg in Web Development
Member Avatar
Friends,
I am using web service and forms for a number of situations in my project. But now when I try to use same strategy the data is not provided by the provider function. It gives ‘null’ value always. But I can see the value in chrome web console.

page.ts … Topic by logicslab in Mobile Development
Member Avatar
Friends,
I am using web service and forms for a number of situations in my project. But now when I try to use same strategy the data is not provided by the provider function. It gives ‘null’ value always. But I can see the value in chrome web console.

page.ts … Topic by logicslab in Mobile Development
Member Avatar
sandy_5 -3 Replied To a Post in Services based website optimization
Topic by jim_20 in Search Engine Strategies
Try to build a better ranking with low level and middle level keywords first, where there will be less competition and then shift to high level keywords. Reply by sandy_5
Member Avatar
Topic by hrishivardhan in Digital Marketing
Facebook is the most commonly used social media platform by everyone nowadays, so it is the best way to publish ads. Reply by sandy_5