Details
Joined devRant on 5/31/2016
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
Can't git push
because of an "access denied" error message
because I didn't set up my key file properly (with right paths, right format and so on)
because I'm working from my home laptop device
because I'm in home office
because Corona
..but..
I can connect to my work computer where git is set up properly but also I
can't git push
because I can't "cd" into the project path
because the samba mount point is messed up
because I don't reboot my machine to fix it
because I can't enter my password
because it does have a full hard drive encryption and the password screen shows up before the network services are started.2 -
Me clicking on "New article" ...
Title:
<span onclick='return 1248 == prompt('When the construction of the Cologne Cathedral started?');">Click me to open the treasure</span>
Text:
<span onmouseover="alert('No?');" style="width:100%;height:500px;">It's ok that every editor can insert arbitrary HTML?</span>
Don't worry, it's a dev server but still bad to see -
I'm the only who occasionally swims like exactly 32, 64 or 128 lanes when doing sports? Or doing something like 64 rounds instead of 50 or 128 instead of 100?1
-
<?php
// This is the demo code of a PHP gotcha which took me some hours to figure out
$hr = "\n<hr>\n";
$JSON = '{"2":"Element Foo","3":"Element Bar","Test":"Works"}';
$array = (array)json_decode($JSON);
echo "Version: " . phpversion() . $hr;
// Tested on: 5.5.35 and 7.0.15
var_dump($array);
// Prints: array(3) { '2' => string(11) "Element Foo" '3' => string(11) "Element Bar" 'Test' => string(5) "Works" }
echo $hr;
var_dump($array['Test']);
// Prints: string(5) "Works"
echo $hr;
var_dump($array[2]);
var_dump($array['2']);
var_dump($array["2"]);
var_dump($array[3]);
var_dump($array['3']);
var_dump($array["3"]);
// Prints: NULL + Notice: Undefined offset ... in ...
echo $hr;
$newArray = array();
foreach ($array as $key => $value) $newArray[$key] = $value;
var_dump($newArray[2]);
var_dump($newArray['2']);
var_dump($newArray["2"]);
// Prints three times: string(11) "Element Foo"
var_dump($newArray[3]);
var_dump($newArray['3']);
var_dump($newArray["3"]);
// Prints three times: string(11) "Element Bar"1 -
Sometimes being a developer really sucks. I adopted a heavily customized OXID shop which introduced an ingame currency beside the fiat currency.
It was done by introducing $iPriceChannel and replacing the $dPrice float value with a multidimensional array across all components, controllers and models.
Wait ... not 100% of the code has been "adapted" yet but it's sufficient to get it working at the first glance.
The reality is: The shop has many subtle bugs and piles up huge (error) log files.
Every time when a bug was found,
and every time the shop maintainer is unlocking an OXID feature which hasn't been used yet, I have to fix it.
It's even extra hard to fix issues sometimes because the shop is embed in a game by utilizing a content-aware reverse proxy. My possibilities to navigate through the shop directly is limited because some of the AJAX/CSS/HTML elements doesn't work without loading this game.1