小编mol*_*man的帖子

当使用gilead注释通过gwt进行hibernate时,我收到了与oneToMany关联的错误

我正在使用Gilead将我的实体保留在我的GWT项目中,我也使用了hibernate注释.我的问题出在我的onetomany association.t这是我的User类,它包含对FileLocations列表的引用

@Entity
@Table(name = "yf_user_table")
public class YFUser implements Serializable {

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "user_id",nullable = false)
private int userId;
@Column(name = "username")
private String username;
@Column(name = "password")
private String password;
@Column(name = "email")
private String email;
Run Code Online (Sandbox Code Playgroud)

@OneToMany(cascade = CascadeType.ALL,fetch = FetchType.LAZY)@JoinColumn(name ="USER_ID")private List fileLocations = new ArrayList();

这是我的文件位置类

@Entity
@Table(name = "fileLocationTable")
public class FileLocation implements Serializable {

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "locationId", updatable = false, nullable = false)
private int ieId; …
Run Code Online (Sandbox Code Playgroud)

java gwt annotations hibernate gilead

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

如何只允许3个中的1个android切换按钮一次打开

我正在使用3个切换按钮.在我的Android应用程序中,我希望一次只能选择其中一个切换按钮.我该怎么做呢?

java android togglebutton

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

关于GWT内MVP的问题.(总体概述)

关于在GWT应用程序中的使用,你们中的任何人都可以对MVP模式做出很好的解释.我看过的任何一个例子,我发现很难理解实现模式的概念.

这样的问题是什么?它实现了什么,如何实现以及如何扩展以便将来进行修改?

java mvp gwt web-applications

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

如何更改magento admin url和port,magento运行清漆

我在服务器上安装了使用magento的清漆.

端口已更改,以便清漆现在在端口80上运行,magento在8080上运行,

有些功能在后端不起作用,因为网址是www.mystore.com/admin

但实际上商店的网址是www.mystore.com:8080/admin

任何人都可以帮我改变后端端口.

不起作用的功能是打印装箱单,我在其前端的javascript中更改端口.但是有很多功能所以我需要的不仅仅是快速修复

谢谢

php zend-framework magento mage e-commerce

6
推荐指数
2
解决办法
5464
查看次数

与hibernate注释的接口

我想知道我将如何能够注释一个界面

@Entity
@Table(name = "FOLDER_TABLE")
public class Folder implements Serializable, Hierarchy {

   @Id
   @GeneratedValue(strategy = GenerationType.AUTO)
   @Column(name = "folder_id", updatable = false, nullable = false)
   private int fId;

   @Column(name = "folder_name")
   private String folderName;

   @OneToMany(cascade = CascadeType.ALL)
   @JoinTable(name = "FOLDER_JOIN_FILE_INFORMATION_TABLE", joinColumns = 
{ @JoinColumn(name = "folder_id") }, inverseJoinColumns = 
{ @JoinColumn(name = "file_information_id") })
    private List< Hierarchy > fileInformation = new ArrayList< Hierarchy >();
}
Run Code Online (Sandbox Code Playgroud)

上面和下面是两个实现名为Hierarchy的接口的类,文件夹类有一个Hierarchyies列表作为文件夹或文件信息类

@Entity
@Table(name = "FILE_INFORMATION_TABLE")
public class FileInformation implements Serializable, Hierarchy {

  @Id
  @GeneratedValue(strategy = …
Run Code Online (Sandbox Code Playgroud)

java annotations hibernate jpa gilead

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

我在哪里添加系统调用到linux内核源代码

我正在尝试向新版本的Linux Ubuntu内核添加一个新的helloworld系统调用.我一直在浏览网页,但是我找不到一个一致的例子来向我展示我将要修改的文件,以便将helloworld系统调用添加到内核中.

我已经尝试了很多并且发生了编译错误.我知道如何编译内核,但我只是不知道我在哪里添加我的程序系统调用,以及我将此调用添加到系统调用表以及我必须做的任何其他事情.

我正在研究最新的Linux Ubuntu内核.

我编译内核时引入了一个新的系统调用,一个名为mycall的简单调用,现在我在应用程序的头文件中得到编译错误,将测试调用,下面是我的头文件

#include<linux/unistd.h>

#define __NR_mycall 317

_syscall1(long, mycall, int, i)
Run Code Online (Sandbox Code Playgroud)

这是我得到的语法错误

stef@ubuntu:~$ gcc -o testmycall testmycall.c
In file included from testmycall.c:3:
testmycall.h:7: error: expected declaration specifiers or ‘...’ before ‘mycall’
testmycall.h:7: error: expected declaration specifiers or ‘...’ before ‘i’
testmycall.c: In function ‘_syscall1’:
testmycall.c:7: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
testmycall.h:7: error: parameter name omitted
testmycall.h:7: error: parameter name omitted
testmycall.c:11: error: expected ‘{’ at end of in
Run Code Online (Sandbox Code Playgroud)

我从Nikolai N Fetissov的以下链接得到了很多帮助

linux operating-system linux-kernel

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

如何在mapview周围绘制边框

我试图在单击按钮时在mapView周围绘制边距.

所以这就是我所尝试过的,它不起作用.mapview位于相对布局中.

LayoutInflater inflater = getLayoutInflater();

LinearLayout mView = (LinearLayout) inflater.inflate(
                        R.layout.map_view_create_ps, mapView, false);

GeoPoint viewLoc = mapView.getMapCenter();
MapView.LayoutParams params = new MapView.LayoutParams(
                        LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT,
                        viewLoc,

MapView.LayoutParams.BOTTOM_CENTER);
                mView.setLayoutParams(params);
                mapView.addView(mView);
                mView.setVisibility(View.VISIBLE);
Run Code Online (Sandbox Code Playgroud)

单击按钮时会调用上面的内容

我的create_ps_layout就是这样

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="@android:color/transparent">
<LinearLayout android:layout_width="fill_parent"
    android:id="@+id/linearLayout1" android:orientation="vertical"
    android:layout_height="fill_parent"
    android:background="@drawable/rounded_boarder"></LinearLayout>

 </LinearLayout>
Run Code Online (Sandbox Code Playgroud)

可绘制的背景是这样的

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<solid android:color="@color/translucent_black" />
<corners android:bottomRightRadius="30dp"
    android:bottomLeftRadius="30dp" android:topLeftRadius="30dp"
    android:topRightRadius="30dp" />
    <stroke android:width="2dip" android:color="#FFB600"/>
</shape>
Run Code Online (Sandbox Code Playgroud)

这不起作用,但是当你选择按钮时,你们可以指出我在如何在mapview周围绘制边框的正确方向吗?

java android border android-mapview

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

关于在gwt中重定向的问题

我正在使用gwt来创建一个Web应用程序.

当用户按下注销按钮时,我希望能够刷新页面(或基本上重定向到主页),因为我的GWT应用程序仅在一个html页面上运行.

执行此操作的程序代码是什么?

java gwt redirect web-applications

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

如何从android中的游标中检索数据?

我从我的数据库中检索信息,它全部在Cursor中.现在我需要浏览光标中的每个项目以检索lng lats和要在地图上显示的名称.

Cursor c = mDbHelper.fetchSpot(15);
        startManagingCursor(c);

        double lat = Double.parseDouble(c.getString(c.getColumnIndexOrThrow(ParkingSpotDBAdapter.KEY_LAT)));
        double lng = Double.parseDouble(c.getString(c.getColumnIndexOrThrow(ParkingSpotDBAdapter.KEY_LNG)));
        String name = c.getString(c.getColumnIndexOrThrow(ParkingSpotDBAdapter.KEY_ADDRESS));
Run Code Online (Sandbox Code Playgroud)

我有一个名为fecthAllSpots()this的antoher方法返回游标中的许多项目,我如何从该游标中的每一行检索每个lng lat和name?

java database sqlite android cursor

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

如何将localoint经度+纬度转换为double?

我正在检索地图视图的中心,我需要将long和lats作为双精度传递给我的服务器,以便对数据库进行测试.

我如何将mapView.getMapCenter().getLongitudeE6()转换为double?

java android google-maps casting

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