code Language phenotypes: SQL - Part 4 Doing a second part on this now where I do the same as Part 3 SQL with python and sql, again the core of the solving of the problem is using set functionality in SQL. Again this will beCoderPad [https://coderpad.io/] compatible Problem 1: Contains All [https://siliconheaven.info/
code HTML5 Notifications Call requestNotifyPermission at the DOM load of your particular page and then because you have to ask the users permission to send them notifications. It will looks something similar to this (this is from Google Calendar) stick notify('Message') wherever you want to display a HTML5 notification function
code Find commits Need to find commits from numerous git repositories I have on a windows machine. cd "best_code_ever" echo "best_code_ever" >> ..\commits.txt git checkout master git pull git log --pretty=format:"%ad - %an: %s" --after="2020-12-31" --author=
code Language phenotypes: SQL - Part 3 Thinking about the coding questions I have been given to solve using limited tools and well I think I can bypass the tooling issue by being creative.CoderPad [https://coderpad.io/] will allow you to use databases (it's kind of a feature most people wouldn't use
code Language phenotypes: Python, C# - Part 2 Doing a input/supply check function on coderpad.io [https://coderpad.io/] which supports 30+ languages, but in actuality a language is only as good as its tools and libraries and in that respect coderpad.io is sorely lacking on many of the languages it supports. In truth coderpad.io
code Distributed Work – Next levels Do Software as a Service developers and companies go into the physical data centers to work together? No, they work remotely from the datacenter and securely connect in and create wonders. Now is the time where we could stretch the collaborative nature of our work into higher levels i.e.
code Polyglot Language Use Why? It is not a wow this is nice feature, but the ability to use new popular languages expands knowledge and helps define services clearer. The languages themselves are built of common constructs, but each has its own strengths and weaknesses Point 1 - JavaScript is used everywhere and in
code Software Rot Mindset of software as limits to end users and management. Use software expiration dates (use feature flags to force it if you want). I have asked for this many times before in other places and in summary the idea is the same as any physical product. Wood rots, iron rusts,
code Powershell UUID Want to generate UUID on Windows and it is painful compared to Linux where if you use Debian it's uuidgen [https://man7.org/linux/man-pages/man1/uuidgen.1.html] on mac OS you probably have it under dbus-uuidgen | pbcopy i.e. cat uuidgen or echo uuidgen | setclip if
code Language phenotypes: Python, C# Doing a bucketing exercise on coderpad.io [https://coderpad.io/] which supports 30+ languages, but in actuality a language is only as good as its tools and libraries and in that respect coderpad.io is sorely lacking on many of the languages it supports. In truth coderpad.io is built
code Advent of Code Currently expanding my python [https://www.python.org/] knowledge by doing Advent of Code [https://adventofcode.com/] 2021 [https://adventofcode.com/2021]. This forces me to look up a lot of python libraries and syntax, but I feel like I am really getting a pythonic mindset now. Learning a lot
code Run As User In Linux/macOS you use the su [https://linuxize.com/post/su-command-in-linux/] command Windows does not have this and the closest thing it has is runas [https://ss64.com/nt/runas.html] with /user option. It will then prompt you for the password of this particular user. Key point here
code AWS Textract PDF to CSV PDFs are great for presenting information, but due to their structure and formatting getting structured data out of them is difficult and tedious and they could be considered unstructured data in my opinion. Say you have a PDF document like this, which is really a long table with a lot
code Code difference Code review doesn't do what I hear people tell me it does in every organization I have worked for For example * Makes code readable * Shares knowledge * Standardizes approach What it does do in my opinion (read earlier thoughts I had on this here code review [https://siliconheaven.info/
code Jinja2 Templating Experimenting with python templating of jinja2 [https://jinja.palletsprojects.com/en/3.0.x/] and finding it quite a bit nicer than the razor [https://docs.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-5.0] syntax in ASP.NET for one big reason to me that extracting the
code Octopus Deploy and Powershell Needed to deploy a pretty cool dynamic proxy called traefik [https://github.com/traefik/traefik], which is built on golang [https://golang.org/] and can be deployed as a single binary and along with some simply configs can take a lot of difficulties of say an nginx reverse proxy [https:
code Capture URL Screenshot Chrome+Windows Capturing a screenshot in Linux/macOS is documented and can be done in a single command as detailed here [https://siliconheaven.info/capture-url-screenshot-chrome-ubuntu] Doing this in Windows is a lot less clear and more painful, but you can do it like so I am not running with administrator rights so
code Capture URL Screenshot Chrome+Ubuntu Capturing a screenshot documentation Setup 1. Add google chrome package location: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb 2. Install: sudo apt install ./google-chrome-stable_current_amd64.deb Capture 1. Capture the url contents of siliconheaven.info [https://siliconheaven.info/] google-chrome --headless --hide-scrollbars --window-size=1920,2000 --screenshot=
code Python Tesseract: Read Text from Image Reading text from images using the Tesseract Code import cv2 import pytesseract if __name__ == '__main__': # setup the path for the tesseract tool pytesseract.pytesseract.tesseract_cmd = r"C:\Tesseract-OCR\tesseract.exe" #load the image img = cv2.imread("code.png") #convert to grayscale gray = cv2.
code Explaining Software: Interview Questions - Pretend I'm not a tech person. Can you explain REST in simple terms? Everyone can be a tech person and I hope that my explanation covers the concept and intentions behind REST (REpresentational State Transfer). Executive Summary: REST is an informal software specification/guideline/principle to creating
code Async Python Asynchronous Python is a pleasant experience to work with. Nothing unexpected or weird about using the await/async keywords and how they work. Basic example of an asynchronous function async def this_takes_awhile(wait_time_seconds=1): await asyncio.sleep(wait_time_seconds) That's all it takes
code Parallelizing Lookups with Common Table Expressions Individual lookups against a rules system stored in a database can add up to a lot of computations and depending on the size of your ruleset cause delays. There are ways around this with caching [https://aws.amazon.com/caching/], in memory hashmaps [https://en.wikipedia.org/wiki/Hash_table]
code JavaScript: Function as arguments Wanted to create a chain of method call backs with some simple JavaScript [https://developer.mozilla.org/en-US/docs/Web/JavaScript] as in startMethod -> calls function on success and another function on failure and it had been awhile since I did this refreshed my memory on Promises and
code SQL Server: Making JSON relational Working on a task to create a relational ordered set of prompts from rules with dynamic model binding. This is one way to do it with JSON and SQL. In this case the prompts may change, but it is a rare event. The goal is to make the SQL server