小编Joh*_*ohn的帖子

TODO在rStudio中发表评论

有没有办法在rstudio中列出ToDo评论?在我使用eclipse之前,我真的很喜欢# TODO I definitely need more unit tests here!在我的源代码中添加一些注释.

到目前为止我在rStudio中找不到这个功能,我想知道,如果有类似插件的东西,或者可能是搜索此类评论的简单方法.

r rstudio

30
推荐指数
4
解决办法
5600
查看次数

我使用的是哪个版本的XPATH和XSLT ..?

如何知道我使用的是哪个版本的XPATH和XSLT?

说我已经安装了JDK 1.7然后我有哪个版本的XPATH和XSLT ..?

java xslt xpath

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

踢开摩卡并行描述

我希望能够让我在Mocha中的所有描述语句并行启动.有人可以帮我弄明白怎么做吗?

mocha.js node.js

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

Internet Explorer与角度材料的兼容性

我正在研究带有角度材料设计的 MEAN堆栈.在chrome和firefox上进行测试后,包括flex和offset等在内的所有功能都非常完美.但是在互联网资源管理器中,没有任何东西像它应该的那样工作.

我的问题是,如何使角度材料与IE 10和IE 11兼容?

angular-material

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

在Laravel 5.1上验证之前修改输入

我试图在验证成功之前修改用户提交的输入.我遵循了这个简单的说明,但是当我在Laravel 5.1上进行测试时,它无法正常工作.难道我做错了什么?

这是我的Request课程 SSHAM\Http\Requests\UserCreateRequest.php

<?php

namespace SSHAM\Http\Requests;

use SSHAM\Http\Requests\Request;

class UserCreateRequest extends Request
{

    // Some stuff not related with this problem

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        // Only for debug
        $prova = $this->all();
        echo "<pre>Inside Request - Before sanitize\n[" . $prova['public_key'] . "]</pre>\n";

        // Call a function to sanitize user input
        $this->sanitize();

        // Only for debug    
        $prova = $this->all();
        echo "<pre>Inside …
Run Code Online (Sandbox Code Playgroud)

php validation sanitization laravel-5

16
推荐指数
2
解决办法
7841
查看次数

如何在Android Studio 1.3中配置NDK项目

我一直在试图通过以下配置的Android Studio中NDK 文章,这个文章.以下是我的gradle-wrapper.properties的内容

#Sat Aug 08 09:36:53 IST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.5-all.zip
Run Code Online (Sandbox Code Playgroud)

以下是build.gradle(项目)的内容

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle-experimental:0.2.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}
Run Code Online (Sandbox Code Playgroud)

最后是build.gradle(模块)

apply plugin: 'com.android.model.application'

model {
    android {
        compileSdkVersion = 22 …
Run Code Online (Sandbox Code Playgroud)

android android-ndk android-studio

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

T4脚手架不适用于Visual Studio 2015

我已经创建了一个T4脚手架模板库,我在Visual Studio的早期版本中已成功使用,但现在已将我的项目升级到VS 2015,打开"Package Manager Console"时出现以下错误:

Set-DefaultScaffolder : Cannot get an instance of EnvDTE.DTE
At C:\MyPath\packages\T4Scaffolding.1.0.8\tools\init.ps1:7 char:1
+ Set-DefaultScaffolder -Name Repository -Scaffolder T4Scaffolding.EFRe    ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Set-DefaultScaffolder], InvalidOperationException
+ FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet
Run Code Online (Sandbox Code Playgroud)

似乎EnvDTE.DTE可能不再支持开箱即用了?

无论如何解决这个问题还是在VS 2015中有一个可以运行我现有的T4模板文件的新机制.

我的项目建立并运行良好.

powershell envdte t4scaffolding visual-studio-2015

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

Angularjs使用下拉列表过滤数据

我是angularjs和javascript的新人,所以请善待,我有两个下拉项目(离子选择)他们都持有服务数据.问题是我需要过滤它们才能一起工作:如果我在第一个下拉列表中选择一个公司,那么只有该公司内部的代表应显示在另一个下拉列表中.

| filter: byID在Angularjs文档中尝试使用,但我不认为这是不正确的做法.

HTML:

<label class="item item-input item-select"">
    <div class="input-label">
      Company:
    </div>
    <select>
      <option ng-repeat="x in company">{{x.compname}}</option>
      <option selected>Select</option>      
    </select>
  </label>
   <div class="list">
  <label class="item item-input item-select">
    <div class="input-label">
      Rep:
    </div>
    <select>
       <option ng-repeat="x in represent">{{x.repname}}</option>
      <option selected>Select</option>
    </select>
  </label>
Run Code Online (Sandbox Code Playgroud)

使用Javascript:

/*=========================Get All Companies=========================*/
 $http.get("http://localhost:15021/Service1.svc/GetAllComp")
      .success(function(data) {

        var obj = data;
        var SComp = [];


    angular.forEach(obj, function(index, element) {

    angular.forEach(index, function(indexN, elementN) {        

        SComp.push({compid: indexN.CompID, compname: indexN.CompName});

        $scope.company = SComp;
    });    

    });          
            })
/*=========================Get All Companies=========================*/

/*=========================Get …
Run Code Online (Sandbox Code Playgroud)

javascript angularjs ionic-framework ionic

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

XQuery - 分组和计数

这是我的XML文件的结构 -

<A>
  <Name t="Mr.">James Bond</Name>
  <Name t="Mr.">Allen Bond</Name>
  <Name t="Mr." p="X">James Bond</Name>
  <Name t="Mr." p="X">James Bond</Name>
  <Name t="Mr.">James Bond</Name>
  <Name t="Mrs.">James Bond</Name>
  <Name t="Mrs.">James Bond</Name>
  <Name t="Mr.">James Bond</Name>
  <Name t="Mrs." p="Y">James Bond</Name>
  <Name t="Mrs." p="Y">James Bond</Name>
</A>
Run Code Online (Sandbox Code Playgroud)

我期待的输出是 -

<A>
  <N>Allen Bond Mr - 1</N>
  <N>James Bond Mr - 3</N>
  <N>James Bond Mr, X - 2</N>
  <N>James Bond Mrs - 2</N>  
  <N>James Bond Mrs, Y - 2</N>
</A>
Run Code Online (Sandbox Code Playgroud)

我能够得到不同的名字,但不能添加计数...

xml xquery

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

Rails/Bootstrap - Flash通知:成功现在是红色而不是绿色?

我一直试图在这里寻找答案,但我找不到任何有用的东西.我已经实现了:成功和:我的rails应用程序的危险闪光通知.它完全正常工作,即:成功是绿色的:危险是红色的,有一个关闭按钮和所有,但是因为添加一些邮件文件我的:成功现在显示红色?

application.html.erb摘录:

<body>

  <div class="container">
    <% flash.each do |key, value| %>
      <%= content_tag :div, class: "alert alert-#{key == 'notice ? 'success' : 'danger'}" do %>
        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <%= value %>
      <% end %>
    <% end %>

    <%= yield %>
  </div>

</body>
Run Code Online (Sandbox Code Playgroud)

contact_mailer.rb

class ContactMailer < ActionMailer::Base
  default to: 'justindavidson23@gmail.com'

  def contact_email(name, phone, email, event_type, body)
    @name = name
    @phone = phone
    @email = email
    @event = event_type
    @body = body

    mail(from: email, subject: 'Contact Form Message').deliver …
Run Code Online (Sandbox Code Playgroud)

ruby flash ruby-on-rails ruby-on-rails-3 twitter-bootstrap

6
推荐指数
1
解决办法
3756
查看次数