Skip to content

Instantly share code, notes, and snippets.

View bumble-bee-chuna's full-sized avatar

Bee bumble-bee-chuna

  • Anchorage, Alaska
View GitHub Profile
@bumble-bee-chuna
bumble-bee-chuna / gist:b33b9b7dae75be8dcd68
Last active August 29, 2015 14:19
Pretty-Print File Containing JSON in Terminal
#requires Python 2.6 or above
echo "$(cat nameOfYourFile.js)" | python -m json.tool
@bumble-bee-chuna
bumble-bee-chuna / gist:695810cc9535a9734878
Created April 24, 2015 14:20
cx_Oracle install error log
Downloading/unpacking cx-Oracle#!/usr/bin/python
Running setup.py egg_info for package cx-Oracle
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip-build-root/cx-Oracle/setup.py", line 183, in <module>
@bumble-bee-chuna
bumble-bee-chuna / gist:af5099dc44319a88e23f
Last active February 26, 2016 11:31
Best tutorials
Best tutorials EVER:
Print Oracle SQL Developer Result to CSV
http://stackoverflow.com/questions/4168398/how-to-export-query-result-to-csv-in-oracle-sql-developer
Install cx_Oracle on RHEL Linux machine... a GOD SEND:
http://ubuntugeeknerd.blogspot.com/2013/08/how-to-install-oxoracle-in-rhel-64-bit.html
@bumble-bee-chuna
bumble-bee-chuna / gist:65b780537b60750b1b05
Created July 16, 2015 15:03
spring integration error
Error creating bean with name 'storeCampaignInfoTasklet' defined in class path resource [config/batch/marketing-campaign-spring-object-config.xml]: Cannot resolve reference to bean 'campaignInfoFileReader' while setting bean property 'delegateReader'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'campaignInfoFileReader': Scope 'step' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No context holder available for step scope
<bean id="stgMktngCampaignFileReader" class="org.springframework.batch.item.file.FlatFileItemReader"
abstract="true" lazy-init="true" scope="step">
<property name="resource" value="#{jobParameter[input.file]}" />
<property name="linesToSkip" value="1" />
</bean>
<bean id="campaignInfoFileReader" parent="stgMktngCampaignFileReader">
<!-- LINE MAPPER -->
<property name="lineMapper">
<bean class="org.springframework.batch.item.file.mapping.DefaultLineMapper">
@bumble-bee-chuna
bumble-bee-chuna / gist:a456f9e5b0332075f55b
Created July 21, 2015 13:16
Error thrown setting reader scope to "step"
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storeCampaignInfoTasklet' defined in class path resource [config/batch/marketing-campaign-spring-object-config.xml]: Cannot resolve reference to bean 'campaignInfoFileReader' while setting bean property 'delegateReader'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'campaignInfoFileReader': Scope 'step' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No context holder available for step scope
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:326)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
at org.springframework.beans.factory.support.Abs
@bumble-bee-chuna
bumble-bee-chuna / Time Complexity question
Last active November 9, 2015 23:16
How does the powerlaw ( aN^b ) relate to a log-log run time ( lg(T(N)) = b lg N + c )?
The following data is given for the run time of a program:
https://d2gne97vdumgn3.cloudfront.net/api/file/XF3gUiIRRh2321KcJHbO
And then is graphed in a log-log scale graph and through compressing it for a log-log scale graph,
has a slope of 3.
https://d2gne97vdumgn3.cloudfront.net/api/file/n3GlkRKWSg6V1EyKAzOj
The formula for the line can then be described as:
log(T(N)) = b lg N + c
package com.example.beckah.helloworld;
import android.support.v4.app.FragmentActivity;
import android.os.Bundle;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.beckah.helloworld">
<!--
The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
Google Maps Android API v2, but you must specify either coarse or fine
location permissions for the 'MyLocation' functionality.
-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<FrameLayout 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"
tools:context=".MapActivity" >
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/map"