Skip to content

Instantly share code, notes, and snippets.

@Chetan496
Chetan496 / howToDonate.html
Created July 28, 2016 08:38
This is the HTML markup - this should be used in howToDonate section
<div id="howToDonatePage" class="container-fluid">
<a id="donate" class="smooth"> </a>
<div class="jumbotron">
<div class="row">
<h3>Donations </h3>
<h2> WHY WAIT FOR A NOBLE CAUSE?</h2>
<div class="row">
@Chetan496
Chetan496 / MainActivity.java
Created July 30, 2016 11:52
Basic Event Handling in Android
package com.example.mac.testapp;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
@Chetan496
Chetan496 / SQL server Queries example.md
Last active December 23, 2016 11:05
Small snippets which explain Transact SQL (the SQL flavor used by MS-SQL)

SQL syntax in MS-SQL

Note: {} denotes placeholder. You can replace it with a real object/entity name in DB

Switching to a Database schema in MS-SQL:

USE {databasename}; GO

Show all tables in the Selected Database schema

SELECT * FROM information_schema.tables;

SELECT id, instanceId, processModelId, GROUP_CONCAT(CONCAT_WS("=", variableName, oldValue)) AS OLDVALUE,
GROUP_CONCAT(CONCAT_WS("=", variableName, newValue)) AS NEWVALUE , parentVariableName FROM `Object_History`
GROUP BY instanceId, parentVariableName;
@Chetan496
Chetan496 / TransposedData_PagingGrid
Last active September 27, 2016 17:40
This SAIL interface transposes the data in a paging grid
load(
local!pagingInfo: a!pagingInfo(
startIndex:1,
batchSize:-1
),
with(
local!data: {
LISTAGG in Oracle
SELECT deptno, LISTAGG(ename, ',') WITHIN GROUP (ORDER BY ename) AS employees
FROM emp
GROUP BY deptno;
Using the WM_CONCAT function:
SELECT deptno, wm_concat(ename) AS employees
1. https://www.websequencediagrams.com/ - Web Sequence Diagrams - for creating sequence diagrams using a simple DSL
2. http://yuml.me - for creating UML diagrams
@Chetan496
Chetan496 / instructionsToStartJBOSSinDebugMode.md
Last active November 21, 2022 16:21
Starting JBOSS in Debug mode

How to start JBoss in Debug mode to allow remote debugging via socket?

By default, remote debugging is not enabled. You can enable it - default port is 8787.

In the file standalone.conf.bat in the <JBOSS_HOME>/bin folder, just uncommnet the following line:

rem Sample JPDA settings for remote socket debugging set "JAVA_OPTS=%JAVA_OPTS% -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"

@Chetan496
Chetan496 / ApachePOI.md
Last active December 15, 2016 16:55
Apache POI snippets

/* contains code samples and explanation of apache poi*/

HSLF - Horrible slide layout format

for reading, creating, editing PPT files

OLE - Object linking and Embedding is a proprietary technology by Microsoft which allows embedding and linking to other doucments and objects

OLE allows embedding one document within another

/*An example of uploading a document to the KC */
public void uploadDocumentToAppianKC(
ContentService contentService,
byte[] bytes,
String extFileName,
Long folderId,
String uniqueIdentifier) throws InvalidContentException, StorageLimitException, PrivilegeException,
InsufficientNameUniquenessException, DuplicateUuidException, IOException {