Saturday, August 08, 2015

CSV output with Spring

This is a simple way to respond with CSV output in Spring. I have used Spring REST here but this can be also done with Spring MVC etc

   

 Resource layer:

@RequestMapping(value="/{id}", method= RequestMethod.GET, produces = "text/csv")
    @ResponseBody
    public ResponseEntity<String> getCsvDownload(final HttpServletResponse response, @NotNull @PathVariable("id") int id){
        response.setHeader("Content-Disposition", "attachment; filename=filename.csv");
        response.setContentType("text/csv");
        String csvResponse = applicationService.getCsv(id);
        return new ResponseEntity<>(csvResponse, HttpStatus.OK);
    }


Service layer:

    @Override
    public String getCsv(inal int id) {
      return StringUtils.join(applicationDao.getDetails(id), ",");
    }

Wednesday, June 24, 2015

Misfit accepts strap quality problems

Iris
---- (Misfit Support)
Jun --, 2:50 PM
Dear Vyas,
Thank you for your feedback. We are fully aware that the first batch of Flash sport bands have some design flaws and we are in the process of re-designing for a stronger hold. I apologize for any inconveniences. However none of the Flash accessories is available for sales at the moment yet. So for now, we will send 2 replacement Flash band to you. You will receive email confirmation soon.
Here are our videos about using Sport Band and Clasp for your reference:
Thank you for your time and effort. Have a great day!

Best regards,
---- | Misfit Support Team

Wednesday, May 13, 2015

Oracle Java on Mac

Oracle Java is installed here : /Library/Java/JavaVirtualMachines/

Thursday, February 12, 2015

CM12/AOSP based ROM GPS fix

You don't need to go back to stock to get GPS and get a GPS lock to work. Follow this (no data is lost, no flashing to stock is required:

1. Boot into the bootloader as per usual and hook up to your PC so you have fastboot access (May need drivers etc)
2. Run "fastboot devices" in command prompt to ensure your moto X is visible to your PC, if not go back to step 1.
3. Run the following 2 commands to clear your Radio/Modem cache
Code:
fastboot erase modemst1
fastboot erase modemst2
4. Reboot, and you should have working GPS.

Walmart Error message

Looks like Walmart.com uses Tomcat 7.0.42. Latest version of Tomcat today is 7.0.59. Pretty good!


Sunday, February 08, 2015

Saturday, February 07, 2015

CM12/AOSP based ROM Bluetooth fix

Toogle Bluetooth once with 5 seconds in between before actually using Bluetooth. It would connect to the device on the second attempt and stream music/audio


Saturday, January 31, 2015

CM12/AOSP based ROM - Fix for contact numbers showing up instead of contact names

You must delete your Contact Storage Cache and Data. Go to Settings, Apps, Swipe to the All tab and find "Contact Storage". Delete cache & data and wait for your contacts to sync again.

That fixes the caller name not showing (only the number) too.