Conflicting library version in a Java Maven project

You can use the tree goal of the Maven dependency plugin to display all transitive dependencies in your project and look for dependencies that say “omitted for conflict”.1 mvn dependency:tree -Dverbose mvn dependency:tree -Dverbose | grep ‘omitted for conflict’ Once you know which dependency has version conflicts, you can use the includes parameter to show … Read more

Weird Chrome prototype/jQuery conflict

From Core/jQuery.noConflict: NOTE: This function must be called after including the jQuery javascript file, but BEFORE including any other conflicting library, and also before actually that other conflicting library gets used, in case jQuery is included last. noConflict can be called at the end of the jQuery.js file to globally disable the $() jQuery alias. … Read more

R: 2 functions with the same name in 2 different packages

You have probably already noticed that the order of loading the packages makes a difference, i.e. the package that gets loaded last will mask the functions in packages loaded earlier. To specify the package that you want to use, the syntax is: chron::is.weekend() tseries::is.weekend() In other words, use packagename::functionname() In addition, if you know that … Read more

jQuery and MooTools Conflict

When you have jQuery specific code that is using $, the simplest way is to wrap the code with the following: // Disable the $ global alias completely jQuery.noConflict(); // For jQuery scripts (function($){ // set a local $ variable only available in this block as an alias to jQuery … here is your jQuery … Read more

jQuery & Prototype Conflict

There are two possible solutions: There was a conflict with an older version of Scriptaculous and jQuery (Scriptaculous was attempting to extend the native Array prototype incorrectly) – first try upgrading your copy of Scriptaculous. If that does not work you will need to use noConflict() (as alluded to above). However, there’s a catch. Since … Read more

Gesture recognizer and button actions

In the “shouldReceiveTouch” method you should add a condition that will return NO if the touch is in the button. This is from apple SimpleGestureRecognizers example. – (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { // Disallow recognition of tap gestures in the segmented control. if ((touch.view == yourButton)) {//change it to your condition return NO; } return … Read more