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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
class Follow extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
password: 'huraji', | |
authorized: false | |
}; |
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(){ | |
var position; | |
var width = $(window).width(); | |
var position = $(this).scrollTop(); | |
$(document).scroll(function() { | |
var currentScroll = $(this).scrollTop(); | |
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
add_filter( 'woocommerce_blocks_product_grid_item_html', 'filter_product_block', 10, 3); | |
function filter_product_block( $html, $data, $product ) | |
{ | |
$html = '<li class="wc-block-grid__product"> | |
<div class="image-wrap"> | |
<a href="' . $data->permalink . '" class="wc-block-grid__product-link">' . $data->image . '</a> | |
' . $data->button . ' | |
</div> | |
<h3><a href="' . $data->permalink . '">' . $data->title . '</a></h3> | |
' . $data->badge . ' |
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 | |
/** | |
* Filter out unlucky numbers from a range | |
*/ | |
$n = 50; | |
/** | |
* Imperative approach | |
*/ |
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
$spaces: 20; | |
@mixin margin($size) { | |
margin: $size + rem; | |
} | |
@mixin margin-top($size) { | |
margin-top: $size + rem; | |
} | |
@mixin margin-left($size) { | |
margin-left: $size + rem; | |
} |
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 | |
$play_count = 0; | |
$correct_guesses = 0; | |
$guess_high = 0; | |
$guess_low = 0; | |
echo "I'm going to think of numbers between 1 and 10 (inclusive). Do you think you can guess correctly?\n"; | |
function guessNumber() { |
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 | |
function magic8Ball() | |
{ | |
echo "Ok, what's your question?\n"; | |
$question = readline(">"); | |
echo "\nHmm so question your queston is ${question}... I have consulted the spirit world.\nHere is your answer: "; | |
$magicN = rand(0, 19); | |
switch($magicN){ | |
case 0: |
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 | |
$gryffindor = 0; | |
$hufflepuff = 0; | |
$ravenclaw = 0; | |
$slytherin = 0; | |
//$answer1, $answer2, $answer3; | |
echo "================\nThe Sorting Hat!\n================\n\n"; |
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 | |
$annualExpenses = [ | |
"vacations" => 1000, | |
"carRepairs" => 1000, | |
]; | |
$monthlyExpenses = [ | |
"rent" => 1500, | |
"utilities" => 200, |
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 /** | |
* Single Product Thumbnails | |
* | |
* @param array $args | |
* @param int $attachment_id | |
* @param string $image_size | |
* @param bool $main_image | |
* @return array | |
*/ | |
function bones_gallery_image_html_attachment_image_params ( $args, $attachment_id, $image_size, $main_image ) |