Posts by Renexo • 329 points
14 posts
-
9
votes1
answer147
viewsQ: PHP 7 - Why does a method that returns the primitive String type not generate an error when returning a Boolean value?
PHP 7 - Why a method that returns the primitive type String, does not generate error when returning a value Boolean? <?php class Foo { public function bar() : string { return true; } } $Foo = new…
-
1
votes2
answers451
views -
1
votes1
answer174
viewsQ: Problem running a shell script using Zenity. Message: Gtk-Message: Gtkdialog Mapped without a Transient Parent. This is discouraged
When I execute script sh. via shell linux, appears this message: Gtk-Message: Gtkdialog Mapped without a Transient Parent. This is discouraged. How do I resolve this issue? #!/bin/bash get_url () {…
-
1
votes4
answers1933
viewsA: How to choose a convention for variable and function names?
The convention followed by professional programmers in the PHP language is as follows:: <?php // Para classes e métodos a convenção é a seguinte: class CadastroCliente { function…
-
0
votes1
answer52
viewsA: Render the content on the screen from an option
+-----------------------+ | Página: index.html | +-----------------------+ <html> <head> <title>Ajax</title> <script…
-
4
votes1
answer5031
viewsA: Conversion of Website or PHP or HTML system to Android and iOS app
In this case, you should create an app with the Webview to display your web-hosted PHP system. There is a free online platform to create apps. It’s very intuitive, you don’t even need to know Java…
-
0
votes2
answers51
viewsA: Can anyone explain to me what this code does line by line?
void primeiro(int a) { // Função sem retorno, com parâmetro do tipo inteiro. a *= 2; // a recebe um valor inteiro e multiplica por 2. printf("%d", a); // Exibe o resultado na tela, formatado como…
-
1
votes1
answer94
viewsA: How do PHP interact with the Shell Linux Dialog interface?
I decided as follows: Prerequisites: php5-cli or higher. # apt-get install dialog php dialog. <?php $title = 'Your title'; $message = 'Hello World!'; function dialog($args) { $pipes = array(NULL,…
-
1
votes1
answer94
views -
1
votes1
answer1258
viewsA: phpPgAdmin: "Identification disabled for security reasons"
I managed to solve and I’m sharing here the solution. In the installation directory of phpPgAdmin (usually the way is: /usr/share/phppgadmin/conf/config.inc.php), open the file called config.inc.php…
-
1
votes1
answer1258
viewsQ: phpPgAdmin: "Identification disabled for security reasons"
When installing the phpPgAdmin on Linux, the following message appears: "Identification disabled for security reasons". What can it be?
-
0
votes2
answers102
viewsA: How to assign the callback variable "cursor.toArray(err, doc)" to an external variable?
Stayed like this: function find(query, callback) { db.collection('user').find(query).toArray(function (err, doc) { callback(err, doc); }); } find({name: 'Leandro'}, function (err, doc) { let result…
-
1
votes3
answers520
viewsA: How to put this Alert JS to appear when entering the page
Take this example: It’s simple! Now it’s up to you to personalize with your information. https://jsfiddle.net/v0tnfu1h/1/…
-
1
votes2
answers102
viewsQ: How to assign the callback variable "cursor.toArray(err, doc)" to an external variable?
var result = []; var user = db.collection('user'); var cursor = user.find(); cursor.toArray(function (err, doc) { result = doc; }); console.log(result); // console ->…