To install Android Studio on Ubuntu 14.04, complete the following steps: First, download the Android Studio here: http://developer.android.com/sdk/index.html   The Android Studio requires Java’s JDK 6 or above (preferably 7), so you’ll want to do the following at your command line: sudo apt-get install openjdk-7-jre sudo apt-get install openjdk-7-jdk   Or, if you prefer to use the Android Studio recommended Oracle JDK, you can do the following: sudo apt-get install [...]
Read More
If you’re running into a rails migration exception, such as: column “x” of relation “y” already exists Then you can conditionally run the associated migration in the following way: YourModel.reset_column_information unless YourModel.column_names.include?("the_column") add_column(:your_models, :the_column, :boolean, :default=>true) end   Of course, it is probably best to address the underlying workflow issues that caused this issue to occur in the first place. However, if you just want to move along to get [...]
Read More
To check a checkbox after clicking a table’s tr element, do the following: $(document).on("click",".your-tr-element",function(event){ checkbox = $(this).find("input:checkbox"); if(event.target.type!="checkbox"){ if($(checkbox).prop("checked") == true){ $(checkbox).prop("checked",false); }else{ $(checkbox).prop("checked",true); } } });   By retaining the event in the callback function, we’re able to ensure the clicked element is not the checkbox itself. This will solve the issue of effectively clicking the checkbox twice and reverting the intended functionality.
Read More
To use the CKeditor without the top and bottom toolbars, do the following: config.removePlugins = "toolbar,elementspath" config.resize_enabled = false   This will remove both the capability to resize the dialog and remove the grey toolbar at the bottom, as well as the entire top toolbar, without the need for CSS modifications. If you’re using the rails plugin – these options can be passed in when creating the cktext_area object, for [...]
Read More