identifier

Hibernate error: ids for this class must be manually assigned before calling save():

拥有回忆 提交于 2019-11-28 21:00:37
Caused by: org.springframework.orm.hibernate3.HibernateSystemException: ids for this class must be manually assigned before calling save(): com.rfid.model.Role; nested exception is org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): com.rfid.model.Role at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:676) at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412) at org.springframework.orm.hibernate3

Ways to create a unique user fingerprint in PHP

别等时光非礼了梦想. 提交于 2019-11-28 19:18:06
What is the best way to generate a 'fingerprint' of user unique-ness in PHP? For example: I could use a user's IP address as the 'fingerprint', however, there could be multiple other users on the same IP I could use the user's IP + user agent as the 'fingerprint', however, a single user could simply swap from safari to firefox and again be seen as being unique Ideally, the fingerprint so label the 'machine' rather than browser or 'ip' but I can't think of how this is achievable. Open to ideas/suggestions of how you uniquely identify your users, and what advantages/disadvantages your method has

Why class { int i; }; is not fully standard-conformant?

 ̄綄美尐妖づ 提交于 2019-11-28 19:06:37
This is a follow-up question. In the previous question , @JohannesSchaub-litb said that the following code is not fully standard-conformant: class { int i; }; //unnamed-class definition. § 9/1 allows this! and then he added, while it is grammatically valid, it breaks the rule that such a class must declare at least one name into its enclosing scope. I couldn't really understand this. What name is he talking about? Could anyone elaborate on this further (preferably quoting the Standard)? Clause 9 of the standard allows class {public: int i;} (note the lack of a final semicolon) because this

MySQL: is there something like an internal record identifier for every record in a MySQL table?

梦想与她 提交于 2019-11-28 12:34:09
I'm building a spreadsheet app using MySQL as storage, I need to identify records that are being updated client-side in order to save the changes. Is there a way, such as some kind of "internal record identifier" (internal as in used by the database engine itself), to uniquely identify records, so that I'll be able to update the correct one? Certainly, a SELECT query can be used to identify the record, including all the fields in the table, but obviously that has the downside of returning multiple records in most situations. IMPORTANT: the spreadsheet app aims to work on ANY table, even ones

Is it a good idea to use unicode symbols as Java identifiers?

自古美人都是妖i 提交于 2019-11-28 10:41:46
I have a snippet of code that looks like this: double Δt = lastPollTime - pollTime; double α = 1 - Math.exp(-Δt / τ); average += α * (x - average); Just how bad an idea is it to use unicode characters in Java identifiers? Or is this perfectly acceptable? It's a bad idea, for various reasons. Many people's keyboards do not support these characters. If I were to maintain that code on a qwerty keyboard (or any other without Greek letters), I'd have to copy and paste those characters all the time. Some people's editors or terminals might not display these characters properly. For example, some

AdMob: Missing required XML attribute adUnitID

耗尽温柔 提交于 2019-11-28 10:08:27
I'm new to the ad stuff, and I can't get it working. I've done what's stated at http://code.google.com/intl/nl-NL/mobile/ads/docs/android/banner_xml.html . This is my main.xml: <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="com.niek.runningapp" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:background="#FFFFFF" android:stretchColumns="1"> <!-- more stuff--> <TableRow android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <com.google.ads.AdView

Maximum characters in labels (table names, columns etc)

倖福魔咒の 提交于 2019-11-28 07:12:48
Hope this question wasn't asked before. Does anyone know the character limit for domain names? For example if I write this: CREATE DOMAIN d_complement_activite_etablissement AS character varying it will create a domain with the name: d_complement_activite_etabliss (Yeah, I know how to count, but I want some more info on the subject). Is there a command that can change this maximum length? Is this length the same for other names (columns, tables etc)? You ask: Is there a command that can change this maximum length? Is this length the same for other names (columns, tables etc)? The manual

PostgreSQL Error: Relation already exists

徘徊边缘 提交于 2019-11-28 07:10:42
I am trying to create a table that was dropped previously. But when I do the CREATE TABLE A .. . I am getting below error: Relation 'A' already exists. I verified doing SELECT * FROM A , but then I got another error: Relation 'A' does not exists. I already tried to find it in \dS+ listing all relations, and it is not there. To complicate this, I have tested this by creating this table in another database and I got the same error. I am thinking that could be an error when this table was dropped. Any ideas? Here is the code: I'm using a generated code from Power SQL. I have the same error

How to implement a custom String sequence identifier generator with Hibernate

我是研究僧i 提交于 2019-11-28 06:39:19
I'm using hibernate with spring, h2 and liquibase and I'm trying to make a custom String id generator for my entities by taking example with this blog post but I'm getting an error : Caused by: org.hibernate.id.IdentifierGenerationException: Unknown integral data type for ids : java.lang.String Here my SequenceStyleGenerator code : public class CTCIDGenerator extends SequenceStyleGenerator { @Override public Serializable generate(SessionImplementor session, Object obj) { if (obj instanceof Identifiable) { Identifiable identifiable = (Identifiable) obj; Serializable id = identifiable.getId();

What characters are valid in an SQL Server database name?

荒凉一梦 提交于 2019-11-28 06:10:19
We're going to provide our clients with a tool that (among other things) creates a new SQL Server database, and I want to be able to do basic validation on the database name they provide. SQL Server's documentation explains what characters are valid in a database name. However, the documentation is apparently incorrect, because I can successfully create databases whose names violate the documented rules. According to SQL Server's documentation for CREATE DATABASE , database names must comply with the rules for identifiers; and the rules for identifiers depend on the database compatibility