Let’s go and add them also…????. . . . def set(self , key , value): try: self. db[str(key)] = value…
Continue Readingreturn
Sorting Algorithms: Implementing Merge Sort Using Swift
Sorting Algorithms: Implementing Merge Sort Using SwiftJimmy M AnderssonBlockedUnblockFollowFollowingFeb 10In the previous article we looked under the hood of Heap Sort,…
Continue ReadingHow to create commands to generate custom tests using Laravel
How to create commands to generate custom tests using LaravelJonas ElanBlockedUnblockFollowFollowingFeb 9MotivationGood development companies know: TDD is important to the health…
Continue ReadingExceptional Go
instead of save, and then I rescued and dealt with the invalid record case, giving the user a chance to…
Continue ReadingDemystifying @decorators in Python
Just by adding the @decorator_function statement before the def statement for the hello_world, we’ve modified it. But as you may…
Continue ReadingWhat is Memoization in Javascript?
Didn’t you wish there was an easy way to remember and retrieve those past results without having to recalculate the…
Continue ReadingCollecting all IPv4 WHOIS records in Python
""" import json from random import randint import socket import struct import sys from docopt import docopt import ipcalc from…
Continue ReadingUser Authentication with Django REST Framework and JSON Web Tokens
""" def _create_user(self, username, email, password=None, **extra_fields): if not username: raise ValueError('The given username must be set') if not email:…
Continue Reading(Almost) Real-Time Twitter Sentiment Analysis with Tweep & Vader
Let’s create a function to capture and display on a plot the sentiment of all 200 last tweets of Donald…
Continue ReadingApplied C++: Return Multiple Values
One byte more and we have to use the stack.Still, we don’t need to load output param addresses, so it…
Continue Readingshellcoding 101 — RPISEC/MBE/lab3C
The memory segment that holds the .bss is not marked as a non-executable (/* gcc -z execstack -fno-stack-protector -o lab3C lab3C.c…
Continue ReadingHow to Create 3D Games with PureScript Native and C++
Ideally, you’ll want to use [=] instead of [&] so you don’t alter the input parameters.Here’s some typical C++ lambda…
Continue ReadingHow to Get Rid of that Pesky “Not Secure” Tag on Your Web Application
Then, add these two files to your default.conf’s port 443 configuration, as such:server{ listen 80; return 301 https://$host$request_uri;}server { listen…
Continue ReadingUsing PHP Traits for Laravel Eloquent Relationships
FYI I prefer to have getters and setters rather than accessing properties magically.So lets say we have a Post model…
Continue ReadingLaravel AJAX Only Middleware
* It is known to work with common JavaScript frameworks: * * @see http://en.wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript * * @return bool true if…
Continue ReadingCongrats! You failed your first code challenge!
It should look something like this.We iterate through every instance of the Car class and return an array that contains…
Continue Reading