if(date.getFullYear() <= 2017) {
if(date.getMonth() <= 11) {
if(date.getDate() <= 26) {
if(date.getHours() <= 23) {
if(date.getMinutes() <= 59) {
if(date.getSeconds() <= 59) {
//Display popup before 2017-11-27
}
}
}
}
}
}
spring.datasource.password=#{@secretsManager.getJsonField('${DSP_DB_SECRET:}', 'password', @secretsManager.getString('${DSP_DB_PASSWORD_SECRET:}', '${DSP_DB_PASSWORD:}'))}
String boot, 3 env variables written as string containing code executable code which cannot be verified by compiler. Welcome to Java
apps_to_be_deployed = apps_to_be_deployed.strip()
if apps_to_be_deployed.endswith(":"):
apps_to_be_deployed_length = len(apps_to_be_deployed)
apps_to_be_deployed_list = list(apps_to_be_deployed)
apps_to_be_deployed_list[apps_to_be_deployed_length - 1] = ''
apps_to_be_deployed = "".join(apps_to_be_deployed_list)
function atoi(charstring)
{
if(charstring=="a") return 0x61;if(charstring=="b") return 0x62;
if(charstring=="c") return 0x63;if(charstring=="d") return 0x64;
if(charstring=="e") return 0x65;if(charstring=="f") return 0x66;
if(charstring=="g") return 0x67;if(charstring=="h") return 0x68;
if(charstring=="i") return 0x69;if(charstring=="j") return 0x6a;
if(charstring=="k") return 0x6b;if(charstring=="l") return 0x6c;
if(charstring=="m") return 0x6d;if(charstring=="n") return 0x6e;
if(charstring=="o") return 0x6f;if(charstring=="p") return 0x70;
if(charstring=="q") return 0x71;if(charstring=="r") return 0x72;
if(charstring=="s") return 0x73;if(charstring=="t") return 0x74;
if(charstring=="u") return 0x75;if(charstring=="v") return 0x76;
if(charstring=="w") return 0x77;if(charstring=="x") return 0x78;
if(charstring=="y") return 0x79;if(charstring=="z") return 0x7a;
if(charstring=="0") return 0x30;if(charstring=="1") return 0x31;
if(charstring=="2") return 0x32;if(charstring=="3") return 0x33;
if(charstring=="4") return 0x34;if(charstring=="5") return 0x35;
if(charstring=="6") return 0x36;if(charstring=="7") return 0x37;
if(charstring=="8") return 0x38;if(charstring=="9") return 0x39;
if(charstring==".") return 0x2e;
return 0x20;
}
found in a proxy script
// check if user is valid or not
ValidUserValidationResult userValidationResult = validUserValidator.validateUser(validationRequest);
foreach (Byte bajt in data ) {
BufferIndex = i++;
if (!char.IsControl((char)bajt))
MyCharacter = Convert.ToChar(bajt).ToString();//Encoding.ASCII.GetString(new[]{bajt});
else
MyCharacter = " ";
if (BufferIndex == 200)
{
int a = BufferIndex;
}
if (BufferIndex < 200)
{
sw.WriteLine("PrintBuffer1[" + BufferIndex + "] :=\t" + bajt + "\t; // " + String.Format(@"0x{0:x2}", (ushort)bajt) + "\t" + MyCharacter );
}
if (BufferIndex >= 200 && BufferIndex < 400)
{
BufferIndex = BufferIndex - 200;
sw.WriteLine("PrintBuffer2[" + BufferIndex + "] :=" + bajt + "; // " + String.Format(@"0x{0:x2}", (ushort)bajt) + " " + MyCharacter);
}
if (BufferIndex >= 400 && BufferIndex < 600)
{
BufferIndex = BufferIndex - 400;
sw.WriteLine("PrintBuffer3[" + BufferIndex + "] :=" + bajt + "; // " + String.Format(@"0x{0:x2}", (ushort)bajt) + " " + MyCharacter);
}
if (BufferIndex >= 600 && BufferIndex < 800)
{
BufferIndex = BufferIndex - 600;
sw.WriteLine("PrintBuffer4[" + BufferIndex + "] :=" + bajt + "; // " + String.Format(@"0x{0:x2}", (ushort)bajt) + " " + MyCharacter);
}
if (BufferIndex >= 800 && BufferIndex < 1000)
{
BufferIndex = BufferIndex - 800;
sw.WriteLine("PrintBuffer5[" + BufferIndex + "] :=" + bajt + "; // " + String.Format(@"0x{0:x2}", (ushort)bajt) + " " + MyCharacter);
}
if (BufferIndex >= 1000 && BufferIndex < 1200)
{
BufferIndex = BufferIndex - 1000;
sw.WriteLine("PrintBuffer6[" + BufferIndex + "] :=" + bajt + "; // " + String.Format(@"0x{0:x2}", (ushort)bajt) + " " + MyCharacter);
}
if (BufferIndex >= 1200 && BufferIndex < 1400)
{
BufferIndex = BufferIndex - 1200;
sw.WriteLine("PrintBuffer7[" + BufferIndex + "] :=" + bajt + "; // " + String.Format(@"0x{0:x2}", (ushort)bajt) + " " + MyCharacter);
}
if (BufferIndex >= 1400 && BufferIndex < 1600)
{
BufferIndex = BufferIndex - 1400;
sw.WriteLine("PrintBuffer8[" + BufferIndex + "] :=" + bajt + "; // " + String.Format(@"0x{0:x2}", (ushort)bajt) + " " + MyCharacter);
}
if (BufferIndex >= 1600 && BufferIndex < 1800)
{
BufferIndex = BufferIndex - 1600;
sw.WriteLine("PrintBuffer9[" + BufferIndex + "] :=" + bajt + "; // " + String.Format(@"0x{0:x2}", (ushort)bajt) + " " + MyCharacter);
}
if (BufferIndex >= 1800 && BufferIndex < 2000)
{
BufferIndex = BufferIndex - 1800;
sw.WriteLine("PrintBuffer10[" + BufferIndex + "] :=" + bajt + "; // " + String.Format(@"0x{0:x2}", (ushort)bajt) + " " + MyCharacter);
}
if (BufferIndex >= 2000 && BufferIndex < 2200)
{
BufferIndex = BufferIndex - 2000;
sw.WriteLine("PrintBuffer11[" + BufferIndex + "] :=" + bajt + "; // " + String.Format(@"0x{0:x2}", (ushort)bajt) + " " + MyCharacter);
}
if (BufferIndex >= 2200 && BufferIndex < 2400)
{
BufferIndex = BufferIndex - 2200;
sw.WriteLine("PrintBuffer12[" + BufferIndex + "] :=" + bajt + "; // " + String.Format(@"0x{0:x2}", (ushort)bajt) + " " + MyCharacter);
}
}
don't repeat yourself.. whyy we don't have PrintBufeer[i] ?
import cv2
import numpy as np
cap = cv2.VideoCapture(0)
while (1):
_, frame = cap.read()
hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)
lower_green = np.array([40, 50, 50])
upper_green = np.array([80, 102, 200])
# Threshold the HSV image to get only green colors
mask = cv2.inRange(hsv, lower_green, upper_green)
total_pixels = mask.shape[0] * mask.shape[1]
print "Number of pixels: %", total_pixels
pixel_counter = 0
x_counter = 0
y_counter = 0
for y in xrange(640):
for x in xrange(480):
pixel = mask[x, y]
if pixel == 255:
pixel_counter += 1
x_counter += x
y_counter += y
x_center = x_counter / pixel_counter
y_center = y_counter / pixel_counter
print x_center, y_center
cv2.line(frame, (x_center+15, y_center), (x_center+2, y_center), (235, 218, 100), 1)
cv2.line(frame, (x_center-15, y_center), (x_center-2, y_center), (235, 218, 100), 1)
cv2.line(frame, (x_center, y_center+15), (x_center, y_center+2), (235, 218, 100), 1)
cv2.line(frame, (x_center, y_center-15), (x_center, y_center-2), (235, 218, 100), 1)
cv2.circle(frame, (x_center, y_center), 4, (235, 218, 100), 2)
cv2.imshow('frame', frame)
k = cv2.waitKey(5) & 0xFF
if k == 27:
break
cv2.destroyAllWindows()
track the green color
local part = script.Parent
local OriginColor = Color3.new(0,170,255)
local KillColor = Color3.new(1, 0, 0)
part.Touched:Connect(function(H)
local humanoid = H.Parent:FindFirstChild("Humanoid")
if humanoid and part.Color == KillColor then
humanoid.Health = 0
end
end)
local shit = 1
repeat
part.Color = OriginColor
wait(1.5)
part.Color = KillColor
wait(1.5)
until shit == 2
String s = "string";
String.valueOf(s).toString();
// just to make sure it's a damn string
while(!s instanceof String) {
String.valueOf(s).toString();
}
if (isset($data['phone_id']) && !empty($data['phone_id'])) {
$userPhone = $this->getDoctrine()->getRepository('STODBBundle:Phones')->find($data['phone_id']);
if ($userPhone->getPhoneNumber() != $data['phone'] || $userPhone->getMobileProviderCode()->getId() != $data['phone_code']) {
if ($data['smsCode'] ?? false) {
if ($sessionSmsCode !== $data['smsCode']) {
$aData['smsCodeShow'] = false;
$aData['isWrongCode'] = true;
} else {
$aData['isWrongCode'] = false;
$checkCode = $data['smsCode'];
}
} else {
$aData['smsCodeShow'] = true;
$aData['isWrongCode'] = true;
}
} elseif (!$userPhone->getCodeCheck()) {
if ($data['smsCode'] ?? false) {
if ($sessionSmsCode !== $data['smsCode']) {
$aData['smsCodeShow'] = false;
$aData['isWrongCode'] = true;
} else {
$aData['isWrongCode'] = false;
$checkCode = $data['smsCode'];
}
} else {
$aData['smsCodeShow'] = true;
}
} else {
$aData['isWrongCode'] = false;
}
} else {
if ($data['smsCode'] ?? false) {
if ($sessionSmsCode !== $data['smsCode']) {
$aData['smsCodeShow'] = false;
$aData['isWrongCode'] = true;
} else {
$aData['isWrongCode'] = false;
$checkCode = $data['smsCode'];
}
} else {
$aData['smsCodeShow'] = true;
}
}
shit ... this junior
"check cassandra config" in {
val config: Configuration = pureconfig.loadConfigOrThrow[Configuration]
config.cassandra.hosts shouldBe List("192.168.26.207")
config.cassandra.keyspace shouldBe "releases"
}
Why not to check works cassandra or not? What is the difference between this and hardcoding data right in source?
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
var token = new CancellationTokenSource().Token;
Task.Factory.StartNew (() => {
while (!token.IsCancellationRequested) {
try {
if (/*Condition*/)
this.Invoke(new Action(() => label.Text = " =)"));
else
this.Invoke(new Action(() => label.Text = " =("));
Thread.Sleep(10);
}
catch (Exception) {
throw;
}
finally {
throw new Exception();
}
}
}) ;
}
}
My collegue's way of using multithreading features (and exceptions handling) :)
function isEmpty(value) {
if (value === '') {
return false;
} else if (value === 0) {
return false;
} else if (value === null) {
return false;
} else if (value === undefined) {
return false;
} else {
return true;
}
return true;
}
javascript empty value check
int w = 100;
for (nil; w!=0; nil) {
w -= 1;
//so some shit
}
this code was found in chinese contract work
public static <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> String get(A h, B u, C e, F l, G o, D v, E p, H a, I b, L c, K d, N f, J g, P i, M j, N m) {
StringBuilder yes = new StringBuilder();
yes.append((String) String.valueOf(h.toString()));
yes.append((String) String.valueOf(u.toString()));
yes.append((String) String.valueOf(e.toString()));
yes.append((String) String.valueOf(l.toString()));
yes.append((String) String.valueOf(o.toString()));
yes.append((String) String.valueOf(v.toString()));
yes.append((String) String.valueOf(p.toString()));
yes.append((String) String.valueOf(a.toString()));
yes.append((String) String.valueOf(b.toString()));
yes.append((String) String.valueOf(c.toString()));
yes.append((String) String.valueOf(d.toString()));
yes.append((String) String.valueOf(f.toString()));
yes.append((String) String.valueOf(h.toString()));
yes.append((String) String.valueOf(g.toString()));
yes.append((String) String.valueOf(i.toString()));
yes.append((String) String.valueOf(j.toString()));
return (String) String.valueOf(yes.toString());
}
why