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
#include<bits/stdc++.h> | |
using namespace std; | |
string ss; | |
stack<int>result; | |
vector<int> arr; | |
int n, k; | |
int dp[1123][123]; | |
int stop = 0; /* To stop the search for further solutions */ | |
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
double sq(double num) | |
{ | |
double xn = num/2; | |
while(abs((xn*xn)-num)>eps) //eps is precision | |
{ | |
xn = (xn + num/xn)/2; | |
} | |
return xn; | |
} |
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
http://localhost:2480/ |
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
orientdb> connect remote:localhost root <Passwd> |
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
docker run -it --net="host" orientdb:latest /orientdb/bin/console.sh |
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
docker run -d -p 2424:2424 -p 2480:2480 -v config:/orientdb/config -v database:/orientdb/databases -v backup:/orientdb/backup -e ORIENTDB_ROOT_PASSWORD=mypasswdhere orientdb:latest |
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
docker build -f /path/to/a/Dockerfile |
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
CREATE EDGE V_STACK FROM (SELECT * FROM VERSION WHERE P_NAME="NEWTON LAW" AND V_NO=1) TO (SELECT * FROM PAGE WHERE NAME ="NEWTON LAW") | |
CREATE EDGE V_STACK FROM (SELECT * FROM VERSION WHERE P_NAME="WORK AND POWER" AND V_NO=1) TO (SELECT * FROM PAGE WHERE NAME ="WORK AND POWER") | |
CREATE EDGE V_STACK FROM (SELECT * FROM VERSION WHERE P_NAME="PSEUDO FORCE" AND V_NO=1) TO (SELECT * FROM PAGE WHERE NAME ="PSEUDO FORCE") |
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
CREATE EDGE P_VERSION FROM (SELECT * FROM VERSION WHERE P_NAME="NEWTON LAW" AND V_NO=0) TO (SELECT * FROM VERSION WHERE P_NAME="NEWTON LAW" AND V_NO=1) | |
CREATE EDGE P_VERSION FROM (SELECT * FROM VERSION WHERE P_NAME="PSEUDO FORCE" AND V_NO=0) TO (SELECT * FROM VERSION WHERE P_NAME="PSEUDO FORCE" AND V_NO=1) | |
CREATE EDGE P_VERSION FROM (SELECT * FROM VERSION WHERE P_NAME="WORK AND POWER" AND V_NO=0) TO (SELECT * FROM VERSION WHERE P_NAME="WORK AND POWER" AND V_NO=1) |
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
CREATE EDGE REVIEW FROM (SELECT FROM USER WHERE NAME="JON") TO (SELECT FROM VERSION WHERE P_NAME="PSEUDO FORCE" AND V_NO=0) SET VOTE=5 | |
CREATE EDGE REVIEW FROM (SELECT FROM USER WHERE NAME="JOSH") TO (SELECT FROM VERSION WHERE P_NAME="NEWTON LAW" AND V_NO=1) SET VOTE=8 | |
CREATE EDGE REVIEW FROM (SELECT FROM USER WHERE NAME="JACOB") TO (SELECT FROM VERSION WHERE P_NAME="WORK AND POWER" ) SET VOTE=9 |
NewerOlder