Posts by Marcelo Shiniti Uchimura • 3,302 points
208 posts
-
3
votes2
answers517
viewsA: Pass parameters through the url
In the controller, the line is like this: ViewBag.pIdTce = id; And in the view, new { id = @ViewBag.IdTce } Missed the p!…
-
4
votes2
answers386
viewsA: Regular expression C# console application
Also available on Ideone. Try it like this: using System.Text.RegularExpressions; using System.Collections.Generic; using System; using System.Linq; public class Program { public static void…
-
1
votes3
answers196
viewsA: Growth ranges of an array’s values
See also on Ideone. The example below shows the start and end indices of each interval and the sign of the first derivative (+1 if positive, 0 if constant, and -1 if negative). using System; using…
-
2
votes1
answer863
viewsQ: Are Keras and Tensorflow the same thing?
I walked vulture some tutorials of Tensorflow lately and I realized that the error reduction models, the interleaved mapping and normalization models and the layers models themselves of a neural…
-
1
votes4
answers399
viewsA: Select Option does not search or save the value selected by the user
There are two life cycle types of a web application: Server side Client side Since you want the link to the change to receive a value that changes according to your handling of the application on…
phpanswered Marcelo Shiniti Uchimura 3,302 -
3
votes1
answer33
viewsA: Insert id in data-formid="" from jquery
$('#eventID_faturar').data('formid', event.id); More details here EDIT: AP wants to put the value inside the tag form. Do as follows: $('form:eq(0)').data('formid', <valor a passar>); Where…
jqueryanswered Marcelo Shiniti Uchimura 3,302 -
0
votes2
answers71
viewsA: PHP comparator " != "
It’s not better to do it instead of while (db2_fetch_row($stmt)) { $name = db2_result($stmt, 0); if ($name != $USER) { echo "<h1>Usuário $name, não encontrado.</h1>"; die ; } } do so,…
-
4
votes3
answers150
viewsA: Two equal programs providing different outputs
The programs are not the same. When you did a = b you just lost the original value of a. Your program should circumvent this problem as follows, temp = a a = b b = temp + b k = k + 1…
-
-2
votes3
answers299
viewsA: How to make Visual Studio interpret an hour that is larger than 23hrs and smaller than 6hrs at the same time?
Let me give you an example in JS that is readily executable to illustrate that you need || instead of &&. document.write("<h1>Com &&, que é o caso original</h1>"); //…
-
0
votes2
answers395
viewsA: C# With Selenium - Doubt about xPath
Your HTML is poorly formed. You have to put tag endings in the INPUT tags. The Xpath you are looking for is: //input[@type='image'][@name='exportReport']
-
1
votes1
answer75
viewsA: Doubt query in SQL Server - Information Association
Try it this way: http://www.sqlfiddle.com/#! 9/f9a09c/3 The DDL below is optional, CREATE TABLE Tabela1 ( IdP INT NOT NULL PRIMARY KEY, Nome NVARCHAR(5) NOT NULL ) GO CREATE TABLE Tabela2 ( IdG INT…
-
2
votes2
answers52
viewsA: How to search for specific data on the same line?
Using System.Xml.Linq.XDocument: var xml = @"<?xml version=""1.0"" encoding=""utf-16""?> <TICM> <DataProvider> <FCM> <Row GenericKitName=""12000"" QueryID=""999""…
-
4
votes1
answer83
viewsA: Code works with a messagebox but no no?
Winforms is based on Rapid application Development and many operations in graphical interface are related to the events that occur in the interface. As an example, I "tied" below the effect of…
-
3
votes2
answers127
viewsA: How to use Groupby according to parameter?
Your model should reflect the following hierarchy: Once done, change the context of the comic book as follows: public virtual DbSet<Conta> Contas { get; set; } At the point where the context…
-
1
votes1
answer71
viewsA: SELECT of Header and Items of an XML
I only changed the Xquery of @APP and of @LOTE. Everything else is almost the same. DECLARE @XML XML = CONVERT(XML,' <ROOT v="2.15.0"> <LOTEANIH APP="00B1" LOTE="1"> <LOTEANIM…
-
-1
votes2
answers385
viewsA: SQL using sum
select data, sum(quantidade * case when qtdcxver is not null and qtdcxver <> 0 then 1 else 0 end) as TotalVer, sum(quantidade * case when qtdcxbra is not null and qtdcxbra…
-
-1
votes2
answers132
viewsA: SHA512 hexadecimal return
Where is StringBuilder result = new StringBuilder(); foreach (byte b in hash) result.Append(b); return result.ToString(); replace with return BitConverter.ToString(hash).Replace("-", ""); That way…
-
1
votes2
answers235
viewsA: How can you clone cards on my website?
You are using anti-fraud token (Antiforgerytoken)? It may be that in the payment of the shopping cart, instead of clicking once, the customer is double-clicking the Pay button. If this is happening…
-
-5
votes3
answers341
viewsA: Why am I calling the subclass method?
In Java, all methods are virtual. Once you overwrite a method, the new implementation is definitive.
-
-1
votes2
answers239
viewsA: Creation of tables with cardinality 1 : N
If an input does not repeat itself in more than one product, you can put a foreign key in the Inputs table, Insumos (*id*, nome, idproduto) Produto (*id*, nome) Thus, you guarantee that no other…
-
-2
votes1
answer84
viewsA: Swap button text by clicking
Exchange the = for === in: if (x = "Imagem ˅") { .... } EDIT: Do it like this, var cliquei = false; function trocarFlecha() { var x = document.getElementById('btnImage').value; if (cliquei…
javascriptanswered Marcelo Shiniti Uchimura 3,302 -
0
votes1
answer72
viewsA: Function going into loop for no reason
Take off the $(this).keydown(...) out of the ("#valorBuscaProduto").focusin(), delete the latter and change the this for "#valorBuscaProduto", getting only with: $("#valorBuscaProduto").keydown(...)…
-
-1
votes3
answers1622
viewsA: What are the allowed elements within the <P> tag?
It’s because of web semantics. "p" comes from paragraph, so it is expected that the content of this tag has run text and perhaps at most text formatting tags, although this can be done more properly…
-
1
votes1
answer1348
viewsA: How to check parentheses of an algebraic expression?
def testaparenteses(expr): contador = 0 for c in expr: if c == '(': contador += 1 if c == ')': if contador > 0: contador -= 1 else: return…
python-3.xanswered Marcelo Shiniti Uchimura 3,302 -
0
votes1
answer407
viewsA: Edit lines in vbscript
Script vbs: Dim arq Dim obj Set obj = CreateObject("Scripting.FileSystemObject") Set arq = obj.OpenTextFile(WScript.Arguments(0), 1) Dim texto Dim conteudo Dim tamanho texto = arq.ReadAll arq.Close…
vbscriptanswered Marcelo Shiniti Uchimura 3,302 -
1
votes5
answers9611
viewsA: How do Closures work in Javascript?
Closure, in JS, for example - let me give you an example of a language - is when the outer scope is seen and guarded, from within a block or inner function. For example, var minhaUrl = "Produtos/1";…
-
-4
votes2
answers240
viewsA: Specialization and generalization in databases and application development
I was thinking that your book specialties were, for example,: Digital books Audiobooks Printed books in which the nature of the reading experience is different, in each case. Hence a specialization.…
-
-1
votes3
answers83
viewsA: I need to do a function that passes an n * m matrix, is transformed into a unidimesional tam n *m vector
#include <stdio.h> /* copiamatrizparavetor * Recebe a matriz, as dimensoes (m = altura, n = largura) * e devolve o vetor-alvo, de tamanho m x n. */ void…
-
0
votes2
answers560
viewsA: What exactly does '%02x' do?
You have a "string" called stringMD, that may have garbage at the beginning of the program. If you don’t fill all their positions with something, in a certain region of it there may be characters…
-
1
votes1
answer30
viewsA: Do not count the integers 1 and 0 in duplicity when they are above, below or next to an integer 2?
Your program is right, unless you can’t count the same sectors more than once, Sectors with zeros 0 0 0 2 2 0 2 2 0 0 If you count the occurrences in the highlighted map to the zeroes, you will see…
coordinatesanswered Marcelo Shiniti Uchimura 3,302 -
0
votes1
answer123
viewsA: Problems when encrypting text with matrices
import numpy print('inversao de matrizes') print(numpy.linalg.inv([[2,3], [4,5]])) print(numpy.linalg.inv([[1,2,-3], [4,5,6],…
python-3.xanswered Marcelo Shiniti Uchimura 3,302 -
0
votes2
answers97
viewsA: HTML escape inside <code> element - No jQuery
Use this: function escapeHTML(str) { var div = document.createElement('div'); var text = document.createTextNode(str); div.appendChild(text); return div.innerHTML; } Source: here…
-
-3
votes3
answers113
viewsA: SQL Server - Query logic
By my answer, you may already suspect that you have a database architecture problem... WITH q (valor, ordem, id) AS ( SELECT a valor, 1 ordem, id FROM tabela WHERE a IS NOT NULL UNION SELECT b, 2,…
-
1
votes3
answers81
viewsA: HTML and AJAX problem
Declare the following JS function, function ajustadoEncodeURIComponent (str) { return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { return '%' + c.charCodeAt(0).toString(16); }); } Then,…
-
0
votes1
answer379
viewsA: Error "Notice: Undefined index:"
In your dump is clearly shown what the problem is. Is that lstEntregasRet is getting ALL query lines. You have to make a foreach of lstEntregasRet and catch each subarray, foreach ($lstEntregasRet…
phpanswered Marcelo Shiniti Uchimura 3,302 -
1
votes2
answers151
viewsA: How is the Generics syntax in C# compared to Java?
The second paragraph is saying you can do the following, IDataReader dr = conn.ExecuteQuery(query); while (dr.Read()) { int id = DBHelper.Read<int>(dr["id"]); ... } See what I called T…
-
0
votes2
answers604
viewsA: What is the Connection String used to make the connection between Cobol and B.D. Oracle?
According to the manual of the Micro Focus Developer, available by clicking here and searching for the term CONNECT, the command CONNECT that you are using has the following syntax, >>---EXEC…
-
1
votes1
answer630
viewsA: How to check if there is a specific data in a multidimensional array C#
Try it this way: using System.Diagnostics; using System.Linq; at the top of the . Cs. Create a private class within the class TratarDados, private class Frequencia : IEquatable<Frequencia> {…
c#answered Marcelo Shiniti Uchimura 3,302 -
2
votes2
answers1830
viewsA: Excel - How to concatenate cell range?
If you select cells in a column, it doesn’t know how to concatenate, even. It has to transpose the "coluninha" to work: In the target cell, start by typing the function TRANSPOR(), =TRANSPOR()…
-
3
votes3
answers2954
viewsA: Make text bold with php
// Texto em questão. $publicacaoStrip = 'teste -teste- arr-o-z'; // Expressão regular para negrito. $reNegrito = '/-([^-]+?)-/'; // Expressão regular para…
-
0
votes3
answers200
viewsA: Select bringing maximum Columns with Writing - MYSQL
This query works in Mysql 8.x. It brings the reference, the status of the post (content of the columns posto1..posto10) and the largest number of posts. She ignores any gaps in these columns postoX…
-
-1
votes1
answer403
viewsA: Application problem for stopwords and accents filter
Use palavra.decode('utf-8').lower() Source: here
pythonanswered Marcelo Shiniti Uchimura 3,302 -
1
votes2
answers122
viewsA: Query of similar records
For two columns, (select q.A, q.B, q.id_da_materia_ou_algo_em_comum_entre_A_e_B from (select A, B, id_da_materia_ou_algo_em_comum_entre_A_e_B from tabela intersect select B, A,…
-
0
votes1
answer62
viewsA: ultrasonic sensor programming
In this passage, Serial.println("Sensor 1"); Serial.print(inches); Serial.print("in, "); Serial.print(cm); Serial.print("cm"); Serial.println(); if (cm < 10) { digitalWrite(13, HIGH);…
expressionsanswered Marcelo Shiniti Uchimura 3,302 -
1
votes4
answers486
viewsA: How to break line using Streamwriter?
Why don’t you use objWR.Write(string) and objWR.WriteLine(string) instead of mounting a line on a Stringbuilder and printing, at the end of the loop, inside objWR? At the end of the day, it’s objWR…
c#answered Marcelo Shiniti Uchimura 3,302 -
1
votes2
answers365
viewsA: Compare two objects in JS/Jquery
Do so, on these lines: produtosCategoria("temakis"); var btnCategoria = ($("#opcoes-cardapio").find("a")).click(function(){ var idCategoria = $(this).attr("id").replace("btn-","");…
-
1
votes1
answer89
viewsA: I need help on this competitive programming issue
#include <stdio.h> #include <stdlib.h> /* Abaixo, declaro um tipo struct aluno, que contém o nome de um aluno e sua frequência. */ struct aluno { …
-
2
votes2
answers1413
viewsA: Remove blank lines in a csv
for line in csvfile: if line[1] == 'pt': # Nesta linha, tomo a primeira coluna da linha do ficheiro CSV # troco a caixa das letras para minúscula e parto cada palavra # (atenção…
-
0
votes3
answers105
viewsA: Error in Mysql query
If you want to get the latest data from the tables embreagem and hodometro, do so: SELECT b.idembreagem, a.prefixo idveiculo, a.datamontagem, a.kmmontagem, a.horimetromontagem, c.km kmatual,…
-
1
votes1
answer92
viewsA: Logic of a neural network implementation
You must have a single network entry, with a training sample of 139 points, which is why phi has dimension 1X20 and weights, dimension 20x1. What is unclear is why you have 139 exits, substract +=…