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
| private async Task HandleCommand(SocketMessage messageParam) | |
| { | |
| var message = messageParam as SocketUserMessage; | |
| if (message == null) return; | |
| var argPos = 0; | |
| if (!(message.HasCharPrefix('.', ref argPos) || | |
| message.HasMentionPrefix(_discord.CurrentUser, ref argPos)) || message.Author.IsBot) return; |
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
| private static async Task CommandExecutedAsync(Optional<CommandInfo> command, ICommandContext context, | |
| IResult result) | |
| { | |
| if (!command.IsSpecified) return; | |
| if (result.IsSuccess) return; | |
| if (result.ErrorReason == "The input text has too few parameters.") | |
| await context.Channel.SendMessageAsync( | |
| $"***.{command.Value.Name}*** is missing parameters. Use ***.help*** for more information."); |
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
| IEnumerable<List<string>> table = playerDoc.DocumentNode | |
| .SelectSingleNode($"//*[@id='lg_team_user_leagues-{leagueId}']/div[4]/table/tbody") | |
| .Descendants("tr") | |
| .Skip(1) | |
| .Where(tr => tr.Elements("td").Count() > 1) | |
| .Select(tr => tr.Elements("td").Select(td => td.InnerText.Trim()) | |
| .Where(td => td.Contains("Reg")).ToList()) | |
| .ToList(); |
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
| foreach (var careerStats in findCareerNode) | |
| { | |
| if (WebUtility.HtmlDecode(careerStats | |
| .SelectSingleNode($"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[1]").InnerText).Trim() != seasonId) | |
| { | |
| index++; | |
| continue; | |
| }else if (WebUtility.HtmlDecode(careerStats | |
| .SelectSingleNode( | |
| $"//*[@id='lg_team_user_leagues-{leagueId}']/div[{div}]/table/tbody/tr[{index}]/td[2]") |
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
| List<List<string>> table = playerDoc.DocumentNode | |
| .SelectSingleNode($"//*[@id='lg_team_user_leagues-{leagueId}']/div[4]/table/tbody") | |
| .Descendants("tr") | |
| .Skip(1) | |
| //.Where(tr => tr.Elements("td").Count() > 1) | |
| .Select(tr => tr.Elements("td") | |
| .Select(td => td.InnerText.Trim()).ToList()) | |
| .ToList(); |
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
| /*** MONITORR CUSTOM CSS ***/ | |
| /* NOTE: See wiki for detailed instructions/examples. | |
| + After applying custom CSS, clearing browser cache and reloading the Monitorr UI may be necessary. | |
| + Add "!important" to all CSS properties */ | |
| /* add custom CSS below this line */ | |
| *{box-sizing: content-box !important;} |
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
| dependencies { | |
| compile fileTree(dir: 'libs', include: ['*.jar']) | |
| compile 'com.github.gabrielemariotti.changeloglib:library:1.5.1' | |
| compile 'com.android.support:appcompat-v7:+' | |
| } |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace NHLScraper.Data_Providers | |
| { | |
| public class TeamDataProvider | |
| { |
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
| using System; | |
| using System.Data.SqlServerCe; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Xml.Linq; | |
| using HtmlAgilityPack; | |
| namespace NHLScraper | |
| { |
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 cells = htmlDoc.DocumentNode | |
| .SelectNodes("//table[@class='data stats']/tbody/tr") | |
| .Select(node => new { playerRank = node.InnerText.Trim()}) | |
| .ToList(); | |
| foreach (var cell in cells) | |
| { | |
| Console.WriteLine("Rank: " + cell.playerRank); | |
| Console.WriteLine(); | |
| } |
NewerOlder