小编Fig*_*gör的帖子

致命错误:找不到类'SoapClient'

我正在尝试一个简单的Web服务示例,即使我extension=php_soap.dllphp.ini文件中取消注释,我也会收到此错误:

致命错误:在第2行的C:\ Program Files(x86)\ EasyPHP-5.3.9\www\server.php中找不到类'SoapClient'

php soap fatal-error

185
推荐指数
9
解决办法
33万
查看次数

Scaffold.of()使用不包含Scaffold的上下文调用

你可以看到我的按钮在Scaffold的体内.但是我得到了这个例外:

Scaffold.of()使用不包含Scaffold的上下文调用.

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('SnackBar Playground'),
      ),
      body: Center(
        child: RaisedButton(
          color: Colors.pink,
          textColor: Colors.white,
          onPressed: _displaySnackBar(context),
          child: Text('Display SnackBar'),
        ),
      ),
    );
  }
}

_displaySnackBar(BuildContext context) {
  final snackBar = SnackBar(content: Text('Are you talkin\' to …
Run Code Online (Sandbox Code Playgroud)

scaffold snackbar flutter

91
推荐指数
12
解决办法
3万
查看次数

Vim中b和B有什么区别?

我用谷歌搜索,这就是它说的:

要返回一个单词,使用b.再一次,B将在Vim认为的单词中包含更多字符.

我不明白B与B有什么不同.你能举个例子让我明白吗?谢谢.

[编辑]其实我不知道这是因为在网上的vim 游戏中,我试着回到单词!与b,但它没有奏效.但是,当我在我的计算机上安装Vim时尝试使用它时,它与b一起工作.那么这只是为了让玩家在线索的帮助下使用B吗?

这是游戏的图片:

在此输入图像描述

vim

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

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

如何在Android上读取和写入Enum到包裹?

这是我的模型类:

public enum Action {
    RETRY, SETTINGS
}

private int imageId;
private String description;
private String actionName;
private Action action;

public NetworkError(int imageId, String description, String actionName, Action action ) {
    this.imageId = imageId;
    this.description = description;
    this.actionName = actionName;
    this.action = action;
}

public int getImageId() {
    return imageId;
}

public void setImageId(int imageId) {
    this.imageId = imageId;
}

public String getDescription() {
    return description;
}

public void setDescription(String description) {
    this.description = description;
}

public String getActionName() { …
Run Code Online (Sandbox Code Playgroud)

enums android parcel parcelable

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

如何使界面Parcelable?

如何使Interface对象可以Parcelable?

public interface Options{
    public String getAction();
    public String getType();

}


public class OptionsInfo implements Parcelable {

    private int duration;
    private ArrayList<Options> path;

    public OptionsInfo(int duration) {
        super();
        this.duration = duration;
        this.path = new ArrayList<Options>();
    }

    public ArrayList<Options> getPath() {
        return path;
    }

    public void setPath(ArrayList<Options> path) {
        this.path = path;
    }

     public void addToPath(Options object)
        {
            path.add(object);
        }

    public int getDuration() {
        return duration;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }

    @Override
    public int describeContents() { …
Run Code Online (Sandbox Code Playgroud)

android parcelable

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

输入第一个字符时,AutoCompleteTextView不起作用

当我在文本框中输入第一个字符但在输入第二个字符时开始显示下拉列表时,我的AutoCompleteTextView不起作用.可能是什么原因?

<AutoCompleteTextView
    android:id="@+id/autocomplete_name"
    android:layout_width="wrap_content"
    android:layout_height="fill_parent"
    android:layout_weight="7"
    android:background="@drawable/edittextback"
    android:ems="10"
    android:textSize="15sp"
    android:hint="@string/codehint"
    android:textColorHint="@color/hintgrey"
    android:dropDownWidth="fill_parent"
    android:paddingRight="30dp"
    android:paddingLeft="10dp"
    android:singleLine="true"
    android:ellipsize="end"
/>
Run Code Online (Sandbox Code Playgroud)

android autocompletetextview

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

如何在Android上安全地存储模数,公共指数和私有指数?

我已经给出了模数,公共指数和私有指数,我需要在Android上安全地存储这些值.我怎样才能做到这一点?

大多数示例都是在不获取n,d,e参数的情况下创建公钥和私钥.我已经给出了这些n,e,d值并希望安全地存储它们,然后使用这些值来创建我的ICC公钥证书,并签署我的动态数据.

我怎样才能做到这一点?

security encryption android emv public-key-encryption

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

DataBinding:如何使用BaseActivity /如何使用抽象

我正在尝试将DataBinding添加到我的应用程序中.在我的应用程序中,我有一个BaseActivity,它有一个工具栏和一个FrameLayout.FrameLayout是扩展BaseActivity的活动的容器.如何在我的BaseActivity和扩展活动中添加数据绑定?

我将在没有DataBinding的情况下共享我的代码:

这是我的BaseActivity.java:

public class BaseActivity extends AppCompatActivity {


    @Override
    public void setContentView(@LayoutRes int layoutResID) {

        LinearLayout container = (LinearLayout) getLayoutInflater().inflate(R.layout.activity_base, null);
        FrameLayout activityContent = (FrameLayout) container.findViewById(R.id.activityContent);
        getLayoutInflater().inflate(layoutResID, activityContent, true);

        super.setContentView(container);

        Toolbar toolbar = (Toolbar) container.findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem menuItem) {
        if (menuItem.getItemId() == android.R.id.home) {
            finish();
        }
        return super.onOptionsItemSelected(menuItem);
    }

    public void setTitle(String title) {
        getSupportActionBar().setTitle(title);
    }
}
Run Code Online (Sandbox Code Playgroud)

这是activity_base.xml:

<?xml version="1.0" encoding="utf-8"?>  
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"           
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools">

        <include
            android:id="@+id/toolbarLayout"
            layout="@layout/toolbar" …
Run Code Online (Sandbox Code Playgroud)

android abstract-class abstraction android-databinding

10
推荐指数
3
解决办法
3513
查看次数

如何将文件设置为 Android 10 的铃声?

我曾经使用以下代码将原始声音文件保存到外部存储并将其设置为铃声。但事情似乎在 android 10 中发生了变化。你能帮助我或向我展示一些如何更新我的代码以使用 android 10 的指南吗?

这是将文件保存到外部存储的代码:

保存文件:

String path = Environment.getExternalStorageDirectory() + "/customsounds";

 public File getFile() {
        boolean exists = (new File(path).exists());
        if (!exists) {
            new File(path).mkdirs();
        }
        File newSoundFile = new File(path, sound.getFileName() + ".mp3");
        Uri mUri = Uri.parse("android.resource://com.example.customsounds/" + sound.getId());
        ContentResolver mCr = getContentResolver();
        AssetFileDescriptor soundFile;
        try {
            soundFile = mCr.openAssetFileDescriptor(mUri, "r");
        } catch (FileNotFoundException e) {
            soundFile = null;
        }

        try {
            byte[] readData = new byte[1024];
            FileInputStream fis = soundFile.createInputStream();
            FileOutputStream fos = new …
Run Code Online (Sandbox Code Playgroud)

android ringtone android-storage android-10.0

6
推荐指数
3
解决办法
4276
查看次数