Posts by Nigini • 1,224 points
26 posts
-
1
votes2
answers2804
viewsA: Generate Ireport / Jasper Report containing 2 pages (with 3 columns each) on the same sheet in landscape mode
I found that thread discussing more or less the same problem as yours. The curious thing is that the answer from Jasper’s staff was in line with my comment on your question. =] I’ll copy the code…
-
2
votes1
answer420
viewsA: Create Java Index by generating HTML file?
Your code is almost there, I just think for you to get what you want, it would help a lot to change the data structure "words" to a java.util.Map, instead of a java.util.Set. The point is that you…
-
1
votes2
answers533
viewsA: Mysql BD random record preventing consecutive equal records
I agree with the comments that point to a solution via application and not via BD. But if you want to do it right inside the comic book, I suggest creating a new column that will store something…
-
5
votes1
answer1026
viewsA: Problems with chat sockets with NO-IP host
Your server code is well forwarded. But it seems to me that your confusion lies in how it works. I will try to clarify. You need to first understand the Socket distributed communication model: think…
-
0
votes2
answers1319
viewsA: Error generating files/classes from a Netbeans Web Service
I noticed that you used -b (lower case) in the Netbeans IDE interface and -B (upper case) in the terminal. Looking at the "wsimport" documentation there is a difference in the semantics of these two…
-
0
votes2
answers525
viewsQ: Convert search with Pymongo: Dictionary in JSON
I’m using Pymongo to make a search: resultado = db.find_one({'nome':'xpto'}) The result of this search is a Python dictionary, but I need to convert it to a JSON. What’s the best way to do it?…
-
2
votes2
answers525
viewsA: Convert search with Pymongo: Dictionary in JSON
Pymongo itself provides a library to handle this situation: bson.json_util The solution would be as follows: from bson.json_util import dumps resultado_json = dumps(resultado)…
-
4
votes2
answers481
viewsQ: Decode HTML entities in a Python string
I’m using Python 3 to access a web API. The response to the requests comes in the JSON standard and my problem is that one of the Strings comes encoded with HTML entities (specifically…
-
4
votes2
answers481
viewsA: Decode HTML entities in a Python string
I found this one for Python 3.4+ : >>> import html >>> html.unescape('orientação-a-objetos') 'orientação-a-objetos' In the case of Python 3 (versions prior to…
-
2
votes1
answer1023
viewsA: In Mongodb, how to search for documents by the size of an Array
(1) I found a solution using the $Where: db.grafo.find( { $where: "this.adj.length > X" } ); The problem with this solution is that this strategy makes no use of indexes or any other strategy to…
-
0
votes1
answer1023
viewsQ: In Mongodb, how to search for documents by the size of an Array
I have a collection of documents that are nodes of a graph, where each node has its adjacency list: { '_id': ObjectId('547ce6f4ffaba82f360fc525'), 'adj': ['no_2'], 'nome': 'no_1' } { '_id':…
-
3
votes2
answers479
viewsQ: Handling dates in AWK scripts
CONTEXT: I have a CSV file from which I want to extract and process some columns. I realized that AWK would be the perfect tool for this and everything was fine until I had to deal with timestamps -…
-
3
votes2
answers479
viewsA: Handling dates in AWK scripts
OK. Here’s an answer to PROBLEM 2, which has already solved my problem in general, but perhaps has some other more legal solution. I can execute a command bash in GAWK using the following…
-
2
votes1
answer73
viewsQ: Problems with SSH when running Hadoop tutorial
I need to process some very large files and for that I am trying to use Hadoop (in version 2.4.1). I am unable to run the official tutorial on Ubuntu 14.04 (64 bits) and Java (Oracle version…
-
2
votes1
answer73
viewsA: Problems with SSH when running Hadoop tutorial
I found the answer in another post (in the OS): the problem seems to be related to the fact that the standard Hadoop libraries are for 32-bit architectures. Some answers point to the possibility of…
-
2
votes1
answer80
viewsA: UTF-8: reading and inserting into Mysql via Ruby 1.8
I finally resolved. It turns out that the problem was the driver connection to the bank. Through of this OS response vi the recommendation to use mysql2 instead of mysql because 2 treats character…
-
3
votes1
answer80
viewsQ: UTF-8: reading and inserting into Mysql via Ruby 1.8
I am using a script written in Ruby that parses some XML files and inserts the information in a Mysql group. It works perfectly well, but it’s giving me a headache now that my XML files have…
-
1
votes1
answer107
viewsA: Socket with Timertask
Although you have not provided your server code, the description of your problem seems to imply that it is not prepared to receive connections in sequence. That is, whenever your client closes the…
-
1
votes3
answers1494
viewsQ: Filter table before applying a LEFT JOIN
I have two tables and I want all the elements of the first - regardless of the condition of JOIN (which characterizes a LEFT JOIN) - but before that I want to filter the second table. For example:…
-
0
votes3
answers1494
viewsA: Filter table before applying a LEFT JOIN
Studying via the original post where I found my question answered, and another that discusses the difference between ON and WHERE in LEFT JOIN I came to the conclusion that the most appropriate…
-
6
votes5
answers989
viewsA: How to remove an Element from an XML with Python?
I followed the hint left in the comments of the question and solved the problem using the library Beautifulsoup 4 (Thank you @Thiago-silva) from bs4 import BeautifulSoup soup =…
-
8
votes5
answers989
viewsQ: How to remove an Element from an XML with Python?
The case is that I have a file produced by a Garmin (GPS exercise device) and I want to remove all fields related to the heartbeat to pass the file to an athlete who did the exercise with me. The…
-
6
votes2
answers10814
viewsQ: How to set password for Postgresql administration?
I installed Postgresql on my Ubuntu using "apt-get". I’ve been using "sudo" to perform operations (actually following a tutorial), but now I want to manage DBMS with a client that asks me the…
-
6
votes2
answers10814
viewsA: How to set password for Postgresql administration?
Access the Postgres administration bank with this command: sudo -u postgres psql postgres Set administrator user password using: \password postgres After typing and confirming the password use the…
-
5
votes1
answer3774
viewsQ: How to restart Openfire settings?
I am working on a project that uses an XMPP server. I am using Openfire to build a development and testing environment. After starting it for the first time it offers a step by step to configure it.…
-
41
votes5
answers32714
viewsQ: Java Library for Brazilian Electronic Invoice (Nfe)
I’ve been developing an enterprise management system for some time. I need to add to it the electronic invoice issuance functionality in the Brazilian standard. Is there a well tested and preferably…