Posts by Not The Real Hemingway • 853 points
40 posts
-
0
votes2
answers156
viewsA: PHP: How to take exception from the model in the controller
I used the idea of @Lucasmendes and got the following result: I created the class of exceptions extending the class \Exception, but I had to make a modification: add the builders. namespace Models;…
-
-1
votes2
answers156
viewsQ: PHP: How to take exception from the model in the controller
I created a class to connect to LDAP, in one of the methods I did the following: // Classe Ldap() public function ldapConnection() { $this->_ldapCon = ldap_connect($this->_ldapServer); if…
-
0
votes1
answer109
viewsA: Multiquery PHP PDO - SQL Server 2012 - IIS 8.5
Not to leave the question unanswered. No problem in running many darlings with PDO, but you have to be careful, especially when you’re expecting input of users. An alternative form to the use of…
-
2
votes1
answer224
viewsA: What does .container. 31 25 25 in CSS mean?
According to the specification of the CSS, are escape characters, because CSS identifiers cannot have special characters, or rather can only have a-Z and 1-9 characters, ISO 10646 characters, hyphen…
css3answered Not The Real Hemingway 853 -
2
votes1
answer1005
viewsA: How to make responsive
Well, my comment got too big, so I’ll leave it here. It is possible. But start with mobile, then bigger and bigger screens, until the desktop (which already exists in your case apparently). Set the…
-
0
votes3
answers109
viewsA: I’m not able to delete the client index with Javascript (Angularjs)
Have you tried using the ng-if (can also be used ng-show or ng-Hide)? Your links are blocked for me, so I’ll show you an example. E.g.: var app = angular.module('app', []); app.controller('ctrl',…
-
3
votes2
answers1013
viewsA: How to write data from a form to a database by converting the fields to JSON?
Although answered, I will add this to the discussion: JSON (Javascript Object Notation, because it has the format of a JS object) is not a file format, first. Yes, an open data standard format.…
-
1
votes1
answer187
viewsA: Safe way to work with cookies
Check for customer-enabled cookies yourself. If they are not, let him know about the functionality loss and ask him to enable cookies in the browser. You can test with PHP: <?php session_start();…
phpanswered Not The Real Hemingway 853 -
0
votes1
answer120
viewsA: Highcharts Xaxis label on top of tooltip
It depends a lot on what you want to do with the tooltip. You might want to tooltip follow the mouse, for example: tooltip: { followPointer: true, pointFormat: '<span…
-
0
votes2
answers322
viewsA: Email validation php error
There is a logic error in your code. The final part that starts after the first paragraph (<p></p>, containing the <input...>) could be rewritten, without prejudice, as follows.…
-
0
votes1
answer238
viewsA: Buttons added to the table generated with Angularjs Datatables do not allow function execution in the current scope
I made the same question on Stackoverflow and I got the right answer. I only had to do the following, according to the answer: function createdRow(row, data, dataIndex) {…
angularjsanswered Not The Real Hemingway 853 -
3
votes1
answer52
viewsA: Retrieve Browser Information in Procedure Mysql
This is a conceptual error of yours. Mysql needs a server to run, that is, a computer, which is a node in the computer network. The browser needs a computer to run, which is also a node on the…
-
0
votes1
answer238
viewsQ: Buttons added to the table generated with Angularjs Datatables do not allow function execution in the current scope
I have a table built with Angularjs Datatables as follows: HTML <table datatable="" dt-options="concessoes.standardOptions" dt-columns="concessoes.standardColumns"…
angularjsasked Not The Real Hemingway 853 -
0
votes1
answer195
viewsA: Why can’t I update the variable value in the Angularjs service and pass it as a parameter to PHP?
I’ve managed to solve my problem: I was updating my variable correctly, but I wasn’t sending it to the service. SOLUTION I only had to change one detail in the controller: I put the function that…
-
0
votes1
answer195
viewsQ: Why can’t I update the variable value in the Angularjs service and pass it as a parameter to PHP?
UPDATE If I put filtro instead of filtro.filtro in the service, returns an error, since in the URL an array is passed: filtro: {filtro: "ma"}, e. g. Error Typeerror: a.values.foreach is not a…
-
-1
votes2
answers756
viewsA: Make PHP read server folders
I tested that code from here and served perfectly. <?php function listFolderFiles($dir) { $ffs = scandir($dir); echo '<ol>'; foreach ($ffs as $ff) { if ($ff != '.' && $ff != '..') {…
-
-1
votes1
answer90
viewsA: WHERE WITH DATES
I have an idea: SELECT * FROM vendas WHERE status = 'CONCLUÍDA' AND (CASE WHEN tipo = 2 THEN (CASE WHEN data_conclusao LIKE '2017-01%' THEN 1 ELSE 0 END) ELSE data_conclusao END) The query has not…
-
2
votes2
answers1873
viewsA: Can Sqlite be considered a relational database?
I just wanted to contribute my two cents. Yes. Sqlite is a relational database manager system for the simple fact of using the SQL language, as the name implies. In contrast, there are Nosql…
-
1
votes1
answer284
viewsA: How to pick up php data passed by parameter with Angular
First, you have to pass the parameters, right?! Where has params you have to say what you want to pass. Even if you have created a variable with the data, params is still an attribute of $http get..…
-
1
votes2
answers59
viewsA: Problem saving Arabic text in mysql
@Guilhermenascimento is right. You have to use UTF-8 character encoding: 1. On the page 2. In connection with the database 3. In the database itself…
-
2
votes1
answer109
viewsQ: Multiquery PHP PDO - SQL Server 2012 - IIS 8.5
Is there a problem with running multiple queries with the same PHP PDO code? Example: <?php // Retorna $con include 'conexao.php'; // Suponhamos que dbo.minha_tabela tenha apenas três campos,…
-
2
votes3
answers792
viewsA: Add class after the page is loaded
In Jquery: $(function(){ $(".progresso").delay(5000).fadeOut(); $(".preloader").delay(5000).fadeOut("slow"); $('.bemvindo').addClass('animated bounceInDown'); }); JSFIDDLE…
-
1
votes2
answers952
viewsA: Sql command does not run via php
Editing Example with PDO <?php // Primeira coisa: recebe os cabeçalhos e envia $email = $_POST["email"]; // Tenta trazer os dados do banco de dados try { // Cria objeto PDO $conexao = new…
-
3
votes1
answer2888
viewsA: In Python is there a debug function equivalent to "print_r" or "var_dump" in PHP?
pr (Python 2) and reprlib (Python 3) Produces a string-like representation of a passed object such as parameter. pprint() Produces formatted data output. Example (source: pymotw.with): from pprint…
-
1
votes2
answers1281
viewsA: How to select only one div of several equals with js?
With pure Javascript: var elementoAtual = document.getElementsByClassName("minha-classe"); Array.prototype.slice.call(elementoAtual).forEach(function(pegaElementoAtual){…
-
0
votes1
answer307
viewsA: Help with login system
Editing <?php require_once 'init.php'; // Dados do formulário $email = $_POST['email']; $senha = $_POST['senha']; // Verifica se os campos estão vazios: usuário OU senha if (empty($email) OR…
-
1
votes4
answers469
viewsA: json_encode returning HTML tags
I use the following headers to return JSON: <?php // No topo da página header("Access-Control-Allow-Orgin: *"); // CORS header("Access-Control-Allow-Methods: *"); // Verbos HTTP[S]: PATCH, PUT,…
-
1
votes1
answer1229
viewsA: Configure Slim Framework and Apache 2
First: You can use the routes no rewrite URL. According to the documentation, you can access so: <?php $app = new \Slim\Slim(); $app->get('/index.php/foo', function () { echo "Foo!"; });…
-
3
votes3
answers998
viewsA: Responsive font according to text size
Issue 1 Well, I misread the question and ended up answering about responsiveness according to the viewport. At the risk of a negative vote, I’ll leave you my answer, even wrong, because it might be…
-
3
votes1
answer129
viewsA: Database insertion problem - SQL
Single quotes have to start before the ('Point(... not before geography::. If not, try to remove them. Like in this example microsoft: . . . INSERT INTO SpatialTable (GeogCol1) VALUES…
-
2
votes2
answers4762
viewsA: ng-repeat in an array within an array of objects
Well, you have such an object: objeto.propriedade.valor. But you want to access it like this objeto.valor. It’s not gonna work! You have to do objeto.propriedade, then the value will be returned. So…
angularjsanswered Not The Real Hemingway 853 -
2
votes3
answers481
viewsA: Doubt with float
It is only a way to format the output of floating points. According with this tutorial, the number before the point indicates the minimum quantity of numbers that will be printed before the dot…
-
6
votes3
answers646
viewsA: What does it mean to put the 'as' command after the 'import' command in the code below?
As @Acklay explained, you can use the word as as a nickname for the imported module in Python. This syntax was proposed by PEP 221 and as explained in this document, it was not intended to be a…
-
0
votes2
answers2406
viewsA: Single row and column result for multi-row column
If I understand correctly, you want to make a row become a column with multiple lines, right? This is called pivoting (pivoting) in a database and can be defined as showing data that is stored in…
-
3
votes1
answer566
viewsQ: How does [modus operandi] autoload in PHP work?
Suppose I have the following file structure at the root of my site: index.php autoload.php ----| /Models --------| /MainModel ------------| MainModel.php ----| /Controllers --------| /MainController…
-
2
votes1
answer106
viewsA: Calculation of hours within consultation
For the total time the state is at 0 (use the same logic for when the state is different from zero), you can use the TIMESTAMPDIFF(): SELECT CASE WHEN `state` = 0 THEN TIMESTAMPDIFF(HOUR,…
-
6
votes5
answers599
viewsA: css properties do not bootstrap effect
As mentioned by @Joãoluiz, avoid using !important, Because in the future you may want to overwrite your own styles, and in addition, developers who have legacy your code will have difficulty…
-
2
votes1
answer68
viewsQ: Are hardware configurations relevant to measuring the efficiency of sorting algorithms?
I was reading an article on Devmedia on the main sorting algorithms. In the article four algorithms of this type are compared, Bubble Sort, Selection Sort, Quick Sort and Insertion Sort. Well, I…
asked Not The Real Hemingway 853 -
1
votes2
answers300
viewsA: How to delete a BD data from the Ubuntu terminal? Ruby on Rails
To manipulate a Linux database through the terminal you just need to: Log in: mysql -u root -p: "-u" to inform the user, which in this case is "root" and "-p" for Linux to display the password…
-
6
votes3
answers324
viewsQ: "Translate" query from Mysql to SQL Server 2012
What is the SQL Server 2012 query that corresponds to the next Mysql query? REPLACE INTO schedule SET jobname = "sqldump" , last_exec_date = NOW()…