This file contains 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
// based on https://www.youtube.com/watch?v=iSNsgj1OCLA | |
const std = @import("std"); | |
const Strategy = fn (my_num: u32, boxes: [100]u32, random: std.rand.Random) bool; | |
fn searchRandom(my_num: u32, boxes: [100]u32, random: std.rand.Random) bool { | |
var i: u32 = 0; | |
var tried = [_]bool{false} ** 100; | |
while (i < 50) : (i += 1) { | |
const guess = blk: { |
This file has been truncated, but you can view the full file.
This file contains 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
{"requestedUrl":"https://www.cnx-software.com/2021/11/18/save-the-planet-program-in-c-avoid-python-perl/","finalUrl":"https://www.cnx-software.com/2021/11/18/save-the-planet-program-in-c-avoid-python-perl/","lighthouseVersion":"9.0.0","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/95.0.4638.69 Safari/537.36","fetchTime":"2021-11-19T07:42:24.369Z","environment":{"networkUserAgent":"Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4695.0 Mobile Safari/537.36 Chrome-Lighthouse","hostUserAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/95.0.4638.69 Safari/537.36","benchmarkIndex":888.5},"runWarnings":[],"configSettings":{"emulatedFormFactor":"mobile","formFactor":"mobile","locale":"en-US","onlyCategories":["performance","accessibility","best-practices","seo"],"channel":"lr"},"audits":{"screenshot-thumbnails":{"id":"screenshot-thumbnails","title":"Screenshot Thumbnails","d |
This file contains 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
def binary_to_decimal_iterative(binary): | |
total = 0 | |
for i in range(len(binary)): | |
if binary[i] == '1': | |
pass | |
return total |
This file contains 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
/***************** | |
* bossFight.js * | |
***************** | |
* | |
* NO FARTHER, DR. EVAL!!!! | |
* YOU WILL NOT GET OUT OF HERE ALIVE!!!! | |
* IT'S TIME YOU SEE MY TRUE FORM!!!! | |
* FACE MY ROBOT WRATH!!!!! | |
*/ |
This file contains 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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains 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
0 info it worked if it ends with ok | |
1 verbose cli [ 'node', '/usr/bin/npm', 'install', '--save', 'gui' ] | |
2 info using [email protected] | |
3 info using [email protected] | |
4 verbose node symlink /usr/bin/node | |
5 verbose install initial load of /home/ben/code/gui/test/package.json | |
6 warn package.json @ No description | |
7 warn package.json @ No repository field. | |
8 warn package.json @ No README data | |
9 warn package.json @ No license field. |
This file contains 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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |