text:
package com.dreamfighter.android.sql;

import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;

import android.annotation.SuppressLint;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.DatabaseUtils;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import android.database.sqlite.SQLiteOpenHelper;

import com.dreamfighter.android.entity.BaseEntity;
import com.dreamfighter.android.log.Logger;

public abstract class SqliteHelper extends SQLiteOpenHelper{
	public static final String ID = "id";
	public static final String UPDATED_ON = "updatedOn";
	public static final String CREATED_ON = "createdOn";
	protected Map<String,String> COLUMNS = new HashMap<String, String>();
	private SQLiteDatabase database;

	//private boolean idAutoIncrement = true;
	protected String tableName;
	protected Class<?> classDefinition;
	protected Context context;

	@SuppressLint("SimpleDateFormat")
	protected static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");

	public SqliteHelper(Context context,String databaseName,int databaseVersion) {
		super(context, databaseName, null, databaseVersion);
		this.context = context;
		try{
			this.database = getWritableDatabase();
			if(!isTableExists()){
				onCreate(database);
			}
            validateColumn(database);
		} catch(SQLiteException e){
			e.printStackTrace();
		} catch (Exception e) {
			e.printStackTrace();
		}finally{
			close();
		}
	}

	public SqliteHelper(Context context,String databaseName,int databaseVersion, String tableName) {
		super(context, databaseName, null, databaseVersion);
		this.context = context;
		try{
			this.tableName = tableName;
			this.database = getWritableDatabase();
			if(!isTableExists()){
				onCreate(database);
			}
            validateColumn(database);
		} catch(SQLiteException e){
			e.printStackTrace();
		} catch (Exception e) {
			e.printStackTrace();
		}finally{
			close();
		}
	}

	protected SqliteHelper(Context context, String databaseName,int databaseVersion, Class<?> classDefinition) {
		super(context, databaseName, null, databaseVersion);
		this.context = context;
		try{

			this.classDefinition = classDefinition;
			this.tableName = classDefinition.getSimpleName();
			COLUMNS = generatingColumns(classDefinition,null,COLUMNS);
			this.database = getWritableDatabase();

			if(!isTableExists()){
				onCreate(database);
			}
            validateColumn(database);
		} catch(SQLiteException e){
			e.printStackTrace();
		} catch (Exception e) {
			e.printStackTrace();
		}finally{
			close();
		}
	}

	protected synchronized void validateColumn(SQLiteDatabase database){
        if(database == null || !database.isOpen()) {
            database = getReadableDatabase();
        }
        Cursor mCursor = null;
        try {
            // Query 1 row
            mCursor = database.rawQuery("SELECT * FROM " + tableName + " LIMIT 0", null);

            // getColumnIndex() gives us the index (0 to ...) of the column - otherwise we get a -1
            for(String columnName:COLUMNS.keySet()) {
                if (mCursor.getColumnIndex(columnName) == -1){
                    database.execSQL("ALTER TABLE " + tableName + " ADD COLUMN " + columnName + " " + COLUMNS.get(columnName));
                }
            }

        } catch (Exception Exp) {
            // Something went wrong. Missing the database? The table?
            Logger.log("... - existsColumnInTable", "When checking whether a column exists in the table, an error occurred: " + Exp.getMessage());

        } finally {
            if (mCursor != null) mCursor.close();
        }
	}

    public synchronized boolean isColumnExist(SQLiteDatabase database,String columnToCheck) {
        if(database == null || !database.isOpen()) {
            database = getReadableDatabase();
        }
        Cursor mCursor = null;
        try {
            // Query 1 row
            mCursor = database.rawQuery("SELECT * FROM " + tableName + " LIMIT 0", null);

            // getColumnIndex() gives us the index (0 to ...) of the column - otherwise we get a -1
            if (mCursor.getColumnIndex(columnToCheck) != -1)
                return true;
            else
                return false;

        } catch (Exception Exp) {
            // Something went wrong. Missing the database? The table?
            Logger.log("... - existsColumnInTable", "When checking whether a column exists in the table, an error occurred: " + Exp.getMessage());
            return false;
        } finally {
            if (mCursor != null) mCursor.close();
        }
    }

	protected String[] retrieveColumns(Class<?> classDefinition){
		//String tableName = classDefinition.getSimpleName();
		List<Field> fields = new ArrayList<Field>();

		fields = new LinkedList<Field>(Arrays.asList(classDefinition.getDeclaredFields()));
		if(classDefinition.getSuperclass()!=null){
			fields.addAll(Arrays.asList(classDefinition.getSuperclass().getDeclaredFields()));
		}
		List<String> columns = new ArrayList<String>();
		//Logger.log("classDefinition=>"+classDefinition.getName());
		for(int i=0;i<fields.size();i++){
			Field field = fields.get(i);
			if(field.getType().getName().equalsIgnoreCase("java.util.List")){
				continue;
			}

			columns.add(field.getName());
		}
		return columns.toArray(new String[columns.size()]);
	}

	private Map<String,String> generatingColumns(Class<?> classDefinition,Class<?> parentClassDefinition){
		return generatingColumns(classDefinition,parentClassDefinition, new HashMap<String, String>());
	}

	private Map<String,String> generatingColumns(Class<?> classDefinition,Class<?> parentClassDefinition, Map<String,String> columns){
		//String tableName = classDefinition.getSimpleName();
		//Map<String,String> columns = new HashMap<String, String>();
		List<Field> fields = new ArrayList<Field>();

		fields = new LinkedList<Field>(Arrays.asList(classDefinition.getDeclaredFields()));
		if(classDefinition.getSuperclass()!=null){
			fields.addAll(Arrays.asList(classDefinition.getSuperclass().getDeclaredFields()));
		}
		Map<String, Field> listType = new HashMap<String, Field>();

		for(Field field:fields){
			//Logger.log("[DDL] field.getName()=>"+field.getName());
			if(field.getName().equalsIgnoreCase("id")){
				continue;
			}
			String value = "TEXT NULL";

			if(field.getType().getName().equalsIgnoreCase("java.util.Date")){
				value = "TEXT NULL";
			}else if(field.getType().getName().equalsIgnoreCase("java.lang.String")){
				value = "TEXT NULL";
			}else if(field.getType().getName().equalsIgnoreCase("java.lang.Integer")){
				value = "INTEGER NULL";
			}else if(field.getType().getName().equalsIgnoreCase("java.lang.Long")){
				value = "INTEGER NULL";
			}else if(field.getType().getName().equalsIgnoreCase("java.lang.Double")){
				value = "REAL NULL";
			}else if(field.getType().getName().equalsIgnoreCase("java.lang.Float")){
				value = "REAL NULL";
			}else if(field.getType().getName().equalsIgnoreCase("java.lang.Boolean")){
				value = "INTEGER NULL";
			}else if(field.getType().getName().equalsIgnoreCase("java.util.List")){
				listType.put(field.getName(), field);
				continue;
			}else if(field.getType().getName().contains("com.android")) {
				continue;
			}else{
				value = "INTEGER NULL";
				if(!isTableExists(field.getType().getSimpleName()) && (parentClassDefinition==null || !field.getType().getName().equalsIgnoreCase(parentClassDefinition.getName()))){
					database.execSQL(createDatabase(field.getType().getSimpleName(),generatingColumns(field.getType(),classDefinition)));
				}
			}
			columns.put(field.getName(), value);
		}
		for(String key:listType.keySet()){
			Field field = listType.get(key);
			ParameterizedType stringListType = (ParameterizedType) field.getGenericType();
	        Class<?> listTypeClass = (Class<?>) stringListType.getActualTypeArguments()[0];
	        if(!isTableExists(listTypeClass.getSimpleName())){
	        	Map<String,String> subColumns = generatingColumns(listTypeClass,classDefinition,new HashMap<String, String>());
	        	subColumns.put(classDefinition.getSimpleName().toLowerCase(), "INTEGER NULL");
				database.execSQL(createDatabase(listTypeClass.getSimpleName(),subColumns));
			}
		}
		return columns;
	}

	@Override
	public void onCreate(SQLiteDatabase database) {
		database.execSQL(createDatabase());
	}

	private boolean isOpen(){
		if(database!=null) {
			return database.isOpen();
		}
		return false;
	}

	private boolean isTableExists(){
		return isTableExists(tableName());
	}

	private boolean isTableExists(String tableName) {
        if(database == null || !database.isOpen()) {
        	database = getReadableDatabase();
        }

	    Cursor cursor = database.rawQuery("select DISTINCT tbl_name from sqlite_master where tbl_name = '" + tableName + "'", null);
	    if(cursor!=null) {
	        if(cursor.getCount()>0) {
	            cursor.close();
	            return true;
	        }
	        cursor.close();
	    }
		//close();
	    return false;
	}

	/*
	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		Logger.log(this, "Upgrading database from version " + oldVersion + " to "
			+ newVersion );

	}
	*/

    public void resetDB(SQLiteDatabase db){
        db.execSQL("DROP TABLE IF EXISTS " + tableName());
        onCreate(db);
    }

	public abstract String tableName();

	public abstract Map<String,String> colums();

	public abstract Object cursorToImpl(Cursor cursor);

	private String createDatabase(){
		return createDatabase(tableName(),colums());
	}

	private synchronized String createDatabase(String localTableName,Map<String,String> localColumns){
		String ddl = "CREATE TABLE " + localTableName + "( ";
		ddl += ID + " INTEGER PRIMARY KEY AUTOINCREMENT ";

		if(localColumns!=null){
			Set<String> keys = localColumns.keySet();
			Iterator<String> i = keys.iterator();
			while (i.hasNext()){
		       String key = (String) i.next();
		       String value = (String) localColumns.get(key);
		       ddl += ", " + key + " " + value;
			}
		}

		ddl += ");";

		Logger.log(this,"[SQL_DDL] = "+ddl);

		return ddl;
	}

	protected String[] allColums(){
		String[] colums = new String[colums().size()+1];
		colums[0] = "id";
		int index = 1;
		if(colums()!=null){
			Set<String> keys = colums().keySet();
			Iterator<String> i = keys.iterator();
			while (i.hasNext()){
		       String key = (String) i.next();
		       colums[index] = key;
		       index++;
			}
			return colums;
		}
		return null;
	}

	public void open(boolean isTableExist) throws SQLException {
		if(!isTableExist){
			onCreate(database);
		}else{
			open();
		}
	}

	public void open() throws SQLException {
		this.database = getWritableDatabase();
	}

	public Object saveEntity(Object object) {
		return saveEntity(object, true);
	}

	public Object saveEntity(Object object, boolean immediately) {
		return saveEntity(object, immediately, tableName(),allColums());
	}

	private Object saveEntity(Object object, boolean immediately, String tableName, String[] columns){
		return saveEntity(object, immediately, tableName, columns, new ContentValues());
	}

	private Object saveEntity(Object object, boolean immediately, String tableName, String[] columns, ContentValues values) {

		if(object !=null){
			//ContentValues values = new ContentValues();

			List<Field> fields = new ArrayList<Field>();
			Map<String, Field> listType = new HashMap<String, Field>();

			fields = new LinkedList<Field>(Arrays.asList(object.getClass().getDeclaredFields()));
			if(object.getClass().getSuperclass()!=null){
				fields.addAll(Arrays.asList(object.getClass().getSuperclass().getDeclaredFields()));
			}

			for(Field field:fields){
				try {
					field.setAccessible(true);
					//ignore object id becouse it willbe auto generated
					if(field.getName().equalsIgnoreCase(ID) && field.get(object)==null){
						continue;

					//if object has id not null then just update that object
					}
					/*
					else if(field.getName().equalsIgnoreCase(ID) && field.get(object)!=null){
						return updateEntity(object);
					}
					*/
					if(field.getName().equalsIgnoreCase(CREATED_ON)){
						field.set(object, new Date());
					}else if(field.getName().equalsIgnoreCase(UPDATED_ON) || field.get(object)==null){
						continue;
					}

					String columName = field.getName();
					if(field.getType().getName().equalsIgnoreCase("java.lang.Integer")){
						//Logger.log(this, object.getClass().getSimpleName() + "columName ="+columName+" => INTEGER");
						Integer value = (Integer)field.get(object);
						values.put(columName,value);
						Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					}else if(field.getType().getName().equalsIgnoreCase("java.lang.Long")){
						Long value = (Long)field.get(object);
						values.put(columName,value);
						Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					}else if(field.getType().getName().equalsIgnoreCase("java.lang.Float")){
						Float value = (Float)field.get(object);
						values.put(columName,value);
						Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					}else if(field.getType().getName().equalsIgnoreCase("java.lang.String")){
						String value = (String)field.get(object);
						values.put(columName,value);
						Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					}else if(field.getType().getName().equalsIgnoreCase("java.util.Date")){
						String value = dateFormat((Date)field.get(object));
						values.put(columName,value);
						Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					}else if(field.getType().getName().equalsIgnoreCase("java.lang.Double")){
						Double value = (Double)field.get(object);
						values.put(columName,value);
						Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					}else if(field.getType().getName().equalsIgnoreCase("java.lang.Boolean")){
						Boolean value = (Boolean)field.get(object);
						if(value){
							values.put(columName,1);
						}else{
							values.put(columName,0);
						}
						Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					}else if(field.getType().getName().equalsIgnoreCase("java.util.List")){
						listType.put(columName, field);
					}else{
						if(field.get(object) instanceof BaseEntity) {
                            BaseEntity value = (BaseEntity) field.get(object);
                            if (value.getId() == null) {
                                value = (BaseEntity) saveEntity(field.get(object), true, field.get(object).getClass().getSimpleName(), retrieveColumns(field.get(object).getClass()), new ContentValues());
                            }
                            values.put(columName, value.getId());
                            Logger.log(this, object.getClass().getSimpleName() + " => [" + columName + "," + value.getId() + "]");
                        }

					}

				} catch (IllegalArgumentException e) {
					e.printStackTrace();
				} catch (IllegalAccessException e) {
					e.printStackTrace();
				} catch (ClassCastException e) {
					e.printStackTrace();
				}
			}

			if(!isOpen() && immediately){
				open();
			}
			Long insertId = database.insert(tableName, null, values);
			/*Cursor cursor = database.query(tableName,
					columns, ID + " = " + insertId, null, null, null, null);
			cursor.moveToFirst();*/

			//try {
				//BaseEntity impl = (BaseEntity)cursorToObject(cursor, object.getClass(), object.getClass());
				//((BaseEntity)object).setId(impl.getId());
				((BaseEntity)object).setId(insertId.intValue());

				//cursor.close();

				for(String key:listType.keySet()){
					Field field = listType.get(key);
					try {
						List<?> value = (List<?>)field.get(object);
						for(Object val: value){
							ContentValues valuesChild = new ContentValues();
							valuesChild.put(classDefinition.getSimpleName().toLowerCase(), insertId);
							saveEntity(val, true, value.get(0).getClass().getSimpleName(), retrieveColumns(val.getClass()),valuesChild);
						}
					} catch (IllegalArgumentException e) {
						e.printStackTrace();
					} catch (IllegalAccessException e) {
						e.printStackTrace();
					}
				}

				if(immediately){
					close();
				}
				//return impl;
				return object;
			/*} catch (InstantiationException e1) {
				e1.printStackTrace();
			} catch (IllegalAccessException e1) {
				e1.printStackTrace();
			}*/
		}
		if(immediately){
			close();
		}
		return null;
	}

	public Object getEntity(int id){
		return getEntity(classDefinition, allColums(), id);
	}

	@SuppressWarnings("unchecked")
	private Object getEntity(Class<?> classDefinition, String[] columns, int id){
		return getEntity(null, classDefinition, columns, id);
	}

	@SuppressWarnings("unchecked")
	private Object getEntity(Class<?> parentClassDefinition, Class<?> classDefinition, String[] columns, int id){
		List<Object> list = queryHelper(parentClassDefinition, classDefinition, columns,"id=?",new String[]{String.valueOf(id)});
		if(list.size()==1){
			return list.get(0);
		}
		return null;
	}

	protected Object cursorToObject(Cursor cursor, Class<?> classDefinition) throws InstantiationException, IllegalAccessException{
		return cursorToObject(cursor, classDefinition, null);
	}

	protected Object cursorToObject(Cursor cursor, Class<?> classDefinition, Class<?> parentClassDefinition) throws InstantiationException, IllegalAccessException{
		Object object = classDefinition.newInstance();

		if(object !=null && cursor!=null){
			//ContentValues values = new ContentValues();
			List<Field> fields = new ArrayList<Field>();
			Map<String, Field> listType = new HashMap<String, Field>();

			fields = new LinkedList<Field>(Arrays.asList(object.getClass().getDeclaredFields()));
			if(object.getClass().getSuperclass()!=null){
				fields.addAll(new LinkedList<Field>(Arrays.asList(object.getClass().getSuperclass().getDeclaredFields())));
			}

			for(Field field:fields){
				field.setAccessible(true);
				String columName = field.getName();
				//Logger.log("columName=>"+columName);
				//TODO: load list relationship
				if(cursor.getColumnIndex(columName) == -1){
					//Logger.error("column " + columName + " not found!");
					continue;
				}
				if(cursor.getColumnIndex(columName) != -1 && cursor.isNull(cursor.getColumnIndex(columName)) && !field.getType().getName().equalsIgnoreCase("java.util.List")){
					continue;
				}

				if(field.getType().getName().equalsIgnoreCase("java.lang.String")){
					String value = cursor.getString(cursor.getColumnIndex(columName));
					//Logger.log("JsonUtils", object.getClass().getSimpleName() + " columName = "+columName+" => String");
					//Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					field.set(object, value);
				}else if(field.getType().getName().equalsIgnoreCase("java.lang.Long")){
					Long value = cursor.getLong(cursor.getColumnIndex(columName));
					//Logger.log("JsonUtils", object.getClass().getSimpleName() + " columName = "+columName+" => String");
					//Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					field.set(object, value);
				}else if(field.getType().getName().equalsIgnoreCase("java.lang.Integer")){
					int value = cursor.getInt(cursor.getColumnIndex(columName));
					//Logger.log("JsonUtils", object.getClass().getSimpleName() + " columName = "+columName+" => String");
					//Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					field.set(object, value);
				}else if(field.getType().getName().equalsIgnoreCase("java.lang.Double")){
					double value = cursor.getDouble(cursor.getColumnIndex(columName));
					//Logger.log("JsonUtils", object.getClass().getSimpleName() + " columName = "+columName+" => String");
					//Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					field.set(object, value);
				}else if(field.getType().getName().equalsIgnoreCase("java.lang.Float")){
                    float value = cursor.getFloat(cursor.getColumnIndex(columName));
                    //Logger.log("JsonUtils", object.getClass().getSimpleName() + " columName = "+columName+" => String");
                    //Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
                    field.set(object, value);
                }else if(field.getType().getName().equalsIgnoreCase("java.lang.Boolean")){
					Boolean value = null;
					if(cursor.getInt(cursor.getColumnIndex(columName))==1){
						value = true;
					}else{
						value = false;
					}
					//Logger.log("JsonUtils", object.getClass().getSimpleName() + " columName = "+columName+" => String");
					//Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					field.set(object, value);
				}else if(field.getType().getName().equalsIgnoreCase("java.util.Date")){
					String value = cursor.getString(cursor.getColumnIndex(columName));
					try {
						Date dateValue = dateFormat.parse(value);

						//Logger.log("JsonUtils", object.getClass().getSimpleName() + " columName = "+columName+" => String");
						//Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+dateValue.toString()+"]");
						field.set(object, dateValue);
					} catch (ParseException e) {
						e.printStackTrace();
					}
				}else if(field.getType().getName().equalsIgnoreCase("java.util.List")){
					listType.put(columName, field);
				}else {
					//if(parent!=null){
						//Logger.log("["+parentClassDefinition+","+field.getType().getName()+"]");
					//}
					if(parentClassDefinition==null || !parentClassDefinition.getName().equalsIgnoreCase(field.getType().getName())){

						Integer value = cursor.getInt(cursor.getColumnIndex(columName));
						field.set(object, getEntity(classDefinition, field.getType(), retrieveColumns(field.getType()),value));
					}
				}
				field.setAccessible(false);
			}

			for(String key:listType.keySet()){
				Field field = listType.get(key);
				field.setAccessible(true);
				Integer id = ((BaseEntity)object).getId();
				ParameterizedType stringListType = (ParameterizedType) field.getGenericType();
		        Class<?> listTypeClass = (Class<?>) stringListType.getActualTypeArguments()[0];

				field.set(object, queryHelper(classDefinition, listTypeClass, retrieveColumns(listTypeClass), classDefinition.getSimpleName().toLowerCase() + "=?",new String[]{id.toString()}));
				field.setAccessible(false);
				//Logger.log(this, object.getClass().getSimpleName() + " => ["+key+","+id+"]");
			}
		}
		return object;
	}

	private static String dateFormat(Date date){
		return dateFormat.format(date);
	}

	public Object updateEntity(Object object){

		int	rowsUpdated = 0;
		if(object !=null){
			ContentValues values = new ContentValues();
			Long id = 0l;

			List<Field> fields = new ArrayList<Field>();

			fields = new LinkedList<Field>(Arrays.asList(object.getClass().getDeclaredFields()));
			if(object.getClass().getSuperclass()!=null){
				fields.addAll(Arrays.asList(object.getClass().getSuperclass().getDeclaredFields()));
			}

			for(Field field:fields){
				field.setAccessible(true);
				try {
					String columName = field.getName();
					if(field.getName().equalsIgnoreCase(ID) && field.get(object)!=null){
						if(field.getType().getName().equalsIgnoreCase("java.lang.Integer")){
							//Logger.log(this, object.getClass().getSimpleName() + "columName ="+columName+" => INTEGER");
							Integer value = (Integer)field.get(object);
							id = 1l * value;
						}else if(field.getType().getName().equalsIgnoreCase("java.lang.Long")){
							id = (Long)field.get(object);
						}
						continue;
					}

					if(field.getName().equalsIgnoreCase(CREATED_ON)){
						continue;
					}

					if(field.getName().equalsIgnoreCase(UPDATED_ON)){
						field.set(object, new Date());
					}

					if(field.getType().getName().equalsIgnoreCase("java.lang.Integer")){
						//Logger.log(this, object.getClass().getSimpleName() + "columName ="+columName+" => INTEGER");
						Integer value = (Integer)field.get(object);
						values.put(columName,value);
						Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					}else if(field.getType().getName().equalsIgnoreCase("java.lang.Long")){
						Long value = (Long)field.get(object);
						values.put(columName,value);
						Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					}else if(field.getType().getName().equalsIgnoreCase("java.lang.Float")){
						Float value = (Float)field.get(object);
						values.put(columName,value);
						Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					}else if(field.getType().getName().equalsIgnoreCase("java.lang.String")){
						String value = (String)field.get(object);
						values.put(columName,value);
						Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					}else if(field.getType().getName().equalsIgnoreCase("java.util.Date")){
						String value = dateFormat((Date)field.get(object));
						values.put(columName,value);
						Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					}else if(field.getType().getName().equalsIgnoreCase("java.lang.Double")){
						Double value = (Double)field.get(object);
						values.put(columName,value);
						Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					}else if(field.getType().getName().equalsIgnoreCase("java.lang.Boolean")){
						Boolean value = (Boolean)field.get(object);
						if(value!=null && value==true){
							values.put(columName,1);
						}else{
							values.put(columName,0);
						}
						Logger.log(this, object.getClass().getSimpleName() + " => ["+columName+","+value+"]");
					}

				} catch (IllegalArgumentException e) {
					e.printStackTrace();
				} catch (IllegalAccessException e) {
					e.printStackTrace();
				}
			}
			if(!isOpen()){
				open();
			}
			Logger.log("update id=>"+id);
			rowsUpdated = database.update(tableName(),values,ID + "=" + id , null);
			close();
		}
		close();
		Logger.log(this, "update row count => "+rowsUpdated);
		return object;
	}

	public void deleteEntity(Object object){
		Field field = null;
		Long id = 0l;
		try {
			try{
				field = object.getClass().getDeclaredField(ID);
			}catch(NoSuchFieldException e){
				//e.printStackTrace();
			}
			if(field==null && object.getClass().getSuperclass()!=null){
				field = object.getClass().getSuperclass().getDeclaredField(ID);
			}
			field.setAccessible(true);
			if(field.getType().getName().equalsIgnoreCase("java.lang.Integer")){
				//Logger.log(this, object.getClass().getSimpleName() + "columName ="+columName+" => INTEGER");
				if(field.get(object)!=null) {
					id = (Integer) field.get(object) * 1l;
				}
			}else if(field.getType().getName().equalsIgnoreCase("java.lang.Long")){
                if(field.get(object)!=null) {
                    id = (Long) field.get(object);
                }
			}
			//id = field.getLong(object);
		} catch (NoSuchFieldException e) {
			e.printStackTrace();
		} catch (IllegalArgumentException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		}
		if(!isOpen()){
			open();
		}
		database.delete(tableName(), ID + " = " + id, null);
		close();
	}

	public int deleteEntity(String whereClause,String[] whereArgs){
		if(!isOpen()){
			open();
		}
		int result = database.delete(tableName(), whereClause, whereArgs);
		close();
		return result;
	}

	public int deleteAll(){
		if(!isOpen()){
			open();
		}
		int result = database.delete(tableName(), null, null);
		close();
		return result;
	}

	public Long queryHelperCount(){
		return queryHelperCount("");
	}

	public Long queryHelperCount(String selection){
		if(selection.equals(null)){
			selection = "";
		}
		if(!isOpen()){
			open();
		}
		Long count = DatabaseUtils.longForQuery(database, "SELECT COUNT(*) FROM " + tableName() + " " + selection, null);
		close();
		return count;
	}

	public Long queryHelperMax(String columnName,String selection){
		if(selection==null){
			selection = "";
		}
		if(!isOpen()){
			open();
		}
		Long count = DatabaseUtils.longForQuery(database, "SELECT MAX("+columnName+") FROM " + tableName() + " " + selection, null);
		close();
		return count;
	}

	public Long queryHelperSum(String columnName,String selection){
		if(selection==null){
			selection = "";
		}
		if(!isOpen()){
			open();
		}
		Long count = DatabaseUtils.longForQuery(database, "SELECT SUM(?) FROM " + tableName() + " " + selection, new String[]{columnName});
		close();
		return count;
	}

	@SuppressWarnings("rawtypes")
	public List queryHelper(String[] colunms){
		return queryHelper(tableName(),colunms);
	}

	@SuppressWarnings("rawtypes")
	public List queryHelper(String tableName,String[] colunms){
		if(!isOpen()){
			open();
		}
		Cursor cursor = database.query(tableName, colunms, null, null, null, null, null);
		List<Object> list = new ArrayList<Object>();
		cursor.moveToFirst();
		while (!cursor.isAfterLast()) {
			list.add(cursorToImpl(cursor));
			cursor.moveToNext();
		}
		cursor.close();
		close();

		return list;
	}

	/*public List retievingCOllection(List list){
		try{
			for(Object object:list){
				List<Field> fields = new ArrayList<Field>();

				fields = new LinkedList<Field>(Arrays.asList(object.getClass().getDeclaredFields()));
				if(object.getClass().getSuperclass()!=null){
					fields.addAll(Arrays.asList(object.getClass().getSuperclass().getDeclaredFields()));
				}

				for(Field field:fields){
					field.setAccessible(true);
					if(field.getType().getName().equalsIgnoreCase("java.util.List")){
						Integer id = ((BaseEntity)object).getId();
						ParameterizedType stringListType = (ParameterizedType) field.getGenericType();
				        Class<?> listTypeClass = (Class<?>) stringListType.getActualTypeArguments()[0];
				        Logger.log(this, object.getClass().getSimpleName() + " => ["+field.getName()+","+id+"] "+listTypeClass.getSimpleName());
						field.set(object, queryHelper(listTypeClass, retrieveColumns(listTypeClass), object.getClass().getSimpleName().toLowerCase() + "=?",new String[]{id.toString()}));
						field.setAccessible(false);
						break;
					}
				}
			}
		} catch (IllegalArgumentException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		}
		return list;
	}*/

	@SuppressWarnings("rawtypes")
	public List queryHelper(String[] columns, String selection, String[] selectionArgs){
		return queryHelper(classDefinition, columns, selection, selectionArgs);
	}

	@SuppressWarnings("rawtypes")
	private List queryHelper(Class<?> classDefinition, String[] columns, String selection, String[] selectionArgs){
		return queryHelper(null, classDefinition, columns, selection, selectionArgs);
	}

	@SuppressWarnings("rawtypes")
	private List queryHelper(Class<?> parentClassDefinition, Class<?> classDefinition, String[] columns, String selection, String[] selectionArgs){

		if(!isOpen()){
			open();
		}
		Logger.log("select * from "+classDefinition.getSimpleName() + " where "+selection);
		Cursor cursor = database.query(classDefinition.getSimpleName(), columns, selection, selectionArgs, null, null, null);

		List<Object> list = new ArrayList<Object>();
		cursor.moveToFirst();
		while (!cursor.isAfterLast()) {
			try {
				list.add(cursorToObject(cursor,classDefinition,parentClassDefinition));
			} catch (InstantiationException e) {
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				e.printStackTrace();
			}
			cursor.moveToNext();
		}
		cursor.close();
		close();
		return list;
	}

	@SuppressWarnings({ "rawtypes", "unused" })
	private List queryHelperUniqResult(Class<?> parentClassDefinition, Class<?> classDefinition, String[] columns, String selection, String[] selectionArgs){

		if(!isOpen()){
			open();
		}
		Logger.log("select * from "+classDefinition.getSimpleName() + " where "+selection);
		Cursor cursor = database.query(classDefinition.getSimpleName(), columns, selection, selectionArgs, null, null, null);

		List<Object> list = new ArrayList<Object>();
		cursor.moveToFirst();
		while (!cursor.isAfterLast()) {
			try {
				list.add(cursorToObject(cursor,classDefinition,parentClassDefinition));
			} catch (InstantiationException e) {
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				e.printStackTrace();
			}
			cursor.moveToNext();
		}
		cursor.close();
		close();
		return list;
	}

	@SuppressWarnings("rawtypes")
	public List queryHelper(String[] columns, String selection, String[] selectionArgs,String orderBy){
		if(!isOpen()){
			open();
		}
		Cursor cursor = database.query(tableName(), columns, selection, selectionArgs, null, null, orderBy, null);
		List<Object> list = new ArrayList<Object>();
		cursor.moveToFirst();
		while (!cursor.isAfterLast()) {
			list.add(cursorToImpl(cursor));
			cursor.moveToNext();
		}
		cursor.close();
		close();
		return list;
	}

	public Boolean truncate(){
		if(!isOpen()){
			open();
		}
		Integer result = 0;
		try{
			result = database.delete(tableName(), null, null);
		}catch (NullPointerException e) {
			e.printStackTrace();
		}
		close();
		return result ==1 ? true : false;
	}

	@Override
	public synchronized void close(){
		try{
			database.close();
			super.close();
		}catch (Exception e) {
			e.printStackTrace();
		}
	}

	public SQLiteDatabase getDatabase() {
		return database;
	}

	public void setDatabase(SQLiteDatabase database) {
		this.database = database;
	}

}

redpajama_set_name: RedPajamaGithub


The 20323rd positive integer is an odd prime number that follows the number 20322 and comes before 20324. Twenty thousand three hundred twenty-three is 5 digits long.
Q: Is 20323 a prime number?
Q: What is the negative number for 20323?
Q: What is half of 20323?
Q: What is a third of 20323?
Q: What is a quarter of 20323?
Q: What is the square root of 20323?
Q: What is 20323 times Pi?
Q: What is 20323 divided by Pi?
Q: What is the scientific notation for 20323?
Q: What are the divisors for 20323?
Q: What is the factorization of 20323?
Q: What is the sum of divisors of 20323, including itself?
Q: What is the sum of divisors of 20323, excluding itself?
The spelling of 20323 in different languages.
Q: What is the roman numeral for 20323?
Q: What is the digital capacity for 20323?
The number 20323 represented in different base number systems.
List the frequency of characters that make up the number 20323.
List of hash code values for 20323.


Welcome to The Schroeder Page!: Interactive Read Alouds with Storia!
Interactive Read Alouds with Storia!
Friends~I am so excited to share how I have been using Storia in my classroom. For those of you that are not familiar, with Storia it is an interactive read aloud site from Scholastic. You can download it for free and when you do you will receive 5 free E Books. These books will be kept on on your own personalized shelf. You can even shop on Scholastic to purchase more E Books for your class. You can click the image below to head over and download your copy of Storia.
It is pretty simple once you get started. After your download, your free E Books will be waiting for you. You can add them all to your shelf at once or just a few. Be sure to pick the age group that you want. Teachers and Parents can set up their readers on their own shelf and track their reading. There is a book order for the E Books to share with your families.
You will find games and quizzes that the readers can participate in. You will know by looking for the lightning bold. Readers can even click on unknown words and be directed to an online dictionary that pronounces the word when opened.
There is an app for the i Pad and Scholastic is working on one for the Droid.
How am I using it? Well it all started with our shared reading time after lunch. We started a chapter book called It's a Dog's Life. This book is a Guided Reading Level Q and a Lexile of 870. It is perfect for a shared reading or a guided reading group! I use it with my 2nd grade class as a shared reading to practice inferring and predicting.
It is an amazing story of a Dog's Life told through the eyes of a dog named Squirrel. There is great inferring that goes along with this story and that is one of the main reasons I chose it.
My students always want a copy of the book to follow along with me as I read. Our school library never has more than 2 copies. The town library has one or 2 and we have a used book store in town that sometimes you can get lucky at.
This time...we got really lucky! It is an E Book on Storia! I did have to purchase it but it has been TOTALLY worth it. So now I can put it up on my Smart Board and my students can follow along. We do the lightning bolt quizzes together and use the online dictionary tons.
Now almost all of my students have downloaded it at home and can reread or read ahead if they wish.
I also have downloaded it for my 4th grader and Kindergartner.
Below you can see what my shelf looks like. I named it Room 331 at school. I downloaded it onto all of my classroom computers and my students visit it daily during our Listening to Reading Center.
I plan on doing more shopping for E Books for my class.
I hope you enjoyed this fantastic tool for bringing shared reading to life in your classroom.
Please leave a comment and let me know how you are using Storia or how you use shared reading in your classroom!
Be sure to check out my Novel Study for A Dog's Life. It is a 42 page download filled with thinking and response activities for your students to use during a shared read or a guided reading group!
Thank you for this great idea! I handed out the Storia brochure but never thought about downloading onto classroom computers! I did download it at home for my granddaughters. Tomorrow my students will be very excited for Storia in the classroom!
Can more than one child read the same Storia eBook?
No. As with print books, only one reader at a time may use an eBook. You may assign the same eBook to another child's bookshelf after the first child has finished reading it.
Do you Doodle? and a Freebie!
Creepy, Crawly FUN & a Freebie!
My World Around Me FREEBIE!
Knock, Knock! A Freebie is HERE!
Let's Make a Reading Pizza!
Time Saver and a Give Away!


text:
Asset Agent Smart factory
Crew Companion Safe energy
Crew Companion Safe Mining
Reefer Runner Marine & Ports
Terminal Tracker Marine & Ports
The meaning of Muda
Contact & Offices
Container Terminals: How is semi-automation increasing productivity?
02 May, 2022 | Written by Mark Buzinkay
One-third of container terminal operators see automation as a way to increase productivity by up to 50%. At the same time, about one fifth believe that automation could cut operational costs by more than 50%.
But less flexibility for operational planning, new scenarios that have to be previously planned, more difficulty to react when exceptions occur must be taken into account when expecting higher productivity. A semi-automated container terminal is in the most cases the way to go.
Container terminals efficiency is often associated with productivity and performance. With regards to the growing international sea traffic and changing technology in the maritime transport industry, seaports are coping with mounting pressures to upgrade and provide cutting-edge technology. As a result, they are forced to improve container terminal efficiency to offer comparative advantages to attract more traffic.
Factors that influence the container terminal productivity are quay cranes (loading of truck/vessel and unloading), dwell time (transactional and discretionary), infrastructure (physical and soft) and customs clearance (security and custom practices, integrated IT system).
The crane operation is the critical factor determining a container terminal's efficiency and effectiveness. Vessel berthing, container delivery by lorries, inspection, and container storage are time-consuming operations of lesser influence. Modern container cranes are capable of loading/unloading a container every 90 seconds or so.
Container dwell time is defined as the time between vessel arrival and container exit from the port facilities. Maritime industry sector experts tend to agree on a 3 to 4 days representative mean value.
Infrastructure is necessary for efficient cargo handling operations, and adequate infrastructure is needed to avoid congestion. Container infrastructure, however, needs to be complemented by efficient hinterland transport connections. Generally, infrastructure consists of physical and soft elements. Physical infrastructure includes operational facilities such as the number of berths, the number of cranes, yards and tugs, the area of storage space and the intermodal transport such as roads and railways.
The soft infrastructure refers to the workforce employed. Full deployment of both types will assist in reducing vessel turnaround, thereby increasing the terminal capacity to accommodate more containers. Ships are continually expanding their carrying capacity, and containers made for large transport units in overseas container transport are under consideration. This scale enlargement requires new and capital-intensive transhipment facilities in gateway ports. Mainly, inter-modality is essential for the speedy transportation of cargoes into and out of a gateway port. Without proper linkages, the efficiency of container terminal operation may decline due to congestion and delays, as we saw in the Port of Los Angeles in 2021.
AUTOMATION & PRODUCTIVITY
According to publications like UNCTAD's Review of Maritime Transport, automation can play a significant role in improving ports' efficiency and productivity. But, at the same time, it can also reduce operational costs.
Automation includes mechanics, hydraulic, computerised elements and others to control equipment and processes. However, automation is only possible if a systematic and repeated process runs by rules and conditions that can be identified and programmed.
Digitalisation is a rapidly increasing factor that can have important implications for port operations and management. Key technologies supporting digitalisation in maritime transport include:
Unmanned vehicles
Such technologies in ports include all aspects of a port business, from operations and planning to design infrastructure development and maintenance. As a result, innovative technologies will likely be felt in ports and can bring changes to loading and unloading operations, storage and industrial processing.
In addition, a review of ports around the world shows that the sector has adopted technology but to a certain extent. For example, scanning technologies are increasingly used for security and trade facilitation, while automation is introduced in various container terminals (read more about container terminal planning).
Container terminals can be categorised into two automation groups: fully-automated and semi-automated. Automating the stacking yard and horizontal transfers between the quay and the yard, then the container terminal is fully automated. Semi-automatic terminals have the stacking yard automated but not the quay yet.
Due to the challenge of massive ship sizes and continuous growth of container shipping volume worldwide, port infrastructure must develop and improve to meet these new demands. The assumption is that automation would help avoid or at least mitigate port congestion and reduce demurrage. However, the costly investment is still considered worth the future cost reductions.
A quick analysis of container port terminals provides a good overview of the actual state. However, container terminal automation is still relatively early as 97% of the world's container port terminals are not automated.
The fully automated container share is 1%, while semi-automated terminals account for 3%. In absolute numbers, 53 container terminals worldwide are automated to a certain degree (2021) (Source: https://www.itf-oecd.org/sites/default/files/docs/container-port-automation.pdf).
According to UNCTAD's Review of Maritime Transport, 75% of terminal operators consider automation critical to remain competitive in the next 3 to 5 years, while 65% view automation as an operational safety lever.
Over 60% of respondent terminal operators expect automation to help improve operational control and consistency, while 58% expect automation to cut terminal operational costs.
Finally, about one-third of respondents see automation as a way to increase productivity by up to 50%. At the same time, about one fifth believe that automation could cut operational costs by more than 50%.
Learn more about the port automation challenges
CONSEQUENCES OF FULL AUTOMATION
Automation is, in essence, the removal of the need for human labour in manual processes. Processes that a group of workers has completed can now be operated with only one man in a control tower. Minimising errors, increasing efficiency and reducing costs are the driving motives to invest in automation. The elimination of human labour reduces operational costs (wages) and increases efficiency. In addition, automated processes are faster and more predictable and come with an increase in safety: fewer workers and fewer injuries.
Despite the data of UNCTAD's report and the investments of an estimated 15 billion US$ in container terminal automation (additional to another 10 billion US$ expected in the next five years), automation is still slowly developing.
On the one hand, implementing full automation in brownfield terminals is complicated because of possible disruption of running operations. On the other hand, full container terminal automation is costly. Lacking investment funds and loss of jobs is one "traditional" argument against automation. Surprisingly, as the return on investment is critical, some key performance indicators suggest that productivity is not better than conventional port operations. In some cases, it seems even worse.
When Elon Musk designed his production facilities for Tesla, he promised Toyota to show them how cars are built better (faster, cheaper). In the end, he admitted that "Yes, excessive automation at Tesla was a mistake. To be precise, my mistake. Humans are underrated."
The main argument for robots or automation is reducing costs, headcount and improving efficiency. In the sense of Toyota, more robot installations and fewer people means that "what you will do is what you already do badly, just quicker". Moreover, there is a fascinating insight: automated processes are repetitions of pre-programmed sequences, independent of good or bad.
Automated processes are highly procedural. If some flexibility is needed at one point, the entire process set-up is getting complicated, including additional if-then clauses. Machines also need a lot of maintenance personnel. At some point, it becomes a question again if to further invest in automation.
THE OPTIMUM WAY: SEMI-AUTOMATION
Lean, Six Sigma, Agile, and other continuous improvement methodologies embrace smart automation. However, not everything can be automated, nor should it be. The lean journey needs to be adopted, not just automation alone. As in other industries, excessive automation means less flexibility within container terminals due to amortisation.
The disadvantages of a fully automated container terminal - less flexibility for operational planning, new scenarios that have to be previously planned, more difficulty to react when exceptions occur - must be taken into account when expecting higher productivity. A semi-automated container terminal avoids them as there are still parts in the process that remain flexible to react to exceptions and new scenarios quickly. Additionally, a semi-automated container terminal requires substantially less capital outlay. And it remains a significant employer in the region: the loss of jobs through semi-automation is minimal, compared to full automation.
Automation is a global trend in port container terminals. However, the level of automation adopted in each terminal depends on different factors. Semi-automation is, in most cases, the right mix to increase container terminal productivity. One aspect of semi-automation goes beyond the borders of the terminal yard: involving gates and yards to gather data and funnel them into the terminal-logistics chain system.
Learn about TTI Algeciras and their semi-automated approach for increased productivity
Research our extensive resources about port automation here...
prev article Subscribe to blog next article
Improving container terminal operations
Unreported Container Damage: How to achieve fewer claims in Container Terminals
SOLUTION: Terminal Tracker for Marine & Ports

redpajama_set_name: RedPajamaCommonCrawl


text:
Browse: Home / 2008 / January / EXTRA! to air Atlantis segment
EXTRA! to air Atlantis segment
@ChadColvin Chad Colvin |
Media | January 23, 2008
Beware of SPOILERS for the Stargate Atlantis Season Four episode "Harmony" in the report below.
In advance of SCI FI Channel's broadcast premiere of this week's episode of Stargate Atlantis, the entertainment industry news series EXTRA! will be airing a segment going behind-the-scenes of the latest episode, "Harmony," this Friday.
In the episode, Colonel Sheppard and Dr. McKay must protect a young princess making a pilgrimage to become queen. That mission becomes more dangerous when they learn that a former enemy — Genii — are trying to ensure the princess doesn't reach her destination, and that the Genii aren't the only ones trying to stop her.
EXTRA!'s coverage of the episode is due in part to the fact that one of their corespondents, Jerry Penacoli, appears in the episode as one of the Genii soldiers. Photos, video and a written description of the production that was done on the day Penacoli visited the set are available through Atlantis showrunner Joseph Mallozzi's blog.
Astute viewers will also notice the presence of young actress Jodelle Ferland, playing the part of the princess. Ferland has already appeared once in the Stargate universe, having played Adria at 7 years old in the Stargate SG-1 Season Ten premiere, "Flesh and Blood".
"Harmony" premieres Friday at 10 p.m. Eastern/Pacific on SCI FI. As EXTRA! is syndicated, airtimes for Friday's installment will vary by station and location. Check your local listings to be sure you don't miss it!
Learn more about upcoming episodes in GateWorld's Season Four episode guide.
(Thanks to Morjana for the tip!)
Posted in Media | Tagged Imported
Chad Colvin
Chad Colvin is a GateWorld editor and convention correspondent. He lives near Madison, Wisconsin. Follow him on Twitter @ChadColvin.


At Theoderma, we know that natural skin care products are sometimes harder to find or more expensive than what you see on drugstore shelves. Thankfully, consumer demand is starting to make natural products more accessible. But, choosing clean products still requires deliberate and thoughtful effort. If all the effort has you wondering, "Why use natural skin care products, anyway?" here are some of the great benefits of natural skin care.
Each day, we make dozens of choices about what we put into and onto our bodies. Many of us choose organic vegetables to reduce our exposure to pesticides. Similarly, more consumers than ever have are avoiding chemical-laden skin care products. Many common products contain chemicals, like formaldehyde and hydroquinone, both of which are thought to be human carcinogens. Rather than reading labels, choosing natural products eliminates that worry entirely.
Keeping harsh chemicals off your skin also means they aren't winding up in our air, soil or waterways. If you'd like to take it a step further, choose Leaping Bunny certified products to minimize your impact on animal suffering.
In addition to potentially dangerous chemicals, many skin care products contain fragrances and sulfates. Synthetic fragrances causes irritation in at least 20% of people and sulfates often cause dryness and rashes. By choosing natural skin care products, you can drastically reduce your exposure to skin irritants.
Natural Skin Care is Effective!
Products don't need tons of chemicals in them to be effective. In fact, some chemicals, like methylparaben for example, can actually make your skin more sensitive to UV light, reducing the efficacy of the product. Natural skin care ingredients, on the other hand, can help your skin absorb moisture and improve your skin's barrier function, allowing your skin to stay protected and healthy.
So, Why Use Natural Skin Care Products? They Work!
If you ever find yourself wondering if the effort is worth it, remember the benefits of well-made natural skin care products. Theoderma products can help you reduce your chemical exposure, decrease your environmental impact and keep your skin healthy and beautiful. Take a look at our Meet Your Match tool to find products perfectly formulated for your skin.


Bill has spent over 35 years in healthcare, with extensive knowledge and experience in Medicare cost reporting rules and regulations. He has spent the past six years exclusively reviewing transplant center cost reports and financial issues. These reviews have included more than 25 distinct hospital transplant programs, approximately 10 percent of the certified programs in the United States. Bill's career includes time in managerial roles in Medicare and Medicaid reimbursement at the Divisional and Corporate levels with HCA, Triad Hospitals, and Horizon Health. Prior to that, he also worked as an Associate Auditor/Investigator for the New York State Deputy Attorney General's Medicaid Fraud Unit, and as a Reimbursement Specialist with the Fiscal Intermediary Blue Cross of Rochester, New York. Bill has also worked extensively on hospital appeals for submission to the PRRB Board and has created numerous models for hospital net revenue recognition. Bill received a BA in General Business from St. John Fisher College in Rochester, New York and an MBA from Rochester Institute of Institute of Technology. He is also a Certified Public Accountant (CPA-inactive status).


is there a reason 1 picece clip ins are uncommon?
Hi everyone! I haven't posted in a very long time but I have a question about making clip in hair extensions from wefted hair, and figured this would be the place to ask.
aka big pieces in the back, two medium pieces on each side of the head, and small single clips just to put wherever. The amount varies depending on how short my hair is but that's basically what i always do when I sew in clips.
I'm wondering- are there any down sides to creating a single VERY long clip to use as a base? I'm talking like 14+ inches, a single really long piece that would clip from basically one side of the head behind the ear to the other. I've seen pieces like this made before for adding bulk to hair but it's always just the one piece and not used in addition to all over clip in extensions.
Would it be feasible to have one really long piece as the bottom (instead of two or three "large" pieces) and then the two medium pieces on the side and small pieces wherever? or is there a really obvious reason i'm overlooking that would make this bad/impractical?
but then a few more clips layered on top.
i currently have a pixie and I made a "test" piece like that and it blends SO much better but before I committed to sewing on all the clips (it takes me ages) i thought i would ask and see if maybe it's a waste of time/a bad idea!
the only thing I'm thinking about is maybe the weight would be too much? but i used to wear full heads of braided in dreads so i'm pretty used to that and it doesn't bother me too much but maybe something else? any thoughts or input are greatly appreciated, thank you so much!
Re: is there a reason 1 picece clip ins are uncommon?
There is one thing you should keep in mind, if you are aiming for colume and not too much length than your own hair then yes, use one piece and keep it close to the length your hair is.
If you want to add length then if you have one piece then your hair will be non-continuous. Imagine having your pixie length hair and then suddenly a whole curtain of hair beneath it.
When you aim for length, and your hair is much shorter than the extensions you want to have numerous thin tresses in order to be able to spread them over your head in different height nad levels so as to have it as smooth as possible.
Also another mistake most women do is that even if they use many layers of extensions they still don't layer enough the tresses, you need the upper tresses to be slightly longer than your own hair otherwise the curtain effect still applies to the top of your head.
It is much more beautiful to have super layered long hair than have small spiky hair on top and a rapunzel length of hair below!
As you can see here her fringe and all the side is like she is having a mushroom of hair and then a long piece of hair beneath it.
You can use a single piece even if you want it to blend but you need to have it layered and of course if it is one piece then it must take all the back of your head (you will see why), while having a lot of pieces you can always choose where to put and also put it inside your own hair so both your hair and the extensions are there.
Check out our covering an undercut video.
You can use a wig to make a one piece clip in extension.


1a. All and any bonuses are available to players from any countries except for Croatia (HR) Hungary (HU) and Serbia (RS).
1b. Maximum withdrawal limit for no-deposit bonuses is EUR: 15, USD: 15, SEK: 150, NOK: 150, AUD: 20, CAD: 20, RUB: 1000, BTC: 0.0015, ETH: 0.015, BCH: 0.0015, LTC: 0.75, DOG: 4500. To submit a withdrawal request, the account must be fully verified and a minimum deposit must be made EUR 20, USD 20, SEK 200, NOK 200, CAD 30, AUD 30, RUB 1200, BTC 0.002.
1d. The maximum bet with an active bonus is 5 EUR / 5 USD / 50 SEK / 50 NOK / 7.5 CAD / 7.5 AUD / 300 RUB / 0.0005 BTC (Unless stated otherwise in special terms for the bonus).
1f. To use the free spins, you need to visit your client area, open the "Bonuses" tab and activate the ones you need. They will then become available for the corresponding slot.
1g. When using an activated bonus, the real money from the player's account is wagered first and only then the bonus money.
1i. All deposit bonuses have a wager x50.


So you have a restaurant business? You want to install the perfect free restaurant WordPress theme. You are at the right place, Best free restaurant WordPress is what you seek then VW is going to fulfil all your needs. No more research, you will definitely choose to go with us after knowing what we have to offer. Best food wp theme with useful features and a professional design. Our free food WordPress theme has a inner and homepage layouts, testimonial sections, blogs, stunning pages & post design. All packed in a theme that is compatible with other browsers and woocommerce with RTL language support and social media integration. This free hotel WordPress theme is in sync with the present version of WordPress. It's the top free responsive wp theme on the web. We bet, you won't find anyone that's willing to offer you so much for free. Build and create amazing Web pages with our free theme and give your website the perfect foodie yet professional look.
Why VW premium restaurant over free theme?
Your website is up with our free restaurant WordPress theme, Great! Is that really all? Well, if you are happy with our free theme then you are definitely going to love this. We have an ace up our sleeve in the name of premium food wp theme. You got your website up with free theme but it is not going to cut it for long. You have to make some changes, starting with your website theme. Upgrade your free theme to premium and avail all the features and support that we have to offer. Our premium theme is laden with features and exclusive theme specific functionality that you cannot find anywhere else. Our premium theme will come with a trusty customer support and a insanely good looking design. This theme is not only good for the website but it is good overall for you business, as our theme do have the power to drive in more sales. Our premium theme 10 times better than the free one, in terms of looks, style, design, features, support and so on. Our core team of developers put it through rigorous testing and fixed all the issues that surfaced, thereby creating the best product possible. They will also provide you with customer support and resolve your queries. Your website will never see a downtime i.e no viewer will ever have a bad experience. A premium responsive, cross browser & woocommerce compatible theme that is perfect to match and meet all your needs.


text:
Q: Get all files in raw folder in android lets say i have 100 .mp3 files in raw folder
for a single known file can read files can use getResources().openRawResource(R.raw.myfilename)
but i want to get all the files names in raw folder and then pick a random one from that list
any help?

A: Just for completeness, here is the same thing in Kotlin:
package com.kana_tutor.KanaCard

import android.util.Log
import java.lang.reflect.Field

fun listRaw() {
    val fields: Array<Field> =
        com.kana_tutor.KanaCard.R.raw::class.java.getFields()
    fields.forEach {field ->
        Log.d("Knames", String.format(
                "name=\"%s\", id=0x%08x",
                field.name, field.getInt(field))
        )
    }
}

A: To add to what @EminemT said, R.raw.class.getFields() seemed to give internal files used by android. To get the files you put in res/raw, use R.raw.class.getDeclaredFields() instead.

A: public void listRaw(){
    Field[] fields=R.raw.class.getFields();
    for(int count=0; count < fields.length; count++){
        Log.i("Raw Asset: ", fields[count].getName());
    }
}

Since the actual files aren't just sitting on the filesystem once they're on the phone, the name is irrelevant, and you'll need to refer to them by the integer assigned to that resource name. In the above example, you could get this integer thus:
int resourceID=fields[count].getInt(fields[count]);

This is the same int which you'd get by referring to R.raw.whateveryounamedtheresource
refer

redpajama_set_name: RedPajamaStackExchange


text:
Justia Lawyer Directory Criminal Law Washington Amboy Attorneys
Amboy, Washington Criminal Lawyers
Beverly Stumpf Lavy
Ridgefield, WA Criminal Law Lawyer with 20 years experience
(360) 576-0648	902 N 15th Ct
Ridgefield, WA 98642
Criminal and Juvenile
Sheila Alexis Homchick
Brush Prairie, WA Criminal Law Lawyer with 39 years experience
(360) 892-1110	19110 NE 144th St
Brush Prairie, WA 98606
Criminal, DUI, Divorce and Family
Elizabeth A. Arwood
Vancouver, WA Criminal Law Lawyer with 9 years experience
(360) 693-8471	1101 Broadway Street, Suite 250
Elizabeth is an experienced litigator and practitioner in the areas of juvenile law, family law, business law and criminal defense. Within the area of family law, she has represented clients in parenting and child support, parentage, nonparental custody, dissolution, modification, and adoption cases. Within juvenile law, Elizabeth has experience with Becca Bill cases (Truancy, At Risk Youth, and Children In Need of Services), representation of youth in juvenile dependency proceedings, and juvenile offender matters. She has successfully resolved many criminal matters including domestic violence cases, assault, DUI, MIP (minor in possession), violations of the Vancouver Municipal Code, unlawful camping, trespass,...
Erin Bradley McAleer
Free ConsultationCriminal and Bankruptcy
Western Michigan University Cooley Law School and Western Michigan University Cooley Law School
Attorney McAleer has primarily devoted his practice to criminal defense with a focus on defending those accused of sex crimes and other major felony crimes. Attorney McAleer's approach to these cases and attention to detail has earned him a local, state and national reputation which was achieved by passionately representing hundreds of clients charged with essentially every type of criminal offense.
Roger Priest
Vancouver, WA Criminal Law Attorney with 10 years experience
(360) 281-7314	211 E McLoughlin Blvd
Free ConsultationCriminal, DUI, Insurance Claims and Personal Injury
Florida Coastal School of Law
Roger Priest is a former prosecutor and Vancouver, Washington attorney helping clients with DUI, Criminal Defense, Car Accident, and other Personal Injury cases.
Sean Downs
(855) 309-4529	500 W 8th Street
Criminal, DUI, Traffic Tickets and White Collar Crime
Sean M. Downs is a criminal defense attorney serving those accused of crimes in the states of Washington and Oregon. Sean started his law career at a small private firm in Spokane, Washington learning the ins and outs of criminal defense, traffic offenses, and driver's license hearings. He then moved on to work at the Spokane County Public Defender Office where he represented people accused of misdemeanor and felony offenses, as well as working on appellate cases. In 2013, after over twenty-one years of combined private and public practice, Sean joined together with attorney Diane Grecco to found the law...
Nicholas Wood
(360) 993-4321	2901 Main Street, Suite 100
Free ConsultationCriminal, Appeals, Divorce and Domestic Violence
Lewis & Clark College
The Law Office of Nicholas Wood, P.S. is a premiere criminal defense, military law, and civil litigation firm located in beautiful downtown Vancouver, Washington. Attorney Nicholas A. Wood has vast experience dealing with the police, prosecutors and other law firms in litigation matters. As a result, Nick has achieved sensational results for his clients on a consistent basis. As a former prosecutor in Clark County WA (Rule Nine Intern), the United States Air Force (Trial Counsel and Assistant Trial Counsel) and U.S. Attorney's Office (Special Assistant U.S Attorney), Nick understands the methods, strategies and tactics commonly used by...
Christopher D Ramsay
(360) 694-1097	112 W. 11th Street
Free ConsultationCriminal, DUI, Domestic Violence and Traffic Tickets
Christopher D. Ramsay effectively represents and defends the criminally accused. In addition to being a highly experienced criminal defense attorney, he has served as an adjunct professor at Washington State University Vancouver, lecturing on the topic of criminal procedure and criminal law. From 1990 to 2003, Christopher D. Ramsay worked as criminal prosecutor in Denver Colorado.
Angus Lee
(800) 691-0039	9105A NE Hwy 99, STE 107277
Criminal, DUI and Domestic Violence
University of Washington School of Law
Angus Lee is a life long resident of Washington, except when he was serving in the USMC. He has twice been elected as a county prosecutor and now focuses his practice on criminal defense in South West Washington.
Erin Priest
Vancouver, WA Criminal Law Attorney with 8 years experience
(360) 949-7451	211 E Mcloughlin Blvd #120
Free ConsultationCriminal, Divorce, Elder and Family
Priest and Ellis PLLC is a Vancouver WA law firm, whose attorneys practice Divorce and Family Law, Criminal Law, and Guardianship and Estate Planning law. We practice law with a better perspective. We emphasize building strong relationships with clients, based on good communication and using negotiation and litigation skills to achieve favorable results. Our specific areas of practice are diverse and include divorce, collaborative law, child custody, modifications, paternity, child support, criminal defense, DUI, domestic violence, felony charges, guardianships, probate, wills and trust, and much more. Call today to schedule a lawyer consultation in our convenient...
(360) 694-8718	1601 Lincoln Ave
Free ConsultationCriminal, DUI, Domestic Violence and Insurance Claims
As a resident of the Pacific Northwest for over 20 years, Jack attended the University of Washington and graduated with a degree in Political Science and Economics. Jack received his Juris Doctorate from Lewis and Clark Law School in Portland, OR. While in law school, Jack clerked at Vancouver's Blair, Schaefer, Hutchison, and Wolfe law firm where he gained experience in personal injury law, real estate transactions and litigation, and general civil practice. Following his graduation, he was hired as an associate. Jack then became a prosecutor for the City of Vancouver and for the Clark County Domestic Violence Prosecution Center...
John Joseph Lutgens
Vancouver, WA Criminal Law Lawyer with 27 years experience
Free ConsultationCriminal, DUI, Estate Planning and Personal Injury
John Lutgens has been practicing law in Southwest Washington and the Portland metropolitan area since 1992. After graduating from Willamette University, College of Law in 1992, he joined the Portland firm of Sims & Sims. While at Sims & Sims he practiced in criminal defense, personal injury, estate planning & probate, real estate law, commercial fishing law, business transactions, and litigation. Since 1994, when John Lutgens opened his firm in Vancouver, Washington, he has practiced in multiple areas, including plaintiff's personal injury, criminal defense, estate planning & probate, business formation and transaction, family law, bankruptcy, and real...
(855) 469-2889	237 NE Chkalov Drive
Free ConsultationCriminal and Immigration
If you were having heart problems, you wouldn't hire an eye surgeon. So don't turn to a tax lawyer when you have an immigration problem. Choose a lawyer dedicated to immigration law. I am attorney Scott D. Mills, and I have developed my expertise in immigration law by practicing exclusively in immigration law for years. The United States was founded by people seeking freedom and the chance to work and build a life for their families. I fight for my clients so they can have those same opportunities. I am a Washington licensed attorney authorized to provide United States...
Kris Carrasco
Vancouver , WA Criminal Law Lawyer with 11 years experience
Vancouver , WA 98660
Free ConsultationCriminal, DUI, Domestic Violence and Personal Injury
Vancouver Washington attorney handling all crimes including DUI, deferred prosecution, theft, assault, drug crimes and domestic violence. Kris Carrasco also represents clients in personal injury matters. Kris actively practices law throughout Washington and Oregon. He is licensed in Washington, Oregon and California.
Matthew R. Hoff
(360) 693-6228	2901 Main St.
Free ConsultationCriminal, DUI and Domestic Violence
University of Oregon School of Law
Dedicated criminal defense attorney. Over 10+ years representing clients on a variety of criminal matters including DUI/DWI; Domestic Violence; Felonies and Misdemeanors. My hard work has lead to dismissal of cases pre-trial; not guilty verdicts at trial and no action on cases by conducting pre-charge investigations. I take pride in my work. And i am genuinely honored when a client hires me to represent him/her.
Bruce Hanify
Longview, WA Criminal Law Lawyer with 34 years experience
(360) 200-4907	1315 14th Avenue
Criminal, Appeals and DUI
27 years experience, 15 as a deputy prosecutor. Representing clients in Clark, Cowlitz, Lewis and Thurston Counties.
Kevin R. Vibbert
Longview, WA Criminal Law Attorney with 24 years experience
(360) 423-0242	1402 Broadway St
Criminal, Bankruptcy and DUI
Wesley Johnson
(800) 606-8707	1146 14th Ave
Criminal, DUI, Estate Planning and Traffic Tickets
Michael William Frey
Kelso, WA Criminal Law Attorney with 23 years experience
(360) 577-8700	600 Royal Street
Kelso, WA 98626
Criminal, Construction, Elder and Estate Planning
Michael "Mick" Frey was born in Longview, Washington. He began his legal career as an intern in his Father's firm, Donald W. Frey, P.S. which he then joined as an associate in 1996. He continues to share office space with his Father, and Wesley S. Johnson. Mick's practice focuses on dispute resolution and litigation of issues in property rights, real estate, probate, estate planning, guardianships and advising small businesses. Mick is married and has one daughter. To set up an office or phone consultation, you may Email Mick: mick@attorneyfrey.com
Nicole T. Dalton
When the government focuses its energies on prosecuting, I fight hard for my clients' rights. I also believe that people accused of crimes deserve to be treated with respect and compassion and given the information and support they need. At the Law Office of Nicole T. Dalton, PLLC, we value individual rights and work hard to protect clients from unfair and inappropriate treatment. I am a seasoned and aggressive trial lawyer and I am not afraid to stand up against the government to protect your rights. Staying on top of current caselaw and pushing important issues...
Diane Sweet
(360) 718-8957	710 W Evergreen Blvd
Criminal, Military, Traffic Tickets and White Collar Crime
Steven Whitman Thayer
Free ConsultationCriminal and DUI
Steve Thayer has practiced law in Southwest Washington since 1977, with an emphasis in criminal defense. He has tried and won criminal cases involving all kinds of charges including Assault, Drug Delivery, DUI, Robbery, Sexual Assault, State & Federal Child Pornography charges, Vehicular Homicide, and First Degree Murder. He is a Founding Member and former Vice President of the Washington Association of Criminal Defense Lawyers, has published and lectured extensively, has been featured as a Super Lawyer by Washington Law and Politics for many years, and has been AV Rated™ by Martindale-Hubbell® for over 15 years. He is admitted to...
Brian A. Walker
(360) 695-8886	900 Washington Street
Western New England University School of Law and University of Washington School of Law
Laura Mancuso
(360) 448-2856	10000 NE 7th Avenue
Criminal, DUI, Family and Traffic Tickets
Diane Grecco
(855) 309-4529	500 West 8th Street
Free ConsultationCriminal, DUI, Estate Planning and Family
Aaron Ritchie
(360) 694-8718	1305 Main St
Criminal, DUI, Domestic Violence and Insurance Claims
Aaron Ritchie received his Bachelor of Arts degree in History & Political Science from The Colorado College in 1997, and his Juris Doctorate from Lewis & Clark Law School in 2004. While he attended law school, Aaron interned at the Vancouver City Attorney's Office where he prosecuted the full range of misdemeanor cases in District Court. Following his admission to the Washington Bar in 2004, Aaron assumed a full-time prosecutor position in the Clark County Domestic Violence Unit and was eventually promoted to Assistant Unit Coordinator. During his career as a prosecutor, Aaron handled thousands of domestic violence cases and won...
Tierra Busby
(360) 353-3801	715 Broadway Street
Criminal, Divorce, Family and Juvenile
Camas, WA Criminal Law Lawyer with 16 years experience
(360) 834-4611	430 NE Everett St
Criminal, Business, Family and Probate
Joseph Loughlin
(360) 735-8200	211 E McLoughlin Blvd.
Free ConsultationCriminal, Insurance Claims, Military and Traffic Tickets
Jeffrey W Holmes
(360) 975-9288	119 East 8th Street
Criminal, DUI, Divorce and Domestic Violence
Seattle University
Robert Vukanovich
Criminal, Divorce and Family
Clayton J Montgomery
(360) 690-0064	902 Esther Street
Criminal, Divorce, Estate Planning and Traffic Tickets
Brandy Jeffers
(360) 696-4495	1314 Kauffman Avenue
Timothy A. Liesenfelder
Vancouver, WA Criminal Law Lawyer
(509) 263-7505	406 west 31st st
Jeff Staples
Vancouver, WA Criminal Law Attorney
(360) 326-3406	1014 Franklin Street
Therese Marie Lavallee
(360) 750-5607	1014 Franklin St
Criminal and Civil Rights
Todd Pascoe
(360) 696-4495	1314 Kauffman Ave
Criminal, Divorce, Family and Personal Injury
Michael Roy Foister SR
Criminal and Elder
Criminal, Administrative, Business and Estate Planning
Marisha Childs
(360) 906-7234	500 W 8th St
Criminal Lawyers in Nearby Cities
Brush Prairie
Criminal Lawyers in Nearby Counties
Cowlitz County
Skamania County
Arrested or facing criminal charges?
Criminal law addresses the government's prosecution of individuals who have been accused of committing a crime. Such laws may be federal, state, or local. The prosecution represents the people of a particular jurisdiction, and acts on behalf of the government by bringing a case against an accused. Under the U.S. Constitution, a person accused of a crime may have the right to a criminal defense attorney during interrogations and certain other times before and during a trial.
Whether you are under police investigation, have been arrested, or are facing charges, having an advocate familiar with the criminal justice system.
Most jurisdictions classify crimes as felonies or misdemeanors, with felonies being the more serious offenses with the possibility of more severe sentences. Some criminal lawyers focus on a specific area of criminal defense law, such as white-collar crime, drug offenses, theft crimes, or violent crimes. You should consult with a criminal defense lawyer early on in the process to preserve options, such as diversion programs or plea bargains.
When hiring a criminal defense attorney, you should evaluate the experience and fee structure of the attorney. Some offer a free consultation to discuss your case.
Accomplice liability: If a person aids, assists, or encourages another in the commission of a crime, they are criminally liable as an accomplice to the crime.
Self-defense: The claim that an act otherwise criminal was legally justifiable because it was necessary to protect a person or property from the threat or action of another.


On Saturday, June 16, Lakewood Youth Sports (LYS) kicked off its 62nd year with opening day ceremonies followed by a range of free activities, including carnival games, bouncers and a rock-climbing wall.
The annual Lakewood Public Safety Expo also returned with exciting demonstrations including one by the L.A. County Fire Department using a search and agility dog demo, and a live demonstration by L.A. County Sheriff Department K9 Unit.
To view, download and share photos from these events, visit www.lakewoodcity.org/communitygallery.


No marketing trickery here – just a good deal, scratch that a great deal. You pay for two nights and have the third night on us. So an extra day in paradise for free!
Fancy something a little bit special? Book one of our beautiful rooms for two nights – get 10% off your room rate and a bottle of house bubbles to celebrate your break away.
Get in early and book your break for winter now and you will receive 25% off your room rate. Surprise someone with this great deal. It has brownie points all over it!
Book a night at the Duke and let us take care of everything – that's dinner for two (two courses so you won't be hungry), a night's accommodation and then breakfast the next morning. Book now to secure this great deal.
Book a night at the Duke in one of our beautiful rooms and let us take care of your breakfast. Nothing to think about then. Maybe just who you want to bring! Come and enjoy the Bay of Islands and see what it has to offer.
The Bay of Islands hosts the Country Rock Festival – in fact The Duke is one of the venues where you can come and listen to bands taking part. Sound like you – why not book a weekend away and get 20% off your room as well.


text:
Q: Issue with XSLT Processing on PHP I'm getting a few errors from XSLTProcessor:

XSLTProcessor::transformToDoc() [function.XSLTProcessor-transformToDoc]: Invalid or inclomplete context
XSLTProcessor::transformToDoc() [function.XSLTProcessor-transformToDoc]:
XSLTProcessor::transformToDoc() [function.XSLTProcessor-transformToDoc]: xsltValueOf: text copy failed in

Which is parsing this XSLT Line:
<xsl:apply-templates select="page/sections/section" mode="subset"/>

The section is:
<xsl:template match="page/sections/section" mode="subset">

        <xsl:value-of select="title"/>

    <xsl:if test="position() != last()"> | </xsl:if>
</xsl:template>

The XML that the section  is parsing is:
   <shorttitle>About</shorttitle>
   <title>#~ About</title>

The PHP XSLT Code is:
$xslt = new XSLTProcessor();
$XSL = new DOMDocument();

$XSL->load( $xsltFile, LIBXML_NOCDATA);

$xslt->importStylesheet( $XSL );

print $xslt->transformToXML( $XML );

My suspicion about the the errors is due to content. I'm not getting these errors with Firefox's XSLT rendering, nor am I getting an invalid XML document on the backend.I'm not getting errors on the load, its just on the transformToXML function.

A: Works for me (php5.3).
I modified slightly the code to make it run but I can't see any pb with the XSLT.
I did not encounter the message you describe.
php
<?php

    $xsltFile = "a.xslt";
    $xmlFile = "a.xml";

    $xslt = new XSLTProcessor();
    $xsl = new DOMDocument();
    $xml = new DOMDocument();

    $xsl->load( $xsltFile, LIBXML_NOCDATA);
    $xml->load( $xmlFile, LIBXML_NOCDATA );

    $xslt->importStylesheet( $xsl );

    print $xslt->transformToXML( $xml );

    ?>

xml
<page>
<sections>

<shorttitle>http://about.com/about.php</shorttitle>
<title>#~ About</title>

</sections>
</page>

xslt
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="html"/>

<xsl:template match="/">
<xsl:apply-templates select="page/sections/section" mode="subset"/>
</xsl:template>

<xsl:template match="page/sections/section" mode="subset">

        <xsl:value-of select="title"/>

    <xsl:if test="position() != last()"> | </xsl:if>
</xsl:template>

</xsl:stylesheet>

A: If you are running in to errors with XSLTProcessor, it is often worth checking the version of the libxml and libxslt versions that your system is using (see: http://www.php.net/manual/en/xsl.requirements.php).  The easiest way to check these is to look at the output of
<?php phpinfo(); ?>

You are looking for the "libxml Version" and the "libxslt compiled against libxml Version". You may be using syntax or structure that is not supported by the version you use.
If this is not the source of your problem, we will likely need to see more of the code, xml and xslt so that we have the proper context.  As Alain's answer indicates, by completing your syntax somewhat arbitrarily to be executable, there are no immediate problems apparent.


You cannot feel near-infrared as heat, and you cannot see it, but it' has a major beneficial impact in terms of health. Near-infrared is what's missing in non-thermal artificial light sources like LED.
Starting with the latter, when you look at the rainbow spectrum, the visible part of light ends in red. Infrared-A or near-infrared is the beginning of the invisible light spectrum the following red. This, in turn, is followed by infrared-B (mid-infrared) and infrared-C (far-infrared).
Since LEDs have virtually no infrared and an excess of blue light that generates reactive oxygen species (ROS), this explains why LEDs are so harmful to your eyes and overall health.
Chromophores are found in your mitochondria and inactivated water molecules. In your mitochondria, there's also a specific molecule called cytochrome c oxidase, which is involved in the energy production within the mitochondria. Adenosine triphosphate (ATP) — cellular energy — is the end product.
This means liver cells with more ATP will be able to detoxify your body more efficiently; fibroblasts in your skin will be able to synthesize more collagen fibers and so on because ATP is crucial for all cellular functions. Wunsch expands on this even more in the lecture above.
That said, a differentiation is in order. Most of the METABOLICALLY USED energy does come from food. But there is a thermodynamic aspect to it as well. Maintaining a normal body temperature (37 C or 98.6 F) involves two Ge 41036 100-watt A19 ... Best Price: $15.11 Buy New $18.89 (as of 11:20 EDT - Details) mechanisms: Energy production in your mitochondria from food, and photonic energy (near-infrared radiation from sunlight and incandescent light bulbs) that is able to penetrate deeply into your tissue, even through clothing.
Understanding how LEDs can harm your health begins with the recognition that light emitted from a LED bulb is of a different quality than a natural light source. Normally, a natural light source is a blackbody radiator that gives off all kinds of wavelengths in a more or less continuous manner.
"With LED, the layman is not able to tell if it's a tailored spectrum where you have the blue part only masked by excessive parts of other spectral regions," Wunsch says. "There are different technologies … Soraa, for example, have violet driver LED, not blue … By their technology, the red is a little bit more emphasized compared to the standard white light fluorescent LEDs.
Physical color temperature, which means the temperature of your light in degrees Kelvin (K). This applies to sunlight, candlelight, incandescent lamp light, and halogens. What this means is that the source itself is as hot to the touch as the color temperature given.
Correlated color temperature. This is a measurement that tells you how the light source appears to the human eye. In other words, it is a comparative measurement. A correlated color temperature of 2,700 K means it looks the same as a natural light source with a physical color temperature of 2,700 K.
Unfortunately, it doesn't always work. Some newer cameras and smartphones have a built-in algorithm that will detect the flicker frequency and change the shutter speed accordingly to improve the recording, thereby eliminating the interference. If your camera has this algorithm, it will not record a visible flicker even if it's there.
I like being on the cutting edge of technology and I quickly switched out all my incandescent bulbs for LED lighting. I now realize the enormity of my mistake, but at the time — going back almost 10 years now — I was completely unaware that it could have health consequences. Before that, I used full-spectrum fluorescents, which is equally deceptive, as it is a full spectrum in name only.
When it comes to computer screens, Wunsch suggests reducing the correlated color temperature down to 2,700 K — even during the day, not just at night. Many use f.lux to do this, but I have a great surprise for you as I have found a FAR better alternative that was created by Daniel, a 22-year-old Bulgarian programmer that Ben Greenfield introduced to me.
I also strongly recommend using blue-blocking glasses after sundown, even if you use incandescent light bulbs. Without these modifications, the excessive blue light from LEDs and electronic screens will trigger your body to overproduce ROS and decrease the production of melatonin, both in your pineal gland and your retina, the latter of which will prevent repair and regeneration, thereby speeding up the degeneration of your eyesight.
As you may or may not know, many candles available today are riddled with toxins, especially paraffin candles. Did you know that paraffin is a petroleum by-product created when crude oil is refined into gasoline? Further, a number of known carcinogens and toxins are added to the paraffin to increase burn stability, not including the potential for lead added to wicks, and shoot invading your lungs.
To complicate matters, a lot of candles, both paraffin, and soy, are corrupted with toxic dyes and fragrances; some soy candles are only partially soy with many other additives and/or use GMO soy. There seems to be a strange mindset that exposure to small amounts of toxins is OK, even though the exposure is exponential over time!
The soy is non-GMO, is clean burning without harmful fumes or soot, is grown in the U.S., and is both sustainable and renewable. Also, my candles are completely free of dyes. The soy in these candles is not tested on animals, is free of herbicides and pesticides.
It's also kosher, 100 percent natural and bio-degradable. All of my fragrances are body safe, phthalate- and paraben-free, and contain no California prop 65 ingredients. The wicks are simply flat braided cotton coated in a natural vegetable wax and self-trimming, which reduces carbon build up.


Dr. Allison Bridge graduated with honours from the School of Optometry at the University of Waterloo in 2011. Previous to optometry, she completed a Bachelor of Science degree in Health Sciences, graduating from Brock University on the Dean's honour list. Dr. Bridge grew up in Shelburne, Ontario and is a member of the Canadian Association of Optometrists as well as the Ontario Association of Optometrists. During her optometric training, Dr. Bridge had the opportunity to work alongside several ophthalmologists, locally in Newmarket as well as in Niagara Falls. Through these externships she gained valuable experience in the newest ocular disease treatments and in the pre- and post- operative care of cataract and laser surgery patients. She enjoys all aspects of providing comprehensive vision care to her patients and has a special interest in contact lenses and low vision rehabilitation. Dr. Bridge and her husband are excited to now call Newmarket their home and they look forward to being involved in the community. Dr. Bridge enjoys spending time with her family, travelling, playing volleyball and is currently a member of the Aurora Ladies Volleyball League.


This is my /now page. Perhaps you should have one, too?
Living in Malmö in the south of Sweden since 2004. Sharing the central flat with my wife Petra and our daughter.
My two sons from the marriage with Helena have moved to their own places. Ludvig studies sound design at BTH. Gabriel studies computer game design at Howest.
Since 2015 I work at Netnod as a programmer, occasionally doing devops stuff and worrying too much about computer security.
Still trying to work a 6 hour day, mostly to get more time with my daughter, and because, honestly, I'm fragile enough as it is.
I'm currently on a Twitter break, trying to get back into reading fiction.
Most of the local groups I was a part of are dormant: Malmö Open Source Interest Group, the hackerspace Forskningsavd (web-site down), #merakrypto, et cetera. Our weekly hacklunch is still alive.
Latest software projects: a simple XMPP client with an Emacs frontend. Trying to learn Haskell.


As I was traveling on the clouds of Worakls, I realized that many times I was in somebody else's story. How did I get there? What am I doing here, participating and noding my head peacefully while somebody else is writing my story? The wrong story. With lies and fake promises.
Dear stranger, thinking that you are a master manipulator and everything is working out as you planned is nothing but also one of your cheap lies. These strangers are cheap people, and you deserve nothing, but each other.
Is this what I want? Is this where I am going? I don't know yet, because I am still on the surface… On the surface of the fluid, swimming, trying not to drown. Because to go the deeper, I will have to hold my breath…To write this story, I will have to go deeper inside. But it will be my story now.


More evidence was released this week suggesting that the days of sitting-at-a-desk, full-monitor web site experiences are waning.
The Pew Internet and American Life Project published its latest research that shows roughly 63% of American cell phone users access the internet with their cellphones. That translates to more than half of all American adults. And of those who access the internet via cell phones, more than a third say it is the primary way in which those cellphone owners access the internet.
Perhaps the next round of questions should ask why isn't everyone accessing the internet through their cellphones?
The timing of Pew research is perfect, with the breathless launch of the new iPhone 5s and 5c devices — and their new iOS7 — starting this week. Smartphones are the new standard "telephone" device, but even more they have become personal expressions of our independence and mobility — literally extensions of our personality.
Indeed, smartphones seemingly more than ever are emphasizing the "personal" in the personal communications.
So what does that mean for the transportation communicator? There are probably three ideas that stand out, and a million more that follow these.
1. Our sense of online "space" must change as quickly as possible. Candidly, our entire industry needs to grapple with how we share information that for the last decade has just been "thrown" up on the agency website. Different smartphones and tablet devices view the standard websites differently. Those who are not carefully viewing their online properties through this changing lens will find their outreach program lacking.
2. The customer "experience" is uniquely different for smartphone users. Just ask the hospitality industry — airlines in particular — about what smartphones have done for consumers. Bad service? Rude flight attendant? The complaints land on Twitter faster than you can say, "6 second Vine video." Transportation agencies must begin to grapple with this sense of timelessness. Customers — your pedestrians, drivers, cyclists and riders — increasingly expect instantaneous responses, regardless of the time or day.
3. What we know today may not be true tomorrow. This is a fluid time with new technologies and habits evolving almost in real-time. Our best strategies for engagement now might be obsolete next year. Or not. That is why your communication program should be experimenting with new tools and techniques, even on a very small level, to ensure you are not left behind. After all, this is your brand and your agency's reputation – its future funding outlook – that is at stake.
The evolution of smartphones as the ultimate extension of our personalities leaves those of us in transportation communications with a very real reality. The customer will not longer expect to communicate with a bureaucracy. Rather, the person with the smartphone will expect to communicate with your organization as a person.
Transportation is no longer run by bureaucracy. Instead, transportation agencies are an extension of the individual's personal information network.
Thanks for your insights here. I just returned to the transportation industry after a two year hiatus in university fundraising. I kept riding transit throughout that period, and have observed how the smartphone and ever sophisticated feature (dumb) phones have changed expectations and experiences.
Customers increasingly rightfully expect that they can access self-service options. They want to fulfill tasks and access information via applications and mobile-responsive websites. It's not realistic or appealing to call in for information or to make complaints by phone or via email on a mobile device (I know people who wrote long epic emails on their Blackberries but not more than 140 character tweets on their touch-screen devices). And you're right, they will document everything on their cameras.It's an exciting time to be a transportation communicator, in my opinion!