RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / user-352302

Falchio's questions

Martin Hope
Falchio
Asked: 2024-10-23 01:00:32 +0000 UTC

在用 flutter 编写的 UI 中显示数据频繁变化的表格

  • 5

有一张表,其中的数据经常更改。
其中大约有五十万行。每个单独的行都可以更改。
当然,没有必要一次全部显示出来。但您需要能够快速获取数据。越快越好。并且知道变化已经发生。
当然,您不想直接从数据库读取数据。

到目前为止,唯一想到的kafka是redis存储此类数据。

看起来你不能订阅更新redis,kafka但你不能保证它只包含最新的更新;一个键可能包含多个版本的数据。一般来说,这不是很重要,但仍然建议有一种选择。

一般来说,我正在寻找一个可以快速大量读取数据的数据仓库。请告知是否还有其他选项可以与Flutter、web和windows编写的 UI 很好地结合linux。

flutter
  • 1 个回答
  • 22 Views
Martin Hope
Falchio
Asked: 2024-06-17 16:32:17 +0000 UTC

从哪里可以获得 EGTS 测试数据?

  • 6

我想尝试使用EGTS协议编写一个数据接收服务。
我将从 GLONASS 导航装置接收数据。
我还没有真正的设备。

请告诉我在哪里可以获取/生成测试数据?

протоколы
  • 1 个回答
  • 20 Views
Martin Hope
Falchio
Asked: 2024-05-30 04:29:19 +0000 UTC

Java List.of 和 Liskov 原理

  • 11

如您所知,List.of它Java返回一个不可变的列表。这不是来自 a 的糟糕语言设计吗Liskov Substitution Principle?

维基百科的定义:

如果 S 是 T 的子类型,则程序中类型 T 的对象可以用类型 S 的对象替换,而无需对该程序所需的属性进行任何更改。

毕竟,如果有某种方法:

void addElement(List<String> list){
   list.add("Liskov");
}

那么如果将通过创建的 List 传递给该方法,则会抛出异常List.of,这与方法相矛盾LSP。当然,尽管整件事solid只是一组建议。

如果你认为Kotlin,那么在我看来,就语言设计而言,他们做得更正确。我们创建了集合List(不可变)和MutableList.

还是我还是有误解LSP?

java
  • 1 个回答
  • 54 Views
Martin Hope
Falchio
Asked: 2022-07-15 16:17:31 +0000 UTC

将 WAR 存档部署到 WildFly 时如何更改 Url 或 Web-Context

  • 0

我试图弄清楚 Web 服务如何在 Java 中工作。
一时间非常烦人。当服务已经在 WildFly 上时,我不明白如何配置您需要联系以使用该服务的 url。
特别是现在war存档部署在:http://localhost:8080/demo-1.0-SNAPSHOT
我要配置这部分:/demo-1.0-SNAPSHOT

这部分是从 pom.xml 生成的。如果改变

<version>1.0-SNAPSHOT</version>
<name>demo</name>

然后网址也会改变。但这可能是错误的方式。
请告诉我在哪里设置它。我自己什么都找不到。

java java-ee
  • 2 个回答
  • 73 Views
Martin Hope
Falchio
Asked: 2022-06-18 02:03:17 +0000 UTC

免费流量API

  • 1

如果有的话,请告诉我一个用于在地图上显示交通拥堵的免费 API。我想在一个封闭的 Android 商业移动应用程序中使用它。我知道我想要很多,但如果 :) 虽然我自己找不到。

android
  • 1 个回答
  • 10 Views
Martin Hope
Falchio
Asked: 2022-04-24 22:10:09 +0000 UTC

通过 Andoid WebView 访问 NFC

  • 0

我正在尝试在 Android webview 上实现一个 web 应用程序。尝试从这个 Web 应用程序通过手机扫描 NFC 标签时出现问题。使用以下文本引发错误:“错误,扫描无法启动。NotAllowedError:NFC 权限请求被拒绝。” 在 Web 视图中。确保应用程序具有所需的权限。

在清单中,写入了必要权限的请求:

<uses-permission android:name="android.permission.NFC" />

在此页面上测试,它可以从浏览器 https://nu-book.github.io/test-form-generator/mod-nfc.html

如果可能,请告诉我如何为 WebView 转移对 NFC 的访问。

android
  • 1 个回答
  • 10 Views
Martin Hope
Falchio
Asked: 2022-04-18 19:51:22 +0000 UTC

如何在 Android 上以打盹模式收听 WhatsApp 或 Telegram 消息?

  • 1

Android 应用程序有一个任务是侦听 websocket,但它不会在打盹模式下执行此操作。看起来 Android WorkManager 用它的 PeriodicWorkRequest 解决了这个问题。每 15 分钟一次,肯定会为应用程序提供一个检查更新的窗口。

但是 WhatsApp 和 Telegram 应用程序清楚地传递消息,即使不是即时的,也是非常快速的,并且打盹模式对它们来说不是障碍。该文档指出,即使设备处于打盹模式,来自 Firebase 的消息也会立即传递。有谁知道他们是如何实现的?通过 Firebase 或其他工具(请提供姓名)?

以我的一点经验与 Firebase 混在一起有点糊涂,尤其是在阅读了一篇关于初创公司如何以 72,000 美元的价格疯狂使用 Firebase 的文章之后。

android
  • 1 个回答
  • 10 Views
Martin Hope
Falchio
Asked: 2020-05-04 02:16:18 +0000 UTC

Android 上 MVP 模式的示例实现,带有片段

  • 2

在没有第三方库的情况下,我找不到在 Java 中使用 Fragment for Android 实现 MVP 模式的示例。也许有人弄错了?我以 Presenter 的形式想象它,它命令 Activity - 要加载哪个片段。

我尝试处理此存储库中的示例,但在我看来它并不存在: https ://github.com/android/architecture-samples

  1. TasksActivity 启动。
  2. 该活动创建一个TasksPresenter。
  3. 使用 addFragmentActivity() 方法创建了一个特殊的 ActivityUtils 类,其中 SupportFragmentManager、TasksFragment、位于 TasksActivity 中的 Fragment 下的容器作为参数传递
  4. 在onCreateTasksActivity方法中,使用了ActivityUtils.addFragmentActivity(),之后TasksFragment被加载到TasksActivity内部fragment下的容器中。
  5. 在 TasksFragment 本身中有一个按钮可以启动另一个 Activity,在其中还有一个容器在 Fragment 下,实际上加载下一个 Fragment 的地方。

我不明白为什么会这样?那么为什么不直接使用 Activity,因为使用 Fragment 没有任何好处。这几乎不是错误的架构示例,它似乎是 Google 员工的存储库。

java
  • 1 个回答
  • 10 Views
Martin Hope
Falchio
Asked: 2020-04-10 03:40:30 +0000 UTC

ScrollView 内的 ConstraintLayout

  • 1

需要更有经验的开发人员的帮助。我在 android 中使用滚动的 Fragment 模板有问题。您不能以横向屏幕格式将屏幕滚动到最后。位于最底部的部分信息不显示。问题似乎是片段占用的空间超过了它可以在屏幕上显示的空间。我不明白我哪里出错了。请告诉我。

fragment_main.xml 标记

<?xml version="1.0" encoding="utf-8"?>
<ScrollView android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:fillViewport="true">


    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        tools:context=".MainFragment">

        <TextView
            android:id="@+id/text_view_location"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:gravity="center"
            android:textSize="36sp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/text_view_date"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp"
            android:gravity="center"
            android:textSize="18sp"
            app:layout_constraintBottom_toTopOf="@+id/weather_icon"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/text_view_location" />

        <ImageView
            android:id="@+id/weather_icon"
            android:layout_width="240dp"
            android:layout_height="240dp"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp"
            android:adjustViewBounds="true"
            android:contentDescription="@string/weatherIcon"
            android:scaleType="fitStart"
            app:layout_constraintBottom_toTopOf="@+id/temperature_view_text"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.5"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/text_view_date" />

        <TextView
            android:id="@+id/temperature_view_text"
            style="@style/Widget.AppCompat.TextView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp"
            android:text="@string/temp_temperature"
            android:textSize="48sp"
            app:layout_constraintBottom_toTopOf="@+id/text_view_description"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.5"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/weather_icon" />

        <TextView
            android:id="@+id/text_view_description"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp"
            android:gravity="center"
            android:textSize="36sp"
            app:layout_constraintBottom_toTopOf="@+id/tableRow"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.5"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/temperature_view_text" />

        <TableRow
            android:id="@+id/tableRow"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:orientation="vertical"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.5"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/text_view_description">

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:contentDescription="@string/feels_like"
                android:src="@drawable/ic_scarf" />

            <TextView
                android:id="@+id/text_view_feels_like"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="start"
                android:textSize="24sp" />

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:contentDescription="@string/myWind"
                android:src="@drawable/ic_wind" />

            <TextView
                android:id="@+id/text_view_wind_speed"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="start"
                android:textSize="24sp" />

        </TableRow>
    </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

嵌入此 Fragment 的主要活动的横向布局标记。

<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal">

    <include
        android:id="@+id/include"
        layout="@layout/app_bar_main"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TableRow
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="0dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/include">

        <androidx.fragment.app.FragmentContainerView
            android:id="@+id/frag_cont_view_second"
            android:name="ru.skillsnet.falchio.SecondFragment"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="2"
            tools:layout="@layout/fragment_second" />


        <androidx.fragment.app.FragmentContainerView
            android:id="@+id/frag_cont_view_main"
            android:name="ru.skillsnet.falchio.MainFragment"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            tools:layout="@layout/fragment_main" />
    </TableRow>

    </androidx.constraintlayout.widget.ConstraintLayout>
java
  • 1 个回答
  • 10 Views

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    我看不懂措辞

    • 1 个回答
  • Marko Smith

    请求的模块“del”不提供名为“default”的导出

    • 3 个回答
  • Marko Smith

    "!+tab" 在 HTML 的 vs 代码中不起作用

    • 5 个回答
  • Marko Smith

    我正在尝试解决“猜词”的问题。Python

    • 2 个回答
  • Marko Smith

    可以使用哪些命令将当前指针移动到指定的提交而不更改工作目录中的文件?

    • 1 个回答
  • Marko Smith

    Python解析野莓

    • 1 个回答
  • Marko Smith

    问题:“警告:检查最新版本的 pip 时出错。”

    • 2 个回答
  • Marko Smith

    帮助编写一个用值填充变量的循环。解决这个问题

    • 2 个回答
  • Marko Smith

    尽管依赖数组为空,但在渲染上调用了 2 次 useEffect

    • 2 个回答
  • Marko Smith

    数据不通过 Telegram.WebApp.sendData 发送

    • 1 个回答
  • Martin Hope
    Alexandr_TT 2020年新年大赛! 2020-12-20 18:20:21 +0000 UTC
  • Martin Hope
    Alexandr_TT 圣诞树动画 2020-12-23 00:38:08 +0000 UTC
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

  • 主页
  • 问题
    • 热门问题
    • 最新问题
  • 标签
  • 帮助

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5