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
| module Main exposing (..) | |
| import Html exposing (Html, text, img, div) | |
| import Html.Attributes exposing (src) | |
| sampleText : String | |
| sampleText = | |
| "Once during your turn (before you attack), you may turn all basic Energy attached to all of your Pokémon into Fire Energy for the rest of the turn. This power can't be used if Charizard is affected by a Special Condition." |
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
| card = Card.first # as an example | |
| card.card_set_id = CardSet.find_by(:name => card.set).id | |
| card.save | |
| # => ActiveRecord::RecordInvalid: Validation failed: Card set must 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
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| my $lyric_file = $ARGV[0]; | |
| my @unique_words = []; | |
| my $total_words = 0; | |
| open(my $lyrics, '<:encoding(UTF-8)', $lyric_file) | |
| or die "Could not open file '$lyric_file' $!"; |
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
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| sub create_hash { | |
| my %hash; | |
| my @keys = "@{$_[0]}"; | |
| my @values = "@{$_[1]}"; | |
| foreach my $i (0 .. $#keys) { |
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
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| sub read_line { | |
| our %hash; | |
| my @list = split(" ", shift); | |
| foreach my $word (@list) { | |
| $hash{$word}++; |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>Immutable</title> | |
| </head> | |
| <body> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/immutable/3.8.1/immutable.min.js"></script> | |
| <script> | |
| const lyrics = "Another dream that will never come true Just to compliment your sorrow Another life that I've taken from you A gift to add on to your pain and suffering Another truth you can never believe Has crippled you completely All the cries you're beginning to hear Trapped in your mind, and the sound is deafening Let me enlighten you This is the way I pray Living just isn't hard enough Burn me alive, inside Living my life's not hard enough Take everything away Another nightmare about to come true Will manifest tomorrow Another love that I've taken from you Lost in time, on the edge of suffering Another taste of the evil I breed Will level you completely Bring to life everything that you fear Live in the dark, and the world is threatening Let me enlighten you This is the way i pray Liv |
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 adminRouter = require('../config/routers')().adminRouter; | |
| var Book = require('../data/models/bookModel'); | |
| var db = require('../data/db')(); | |
| var adminController = function() { | |
| var books = [ | |
| { | |
| title: 'War and Peace', | |
| author: 'Lev Nikolayevich Tolstoy', | |
| genre: 'Historical Fiction', |
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
| <?php declare(strict_types = 1); | |
| namespace CMS\Data; | |
| include_once(__DIR__ . '/../helpers/array.php'); | |
| /** | |
| * Database class that handles all database connections and related actions. | |
| * | |
| * @param $user The connecting user | |
| * @param $pass Password for the $user |
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
| {-# LANGUAGE | |
| OverloadedStrings | |
| , DeriveGeneric | |
| #-} | |
| module Lib where | |
| import Prelude as P | |
| import Data.Aeson | |
| import Data.Text |
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
| /// This is a very basic HTTP Controller for the Aqueduct Dart web framework | |
| /// [https://aqueduct.io/] | |
| import 'dart:async'; | |
| import 'dart:io'; | |
| import 'package:aqueduct/aqueduct.dart'; | |
| import 'package:faker/faker.dart'; | |
| const Faker faker = Faker(); |