Fixes #
Review requested by @
val jodaDateTimeConverter = new FormConverter[DateTime] { | |
override def serialize(v: Any): String = | |
new DateTime(v).toString(ISODateTimeFormat.dateHourMinuteSecond) | |
override def deserialize(s: String): DateTime = | |
new DateTime(s.toLong) | |
} | |
FormConverter.register(classOf[DateTime], jodaDateTimeConverter) | |
ClassInfo.factories.register(classOf[DateTime], {() => DateTime.now.asInstanceOf[AnyRef]}) |
function getElementByXpath(path) { | |
return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | |
} | |
console.log( getElementByXpath("//html[1]/body[1]/div[1]") ); |
/*###################### | |
* Crittercism | |
* crittercism.com | |
######################*/ | |
JSONObject crittercismConfig = new JSONObject(); | |
JSONObject crittermeta = new JSONObject(); | |
try { | |
crittermeta.put("screen_name", "" + screen_name); | |
crittermeta.put("user_id", "" + user_id); |
# add the tracking code normally to your layout; then include this in every page | |
$(document).on 'page:change', -> | |
if window.ga? | |
ga('send', 'pageview'); | |
else if window._gaq? | |
_gaq.push(['_trackPageview']) | |
else if window.pageTracker? | |
pageTracker._trackPageview() |
package es.cloudey.pagespeed.util; | |
import java.util.HashMap; | |
import java.util.Map; | |
import android.os.Bundle; | |
import android.os.Parcelable; | |
public class CollectionUtils { | |
public static Bundle toBundle(Map<String, ? extends Parcelable> input) { |
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna! | |
([一-龯]) | |
Regex for matching Hirgana or Katakana | |
([ぁ-んァ-ン]) | |
Regex for matching Non-Hirgana or Non-Katakana | |
([^ぁ-んァ-ン]) | |
Regex for matching Hirgana or Katakana or basic punctuation (、。’) |
package com.vuzz.snapdish.test.functional; | |
import android.os.Handler; | |
import com.android.volley.Cache; | |
import com.android.volley.Request; | |
import com.android.volley.RequestQueue; | |
import com.google.android.apps.common.testing.ui.espresso.contrib.CountingIdlingResource; | |
/** | |
* A dummy request queue which enables us to use the Volley Library properly with Espresso. |
# (42f63b0de7318fe1 is a device id) | |
adb -s 42f63b0de7318fe1 shell setprop log.tag.Volley VERBOSE |