Articles

The point : vector vs raster image

If you're not sure whether you should create a raster or vector file, follow this simple rule of thumb: If you're drawing something from scratch with only a few colors, go with vector. If you're editing a photo with multiple colors, go with raster. Many projects use vector drawings and vector images together - A  brochure , for example, might include a corporate logo (vector) plus an image of happy customers (raster). 

could not create the Java Virtual Machine : Mac OS X Error

 Mac OS X Error  : could not create the Java Virtual Machine Solution :  Can't create Java Virtual Machine because you typed a wrong command/argument.

sweet swift Return function : wish in Java

import UIKit import Darwin func average(nums: Int ...) -> Double {     var sum = 0          for num in nums {         sum += num     }     return Double (sum) / Double (nums. count ) } func sum(nums: Int ...) -> Double {     var sum = 0          for num in nums {         sum += num     }     return Double (sum) } func doMath(mathOp: String )-> ( Int ...)-> Double {     if mathOp == "average" {         return average     } else {         return sum     } } var mathFunc = doMath (mathOp: "average" ) print ( mathFunc ( 1 , 3 , 4 , 5 , 6 , 78 , 67 , 5 , 4 , 4 , 9 ))

net.sf.jasperreports.engine.JRException: Error executing SQL statement for:

net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: Error executing SQL statement for: arrivagk. at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:537) at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$20(ReportControler.java:512) at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:393) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: net.sf.jasperreports.engine.JRException: Error executing SQL statement for: arrivagk. at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:344) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1129) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:696) at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:437) ...

Caused by: java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: MinuteOfHour

Error ? Caused by: java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: MinuteOfHour Solution : LocalDate  represents just a date, not a DateTime. So "HH:mm:ss" make no sense when formatting a  LocalDate . Use a  LocalDateTime  instead, assuming you want to represent both a date and time. Take a close look !! MinuteOfHour is unsupported /** Map of letters to fields. */ private static final Map < Character , TemporalField > FIELD_MAP = new HashMap <>(); static { FIELD_MAP . put ( 'G' , ChronoField . ERA ); FIELD_MAP . put ( 'y' , ChronoField . YEAR_OF_ERA ); FIELD_MAP . put ( 'u' , ChronoField . YEAR ); FIELD_MAP . put ( 'Q' , IsoFields . QUARTER_OF_YEAR ); FIELD_MAP . put ( 'q' , IsoFields . QUARTER_OF_YEAR ); FIELD_MAP . put ( 'M' , ChronoField . MONTH_OF_YEAR ); FIELD_MAP . put ( 'L' , ChronoField . MONTH_OF_YEAR ); FIELD_MAP . put (...

java.time.LocalDate cannot be cast to java.util.Date

ERROR ? Caused by: java.lang.ClassCastException: java.time.LocalDate cannot be cast to java.util.Date Solution : java . util . Date date = java . sql . Date . valueOf ( localDate );

engine.JasperPrint

ERROR ? Caused by: java.lang.ClassCastException: net.sf.jasperreports.engine.JasperPrint cannot be cast to net.sf.jasperreports.engine.JRPrintPage Solution :