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 android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener { | |
public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName(); | |
private int previousTotal = 0; // The total number of items in the dataset after the last load | |
private boolean loading = true; // True if we are still waiting for the last set of data to load. | |
private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more. | |
int firstVisibleItem, visibleItemCount, totalItemCount; |
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
using System; | |
using System.Collections.Generic; | |
using Windows.Security.Credentials; | |
namespace utilities | |
{ | |
class PasswordVault_Utility | |
{ | |
const int ElementNotFound = unchecked((int)0x80070490); | |
//private resource = "www.example.com"; | |
//private userName = "userName"; |
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
using System; | |
using System.Threading.Tasks; | |
using Windows.Data.Json; | |
using Windows.Security.Authentication.Web; | |
using Windows.Web.Http; | |
namespace WabCS | |
{ | |
class WebAuthenticationBroker_Facebook_Utility | |
{ |
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
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
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
/// <binding AfterBuild='build' Clean='clean' /> | |
"use strict"; | |
var path = require('path'); | |
var gulp = require('gulp'); | |
var del = require('del'); | |
var typescript = require('gulp-typescript'); | |
var inlineNg2Template = require('gulp-inline-ng2-template'); | |
var sourcemaps = require('gulp-sourcemaps'); |
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
/* Gobal settings */ | |
var calId = "YOUR_CALENDAR_ID"; | |
var alertEmail = 'YOUR_EMAIL_ADDRESS'; | |
var sheetName = 'Holiday'; | |
/* | |
* FIXME: handle rows being deleted from the spreadsheet - right now they will | |
* stay in the calendar if that happens | |
*/ |
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
// | |
// ViewController.swift | |
// DoReMi | |
// | |
// Created by Jason Schatz on 11/18/14. | |
// Copyright (c) 2014 Udacity. All rights reserved. | |
// | |
import UIKit | |
import Foundation |
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
Auth.SetUserCredentials("CONSUMER_KEY", "CONSUMER_SECRET", "ACCESS_TOKEN", "ACCESS_TOKEN_SECRET"); | |
var user = Tweetinvi.User.GetUserFromScreenName("osman_elrashid"); | |
RateLimit.RateLimitTrackerMode = RateLimitTrackerMode.TrackAndAwait; | |
var lists = user.GetOwnedLists(Int32.MaxValue); | |
var followerIds = user.GetFollowerIds(Int32.MaxValue); | |
var friendIds = user.GetFriendIds(Int32.MaxValue); | |
var followersCount = followerIds.Count(); | |
var friendsCount = friendIds.Count(); | |
var followersFlowingBack = followerIds.Where(x => friendIds.Contains(x) ).Count(); |
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
sudo pcmanfm | |
//#http://linuxcommand.org/lc3_lts0020.php | |
pi@raspberrypi:~ $ cd Downloads | |
//#http://unix.stackexchange.com/questions/210185/download-file-from-internet-to-server-using-ssh | |
//#http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX | |
wget https://download3.ebz.epson.net/dsc/f/03/00/05/12/63/134fae46183afb544b9276c4e5477187635fc90c/epson-printer-utility_1.0.0-1lsb3.2_i386.deb | |
wget https://download3.ebz.epson.net/dsc/f/03/00/03/45/41/03f073cf68f9ee0350a121671ff2a1ea13fb24ef/epson-inkjet-printer-201401w_1.0.0-1lsb3.2_i386.deb | |
//#http://tutorialforlinux.com/2016/02/07/how-to-install-epson-l220l222-printer-driver-software-utility-on-ubuntu-linux/ | |
sudo apt-get install gdebi |
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
DateTime date = DateTime.Now; | |
//01 | |
DateTime dateutc01 = date.ToUniversalTime() ; | |
//or | |
//02 | |
DateTime dateutc02 = TimeZoneInfo.ConvertTimeToUtc(date); | |
//or | |
//be careful you are getting a new Date tIme | |
//03 | |
DateTime dateutc03 = DateTime.UtcNow |
OlderNewer