Photo identity card generation API for java [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am developing a small scale patient record program. One of the functionalities they need is to generate Photo ID Card by fetching a bunch of rows from the DB. I have very little experience in jasper reports. I am looking for a API which can help generate these ID cards. For example I will feed the API a design template and a the data result set and it will do the job.
If you are suggesting jasper and iReport then please guide me through the process of solving the problem. and if there are no API then can you please show me a way where i can achieve similar result?
Thanks in advance.

The problem was solved using jasper reports itself. I just had to set up a proper layout for a single ID. Now this is important only 1 layout is needed to be designed. And then you need to specify a query that will return the list of rows to be used to generate the ID cards.
Your query will return multiple rows so you need them arranged one after another, its so common that you want 8ID cards in 1 A4 page (2columns). For this case right click the report -> properties set columns to 2 and print order horizontal. Make sure your model stays within a single column

Related

Java model best practices SQL - JSON -VIEW [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
While working on a Java web application I was wondering if my model layer was written as it should be. For instance, let's say we have a table USER in our SQL database which consists of 15 columns. Now, when we SELECT all of the columns with SQL we map it to a Java class, serialize via JSON and send it via network to some View and show it on screen.
In a second scenario, we want to select only 2 columns on screen so we do SELECT c1,c2 FROM USER. Thats where my question comes in... am I supposed to map those columns to a same Java model class? Or should i create a new mapper and class to fit it? Both of the approaches seem to have drawbacks, separate class for each query is more work, but it makes sure you always know what data it contains, rather than checking for nulls or working with optionals, also it prevents you from mapping columns you actually don't need.
What is your opinion? Thanks a lot!
Technically you could reuse the same User class for full 15-attribute as well as partial 2-attribute entity. But that will come with a price. Every time you'll see an instance of User class in the code your will have to think if it's the full entity or the partial? Which fields may or may not be null? This will make it much harder to reason about code.

Does a Text-Adventure game actually need hundreds of different activities? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
This may be a silly question - It's actually been a month since I've started learning Java so I apologize beforehand.
I have started making an Android game similar to the quite famous Lifeline: text-adventure, where you make your own path after you keep choosing between 2 choices. When you click on one of the choices, then two new ones appear (and above them, the question that the protagonist asks you to keep you going).
So, lets say that every choice is unique: thinking of it as a "family tree" on paper, if we start with a question with 2 choices, then we get to 4 possible ones (for example, Yes leads to YES-NO and No leads to MAYBE-MAYBE NOT), then 8, then with the next choice there are 16 unique ones etc. Eventually, after 10 clicks, in the complete game there would be 1024 different choices.
My question is: do I have to make an activity for each different question giving you 2 choices? Creating 1000+ activities for a text-based game sounds... not fun at all. And also, do I really have to make every single text I write, questions and choices, a string?
Thanks in advance and sorry for my way of describing my problem.
Short answer: NO
How to do it?
You should plan it out at first.
Putting paths and questions in arrays.
And using the same activity but changing the data written.
I won't give you exact steps but these are hints, you can even make custom classes instead.

How do I build select into queries in Java [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Problem - How do I create a table and insert data based on a query that is generated in Java?
Background - There are a series of tables the queries are based on (20 or so) but there are common operations, like left joining on FKs to the same tables and where clauses that are identical. I'm looking for a clean way to create the 20 queries without rewriting the same joins 20 times.
What I've done so far -
I've built a small application which executes a moderately complex query (sub queries, unions, left joins) and inserts the results of the query into a new table using ;
Select col1 as new_col1, col2 as newcol_2
into new_table
from ( .... )
I've done this by writing a base SQL file which contains place holders for the column names and new_table which I then replace using a simple string replace in my Java code. I've created about 20 different base SQL files because the from ( .... ) section references different tables and it's a bit too complex to build that part of the query without some libraries.
An easy way to wrap Java objects around a DB is to create entity classes and controllers. Netbeans has great tools to help you generate entity's and controller classes. Documentation here.
File->new File
then search for entity class from database, follow steps in wizard.
After class are made you will want to make JPA controllers
File-> new File
then search for JPA controller form entity class.
Select all the entity class and generate! Once you do that I will show you how to use said entity's and controls!

tool to view XML as a tree? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Is there any java based tool to view the XML file in the form of binary/ternary tree?
I need a pictorial view of tree.. in the form of nodes and edges.. like a graph..
please help me
If you have any XML/XSLT skills you could transform your XML to SVG. This method would allow you to draw anything you want. See an example here. Once you have the SVG file you can upload it into Google docs or view it in Photoshop or embed it in an html document.
Eclipse (IDE) www.eclipse.org
The XML editor also has a Design view. This view has the following features:
List item
The XML file is represented simultaneously as a table and a tree. This helps make navigation and editing easier.
Content and attribute values can be edited directly in the table cells, while pop-up menus on the tree nodes give alternatives that are valid for that location. For example, the Add Child menu item will list only those elements from a DTD or XML schema which would be valid children at that point (as long as grammar constraints are on).
Take a look at JUNG, http://jung.sourceforge.net/. I've used that toolkit to create an XPath visualizer, which was kind of fun. Don't remember if there was a ready XML to tree example, or not, though.
XML Spy would be good, but it's not free.
You can open XML in any browser and see it rendered as a hierarchy.

How to increase alexa search results using alexa api [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am creating a java application which performs URL search for site :
http://www.alexa.com/topsites/category
User eneters a category name and my application displays all URL's and performs some operations.
I am using this alexa api for URL search.
http://docs.amazonwebservices.com/AlexaWebInfoService/2005-07-11/ApiReference_CategoryListingsAction.html
This api doesn't give all results. For eg. if i search for the category "Health", this api gives only 6 results but when i visit on site i get more than 500 results.
I tried to increase result by increasing count=500 and also checked by giving Start parameter in api but i am not getting all results.
Could you please suggest me that how i can increase the results ? or is there any other api which works as same alexa api and gives all results.
I got some suggestion that DMOZ api also uses same
http://www.dmoz.org/World/Esperanto/Ludoj/Komputilaj/
but could not get the link for DMOZ search api.
Could you please provide me a link to DMOZ search api.
I thanks to your all valuable suggestions.
If you'll notice, there is a Start parameter in addition to Count. Start evidently changes the first result number returned. So:
To get the first 50 answers:
...
&Start=1
&Count=50
...
To get the next 50:
...
&Start=51
&Count=50
...
And so forth, until you get an empty return (which is what is returned when Start > total # answers).

Categories

Resources