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 DraggableFlatList, { ScaleDecorator } from 'react-native-draggable-flatlist' | |
import SwipeableItem from 'react-native-swipeable-item' | |
. | |
. | |
. | |
const itemRefs = React.useRef(new Map()) | |
<DraggableFlatList | |
activationDistance={15} | |
data={getCategoriesFromTaskList()} |
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.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.Iterator; | |
import org.apache.poi.hssf.usermodel.HSSFCell; | |
import org.apache.poi.hssf.usermodel.HSSFRow; | |
import org.apache.poi.hssf.usermodel.HSSFSheet; | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
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.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
public class WindowsProcessKiller { | |
// command used to get list of running task | |
private static final String TASKLIST = "tasklist"; | |
// command used to kill a task | |
private static final String KILL = "taskkill /IM "; |
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 mysql.connector | |
def fetch_table_data(table_name): | |
# The connect() constructor creates a connection to the MySQL server and returns a MySQLConnection object. | |
cnx = mysql.connector.connect( | |
host='localhost', | |
database='schema', | |
user='user', | |
password='password' |
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 bash | |
set -euo pipefail | |
# Variables | |
IMAGE_NAME="my_image_name" | |
CONTAINER_NAME="my_container_name" | |
TAG="latest" | |
# Build Docker image |
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
<HTML> | |
<HEAD> | |
<TITLE>Popup div with disabled background</TITLE> | |
<style> | |
.ontop { | |
z-index: 999; | |
width: 100%; | |
height: 100%; | |
top: 0; | |
left: 0; |
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 xlsxwriter | |
import mysql.connector | |
def fetch_table_data(table_name): | |
# The connect() constructor creates a connection to the MySQL server and returns a MySQLConnection object. | |
cnx = mysql.connector.connect( | |
host='localhost', | |
database='schema', | |
user='user', |
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 React, { useState } from 'react'; | |
import { Editor, EditorState, RichUtils } from 'draft-js'; | |
import { | |
FaBold, | |
FaCode, | |
FaHeading, | |
FaItalic, | |
FaListOl, | |
FaListUl, |
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 {STSClient, AssumeRoleCommand} = require("@aws-sdk/client-sts"); | |
const {QuickSightClient, GetDashboardEmbedUrlCommand, RegisterUserCommand} = require("@aws-sdk/client-quicksight"); | |
const AWS_REGION = "us-east-1"; | |
const AWS_ACCOUNT_ID = "123456789012"; | |
const QUICKSIGHT_ROLE_ARN = `arn:aws:iam::${AWS_ACCOUNT_ID}:role/QuicksightDashboardViewer`; | |
const stsClient = new STSClient({ | |
region: AWS_REGION | |
}); |
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 getEmbedUrl = async (qsClient, dashboardId) => { | |
console.log(`Fetching embed url`); | |
const param = { | |
AwsAccountId: AWS_ACCOUNT_ID, | |
DashboardId: dashboardId, | |
IdentityType: "IAM", | |
UndoRedoDisabled: true, | |
ResetDisabled: true | |
}; |
NewerOlder