Posts by neoprofit • 505 points
19 posts
-
1
votes1
answer515
viewsA: Amazon EC2 Linux Server without postfix sending email localhost
An instance has by default a simple email server, which delivers its message but, in practice, does not deliver with the quality necessary for use in production. Whether it is just a test or an…
-
0
votes2
answers1203
viewsA: Characters Invisible
Yes, this kind of mistake happens often and I named it Caracterer Fantasma. After observations, I concluded that this problem happens when developers exchange code snippets via instant…
-
2
votes3
answers301
viewsA: What is cloud computing?
In their examples, I consider them as serviços and each service provider chooses how to deliver them ( on which datacenter to host, how to do the software, etc...) Already the computação na nuvem…
-
3
votes3
answers25078
viewsQ: Resize images using Bootstrap
I have a 400px image for 400px, and I want to display it as if it had 200px X 200px. What is the ideal way to do this using Bootstrap?
-
1
votes4
answers1428
viewsA: Application of 5S in agile methods
Yes, the 5S, in software development, are directly linked to the use of philosophy LSD. Just as Lean Software Development and Kanban, and the 5S are systems JIT (just in time system) and you can use…
-
3
votes3
answers6637
viewsA: Run PHP function asynchronously
In complento the two answers above, you can use German + reactPhp with the gearman-async: "A async Gearman implementation for PHP ontop of reactphp" Example of use: <?php use…
-
0
votes1
answer64
viewsQ: Index Google Shopping standard XML in Sphinx Search
How to Index a Standard XML Google Shopping in Sphinx Search? XML: <?xml version="1.0"?> <rss version="2.0" xmlns:g="http://base.google.com/ns/1.0"> <channel> <title>O nome…
-
1
votes3
answers5312
viewsQ: How to add line break using sed?
How to add a line break in a pipe received output, using sed, only for cases that fit the established pattern? I used sed "s/.*oo.*/&\n/" unsuccessfully. The pattern is OK, but the addition of…
-
3
votes2
answers87
viewsA: Javascript Array php values
Use json_encode(): <?php $array = array( '1' => array('38.951399' , '-76.958463'), '2' => array('38.951399' , '-76.958463'), ); $var = json_encode($array); Already in the view, you print…
-
0
votes3
answers953
viewsA: php script running as sudo
Create your PHP script without caring about the user you run, using chmod to change directory permissions. Run your script via command line: sudo php meuscript.php There are many "pores" using this…
-
2
votes3
answers118
viewsA: Is it dangerous to use for loop in querySelectorAll?
Yes, is safe. Obviously, there will always be a chance that the client’s computer will take too long to process an instruction, but in this case, it is not a valid concern.…
javascriptanswered neoprofit 505 -
7
votes1
answer1660
viewsA: Pooling Connection management by PDO
You don’t need to manage this in PHP, because it is used PDO::ATTR_PERSISTENT as true PDO/PHP will reuse connections. If you use Apache, and configured it to work with 80 threads, for example, you…
-
0
votes5
answers801
viewsA: Is it possible to upload files without using PHP?
Cannot upload to a webserver without using a language server side. You can simplify your work using Apis or Web Server modules, but even then, it will be Server Side. You could use SQLite for a…
-
2
votes4
answers3935
viewsA: Automated tool to join multiple style sheets (CSS) into 1 and to join Scripts (JS) into 1 Sheet only
I will give a simple answer, which in no way caters to large projects, and resolves compilation and file reduction, but which I use in small projects. See the example tree: root js/ - compilado.js…
-
3
votes3
answers302
viewsA: Practical use of Constant scalar Expressions in PHP and other languages
This functionality is not widespread among other languages and there is also no good practice found by common sense, so my opinion is that this new functionality will be very well used by some and…
-
1
votes2
answers1328
viewsA: Export php data to xls from a link
1) Change the PHP call to a traditional, non-ajax link; 2) add the next header to force the download: header("Content-type: application/force-download");
-
4
votes3
answers112
viewsA: Doubt about === and !=
use the method is_null() if (is_null($exibe['Nome1'])) { //...
-
0
votes2
answers1059
viewsA: For database abstraction, should I use uppercase or lowercase column names?
Use Upper Camel Case (or Capitalizedwords) for table names and Lower Camel Case for field name. Other approaches using underline may please you, but adopt a standard and publicize it. See more about…
-
3
votes3
answers279
viewsA: How to test whether an instance is dynamic or static?
It’s very simple! You can use is_object(): <?php class Foo { public function hello() { return 'world'; } public static function hi() { return 'Joe'; } } $foo = new Foo(); $bar = Foo;…