-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated Sample Programs website automatically
on-behalf-of: @TheRenegadeCoder <jeremy.grifski@therenegadecoder.com>
- Loading branch information
1 parent
930a6e5
commit 85b49e3
Showing
7 changed files
with
128 additions
and
10 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
authors: | ||
- rzuckerm | ||
date: 2024-12-23 | ||
featured-image: baklava-in-every-language.jpg | ||
last-modified: 2024-12-23 | ||
layout: default | ||
tags: | ||
- baklava | ||
- ocaml | ||
title: Baklava in Ocaml | ||
--- | ||
|
||
<!-- | ||
AUTO-GENERATED -- PLEASE DO NOT EDIT! | ||
Instead, please edit the following: | ||
- sources/programs/baklava/ocaml/how-to-implement-the-solution.md | ||
- sources/programs/baklava/ocaml/how-to-run-the-solution.md | ||
See .github/CONTRIBUTING.md for further details. | ||
--> | ||
|
||
Welcome to the [Baklava](https://sampleprograms.io/projects/baklava) in [Ocaml](https://sampleprograms.io/languages/ocaml) page! Here, you'll find the source code for this program as well as a description of how the program works. | ||
|
||
## Current Solution | ||
|
||
{% raw %} | ||
|
||
```ocaml | ||
(** https://rosettacode.org/wiki/Repeat_a_string#OCaml **) | ||
let string_repeat n s = | ||
String.concat "" (Array.to_list (Array.make n s));; | ||
for n = -10 to 10 do | ||
let num_spaces = abs n in | ||
let num_stars = 21 - 2 * num_spaces in | ||
Printf.printf "%s%s\n" (string_repeat num_spaces " ") (string_repeat num_stars "*"); | ||
done | ||
``` | ||
|
||
{% endraw %} | ||
|
||
Baklava in [Ocaml](https://sampleprograms.io/languages/ocaml) was written by: | ||
|
||
- rzuckerm | ||
|
||
If you see anything you'd like to change or update, [please consider contributing](https://github.com/TheRenegadeCoder/sample-programs). | ||
|
||
## How to Implement the Solution | ||
|
||
No 'How to Implement the Solution' section available. [Please consider contributing](https://github.com/TheRenegadeCoder/sample-programs-website). | ||
|
||
## How to Run the Solution | ||
|
||
No 'How to Run the Solution' section available. [Please consider contributing](https://github.com/TheRenegadeCoder/sample-programs-website). |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
authors: | ||
- rzuckerm | ||
date: 2024-12-23 | ||
featured-image: baklava-in-every-language.jpg | ||
last-modified: 2024-12-23 | ||
layout: default | ||
tags: | ||
- baklava | ||
- octave | ||
title: Baklava in Octave | ||
--- | ||
|
||
<!-- | ||
AUTO-GENERATED -- PLEASE DO NOT EDIT! | ||
Instead, please edit the following: | ||
- sources/programs/baklava/octave/how-to-implement-the-solution.md | ||
- sources/programs/baklava/octave/how-to-run-the-solution.md | ||
See .github/CONTRIBUTING.md for further details. | ||
--> | ||
|
||
Welcome to the [Baklava](https://sampleprograms.io/projects/baklava) in [Octave](https://sampleprograms.io/languages/octave) page! Here, you'll find the source code for this program as well as a description of how the program works. | ||
|
||
## Current Solution | ||
|
||
{% raw %} | ||
|
||
```octave | ||
function baklava() | ||
for n = -10:10 | ||
num_spaces = abs(n); | ||
num_stars = 21 - 2 * num_spaces; | ||
disp([repmat(' ', 1, num_spaces), repmat('*', 1, num_stars)]); | ||
end | ||
end | ||
``` | ||
|
||
{% endraw %} | ||
|
||
Baklava in [Octave](https://sampleprograms.io/languages/octave) was written by: | ||
|
||
- rzuckerm | ||
|
||
If you see anything you'd like to change or update, [please consider contributing](https://github.com/TheRenegadeCoder/sample-programs). | ||
|
||
## How to Implement the Solution | ||
|
||
No 'How to Implement the Solution' section available. [Please consider contributing](https://github.com/TheRenegadeCoder/sample-programs-website). | ||
|
||
## How to Run the Solution | ||
|
||
No 'How to Run the Solution' section available. [Please consider contributing](https://github.com/TheRenegadeCoder/sample-programs-website). |