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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; | |
using MySql.Data.MySqlClient; |
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; | |
using MySql.Data.MySqlClient; |
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
from django.conf.urls import url | |
from . import views | |
urlpatterns = [ | |
url(r'^$', views.home, name='home'), | |
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
from django.shortcuts import render | |
# Create your views here. | |
def home(request): | |
return render(request,'webapp/home.html',{}) | |
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
using ClassLibrary1; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net.NetworkInformation; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApp1 | |
{ |
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
//metroLabel16.Text = "Running"; | |
System.Net.WebClient wc = new System.Net.WebClient(); | |
//DateTime Variable To Store Download Start Time. | |
DateTime dt1 = DateTime.Now; | |
//Number Of Bytes Downloaded Are Stored In ‘data’ | |
byte[] data = wc.DownloadData("https://github.com/harshityadav95/static-file-storage/blob/master/text.txt"); | |
//DateTime Variable To Store Download End Time. |
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 maxDiff(int arr[]) | |
{ | |
int arr_size = arr.length; | |
int max_diff = arr[1] - arr[0]; | |
int i, j; | |
for (i = 0; i < arr_size; i++) | |
{ | |
for (j = i + 1; j < arr_size; j++) | |
{ |
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
static String findHighestFreqChar(String inputStr) { | |
// Create array to keep the count of individual | |
// characters and initialize the array as 0 | |
int count[] = new int[256]; | |
// Construct character count array from the input | |
// string. | |
int len = inputStr.length(); | |
for (int i=0; i<len; 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
/* Return the "centered" average of an array of ints, which we'll say is the | |
* mean average of the values, except ignoring the largest and smallest | |
* values in the array. If there are multiple copies of the smallest value, | |
* ignore just one copy, and likewise for the largest value. Use int division | |
* to produce the final average. You may assume that the array is length 3 | |
* or more. | |
*/ | |
static int centeredAverage(int[] inputIntArray) { | |
Arrays.sort(inputIntArray); |
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 sandwich is two pieces of bread with something in between. Return the string that is between the first and last appearance of "bread" in the given string, or return the empty string "" if there are not two pieces of bread. | |
getSandwich("breadjambread") → "jam" | |
getSandwich("xxbreadjambreadyy") → "jam" | |
getSandwich("xxbreadyy") → "" | |
link: http://www.javaproblems.com/2013/11/java-string-2-getsandwich-codingbat.html | |
*/ | |
static String getSandwich(String inputString) { | |