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 sqrt(x, guess=0.1): | |
print("Trying:", guess, "-- Value:", guess*guess) | |
if good_enough(guess, x): | |
return guess | |
else: | |
guess = improve_guess(guess, x) | |
return sqrt(x, guess) | |
def good_enough(guess, 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
DEPLOYING A COMPRESSED SPRING BOOT APPLICATION(WAR) AS COMPARED TO AN EXPLODED APP PATCH | |
IN A TOMCAT SERVER WITH EXTERNALIZED PROPERTIES | |
Author:Arjun Kumbakkara (arjunkumbakkara@gmail.com)|https://arjunkumbakkara.github.io | |
First of all : SPRING BOOT CONVERSION | |
1. Convert your Spring boot application to Tomcat compatible (For SpringBoot2.x its easier for 1.x make sure you do the below) | |
a. remove the embedded Tomcat. Note: When using embedded tomcat , server.context=/api from application.properties wont work! |
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
Git Merge Process (Manual with IDE and without Meld,kraken etc)Final Steps : | |
1. Be in Master : git checkout master | |
2. git pull | |
3. git checkout new-branch | |
4. git pull | |
5. git checkout master | |
6. git merge new- branch | |
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 | |
# -*- coding: utf-8; mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- | |
# vim: fileencoding=utf-8 tabstop=4 expandtab shiftwidth=4 | |
"""User Access Control for Microsoft Windows Vista and higher. This is | |
only for the Windows platform. | |
This will relaunch either the current script - with all the same command | |
line parameters - or else you can provide a different script/program to | |
run. If the current user doesn't normally have admin rights, he'll be |
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
Make all nodes up | |
====================== | |
[prepaid@GSI-1 cluster]$ ../../src/redis-server redis30011.conf | |
../../src/redis-server redis8580.conf | |
../../src/redis-server redis8581.conf | |
../../src/redis-server redis8582.conf | |
../../src/redis-server redis8583.conf |
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
#set connection data accordingly | |
#Will only work for redis > 5.0 | |
#Easiest way | |
#if it doesnt work , then try with target_db=0 for both | |
#Also always use -c after redis-cli . Or else the redirection wont work and it will throw (error) Move | |
#There are multiple ways of doing it. One is via MIGRATE command , 2nd is via DUMP and RESTORE command. | |
source_host=localhost | |
source_port=6379 |
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
First go to the local repo which is project folder | |
1.git status | |
See the modified changes , now | |
2. Adding all files | |
git add . | |
Note:below only pushes the changes to local repo | |
3.git commit -m "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
<?xml version="1.0" encoding="UTF-8"?> | |
<jmeterTestPlan version="1.2" properties="3.2" jmeter="3.2 r1790748"> | |
<hashTree> | |
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true"> | |
<stringProp name="TestPlan.comments"></stringProp> | |
<boolProp name="TestPlan.functional_mode">false</boolProp> | |
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp> | |
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> | |
<collectionProp name="Arguments.arguments"/> | |
</elementProp> |
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
Classic method: Turn off the Foreign Keys and | |
#SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS; | |
#SET FOREIGN_KEY_CHECKS=0; | |
DO YOUR CHANGES!! | |
#SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; | |
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.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Set; | |
import javax.servlet.http.HttpServletRequest; | |
import org.apache.logging.log4j.LogManager; | |
import org.apache.logging.log4j.Logger; |
NewerOlder