Laravel Render a View and Store the Contents in a Variable

Sometimes one may want to load a View with some PHP data passed to it and store it in a variable inside the Controller’s action. This rendered view data might be later passed to another view which is finally loaded and dumped to the user’s screen.

Continue reading “Laravel Render a View and Store the Contents in a Variable”

Send Newsletters or Email Marketing Campaigns via Amazon SES with Sendy (PHP app) for Cheap (a Review)

Email newsletters is one of the most effective way to execute your marketing campaigns by reaching out directly to your subscribers who are basically your customers, readers, fans/followers or prospects. But the issue that many of us face is that, as the subscriber base grows or we want to send emails more frequently, the entire process can get a bit pricey when using services like Mailchimp, Campaign MonitorAweber, Signal, Constant Contact, GetResponse, LoopFuseSales-PushMad MimiCampaigner, Vertical Response, Benchmark Email, iContact, JangoMail, Boomerang and Ezine Director – unless our requirements can be fulfilled by their free plans.

Continue reading “Send Newsletters or Email Marketing Campaigns via Amazon SES with Sendy (PHP app) for Cheap (a Review)”

Solve Your Game Audio Problems on iOS and Android with Web Audio API

So you made your game or some other app that has multiple sound effects produced by several audio files. It works great on your desktop, laptop, etc. browsers but then you realize that you have some major issues with multiple sounds (or even single) on mobile and tablet platforms like iOS and android browsers. Sad!

Continue reading “Solve Your Game Audio Problems on iOS and Android with Web Audio API”

Fixing HTML5 Audio Problems in iOS and Android Mobile Browsers to Overcome the Limitations

In one of my earlier posts I discussed some of the issues (or limitations) with HTML5 audio support in iOS and Android mobile and tablet platforms. In this article I am going to try to take a look at some of the ways we can overcome those limitations and quirks.

Continue reading “Fixing HTML5 Audio Problems in iOS and Android Mobile Browsers to Overcome the Limitations”

HTML5 Audio Behaviour and Support in iOS and Android

Few months back I was developing an HTML5 game where I really struggled with adding and playing the different sound/audio effects properly across different browsers and platforms, especially in mobiles and tablets. As I made some progress, I decided to document the support and behaviour of HTML5 Audio in mobile environments – iOS and Android – based on my trials.

Continue reading “HTML5 Audio Behaviour and Support in iOS and Android”

Binary and Red Black Search Tree Implementation in JavaScript

Binary Tree

I’m not going to dive deep into what Binary Search Tree is because this tutorial and Wikipedia does an excellent job at that. Instead I’ll mostly dicuss about a neat JS implementation that I came across recently, usable on the server side with Node.js and client-side as well.

Continue reading “Binary and Red Black Search Tree Implementation in JavaScript”

Weighted/Biased Random Number Generation with JavaScript based on Probability

weighted random post image

First of all what is weighted random ? Let’s say you have a list of items and you want to pick one of them randomly. Doing this seems easy as all that’s required is to write a little function that generates a random index referring to one of the items in the list. Sometimes plain randomness is not enough, we want random results that are biased or based on some probability. This is where a simple weighted random generation algorithm can be used.

Continue reading “Weighted/Biased Random Number Generation with JavaScript based on Probability”