Posts by DiChrist • 4,567 points
91 posts
-
0
votes0
answers12
viewsQ: Connect Laravel application on WSL2 with database on Windows
I have a portable application using WSL2 that runs normally. I had a recent problem when I needed to connect this application with the database that is installed on Windows. I tried to connect…
-
1
votes2
answers404
viewsQ: Get data from all days of the months in the query range
I have a query in SQL Server that returns me the data from 1 ago SELECT titulo, categoria FROM posts WHERE dataCadastro BETWEEN DATEADD(year,-1,GETDATE()) AND GETDATE() ORDER BY dataCadastro DESC";…
sql-serverasked DiChrist 4,567 -
1
votes0
answers40
viewsQ: How to handle key and request value in php?
I am willing to handle the $_REQUEST keys and values that a page receives. The check would be: if(!empty($_REQUEST)){ // Tratamento das chaves e valores } This is because I had some problems…
-
1
votes2
answers137
viewsQ: Find 2 occurrences in powershell
How can I find 2 occurrences together in a determining file using powershell? $p = @("string1","string2") get-content C:\log.txt | Select-String -Pattern $p Above, the expression returns me…
powershellasked DiChrist 4,567 -
4
votes2
answers471
viewsQ: What advantages does angular typing offer?
I’d like to enjoy as much as Angular can offer. And one of the things I want to understand well is all what the tipagem of Angular helps me at the time of development. I saw that one of the…
-
5
votes2
answers4660
viewsQ: Is it possible to simulate safari in windows?
I was wondering if you have any way to simulate safari in windows, because in some situations the layout that is applied in Chrome does not work right in safari. With this I wanted to know if it has…
-
2
votes1
answer45
viewsQ: Restriction of caractes at the end of regex
I need to make a regex capture urls that only end with letters or numbers. I got this regex right here: (https?)(:\/\/www.site.com.br)(\S){1,} The way it is, this regex allows urls to end with…
-
0
votes0
answers415
viewsQ: Load random image in background-image using css
It is possible using css only, load random images into the background-image property of any element? For example I have a Section <section id="slide"> </section> And I have a folder…
-
1
votes2
answers411
viewsQ: How to load autoload classes on web and local server
I need to make my file that makes the class instance of my project work on both the web server and the local server. This is the file that makes autoload, autoload.php <?php spl_autoload_register…
-
2
votes2
answers165
viewsQ: How to select elements that have a valid id?
How do I select elements that have an id set? For example, inside the section below I have the following: <section> <div class="div"></div> <div id=""></div> <div…
-
1
votes1
answer1224
viewsQ: Install Full-text in SQL Server
I plan to use full text index (Full-Text) in my SQL Management Server 2014. I created a catalog with the command: CREATE FULLTEXT CATALOG [noticiasFullText] WITH ACCENT_SENSITIVITY = OFF And when I…
-
4
votes1
answer2032
viewsQ: What are the ways to create html file using php?
I wanted to know the possibilities I have of creating a arquivo.html using the php. In case I wanted to make a button when clicked generate it for me. For example, I have a page on php and on it…
-
2
votes2
answers323
viewsQ: How to get source of request in Asp?
I need to do a certain action with a page that is in classic Asp. What I need is get the origin of the request which is made on that page and depending on what the origin, I do something related to…
-
7
votes4
answers402
viewsQ: How to remove parentheses of values in an array?
I have an array and need to remove all parentheses from all values array. Follows the array: $array = array( "chave1" => "(valor1)", "chave2" => "(valor2)", "chave3" => "(valor3)" ); I need…
-
3
votes1
answer466
viewsQ: How to apply html to text found in javascript?
I need to use regex in javascript The situation is this: I need to get the text that is with you inside the element with the text class. After picking up this text, I should analyze whether it…
-
3
votes2
answers878
viewsQ: Limit record occurrences for each type
I need to limit the number of occurrences of each type of material I have in my database. Follow the query below with what I want to do: SELECT TOP 10 ID, NOME, TIPO FROM TB_MATERIAIS WHERE TIPO = 1…
-
1
votes1
answer192
viewsQ: What is the difference between freetexttable and containstable
I am mounting a query that will need to take the term typed in a search and make a query by similarity proximity in the content. Is being used a "rank" that is generated with the use of these…
sql-serverasked DiChrist 4,567 -
0
votes1
answer241
viewsQ: Identify a given url and change href property with preg_match_all
Personal opa, I have a function that should identify a given url. If the url is identified, it should be involved with the tag <a> and its property href must be equal to the value of the url…
-
8
votes3
answers6551
viewsQ: How to check if a value is date
How can I check if a post is of the type date? There was a situation where I have a form that contains a date field: <form action="" method="post"> <input type="date" name="data">…
-
3
votes2
answers213
viewsQ: How to avoid excessive line breaks in a textarea
So guys, how can I replace in a text, excessive line breaks, making when I have more than one line break in a row these occurrences are replaced by a single one, regardless of how many were placed.…
-
2
votes2
answers807
viewsQ: Limit total options in select - PHP
To limit the number of options selected in a select so that the form is not sent above a maximum amount. For example, I want a maximum of 3 options to be submitted in the form. Above that, I wanted…
-
1
votes1
answer49
viewsQ: How to find content without a specific tag
I’m in a situation where I need to find content without a specific tag. Of course any content is surrounded by a tag, even if it’s body or html. With the example becomes clearer what I need: <div…
-
1
votes1
answer332
viewsQ: Problems with utf8_decode in array return
I have a problem that has left me quite confused. I have a page in php that registers ministries. In it I send the data via ajax to another php page to do the insertion, and the insertion always…
-
8
votes5
answers426
viewsQ: Explodes with name indexes (associative)
How can I make a explode in a variable where I can then access it through nominal index, and nay for numerical index? Follow the example to be clearer: <?php // Aqui acesso pelo índice $user =…
-
1
votes1
answer59
viewsQ: Calculation of string occurrence
I have a table with 3 columns id, nome and voto. They’re populated with a lot of records, and I need a calculation to return the name with best "balance" of votes. The column voto can only receive…
-
5
votes3
answers421
viewsQ: Query with conditions in SQL SERVER
Follow the tables below with my question I have a problem, where I make a filter in which I need to get the posts that have the column post_parent of the post table with value other than 0, and also…
-
-1
votes1
answer129
viewsQ: Dynamic update with variable check $_POST
I have a problem. I am mounting a dynamic update, but I am not able to mount in the query the part of parameters to be updated. Follow the code below to be clear what I need: function…
-
-1
votes1
answer611
viewsQ: How to send via ajax the value of the selected option in a select?
I have two selects, one for states and one for cities. I want to take the value of the select of states with the change event, send it via ajax and recover the cities that has the corresponding…
-
6
votes1
answer1328
viewsQ: How to restrict dates in Mysql and SQL Server?
I wonder if I can restrict certain dates in the database itself, not in the code. For example, I have a table that records date of entry and date of exit. Here are some requirements. The date of…
-
4
votes3
answers3129
viewsQ: How to list the properties of an object in php using foreach?
I have the following class: class Usuario{ private $nome; private $profissao; function setNome($nome){ $this->nome = $nome; } function getNome(){ return $this->nome; } function…
-
1
votes2
answers3374
viewsQ: Modify foreign key for auto-increment
I have two tables in my bank membro, membro_grupo, grupo The table grupo has a column called id_grupo which is the primary key in this table. The table membro has a column called id_membro which is…
-
0
votes1
answer118
viewsQ: Break loop on page
I have a problem, that I researched and thought how to do, but I could not solve. I have a select on the page that needs to be populated after a condition is met. And after that, it needs to query…
-
4
votes2
answers4795
viewsQ: How to subtract hours from a javascript date?
I have a variable that receives the current date and I need to subtract hours from that date. var data = new Date(); Like subtraction of hours of that date?…
javascriptasked DiChrist 4,567 -
4
votes1
answer500
viewsQ: Is it OK to use SQL Server or Mysql with PHP?
I’m putting together a medium project and I’m going to model the bank, then create the tables, the views, as procedures beyond the bank itself of course. I would create everything with Mysql, but by…
-
6
votes1
answer1911
viewsQ: Maximum size for database tables
What can be the maximum size that a table can have? To make it clearer: a table in Mysql, what is the maximum size it supports? And in SQL Server, Oracle, Postgresql?
-
0
votes0
answers82
viewsQ: What do I call Popover instead of an infowindow?
I have a situation on the maps where I have several markers on the map and each with a different identification. I can use the infowindow normally to display all the data relating to that marker.…
-
5
votes2
answers1563
viewsQ: How to get all parent elements except for a few
I’m in a situation where I need to take all the "parent elements" of a div, but I can’t take them all, because it would not solve my problem. I wonder if I can put a limit on getting these elements.…
-
4
votes1
answer3517
viewsQ: Default error for datetime field in Mysql
I had a problem trying to run my database script on the server. The error already gives in the first table that the script generates: CREATE TABLE IF NOT EXISTS `categoria` ( `cd_categoria` int(255)…
-
1
votes2
answers298
viewsQ: How to insert a javascript generated html variable
The problem I have is this. I have a code that generates several html results for me. I just need a detail I couldn’t implement. The code is as follows:: $('#avaliacoes').append('\<div…
-
20
votes1
answer14650
viewsQ: What are the differences between utf8 and utf8mb4?
When importing my mysql database to a windows server after having created it on a local server (xampp), I could not import into the server the script I exported from the database. So I decided to go…
-
4
votes4
answers181
viewsA: Unidentified error in Jquery
I managed to solve it, but it was on the basis of the test, I didn’t quite understand why you solved it, but come on: The code now: $(function () { $("body").on("click",".voltar", function(){…
-
5
votes4
answers181
viewsQ: Unidentified error in Jquery
This error occurred in a script of mine, but in my script there is no such line break that the error is showing. The description of the error is exactly this: Uncaught Syntax Error: Unexpected Token…
-
1
votes1
answer792
viewsQ: How to find a term in a mysql database?
How can I search all fields of all tables in a particular mysql database? I need to find a word that I have no idea where it is. The result would specify the name(s) (s) of the table(s) and the…
-
1
votes1
answer45
viewsQ: Query result with SET STATISTICS
I was wondering if there’s any way I could get the results of "SET STATISTICS TIME ON". For example, the result of my query gave 1139ms. Is there any way I can get this result and manipulate it?…
-
0
votes1
answer129
viewsQ: How to change contents of . htaccess via php?
I was wondering if there is any way to change . htaccess via php. An example of what I want is that by htaccess I can restrict the access of a certain ip with the command: deny from 67.114.135.60 If…
-
3
votes2
answers237
viewsQ: How do I select only one element with a class that exists in other elements?
I’m in a situation where I have three elements on the same page. <img class="imagem" /> <img class="imagem" /> <img class="imagem" /> I would like to select the second element of…
-
2
votes3
answers2173
viewsQ: How to select all tables in mysql
What query makes me query a certain database in mysql that brings me all its tables?
-
8
votes6
answers20421
viewsQ: How to get weather and weather information?
I came across a problem I’d like to see if it can be solved similar to the post office. When you have a zip code you can rescue from a web service other data, such as the address and city of that…
-
1
votes1
answer13610
viewsQ: Percentage calculation in SQL SERVER
I have a little doubt that I am not able to solve, I looked here in the community, but I did not find exactly what I want. My situation resembles the following: I have N product records in my…
-
2
votes1
answer185
viewsQ: Can Sql Server Management Studio handle any database?
I am asking this question because I find this DBMS simply fantastic, so I would like to use it with another database (not because I want to, but because most of the databases I have are in Mysql).…