This file contains 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 binary_search(nums, target): | |
start = 0 | |
end = len(nums)-1 | |
while start <= end: | |
mid = start + (end-start)//2 | |
if nums[mid] > target: | |
end = mid-1 | |
elif nums[mid] < target: |
This file contains 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 binary search algorithm implementation in Java | |
*/ | |
public class MyBinarySearch { | |
public static void main(String[] args) { | |
int[] numbers = {2, 12, 15, 17, 27, 29, 45}; | |
int targetValue = 17; | |
System.out.println(binarySearch(numbers, targetValue)); | |
} |
This file contains 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
import java.io.*; | |
import java.math.*; | |
import java.security.*; | |
import java.text.*; | |
import java.util.*; | |
import java.util.concurrent.*; | |
import java.util.function.*; | |
import java.util.regex.*; | |
import java.util.stream.*; | |
import static java.util.stream.Collectors.joining; |
This file contains 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
#!/bin/python3 | |
import math | |
import os | |
import random | |
import re | |
import sys | |
import math |
This file contains 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
import java.io.*; | |
import java.math.*; | |
import java.security.*; | |
import java.text.*; | |
import java.util.*; | |
import java.util.concurrent.*; | |
import java.util.function.*; | |
import java.util.regex.*; | |
import java.util.stream.*; | |
import static java.util.stream.Collectors.joining; |
This file contains 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 import forms | |
class UploadDocumentForm(forms.Form): | |
def __init__(self, company, filling_type, financials_types, *args, **kwargs): | |
super(UploadDocumentForm, self).__init__(*args, **kwargs) | |
self.fields["company"] = forms.ChoiceField(choices=company) | |
self.fields["financials_type"] = forms.ChoiceField(choices=filling_type) | |
self.fields["filling_types"] = forms.ChoiceField(choices=financials_types) |
This file contains 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
#************************************************************************************************************* | |
#************************************************************************************************************* | |
# Code Checker Customly build for Clash Of Code | |
# | |
# | |
# BY: JAINAL GOSALIYA | |
# DATE: 04 JULY, 2019 | |
# | |
# | |
#************************************************************************************************************* |
This file contains 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
matrix: | |
include: | |
- language: c | |
before_script: | |
- chmod +x scripts/dropbox_uploader.sh | |
script: | |
- scripts/dropbox_uploader.sh | |
- scripts/dropbox_uploader.sh download /cases/input.txt input.txt | |
- scripts/dropbox_uploader.sh download /cases/input1.txt input1.txt | |
- scripts/dropbox_uploader.sh download /cases/input2.txt input2.txt |
This file contains 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
Access to XMLHttpRequest at 'https://devfolio.sgp1.digitaloceanspaces.com/resumes/a1cba23c48944fae8e52441fb9db4101.pdf?Content-Type=application%2Fpdf&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=JPSWB4KQJFUXHWYREC6C%2F20190430%2Fsgp1%2Fs3%2Faws4_request&X-Amz-Date=20190430T053418Z&X-Amz-Expires=60&X-Amz-Signature=0476d8cf8d826cac46ff260fa01226643d84c49bf4681faceaa4d1acae8843ca&X-Amz-SignedHeaders=content-disposition%3Bhost%3Bx-amz-acl&x-amz-acl=private' from origin 'https://devfolio.co' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request. | |
Uncaught (in promise) TypeError: Cannot read property 'status' of undefined | |
at Object.errorHandler (bundle.67fc502b.js:1) | |
at bundle.67fc502b.js:97 | |
at c (bundle.67fc502b.js:115) | |
at Generator._invoke (bundle.67fc502b.js:115) | |
at Generator.e.(anonymous function) [as throw] (https://devfolio.co/bundle.67fc502b.js:115:42387) | |
at y (bundle.67fc502b.js:97) | |
a |
This file contains 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 hashlib | |
from pyfingerprint.pyfingerprint import PyFingerprint | |
import json | |
import datetime | |
import time | |
from time import sleep, strftime | |
import mysql.connector |