小编Shy*_*dda的帖子

如何在焦点()上以编程方式隐藏jquery mobile中的键盘

我想在Focus()上隐藏键盘,但是$(".ui-input-text").focus();它会自动打开键盘.

我只是想隐藏在特定的屏幕上,我有测试document.activeElement.blur(); 但它也没有焦点()输入.

jquery android jquery-plugins jquery-mobile cordova

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

在webspere 8.5上启动异常的例外情况

我在WebSphere 8.5上启动Web应用程序时遇到此错误.应用程序通过DB2上的MyBatis存储过程调用.用户使用REST框架触发使用REST WS的调用.春天将所有东西粘在一起.相同的应用程序在Tomcat 7上运行正常.有没有人看到这个错误?任何帮助将不胜感激).看起来它无法为应用程序初始化Context和Dependency Injection容器.

堆栈跟踪:

[26.11.13 10:20:36:339 MSK] 000000a3 BeansDeployer E BeansDeployer deploy 
                                 java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException
                at org.apache.webbeans.portable.AnnotatedElementFactory.newAnnotatedType(AnnotatedElementFactory.java:150)
                at org.apache.webbeans.config.BeansDeployer.deployFromClassPath(BeansDeployer.java:484)
                at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:171)
                at org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:124)
                at org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:78)
                at com.ibm.ws.webbeans.common.CommonLifeCycle.startApplication(CommonLifeCycle.java:106)
                at com.ibm.ws.webbeans.services.JCDIServletContainerInitializer.onStartup(JCDIServletContainerInitializer.java:85)
                at com.ibm.ws.webcontainer.webapp.WebAppImpl.initializeServletContainerInitializers(WebAppImpl.java:613)
                at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:409)
                at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
                at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
                at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:746)
                at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
                at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426)
                at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)
                at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1175)
                at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)

skip ...

                at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
                at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
                at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
                at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
                at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)
Caused by: java.lang.ArrayIndexOutOfBoundsException
                at org.apache.webbeans.portable.AbstractAnnotatedCallable.setAnnotatedParameters(AbstractAnnotatedCallable.java:66)
                at org.apache.webbeans.portable.AnnotatedConstructorImpl.<init>(AnnotatedConstructorImpl.java:56)
                at org.apache.webbeans.portable.AnnotatedElementFactory.newAnnotatedType(AnnotatedElementFactory.java:117)
                ... 108 more
Run Code Online (Sandbox Code Playgroud)

java websphere spring jersey

6
推荐指数
1
解决办法
3502
查看次数

仅在所选设备上的Listview视图上的Android Stackoverflow错误

在为Android开发本机应用程序的过程中,我遇到了特殊的HTC DESIRE S,这种情况经常发生在listview页面上.

崩溃是什么:

  1. Listview视图溢出
  2. 跨度溢出问题
  3. 视图溢出问题
  4. 其他(请解释)

logcat的:

java.lang.StackOverflowError
at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:940)
at android.text.SpannableStringBuilder.drawText(SpannableStringBuilder.java:1042)
at android.graphics.Canvas.drawText(Canvas.java:1323)
at android.text.Styled.drawUniformRun(Styled.java:141)
at android.text.Styled.drawDirectionalRun(Styled.java:298)
at android.text.Styled.drawText(Styled.java:357)
at android.text.Layout.drawText(Layout.java:1797)
at android.text.Layout.draw(Layout.java:679)
at android.widget.TextView.onDraw(TextView.java:4338)
at android.view.View.draw(View.java:7014)
at android.view.ViewGroup.drawChild(ViewGroup.java:1732)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.View.draw(View.java:7017)
at android.view.ViewGroup.drawChild(ViewGroup.java:1732)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.View.draw(View.java:7017)
at android.view.View.buildDrawingCache(View.java:6739)
at android.view.View.getDrawingCache(View.java:6512)
at android.view.ViewGroup.drawChild(ViewGroup.java:1657)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.widget.AbsListView.dispatchDraw(AbsListView.java:1499)
at android.widget.ListView.dispatchDraw(ListView.java:3194)
at android.view.View.draw(View.java:7017)
at android.widget.AbsListView.draw(AbsListView.java:2607)
at android.view.ViewGroup.drawChild(ViewGroup.java:1732)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.View.draw(View.java:7017)
at android.view.ViewGroup.drawChild(ViewGroup.java:1732)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.View.draw(View.java:7017)
at android.widget.FrameLayout.draw(FrameLayout.java:357)
at android.view.ViewGroup.drawChild(ViewGroup.java:1732)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459) …
Run Code Online (Sandbox Code Playgroud)

java stack-overflow android listview views

6
推荐指数
1
解决办法
1401
查看次数

地图没有进入模拟器android api v2

我想在模拟器中安装我的地图应用程序,它安装得很好,但没有得到地图,显示日志猫的错误,如Google Maps Android API v2仅支持具有OpenGL ES 2.0及更高版本的设备,但我只是看到缩放按钮和所有其他UI.我需要做什么才能在android API v2中的模拟器中获取地图.

我点击此链接:在Android模拟器上运行Google Maps v2

android google-maps android-emulator

5
推荐指数
1
解决办法
5647
查看次数

如何将工作参数传递给 WorkManager 类

在我的一个 android(使用 Kotlin)应用程序中,我想使用 WorkManager 类作为通用类。这是我的类,我想通过传递预期的参数将其用作通用类:

class CommonWorkManager<P, R> (appContext: Context, workerParams: WorkerParameters) : Worker(appContext, workerParams)
{
    var lambdaFunction: ((P) -> R)? = null

    override fun doWork(): Result {
        lambdaFunction
        return Result.SUCCESS
    }
}
Run Code Online (Sandbox Code Playgroud)

这就是我尝试创建此类的实例的方式:

CommonWorkManager<Unit, Unit>(context!!, ).lambdaFunction= {
    presenter?.fetchMasterData()
}
Run Code Online (Sandbox Code Playgroud)

那么我如何workerParams作为第二个参数传递。

这里'P'是参数,'R'是返回类型 CommonWorkManager<P, R>

kotlin android-workmanager

5
推荐指数
1
解决办法
2271
查看次数

将Apache重定向到Tomcat - 在应用程序中导航时出现IllegalStateException

我在Windows XP上使用Apache 2.2和Tomcat 6.0.18.我已经启用mod_proxy模块将流量从我的Apache Web服务器重定向到Tomcat.我只更新了httpd.conf文件,使其具有如下重定向:

ProxyPass         /myapp  http://MYMACHINENAME:8080/MyApp/Start
ProxyPassReverse  /myapp  http://MYMACHINENAME:8080/MyApp/Start
Run Code Online (Sandbox Code Playgroud)

我遇到的问题是初始重定向工作正常,JSP页面正确呈现.当我尝试通过单击页面上的菜单导航到不同的JSP页面时,我得到异常:

SEVERE: Servlet.service() for servlet StartIntro threw exception
java.lang.IllegalStateException
    at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:435)
    at StartIntro.doPost(StartIntro.java:103)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:595)
Run Code Online (Sandbox Code Playgroud)

如果我不从Apache进行任何重定向,导航工作正常.

我应该研究什么想法?

TIA,Magnus Lassi

java apache redirect jsp tomcat

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

图像基于钛appcelerator视图中的base64

我想从SQLite中放一个图像,但下面的代码不起作用:

var imageView = Ti.UI.createImageView({
            image:services.fieldByName('image')
});
Run Code Online (Sandbox Code Playgroud)

base64 titanium titanium-alloy

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

IOException:无法连接到 /192.168.70.1(端口 9900):连接失败:ETIMEDOUT(连接超时)

当我尝试在 Eclipse 中运行我的 android 应用程序时出现此异常:

IOException: failed to connect to /192.168.70.1 (port 9900): connect failed: ETIMEDOUT (Connection timed out)
Run Code Online (Sandbox Code Playgroud)

会有什么问题?

java android

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

项目""的目标位置已经存在,无法移动项目

当我试图与git存储库共享我的项目时,获得这样的异常

"项目的目标位置""已经存在,无法移动项目"

在此输入图像描述

eclipse git import project

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

Retrofit - 动态传递URL值 - GET方法

我有一个URL例如:

https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVinValues/KMHDC8AEXAU084769?format=JSON

在这里,我想KMHDC8AEXAU084769?format=JSON动态更改此部分

如何使用Retrofit2.

我尝试过:

@FormUrlEncoded
    @GET("{input}")
    Call<Result> getVin(@Path("input") String input, @Field("format") String format);
Run Code Online (Sandbox Code Playgroud)

但是@FormUrlEncoded只支持POST而不是GET.

这就是我所说的方式:

ApiInterface apiService = ApiClient.getClient().create(ApiInterface.class);

        Call<Result> call = apiService.getVin(vin, "JSON");
        call.enqueue(new Callback<Result>() {
            @Override
            public void onResponse(Call<Result> call, Response<Result> response) {
                Result result = response.body();

                Log.e("Result: ", "" + response.body());

                Gson gson = new Gson();
                String json = gson.toJson(result);

                responseTV.setText("" + json);
            }

            @Override
            public void onFailure(Call<Result> call, Throwable t) {
                // Log error here since request failed
                Log.e("MainActivity", t.toString());
                Toast.makeText(MainActivity.this, …
Run Code Online (Sandbox Code Playgroud)

android retrofit2

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