This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import java.io.IOException; | |
| public static <T> T getClone(T objectToClone, Class<T> classType){ | |
| T clonedObject = null; | |
| ObjectMapper objectMapper = new ObjectMapper(); | |
| try { | |
| clonedObject = objectMapper | |
| .readValue(objectMapper.writeValueAsString(objectToClone),classType); | |
| } catch(IOException e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" | |
| android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" | |
| android:paddingRight="@dimen/activity_horizontal_margin" | |
| android:paddingTop="@dimen/activity_vertical_margin" | |
| android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity"> | |
| <TextView | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package in.codesmith.remotedroid; | |
| import android.content.Context; | |
| import android.os.AsyncTask; | |
| import android.support.v7.app.ActionBarActivity; | |
| import android.os.Bundle; | |
| import android.util.Log; | |
| import android.view.Menu; | |
| import android.view.MenuItem; | |
| import android.view.MotionEvent; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.awt.AWTException; | |
| import java.awt.Robot; | |
| import java.awt.event.InputEvent; | |
| import java.awt.event.KeyEvent; | |
| import java.awt.MouseInfo; | |
| import java.awt.Point; | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package in.codesmith.contactusexample; | |
| import android.content.Context; | |
| import android.os.AsyncTask; | |
| import android.os.Bundle; | |
| import android.support.v7.app.ActionBarActivity; | |
| import android.text.TextUtils; | |
| import android.view.View; | |
| import android.widget.Button; | |
| import android.widget.EditText; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class NewClass extends DummyClass { | |
| constructor(variableA, variableB) { | |
| super(variableA, variableB); | |
| this.id = NewClass.defaulIdGenerator(); | |
| this.elements = []; | |
| //... | |
| } | |
| update(test) { | |
| //... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ext.define('Ext.layout.override.Default', { | |
| override: 'Ext.layout.Default', | |
| removeInnerItem: function(item) { | |
| // check for valid element | |
| if (item.element !== null) { | |
| item.element.detach(); | |
| } | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| include_once('input.php'); | |
| //save each row in different variable | |
| $top_row = array(5,21,31,60,81); | |
| $mid_row = array(17,37,59,63,88); | |
| $bottom_row = array(9,39,45,77,90); | |
| if(count($input_array)<1){ | |
| //No numbers to check | |
| echo "No Input Yet!!"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.cc.example.hibernate; | |
| import java.util.Iterator; | |
| import java.util.List; | |
| import org.hibernate.HibernateException; | |
| import org.hibernate.Query; | |
| import org.hibernate.Session; | |
| import org.hibernate.SessionFactory; | |
| import org.hibernate.Transaction; | |
| import org.hibernate.cfg.Configuration; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0"?><!DOCTYPE hibernate-mapping PUBLIC | |
| "-//Hibernate/Hibernate Mapping DTD 3.0//EN" | |
| "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> | |
| <hibernate-mapping package="com.cc.example.hibernate"> | |
| <class name="com.cc.example.hibernate.Employee" table="EMPLOYEE"> | |
| <id name="id" type="long" column="ID" length="20"> | |
| <generator class="assigned"/> | |
| </id> | |
| <property name="firstName" column="FIRSTNAME" type="string" length="20"> |
NewerOlder