小编Ume*_*wte的帖子

在Java中使用Deprecated方法或类是错误的吗?

我正在使用eclipse开发一个Web应用程序.就在今天,我通过更改JAR文件更新了我的struts版本.我正在某些地方收到警告,方法已被弃用,但代码工作正常.

我想知道一些事情

  1. 在Java中使用Deprecated方法或类是错误的吗?

  2. 如果我不更改任何方法并使用我的警告运行我的应用程序,它会产生任何性能问题.

java methods deprecated

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

.dll和.exe之间的区别?

我想知道dll和exe文件之间的确切区别.

windows dll exe

86
推荐指数
7
解决办法
9万
查看次数

是否可以将适配器设置为线性布局?

是否可以将适配器设置为LinearLayout

ListView因为我正在使用,所以我不想使用ScrollView.所以我用LinearLayout...

在那我是动态添加视图,现在我需要使用适配器..所以任何人有任何建议?

我这样做......

LinearLayout clientList = (LinearLayout) findViewById(R.id.clients);
adapter = new Sample1AdapterActivity(this, arrayList);
View list = (ListView) getLayoutInflater().inflate(R.layout.user_details, getListView(), false);
Run Code Online (Sandbox Code Playgroud)

android scrollview android-layout

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

如何隐藏rich:modalPanel对JSF中的Ajax响应

我在一个应用程序中使用jsf到达面.我正在使用rich:modalPanel弹出阅读一些细节,并在服务器响应后使用a4j命令按钮提交tha面板我想隐藏modalPanel但不知道如何,

我仍然在尝试解决方案,请帮忙

富modalPanel的代码是这样的.

<rich:modalPanel  id="panelID" minHeight="200" minWidth="450" height="200" width="500">
<a4j:commandButton reRender="sampleID" action="#{SomeTestAction}" image="sample-button.gif"/> 
</rich:modalPanel>
Run Code Online (Sandbox Code Playgroud)

jsf richfaces

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

使用函数从swift字典中动态删除空值

我有下面的字典代码

var dic : [String: AnyObject] = ["FirstName": "Anvar", "LastName": "Azizov", "Website": NSNull(),"About": NSNull()]
Run Code Online (Sandbox Code Playgroud)

我已经使用下面的代码删除了具有空值的键

var keys = dic.keys.array.filter({dic[$0] is NSNull})
for key in keys {
  dic.removeValueForKey(key)
}
Run Code Online (Sandbox Code Playgroud)

它适用于静态辞典,但我想动态做到这一点,我想用函数来完成它,但每当我通过字典作为它可以作为一个让一个说法意味着持续的所以不能删除空键我让下面的代码为

func nullKeyRemoval(dic : [String: AnyObject]) -> [String: AnyObject]{
        var keysToRemove = dic.keys.array.filter({dic[$0] is NSNull})
        for key in keysToRemove {
            dic.removeValueForKey(key)
        }
        return dic
}
Run Code Online (Sandbox Code Playgroud)

请告诉我解决方案

ios swift

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

在64位android设备上找不到.so文件

使用aviary android sdk使用android studio和gradle build.应用程序生成在具有32位架构的所有设备上运行正常.

相同的应用程序在64位设备中给出以下错误[例如.索尼C4]

    java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file 
"/data/app/com.myapp/base.apk"],nativeLibraryDirectories=[/data/app/com.myapp/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libaviary_moalite.so"
Run Code Online (Sandbox Code Playgroud)

gredle.build部分

dependencies {
    ...
    compile 'com.android.support:multidex:1.0.0'
    compile 'com.facebook.fresco:fresco:0.8.1+'
    compile 'com.facebook.fresco:imagepipeline-okhttp:0.8.1+'
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'com.adobe.creativesdk:image:4.0.0'
}
Run Code Online (Sandbox Code Playgroud)

参考那没用

使用Android Studio找不到ARM64 NDK本机库(1.3 RC)

如果使用任何解决方案,则出现相同的错

如何在64位Android设备上使用32位本机库

得到错误就像

Error:(16, 0) Error: NDK integration is deprecated in the current plugin.  Consider trying the new experimental plugin.  For details, see http://tools.android.com/tech-docs/new-build-system/gradle-experimental.  Set "android.useDeprecatedNdk=true" in gradle.properties to continue using the current NDK integration.
Run Code Online (Sandbox Code Playgroud)

我不确定我在做什么错,或者根本不支持.

android android-ndk aviary adobecreativesdk

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

我应该使用什么验证

我正在研究J2EE Web应用程序

这里我们使用JSP和Struts

我知道可以使用

  1. 客户端验证(使用JavaScript)

  2. 服务器端验证(使用验证框架)

我的问题是哪种方式更合适,应该在应用中使用,为什么?

validation jsp struts java-ee

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

iPhone应用程序和IPad视网膜图标

我已经为iPhone创建了一个带有视网膜和非视网膜显示图标版本的应用程序(icon@2x.png和icon.png).每当我尝试在iPad 3上安装此应用程序时,都会使用Default@2x.png的一部分而不是icon@2x.png.我是否要上传iPad的特定图标?在这种情况下!?来自Xcode 4.3.2我只看到2个空格来包含图标,但保留给iPhone版本.我想我需要在plist文件中创建一个新的声音...但我不确定,文档没有帮助我.

iphone icons ios

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

Android-Camera App传递了空表面

我已经尝试过在stackoverflow上给出的所有可能解决方案,但仍达不到我想要的。我想使用带有服务的Camera API拍照。当用户点亮屏幕时应拍照,但屏幕仍处于锁定状态。我看到了有关虚拟表面等的不同文章...但是它们都不起作用,当然,因为我是Camera API的新手,所以我肯定在代码中犯了错误。我的应用程序是这样进行的:我安排AlarmManager启动服务:

public int onStartCommand(Intent intent,int flags,int startId) {
        Log.i("service","start");
        Calendar finServ=Calendar.getInstance();
        String all=intent.getStringExtra("all");
        nomevt=all.split(Pattern.quote("**"))[3];
        Scanner sc;
        String str="";
        try {
            sc = new Scanner(new File(getFilesDir(),"Event.evt"));
            while(sc.hasNext()) {
                str=sc.next();
                if(all.equals(str)) break;
            }
            sc.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        if(!all.equals(str)) stopSelf();
        else {
            finServ.setTimeInMillis(toMillis(str.split(Pattern.quote("**"))[1]));
            Calendar now=Calendar.getInstance();
            now.setTime(new Date());
            while(finServ.after(now)) {
                PowerManager pm=(PowerManager)getSystemService(Context.POWER_SERVICE);
                if(pm.isScreenOn()) {
                    //AsyncCapture ac=new AsyncCapture(this);
                    //ac.execute("nomevt");
                    photo();
                    Log.i("screen","on");
                    while(pm.isScreenOn()) {
                        pm=(PowerManager)getSystemService(Context.POWER_SERVICE);
                    }
                }
                now.setTime(new Date());
            }
            stopSelf();
        }
        return super.onStartCommand(intent, flags, startId);
    }`
<br>The service will …
Run Code Online (Sandbox Code Playgroud)

service camera android surfaceview

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