RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

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

NoProgress's questions

Martin Hope
NoProgress
Asked: 2020-06-30 01:30:13 +0000 UTC

仅在特定区域可见的 ListView

  • 0
  1. 如何创建ListView仅在特定区域可见的小部件?

在图片Listview中,元素仅在矩形中可见 在此处输入图像描述

为什么我需要这个小部件?

我想创建这样一个小部件,以便在滚动某个小部件时,我可以scrollNotification.metrics.pixels为该小部件从屏幕顶部的平滑退出设置动画。

为了让这个小部件中的元素发生漂亮的变化(旧文本向上,新文本从底部出来),我相信ListView这是最简单的方法。 在此处输入图像描述

  1. 我想知道。也许这个小部件有某种已经存在的名称,并且它已经在 pub.dev 中。
listview
  • 1 个回答
  • 10 Views
Martin Hope
NoProgress
Asked: 2020-06-11 00:49:56 +0000 UTC

如何在子小部件的不透明度中删除特定小部件的不透明度?

  • 0

如何删除子小opacity部件内的特定小opacity部件?

我不能删除不透明度,但只能让它更透明opacity: 1是行不通的

Opacity(
  opacity: 0.5,
  child: Card(
    child: Opacity(
      opacity: 1,
      child: Container(child: event.text),
    ),
  ),
),
flutter
  • 1 个回答
  • 10 Views
Martin Hope
NoProgress
Asked: 2020-06-03 02:04:17 +0000 UTC

SliverList 中的无限列表视图

  • 0

添加后:

return SliverList(
   delegate: SliverChildBuilderDelegate((contextSli, indexSli) {

ListView变得无限(项目结束并重新开始)。

如何修复列表无穷大?

Widget build(BuildContext context) {
  return SliverList(
    delegate: SliverChildBuilderDelegate((contextSli, indexSli) {
      return ListView.builder(
          physics: physics,
          shrinkWrap: shrinkWrap,
          itemCount: itemCount,
          controller: controller,
          reverse: reverse,
          primary: primary,
          itemBuilder: (context, i) {
            final TimelineModel model = itemBuilder(context, i);
            model.isFirst = reverse ? i == (itemCount - 1) : i == 0;
            model.isLast = reverse ? i == 0 : i == (itemCount - 1);
            switch (position) {
              default:
                return TimelineItemLeft(properties: properties, model: model);
            }
          });
    }),
  );
}
flutter
  • 1 个回答
  • 10 Views
Martin Hope
NoProgress
Asked: 2020-02-25 00:19:51 +0000 UTC

小部件不会在 Timer.periodic 上更新

  • 0

为什么deleteTimerString没有更新

Widget ListItem(.......) {
String deleteTimerString = '';
const oneSec = const Duration(seconds: 1);
Timer.periodic(
oneSec,
(Timer timer) => setState(
    () {
    DateTime now = DateTime.now();
    Duration diff = DateTime.parse(currentSorol.deleteDate).difference(now);
    deleteTimerString = diff.toString();
    },
),);
return Container(
..............
ListTile(
    title: Text(
    deleteTimerString
..............
);

}

timer
  • 1 个回答
  • 10 Views
Martin Hope
NoProgress
Asked: 2020-02-23 00:30:11 +0000 UTC

Flutter:FutureBuilder 在另一个视图上触发

  • 0

还有. view A_ 在那。当从到through的转换触发附加到 的函数时。如果我不在,我不需要工作view B
АFutureBuilder
view Аview BNavigator.Push()FutureBuilderview A
FutureBuilderviewFuturebuilder

这是代码“视图A”(_StoriesState),当我转到B(StoriesPage)时,会调用getStories函数,该函数只能在A(_StoriesState)中调用

    ............
Future<dynamic> getStories(int items, List<int> pickerSelectedIndex) async {
    try {
    ............
      return stories;
    } on HandshakeException catch (e) {
      print("HE: " + e.toString());
      getStories(items, pickerSelectedIndex);
    } on SocketException catch (e) {
      print("SE: " + e.toString());
      getStories(items, pickerSelectedIndex);
    } on Exception catch (e) {
      print(e);
      getStories(items, pickerSelectedIndex);
    }
  }
............
class _StoriesState extends State<Stories> {

  Future<List<Story>> listViewData;
  ............
  Future<List<Story>> getStoriesDataReady(
      int items, List<int> pickerSelectedIndex) async {
    List<Story> stories = await getStories(items, pickerSelectedIndex);
    if (globals.filter.isEmpty) {
      return stories;
    } else {
      ............
      return searchStories;
    }
  }

  @override
  void dispose() {
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return FutureBuilder(
        future: ............
        builder: (BuildContext context, AsyncSnapshot snapshot) {
          List<Widget> children;
          if (snapshot.hasData) {
            listViewData =
                getStoriesDataReady(globals.items, pickerSelectedIndex);
            return Scaffold(
                body: FutureBuilder<List<Story>>(
                    future: listViewData,
                    builder: (BuildContext context,
                        AsyncSnapshot<List<Story>> snapshot) {
                      if (snapshot.hasData) {
                        ............
                        child: FloatingSearchBar.builder(
                            ............
                            itemCount: snapshot.data.length + 1,
                            itemBuilder:
                                (BuildContext context, int index) {
                              ............
                              onTap: () {
                                ............
                                Navigator.push(
                                  context,
                                  MaterialPageRoute(
                                      builder: (BuildContext context) => StoryPage(............)),
                                ).then((value) {
                                  FocusScope.of(context).requestFocus(FocusNode());
                                });
                              }
                              ............
                        }),
                        ............
        });
  }
}

请告诉我如何实现这个?

android
  • 1 个回答
  • 10 Views
Martin Hope
NoProgress
Asked: 2020-02-10 00:40:42 +0000 UTC

在创建社交网络之前您需要了解什么?

  • 2

我在哪里可以阅读“创建社交网络之前需要了解的内容”。我的意思是使用条款、GDPR、隐私政策,也许还有其他我不知道的东西。android的应用程序几乎准备好了,它包含在类别中,社交网络,有注册。

android
  • 1 个回答
  • 10 Views
Martin Hope
NoProgress
Asked: 2020-02-02 04:10:54 +0000 UTC

PHP 标签中没有文本

  • 1
$result = file_get_contents("http://pogoda.ee");
preg_match( '/<td id="L_R_tl".?(.*?)<\/td>/is', $result , $links );
print_r($links);

网站上的标签中有文本,但在文件获取内容中没有
如何制作它,因此标签中不会为空

php
  • 1 个回答
  • 10 Views
Martin Hope
NoProgress
Asked: 2020-12-04 17:50:44 +0000 UTC

不输出 sprintf

  • 0
 echo '<ul>';
            while ($row = mysql_fetch_object($res)) {
                $mes = $row->message;
                $format = "<li class='message'>%s</li>";
                sprintf($format,$mes);
            }
            echo '</ul>';

哪里错了

                $mes = $row->message;
                $format = "<li class='message'>%s</li>";
                sprintf($format,$mes);
php
  • 1 个回答
  • 10 Views
Martin Hope
NoProgress
Asked: 2020-12-04 02:27:34 +0000 UTC

为什么条件不成立?

  • 0
$("#button").bind("click", function () { 
    var messageLenght = $("#text").length(); 
    if($('#text').val() != '' && messageLenght < 200 ){
        var message = $("#text").val(); 
        $.ajax({ 
            url: "chatGetMsg.php", 
            type: "POST", 
            data: {message}, 
            dataType: "json",
            complete: function () {
                show('send');
                 del();
            }  
        });
    }
});

为什么不起作用

messageLenght < 200 
javascript
  • 1 个回答
  • 10 Views
Martin Hope
NoProgress
Asked: 2020-11-20 22:58:26 +0000 UTC

javascript点击

  • 0

js执行的太快怎么设置及时执行

   <button id="button" onclick="$(function()
{
    var chat_scroll = $('#content');
    chat_scroll.scrollTop(chat_scroll.prop('scrollHeight'));
});" >send</button>

不是所有的代码

<div class="box">
    <div id="content"><?php include("chatGetMsg.php"); ?></div>
    <div id="textarea"><textarea id="text" name='message' maxlength="200"></textarea></div>
    <div id="send"><button id="button" onclick="$(function()
{
    var chat_scroll = $('#content');
    chat_scroll.scrollTop(chat_scroll.prop('scrollHeight'));
});" >send</button></div>  
   </div>  
    <div class="Chan"></div>

阿贾克斯

    $(document).ready(function () {
        show();
        setInterval(show, 300);

        $("#button").bind("click", function () {
            var message = $("#text").val();
            $.ajax({
                url: "chatGetMsg.php",
                type: "POST",
                data: {message},
                dataType: "json"
            });
        });

        function show() {
            $.ajax({
                url: "chatGetMsg.php",
                cache: false,
                success: function (html) {
                    $("#content").html(html);
                }
            });
        }
    }); 
javascript
  • 1 个回答
  • 10 Views
Martin Hope
NoProgress
Asked: 2020-11-19 22:10:27 +0000 UTC

AJAX 不起作用,网站滞后

  • 0

当我开始在文本字段中书写时,它没有被写入,它被更新并且网站开始严重滞后。该怎么办?

[聊天.php]

    <?php> session_start(); 
       header('Content-Type: text/html; charset=utf-8');
?>
<html>
    <head>
        <meta charset="utf-8">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>

    </head>
    <script type="text/javascript">
   // setTimeout("window.location.reload()",3000);
    </script>
    <body>

       <script>
          $(document).ready (function (
            ){  show();setInterval('show()',5000);

                $("#button").bind("click", function (){
                var message = $("#text").val();
                  $.ajax ({
                      url: "chat.php",
                      type: "POST",
                      data: {message},
                      dataType: "json"

                  });
                });
            });

                 function show()
                {
                    $.ajax({
                        url: "chat.php",
                        cache: false,
                        success: function(html){
                            $("#content").html(html);
                        }
                    });
                }
        </script>
        <div id="content">
            <?php
                include("config.php");
                if(isset($_POST['message'])){
                  $sql = "insert into `messages` (`message`) values ('".$_SESSION['login'].": ".$_POST['message']."')";
                  mysql_query($sql);

                }
                $sql = "select message from `messages` ORDER BY id desc LIMIT 10";
                $res = mysql_query($sql);


                if($res)
                {
                    while($row = mysql_fetch_object($res))
                    {
                     printf("<ul type='none'><li>%s</li></ul>",$row->message);
                    }
                }
                else
                {
                  echo "<p> <b>Error: ".mysql_error()."</b> </p>";
                  exit();
                }
             ?>

            <input type='text' id="text" name='message'>
            <button id="button">Saada</button>
        </div>
    </body>
</html>
ajax
  • 1 个回答
  • 10 Views
Martin Hope
NoProgress
Asked: 2020-11-13 02:47:42 +0000 UTC

Ajax 发送文本

  • 1

我需要向数据添加什么:并使其发送消息文本字段的值

 <html>
        <head>
            <meta charset="utf-8">
            <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
        </head>
        <body>
            <iframe name='chatWindow' id='chatWindow'frameborder="no" height="935" width="1910" src='iframe.php'>Chat</iframe>

        <br>    <input type='text' id="text" name='message'>
            <input type='button' id="button" value="send">
            <script>
            $(document).ready (function () {
                $("#button").bind("click", function (){
                  $.ajax ({
                      url: "iframe.php",
                      type: "POST",
                      data: ({}),
                      dataType: "PHP"
                  });  
                });
            });
            </script>  
        </body>
    </html>
php
  • 1 个回答
  • 10 Views
Martin Hope
NoProgress
Asked: 2020-11-05 19:06:53 +0000 UTC

如何交换数组中的两个元素?

  • 0

您如何在代码中交换“firstname”(“Martin”)和数组名称(“Krönström”),或者更确切地说,如何在第一个 foreach 循环中为 赋值$firstname = $lastnames[$key]['firstname'];,然后在 中使用它$newlastnames[$firstname]["firstname"] = $key;?

请解释什么,分配在funcion a哪里?

function a ($lastnames){
    $newlastnames;
    foreach($lastnames as $key => $value){
        $firstname = $lastnames[$key]['firstname'];
        $newlastnames[$firstname]["firstname"] = $key;
        $newlastnames[$firstname]["age"] = $lastnames[$key]['age'];
        $newlastnames[$firstname]["sex"] = $lastnames[$key]['sex'];
        echo $lastnames[$key]['firstname'].'<br>';
   }
    return $newlastnames;
}

整个代码在这里

$lastnames = array(

"Krönström" => array("firstname" => "Martin",     "age" => 20, "sex" => "male"),
"Kulper"    => array("firstname" => "Laura-Liis", "age" => 17, "sex" => "female"),
"Ööbik"     => array("firstname" => "Tõnis",      "age" => 21, "sex" => "male"),

"Mitri"   => array("firstname" => "Martten", "age" => 35, "sex" => "male"),
"Lõsenko" => array("firstname" => "Evelina", "age" => 16, "sex" => "female"),
"Reinaus" => array("firstname" => "Richard", "age" => 21, "sex" => "male"));

$newlastnames =  a($lastnames);
saveFile($newlastnames);

function saveFile($lastnames){
    file_put_contents("q.json",json_encode($lastnames));
}


function a ($lastnames){
    $newlastnames;
    foreach($lastnames as $key => $value){
        $firstname = $lastnames[$key]['firstname'];
        $newlastnames[$firstname]["firstname"] = $key;
        $newlastnames[$firstname]["age"] = $lastnames[$key]['age'];
        $newlastnames[$firstname]["sex"] = $lastnames[$key]['sex'];
        echo $lastnames[$key]['firstname'].'<br>';
   }
    return $newlastnames;
}
function sortA($lastnames,$sortValue){
    foreach($lastnames as $key => $value){
        if($sortValue == "firstname"){
            $throwArray[$key] = $key;
        }else{
            $throwArray[$key] = $value[$sortValue];
        }
    }
    array_multisort($throwArray, SORT_DEC, $lastnames);
    return $lastnames;
}
php
  • 1 个回答
  • 10 Views
Martin Hope
NoProgress
Asked: 2020-10-03 02:54:12 +0000 UTC

C# 帮助表单

  • 0

我创建了表单 Form1.cs 的副本并将新表单命名为 Form2 并且在程序的每次构建中 Form2 变得与 Form1 相同,我只需要将 Form1 复制到 Form2 并更改 Form2

而且我还无法以任何方式更改 Form2 和这些方块......

http://imgur.com/a/k2ro1


我添加一个新窗体,选择一个派生窗体,
然后选择 Form1 窗体
并在屏幕上创建一个 Form2 的副本,我已经创建了它

在此处输入图像描述

在此处输入图像描述

我需要为自己更改此副本,
但它不允许自己更改
如何制作我可以更改的副本

c#
  • 1 个回答
  • 10 Views
Martin Hope
NoProgress
Asked: 2020-10-02 01:38:20 +0000 UTC

if 参数后的 C# 错误 [关闭]

  • 1
关闭 这个问题是题外话。目前不接受回复。

根据帮助中描述的规则,这个问题很可能不对应俄语中 Stack Overflow 的主题。

5 年前关闭。

改进问题
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
    if(checked)
    {
        farmer = new Farmer(1, 400);
    }
    else
    {
        farmer = new Farmer(1, 300);
    }
}

帮助
我在做什么错误
错误之后(检查)

截图

在此处输入图像描述

在此处输入图像描述

c#
  • 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