Monaco editor’s provideCompletionItems callback not firing (TriggerCharacters not working)

Monaco editor’s provideCompletionItems callback not firing (TriggerCharacters not working)

I ran into a bug where the monaco editor was not showing the autocomplete dropdown even though I had specified my trigger characters correctly. The root cause was because of 2 issues: I did not register my custom language using monaco.languages.register(….). Once I did register my language, I was registering it after the editor was already mounted. It must be registered first.

Little-Known Awesome Algorithms: Fenwick Trees

Little-Known Awesome Algorithms: Fenwick Trees

Contrived Use Case Imagine that we are creating an analytics tool for a financials brokerage, where orders are coming in all the time. Let’s say we’re interested in knowing how many orders fall between a certain value (a range query), in real-time. Lets say that orders can fall between $0.01 and $5M, and we want to let our clients query at any given time how many orders have gone through so far that fall between any $x and $y. A fairly simple implementation…

Read More Read More

How to program a Gaussian Blur without using 3rd party libraries

How to program a Gaussian Blur without using 3rd party libraries

  What is a Gaussian Blur? Something I found fairly difficult to find online was a simple explanation on how to implement my own Gaussian Blur function. This article will explain how to implement one. The basic idea behind a Gaussian Blur is that each pixel becomes the average of the pixels around it, sort of. Instead of simply taking the average of all the pixels around it, you take a weighted average. The weighting of each pixel is greater if it…

Read More Read More

Over-the-wire Natas28 Security Puzzle

Over-the-wire Natas28 Security Puzzle

You are given a search tool which finds jokes which contain your search term. The form submission returns a 302 redirect to another page with an encrypted get param already attached. This encrypted param must contain your input in some way. They look something like this: G%2BglEae6W%2F1XjA7vRm21nNyEco%2Fc%2BJ2TdR0Qp8dcjPIWwm0xpPpp9XnS4%2FRG86COn7KRweZpSA6OMfSSZI8b4nOKX%2FtKRQAkZ3UXWuWWu9bzTfM5xp7c4R9mULvO1icC The data is url encoded and base 64 encoded. Undoing those will give you the raw encrypted bytes. ECB Mode If you try out several different inputs you will notice a pattern. The…

Read More Read More

Option Delta vs Actual % In-The-Money

Option Delta vs Actual % In-The-Money

I originally posted this on medium, but have since moved it here to consolidate my blog websites. Been playing around with options for the last few months and recently I purchased my first batch of historical CBOE options data. This is my first piece of research with the data-set. Delta is frequently used as an approximation for the probability of an option expiring in the money (This is different from probability of profit where the underlying has to pass the…

Read More Read More

Using Print Nodes within Material Shader Builder to Debug Houdini VOPs

Using Print Nodes within Material Shader Builder to Debug Houdini VOPs

Above is a video of what I’m about to explain. If you’re working with VOP nodes to build a material shader builder then there’s a special procedure you have to follow to get the Print node working. The Print node lets us send text to the Houdini console, but there’s extra steps necessary in this case because the material shader builder is ‘multi-context’. The Print node has to know what context it is within before it can function, because of…

Read More Read More

Incorrect shadows in Houdini with the Mantra renderer, Part 2

Incorrect shadows in Houdini with the Mantra renderer, Part 2

I originally wrote about how I had a shadow that houdini was rendering in a really bonkers way, see: http://www.s0hungry.com/2016/10/24/incorrect-shadows-in-houdini-with-the-mantra-renderer/ I have figured out what is going on, thanks to the help of a side fx engineer who commented on a post I made on the forums. It seems like when you place down a box in houdini, by default there is a single vertex normal on each corner of the box. This is a shared vertex normal (notice that it…

Read More Read More

Incorrect shadows in Houdini with the Mantra renderer

Incorrect shadows in Houdini with the Mantra renderer

For the past couple weeks I’ve been trying to figure out why the renders of my model had incorrectly placed shadows. I managed to reproduce the problem with a very simple scene (The one in the above image). There’s a spotlight pointing downwards onto a little shader ball model. The shader ball model is sitting on top of a box which I stretched out to be a floor (box from the shelf tool). As you can see, the shadow is…

Read More Read More

How to offset, scale, rotate a material in Houdini

How to offset, scale, rotate a material in Houdini

For some reason this was an hour long ordeal to figure out to do this, mostly due to my inexperience with 3d software but also because I think the material node could be more powerful to make this easier. After you add material to some part of your model, sometimes the texture is just too small/big or you would like it offset or rotated. To do this you need to manipulate the texture coordinates that are attached to the area you are…

Read More Read More

Bitnami