小编Ros*_*erg的帖子

将项目从Delphi 7迁移到Delphi XE有多难?

我们公司有一个已经开发了十多年的软件,因此有一些真正过时的东西.它仍然非常实用,但是我看到了Delphi XE的新功能,它让我想切换.问题是源代码本身超过300mb的.pas文件(总共1gb与组件等).

我们正在使用自定义组件,旧的jvcl和最新的devexpress.

如果我决定从Delphi 7迁移到Delphi XE,我有多难以期待事情发生?

谢谢.

delphi delphi-7 delphi-2010 delphi-xe

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

适用于Android的Firebase,我如何遍历一个孩子(对于每个孩子= x做y)

这是我的测试看起来像:

在此输入图像描述

我不会使用上面的字段,它只是一个假人.但我想通过"用户"上的所有孩子,并为每个电子邮件返回一个:

System.out.println(emailString);
Run Code Online (Sandbox Code Playgroud)

我发现列出对象的唯一方法是使用firebaseAdapter,还有另一种方法吗?

java android firebase firebase-realtime-database

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

在1.000表单中将多个标签设置为透明?

我用Devexpress为我的软件设置了皮肤,我发现标签是不透明的,导致它们具有灰色背景.

只有无穷无尽的形式,所以我想知道是否有办法自动完成这项任务(将标签设置为透明).

我之前做了类似的事情,表单上的Devexpress控件有LookAndFeel.NativeStyle = True,我在所有dfm表单上使用Grep Search将其替换为False.但是,在标签的情况下,透明属性不存在.

谢谢.

delphi delphi-7 delphi-2010 delphi-xe

14
推荐指数
4
解决办法
1783
查看次数

颤动 - SWIFT_VERSION必须设置为支持的值

尝试了库simple_permission,修复了pod错误,这就出现了,不知道如何继续.在Build Settings中没有为swift版本设置,我尝试添加它,但它没有用.

Launching lib/main.dart on iPhone X in debug mode...
Skipping compilation. Fingerprint match.
Running Xcode clean...
Starting Xcode build...
Xcode build done.
Failed to build iOS app
Error output from Xcode build:
?
** BUILD FAILED **

Xcode's output:
?
=== BUILD TARGET simple_permissions OF PROJECT Pods WITH CONFIGURATION             Debug ===
    The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings …
Run Code Online (Sandbox Code Playgroud)

ios flutter

14
推荐指数
3
解决办法
8553
查看次数

MVVM - 实现Google Maps并在ViewModel中使用上下文?

所以我正在学习MVVM,喜欢它.

但是......到目前为止我的问题如下:

  • 使用MVVM实现谷歌地图.(我是在活动或视图模型上做的吗?我只能在活动上实现它..)

  • 特别是CONTEXT ..可以像下面那样传递它吗?

我正在使用这个库.

这是我的ViewModel:

public class DashboardViewModel implements ViewModel {

public final ObservableField<String> dashButton = new ObservableField<>("");
public final Action onRandomSearch;
private Context context;



public DashboardViewModel(Context context) {
    this.context = context;

    onRandomSearch = () -> {
        String randomString = UUID.randomUUID().toString();
        String randomQuery = randomString.substring(0, 3) + " " + randomString.substring(5, 8);
        dashButton.set(randomQuery); //JUST TO TEST
    };
}

}
Run Code Online (Sandbox Code Playgroud)

这是我的活动:

public class DashboardActivity extends MvvmActivity {
@NonNull
@Override
protected ViewModel createViewModel() {
    loadMap();

    return new DashboardViewModel(this);
}

@Override …
Run Code Online (Sandbox Code Playgroud)

android mvvm

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

为什么我的 Lottie 动画这么慢?

编辑:为了清楚起见,加载很慢,而不是动画。

我在 AsyncTask 上使用它,如下所示:

public class GetCurrentLocation extends AsyncTask<String, Void, String>{

private Context mContext;
private View view;

public GetCurrentLocation (View view, Context mContext) {
this.view = view;
this.mContext = mContext;
}


protected void onPreExecute() {
super.onPreExecute();
    //Custom Dialog
    customDialog = new Dialog(mContext);
    customDialog.setContentView(R.layout.dialog_custom);
    customDialog.setTitle("Looking for address");

    //Custom Dialog Animation
    LottieAnimationView animationView = (LottieAnimationView) customDialog.findViewById(R.id.animation_view);
    animationView.setAnimation("PinJump.json"); //Lottie's premade animation
    animationView.loop(true);
    animationView.playAnimation();

    //Custom Dialog Text
    TextView text = (TextView) customDialog.findViewById(R.id.textView);
    text.setText(R.string.dialog_looking_for_address);
    customDialog.show();
}

protected String doInBackground(String... params) {
//Code removed to …
Run Code Online (Sandbox Code Playgroud)

android lottie-android

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

Angular 6-上传后获取Firebase Storage文件的下载URL

我想在这里完成的事情很简单。

  1. 将文件上传到Firebase存储

  2. 抓住文件的链接,然后将其插入表格中。

问题是,我无法获得下载URL。

当我上传内容时,它确实会上传,但是我收到此错误消息:

Object { code_: "storage/object-not-found", message_: "Firebase Storage: Object 'rnmgm3vvpz' does not exist.", serverResponse_: "{\n  \"error\": {\n    \"code\": 404,\n    \"message\": \"Not Found.  Could not get object\"\n  }\n}", name_: "FirebaseError" }
Run Code Online (Sandbox Code Playgroud)

这是要在component.ts上上传的代码:

upload(event) {
  const id = Math.random().toString(36).substring(2);
  this.ref = this.afStorage.ref(id);
  this.task = this.ref.put(event.target.files[0]);
  this.uploadState = this.task.snapshotChanges().pipe(map(s => s.state));
  this.uploadProgress = this.task.percentageChanges();
  this.downloadURL = this.ref.getDownloadURL();
}
Run Code Online (Sandbox Code Playgroud)

并在component.html上:

<input type="file" (change)="upload($event)" accept=".png,.jpg" />
Run Code Online (Sandbox Code Playgroud)

文件上传后如何获取downloadURL?

firebase angular google-cloud-firestore

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

如何将本地文件的大小与Web上的文件进行比较?

可能重复:
在下载之前,使用delphi以编程方式从远程文件中获取文件大小.

说我有一个本地文件:

C:\ file.txt的

一个在网上:

http://www.web.com/file.txt

如何检查尺寸是否不同,如果它们不同则//做一些事情?

谢谢.

delphi delphi-7 delphi-xe

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

Lottie for android - 错误膨胀类com.airbnb.lottie.LottieAnimationView

我做了什么:

步骤1)

在graddle中添加了以下依赖项:

compile 'com.airbnb.android:lottie:2.0.0-beta4'
Run Code Online (Sandbox Code Playgroud)

第2步)

Airbnb没有告诉我们放置动画JSON文件的位置.相反,我在他们的示例应用程序中看到它放在app/src/main/assets上.所以我创建了该文件夹并在那里插入了一些JSON动画.

第3步)

activity_main.xml上添加了以下内容:

<com.airbnb.lottie.LottieAnimationView
    android:id="@+id/animation_view"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:lottie_fileName="EmptyState.json"
    app:lottie_loop="true"
    app:lottie_autoPlay="true"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    app:layout_constraintTop_toTopOf="parent" />
Run Code Online (Sandbox Code Playgroud)

运行应用程序后,我收到以下错误:

04-29 12:55:37.253 21877-21877/com.example.ross.testitout E/AndroidRuntime: FATAL EXCEPTION: main

Process: com.example.ross.testitout, PID: 21877

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.ross.testitout/com.example.ross.testitout.MainActivity}: android.view.InflateException: Binary XML file line #9: Binary XML file line #9: Error inflating class com.airbnb.lottie.LottieAnimationView 

at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
Run Code Online (Sandbox Code Playgroud)

想知道我做错了什么.还有一个缺乏全面的教程,这是一种耻辱,像我这样的初学者需要花费的时间超过必要的时间来解决问题.

谢谢.

android lottie-android

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

Angular 6-无法在特定功能内运行外部功能

我正在对角6使用ng-select。

这是HTML的一面:

        <ng-select [(ngModel)]="client.categoryId"
                   class="form-control"
                   [ngClass]="{'is-invalid':clientCategoryId.errors && clientCategoryId.touched}"
                   #clientCategoryId="ngModel"
                   name="categoryId"
                   [addTag]="addTagNow"
                   required>
          <ng-option *ngFor="let cat of cats" [value]="cat.id">{{cat.title}}</ng-option>
        </ng-select>
Run Code Online (Sandbox Code Playgroud)

这是打字稿:

nCategory: Category = {
  title: ''
};

constructor(public afs: AngularFirestore) {
  this.categoriesCollection = this.afs.collection('categories', ref => ref.orderBy('title', 'asc'));
}

addTagNow(name) {
  this.nCategory.title = name;
  this.categoriesCollection.add(this.nCategory);
}
Run Code Online (Sandbox Code Playgroud)

这是错误:

NgSelectComponent.html:91 ERROR TypeError: Cannot set property 'title' of undefined at NgSelectComponent.push../src/app/components/edit-client/edit-client.component.ts.EditClientComponent.addTagNow [as addTag] (edit-client.component.ts:169)

如果我在外部运行代码 AddTagNow功能则可以正常工作。

如何执行该代码?

angular-ngselect angular

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