Skip to content

Instantly share code, notes, and snippets.

View nccharles's full-sized avatar
🇷🇼
When others give up, persist!

Charles NDAYISABA nccharles

🇷🇼
When others give up, persist!
View GitHub Profile
@nccharles
nccharles / gist:f900203ef621f354102dce6cde5caaf5
Created December 9, 2021 12:07 — forked from hassan-maavan/gist:318b3c3d48c1607345c3ee45d93db3a4
Create a RomanNumerals class that can convert a roman numeral to and from an integer value. It should follow the API demonstrated in the examples below. Multiple roman numeral values will be tested for each helper method. Modern Roman numerals are written by expressing each digit separately starting with the left most digit and skipping any digi…
var RomanNumerals = {
toRoman : function (number) {
var ret = '';
while(number > 0) {
if(number/1000 >= 1) {
ret += 'M';
number -=1000;
} else if(number/900 >= 1) {
ret += 'CM';
number -=900;
@nccharles
nccharles / ChampionsLeagueTeams.js
Created November 6, 2021 17:25 — forked from phatnguyenuit/ChampionsLeagueTeams.js
HackerRank: JavaScript (Basic) on 15th Sep 2020
const https = require('https');
const fetch = (url) => {
return new Promise((resolve, reject) => {
https
.get(url, (resp) => {
let data = '';
// A chunk of data has been recieved.
resp.on('data', (chunk) => {

How to Deploy Django Applications on Heroku

Install heroku CLI

Sign up to Heroku.

Then install the Heroku Toolbelt. It is a command line tool to manage your Heroku apps

After installing the Heroku Toolbelt, open a terminal and login to your account:

@nccharles
nccharles / index.html
Created May 27, 2019 15:05
Isomorphic
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div class="container">
<!-- Topic -->
<div class="topic">
<h1>Isomorphic</h1>
@nccharles
nccharles / mysort.js
Created May 12, 2019 12:06 — forked from Samuelachema/mysort.js
Write a mySort function which takes in an array integers, and should return an array of the inputed integers sorted such that the odd numbers come first and even numbers come last.
/*
JavaScript
Write a mySort function which takes in an array integers, and should return an array of the inputed integers sorted such that the odd numbers come first and even numbers come last.
For exampl1e:
mySort( [90, 45, 66, 'bye', 100.5] )
should return
[45, 66, 90, 100]