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
// Generated by CoffeeScript 1.7.1 | |
(function() { | |
var SearchView, searchView, | |
__hasProp = {}.hasOwnProperty, | |
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; | |
SearchView = (function(_super) { | |
__extends(SearchView, _super); | |
function SearchView() { |
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
class SearchView extends Backbone.View | |
el: $ '#submitbtn' | |
initialize: -> | |
_.bindAll @, "searchStart", "makeSelectedTextHighLight" | |
@.collection = new Dichelp.Collections.SelectedWords | |
@.sources = Dichelp.Collections.WebAPIs | |
return undefined | |
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
Refresh Android mediastore using adb | |
up vote | |
3 | |
down vote | |
favorite | |
1 | |
I'm using adb to sync music on an android phone. Essentially, I rm the existing music directory and push replacement music files. | |
I'd like to be able to use adb to force a rescan, so that the google music player (and other apps) works properly with the new songs and playlists. |
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
<receiver | |
android:name="com.lzy.music.widget.MusicWidgetProvider" | |
android:label="@string/app_name" > | |
<intent-filter> | |
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> | |
<action android:name="com.lzy.music.broadcast" /> | |
</intent-filter> | |
<meta-data | |
android:name="android.appwidget.provider" |
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
Intent playpause = new Intent(context, MusicPlayerService.class); | |
playpause.putExtra(MusicPlayerService.REQUEST_TYPE, MusicPlayerService.PLAY_PAUSE); | |
playpause.putExtra("from_widget", true); | |
PendingIntent pendingIntent4 = PendingIntent.getService(context, 0, playpause, | |
PendingIntent.FLAG_UPDATE_CURRENT); | |
views.setOnClickPendingIntent(R.id.playpause, pendingIntent4); | |
Intent prev = new Intent(context, MusicPlayerService.class); | |
prev.putExtra("from_widget", true); | |
prev.putExtra(MusicPlayerService.REQUEST_TYPE, MusicPlayerService.REWIND); |
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.lzy.music.parts; | |
/* | |
* Copyright (C) 2013 TInoue | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
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
# coding:utf-8 | |
import heapq | |
import time | |
current_milli_time = lambda: int(round(time.time() * 1000)) | |
timeStart = current_milli_time() | |
class State: | |
def __init__(self, initialCost, routeArray, visitedNodeArray, costArray): |
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 java.io.BufferedInputStream; | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.InputStreamReader; | |
import java.net.URI; | |
import java.net.URISyntaxException; | |
import java.net.URLDecoder; | |
import java.util.ArrayList; | |
import java.util.List; |
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
(function () { | |
window.CodeIq = { | |
}; | |
var c = CodeIq; | |
c.Stack = function Stack() { | |
this.__a = new Array(); |
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 | |
if (! defined ( 'BASEPATH' )) | |
exit ( 'No direct script access allowed' ); | |
require_once APPPATH . '/third_party/src/Mustache/Autoloader.php'; | |
Mustache_Autoloader::register (); | |
/** | |
* helper library for Mustache. | |
* This library must be located in third_party folder. | |
* You can use like this: |
NewerOlder