I am not a fan that Java doesn’t have a nice way of dealing with JSON. All the other tutorials say, “Just make a POJO and then inject it into your ObjectMapper”. I agree with that sentiment on certain occasions; however, I needed to process a search that is sending a JSON Request via a POST. There isn’t really a need to make a full-blown POJO for a couple of JSON elements. Below is a quick way to access a nested array in JSON using Google’s JSON library called GSON.
In the example below, I am receiving a POST request…
So if you are like me and enjoy buying video games around Christmas time, you might have come across the 40% sale of Star Wars Squadron on Steam. Like a good little capitalistic idiot I am, I purchased this game and install it.
There is a bit of vulgarity in the next few paragraphs. #DealWithIt
The problem I ran into was that everytime I tried to start the game I would get an error from the piece of shit anti-cheat software called Easy-Anti-Cheat (EAC). …
I am in the middle of importing some D&B Business data into my database and I was getting this error while trying to run my import.
When trying to run:
import csvwith open(file_location,encoding='utf-8') as csvfile:
I was getting this:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x84 in position 747: invalid start byte
If you look up 0x84 its a double quotes issue (I swear quotes drive me bonkers sometimes).
The easiest and fastest way to fix this is to re-encode your CSV. This was an easy fix on Windows. Below are my steps
Override your method with $event, and then add your parameters after that
So if you are like me, you tend to forget some of the litter nuances of frameworks. Especially if you’re writing a multiple languages. In 5 minutes, you might touch python for your backend, PHP for your website, view for your front end, and then be knee-deep in MySQL queries.
As I was working on a piece of one of my Vue Components, I was trying to get an :on-click event to handle multiple parameters. However, for some reason I could only get the value paraments…
If you are anything like me, and have common sense in the workplace, you don’t want to waste your time watching videos that re-iterate what you have already learned AND apply on a daily basis in the workplace. Below are the steps to skip through those videos.
let boring = document.querySelector('video');
boring.currentTime = boring.duration
That’s it! The video will automatically fast forward to the end and you can move to the next video/exercise.
Enjoy! Now get back to coding something great!!
I tried searching through a HD that I have for a particular file. However, using the Search in Window Explorer is slow. And using Powershell was even worse. The following code made me want to go be a farmer in the hills…
ls DIRECTORY_LOCATION_HERE | Select-String "Blah"
So I turned to my favorite snake, Python!!!
Below is the code I wrote to find all files that included my search term. Enjoy.
Happy Coding! And if you haven’t already done so, make sure to subscribe to Code Kings publication on Medium for other tips and tricks.
This is a quick guide on how to successfully share a local drive inside your VM running on Virtualbox.
For a project that I am currently working on, I am creating a chat application within a single page Vue application with a Laravel backend, and then I ran into this problem.
I ran into an issue where as I would have users disconnect and reconnect to the chat instance (aka the Echo listeners), they would hear the same event multiple times. So if a user typed “Hello” and they had entered/exited the chat box 4x. They would get:
This is because you have one global Pusher Echo instance running on your main part of your…
While I was sitting here at work trying to do some C# work on Ellie Mae’s Encompass Platform, I thought I’d share a quick post about how to modify a registry key in Powershell. You can also use the regedit tool if you’d like, but I prefer to live in terminals & consoles :).
Open up Powershell in Administrator mode.
I was sitting at a co-working space and I wanted to get my VM on the local network. However, I wasn’t sure what IPs were available on the network, so I wanted to make sure which ip’s were available, or at least not being used at this present time. I went to use my ol’ trust Nmap program to scan the network and got this error
dnet: Failed to open device eth0
My Npcap was out of date.
If you are using Win 10, make sure to download the latest version of Nmap and Npcap. Should be good after that. I ran mine via Powershell.