Challenge Write a function that will take a key of X and place it in the middle of Y repeated N times.
Rules: If X cannot be placed in the middle, return X. N will always be > 0.
(ns test.core
(:gen-class))
#lang racket/gui | |
(define f (new (class frame% | |
(super-new)) | |
[label "Scritch"] | |
[width 800] | |
[height 600])) | |
(define c (new editor-canvas% [parent f])) | |
(define t (new text%)) | |
(send c set-editor t) | |
(send f show #t) |
TEST_VAR="TEST ENVIRONMENT VAR" |
{ | |
"global": { | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": false, | |
"unsafe_ui": false | |
}, | |
"profiles": [ | |
{ | |
"complex_modifications": { |
//------------------------------------------ | |
#include "textures.inc" | |
plane { <0,1,0>,0 | |
pigment { | |
Tiles_Ptrn() | |
color_map{ | |
[0.00 color rgb <0,1,0>] // lines | |
[0.04 color rgb <0,0,0,1>] // space | |
} |
const uuid = require('uuid/v1'); | |
export default class DoubleLinkedList { | |
list; | |
currentItemId; | |
constructor(items) { | |
this.setList(items); | |
} |
package; | |
import flixel.FlxState; | |
import flixel.input.mouse.FlxMouseEventManager; | |
import flixel.input.mouse.FlxMouseButton.FlxMouseButtonID; | |
class PlayState extends FlxState | |
{ | |
var player:Player; | |
override public function create() |
Challenge Write a function that will take a key of X and place it in the middle of Y repeated N times.
Rules: If X cannot be placed in the middle, return X. N will always be > 0.
(ns test.core
(:gen-class))
defmodule MatchStickFactory do | |
def boxes(number_of_matches) do | |
number_of_matches_in_big = 50; | |
number_of_matches_in_medium = 20; | |
number_of_matches_in_small = 5; | |
number_of_matches_remaining = number_of_matches; | |
{number_of_big_boxes, number_of_matches_remaining} = divide(number_of_matches_remaining, number_of_matches_in_big) | |
{number_of_medium_boxes, number_of_matches_remaining} = divide(number_of_matches_remaining, number_of_matches_in_medium) | |
{number_of_small_boxes, number_of_matches_remaining} = divide(number_of_matches_remaining, number_of_matches_in_small) |
apply_tax = fn price -> tax = (price * 0.12); total = price + tax;IO.puts "Price: #{total} - Tax: #{tax}" end; | |
Enum.each [12.5, 30.99, 250.49, 18.80], apply_tax |
<?php | |
$yodiz_columns = [ | |
[ | |
'title'=>'Position', | |
'from_done_done' =>2 | |
], | |
[ | |
'title'=>'Id', | |
'from_done_done'=>2, |