Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to store image (upload) in database and retrieve it to jsp page. i am using JAVA and SQL SERVER 2012.
My table is imgtbl(name nvarchar(500),photo image)
Please help me
see this link for how to save an image to a DB. I am not sure that nvarchar is correct and I would rather go for a blob or similar.
Relevant code from link
("insert into save_image(name, city, image, Phone) "+ "values(?,?,?,?)");
psmnt.setString(1,"mahendra");
psmnt.setString(2,"Delhi");
psmnt.setString(4,"123456");
fis = new FileInputStream(image);
psmnt.setBinaryStream(3, (InputStream)fis, (int)(image.length()));
see also http://technet.microsoft.com/en-us/library/ms378813.aspx for a Microsoft bent on things.
Convert the image to bytes and save in database as blob.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have a class that runs SQL query and returns the resultset in Map> format. Now, I need to store this data in an excel. Can anyone help me write the logic to store the result set I received to an excel sheet?
Well, you can use apache poi, utilizing their API's you can write your data into an excel document. Can't really help you with the actual code though but the logic somehow would be to loop through your map and then use the apache poi api to write that data into an excel file... more info on apache poi here: https://poi.apache.org/spreadsheet/quick-guide.html#NewWorkbook
Let me know if that worked out for you. Thanks!
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I am making a tool that will predict the likes on a certain post using the data of friends likes using information retrieval and machine learning but for that I need the data.Can anyone help me with how to get the data of my friends likes.I just want to extract which friend has likes which post?
It is easy. Just login into your website with certain permission like user_friends (for now you can try it in graph api explorer) and then you can find likes of any posts of your friends with this code:
FB.api(
'/me',
'GET',
{"fields":"id,name,friends{likes,name}"},
function(response) {
// Insert your code here
}
);
For now, you can try the following query in graph api explorer and check if that is what you want:
me?fields=id,name,friends{likes,name}
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
My question is this that i want to make an invice or we can say bill for our customer , so that now i want to make an invice that has a special style it mean customer logos,address
like this and then i want to print it directly by printer devices so plz can anyone help me .
I use netbeas 8 IDE .
You could create a report, using iReport, and send data to fill it. All data can be organized in a model report, like images, grid (sub-report) with monetary values, bar-codes, etc...
http://community.jaspersoft.com/wiki/ireport-designer-tutorials-help
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a server that stores a plain text file with a numerical value. The text file is constantly edited by the server every few minutes or so. What is the best way for an Android Client to retrieve the text file's contents?
The most efficient way would be using Volley library with a string request.
Do something like this:
URL url = new URL("http://www.domain.com/file.txt");
URLConnection urlConnection = url.openConnection();
urlConnection.setConnectTimeout(1000);
InputStream is = urlConnection.getInputStream();
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
We receive word documents that are practically a form. Users fill in the answers to the questions we have in the documents, so essentially just a key-value pair of question and answer.
Now, I would like to extract the answers and store it in the database table mapping to the appropriate column(question). What is the best way to do this? Is there a library that can help me achieve this.
Thanks
I would consider unzipping the .docx file and extracting the information from the embedded .xml file. You can find out more about the Word 2010 format here:
http://blogs.msdn.com/b/chrisrae/archive/2010/10/06/where-is-the-documentation-for-office-s-docx-xlsx-pptx-formats-part-2-office-2010.aspx