Posts by Italo Rodrigo • 4,344 points
275 posts
-
1
votes4
answers3710
viewsA: Doubt with month and year extraction in Postgresql date
I resolved so: to_char(D.dt_ficha, 'YYYYMM') as data,
-
2
votes4
answers3710
viewsQ: Doubt with month and year extraction in Postgresql date
I am using a select command where I take the month and year of the date as follows: extract(year from D.dt_ficha) + extract(month from D.dt_ficha) Only instead of showing up like this: 201711…
-
2
votes2
answers710
viewsQ: Help with Join in two different selects
I have two select commands (a bit complex). First code: select A.no_cidadao NOME, F.no_equipe UNIDADE from tb_cds_cidadao_resposta E, tb_cds_cad_individual A, tb_cds_prof as G, tb_pessoa_fisica as…
-
2
votes1
answer1419
viewsQ: Error connecting Delphi 10.2 + Zeos + Postgresql
I’m trying to connect Zeos to a Postgresql database. I already copied all the DLL’s to the application folder. Zeos finds the DLL, but gives an incompatibility error: Client-Library libpq.dll found…
-
1
votes0
answers94
viewsQ: Error connecting to DBC bank
I am trying to connect my program to a DBC database using the tutorial from this link: http://rodrigolameira.blogspot.com.br/2009/08/conectando-banco-dbc-em-c.html The code used is as follows::…
-
0
votes3
answers82
viewsA: Error formatting date in C#
Solution found: string s = linha.data.Value.ToString("yyyyMMdd");
c#answered Italo Rodrigo 4,344 -
1
votes3
answers82
viewsQ: Error formatting date in C#
I’m trying to format a date: string s = linha.data.ToString("yyyyMMdd"); but I’m getting an error in ToString() No Overload for Method 'Tostring' takes 1 argument Any hint? EDITED In my date field,…
c#asked Italo Rodrigo 4,344 -
1
votes0
answers773
viewsQ: Help with error Non-static method requires a destination when creating txt file
I have a C# code that creates a txt file and then downloads it. The code works very well on my local machine, but when uploading it to the server, it gives an error: Non-static method requires a…
asp.net-mvcasked Italo Rodrigo 4,344 -
2
votes1
answer680
viewsQ: Show specific error in ASP.NET MVC
I created a site that works normally, however, when uploading it to the hosting server, it shows an error: Server Error in Application '/'. Since the error is too generic, he says to include the…
-
0
votes0
answers162
viewsQ: Error downloading PDF in Wordpress
I created a page to download PDF files. It included the following code: <a href="https://revistamovimentto.com.br/wp-content/uploads/2017/10/Movimentto-Edição-88.pdf" download> <img…
wordpressasked Italo Rodrigo 4,344 -
0
votes0
answers13
viewsQ: How to change wordpress plugin dynamically?
I am using a plugin on wordpress, which allows me to display a PDF in book form. To use the plugin, I have to write the line [flipbook pdf="http://full-url/NOME_DO_PDF.pdf"] Everything works…
wordpressasked Italo Rodrigo 4,344 -
1
votes2
answers1138
viewsQ: How to change property of another object?
I have a screen with two 2d objects: player and enemy, both are prefab of an object called fighter. They have three properties: attack, defense and hp. I created a script and included in the camera,…
unity3dasked Italo Rodrigo 4,344 -
0
votes1
answer210
viewsA: htaccess friendly URL does not work in Plesk?
The solution is to change the file web.config: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="exemplo 1"…
-
0
votes1
answer210
viewsQ: htaccess friendly URL does not work in Plesk?
I created the file .htaccess and included it in the root of my site with the following code: RewriteEngine On RewriteRule ^([a-zA-Z0-9_-]+)$ teste.php?u=$1 RewriteRule ^([a-zA-Z0-9_-]+)/$…
-
0
votes1
answer686
viewsQ: How to take the value of an input, according to a DATA attribute
I have the following table: <tr> <td>FULANO 1</td> <td>USUARIO 1</td> <td> <input type="text" data-id="1" class="form-control" id="senhaA" size="6">…
jqueryasked Italo Rodrigo 4,344 -
11
votes1
answer332
viewsQ: How to know if path exists?
One of the classes of my system is created with the information of a file. When starting the system, it initially runs the following lines: public List<Estabelecimento>…
-
3
votes4
answers6487
viewsA: Maximum request size ASP.Net MVC
I had the same problem and could not solve with the Gypsy solution. I decided to insert the following code in the web.config: <httpRuntime executionTimeout="90" maxRequestLength="4096" //aumentar…
-
3
votes1
answer2927
viewsQ: How to use 2 Wordpress themes on the same blog?
I have a theme I want to use on the home page and I have another one I want to use for posts. Is it possible to do this? If so, how?
-
3
votes2
answers284
viewsQ: How to compare two string by marking the differences?
Let’s say I have the strings: Oi, meu nome é ítalo and Olá, meu nome é ítalo How to generate a result +- like this: Hi, my name is Italo Hello, my name is Italo The system must somehow mark the part…
-
2
votes1
answer885
viewsQ: Is there a difference between using backslash and simple?
I wonder if when it comes to doing upload of a file, like this: $destino = 'imagens/' . $novoNome; There is a difference between imagens/ and imagens\?…
-
0
votes3
answers4858
viewsA: How to write a date in ISO 8601 type
var tempo = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ"); var httpWebRequest = (HttpWebRequest)WebRequest.Create("teste"); httpWebRequest.Headers.Add("Date: "+ tempo); …
-
3
votes3
answers144
viewsQ: Help with select
I’m using the remote select down below: select f.no_equipe, h.no_pessoa_fisica, a.no_cidadao, d.dt_ficha from tb_cds_cad_individual a, tb_cds_atend_individual b, rl_cds_atend_individual_ciap c,…
-
1
votes1
answer394
viewsQ: How to send parameter to Actionresult?
I have the ActionResult Login that validates my user and saves the data in a Session, if everything goes ok, redirects to the ActionResult BPAC: [HttpPost] public ActionResult Login(string pUsuario,…
asp.net-mvcasked Italo Rodrigo 4,344 -
0
votes2
answers409
viewsA: Access denied error 403 when not using https
Access the Plesk > Dominios > meudominio.com > Configurações de Hospedagem Tick the box: Redirecionamento 301 SEO seguro permanente do HTTP para o HTTPS Then go to Access the Plesk >…
-
0
votes2
answers409
viewsQ: Access denied error 403 when not using https
I created a website on ASP.NET MVC and uploaded my files to my hosting plan. There I am entitled to a free Let’s Encrypt certificate. After activating it, an error occurred: If I access my website…
-
1
votes3
answers845
viewsQ: How to simulate Ctrl+v
Is there any way to simulate a Ctrl+v using Javascript? I want to include a button and an input. When clicking the button, whatever is in the clipboard should appear in the input. The code is for an…
javascriptasked Italo Rodrigo 4,344 -
0
votes2
answers483
viewsQ: How to take an object property in a Session?
In my Controller, have a ActionResult responsible for logging in the user: [HttpPost] public ActionResult Valida(string pUsuario, string pSenha) { oUsuario = modelOff.usuarios.SingleOrDefault(p…
asp.net-mvcasked Italo Rodrigo 4,344 -
1
votes1
answer120
viewsQ: Changing a Controller name without losing information
I have a Controller called Home and I want to change the same to BPA. I want to know if I can just change the name HomeController for BpaController and change the name of the Home folder in the View…
asp.net-mvcasked Italo Rodrigo 4,344 -
1
votes1
answer797
viewsQ: How to include a line at the beginning of a text file?
My system generates a text file, and based on the sum of an information that appears on each line, it makes the calculation of a checker digit. However, this result should be in the first line of…
-
0
votes1
answer4931
viewsQ: Error "Unable to load file or Assembly"
Any help with the error below? Could not load file or Assembly 'Html5datalist-DESKTOP-P3666CV' or one of its dependencies. The definition of the localized Assembly manifest does not correspond to…
asp.net-mvcasked Italo Rodrigo 4,344 -
1
votes1
answer71
viewsQ: How to use SUM in a string field by converting the value to int?
I have a table that has a field PA that is string, it stores a 10 digit number and I can’t change the type of it because it references another table. I’m trying to add this field like this: Int32…
-
0
votes2
answers202
viewsQ: txt file opens in the browser instead of being downloaded
I use the following code to generate a txt file and send it to my View: public ActionResult geraBpa(){ var caminho = System.Web.HttpContext.Current.Server.MapPath("~/Content"); using(StreamWriter…
asp.net-mvcasked Italo Rodrigo 4,344 -
0
votes1
answer51
viewsQ: View error returning a txt file
I’m using the following code in my Controller: public ActionResult geraBpa() { var caminho = System.Web.HttpContext.Current.Server.MapPath("~/Content"); StreamWriter file = new…
-
1
votes0
answers458
viewsQ: How to create a txt file and download?
I use the code below to generate a txt file in Windows Forms: StreamWriter file = new StreamWriter("D:\teste.txt"); List<Producao> bpa = ProducaoDados.BuscarBPAC(txtCompetencia.Text); foreach…
asp.net-mvcasked Italo Rodrigo 4,344 -
0
votes1
answer264
viewsQ: Select command to delete duplicates by summing the results
How to change a table that looks like this: produto | quant a | 10 a | 5 b | 8 b | 3 And leave her like this: produto | quant a | 15 b | 11 Is there any command select that I can use to make this…
-
2
votes1
answer372
viewsQ: Error using "greater than" in select command with case
I am trying to execute the following select command: SELECT estoque.id, produto.id, produto.descricao PRODUTO, case saida.quant when > 0 then (estoque.quant + sum(saida.quant)) else estoque.quant…
-
2
votes2
answers9830
viewsA: Error encountering file: Roslyn csc.exe
To solve, it’s enough NAY update the package: Microsoft.CodeDom.Providers.DotNetCompilerPlatform for the version 1.0.6 I went back to the version 1.0.5 and back to normal.…
asp.net-mvcanswered Italo Rodrigo 4,344 -
4
votes2
answers9830
viewsQ: Error encountering file: Roslyn csc.exe
I was using Visual Studio 2017 normally in an MVC project when it asked to update some packages via nuget. By doing this, the application no longer wanted to compile and presents the error below:…
asp.net-mvcasked Italo Rodrigo 4,344 -
0
votes1
answer43
viewsQ: Error in file . js
Included a . js file in an MVC project. my . js file looks like this: $(document).ready(function() { function escondePanel(painel) { $("#pnPessoal").css("display", "none");…
-
-1
votes3
answers590
viewsQ: How do I know if one string contains another?
I have a List<string> with four items: C:\Users\Producao\OneDrive\VisualStudio2017\siteRelatorios\bpa\Content\Upload\LFCES004.txtb9109712-d3f2-4151-bbac-7fbc82ed99de…
c#asked Italo Rodrigo 4,344 -
0
votes3
answers58
viewsQ: Nullreferenceexception error in Join
I created a Join in LINQ to create a List: (from p in listaProcedimento join pd in oListaprocedimentodetalhe on p.codigo equals pd.codigoProcedimento into pd1 from pd2 in pd1.DefaultIfEmpty() select…
-
2
votes1
answer1277
viewsQ: How to do Union all in LINQ?
I need to execute the command below using Linq: SELECT cnes, cmp, cbo, profNome, pa, sum(quant) total FROM bpai group by pa union all select cnes, cmp, cbo, profissional, pa, sum(quant) total from…
-
0
votes1
answer156
viewsA: How to know if a Json request did not return result?
I managed to make a change in the Controller: public JsonResult pegaPaciente(string pCns) { paciente oPaciente = modelOff.pacientes.SingleOrDefault(p => p.cns == pCns); if (oPaciente == null)…
-
0
votes1
answer156
viewsQ: How to know if a Json request did not return result?
I have a code in JavaScript who does a search in a database and fills in a input with the patient’s name found: $("#bCns").keypress(function (e) { if (e.which == 13) { var options = {}; options.url…
-
2
votes2
answers1884
viewsQ: What are model and model variables for in a View?
What are variables for @model and Model in a view? In my view I use it at the beginning of the code: @using Html5DataList.Models @model List<Estabelecimento> And to access the data, I use it…
-
1
votes1
answer50
viewsQ: Redirect to Action according to if
I have a Controller: [HttpPost] public ActionResult Login(string pUsuario, string pSenha) { usuario oUsuario = modelOff.usuarios.Where(p => p.usuario1 == pUsuario && p.senha ==…
asp.net-mvcasked Italo Rodrigo 4,344 -
0
votes2
answers114
viewsQ: How to receive information in a View?
I programmed my controller as follows: [HttpPost] public ActionResult Login(string pUsuario, string pSenha) { usuario oUsuario = modelOff.usuarios.Where(p => p.usuario1 == pUsuario &&…
-
2
votes4
answers1346
viewsQ: Select query by age group
I made an appointment select thus: SELECT data, sexo, idade, count(*) qtd FROM marcacao group by data, sexo, idade And return me a table similar to the table below: DATA | SEXO | IDADE | QTD…
-
3
votes1
answer416
viewsQ: How to format Datetime in C#?
I know two ways to format a date in C#: data.ToShortDateString that gives me a return like this: 21/07/2017 data.ToLongDateString that gives me a return like this: Friday, July 21, 2017 I want a…
c#asked Italo Rodrigo 4,344 -
1
votes1
answer335
viewsA: Button with two value only with html is possible?
You can create your own properties for your html tags using the word data-: <button type='roll' id='roll_arma1' data-valor-um='meu valor 1' data-valor-dois='meu segundo valor'></button>…