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
| var apa; | |
| var results = document.querySelectorAll('.gs_citf'); | |
| for(var i = 0; i < results.length; i++) { | |
| if(results[i].textContent == 'APA') | |
| apa = results[i]; | |
| } | |
| console.log(apa.nextSibling.querySelector('div').textContent); |
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
| function extractCite(elem, exporterName) | |
| { | |
| var apa, exporter; | |
| var results = elem.querySelectorAll('.gs_citf'); | |
| var exporters = elem.querySelectorAll('a.gs_citi'); | |
| // Find the APA row | |
| for(var i = 0; i < results.length; i++) { | |
| if(results[i].textContent == 'APA') | |
| apa = results[i]; |
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
| chrome.windows.getAll({populate: true}, function(allWindows) | |
| { | |
| console.log(allWindows); | |
| }); |
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
| $('#threadslist tr').each(function(x){ | |
| if($(this).text().toLowerCase().indexOf('charger') == -1) { | |
| $(this).hide(); | |
| } | |
| }); '' // Do not output results; |
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
| var images = document.querySelectorAll('img'); | |
| for(var x in images) { | |
| var w = parseInt(images[x].getAttribute('width')); | |
| if(w > 100) | |
| console.log(images[x].src); | |
| } |
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
| function extractContentUrlFromFlashVars(){ | |
| var segments = $('#scPlayer param[name=flashVars]').attr('value').split('&'), | |
| flashVars = {}, | |
| segment, | |
| index; | |
| for (var i = 0; i < segments.length; i++) | |
| { | |
| segment = segments[i]; | |
| index = segment.indexOf('='); |
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
| // Define the success callback for webkitRequestFileSystem() | |
| function onInitFs(fs) { | |
| // Grab each playlist element from the Rhapsody Playlists view, collect data for the playlist | |
| // then invoke the 'Add to Mixer' url to collect the playlist JSON | |
| $('#content-frame li').each(function () { | |
| // Markup template: | |
| // <li class="playlist playlist-item" href="/members/071tm1/playlists/mp.154595841" playlist_id="mp.154595841" playlist_name="2007-05"> | |
| var $this = $(this), |
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
| var context; | |
| // Define the success callback for webkitRequestFileSystem() | |
| function onInitFs(fs) { | |
| // Collect list of artists from the Rhapsody Library view. For each artist, we will request the | |
| // library details and find the albums and tracks from each. This requires an xhr foreach | |
| // and to easy the load and appear less bot like, perform requests in sequence at | |
| // random intervals | |
| context = { |
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
| /// <summary> | |
| /// Processes a given directory, grouping and listing files with duplicate content | |
| /// </summary> | |
| /// <param name="directory">The path to process</param> | |
| private void ListDuplicateFiles(string directory) | |
| { | |
| // Calculate and store the hash and path for each file in the directory | |
| var files = Directory.GetFiles(directory).Select(f => new { Path = f, Hash = FileHash.CalculateFromFile(f) }); | |
| // Group and iterate when duplicates exist |
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.hifov.remotevolumecontrol; | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| import java.net.InetAddress; | |
| import java.net.NetworkInterface; | |
| import java.net.ServerSocket; | |
| import java.net.Socket; | |
| import java.net.SocketException; | |
| import java.text.DateFormat; |