Parse time stored by moment.js in MVC - model-view-controller

Is it possible to parse the time stored by moment.js in MVC? Unable to load moment.js into MVC project, but need to parse the time stored to accurately pull out hours, minutes and seconds from the stored value.
Any suggestions or assistance would be greatly appreciated.

Related

ABCpdf 11.3 - Unable to load the html

We are using ABCPdf 11.3 for one of our clients. We create HTML dynamically and then store it somewhere on the server.
We call the AddImageUrl(filePath, False, 300, False) and it takes more than 2 minutes even for a single page. (filePath is something like 'file://E:/pankaj/{generatedpdf}.html"
I need to improve application performance. Since it's a single page, it shouldn't take more than 10 seconds. Even if I pass www.google.com as the parameter, it converts the google home to PDF in 10 seconds.
Appreciate your help friends.
This is resolved.
I could see there were a lot of external links and some javascript code on the page which was passed to ABCpdf to convert entirely.
I removed the scripts and the external CSS/js libraries and all other external links and it worked. Now the page is rendered within 2 seconds.
Thank you!

Insert values from FORM to DB using AJAX on october cmd

I'm trying to get form data and put it into the database using ajax.
I'm missing the DB insert part.
Couldn't find appropriate documentation on this one.
Please advice.
(it is a very basic usage. basic form, ajax and db)
Thank
You can see here the tutorial http://www.tutorialspoint.com/ajax/ajax_database.htm

Process huge no of records

I have developed a web application using spring mvc framework. My concern is I need to display huge no of records say around 100,000.
What would be the best approach to display those many no of records in UI.
Please use a front end framework like AngularJS get the data in JSON format and access the JSON data through your Angular code and use pagination. I have worked on a similar app and a fronted framework solved the problem.

KendoUI scheduler getting data from database based on dates

I am trying to get the KendoUI scheduler to retrieve only the data for the selected view (day, week, month) from the database.
Has anyone been able to do this ? Or can anyone point me in the right direction ?
Have been running in circles for a day....
There is code library project which does that (uses ASP.NET MVC as a backend): http://www.kendoui.com/code-library/mvc/mvc/scheduler/server-filtering.aspx

Spring web mvc 3.0 Form data and image upload issue

I am new to spring and JSP. My web application is spring powered, which I run locally in apache tomcat.
In my JSP page I have multiple file-upload inputs and many text input fields.
Every time, when I press any of the upload buttons, a HTTP POST request goes to my controller from where on I may save the image to the database.
But, what I want is:
I will upload the images one by one ( preferably by staying in the page) but won't save them in database and then when I press submit to get the rest of the input text fields data, I commit all the data, including image, texts to the database in one try.
I have heard of scope="session" for my controller(bean) in the dispatcher-servlet.xml ... but I am unsure as to if I upload image to my controller and get back to my JSP form, will the bean keep my already uploaded images?
I think it is hard for me to explain, so please let me know if my question is not clear.
It would be nice if anybody can come up with a suggestion that may help to obtain my goal.
Are you uploading a varying number of images, as in if someone wants to upload only 2 they'll have 2 file fields on the form, or does everyone get 5 fields for example?
To be honest, the whole scheme of incremental upload sounds a bit overcomplicated at this stage. (Unless you have an explicit need to show progress bars on each upload, etc.) What if the user abandons the form after uploading the first image? You'd need a pretty solid mechanism to keep track of the entire visit, keeping it in the session wouldn't help here. Can a user pick up where they left off? If you make the whole thing work with single form submit click first, you can break it out and fine tune the process later. I mention that since you stated you're new to jsp and Spring (what's your experience with web dev otherwise?)
I think the best way is to upload file using ajax control rather than submitting form for each upload and store the file references in session scope variable(attribute). there are lot of libraries have ajax based file uploading like extJS, JQuery, GWT, DWR , whatever ajax library you are using in your web application.

Resources