Wednesday, February 21, 2018

create barcode and draw it to an existing image using java

https://stackoverflow.com/questions/38230667/create-barcode-and-draw-it-to-an-existing-image-using-java

I found a solution,hope this help someone else, thanks to all
Create the barcode using itext:
Barcode39 barcode = new Barcode39();
barcode.setCode("7001390283546141");
barcode.setBarHeight(40);

Image img = barcode.createAwtImage(Color.BLACK, Color.WHITE);

BufferedImage outImage = new BufferedImage(img.getWidth(null), img.getHeight(null),BufferedImage.TYPE_INT_RGB);

outImage.getGraphics().drawImage(img, 0, 0, null);
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
ImageIO.write(outImage, "png", bytesOut);
bytesOut.flush();
byte[] pngImageData = bytesOut.toByteArray();
FileOutputStream fos = new FileOutputStream("C:/results/barcode.jpg");
fos.write(pngImageData);
fos.flush();
fos.close();
After create the barcode image
final BufferedImage image1 = ImageIO.read(new File("C:/results/image.jpg"));
final BufferedImage image2 = ImageIO.read(new File("C:/results/barcode.jpg"));

Graphics g = image2.getGraphics();
g.drawImage(image2, 0, 0, image2.getWidth(), image2.getHeight(), null);
g.dispose();

final int xMax = image1.getWidth() - image2.getWidth();
final int yMax = image1.getHeight() - image2.getHeight();

Graphics g2 = image1.getGraphics();
Random random = new Random();
int x = random.nextInt(xMax);
int y = random.nextInt(yMax);

g2.drawImage(image2, x, y, null);
g2.dispose();

File outputfile = new File("C:/results/final.jpg");
ImageIO.write(image1, "png", outputfile);

Saturday, February 17, 2018

Stuff for cloning Daniel Selman DSI Projects

https://git.ng.bluemix.net/profile/personal_access_tokens

https://git.ng.bluemix.net/profile/personal_access_tokens

pPtR7mrAtuGiWZkRToyE

Active Personal Access Tokens (1)
NameCreatedExpiresScopes
masterajaydsiFeb 17, 2018In over 2 yearsapi, read_user
\\

https://www.google.com/search?ei=h7CIWpGoBIPl5gLUjbzYCw&q=ibm+odm+dsi+projects+samples&oq=ibm+odm+dsi+projects+samples&gs_l=psy-ab.3...9331.11813.0.12341.8.8.0.0.0.0.105.816.2j6.8.0....0...1.1.64.psy-ab..0.5.510...33i160k1j33i21k1.0.Nxgo1K-jEqM


https://developer.ibm.com/odm/assets/

https://git.ng.bluemix.net/search?utf8=%E2%9C%93&search=odm-dsi&group_id=&project_id=&repository_ref=&cm_sp=dw-bluemix-_-odm-_-devcenter

Wednesday, June 7, 2017

Enabling JDK logging during the synchronization process

https://www.ibm.com/support/knowledgecenter/en/SSQP76_8.9.0/com.ibm.odm.distrib.troubleshooting/topics/tsk_synch_traces.html

When you synchronize rules between Rule Designer and Decision Center, you can use the JDK logger to log synchronization requests, for debugging purposes.

Procedure

  1. To configure the logging for Rule Designer, add the following classes and logging level to your logging.properties file:
    .level=FINE
    ilog.rules.synchronization.level=FINE
    ilog.rules.model.level=FINE
    ilog.rules.common.rs4jutils.level=FINE
    ilog.rules.dataaccess.level=FINE
    For example, the following code shows a sample configuration for the Rule Designer logging.properties file:
    handlers=java.util.logging.FileHandler,java.util.logging.ConsoleHandler
    java.util.logging.ConsoleHandler.level=INFO
    java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
    
    java.util.logging.FileHandler.level=FINE
    java.util.logging.FileHandler.pattern=//.log
    
    # Write 10MB before rotating this file
    java.util.logging.FileHandler.limit=10000000 
    
    # Number of rotating files to be used
    java.util.logging.FileHandler.count=4
    java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
    
    .level=FINE
    ilog.rules.synchronization.level=FINE
    ilog.rules.model.level=FINE
    ilog.rules.common.rs4jutils.level=FINE
    ilog.rules.dataaccess.level=FINE
  2. To configure the logging for Decision Center, add the following classes and logging level to your logging.properties file:
    .level=INFO
    ilog.rules.teamserver.level=FINE
    ilog.rules.synchronization.level=FINE
    ilog.rules.model.level=FINE
    ilog.rules.common.rs4jutils.level=FINE
    ilog.rules.dataaccess.level=FINE
    For example, the following code shows a sample configuration for the Decision Center logging.properties file:
    handlers=java.util.logging.FileHandler,java.util.logging.ConsoleHandler
    java.util.logging.ConsoleHandler.level=INFO
    java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
    
    java.util.logging.FileHandler.level=FINE
    java.util.logging.FileHandler.pattern=//.log
    
    # Write 10MB before rotating this file
    java.util.logging.FileHandler.limit =10000000 
    
    # Number of rotating files to be used
    java.util.logging.FileHandler.count=4
    java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
    
    .level=INFO
    ilog.rules.teamserver.level=FINE
    ilog.rules.synchronization.level=FINE
    ilog.rules.model.level=FINE
    ilog.rules.common.rs4jutils.level=FINE
    ilog.rules.dataaccess.level=FINE
  3. To activate traces in Rule Designer, open the file odm_install_dir/eclipse.ini.
  4. After -vmargs, add the following argument, with the relevant values for the file path and the file name of the Rule Designer logging.properties file:
    -Djava.util.logging.config.file=/file_path/logging.properties
  5. To activate traces in Decision Center, add the following argument in the JVM that you use to start the application server, with the relevant values for the file path, and the file name of the Decision Center logging.properties file:
    -Djava.util.logging.config.file=/file_path/logging.properties
  6. If you cannot identify the cause of the error from the log messages, provide the following information to IBM® Customer Support:
    • The .log files produced by the JDK logger.
    • The .log file in the .metadata directory of your Eclipse workspace.

Friday, October 14, 2016

Targets

Responsibilities
  • Support the sales team by taking a consultative role, including making architectural recommendations, troubleshooting configuration issues, and managing correspondence with other functional units by implementing IBM ODM solutions
  • Articulate and educate on technical and architectural concepts to a variety of audiences, including developers, architects, IT operations professionals, and senior IT management
  • Design and develop rules and event solutions using IBM ODM (Operational Decision Management), iLog, JRules, BRMS.
  • Sell the value of your capabilities using multiple formats/channels, including phone, presentation, and live/online product demonstrations
  • Provide technical oversight and leadership on projects while effecting an enterprise-wide view of business and appreciation for strategy, processes and enabling technologies
  • iLog integration, iLog customization, Rule/Decision Service optimization
  • Manage & co-ordinate practice thought leadership initiatives
  • Foster teamwork and inclusion among all employees - across locations, cultures and geographies
Deliverables
  • Create and deliver custom demonstrations to support the sales cycle
  • Ability to quantify business value (cost-benefit and ROI analysis) and develop business cases for process improvement initiatives
  • Ability to work on complex business problems where analysis of situations or data requires an evaluation of intangible variance factors
  • Perform technical discovery with customer prospects and quickly architect/build proposed solutions using your capabilities
  • Successfully manage and execute technical proof of concepts (POCs), on-site or remote
  • Able to respond with functional experience concerning IBM ODM, WODM or JRules / ILOG and/or other industry standard Business Rules Engines such as Blaze advisor, Corticon, Pega, Drools
  • Responsible for representing yourself to customers and at field events such as conferences, seminars, etc.
  • Support Marketing with developer marketing and evangelism activities, including writing blogs, participating in demo-driven webinars, and speaking at industry events

Tuesday, August 30, 2016

ODM Working Random Links to Continue..IGNORIEREN