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 | |
// API access key from Google API's Console | |
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
$registrationIds = array( $_GET['id'] ); | |
// prep the bundle | |
$msg = 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
package com.ideaplay.sharee.utility; | |
import java.util.ArrayList; | |
public class ListItem { | |
private String contributorImageUrl; | |
private String itemTitle; | |
private String itemContent; | |
private String itemContributor; | |
private String itemPubDate; |
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
//here code before... | |
public boolean onCreateOptionsMenu(Menu menu) { | |
getSupportMenuInflater().inflate(R.menu.article_menu, menu); | |
return super.onCreateOptionsMenu(menu); | |
} | |
public boolean onOptionsItemSelected( |
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
# solution to http://beust.com/weblog/2012/09/02/coding-challenge-a-sliding-window-map/ | |
import heapq | |
import time | |
class SlidingWindowMap(object): | |
def __init__(self,api_keys,max_count,period_minutes): | |
self.period = period_minutes * 60 | |
self.pq = [] | |
for api_key in api_keys: |
NewerOlder