小编Erd*_*tin的帖子

AngularJS如何使用浏览器语言检测?

嗨,我用http.get从数据库中获取文本.如何使用浏览器检测?如何使用if子句?我不想使用translate.toogle()

    var mainCtrl = function ($scope, $http, $sce, $location,$timeout,$routeParams, toastr) {

    $scope.showPage = false;     
    $timeout(function(){
        $scope.showPage = true;
            },2000);


        $scope.trustedHtml = function (plainText) {
            return $sce.trustAsHtml(plainText);
        }

        $http.get('admin/api/?s=getAbout').success(

         ##### if browser En_en
            function(r){
                $scope.about = r.text_en;

         ##### if browser De_de
            function(r){
                $scope.about = r.text_de;
            }
        );

};
Run Code Online (Sandbox Code Playgroud)

angularjs

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

Ubuntu 16.04 mysql_old_password 无法加载

我想使用 shell 命令连接到外部服务器上的 mysql 数据库。Ubuntu 版本 16.04。

 mysql -uXXXXXX -pYYYYYY -h domain.com
Run Code Online (Sandbox Code Playgroud)

我得到错误:

mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2059 (HY000): Authentication plugin 'mysql_old_password' cannot be loaded: /usr/lib/mysql/plugin/mysql_old_password.so: cannot open shared object file: No such file or directory
Run Code Online (Sandbox Code Playgroud)

mysql ubuntu

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

标签 统计

angularjs ×1

mysql ×1

ubuntu ×1