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
--[[ | |
===================================================================== | |
==================== READ THIS BEFORE CONTINUING ==================== | |
===================================================================== | |
Kickstart.nvim is *not* a distribution. | |
Kickstart.nvim is a template for your own configuration. | |
The goal is that you can read every line of code, top-to-bottom, and understand |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Resume - Haris Javed</title> | |
<style> | |
h2 { | |
color: rgb(6, 23, 123); | |
text-decoration: underline; | |
} | |
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
class Solution: | |
def firstMissingPositive(self, nums: List[int]) -> int: | |
def hashset(numbers): | |
set_nums = set(numbers) | |
n = len(numbers) | |
for i in range(1, n + 2): # case A: [1,n] case B: n+1 if A is full i.e. 1 to n | |
if i not in set_nums: | |
return i |
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
class Solution: | |
def firstMissingPositive(self, nums: List[int]) -> int: | |
def hashset(numbers): | |
set_nums = set(numbers) | |
n = len(numbers) | |
for i in range(1, n + 2): # case A: [1,n] case B: n+1 if A is full i.e. 1 to n | |
if i not in set_nums: | |
return i |
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 asyncio | |
loop = asyncio.get_event_loop() | |
async def hello(): | |
await asyncio.sleep(3) | |
print('Hello!') | |
if __name__ == '__main__': | |
loop.run_until_complete(hello()) | |
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
package com.aamirahmad.intellij.stackoverflowplugin; | |
import com.intellij.ide.BrowserUtil; | |
import com.intellij.lang.Language; | |
import com.intellij.openapi.actionSystem.ActionManager; | |
import com.intellij.openapi.actionSystem.AnAction; | |
import com.intellij.openapi.actionSystem.AnActionEvent; | |
import com.intellij.openapi.actionSystem.CommonDataKeys; | |
import com.intellij.openapi.editor.CaretModel; | |
import com.intellij.openapi.editor.Editor; |
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
" Don't try to be vi compatible | |
set nocompatible | |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
" TODO: Load plugins here (pathogen or vundle) | |
" Turn on syntax highlighting | |
syntax on |
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.math.BigInteger; | |
public class Solution { | |
public static BigInteger factorial(int n) { | |
BigInteger result = BigInteger.ONE; | |
for (; n > 1; n--) { | |
result = result.multiply(BigInteger.valueOf(n)); | |
} | |
return result; | |
} |
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
// Factory function | |
const createBankAccount = (balance = 0, type = 'CHECKING') => ({balance, type}) | |
// Helper | |
const checkIfNegative = x => { | |
if (x < 0) | |
throw Error('Value can not be negative') | |
return x | |
} |
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
function pollution () { | |
if(process.env.TESTING_ENGINE === 'jasmine') | |
return Math.floor(Math.random() * 120); | |
else | |
return Math.floor(Math.random() * 100); | |
} | |
console.log(pollution()); |
NewerOlder