Skip to content

Instantly share code, notes, and snippets.

@SunilDSK
SunilDSK / XMLParser.java
Created February 10, 2019 20:41
This is a java code to parse XML data using org.w3c.dom.
import lombok.Data;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import javax.xml.bind.JAXBException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@SunilDSK
SunilDSK / CouchDB_Python.md
Created May 25, 2018 13:27 — forked from marians/CouchDB_Python.md
The missing Python couchdb tutorial

This is an unofficial manual for the couchdb Python module I wish I had had.

Installation

pip install couchdb

Importing the module

@SunilDSK
SunilDSK / gist:73213b2ec1636be3a4f36cb39b41b440
Created February 11, 2017 16:25
C program to reverse the words in a string (Sentence) using pointers only.
#include <stdio.h>
#include <stdlib.h>
void swap(char *c1, char *c2){
char temp;
temp = *c1;
*c1 = *c2;
*c2 = temp;
}
int main(){
@SunilDSK
SunilDSK / roundrect_selectimage.xml
Created November 14, 2016 17:08
Android vector drawable: Dotted round rect
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:color="@color/cardview_dark_background"
android:width="1dp"
android:dashGap="2sp"
android:dashWidth="7dp"/>
<corners android:radius="5dp"/>
</shape>
/*
* Copyright 2014 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software