This file contains 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.orm.SugarRecord; | |
/** | |
* Created by mike on 29/06/14. | |
*/ | |
public class HashTagEnry extends SugarRecord<JournalEntry> { | |
String tag; | |
JournalEntry entry; | |
public HashTagEnry() { |
This file contains 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.omnibuttie.therable.model; | |
import com.orm.SugarRecord; | |
/** | |
* Created by mike on 29/06/14. | |
*/ | |
public class HashTagEntry extends SugarRecord<JournalEntry> { | |
String tag; | |
JournalEntry entry; |
This file contains 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
public void doPost() { | |
Pattern tagMatcher = Pattern.compile("[#]+[A-Za-z0-9-_]+\\b"); | |
Matcher m = tagMatcher.matcher(sourcetext); | |
List<String> tokens = new ArrayList<String>(); | |
while(m.find()) { | |
String token = m.group(); | |
tokens.add(token); | |
} | |
This file contains 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
public void doPost() { | |
// get hashtags and return into tokens | |
Pattern tagMatcher = Pattern.compile("[#]+[A-Za-z0-9-_]+\\b"); | |
Matcher m = tagMatcher.matcher(statusText.getText().toString()); | |
List<String> tokens = new ArrayList<String>(); | |
while(m.find()) { | |
String token = m.group(); | |
tokens.add(token); | |
} |
This file contains 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
06-29 17:22:08.069 19637-19653/com.omnibuttie.therable D/SQL Log﹕ SQLiteQuery: SELECT * FROM JOURNAL_ENTRY WHERE is_archived = ? ORDER BY date_modified desc | |
06-29 17:22:09.439 19637-19637/com.omnibuttie.therable W/Bundle﹕ Key JournalID expected Long but value was a java.lang.Integer. The default value -1 was returned. | |
06-29 17:22:09.439 19637-19637/com.omnibuttie.therable W/Bundle﹕ Attempt to cast generated internal exception: | |
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long | |
at android.os.Bundle.getLong(Bundle.java:1034) | |
at android.content.Intent.getLongExtra(Intent.java:4575) | |
at com.omnibuttie.therable.views.Composer.onCreate(Composer.java:59) | |
at android.app.Activity.performCreate(Activity.java:5231) | |
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) | |
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159) |
This file contains 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
for (int i = 0; i < tokens.size(); i++) { | |
HashTagEntry hashtagEntry = new HashTagEntry(); | |
hashtagEntry.setTag(tokens.get(i)); | |
hashtagEntry.setEntry(journalEntry); | |
hashtagEntry.save(); | |
} |
This file contains 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
06-29 18:25:14.149 21815-21815/com.omnibuttie.therable W/Bundle﹕ Key JournalID expected Long but value was a java.lang.Integer. The default value -1 was returned. | |
06-29 18:25:14.159 21815-21815/com.omnibuttie.therable W/Bundle﹕ Attempt to cast generated internal exception: | |
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long | |
at android.os.Bundle.getLong(Bundle.java:1034) | |
at android.content.Intent.getLongExtra(Intent.java:4575) | |
at com.omnibuttie.therable.views.Composer.onCreate(Composer.java:59) | |
at android.app.Activity.performCreate(Activity.java:5231) | |
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) | |
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159) | |
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) |
This file contains 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
07-02 20:11:20.701 12412-12462/com.omnibuttie.therable E/CursorWindow﹕ Failed to read row 0, column -1 from a CursorWindow which has 2 rows, 7 columns. | |
07-02 20:11:20.711 12412-12462/com.omnibuttie.therable E/CursorWindow﹕ Failed to read row 1, column -1 from a CursorWindow which has 2 rows, 7 columns. | |
07-02 20:11:25.441 12412-12412/com.omnibuttie.therable D/SQL Log﹕ SQLiteQuery: SELECT * FROM JOURNAL_ENTRY WHERE id=? LIMIT 1 | |
07-02 20:11:25.451 12412-12412/com.omnibuttie.therable E/CursorWindow﹕ Failed to read row 0, column -1 from a CursorWindow which has 1 rows, 7 columns. | |
07-02 20:11:25.491 12412-12412/com.omnibuttie.therable D/dalvikvm﹕ GC_FOR_ALLOC freed 32K, 1% free 22713K/22780K, paused 13ms, total 14ms | |
07-02 20:11:25.491 12412-12412/com.omnibuttie.therable I/dalvikvm-heap﹕ Grow heap (frag case) to 24.699MB for 2609296-byte allocation | |
07-02 20:11:25.511 12412-12421/com.omnibuttie.therable D/dalvikvm﹕ GC_FOR_ALLOC freed 2K, 1% free 25259K/25332K, paused 21ms, total 21ms | |
07-02 20:11:25.641 12412- |
This file contains 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 View.OnTouchListener mGestureListener; | |
private GestureDetector mGestureDetector; | |
public CustomViewPager(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
mGestureDetector = new GestureDetector(context, new Detector()); | |
} |
This file contains 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 | |
$path = $_SERVER['SCRIPT_FILENAME']; | |
$path = explode('/', $path); | |
$path = "/{$path[1]}/{$path[2]}/{$path[3]}/{$path[4]}/{$path[5]}"; | |
$_SERVER['DOCUMENT_ROOT'] = $path; | |
?> |
OlderNewer