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
public static employees = [ | |
{ | |
'id' :'1', | |
'name' : 'John', | |
'empId' : 'IN-11334', | |
'address' : { | |
'city': 'Noida', | |
'state' :'UP', | |
'fulladdress':'B-7 Kent RO Sec 57' |
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 <stdio.h> | |
void printArray (int arr[], int n); | |
int AreAll9s (int num[], int n ); | |
void generateNextPalindromeUtil (int num[], int n ) | |
{ | |
int mid = n/2; | |
bool leftsmaller = false; |
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
const request = require("request-promise-native"); | |
async function processData() { | |
try { | |
let response = await request("https://www.andreasjakl.com/"); | |
if (response.length > 100) { | |
let response2 = await request("https://www.andreasjakl.com/wp-content/uploads/2018/08/arcore-anchors.gif"); | |
console.log("Data: ", response2.substring(0,10)); | |
} | |
} catch (error) { |
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
systemctl start service-name | |
systemctl status service-name | |
systenctl stop service-name | |
systemctl enable service-name | |
systemctl disable service-name | |
systemctl is-enabled service-name //To check whether the service is currently configured to start on the next boot up | |
systemctl is-active service-name //To check whether the service is active | |
How to remove Systemd services completely | |
systemctl stop service-name |
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
#!/bin/bash | |
DAEMON_PATH=/opt/kafka/ | |
PATH=$PATH:$DAEMON_PATH/bin | |
# See how we were called. | |
case "$1" in | |
start) | |
# Start daemon. | |
echo "Starting Zookeeper"; |
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
export default { | |
getParams() { | |
const scripts = document.getElementsByTagName('script'), | |
myScript = scripts[scripts.length - 1], | |
query = myScript.src.replace(/^[^\?]+\??/, ''); | |
let Params = {}; | |
if ( !query ) { return Params } // return empty object |
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
{ | |
"countries": [ | |
{ | |
"country": "Afghanistan", | |
"states": ["Badakhshan", "Badghis", "Baghlan", "Balkh", "Bamian", "Daykondi", "Farah", "Faryab", "Ghazni", "Ghowr", "Helmand", "Herat", "Jowzjan", "Kabul", "Kandahar", "Kapisa", "Khost", "Konar", "Kondoz", "Laghman", "Lowgar", "Nangarhar", "Nimruz", "Nurestan", "Oruzgan", "Paktia", "Paktika", "Panjshir", "Parvan", "Samangan", "Sar-e Pol", "Takhar", "Vardak", "Zabol"] | |
}, | |
{ | |
"country": "Albania", | |
"states": ["Berat", "Dibres", "Durres", "Elbasan", "Fier", "Gjirokastre", "Korce", "Kukes", "Lezhe", "Shkoder", "Tirane", "Vlore"] | |
}, |
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
# This configuration file is provided on an "as is" basis, | |
# with no warranties or representations, and any use of it | |
# is at the user's own risk. | |
user www-data; | |
worker_processes 4; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 768; |
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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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
<link rel="import" href="/bower_components/iron-list/iron-list.html"> | |
<link rel="import" href="/bower_components/iron-form/iron-form.html"> | |
<link rel="import" href="/bower_components/paper-input/paper-input.html"> | |
<link rel="import" href="/bower_components/paper-button/paper-button.html"> | |
<link rel="import" href="/bower_components/firebase-element/firebase.html"> | |
<link rel="import" href="/bower_components/firebase-element/firebase-collection.html"> | |
<dom-module id="categories-list"> | |
<style> | |
:host { |