🏋️♂️
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 pwr.rss.reader.database.adapters | |
import android.content.Context | |
import android.database.Cursor | |
import android.support.v4.widget.SimpleCursorAdapter | |
import pwr.rss.reader.R | |
import pwr.rss.reader.database.tables.TableChannels.C_SITE | |
import pwr.rss.reader.database.tables.TableFeeds.C_ADDED_DATE | |
import pwr.rss.reader.database.tables.TableFeeds.C_IMAGE | |
import pwr.rss.reader.database.tables.TableFeeds.C_TITLE |
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 pwr.rss.reader | |
import scala.collection.mutable.HashSet | |
import com.actionbarsherlock.app.SherlockPreferenceActivity | |
import com.actionbarsherlock.view.MenuItem | |
import android.content.SharedPreferences | |
import android.content.SharedPreferences.OnSharedPreferenceChangeListener | |
import android.os.Bundle |
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 pwr.rss.reader.xml | |
import java.io.InputStream | |
import org.xmlpull.v1.XmlPullParser | |
import android.util.Xml | |
import AbstractXMLParser._ | |
import scala.collection.mutable.ListBuffer | |
import android.util.Log | |
import pwr.rss.reader.database.dao.Feed |
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 pwr.rss.reader.utils; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import android.content.res.Resources; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; |
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
private def getFragment = { | |
val fragmentsArray = fragmentManager.getClass.getDeclaredField("mAdded") | |
fragmentsArray.setAccessible(true) | |
val fragments = fragmentsArray.get(fragmentManager).asInstanceOf[ArrayList[FeedDetailsFragment]] | |
if (fragments.size == 0) null | |
else if (fragments.size == 1) fragments.get(0) | |
else fragments.get(1) | |
} |
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.example.copy; | |
import java.io.BufferedInputStream; | |
import java.io.BufferedOutputStream; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; |
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
<!doctype html> | |
<html> | |
<head> | |
<title>JavaScript RSA Encryption</title> | |
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script> | |
<script src="jsencrypt.min.js"></script> | |
<!-- https://github.com/travist/jsencrypt/tree/master/src --> | |
<script type="text/javascript"> | |
$(function() { | |
$('#testme').click(function() { |
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
- (BOOL) string2bool: (NSString*) aString { | |
NSString *normalizedString = [self normalize: aString]; | |
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern: @"(yes|true|tak|ok|right)" | |
options: NSRegularExpressionCaseInsensitive | |
error: NULL]; | |
return [regex firstMatchInString: normalizedString options: 0 range: NSMakeRange(0, normalizedString.length)]; | |
} | |
// [aString boolValue]; |
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 Hash | |
def symbolize_keys | |
inject({}) do |result, (key, value)| | |
new_key = case key | |
when String then | |
key.to_sym | |
else | |
key | |
end | |
new_value = case value |
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
-- DOCUMENTATION: http://www.postgresql.org/docs/9.3/static/queries-with.html | |
/* | |
WITH - defines auxilary stetments for larger query. Also called as 'Common Table Expressions' (CTE). | |
It can create temporary tables just for one query. | |
It is a basic CRUD statement atatched to another CRUD query. | |
*/ | |
-- SYNTAX: |
OlderNewer