小编Nar*_*ges的帖子

visual studio 2012不兼容和编辑器包无法正确加载?

我曾经使用vs 2012一段时间没有任何问题,今天当我想打开我的c#项目时,我收到此错误消息:

This program has known compatibility issues

Visual Studio 2012 Express for Windows Desktop is incompatible with this version of Windows. 
Run Code Online (Sandbox Code Playgroud)

当我单击运行程序时出现此错误:

'Microsoft.VisualStudio.Editor.Implementation.EditorPackage' package did not load correctly
Run Code Online (Sandbox Code Playgroud)

当我继续此错误消息时,另一个错误消息显示:Visual Studio已停止工作.我需要尽快让它工作,任何想法?

incompatibility visual-studio

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

@ManyToOne JPA关系可以为null吗?

我有一个表有另一个表的外键(多对一关系),但我希望它可以为空.

像这样的东西:

public class SubType() {

    @Id
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    private String id;

}

public class TopUp {

    @Column(nullable = true)
    @ManyToOne(optional = false, fetch = FetchType.LAZY)
    private SubType subType;

}
Run Code Online (Sandbox Code Playgroud)

@Column(nullable = true)抛出NullPointerException并说子类型不能为空.有没有办法让ManyToOne接受null?

java hibernate jpa hibernate-mapping many-to-one

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

Sigar UnsatisfiedLinkError

我是Sigar的新手.我想进行一个简单的测试,以了解如何监控我的系统.

我说sigar-1.6.4log4j外部库,但当我去运行它,我面对这样的错误:

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.hyperic.sigar.Sigar.getCpuInfoList()[Lorg/hyperic/sigar/CpuInfo; at org.hyperic.sigar.Sigar.getCpuInfoList(Native Method)

这是我的代码:

import java.util.Map;
import org.hyperic.sigar.CpuInfo;
import org.hyperic.sigar.FileSystem;
import org.hyperic.sigar.Sigar;
import org.hyperic.sigar.SigarException;

public class Test {

    /**
     * @param args
     */
    public static void main(String[] args) {
        Sigar sigar = new Sigar();
        CpuInfo[] cpuinfo = null;
        try {
        cpuinfo = sigar.getCpuInfoList();
        } catch (SigarException se) {
        se.printStackTrace();
        }

        System.out.println("---------------------");
        System.out.println("Sigar found " + cpuinfo.length + " CPU(s)!");
        System.out.println("---------------------");
    }

}
Run Code Online (Sandbox Code Playgroud)

任何帮助,将不胜感激.

java debugging sigar

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

在当前项目中找不到前缀“安装”的插件

我想将 jdbc oracle 添加到 maven 存储库,因为它不在存储库中,我必须运行以下命令:

mvn install:install-file
-Dfile=D:\Temp\ojdbc6.jar 
-DgroupId=com.oracle 
-DartifactId=ojdbc6 -
 Dversion=11.2.0 -Dpackaging=jar
Run Code Online (Sandbox Code Playgroud)

并遇到此错误:

[ERROR] No plugin found for prefix 'install' in the current project and in the p
lugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the re
positories [local ({my repository path}), central (https://repo.maven.
apache.org/maven2)] 
Run Code Online (Sandbox Code Playgroud)

任何帮助都会被挪用。

installation jdbc maven

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

MappingException:“在实体上找不到要绑定构造函数参数的属性”?

我用spring data mongodb开发了我的项目,并且曾经有这个文档:

@Document(collection="Instrument")
public class Instrument {
@Id
private Integer id;

private String name;

private String internalCode;

private String fosMarketId;

private String localCode;

//setters...getters... and constructurs....
Run Code Online (Sandbox Code Playgroud)

现在我需要向我的文档添加一些属性,如下所示:

....

private Long from;

private Long to;

private Long OpenHourfrom;

private Long OpenHourTo;

private Boolean isActive;

//setters...getters... and constructurs....
Run Code Online (Sandbox Code Playgroud)

所以我有这个新的构造函数:

    @PersistenceConstructor
public Instrument(Integer id, String name, String internalCode, String fosMarketId, String localCode, Long from,
        Long to, Long openHourfrom, Long openHourTo, Boolean isActive) {
    super();
    this.id = id;
    this.name = name;
    this.internalCode = …
Run Code Online (Sandbox Code Playgroud)

java spring hibernate mongodb spring-data-mongodb

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

"2017-9-21 23:59"发生了什么?

我用了一个压延器,每次加一分钟.但在"2017-9-21 23:59"日期发生了一些奇怪的事情.这个日期回来了一个小时.它的行为就像日期节省时间,但保存时间日期不得发生.

这是我的代码和输出:

GregorianCalendar fromCalendar = new GregorianCalendar(2017, 8, 21, 22, 58);

    for (int i = 0; i < 120; i++) {
        System.out.println(fromCalendar.get(Calendar.YEAR) + "-"
                + (fromCalendar.get(Calendar.MONTH) + 1) + "-" +   fromCalendar.get(Calendar.DAY_OF_MONTH) + " "
                + fromCalendar.get(Calendar.HOUR_OF_DAY) + ":" + fromCalendar.get(Calendar.MINUTE) + "      ");
        fromCalendar.add(Calendar.MINUTE, 1);
    }
Run Code Online (Sandbox Code Playgroud)

输出:

.
.
.
2017-9-21 23:58     
2017-9-21 23:59     
2017-9-21 23:0      
2017-9-21 23:1      
2017-9-21 23:2  
.
.
.
Run Code Online (Sandbox Code Playgroud)

有什么简单的观点我误解了吗?

java calendar date

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

where子句不起作用

我正在使用visual studio2010,与asp.net合作.我希望查询像示例一样工作,但我的工作不起作用!

我在数据库中有这些行:

Fullname=joe.address=earth,work=5656,home=23,mobile=55
Fullname=Michel.address=earth,work=5,home=2343,mobile=5435
Run Code Online (Sandbox Code Playgroud)

用户只需输入:

Fullname=joe ,address=earth
Run Code Online (Sandbox Code Playgroud)

该程序应该返回第一行.0是textBoxes的默认值.

SELECT fullName, address, work, home, mobile, registrationNo
  FROM contacts
 WHERE (fullName = @fullName OR fullName = '0')
   AND (address = @address OR address = '0')
   AND (work = @work OR work = '0')
   AND (home = @home OR home = '0')
   AND (mobile = @mobile OR mobile = '0')
Run Code Online (Sandbox Code Playgroud)

sql visual-studio-2010 where-clause

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