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
| #!/usr/bin/env python | |
| import sys | |
| # Basic recursion | |
| def fibonacci (n): | |
| def imp (n): | |
| if n == 0: return 0 | |
| if n == 1: return 1 | |
| return imp(n-1) + imp(n-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
| strategy: nuxt | |
| source_dir: site | |
| target_dir: dist | |
| api_point: api | |
| basename: / | |
| permalink: /:year/:month/:day/:slug | |
| extensions: [".md", ".markdown", ".json", ".html"] | |
| collections: | |
| pages: | |
| type: page |
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
| const path = require('path') | |
| const fs = require('fs-extra') | |
| const {debug, log, ERROR} = require('../debug')('NuxtGenerator') | |
| var resolve = path.resolve | |
| process.env.DEBUG = 'nuxt:*,Vuetal:*' | |
| class NuxtGenerator { |
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
| #!/usr/bin/env perl | |
| use File::Find; | |
| use File::Copy; | |
| use v5.14; | |
| use strict; | |
| my $path = shift @ARGV || '.'; | |
| find({wanted => \&wanted, preprocess => \&preprocess}, $path); |
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
| <template lang="pug"> | |
| div.ui.dimmer.modals.fade.page( | |
| :class="merge({}, propClassModals, aniModals.class(updated), {transition})" | |
| @click.self="stop" | |
| @animationend="aniModals.onAnimationEnd()" | |
| ) | |
| div( | |
| style="display:table-cell;text-align:center;vertical-align:middle;" | |
| @click.self="stop" | |
| ) |
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 <iostream> | |
| using namespace std; | |
| // A | |
| template<typename T> void foo(T) {cout<<"A";} | |
| // B | |
| template<typename T> void foo(T*) {cout<<"B";} | |
| // C |
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 <iostream> | |
| #include <vector> | |
| #include <list> | |
| #include <string> | |
| #include <map> | |
| using namespace std; | |
| class Parser { | |
| public: |
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<iostream> | |
| #include<vector> | |
| int trap_water(std::vector<int> &v){ | |
| int water = 0; | |
| int h = 0; | |
| //== Find Max Height Bar | |
| size_t imax = 0; | |
| for( size_t i=1;i<v.size();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 main(){ | |
| const int NK = 3; | |
| const int NN = 5; | |
| int sizes[NK] = { 5, 4, 4 }; | |
| int arr[NK][NN] = { | |
| {4, 10, 15, 24, 26}, | |
| {0, 9, 12, 20}, |
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 <iostream> | |
| #include <cstdlib> | |
| using namespace std; | |
| void print(int* v, int n); | |
| int * genArray( int n ); | |
| void swap( int &a, int &b ){int tmp=a;a=b;b=tmp;} | |
| void solver( int * arr , int n ){ |