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
public class Change { | |
private char a; | |
private char b; | |
public Change(char a, char b){ | |
this.a=a; | |
this.b=b; | |
} | |
public String change(String word){ | |
return word.replace(this.a, this.b); | |
} |
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
public class Changer { | |
private ArrayList<Change> changes; | |
public Changer(){ | |
this.changes=new ArrayList<Change>(); | |
} | |
public void addChange(Change change){ | |
this.changes.add(change); | |
} | |
public String change(String word){ | |
for (Change Change : changes) { |
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 oneLine(size): | |
string='' | |
for i in range(size): | |
string+="*" | |
string+='\n' | |
return string | |
def manyLines(size): | |
finalString="" | |
for i in range(size): | |
finalString+=oneLine(size) |
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
public class Person { | |
private String name; | |
private int age; | |
public Person(String nameAtStart) { | |
this.age = 0; | |
this.name = nameAtStart; | |
} | |
public void printPerson() { |
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
public class Person { | |
private String name; | |
private int age; | |
public Person(String nameAtStart) { | |
this.age = 0; | |
this.name = nameAtStart; | |
} | |
public void printPerson() { |
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
using System; | |
namespace Programs | |
{ | |
//Modify this class Employee, add requested methods | |
public class Employee{ | |
private String firstName; | |
private String lastName; | |
private double salary; |
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
static Node lca(Node root,int v1,int v2) | |
{ | |
ArrayList<Node> list = new ArrayList<Node>(); | |
helper(root,v1,v2, list); | |
return list.get(list.size()-1); | |
} | |
static Node helper(Node node,int v1,int v2,ArrayList<Node> array){ | |
if(node.left == null && node.right == null){ | |
return null; |
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 numpy as np | |
def find_combination(choices, total): | |
new_array = list(reversed(sorted(choices))) | |
new = compare(new_array, total)[1] | |
result=[] | |
for number in choices: | |
if number in new: | |
new.pop(new.index(number)) | |
result.append(1) | |
else: |
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>Solinor Wage Calculator</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha/css/bootstrap.min.css"> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha/js/bootstrap.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { |
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
failed | |
func ApplyMiddleware(rawHandler http.HandlerFunc, middleWares ...Adapter) http.Handler { | |
// Convert rawHandler from type http.HandlerFunc to type http.Handler | |
convertedHandler := http.HandlerFunc(rawHandler) | |
for i := len(middleWares) - 1; i >= 0; i-- { | |
convertedHandler = middleWares[i](convertedHandler) | |
} | |
return convertedHandler | |
} |
OlderNewer