小编EL *_*mel的帖子

如何在运行时动态地将外部jar文件添加到ClassPath?

我希望使用java代码动态地将jar文件添加到我的项目的类路径中,如果可能的话,我想使用外部jar文件并加载它们的类,将它们作为Beans稍后执行(Spring框架).

谢谢 :)

java spring classpath

19
推荐指数
1
解决办法
3万
查看次数

如何修复Worklight项目找不到MBean?

在服务器上部署Worklight项目时遇到问题.它显示以下错误消息:

FWLSE3041E: No MBean found for Worklight project 'MyProject'. Possibly the Worklight runtime web application for Worklight project 'MyProject' is not running. If it is running, use JConsole to inspect the available MBeans.
Run Code Online (Sandbox Code Playgroud)

当我试图预览我的应用程序时,它显示以下消息:

SRVE0777E: Exception thrown by application class 'com.worklight.core.auth.impl.AuthenticationFilter.verifyServletInitialized:420'
Run Code Online (Sandbox Code Playgroud)

worklight-server worklight-runtime ibm-mobilefirst

7
推荐指数
1
解决办法
7090
查看次数

为什么插页式广告没有显示在设备上

我开发了一个 Android 应用程序,并集成了 Google 的 adMob 插页式广告。问题是,在模拟器上,广告已成功显示,但在我的设备上却没有显示。我创建了在 AdMob 上创建的广告单元 ID,并将应用程序链接到了 adMob。

这是我的代码:

InterstitialAd mInterstitialAd;

mInterstitialAd = new InterstitialAd(this);
        mInterstitialAd.setAdUnitId(getString(R.string.interstitial_full_screen));
        AdRequest adRequest = new AdRequest.Builder().build();
        // Load ads into Interstitial Ads
        mInterstitialAd.loadAd(adRequest);
        mInterstitialAd.setAdListener(new AdListener() {
            public void onAdLoaded() {
                showInterstitial();
            }
        });
Run Code Online (Sandbox Code Playgroud)

现在 showInterstitial() 函数:

private void showInterstitial() {
    Random r = new Random();
    if (mInterstitialAd.isLoaded()) {
        new android.os.Handler().postDelayed(
                new Runnable() {
                    public void run() {

                        mInterstitialAd.show();
                        AdRequest adRequest = new AdRequest.Builder().build();
                        mInterstitialAd.loadAd(adRequest);
                    }
                },
                r.nextInt(7000 - 5000) + 5000);

    } …
Run Code Online (Sandbox Code Playgroud)

android interstitial admob

2
推荐指数
1
解决办法
9388
查看次数

骨干点击事件未在模板视图中触发

我正在开发一个基于动态模板的Backbone应用程序.我有一个标题视图,侧面板视图和页脚视图,在调用任何其他视图时动态初始化.问题是我在每个模板视图上都有未触发的事件.例如,我有一个按钮,用于更改标题视图中的语言,但其事件未触发.

我的标题查看:

define([ "jquery", "backbone", "text!../../pages/header.html" ], function($,
        Backbone, headerTpl) {

    var header = Backbone.View.extend({
        events : {
            "click #enBtn":"swichToEnglish",
             "click #frBtn":"swichToFrench"
        },
        initialize : function(options) {
             _.bindAll(this, "swichToFrench","swichToEnglish");

            this.render(options.parent);
            //$("#enBtn").css("pointer-events","none");

        },
        render : function(parent) {
            this.template = _.template(headerTpl);
            $(parent).append(this.template);
            return this;
        },
        swichToFrench:function(){
            console.log("switch to frensh");
            if(i18n.currentLocal == 'en'){
                i18n.currentLocal='fr';
                $("#frBtn").css("pointer-events","auto");
                this.render(options.parent);
        }
        },
        swichToEnglish:function(){
            console.log("switch to English");
            if(i18n.currentLocal == 'fr'){
                i18n.currentLocal='en';
                $("#enBtn").css("pointer-events","auto");
                $("#frBtn").css("pointer-events","none");
                this.render(options.parent);
        }   
        }
    });

    return header;
});
Run Code Online (Sandbox Code Playgroud)

在路由器中调用标头视图:

self._header = new Header({parent: $(".main_container")});
Run Code Online (Sandbox Code Playgroud)

任何想法如何解决这个问题.我需要知道如何解雇这些事件谢谢.

backbone.js backbone-events backbone-views

0
推荐指数
1
解决办法
802
查看次数