Posts by Cobra • 1,159 points
49 posts
-
2
votes1
answer919
viewsQ: Problem with CORS using Vue + Laravel (only GET method works)
Vue: CLI 3 Laravel: 6 When trying to use different GET requests (e.g.: POST, DELETE), I get the following message: Access to Xmlhttprequest at 'http://127.0.0.1:8000/api/test' from origin…
-
3
votes2
answers1365
viewsQ: How to make paging in Sqlserver 2008 R2?
I tested with two forms, but did not succeed. select * from table OFFSET 10 ROWS select top 10 * from table OFFSET 10 ROWS FETCH NEXT 5 ROWS ONLY Interestingly I never had to offset this version of…
-
6
votes3
answers1515
viewsQ: Is there any nomenclature for variables defined by underline/underscore?
I know that there are some rules and conventions for the nomenclature of variables in programming, such as Camelcase, Pascalcase, etc.... What is the term used for a compound name variable (words…
-
1
votes1
answer1133
viewsQ: Change position of Annotation in google Chart
The idea is to make the text of the line type Annotation stand over the column. I tried to create another Annotation for the same column, but did not succeed. JS: google.charts.load("current", {…
google-chartsasked Cobra 1,159 -
1
votes1
answer1815
viewsQ: How to add vertical line in column type chart
I am using the column chart of the Google Chart API. I would like to insert a vertical line in a given position dynamically. I have an array that indicates value => quantity. In a fictional…
-
6
votes1
answer84
viewsQ: How to convert NFA to datatime and vice versa?
Having a date (e.g.: 2017-01-18 11:08:09 (format y-m-d H:i:s)), the generated NFA results in A70171480. Searching on, I found little, even more in Portuguese. To be honest, I haven’t seen enough…
-
2
votes3
answers313
viewsQ: Dynamically generated ajax tags are not viewed by jquery
I am generating a dynamic table through AJAX that in one of the TDS there is a link. <a href="#modalInserirDescontoCB" class="modal-trigger id_aluno">104490</a> The link must perform two…
-
1
votes1
answer307
viewsQ: Session is destroyed after redirect in Codeigniter 3
Developing a login system, I wrote the following script in the controller: $usuario = $this->input->post('usuario'); $senha = $this->input->post('uenha'); $q =…
-
0
votes1
answer982
views -
3
votes1
answer653
viewsQ: Select with two tables and one condition in each with MYSQL
I have two unrelated tables. One is of reports, where it contains names of teachers and their respective subject, the other table is called login, where it contains credentials of each teacher,…
-
1
votes0
answers124
views -
0
votes0
answers65
viewsQ: Calculation in Excel and PHP/SQL with different result
I made the calculation of a column in my spreadsheet and the value is X. However, when I calculate the column with SQL using SUM, or even in a loop with PHP, the value is different. The funny thing…
-
5
votes1
answer1602
viewsQ: How to avoid deletion of relational data through referential integrity in MYSQL?
I have the tables SIMULATED and QUESTAO, where a simulated can have several questions, but a question can only be for a simulated (relationship 1-n). MOCK TABLE: simuladoId simuladoNome TABLE…
-
1
votes1
answer160
viewsQ: How to export and download EXCEL file?
I am generating an EXCEL spreadsheet through a function Function, Everything is done correctly. The file is generated in the ROOT folder of my application, however, I would like to know if it is…
-
0
votes1
answer128
viewsQ: Complex SELECT with five+ tables
You guys, good night. I am developing a search system, and the query should be performed IN ALL existing tables. It turns out that for each type of result there is a presentation, for example:…
-
0
votes0
answers88
viewsQ: Fatal error & Pdoexception in SELECT POO PDO
I am trying to perform a select, but I receive the following messages concerning the same line: Fatal error: in C:\wamp\www\curso\Crud.class.php on line 24 PDOException: in…
-
0
votes1
answer118
viewsQ: How to hide a site from search engines?
I have a site that was indexed with 115 pages, and 3/4 are with the old links. The new project is in development, so the idea is to remove the current site from the search engines, and after the end…
-
8
votes2
answers1931
viewsQ: Meta Keywords is still needed?
I’ve been reading about the meta tags, and many sites that are no longer important to Google and other search engines the use of the goal 'Keywords', causing some doubt of use in the project I’m…
-
0
votes0
answers77
viewsQ: in_array with friendly URL
I’m applying Url friendly with explode, doing as follows: $url = isset( $_GET['url'] ) ? addslashes( $_GET['url'] ) : ''; $url = rtrim( $url, '/'); $explode = explode('/',$url); Everything works…
-
1
votes1
answer99
viewsQ: Comparing a function result
I’m a beginner in JS. The script below will calculate the points of two teams, which will be informed through the prompt (yes, it is boring, but it is for test). I created (or tried) a function to…
javascriptasked Cobra 1,159 -
0
votes2
answers2182
viewsQ: How to change the color of the link when you are on the link page accessed
I see many sites that, when the person opens the "ABOUT" page, a CSS is activated that stylizes only that link. I believe it is with JS, and it involves comparison with URL, but in practice I have…
-
6
votes1
answer649
viewsQ: When marking checkbox, leave visible link
In my content management system, there is a checkbox in every item on the list, whether to edit, delete, view.. It turns out that this button appears all the time, and in case the user does not…
-
0
votes2
answers171
viewsQ: Paging in search failed when switching pages
When incrementing a paging system in my search system, I get an error when passing from the first page to another.. Error: http://localhost/admin/pages/search.php? search=Orixa? pag=2? pag=3 HTML…
-
2
votes1
answer1978
viewsQ: How to set box amount with flex
If I use display:flex in a structure ul>li, all items will be squeezed into a single row. I wonder if it is possible to determine the limit per line, for example three.. I can do with float:left,…
-
3
votes1
answer246
viewsQ: Hide submenu by clicking another
I wish that when I clicked on a submenu item, what was active was hidden. I found a similar script but I had a hard time adapting. I am using the following script for the onclick submenu Javascript…
-
1
votes1
answer330
viewsQ: Include in absolute address
I am trying to include the config.php file that is in the site root folder. However, I also have the header.php file at the root of the site and all the pages are in a folder with this name, so the…
-
0
votes2
answers286
viewsQ: GET error in PHP paging
I am trying to adapt the relative links to absolutes in my pagination script. However, whenever I try to go forward or back a page, the link is as follows: http://localhost/textos?pag=2?pag=3…
-
5
votes2
answers1020
viewsQ: How does the pagination with PHP + AJAX occur?
I was browsing the site looking for a functional example of paging with AJAX + PHP, when I found this example Excuse my ignorance, but the 'asynchronous loading' of AJAX causes me doubts.. However,…
-
2
votes2
answers507
viewsQ: mysql errors being displayed in French
All errors I receive regarding the phpmyadmin database are in Frances. However, the panel is in en, only query errors -a select for example- are displayed in French. I use the WAMP. EX: Aucune base…
-
12
votes4
answers651
viewsQ: display:One consumes data?
Some questions about what happens when we use the property display:none of css: Is the element loaded and not displayed? Or it is not loaded (and therefore does not consume data)?…
-
1
votes2
answers302
viewsQ: Change label class (icon-font) with click
I am using iconfonts in a drop-down menu, where the link is as follows: <li class="abre-dropdown"><a href="javascript:void(0)"><label style="float:left;"…
-
4
votes0
answers162
viewsQ: How does Ajax paging work?
I’m using a script to make the pagination through Ajax, workable assíncrona, the situation made me curious, because until then I had only used pagination php+mysql, never php+mysql+ajax. If my bank…
-
1
votes0
answers44
viewsQ: Solution/alternative to href="#"
I’m using ajax paging, and every time I click to the next page, the browser goes back to the top because of # that’s on the href. <a href="#" onclick="getitens('+(pagina-1)+',…
-
0
votes1
answer155
viewsQ: Solution/alternative to obsolete eregi_replace
I’m getting the following error: Deprecated: Function eregi_replace() is deprecated in C:\wamp\www\ajax\paginator.inc.php on line 202 This is a line from a script that pages php+mysql+ajax Line 202:…
-
4
votes3
answers838
viewsQ: Uncheck a checkbox by clicking outside of it
How is it possible to uncheck a checkbox if I click another field of the site? The checkbox is used so that when the status is 'checked', it 'drags' my menu from -65% to 0 and appears on the screen,…
-
1
votes1
answer330
viewsQ: Javascript script adaptation 'show more'
I’m using a script that was posted here in stackoverflow, which is to limit the display of posts accompanied by a 'show more' link, to load another amount of posts. Follows the LINK Note: If…
-
1
votes1
answer309
viewsQ: Linear-gradient and browser compatibility
I’m using the following background css in a menu: background: -webkit-linear-gradient(left, #0260a9, #444); /* For Safari 5.1 to 6.0 */ background: -o-linear-gradient(left, #0260a9, #444); /* For…
-
1
votes1
answer47
viewsQ: Link misdirecting with htacess
I am using the following structure in addresses/links to url friendly in fixed of my page: RewriteRule ^teste(.*)$ teste.php So, my address is as follows:: www.site.com/teste It turns out that if…
-
1
votes1
answer4496
viewsQ: DELETE function with php and mysql
deleta.php: <?php // quero transformar esse script em função e chama-lo no link // deleta um unico post include("config.php"); $id = $_GET['id']; $sqlInsert = "DELETE FROM conteudo WHERE id =…
-
2
votes1
answer294
viewsQ: Tinymce - How to turn it into a required field?
I’m using a field of TextArea with the TinyMCE for text posting and would like to know if it is possible to add some validation so that it does not accept blank values. I’ve tried to add the…
-
1
votes1
answer2740
viewsQ: Fadein and Fadeout Effect in DIV
It may sound cliché, but I haven’t found or been able to adapt any code here on the site to my needs. I apologize if it’s content redundancy, but in the future it might help other people. How can I…
-
4
votes1
answer9332
viewsQ: How to Do Ascending and Descending Listing in PHP Records
My table is as follows Through PHP, I am listing the MYSQL database records within a WHILE LOOP. I would like to know how to do so that when clicking on ID, or DATA, the data is displayed in an…
-
0
votes0
answers694
viewsQ: Checkbox that selects all others
How can I create a checkbox that selects all others from my page? I’m using a while loop in php to list the records, and each one has its checkbox next to it. I would like to have a checkbox on the…
-
1
votes1
answer353
viewsQ: Delete in multiple POSTS with checkbox
I have already implanted on my site a link to each post that deletes through the ID in the database. When you click the delete button, the link sends to the 'delete.php' page that executes the…
-
4
votes1
answer76
viewsQ: Sitemap - What to list?
I am creating the sitemap of my project and listing the link http://www.site.com.br/articles I remembered that each article has a single page, so it is a dynamic page. The question that came to mind…
-
1
votes1
answer198
viewsQ: Filter linking words from phrase elements
I’m trying to make a word filter in a string, to store in a variable. Grammatically, they are called prepositions, circumpositions and postpositions. They are used in binding elements of a sentence.…
-
4
votes3
answers1074
viewsQ: Add a comma to each word
Ex.: $str = "texto de teste"; // RESULTADO ESPERADO $keywords = "texto, de, teste";
-
2
votes2
answers2288
viewsQ: Can I use PHP to create dynamic meta tags for SEO?
I wonder if it is possible to use PHP in metatags, like Description, Keywords... I already use the title: <title><?php echo $titulo; ?>. I can do the same for metatags? Of: <meta…
-
4
votes1
answer339
viewsQ: Consult if SLUG already exists
I would like to know how I do to query if a SLUG already exists in the database and, if it exists, how to increment +1 at the end of the string, getting: site.com/artigo/titulo-de-teste1…