Posts

pom

 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0   http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> mycode <groupId>com.booksxgames</groupId> <artifactId>books-x-games</artifactId> <packaging>jar</packaging> <version>1.0</version> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.2.RELEASE</version> </parent> <properties> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <dependency> <

dao

 package com.booksxgames.dao; import java.util.List; import java.util.Map; import java.util.Map.Entry; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; import com.booksxgames.entity.Products; import com.booksxgames.exception.UserException; import ch.qos.logback.classic.Logger; import javax.persistence.Entity; @Transactional @Repository public class BaseDAO { private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(BaseDAO.class); @Autowired protected SessionFactory sessionFactory; public <T> List<T> getList(String queryString, Map<String,Object> parameters){ List<T> retList = null; Session session =null; LOGGER.info("== Inside Get List 

dbc

 package com.booksxgames.configuration; import java.util.Properties; import org.apache.commons.dbcp.BasicDataSource; import org.hibernate.SessionFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.domain.EntityScan; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import org.springframework.orm.hibernate5.HibernateTransactionManager; import org.springframework.orm.hibernate5.LocalSessionFactoryBean; import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; import org.springframework.orm.jpa.LocalEntityManagerFactoryBean; import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration @EnableTransactionManagement @EntityScan("com.booksxgames.entity") public class DBConfiguration {     

Redmine - Spent Time Installation

Image
Spent Time Plugin Installation Installation notes Unpack the zip file to the plugins folder of Redmine. Starting from version 3.4.2, it requires db migration. So run the following command for db migration rake redmine:plugins:migrate NAME= redmine_spent_time RAILS_ENV=production When uninstalling the plugin, be sure to remove the db changes by running rake redmine:plugins:migrate NAME=redmine_spent_time VERSION=0 RAILS_ENV=production Steps to Configure the Plugin 1. Give a Spent time permission to admin. 2. Now Company menu enabled in administrator menu 3. Click a Company Menu  4. Click New Company  5. Create a company 6. Successfully Update the company. 7. Edit the Company and Create a Branches 8. Create a user with branch and permissions 9. Create a Project and add the users 10. Click Bulk Time entries 11. Add or Edit Time entries 12 Project Plan 13. New Project Plan 14. Create a Project Plan Steps with Images 1. Give a Spent time permission to admin. 2. Now Company menu enabled in a

React Native Basics

REACT NATIVE React Native is like React, but it uses native components instead of web components as building blocks. So to understand the basic structure of a React Native app, you need to understand some of the basic React concepts, like JSX, components,  state , and  props .  Components When you're building a React Native app, you'll be making new components a lot. Anything you see on the screen is some sort of component. Props Most components can be customized when they are created, with different parameters. These creation parameters are called props. Your own components can also use  props . This lets you make a single component that is used in many different places in your app, with slightly different properties in each place. Refer to  props.{NAME}  in your functional components or  this.props.{NAME}  in your class components. State Unlike props  that are read-only  and should not be modified, the  state  allows React components to change their output over time in respon

Redmine Compatibility Issues Before_filter

ERROR :      ActionController::RoutingError (undefined method `before_filter' for SptimeController:Class Did you mean?  before_action) Solution: As we can  see  in  ActionController::Base ,  before_action  is just a  new syntax  for  before_filter . However all  before_filters  syntax  are deprecated  in  Rails 5.0  and will be removed in  Rails 5.1 Example: class SptimeController < ApplicationController before_filter :require_login  TO class SptimeController < ApplicationController before_action :require_login

Redmine with Rails 5 Compatibility Issues

Error: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:   class CreateSptimes < ActiveRecord::Migration[4.2] D:/Dhinesh/Redmine/v2/redmine-4.1.1/plugins/redmine_spent_time/db/migrate/001_create_sptimes.rb:1:in `<top (required)>' D:/Dhinesh/Redmine/v2/redmine-4.1.1/lib/redmine/plugin.rb:510:in `up' D:/Dhinesh/Redmine/v2/redmine-4.1.1/lib/redmine/plugin.rb:542:in `migrate_plugin' D:/Dhinesh/Redmine/v2/redmine-4.1.1/lib/redmine/plugin.rb:483:in `migrate' D:/Dhinesh/Redmine/v2/redmine-4.1.1/lib/redmine/plugin.rb:497:in `block in migrate' D:/Dhinesh/Redmine/v2/redmine-4.1.1/lib/redmine/plugin.rb:496:in `each' D:/Dhinesh/Redmine/v2/redmine-4.1.1/lib/redmine/plugin.rb:496:in `migrate' D:/Dhinesh/Redmine/v2/redmine-4.1.1/lib/tasks/redmine.rake:135:in `block (3 levels) in <top (required)>' Solution:  You have to specify the version in brackets like it says. Have you a