小编Ame*_* Ra的帖子

如何将SQL数据文件导入SQL Server?

我有一个.sql文件,我正在尝试将其导入SQL Server 2008.这样做的正确方法是什么?

sql sql-server-2008

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

如何在专用服务器上安装Node Js

我有一个由GoDaddy维护的专用服务器.我想在它上面运行Node Js.有没有关于如何在我的服务器上安装Node JS的文档?我有一个CentOS专用服务器.

centos node.js

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

如何解决JSLint警告"不要使用'new'作副作用"?

为什么我会收到这些错误?

第329行的问题60:不要使用'new'作副作用.

new widget.StyledDropdown(dojo.byId("sTitle"));

第330行的问题字符61:不要使用"新"作为副作用.

new widget.StyledDropdown(dojo.byId("sSuffix"));

第336行的问题57:不要使用'new'作副作用.

true,{shortenName : true,maxChars : 20});

第338行问题129:不要使用'new'作副作用.

new widget.StyledDropdown(dojo.byId("sCountry"),USPS.Address.countrySw...

javascript jslint

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

如何使用Javascript而不是jQuery动态填充带有JSON数据的html元素?

我有以下JSON数据snippit:

{"items": [
 {
   "title": "sample 1",
   "author": "author 1"
 },
 {
  "title": "sample 2",
  "author": "author 2"
 }
]}
Run Code Online (Sandbox Code Playgroud)

如何使用以下数据填充以下html元素:

<div class="news-story">
 <h5>sample 1</h5>
 <p>By: author 1</p>
 <h5>sample 2</h5>
 <p>By: author 2</p>
</div>
Run Code Online (Sandbox Code Playgroud)

我想用Javascript而不是jQuery完成这个.

html javascript json

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

我如何在这个正则表达式中包含 - 和'?

对于某些输入名称字段,我在下面有这个正则表达式.如何在此包含撇号和连字符?

InputField("tFName", /^[a-zA-Z-\-\ ]+$/);
Run Code Online (Sandbox Code Playgroud)

javascript regex

5
推荐指数
1
解决办法
8365
查看次数

节点中的无浏览器jQuery不断出错

我正在尝试运行节点脚本和html页面,但是我一直收到错误消息。我尝试运行的脚本是:

node script.js page.html
Run Code Online (Sandbox Code Playgroud)

script.js文件具有以下内容:

var argv = require('optimist').argv,
$ = require('jquery'),
fs = require('fs');

var file = argv._[0];

var html = fs.readFileSync(file, 'UTF-8');

 $(html).find('p').each(function(index) {
var content = $(this).html();

console.log('Paragraph ' + (index + 1) + ': ' + content);
});
Run Code Online (Sandbox Code Playgroud)

我的page.html具有以下代码:

<html>
 <body>
  <p>Apple</p> 
  <span>Unrelated</span>
  <p>Orange</p>
  <div>Steak</div>
  <p>Banana</p>
 </body>
</html>
Run Code Online (Sandbox Code Playgroud)

我的packages.json文件内容如下:

{
  "name": "paragraphs",
  "version": "1.0.0",
  "main": "script.js",
  "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1"
   },
  "dependencies": {
      "optimist": "0.3.4",
      "jquery": "1.7.3"
   },
   "author": …
Run Code Online (Sandbox Code Playgroud)

html browser jquery node.js

5
推荐指数
1
解决办法
577
查看次数

如何从对象数组创建反应列表组件?

一位开发人员给了我一个 api 规范,它List可以接受使用下面描述的形状的对象数组ListItem;这将被转换为一组渲染List.Item组件。

应用程序编程接口

List组件接受以下属性:

  • itemsListItem[]):必需的。该数组应包含一个或多个 JSX 元素,或者一个或多个ListItem对象(详细信息请参见下文)。
  • searchablestring[]): 选修的。接受与 ListItem 属性名称匹配的字符串数组。如果存在,则会在列表上方呈现本地化的自由格式搜索框,并且该字段中的输入将使用提供的键作为指导来过滤内部数据。

模式


ListItem

ListItem是列表中单个项目的对象架构。

{
    // REQUIRED: The main title of the list item.
    title: string,
    // OPTIONAL: A secondary title.
    subtitle: string,
    // OPTIONAL: Additional labeling which appears directly below the title or subtitle label: String,
    // OPTIONAL: If provided, a date will always appear at the top of …
Run Code Online (Sandbox Code Playgroud)

javascript reactjs array.prototype.map

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

在GoDaddy CentOS专用服务器上安装Subversion后,如何配置和访问我的subversion存储库

我在服务器上成功安装了subversion.当我运行命令时:

which svn
Run Code Online (Sandbox Code Playgroud)

我收到了回复:

/usr/bin/svn
Run Code Online (Sandbox Code Playgroud)

我在我的根目录中创建了一个存储库,它是我的httpdocs文件夹,其中包含以下命令:

svnadmin create ~/svn
Run Code Online (Sandbox Code Playgroud)

我成功创建了以下文件和文件夹并对其进行了配置,我在svn目录中看到了以下文件和目录:

conf  db  format  hooks  locks  README.txt
Run Code Online (Sandbox Code Playgroud)

但是我无法创建trunk,branch和tag目录.实际上我无法创建目录期间.这是我一直使用的命令:

svn mkdir file:///httpdocs/svn/site
Run Code Online (Sandbox Code Playgroud)

当我发出此命令时,我收到的消息如下:

svn: Could not use external editor to fetch log message; consider setting the
$SVN_EDITOR environment variable or using the --message (-m) or --file (-F) options
svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no
'editor-cmd' run-time configuration option was found
Run Code Online (Sandbox Code Playgroud)

当我输入网址时:

http://mydomain.com/svn
Run Code Online (Sandbox Code Playgroud)

我收到了以下消息:

404 - Not Found 
Run Code Online (Sandbox Code Playgroud)

我需要做什么来配置我的存储库,检查我的存储库是否真的有效.哦,我确实运行了以下命令:

svnserve -d
Run Code Online (Sandbox Code Playgroud)

svn apache version-control centos dedicated-server

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

npm init没有在我的mac上创建package.json

当我尝试package.json使用npm init我创建文件时,我会不断获得以下内容:

npm http GET https://registry.npmjs.org/init
npm http 304 https://registry.npmjs.org/init
npm http GET https://registry.npmjs.org/daemon
npm http 304 https://registry.npmjs.org/daemon
init@0.1.2 node_modules/init
??? daemon@1.1.0
Run Code Online (Sandbox Code Playgroud)

怎么了?我到处寻找,我找不到答案.这是我运行以下命令时得到的结果:

Amens-Mac-mini:~ amenmojara$ npm init =ddd
npm http GET https://registry.npmjs.org/%3Dddd
npm http GET https://registry.npmjs.org/init
npm http 304 https://registry.npmjs.org/init
npm http 404 https://registry.npmjs.org/%3Dddd
npm ERR! 404 '%3Dddd' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404
npm ERR! 404 Note that you can also …
Run Code Online (Sandbox Code Playgroud)

json node.js npm

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

如何创建可以将html导出到CSV文件的功能?

我有以下html文件:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr" lang="en">
    <head>
    </head>
    <body>
         <p align="center"><strong>Claims Search Results</strong></p>
         <table id="ClaimsListPrint" class="printClaims">
         <thead>
        <tr style="background-color: rgb(241, 241, 241);">
            <th style="background-color: rgb(215, 227, 235);">
                Member
            </th>
            <th style="background-color: rgb(215, 227, 235);">
                Date of Service
            </th>
            <th style="background-color: rgb(215, 227, 235);">
                Provider
            </th>
            <th style="background-color: rgb(215, 227, 235);">
                Claim Type
            </th>
            <th style="background-color: rgb(215, 227, 235);">
                Status
            </th>
            <th style="background-color: rgb(215, 227, 235);">
                Billed Amount
            </th>
            <th style="background-color: rgb(215, 227, 235);">
                Paid by Plan
            </th>
            <th style="background-color: rgb(215, …
Run Code Online (Sandbox Code Playgroud)

javascript php csv html-table export-to-csv

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