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
const searchBox = document.getElementById('searchbox'); | |
const dropdownMenu = document.getElementById('dropdown-menu'); | |
const searchBoxContainer = document.getElementById('searchbox-container'); | |
searchBox.addEventListener("keyup", function(event) { | |
const timer = setTimeout(function () { | |
var sr = event.target.value; | |
if(!sr) return; //Do nothing for empty value | |
searchBoxContainer.classList.add("control", "is-loading"); |
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 f(x){ // we are taking equation as x^3+x-1 | |
def f = 2*x + x - 1; | |
return f; | |
} | |
def secant(x1, x2, E) { | |
def n = 0, xm, x0, c; |
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
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
.resize-drag{ | |
z-index:200; | |
position:absolute; | |
border: 2px dashed #ccc; | |
} | |
.out-container-content ,.container-content{ |
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.awt.BasicStroke; | |
import java.awt.Color; | |
import java.awt.EventQueue; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.RenderingHints; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import java.awt.geom.Area; | |
import java.awt.geom.GeneralPath; |
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
var TreeFolder = React.createClass({ | |
getInitialState: function() { | |
return { showFolderContents: this.props.showFolderContents, node: this.props.node}; | |
}, | |
onClick: function() { | |
this.setState({ showFolderContents: !this.state.showFolderContents }); | |
}, | |
updateData: function(data){ | |
this.setState({node:data}) |
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
// records = [] | |
columns = [] | |
document.querySelectorAll("._2PmH5").forEach( record => { | |
columns=[] | |
record.childNodes.forEach( column => | |
columns.push(column.textContent.trim()) | |
); | |
str = JSON.stringify(columns); | |
// debugger; | |
// console.log(str) |
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
<jsp:directive.include file="../fragments/mason-init.jspf"/> | |
<m:resource> | |
<m:request method="GET"> | |
<sql:query var="result" dataSource="${datasource}"> | |
SELECT * FROM movie | |
</sql:query> | |
<c:set target="${output}" property="output" value="${result}"/> | |
</m:request> |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<Resource xmlns="http://xml.metamug.net/resource/1.0" v="1.0"> | |
<Request method="GET"> | |
<XRequest id="xrequest" method="GET" | |
url="https://postman-echo.com/get?foo1=bar1&foo2=bar2" | |
/> | |
</Request> | |
</Resource> |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<Resource xmlns="http://xml.metamug.net/resource/1.0" v="1.0"> | |
<Request method="GET"> | |
<Desc> Say hello to different species </Desc> | |
<Param name="type" type="text" minlength="1" /> | |
<!-- http://localhost:7000/backend/v1.0/hello?type=animal --> | |
<Sql id="helloAnimals" when="$type eq animal"> SELECT 'Hello animals' as "message" </Sql> | |
<!-- http://localhost:7000/backend/v1.0/hello?type=plant --> | |
<Sql id="helloPlants" when="$type eq plant"> SELECT 'Hello plants' as "message" </Sql> | |
</Request> |
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
GroovyScriptEngine engine = new GroovyScriptEngine("."); | |
Map<String, String> request = new HashMap(); | |
request.put("param1", "Hello"); | |
Map<String, String> response = new HashMap(); | |
response.put("param1", "World"); | |
Binding binding = new Binding(); | |
binding.setVariable("request", request); | |
binding.setVariable("response", response); | |
engine.run("src/main/java/"+className, binding); |
NewerOlder