小编een*_*nto的帖子

无法使用debian 8(Jessie)的服务命令

为了将LibreOffice 4.4安装到我的Debian 8(Jessie)中,我刚从Debian 7.5获得了所有bash脚本,并将它们以相同的方式运行到D8中.

我知道新版本有一些变化,但我不能再使用这样的服务了:

sudo service libreoffice start
Run Code Online (Sandbox Code Playgroud)

当这样做不会启动任何东西,我必须使用以下方式启动它:

sudo /etc/init.d/libreoffice start
Run Code Online (Sandbox Code Playgroud)

奇怪的是,做的时候(参数不好):

sudo service libreoffice dzedjiodjzedj
Run Code Online (Sandbox Code Playgroud)

...脚本完美执行,它显示我捕获的错误

这是我的/etc/init.d/libreoffice文件:

    #
# libreoffice     This shell script takes care of starting and stopping the LibreOffice Daemon
#
# chkconfig: - 80 20
#
### BEGIN INIT INFO
# Provides: libreofficedaemon
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start:   2 3 4 5
# Default-Stop:    0 1 6
# Description: Init.d script to run a LibreOffice Daemon
# Short-Description: start …
Run Code Online (Sandbox Code Playgroud)

linux bash service debian

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

ORMLite很多关系Android

我有两节课:

UniteStratigraphique.java:

    @DatabaseTable(tableName = "unitestratigraphique")
    public class UniteStratigraphique {
    public final static String ID_FIELD_NAME = "id";
        @DatabaseField(generatedId = true, columnName = ID_FIELD_NAME)
        private int id;
    // CAMPAGNES
        @DatabaseField(foreign = true, foreignAutoRefresh = true)
        private Campagne campagne;
        @ForeignCollectionField
        private ForeignCollection<Campagne> listeCampagnes;

public UniteStratigraphique() {}

    public Campagne getCampagne() {
            return campagne;
        }

        public void setCampagne(Campagne campagne) {
            this.campagne = campagne;
        }

        public ArrayList<Campagne> getListeCampagnes() {
            ArrayList<Campagne> campagnesArray = new ArrayList<Campagne>();
            for (Campagne campagne : listeCampagnes) {
                campagnesArray.add(campagne);
            }
            return campagnesArray;
        }

        public …
Run Code Online (Sandbox Code Playgroud)

android many-to-many ormlite foreign-collection

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

对齐Bootstrap面板标题中的元素

为了将3个元素放入面板标题,我尝试了这个:

 <div class="panel panel-primary">
            <!-- Default panel header contents -->
            <div class="panel-heading">
                <h4 class="panel-title">
                    <div class="pull-left">
                        <h4 class="panel-title"> <i class="glyphicon glyphicon-user"></i>
                            Users
                        </h4>
                    </div>
                    <div class="header-center">
                        <pagination class="panel-title" ng-show="totalItems > pageParameters.size" items-per-page="pageParameters.size" boundary-links="true" total-items="totalItems" ng-model="currentPage" ng-change="changePage()"
                                    previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></pagination>
                    </div>
                    <div class="pull-right">
                       <span class="panel-title btn-group">
                            <button ng-disabled="underCreation" type="button" class="btn btn-default btn-sm" ng-click="addUser()">
                                <span class="glyphicon glyphicon-plus text-primary"></span>
                                <span class="text-primary"><strong>Add</strong></span>
                            </button>
                        </span>
                    </div>
                </h4>
                <div class="clearfix"></div>
            </div>
</div>
Run Code Online (Sandbox Code Playgroud)

和.less文件对应:

.header-center {
    display: flex;
    justify-content: center;
    align-items: center;
  }
Run Code Online (Sandbox Code Playgroud)

但这会呈现:

标题元素未对齐

我需要添加按钮与其他元素对齐..

html css twitter-bootstrap twitter-bootstrap-3

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

C#使用LINQ解析简单的XML文件

我有这个非常简单的xml文件:

<?xml version="1.0" encoding="UTF-8"?>
<ConfigurationFile>
    <ConfigurationFilePath>Test1</ConfigurationFilePath>
    <ConnectionString>Test2</ConnectionString>
    <AnalyzeFilePath>Test3</AnalyzeFilePath>
</ConfigurationFile>
Run Code Online (Sandbox Code Playgroud)

我想获得每个领域的信息.但这并没有显示任何东西..

这是我的C#代码背后:

private void ParseXMLFile()
{
    Console.WriteLine("Parse");
    if (configurationPAthFileTextbox.Text != null)
    {
        Console.WriteLine("file != null");
        try
        {
            XElement main = XElement.Load(configurationPAthFileTextbox.Text);

            var results = main.Descendants("ConfigurationFile")
                          .Select(e => new { ConfigurationFilePath = e.Descendants("ConfigurationFilePath").FirstOrDefault().Value,
                                   ConnectionString = e.Descendants("ConnectionString").FirstOrDefault().Value });

            foreach (var result in results)
                Console.WriteLine("{0}, {1}", result.ConfigurationFilePath, result.ConnectionString);
            Console.ReadLine();

        }
        catch (Exception e)
        {
            Debug.WriteLine(e.ToString());
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

c# xml linq wpf linq-to-xml

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

Docker无法启动容器没有这样的文件或目录

我无法在构建后启动我的容器,我得到了:

Error response from daemon: Cannot start container ogc-mysql: no such file or directory
Error: failed to start one or more containers
Run Code Online (Sandbox Code Playgroud)

这是我的Docker文件:

FROM ubuntu:latest

MAINTAINER Davin Kevin

# Install latest updates
RUN apt-get update
RUN apt-get upgrade -y

# Install mysql client and server
RUN apt-get -y install mysql-client mysql-server curl

# Enable remote access (default is localhost only, we change this
# otherwise our database would not be reachable from outside the container)
RUN sed -i -e"s/^bind-address\s*=\s*127.0.0.1/bind-address = …
Run Code Online (Sandbox Code Playgroud)

mysql linux ubuntu boot2docker

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