首页 \ 问答 \ 如何填充文本框?(How do I populate my textboxes?)

如何填充文本框?(How do I populate my textboxes?)

我正在为我的实习制作一个网站,我遇到了一个问题。 将数据从我的数据库检索到我的文本框中。 如果可能,每个人都有自己的信息。 例如; 我有一个John的文本框,他有一个名字和电子邮件。 杰克也有一个名字和电子邮件。 两者都需要从数据库中选择并放入表单中。 这是一个可以更改人员信息的表单。 你可以在这里看到网站。 点击“Wijzig”按钮查看我的意思。

<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
<tr>
  <td width="100">
    <div id="flip">
      <img src="images/ik.jpg" class="circular" width="100px" height="100px">
      <td width="350px">
        <label for="luca" style="width: 280px;">Luca Fraser</label>

        <div id="panel" style="display: none;">Geboortedatum: 30-12-1997
          <br>Email: lucaf1997@gmail.com
          <br>Woonplaats: Winterswijk
        </div>
      </td>
    </div>
  </td>
  <td>
    <label for="luca">Voorzitter</label>
  </td>
  <td style="border-color: transparent;">
    <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModalNorm" style="background-color: #42a5f5; border-color: #42a5f5; margin-left: 20px;">Wijzig
    </button>
    <div class="modal fade" id="myModalNorm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog">
        <div class="modal-content">
          <!-- Modal Header -->
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">
              <span aria-hidden="true">&times;</span>
              <span class="sr-only">Close</span>
            </button>
            <h4 class="modal-title" id="myModalLabel">
                                            Wijzigen
                                        </h4>
          </div>

          <!-- Modal Body -->
          <div class="modal-body">
            <form role="form">

              <div class="form-group">
                <label for="exampleInputEmail1">Voornaam</label>
                <input type="email" class="form-control" id="exampleInputEmail1" value="Here needs to get a input value, look at line 247 to see where it needs to be." />
              </div>

              <div class="form-group">
                <label for="exampleInputEmail1">Achternaam</label>
                <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Janssen" />
              </div>

              <div class="form-group">
                <label for="exampleInputEmail1">Email</label>
                <input type="email" class="form-control" id="exampleInputEmail1" placeholder="jan@janssen.nl" />
              </div>

              <div class="form-group">
                <label for="exampleInputPassword1">Telefoonnummer</label>
                <input type="text" class="form-control" id="exampleInputPassword1" placeholder="0612345678" />
              </div>

              <div class="form-group">
                <label for="exampleInputEmail1">Functie</label>
                <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Voorzitter" />
              </div>
            </form>
          </div>

          <!-- Modal Footer -->
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">
              Close
            </button>
            <button type="button" class="btn btn-primary">
              Save changes
            </button>
          </div>
        </div>
      </div>
    </div>


  </td>
  <td style="border-color: transparent;">
    <button type="button" class="btn btn-danger" onclick="myFunction()">Verwijder</button>
  </td>
</tr>


I am making a website for my internship and I came across a problem. Retrieving data from my database into my textboxes. If possible, each person their own information. For example; I have a textbox for John, he has a name and email. Jack also has a name and email. Both need to be selected from the database and put in the form. It's a form where you can make changes to the persons information. You can see the website yourself here. Click on the button "Wijzig" to view the form I mean.

<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
<tr>
  <td width="100">
    <div id="flip">
      <img src="images/ik.jpg" class="circular" width="100px" height="100px">
      <td width="350px">
        <label for="luca" style="width: 280px;">Luca Fraser</label>

        <div id="panel" style="display: none;">Geboortedatum: 30-12-1997
          <br>Email: lucaf1997@gmail.com
          <br>Woonplaats: Winterswijk
        </div>
      </td>
    </div>
  </td>
  <td>
    <label for="luca">Voorzitter</label>
  </td>
  <td style="border-color: transparent;">
    <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModalNorm" style="background-color: #42a5f5; border-color: #42a5f5; margin-left: 20px;">Wijzig
    </button>
    <div class="modal fade" id="myModalNorm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog">
        <div class="modal-content">
          <!-- Modal Header -->
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">
              <span aria-hidden="true">&times;</span>
              <span class="sr-only">Close</span>
            </button>
            <h4 class="modal-title" id="myModalLabel">
                                            Wijzigen
                                        </h4>
          </div>

          <!-- Modal Body -->
          <div class="modal-body">
            <form role="form">

              <div class="form-group">
                <label for="exampleInputEmail1">Voornaam</label>
                <input type="email" class="form-control" id="exampleInputEmail1" value="Here needs to get a input value, look at line 247 to see where it needs to be." />
              </div>

              <div class="form-group">
                <label for="exampleInputEmail1">Achternaam</label>
                <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Janssen" />
              </div>

              <div class="form-group">
                <label for="exampleInputEmail1">Email</label>
                <input type="email" class="form-control" id="exampleInputEmail1" placeholder="jan@janssen.nl" />
              </div>

              <div class="form-group">
                <label for="exampleInputPassword1">Telefoonnummer</label>
                <input type="text" class="form-control" id="exampleInputPassword1" placeholder="0612345678" />
              </div>

              <div class="form-group">
                <label for="exampleInputEmail1">Functie</label>
                <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Voorzitter" />
              </div>
            </form>
          </div>

          <!-- Modal Footer -->
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">
              Close
            </button>
            <button type="button" class="btn btn-primary">
              Save changes
            </button>
          </div>
        </div>
      </div>
    </div>


  </td>
  <td style="border-color: transparent;">
    <button type="button" class="btn btn-danger" onclick="myFunction()">Verwijder</button>
  </td>
</tr>


原文:https://stackoverflow.com/questions/35455497
更新时间:2023-10-31 13:10

最满意答案

您必须添加scale_color_identity才能按“原样”采用颜色:

ggplot(data=image.rgb, aes(x=x, y=y, col=rgb(r,g,b))) + 
    geom_point() + 
    scale_color_identity()

您提供的样本数据提供非常相似的颜色,因此所有点都显示为黑色。 使用geom_tile ,不同的颜色更加明显:

ggplot(data=image.rgb, aes(x=x, y=y, fill=rgb(r,g,b))) +
    geom_tile() +
    scale_fill_identity()

在这里输入图像描述


You must add scale_color_identity in order for colors to be taken "as is" :

ggplot(data=image.rgb, aes(x=x, y=y, col=rgb(r,g,b))) + 
    geom_point() + 
    scale_color_identity()

The sample data you provided give very similar colors, so all the points seem to be black. With geom_tile the different colors are a bit more visible :

ggplot(data=image.rgb, aes(x=x, y=y, fill=rgb(r,g,b))) +
    geom_tile() +
    scale_fill_identity()

enter image description here

相关问答

更多

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)