Posts

Showing posts from February, 2016

Controller Concerns in Rails 4

If you setup a Rails 4 app, you’ll notice the app/models/concerns and app/controllers/concerns directories.  Concerns are modules that can be mixed into your models and controllers to share code between them.   Some developers falsely classify mixins as composition when they are actually a form of inheritance.  When you include a module in a class, that module’s methods are added to the inheritance chain just like a parent class’ methods are added to a subclass.  So, don’t think you’ve solved the problem of inheritance by simply splitting your inherited code into separate files! That being said, mixins can be a valuable tool to share code between classes that are otherwise unrelated. Here’s an example of how I chose to use it recently.    I have an admin controller with a simple before filt

Installing Wowza Streaming Engine on ubuntu

Image
When you complete the free trial form you will get a screen like this: click whatever the linux version you do have then it will install the .run file. Linux– In the folder where you downloaded the Linux package, run the commands below for your platform. Then, follow the wizard instructions. 64-bit Linux Systems sudo chmod +x WowzaStreamingEngine-4.4.0-linux-x64-installer.run sudo ./WowzaStreamingEngine-4.4.0-linux-x64-installer.run 32-bit Linux Systems sudo chmod +x WowzaStreamingEngine-4.4.0-linux-installer.run sudo ./WowzaStreamingEngine-4.4.0-linux-installer.run If you acquired a new license key, you'll find it in the email that you received  from Wowza Sales. To create a user name and password for an Administrator account. You'll use this account to sign in to the browser-based Wowza Streaming Engine Manager. The user name and password values are case-sensitive. Linux – /usr/local/WowzaStreamingEngine-4.4.0/ (as the root user) Starting and Stopping

Highcharts with grouped categories

In highcharts may be some time you need subcategories of a category or more deep nested categories for that you need to use a js file called grouped-categories.js it is a plugin provided by highcharts for grouped categories. this plugin can be downloaded from  https://github.com/blacklabel/grouped_categories/   after download please refer to the home page for examples http://www.highcharts.com/plugin-registry/single/11/Grouped-Categories but even though I followed there documentation but I haven't found it easy for me to implement it in column range chart <div id="container" style="width: 100%; height: 100%;"></div> <script src =''> </script>    var chart = new Highcharts.Chart({             chart: {                 renderTo: "container",                 type: "columnrange",                 inverted: true             },             series: [{                 data: [ [4, 11], [5, 14], [5, 18], [5