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 class Main { | |
public static void printMethodNames(Class<?> clazz) { | |
// Get all methods of the class including inherited methods | |
Method[] methods = clazz.getMethods(); | |
// Print method names and parameter types | |
for (Method method : methods) { | |
System.out.print(method.getName() + "("); | |
Class<?>[] parameterTypes = method.getParameterTypes(); | |
for (int i = 0; i < parameterTypes.length; i++) { |
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 keyboard | |
import time | |
def readFile(path): | |
with open(path, 'r') as file: | |
arr = file.readlines() | |
return arr | |
codeLines = readFile("main.js") |
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
SELECT | |
pt.*, | |
CONCAT( | |
'[', | |
GROUP_CONCAT( | |
JSON_OBJECT( | |
'id', ct.id, | |
'name', ct.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
<?php | |
function showArrayAsTable($array, $parent=1) { | |
if ($parent) { | |
echo "<table>"; | |
echo "<tr>"; | |
foreach ($array[0] as $key => $value) { | |
echo "<td>{$key}</td>"; | |
} | |
echo "</tr>"; | |
} |
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
$("a[href*=http]").attr("target","_blank"); |
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
CREATE TABLE parentTable ( | |
id int NOT NULL AUTO_INCREMENT, | |
PRIMARY KEY (id), | |
name varchar(50) NOT NULL, | |
createdAt datetime DEFAULT CURRENT_TIMESTAMP, | |
-- Dynamic Columns : own datas | |
visible tinyint(1) NOT NULL DEFAULT 1, -- default is required | |
expiredAt datetime DEFAULT NULL | |
); |
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
<style> | |
/* define a function */ | |
.myFunction { | |
border: 3px solid rgba(var(--baseColorRGB)); | |
background-color: rgba(var(--baseColorRGB), 0.2); | |
} | |
/* Global Variables (Default Parameters) */ | |
:root { | |
--baseColorRGB: 255, 0, 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
let deletedQuery = "deleted"; | |
let reMessage = "You deleted that message but you cannot delete this message"; | |
function controlLoop(){ | |
try { | |
// If last message is deleted | |
if(document.querySelector("#main > div._2gzeB > div > div._33LGR > div.n5hs2j7m.oq31bsqd.gx1rr48f.qh5tioqs > div:nth-last-child(1) > div > div.ItfyB._3nbHh > div._22Msk > div.p357zi0d.ktfrpxia.nu7pwgvd.fhf7t426.sap93d0t.r15c9g6i > div.tvf2evcx.m0h2a7mj.lb5m6g5c.j7l1k36l.ktfrpxia.nu7pwgvd.gjuq5ydh.kiiy14zj.j4enbv94 > div").innerHTML.includes(deletedQuery)){ | |
sendMessage(reMessage); | |
console.log("resent message"); | |
} | |
}catch(err) { |
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
<? | |
function iConverterTurkish($str, $dir="upper"){ | |
$low = array('ı','i','ğ','ü','ş','ö','ç'); | |
$up = array('I','İ','Ğ','Ü','Ş','Ö','Ç'); | |
return $dir=="upper" ? | |
str_replace($low, $up, $str) : | |
str_replace($up, $low, $str) ; | |
} | |
function ucfirstTurkish($str) { |
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 blockInputInjection = (input) => { | |
return input.replace(/<\/[^>]*>/g, "</div>").replace(/<[^>]*>/g, "<div hidden>"); | |
} | |
// Sample Usage | |
harmfulInput = 'Hi, <b>Listen Me Now</b><br></br><img src="x"><br/><img src="y"/><script>alert("You have been hacked.");fetch("POST url datas");</script>'; | |
harmlessInput = blockInputInjection(harmfulInput); | |
// Result | |
'Hi, <div hidden>Listen Me Now<div hidden><div hidden><div hidden><div hidden><div hidden><div hidden><div hidden>alert("You have been hacked.");fetch("POST url datas");<div hidden>' |
NewerOlder