小编its*_*sme的帖子

删除所有macosx目录中的所有svn文件

我想运行一个命令来删除我的macosx中的所有.svn文件.

是否可以或者更好地从目录中删除它们?

我怎样才能做到这一点?

谢谢

svn macos file

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

Twitter Bootstrap - 在导航栏中居中品牌标识

我尝试将.brand徽标集中在:

.brand { margin-left: auto; margin-right: auto; }
Run Code Online (Sandbox Code Playgroud)

这是我的顶级导航栏布局:

http://jsfiddle.net/J4zkJ/3/

但它似乎不起作用.

我之前在堆栈上搜索过这个答案,我上面使用的代码来自一个已回答的问题.

知道如何居中.brand?

NB:我不能使用position:absolute and fixed,我想响应地做这个(responsive)

我也试过这个:

.brand { 
  margin:0 auto !important;
  padding:0 auto !important;
  position:absolute !important;
  right:0px;
  left:0px;
   z-index:9999999999 !important;

}
Run Code Online (Sandbox Code Playgroud)

javascript css navbar graphical-logo twitter-bootstrap

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

未找到 CodeIgniter URL

enter code here我在 .htaccess 文件中得到了这段代码:

RewriteEngine On
RewriteBase /projFolder

### Canonicalize codeigniter URLs

# If your default controller is something other than
# "welcome" you should probably change this
RewriteRule ^(mycontrol(/index)?|index(\.php)?)/?$ /  [L,R=301]
RewriteRule ^(.*)/index/?$ $1 [L,R=301]

# Removes trailing slashes (prevents SEO duplicate content issues)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [L,R=301]

# Enforce www
# If you have subdomains, you can add them to 
# the list using the "|" (OR) regex operator
RewriteCond %{HTTP_HOST} !^(www|subdomain) [NC] …
Run Code Online (Sandbox Code Playgroud)

php .htaccess codeigniter url-rewriting

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

PHP - 替换所有支持的语言的所有非字母数字字符

嗨,我实际上是尝试从这样的字符串替换所有非字母数字字符:

mb_ereg_replace('/[^a-z0-9\s]+/i','-',$string);
Run Code Online (Sandbox Code Playgroud)

第一个问题是它不会替换"."字符串中的字符.

其次,我想为所有用户语言添加multybite支持.

我怎样才能做到这一点?

感谢任何帮助,非常感谢.

php regex string replace multibyte

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

如何检测第一个"/"路由呼叫?

无论如何都要检查"/"第一次调用路线的时间?

我的意思是,检查应用程序的主页是否第一次打开.

url webpage routes root angularjs

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

Angular js - 调用没有视图的路径

我正在尝试调用/auth/logouturl在删除会话后重定向:

app.config(['$routeProvider',function($routeProvider) {
    $routeProvider
    .when('/auth/logout',{
        controller:'AuthLogout'
        //templateUrl: not needed

    })
})
.controller('AuthLogout', ['$window','$location', function ($window,$location) {
    $window.localStorage.removeItem('user_username');
    $window.localStorage.removeItem('user_id');
    $window.localStorage.removeItem('user_session_token');
    $location.path('/');
}]);
Run Code Online (Sandbox Code Playgroud)

我实际上不需要AuthLogout控制器的视图但是如果我没有templateUrl在routeProvider中指定我不能使它工作,而如果我指定templateUrl它工作.

如何在不加载视图的情况下调用url/controller?

javascript controllers angularjs route-provider

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

Angular js - 在$ scope中增加月数

我想像这样增加月份:

 var date = new Date();
    $scope.month = $filter('date')(date, 'MMMM');
    $scope.nextMonth = function () {                
     //set next month
     $scope.month = $filter('date')(new Date($scope.month).getMonth()+1, 'MMMM');
    };
Run Code Online (Sandbox Code Playgroud)

我怎么能实现这个目标?

例如,如果

$scope.month = "November";

$ scope.nextMonth(); 应该设定$scope.month = "December";

注意:我不能使用任何外部库

javascript date filter angularjs

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

Javascript按类或id获取DOM数组中的元素索引位置

我的情况

var domElements = document.body.getElementsByTagName('*');
Run Code Online (Sandbox Code Playgroud)

现在我想返回数组项键 - 数组中元素的位置 - (例如domElements[34])在数组中搜索带有id="asd".

我怎样才能做到这一点?

如果我想搜索槽而不是 ID 怎么class="asd hey"办?

任何帮助表示赞赏,谢谢!

注意:不是在 jquery 中,在这种情况下我需要在纯 javascript 中

javascript dom elements selector

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

这段代码出了什么问题?:/

我认为我的代码没问题,但是当我尝试启动绑定到#save输入的ajax调用时,它重新加载页面并且没有启动xhr调用:/,firebug控制台向我显示此错误:

uncaught exception: [Exception... "Not enough arguments [nsIDOMLocation.replace]" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: http://localhost/mysite/js/jquery.js :: <TOP_LEVEL> :: line 18" data: no] http://localhost/mysite/js/jquery.js Line 18

我正在使用jQuery 1.6.2版本,我的代码就是这样:

<ul class="profile-account">
                    <li><h1>Account</h1></li>
                    <li><h4>Username</h4><input type="text" id="username" class="bradius3" value="<?php echo $populateUser->username; ?>"/></li>
                    <li class="error" id="error_username"></li>
                    <li><h4>Email</h4><input type="text" id="email" class="bradius3" value="<?php echo $populateUser->email; ?>"/></li>
                    <li class="error" id="error_email"></li>
                    <li><h4>Password</h4><input type="password" id="password" class="bradius3"/></li>
                    <li class="error" id="error_password"></li>
                    <li><h4>Password Confirm</h4><input type="password" id="confirm-password" class="bradius3"/></li>
                    <li class="error" id="error_password_confirm"></li>
                    <li><h4>Location</h4><input type="text" class="bradius3" id="location" /></li>
                    <li><h1>About Me</h1><textarea id="about"><?php echo $populateUser->about; ?></textarea></li>
                    <li …
Run Code Online (Sandbox Code Playgroud)

javascript ajax jquery xmlhttprequest

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

jQuery搜索如果找到元素子

嗨,我的HTML看起来像这样:

<ul class="first">
  <li>
    <div class="tg-hey">hey</div>
    <div class="tg-hi">hi</div>
    <div class="tg-hoi">hoi</div>
  </li>
</ul>
<ul class="second">
  <li>
    <div class="tg-hey">hey</div>
    <div class="tg-hi">hi</div>
    <div class="tg-hoi">hoi</div>
  </li>
</ul>
<ul class="third">
  <li>
    <div class="tg-hey">hey</div>
    <div class="tg-hi">hi</div>
    <div class="tg-hoi">hoi</div>
  </li>
</ul>
Run Code Online (Sandbox Code Playgroud)

我需要的是找到(例如<ul class="second">)是否<div class="tg-hey">存在.

我怎么检查呢?

javascript search jquery controls find

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