Skip to content

Instantly share code, notes, and snippets.

View khan-hasan's full-sized avatar

Hasan Khan khan-hasan

  • Delta Air Lines
  • Atlanta, GA
View GitHub Profile
import csv
import getpass
import math
import os
import sys
import time
# pip install opencv-python
import cv2 as cv
import numpy as np
Console.WriteLine("Enter a time value in the 24-hour time format (e.g. 19:00):");
var input = Console.ReadLine();
if (string.IsNullOrEmpty(input) || string.IsNullOrWhiteSpace(input))
Console.WriteLine("Invalid Time");
var lowTime = DateTime.Parse("00:00");
var highTime = DateTime.Parse("23:59");
var inputTime = DateTime.Parse(input);
using System;
using System.Collections;
using System.Collections.Generic;
public class RomanDecode
{
public static int Solution(string roman)
{
// Hashtable representing the numeric value of each roman numeral key
Hashtable romanKeys = new Hashtable() {
using System;
using System.Collections;
using System.Collections.Generic;
public class RomanDecode
{
public static int Solution(string roman)
{
// Hashtable representing the numeric value of each roman numeral key
Hashtable romanKeys = new Hashtable() {
/*
Instructions:
Candidates are allowed to complete this problem at home using any computer you prefer.
While the preferred language for solving this problem is C#, if absolutely necessary javascript is also permitted.
If access to a C#/Javascript editor is not available to you, you can use the following
C# online IDE at: https://www.tutorialspoint.com/compile_csharp_online.php
This IDE has a decent text editor, as well as the ability to execute your code in a console application Environment. Unlike the previous test questions, syntax and style will be taken into account for this challenge.
public class Customer
{
string CustomerName;
// Constructor for Customer class
public Customer(string Name)
{
CustomerName = Name;
}
}
using System;
using System.Collections.Generic;
namespace Roman
{
internal class Program
{
private static void Main(string[] args)
{
// Decode and print the numerals.
require 'rails_helper'
describe Product do
context "when the product has comments" do
let(:product) { Product.create!(name: "race bike") }
let(:user) { User.create!(first_name: "John", last_name: "Smith", email: "[email protected]", password: "password123") }
before do
class UsersController < ApplicationController
before_action :set_user, only: [:show, :edit, :update, :destroy]
before_action :authenticate_user!, except: [:show, :index]
load_and_authorize_resource
# GET /users
# GET /users.json
def index
@users = User.all
end
@khan-hasan
khan-hasan / new.html.erb
Created December 21, 2017 15:01
This is the form for creating new users.
<h2>Sign up</h2>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
<%= devise_error_messages! %>
<div class="field form-group">
<%= f.text_field :first_name, autofocus: true, class: "form-control", placeholder: 'First name' %>
</div>
<div class="field form-group">