Click on element and :- angular.element($0).scope() Reference https://stackoverflow.com/questions/13743058/how-do-i-access-the-scope-variable-in-browsers-console-using-angularjs
Category: Uncategorized
DB2 – Drop and add primary key
ALTER TABLE SCHEMA.TABLE DROP PRIMARY KEY; ALTER TABLE SCHEMA.TABLE ADD CONSTRAINT PKNAME PRIMARY KEY (COL1, COL2);
SQL Server – Remove foreign keys, primary keys, and tables
USE [] GO /** * Remove foreign keys, primary keys, and tables. */ /* Change to desired schema */ DECLARE @schema VARCHAR(254) select @schema =…
Maven – Share test code between modules
com.abc module test-jar test References https://maven.apache.org/guides/mini/guide-attached-tests.html https://stackoverflow.com/questions/174560/sharing-test-code-in-maven
Echo commands in bash
echo commands – handy for diagnosing git and aliased commands $ set -x
Debug nodejs with chrome devtools
chrome://inspect/#devices $ node –inspect –debug-brk shifty Debugger listening on ws://127.0.0.1:9229/705a62e5-3ba5-4b93-8ee6-d0c86419451b For help see https://nodejs.org/en/docs/inspector Debugger attached. (node:2580) [DEP0062] DeprecationWarning: node –inspect –debug-brk is deprecated. Please…
Spring @ControllerAdvice
@ControllerAdvice(annotations = Controller.class) public class ControllerErrorAdvice extends ResponseEntityExceptionHandler { @ExceptionHandler(value = { IllegalArgumentException.class, IllegalStateException.class, NullPointerException.class }) protected ResponseEntity<Object> handleConflict(RuntimeException ex, WebRequest request) { return handleExceptionInternal(ex,…
Wildfly – Define system property
C:\java\wildfly\wildfly-10.1.0.Final\bin>jboss-cli –connect controller=localhost [standalone@localhost:9990 /] /system-property=spring.profiles.active:add(value=local) {“outcome” => “success”} [standalone@localhost:9990 /] /system-property=spring.profiles.active:read-resource { “outcome” => “success”, “result” => {“value” => “local”} } [standalone@localhost:9990 /] /system-property=spring.profiles.active:read-resource…
Wildfly maven plugin
Start a local wildfly instance. $ ~/java_tools/wildfly/wildfly-10.1.0.Final/bin/standalone.sh & Or download and start on-the-fly. $ mvn -Pwildfly wildfly:start [INFO] Scanning for projects… [INFO] [INFO] ———————————————————————— [INFO]…
H2 – Start Server
$ java -jar C:/java/db/h2-1.4.196.jar & [1] 17272