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
| int factorial_recursion(int n){ | |
| if(n < 2){ | |
| return 2; | |
| } | |
| return n * factorial_recursion(n-1) | |
| } | |
| int factorial(int n){ | |
| int m = 1; |
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 addLetters(s){ | |
| var letters = {}; | |
| for(var i = 0; i < s.length; i++){ | |
| var letter = s[i].toLowerCase(); | |
| if(letter != " "){ | |
| if(letters[letter]){ | |
| letters[letter] += 1; | |
| } else { |
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
| echo "g(i,x,t,o){return((3&x&(i*((3&i>>16?\"BY}6YB6%\":\"Qj}6jQ6%\")[t%8]+51)>>o))<<4);};main(i,n,s){for(i=0;;i++)putchar(g(i,1,n=i>>14,12)+g(i,s=i>>17,n^i>>13,10)+g(i,s/3,n+((i>>11)%3),10)+g(i,s/5,8+n-((i>>10)%3),9));}"|gcc -xc -&&./a.out|aplay |
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
| def formula_1(x): | |
| # Вычисление первой формулы | |
| n = x | |
| return n | |
| def formula_2(a, b, y): | |
| # Вычисление второй формулы | |
| n = a + b + y | |
| return 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
| function a(){ | |
| var b = 5; | |
| return { | |
| setB: function(n){ | |
| b = n; | |
| }, | |
| getB: function(){ | |
| return b | |
| } | |
| }; |
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 a(j){ | |
| console.log(j); | |
| } | |
| for(var i = 0; i < 5; i++){ | |
| a(i); | |
| } |
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
| #include <stdio.h> | |
| int* a(){ | |
| static int b = 5; | |
| return &b; | |
| } | |
| int main(){ | |
| int *b = a(); |
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 explode(d, index) { | |
| var offset = 10; | |
| var angle = (d.startAngle + d.endAngle) / 2; | |
| var xOff = Math.sin(angle) * offset; | |
| var yOff = -Math.cos(angle) * offset; | |
| return 'translate(' + xOff + ',' + yOff +')'; | |
| } | |
| arc.attr('transform', explode); |
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
| call plug#begin('~/.config/nvim/plugged') | |
| Plug 'https://github.com/flazz/vim-colorschemes' | |
| Plug 'https://github.com/scrooloose/nerdtree' | |
| Plug 'https://github.com/moll/vim-node' | |
| Plug 'https://github.com/pangloss/vim-javascript' | |
| Plug 'https://github.com/jelera/vim-javascript-syntax' | |
| call plug#end() | |
| set ruler | |
| set laststatus=2 |
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
| a = 3 | |
| for i in range(1): | |
| a = 4 | |
| print(a) #4 | |
| for j in range(1): | |
| a = 5 | |
| print(a) #5 | |
| print(a) #5 | |
| print(a) #5 |