How do I use Browserify with external dependencies?

You can achieve that by using browserify-shim. Assuming that you’ve got a module named mymodule.js that depends on jQuery in the global scope with the following contents: var $ = require(‘jQuery’); console.log(typeof $); Install browserify-shim: npm install browserify-shim –save-dev In package.json file, tell browserify to use browserify-shim as a transform: { “browserify”: { “transform”: [ … Read more

Integrate JavaScript in JSF composite component, the clean way

I’d say that what you’ve there is the best you can get, provided that you’re absolutely positive that the HTML element’s nature is so unique that you absolutely need to select it by an ID, every time again. If the HTML representation is not that unique (I can imagine that a Facelets template or include … Read more

How to get LinkedIn r_fullprofile access?

QUESTION-1: For getting permission to access r_fullprofile, you will have to apply to become a member of a relevant Partner Program. Apply for partner status with LinkedIn, explaining what your integration is and how it works. If it meets the criteria of “we feel that they’re providing value to members, developers and LinkedIn,” then r_fullprofile … Read more

Integrate Python And C++

Interfacing Python with C/C++ is not an easy task. Here I copy/paste a previous answer on a previous question for the different methods to write a python extension. Featuring Boost.Python, SWIG, Pybindgen… You can write an extension yourself in C or C++ with the Python C-API. In a word: don’t do that except for learning … Read more

Java Python Integration

Why not use Jython? The only downside I can immediately think of is if your library uses CPython native extensions. EDIT: If you can use Jython now but think you may have problems with a later version of the library, I suggest you try to isolate the library from your app (e.g. some sort of … Read more

Spring JSF integration: how to inject a Spring component/service in JSF managed bean?

@ManagedBean vs @Controller First of all, you should choose one framework to manage your beans. You should choose either JSF or Spring (or CDI) to manage your beans. Whilst the following works, it is fundamentally wrong: @ManagedBean // JSF-managed. @Controller // Spring-managed. public class BadBean {} You end up with two completely separate instances of … Read more

tech