小编ben*_*zen的帖子

如何处理分离头中的提交

使用git我做了这样的事情

git clone
git checkout {a rev number tree rev before} (here I started to be in a detached head state)
//hacking
git commit
//hacking
git commit
(some commit where made on origin/master)
git pull (which does complete because there was some error due to the fact that I'm no more on master)
Run Code Online (Sandbox Code Playgroud)

因为它告诉我,当我处于一个独立的头状态时,我仍然可以犯下这样做.但现在我想要合并我的分离头分支和我的本地主分支,然后将我的一堆更改推送到origin/master.

所以我的问题是如何将主分支与我的实际状态合并(分离头)

git git-checkout

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

通过Java中的反射访问私有继承的字段

我找到了一种方法来获取继承成员通过 class.getDeclaredFields(); 和访问私人成员,class.getFields() 但我正在寻找私人继承的字段.我怎样才能实现这一目标?

java reflection inheritance private-members

107
推荐指数
7
解决办法
9万
查看次数

使用angularjs $ http处理分块响应

我发现最近的回复很混乱。我同意大多数时候我们都希望做出全面回应。但是,如果我想处理分块响应,该怎么办。

我将如何使用$ http服务呢?

http chunked angularjs

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

scala actor消息定义

我是否需要为要在scala actor上检索的消息定义类?

我试图把它弄清楚我错在哪里

  def act() {  
    loop {  
      react {  
        case Meet => foundMeet = true ;   goHome  
        case Feromone(qty) if (foundMeet == true) => sender ! Feromone(qty+1); goHome  
   }}}
Run Code Online (Sandbox Code Playgroud)

message scala actor

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

gmaven 未找到测试

嗨,我遇到了一些错误,我在 groovy 中有一个非常小的项目。我想用maven。我能够编译我的文件、源代码和测试(我的 .class 在目标文件夹中)。但没有执行任何测试。这是我的 pom 文件。

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>gmedia</groupId>
<artifactId>gmedia.api</artifactId>
<name>Gmedia API project</name>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
  <dependency>
    <groupId>org.codehaus.groovy</groupId>
    <artifactId>groovy-all</artifactId>
    <version>1.7.1</version>
    </dependency>

  <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.8.2</version>
        <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>net.sf.json-lib</groupId>
      <artifactId>json-lib</artifactId>
      <version>2.2.3</version>
      <classifier>jdk15</classifier>
    </dependency>

    <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>eclipselink</artifactId>
        <version>2.0.2</version>
    </dependency>

    <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>javax.persistence</artifactId>
        <version>2.0.0</version>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.codehaus.groovy.maven</groupId>
            <artifactId>gmaven-plugin</artifactId>
            <version>1.0-rc-5</version>
            <executions>
                <execution>
                    <goals>
                      <!--<goal>generateStubs</goal>-->
                      <goal>compile</goal>
                      <!--<goal>generateTestStubs</goal>-->
                      <goal>testCompile</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.0.2</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration> …
Run Code Online (Sandbox Code Playgroud)

groovy maven-2 unit-testing gmaven-plugin

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

如何使用 thymeleaf 将翻译放入 javascript

使用 thymeleaf 我生成一个包含一些 javascript 的页面。js 是用 thymeleaf 生成的,以便将 java 模型的某些部分放入我的页面中。

我知道如何使用 thymeleaf 将一些内容翻译成我的 html。

但现在我想将一些 thymeleaf 翻译到我生成的 js 中,以便集中我的翻译工作。

理想情况下,我想要一个window.messages包含我所有翻译消息的变量。该 var 将在生成的 js 脚本中初始化。

这方面有什么参考吗?

javascript java internationalization thymeleaf

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

声纳数据库有多大?

这可能看起来像一个愚蠢的问题.事实上,它更像是民意调查:你的Sonar数据库有多大?我需要这个来估计虚拟机托管我的Sonar实例的要求.

也:

  • 你的团队有多大?
  • 每次新提交时,Sonar数据库中使用了多少额外字节?

我将不胜感激任何帮助.

database size evaluation diskspace sonarqube

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

将维基语言转换为另一种语言

嗨我在redmine中使用wiki来制作一些文档,在"评估期".这个wiki被托管在网络的某个地方,我无法访问,可以访问数据库,而不是可编辑/呈现的维基页面.现在我的想法更清楚了.我想在mediawiki实例上自己托管wiki.

问题是如何将旧维基的内容转换为新维基.

我的redmine wiki上没有提取按钮.(但我知道如何使用mediawiki这样做)

由于我没有很多页面,我可以复制页面的内容(意思是用wiki标记语言的那个),但我不想手工进行转换.

你能帮助我吗?

wiki mediawiki redmine

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