Posts by Norivan Oliveira • 487 points
24 posts
-
0
votes2
answers530
viewsA: How to make a direct calculation in the database
A simple case when solves your problem: select c.nomeProfessor, case when c.carga = 1 then 20 * c.carga_horaria when = 2 then [...] end as salarioProfessor from tabelaCargaHoraria c inner join…
-
0
votes5
answers32714
viewsA: Java Library for Brazilian Electronic Invoice (Nfe)
Hello! If you have service note involved and your software’s main goal is not to issue notes, integrate it into a invoice webservice. Because this component, mainly NFSE, needs constant updating,…
-
0
votes2
answers1212
viewsQ: Figure out which column would be truncated (date would be truncated)
good evening! When trying to enter a record in Sqlserver through my application I am getting a truncated data message. The problem is that there are many columns that this screen fills and I have no…
-
0
votes1
answer199
viewsA: Automatic deploy with Jenkins/Tomcat7 - Failed to deploy application at context path
I found the solution. This stacktrace only indicates in a generic way that the application did not go up in Tomcat, to find the error that caused the deployment failure just look at the application…
-
1
votes1
answer199
viewsQ: Automatic deploy with Jenkins/Tomcat7 - Failed to deploy application at context path
I’m trying to set up the automated Jenkins deploy for a Tomcat7 server. I was able to get Jenkins to connect to the Tomcat manager normally, but for some reason almost at the end of the deployment…
-
1
votes1
answer149
viewsQ: Configuration file
I have an app web (war) legacy where various environment settings are arranged in XML files, e.g.: the BD path is in the context.xml <Context path="/Base" reloadable="true"…
-
3
votes1
answer344
viewsA: Random numbers 1 to 3 without repetition
Math.floor(Math.random() * 4); To not repeat it is enough to store the ones that have already been generated in an array and insert a conditional one. Something like: var numSorteados = []; var…
javascriptanswered Norivan Oliveira 487 -
1
votes2
answers3036
viewsA: Display saved image in BLOB
To view images from the BD you have to change the header of the page for the browser to understand that it is an image. To do this create a.php generate file that will be responsible for generating…
-
0
votes1
answer43
viewsQ: JSF + Richfaces - Print HTML in Datatable
Guys, I have an HTML code in the database and I need to show it on a datatable. But when printing instead of redenizing HTML the browser is displaying HTML. How do I redenize?…
-
0
votes2
answers848
viewsA: Query filter php mysql
$filtrar = mysql_query("select * from produtos inner join empresas on uid = empresa where empresa = '$filtro' and (produto like '%$busca%' or tags like '%$busca%') "); …
-
3
votes1
answer1340
viewsA: Remove Accents - [ p{Incombiningdiacriticalmarks}] vs [ p{ASCII}]
[\\p{InCombiningDiacriticalMarks}] = Unicode characters only [^\\p{ASCII}] = Nonlatinos
-
0
votes1
answer160
viewsA: Problems with encoding SQL Server 2008
Tried to? setAttribute( PDO::SQLSRV_ENCODING_UTF8 );
-
0
votes2
answers2565
viewsA: Error: You must provide at least one recipient email address
According to the error message you are not assigning any value in the property $mail->Addaddress(), although the code you posted is. Before you run the Send() method of a var_dump in $mail to…
-
1
votes1
answer48
viewsA: How would this PHP be converted to mysqli instead of mysql?
mysqli_* works as an object. Take a look at the manual to understand: Manual Mysqli Your code would look like this: <?php $serve = mysqli_connect('127.0.0.1', 'root', 'senha','banco'); // Se vc…
-
2
votes1
answer79
viewsA: JSP Project with Database
Download the driver from: https://dev.mysql.com/downloads/file/? id=465644 Add lib to Tomcat’s LIB folder:…
-
1
votes2
answers830
viewsA: Ireport Tibco - Error in XML processing: no element found
He is understanding that his output is xhtml, should be PDF: response.setContentType("application/pdf"); And there should also be a header for your output: response.setHeader( "Content-disposition",…
-
5
votes2
answers1732
viewsA: Why does if only work with the return of a method?
It’s simple to understand. If you test a condition, if the condition is satisfied then the condition returns true. Soon if you test a Boolean you will already be giving the result to the IF. See the…
-
0
votes2
answers458
viewsA: "expects Parameter 2 to be Resource" error when connecting to the database
The $con variable is null and the mysql native functions do not work with PDO. Try this way: ` <?php $serve = mysqli_connect('127.0.0.1', 'root', 'senha','banco'); // Se vc indica o banco aqui…
-
1
votes1
answer422
viewsA: Hibernate/JPA - Object is an Unsaved Transient instance
I already solved it. This case is a little specific, maybe the solution doesn’t suit the others, but the mistake is that the CallBack to work uses the merged entity and I was modifying the unmixed…
-
1
votes1
answer422
viewsQ: Hibernate/JPA - Object is an Unsaved Transient instance
Good afternoon people! When saving a new contract adjustment I have to research other contracts "similar" to what I’m readjusting and readjusting them as well. For that I was trying to use a…
-
0
votes0
answers242
viewsQ: Eclipse/Runtime only updates HTML after restarting
Good night! I don’t know if anyone will be able to help me, but it’s good to try. I have a project JSF in the Eclipse for years, whenever I update a XHTML the change was reflected in the navigator.…
-
0
votes1
answer57
viewsA: Write data from one inputText into another inputText
If it is at runtime (without reloading the page) it is best to use Jquery: <script> jQuery(document).ready(function () { jQuery('#idCampoOrigem').blur(function () {…
-
5
votes2
answers323
viewsA: Syntax error in SELECT WHERE using ADO.Net parameters
It looks simple, replace the commas with AND: "... EmgPartInv = ? AND CondCliInv=? AND InvoiceName = ?" Next to "No value Given for one or more required Parameters." Are you saying that there is no…
-
1
votes1
answer453
viewsA: How do I create templates in iReport?
Yes, you can create custom templates this way just by choosing your system’s default template when you click New, to create a new report. To create a new template create a template save the . jrxml…