Search Results

Search found 7 results on 1 pages for 'jwaddell'.

Page 1/1 | 1 

  • Save a shortcut to a samba share in KDE

    - by jwaddell
    Using Dolphin in KDE I have opened a particular (password protected) samba share, by typing in the IP address and navigating to the right folder. However I can't find any way to save this location for future use (other than saving the URL to a text file and copy-pasting it into Dolphin). I would be happy with some kind of bookmark in Dolphin or a desktop shortcut, etc.

    Read the article

  • Wireless dropouts that only affect subset of devices

    - by jwaddell
    When watching videos streamed over WiFi from a NAS box (D-Link DNS-323) I am getting wireless dropouts. However they only appear to occur when I have left my laptop (Dell Inspiron 9300 running Windows XP SP3) running; the laptop is usually suspended if I'm not using it. The dropouts have occurred when streaming to a Netgear EVA8000 streaming device, and also to a PS3. I'm using a Netgear DG834G as the wireless modem/router. When a dropout occurs I go to the laptop and see that its wireless connection has also dropped out. The odd thing is that my wife's MacBook and my iPhone still maintain their connections. What could be causing this behaviour, and how do I go about fixing it?

    Read the article

  • Deletes not cascading for self-referencing entities

    - by jwaddell
    I have the following (simplified) Hibernate entities: @Entity @Table(name = "package") public class Package { protected Content content; @OneToOne(cascade = {javax.persistence.CascadeType.ALL}) @JoinColumn(name = "content_id") @Fetch(value = FetchMode.JOIN) public Content getContent() { return content; } public void setContent(Content content) { this.content = content; } } @Entity @Table(name = "content") public class Content { private Set<Content> subContents = new HashSet<Content>(); private ArchivalInformationPackage parentPackage; @OneToMany(fetch = FetchType.EAGER) @JoinTable(name = "subcontents", joinColumns = {@JoinColumn(name = "content_id")}, inverseJoinColumns = {@JoinColumn(name = "elt")}) @Cascade(value = {org.hibernate.annotations.CascadeType.DELETE, org.hibernate.annotations.CascadeType.REPLICATE}) @Fetch(value = FetchMode.SUBSELECT) public Set<Content> getSubContents() { return subContents; } public void setSubContents(Set<Content> subContents) { this.subContents = subContents; } @ManyToOne(cascade = {CascadeType.ALL}) @JoinColumn(name = "parent_package_id") public Package getParentPackage() { return parentPackage; } public void setParentPackage(Package parentPackage) { this.parentPackage = parentPackage; } } So there is one Package, which has one "top" Content. The top Content links back to the Package, with cascade set to ALL. The top Content may have many "sub" Contents, and each sub-Content may have many sub-Contents of its own. Each sub-Content has a parent Package, which may or may not be the same Package as the top Content (ie a many-to-one relationship for Content to Package). The relationships are required to be ManyToOne (Package to Content) and ManyToMany (Content to sub-Contents) but for the case I am currently testing each sub-Content only relates to one Package or Content. The problem is that when I delete a Package and flush the session, I get a Hibernate error stating that I'm violating a foreign key constraint on table subcontents, with a particular content_id still referenced from table subcontents. I've tried specifically (recursively) deleting the Contents before deleting the Package but I get the same error. Is there a reason why this entity tree is not being deleted properly? EDIT: After reading answers/comments I realised that a Content cannot have multiple Packages, and a sub-Content cannot have multiple parent-Contents, so I have modified the annotations from ManyToOne and ManyToMany to OneToOne and OneToMany. Unfortunately that did not fix the problem. I have also added the bi-directional link from Content back to the parent Package which I left out of the simplified code.

    Read the article

  • Hibernate: deletes not cascading for self-referencing entities

    - by jwaddell
    I have the following (simplified) Hibernate entities: @Entity @Table(name = "package") public abstract class Package { protected Content content; @ManyToOne(cascade = {javax.persistence.CascadeType.ALL}) @JoinColumn(name = "content_id") @Fetch(value = FetchMode.JOIN) public Content getContent() { return content; } public void setContent(Content content) { this.content = content; } } @Entity @Table(name = "content") public class Content { private Set<Content> subContents = new HashSet<Content>(); @ManyToMany(fetch = FetchType.EAGER) @JoinTable(name = "subcontents", joinColumns = {@JoinColumn(name = "content_id")}, inverseJoinColumns = {@JoinColumn(name = "elt")}) @Cascade(value = {org.hibernate.annotations.CascadeType.DELETE, org.hibernate.annotations.CascadeType.REPLICATE}) @Fetch(value = FetchMode.SUBSELECT) public Set<Content> getSubContents() { return subContents; } public void setSubContents(Set<Content> subContents) { this.subContents = subContents; } } So a Package has a Content, and a Content is self-referencing in that it has many sub-Contents (which may contain sub-Contents of their own etc). The relationships are required to be ManyToOne (Package to Content) and ManyToMany (Content to sub-Contents) but for the case I am currently testing each sub-Content only relates to one Package or Content. The problem is that when I delete a Package and flush the session, I get a Hibernate error stating that I'm violating a foreign key constraint on table subcontents, with a particular content_id still referenced from table subcontents. I've tried specifically (recursively) deleting the Contents before deleting the Package but I get the same error. Is there a reason why this entity tree is not being deleted properly?

    Read the article

  • How do you obtain a formatted date and time for the current locale in C?

    - by jwaddell
    What C function should I call to obtain a formatted date and time for the locale where the program is being executed? I'm asking this question because I have run into a problem using the ClamAV daemon API. The VERSION command returns the date and time of the latest virus definitions, but the code uses a call to ctime to format it. As far as I can tell ctime does not format the datetime according to the current locale and uses the English abbreviations for days of the week and the month in the returned string. This causes problems as my Java program which uses the ClamAV API does respect the current locale and thus expects the day of the week and month name to have the local abbreviations. The datetime format would need to be in the same format as that produced by ctime: Www Mmm dd hh:mm:ss yyyy Where Www is the weekday, Mmm the month in letters, dd the day of the month, hh:mm:ss the time, and yyyy the year. I could rewrite the Java program to always assume English dates but I'd be happier to submit a patch to ClamAV as it seems like a bug on their side to me.

    Read the article

  • Hibernate: how to maintain insertion order

    - by jwaddell
    I have a list of entities where creation order is important, but they do not contain a timestamp to use for sorting. Entities are added to the end of the list as they are created so they will be ordered correctly in the list itself. After persisting the list using Hibernate the entities appear in the database table in the order that they were created. However when retrieving the list using a new Hibernate session the list is now in reverse order of insertion/creation. Is this expected behaviour? Is there any way to retrieve the list in the same order as it appears in the table? The primary key is a UUID, and the list of entities should always have been created on the same IP address and JVM. This mean sorting by UUID is a possibility but I'd rather not make assumptions. Another possibility is if the list is guaranteed to always come out in reverse order I could always just work through it backwards.

    Read the article

1