Posts by Marcos Henzel • 797 points
58 posts
-
4
votes1
answer141
viewsQ: Bring value from another cell to the formula without being String
The formula in excel PROCV vertically search for a value in a specific table of an X column. Having said that, I have the following problem with this formula: =PROCV(J7;JUL;6;JUL!C4:C35) With this I…
excelasked Marcos Henzel 797 -
1
votes1
answer874
viewsQ: How to enable debug() in PHP?
I’m having trouble trying to use the function debug(); in the PHP. In the log of apache appears the following error: PHP Fatal error: Uncaught Error: Call to Undefined Function debug() in…
-
1
votes2
answers1134
viewsQ: Browse HTML content and remove parts of HTML using PHP
I have for example this code that removes all DIVs containing the class contextual of my code HTML passed in string $sHTML: $nPosIni = strpos($sHTML, '<div class="contextual">'); while…
phpasked Marcos Henzel 797 -
1
votes1
answer270
viewsA: Error in serial port of Arduin with communication between C and Perl
Follow the corrected and working code: use 5.014; use strict; use warnings; use lib 'C:\Dwimperl\cpan\build\Win32-SerialPort-0.22-tXycqQ\lib'; use Win32::SerialPort; # porta serial # perl+arduino my…
-
2
votes5
answers2617
viewsA: Select last dates of each SQL month
In PostgreSQL you can use it like this: SELECT TO_CHAR(data, 'YYYY-MM-01')::DATE + (INTERVAL'1 MONTH' - INTERVAL'1 DAY') AS data FROM tabela GROUP BY data At a glance in that documentation.…
-
1
votes0
answers52
viewsQ: Create element among child elements of the same Father
According to the code below: var ul = document.getElementsByTagName('ul'); var ref = ul.item(0).children; var saida = ''; for (i = 0; i <= ref.length; i++) { if (i == 0) { var HTMLString =…
-
0
votes1
answer89
viewsQ: CSS formatting does not apply in HTML2PDF plugin
I’m using the plugin html2pdf, but when trying to use formatting CSS: table { line-height: 10px } The same is not applied, I found nothing in the plugin documentation, someone knows how to fix it?…
cssasked Marcos Henzel 797 -
1
votes2
answers229
viewsA: Alignment of HTML fields
I think that’s what you wanted, I just added a id='final' in your div of the second field and after, a CSS for formatting them side by side. Example fiddle #inicial {float: left; width: auto;}…
twitter-bootstrapanswered Marcos Henzel 797 -
1
votes1
answer1218
viewsA: How to put " in a String?
Try to use \\\", the first two bars will be transformed into one, for the string, and the \" will be the literal character ".
-
1
votes3
answers1296
viewsA: jquery to click and make appear/disappear different Ivs
Take this example, I think that’s about what you want! function mostraDiv(caller) { if (caller.id === 'goleiros') { $("#divGoleiros").attr("style", "display: block"); $("#divDefesa").attr("style",…
-
1
votes1
answer223
viewsA: How to insert a CDATA type node in the xml generated by Cake PHP
Try something as shown in documentation: // Usando SimpleXML $myXmlOriginal = '<?xml version="1.0"?><root><child>value</child></root>'; $xml =…
-
0
votes3
answers1462
viewsA: How to create an input search html that is represented by just an icon
Applying only the concept of HTML/CSS as proposed in the question, I believe that’s what you want: <!DOCTYPE html> <html> <head> <style> input[type=text] { width: 130px;…
-
0
votes1
answer179
viewsA: What is the "listw" argument in the multispati (multivariate Spatial analysis) - R software?
The argument listw is a class object listw created by, for example, the nb2listw, as quoted in the commentary by Tomás Barcellos. Example of use: nb2listw(neighbours, glist=NULL, style="W",…
-
0
votes3
answers1598
viewsA: How to create a FUNCTION to format currency in POSTGRE?
I believe this is what you wanted: CREATE OR REPLACE FUNCTION formatar_moeda(valor FLOAT) RETURNS VARCHAR(15) AS $body$ DECLARE --------parametros-------- pValor ALIAS FOR $1;…
postgresqlanswered Marcos Henzel 797 -
1
votes3
answers392
viewsA: UPDATE SUM +1 to decimal
Try to use the nextval(): UPDATE callcenter.chamada_agente SET uniqueid = nextval(uniqueid) --> Assim WHERE id_chamada_agente = 32408 AND tipo_chamada = 'MANUAL' AND datahora_inicio BETWEEN…
postgresqlanswered Marcos Henzel 797 -
0
votes3
answers181
viewsA: Sum of a column is not giving the expected value
Analyzing your SQL: SELECT sum(a.coluna1) FROM dados AS A WHERE EXISTS (SELECT TRUE FROM dados AS B WHERE (a.coluna1/b.coluna2) >= 1); It returns 22 because you tell it to add up the column…
-
0
votes1
answer70
viewsQ: How to not display null values and display values in a row in this condition?
I have 3 tables, a flame custom_values with a field VALUE of the kind TEXT where it receives several types of information, soon I identify each value by the relationship with another table called…
postgresqlasked Marcos Henzel 797 -
0
votes2
answers465
viewsA: jquery.validate.js does not work without form-group (Bootstrap)
The .validate plugin should be used in ID of the form, as per Example fiddle. Here is the Snippet used, however it is with error in the script, but it is the same code of Example fiddle.…
-
1
votes1
answer2861
viewsA: CSS scroll no body
From what I understand you can make use of the overflow, thus: <style type="text/css"> body { overflow:hidden; } </style> The code above will hide the scroll horizontal and vertical. If…
-
1
votes1
answer1180
viewsA: Doubt with backup postgres?
As answered in the comments by @sanction: "The error message indicates that you are trying to back up the server with version 9.4 from the pg_dump.exe version 9.0, maybe use the pg_dump.exe of…
postgresqlanswered Marcos Henzel 797 -
0
votes1
answer252
viewsA: Running a system command with parameter inside a Function in Postgresql
Response taken from here: Original post. You can access some values by plsh triggers. UPDATE offers only OLD INSERT offers only NEW (duh) DELETE I didn't test Then you get these values using…
-
0
votes2
answers153
viewsA: Count in the Postgresql database
The solution in your question is correct, but no SELECT you should put only the options you want to "see", see the SQL below if that’s what you really need: SELECT COUNT(dt_cadastro) -- no select…
-
0
votes1
answer185
viewsA: Bring postgresql data field data saved as string
If the field data_venda have not time_zone, you can convert the dates you have into string for date, using the TO_DATE and then convert to American format using the TO_CHAR, thus: SELECT * FROM…
postgresqlanswered Marcos Henzel 797 -
1
votes1
answer460
viewsQ: How to convert day of year to date (without timestamp) [Postgresql]?
I have the value 2016001 symbolizing the first day of the year 2016, how do I catch for example the ANO/MES of 2016263? Example: ENTRADA: $data = '2016001' SAÍDA: $anomes = '2016-01' If only I could…
-
3
votes3
answers1889
viewsQ: mark a checkbox and uncheck the others
According to the Snippet below, when clicking on a checkbox, the others should be unchecked, but it only happens if you click them from right to left, if I click them from left to right, nothing…
-
0
votes1
answer218
viewsQ: Bringing pre-selected radio button option via Cakephp
I got the following Form down below. If I pass checked=checked it brings the last selected option. But, I want for example that the first option is preselected, some hint/suggestion? <?php echo…
-
0
votes2
answers1768
viewsA: Tag caption on google maps
Response drawn from "Add Caption to a Map via googlemaps API." link to reply As the snippet below you will have two points, each of each color and its respective captions are at the top on the…
-
1
votes0
answers463
viewsQ: How to break the caption line on Google Charts
In the Image 1 (below), shows a template of how I want the caption to look. In the Image 2 (below), shows how it is coming out (in case, no line break). Question How do I break the caption’s line on…
-
0
votes1
answer410
viewsQ: Displaying quarterly data up to the current POSTGRESQL date
According to the SQL Fiddle, I am displaying the quarterly data of a table, however, this query is only displaying when it has value in the quarter (3, 6, 9 or 12), when it has value for example in…
postgresqlasked Marcos Henzel 797 -
2
votes2
answers2740
viewsQ: Adding up POSTGRESQL values
I have a table historicos: historicos id | problemas | total | data ---|-----------|-------|------------ 01 | 25 | 125 | 2017-01-01 ---|-----------|-------|------------ 03 | 25 | 125 | 2017-03-01…
postgresqlasked Marcos Henzel 797 -
1
votes1
answer302
viewsA: Class 'Simplexmlelement' not found
Solved I reinstalled the Apache, PHP and the POSTGRES and updated the CAKEPHP for a newer version.
-
0
votes1
answer302
viewsQ: Class 'Simplexmlelement' not found
As debug of cakephp in the Snippet down below: p.error { font-family: Monaco, Consolas, Courier, monospace; font-size: 140%; padding: 0.8em; margin: 1em 0; } .success, .message, .cake-error,…
-
1
votes1
answer36
viewsQ: Bug, button disappearing when opening dialog box
Look at the snippet below, the "button" moves alone to the dialog window when it appears and after clicking some action of the window, the "button" disappears. function pergunta() {…
javascriptasked Marcos Henzel 797 -
0
votes1
answer191
viewsA: Query between two different postgresql cakephp databases
First, I stored the information from the database tables in a variable client which were pertinent for me to use at the bank tickets. After I made the connection to the bank tickets.…
-
0
votes2
answers413
viewsQ: Display 5 latest postgresql results
I need to display the last 5 results of a query, but I do this query twice because I need to change the Where clause, to return the values I need. I thought of something like: SELECT id, project_id,…
postgresqlasked Marcos Henzel 797 -
0
votes1
answer191
viewsQ: Query between two different postgresql cakephp databases
I have two separate databases customers and tickets. Where on the table cliente_tickets of the database customers a configuration is stored from which I need to access certain values in the database…
-
2
votes2
answers499
viewsQ: Show/ Hide div, changing icon
I got the following Snippet, where by clicking on the content of the div is shown (revealed) and when clicking on the content of the div is collected (hidden), however the images are not changing…
jqueryasked Marcos Henzel 797 -
2
votes2
answers950
viewsA: How to ignore accentuation in a database search?
No cake: I create the function remove_acento $this->Cliente->query("create or replace function remove_acento(text) returns text as \$BODY$ select translate($1,…
-
1
votes2
answers950
viewsQ: How to ignore accentuation in a database search?
I need to conduct a city search. In the database is registered for example, São Paulo, Viamão, Curitiba, but if the user tries to search the city of São Paulo for example by typing Sao Paulo…
-
1
votes1
answer59
viewsQ: Print message on next page
How do I print a message when opening a page, for example: I’m on the page Cliente/View and when redirected to the page Nfe/index, I want to print a message with instructions on what should be done,…
cakephpasked Marcos Henzel 797 -
3
votes2
answers191
viewsQ: Displaying filter from another view
I have a View where customer data is shown, and at the click of a button, the user is redirected to a page that shows the moves of several customers, right on this page contains some filters. So…
-
3
votes1
answer1807
viewsQ: Text field mask does not work in mobile environment
I used the following code in jQuery to mask the field telefone for example. jQuery(document).ready(function () { $("#telefone").mask("(99)9999.9999"); }); This code works perfectly on the computer,…
-
10
votes2
answers256
viewsQ: How to print only the first 5 characters?
I need it to be displayed up to a maximum of 5 characters of the contents of each table cell in a specific resolution. I don’t know if there are any Pseudo Elemento do what I need, something like:…
-
1
votes2
answers765
viewsQ: Hiding entire column with CSS at a specific resolution
I have a table and I need to hide an entire column when it opens in a specific resolution. I tried to use the display: none but the borders of the table appear at the end of the line, even if every…
cssasked Marcos Henzel 797 -
0
votes2
answers127
viewsA: Make checkbox selected as database data!
Solution found: I created a variable $marcado within the foreach running through the array $x to insert the checkbox, initialized the variable as false (thus: $marcado = false;) and then I did the…
cakephpanswered Marcos Henzel 797 -
0
votes2
answers127
viewsQ: Make checkbox selected as database data!
According to the code below, I need to make sure that when loading the page, a table is loaded with checkbox marked, according to database data, for example: Destino…
cakephpasked Marcos Henzel 797 -
0
votes1
answer348
viewsA: Filter when selecting a checkbox
Solution: In the Controller I make a filter for each Checkbox, in the case of the example below I will do only three: Controller $this->Filter->addFilters( array( 'filter1' => array(…
cakephpanswered Marcos Henzel 797 -
0
votes1
answer348
viewsQ: Filter when selecting a checkbox
I need to make a filter where certain data is shown when selected some checkbox(s). For example: The checkbox has been marked "Aguardando embarque" and "Recebido", then you should display a list in…
cakephpasked Marcos Henzel 797 -
1
votes1
answer316
viewsQ: How to apply two filters in a search field?
I have a field nome_email, where the user enters any string and I need to be filtered everything that is placed in this field and display something corresponding to the NOME or EMAIL of the…
cakephpasked Marcos Henzel 797 -
0
votes1
answer2689
viewsA: Postgresql: ERROR: Operator does not exist: bigint ~~* Unknown
Answer: As discussed, it can be done this way: SELECT "User"."id", "User"."telefone", "User"."email" .... etc ... FROM "public"."users" AS "User" .... etc ... WHERE "User"."telefone"::varchar ILIKE…
postgresqlanswered Marcos Henzel 797