View xfdesktop.patch
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
--- src.orig/xfdesktop/src/xfce-desktop.c 2020-11-28 00:28:13.965018899 +0200 | |
+++ src/xfdesktop/src/xfce-desktop.c 2020-11-28 08:04:35.265630011 +0200 | |
@@ -1306,7 +1306,7 @@ | |
} | |
static gboolean | |
-xfce_desktop_button_press_event(GtkWidget *w, | |
+xfce_desktop_button_release_event(GtkWidget *w, | |
GdkEventButton *evt) | |
{ |
View example.kshrc
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 file contains examples of some of the things you may want to | |
# include in a user startup file. | |
# handle bash/zsh SHLVL variable | |
(( SHLVL++ )) | |
# skip this setup for non-interactive shells | |
[[ -o interactive && -t 0 ]] || return | |
# disable core dumps |
View hacker-rank-min-swap-dict.py
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/python | |
import math | |
import os | |
import random | |
import re | |
import sys | |
# Complete the minimumSwaps function below. | |
def minimumSwaps(arr): |
View test.py
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/python | |
import math | |
import os | |
import random | |
import re | |
import sys | |
# Complete the minimumSwaps function below. | |
def minimumSwaps(arr): |
View minswap2.py
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
def minimumSwaps(arr): | |
swp = 0 | |
n = len(arr) | |
for i,j in enumerate(arr): | |
if(j != i+1): | |
source_idx = arr.index(i+1) | |
destination_idx = arr.index(j) | |
swp += 1 | |
arr[destination_idx], arr[source_idx] = arr[source_idx], arr[destination_idx] |
View min_swp.py
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
def minimumSwaps(arr): | |
swp = 0 | |
n = len(arr) | |
print(arr) | |
for i in range(1,n+1): | |
for j in range(n): | |
if(arr[arr.index(i)] == arr[j]): | |
source_idx = arr.index(i) | |
destination_idx = i-1 | |
if source_idx != destination_idx: |
View source-template.c
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
/** | |
* @file [file name].c | |
* @authors [author] | |
* @copyright [copy write holder] | |
* | |
* @brief [description] | |
*/ | |
/******************************************************************************* | |
* Includes | |
*******************************************************************************/ |
View define.c
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
#define FAIL_IF(EXP) (\ | |
{\ | |
if(EXP) {\ | |
exit(EXIT_FAILURE);\ | |
}\ | |
}\ | |
)\ | |
#define FAIL_IF_MSG(EXP,MSG) (\ | |
{\ |
View user snippets
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
{ | |
"Standard Template": { | |
"prefix": "main", | |
"body": [ | |
"#include <stdio.h>", | |
"", | |
"int main (int argc, char** argv) {", | |
"\t\t$0\n", | |
" return EXIT_SUCCESS;", | |
"}" |
View pythonscript
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 python3 | |
import csv | |
import sys | |
import getopt | |
import regex | |
devices = [] | |
newdevices = {} | |
def loadDevices(file): |
NewerOlder