Search Results

Search found 4923 results on 197 pages for 'a british person'.

Page 5/197 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Is being a programmer a younger person's job?

    - by Saobi
    After you get old, say past 30 or 40. Can you still keep up with the young coders from your company, those fresh out of school, who can code for 15+ hours on 10 cans of redbulls (most people in Google, Facebook, etc) ? And given the lightning speed with which today's programming frameworks and architectures evolve, can you keep up with the most up to date stuff and be as proficient at them as the next college grad? I know for jobs like unix/c/embedded programming, it might be that the older the better. But for programming jobs in say web development, social media, search engine technology, etc. Do you become less and less competitive career-wise versus youngsters? For example, most coders in Google and Facebook, I believe are under 25 years old. In other words, once you reach a certain age, would it be unwise to continue to be a coder, and is it better to try becoming a project manager or architect?

    Read the article

  • Cluster analysis on two columns that contain name of person in R

    - by Alka Shah
    I am a beginner in R. I have to do cluster analysis in data that contains two columns with name of persons. I converted it in data frame but it is character type. To use dist() function the data frame must be numeric. example of my data: Interviewed.Type interviewed.Relation.Type 1. An1 Xuan 2. An2 The 3. An3 Ngoc 4. Bui Thi 5. ANT feed 7. Bach Thi 8. Gian1 Thi 9. Lan5 Thi . . . 1100. Xung Van I will be grateful for your help.

    Read the article

  • SharePoint 2007 Approval Workflow - Any other person can approve requirement

    - by dsibley
    How can I use SharePoint's Content Approval to enforce the rule that any two people in a group can make a change? We have a policy library that any two individuals can update (a modifier and an approver). If I do a group parallel approval, the modifier can approve their own work (I believe). Unfortunately, I don't have access to Visual Studio or even SharePoint Designer (as these have been disabled by corporate).

    Read the article

  • Show facebook status stream of a dedicated person on a website

    - by Pascal
    Hi all, I've been stomping at this all day :( I want to display a status feed of both twitter and facebook on my website. For twitter, this is not a problem, as my account is public, I can easily get the feed. Facebook however, is a whole different story! I can't seem to find an easy way to just get my last status updates and display it on my website. The code I currently have, needs authentication of the visitor, and I don't want that! This is my current code: $facebook = new Facebook($api_key, $secret); $stream = $facebook->api_client->fql_query("SELECT message,source,time FROM status WHERE uid = $user_id LIMIT 6"); I've seen several possible solutions, including the RSS feed, but as Facebook keeps changing the way their site works, none of the previous methods I've seen (including those from as late as januari) currently work! Is there anybody who can provide me with a currently working solution to this (simple?) problem?

    Read the article

  • jQuery question from a person who can't javascript

    - by Evilalan
    So I'm trying to adapt this Dropdown menu on Joomla the styles work great as expected so I'll post the javascript includes on the head of my website: <script type='text/javascript' src='js/jquery.js'></script> <script type='text/javascript' src='js/dropdown.js'></script> <script type='text/javascript'> $(function() { $('.menu').droppy(); }); </script> <script type='text/javascript'> $(function() { $('.menu').droppy({speed: 100}); }); </script> ok I don't know why its is not working I'll post the dropdown.js should I post the jQuery too? it's really big! $.fn.droppy = function(options) { options = $.extend({speed: 250}, options || {}); this.each(function() { var root = this, zIndex = 1000; function getSubnav(ele) { if (ele.nodeName.toLowerCase() == 'li') { var subnav = $('> ul', ele); return subnav.length ? subnav[0] : null; } else { return ele; } } function getActuator(ele) { if (ele.nodeName.toLowerCase() == 'ul') { return $(ele).parents('li')[0]; } else { return ele; } } function hide() { var subnav = getSubnav(this); if (!subnav) return; $.data(subnav, 'cancelHide', false); setTimeout(function() { if (!$.data(subnav, 'cancelHide')) { $(subnav).slideUp(options.speed); } }, 500); } function show() { var subnav = getSubnav(this); if (!subnav) return; $.data(subnav, 'cancelHide', true); $(subnav).css({zIndex: zIndex++}).slideDown(options.speed); if (this.nodeName.toLowerCase() == 'ul') { var li = getActuator(this); $(li).addClass('hover'); $('> a', li).addClass('hover'); } } $('ul, li', this).hover(show, hide); $('li', this).hover( function() { $(this).addClass('hover'); $('> a', this).addClass('hover'); }, function() { $(this).removeClass('hover'); $('> a', this).removeClass('hover'); } ); }); }; My question here is: Why is it not working! I know that this is really complex (I don't anything about JavaScript) but if you help me I'll post a tutorial and edited files that will help a lot of people! By the way I've download jQuery from the original site so I don't think that this can be the problem! Thanks in advance!

    Read the article

  • How to calculate the size of a project in the days-person unit of measurement?

    - by Will Marcouiller
    Once in a while I have read here and there the size of a project expressed in a matter of days-person or person-day. I may understand what this means, but I don't know on what do people base themselves to calculate it. What are the variables considered into this calculation? How these variables are used in the calculation formula? Otherwise, how to estimate it grossly, when something is missing from the formula's variables? Thanks! =)

    Read the article

  • xslt cookbook example not working

    - by Liza dawson
    Hi I am working on this from xslt cookbook type my.xml <?xml version="1.0" encoding="UTF-8"?> <people> <person name="Al Zehtooney" age="33" sex="m" smoker="no"/> <person name="Brad York" age="38" sex="m" smoker="yes"/> <person name="Charles Xavier" age="32" sex="m" smoker="no"/> <person name="David Williams" age="33" sex="m" smoker="no"/> <person name="Edward Ulster" age="33" sex="m" smoker="yes"/> <person name="Frank Townsend" age="35" sex="m" smoker="no"/> <person name="Greg Sutter" age="40" sex="m" smoker="no"/> <person name="Harry Rogers" age="37" sex="m" smoker="no"/> <person name="John Quincy" age="43" sex="m" smoker="yes"/> <person name="Kent Peterson" age="31" sex="m" smoker="no"/> <person name="Larry Newell" age="23" sex="m" smoker="no"/> <person name="Max Milton" age="22" sex="m" smoker="no"/> <person name="Norman Lamagna" age="30" sex="m" smoker="no"/> <person name="Ollie Kensington" age="44" sex="m" smoker="no"/> <person name="John Frank" age="24" sex="m" smoker="no"/> <person name="Mary Williams" age="33" sex="f" smoker="no"/> <person name="Jane Frank" age="38" sex="f" smoker="yes"/> <person name="Jo Peterson" age="32" sex="f" smoker="no"/> <person name="Angie Frost" age="33" sex="f" smoker="no"/> <person name="Betty Bates" age="33" sex="f" smoker="no"/> <person name="Connie Date" age="35" sex="f" smoker="no"/> <person name="Donna Finster" age="20" sex="f" smoker="no"/> <person name="Esther Gates" age="37" sex="f" smoker="no"/> <person name="Fanny Hill" age="33" sex="f" smoker="yes"/> <person name="Geta Iota" age="27" sex="f" smoker="no"/> <person name="Hillary Johnson" age="22" sex="f" smoker="no"/> <person name="Ingrid Kent" age="21" sex="f" smoker="no"/> <person name="Jill Larson" age="20" sex="f" smoker="no"/> <person name="Kim Mulrooney" age="41" sex="f" smoker="no"/> <person name="Lisa Nevins" age="21" sex="f" smoker="no"/> </people> type generic-attr-to-csv.xslt <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:csv="http://www.ora.com/XSLTCookbook/namespaces/csv"> <xsl:param name="delimiter" select=" ',' "/> <xsl:output method="text" /> <xsl:strip-space elements="*"/> <xsl:template match="/"> <xsl:for-each select="$columns"> <xsl:value-of select="@name"/> <xsl:if test="position( ) != last( )"> <xsl:value-of select="$delimiter/> </xsl:if> </xsl:for-each> <xsl:text>&#xa;</xsl:text> <xsl:apply-templates/> </xsl:template> <xsl:template match="/*/*"> <xsl:variable name="row" select="."/> <xsl:for-each select="$columns"> <xsl:apply-templates select="$row/@*[local-name(.)=current( )/@attr]" mode="csv:map-value"/> <xsl:if test="position( ) != last( )"> <xsl:value-of select="$delimiter"/> </xsl:if> </xsl:for-each> <xsl:text>&#xa;</xsl:text> </xsl:template> <xsl:template match="@*" mode="map-value"> <xsl:value-of select="."/> </xsl:template> </xsl:stylesheet> type my.xsl <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:csv="http://www.ora.com/XSLTCookbook/namespaces/csv"> <xsl:import href="generic-attr-to-csv.xslt"/> <!--Defines the mapping from attributes to columns --> <xsl:variable name="columns" select="document('')/*/csv:column"/> <csv:column name="Name" attr="name"/> <csv:column name="Age" attr="age"/> <csv:column name="Gender" attr="sex"/> <csv:column name="Smoker" attr="smoker"/> <!-- Handle custom attribute mappings --> <xsl:template match="@sex" mode="csv:map-value"> <xsl:choose> <xsl:when test=".='m'">male</xsl:when> <xsl:when test=".='f'">female</xsl:when> <xsl:otherwise>error</xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet> using the apache xalan parser D:\Test>java org.apache.xalan.xslt.Process -in my.xml -xsl my.xsl -out my.csv [Fatal Error] generic-attr-to-csv.xslt:15:6: The value of attribute "select" associated with an element type "xsl:v alue-of" must not contain the '<' character. file:///D:/Test/generic-attr-to-csv.xslt; Line #15; Column #6; org.xml.sax.SAXParseException: The value of attribut e "select" associated with an element type "xsl:value-of" must not contain the '<' character. java.lang.NullPointerException at org.apache.xalan.transformer.TransformerImpl.createSerializationHandler(TransformerImpl.java:1171) at org.apache.xalan.transformer.TransformerImpl.createSerializationHandler(TransformerImpl.java:1060) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1268) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1251) at org.apache.xalan.xslt.Process.main(Process.java:1048) Exception in thread "main" java.lang.RuntimeException at org.apache.xalan.xslt.Process.doExit(Process.java:1155) at org.apache.xalan.xslt.Process.main(Process.java:1128) Any ideas what am i doing wrong

    Read the article

  • Creating classed in JavaScript

    - by Renso
    Goal:Creating class instances in JavaScript is not available since you define "classes" in js with object literals. In order to create classical classes like you would in c#, ruby, java, etc, with inheritance and instances.Rather than typical class definitions using object literals, js has a constructor function and the NEW operator that will allow you to new-up a class and optionally provide initial properties to initialize the new object with.The new operator changes the function's context and behavior of the return statement.var Person = function(name) {   this.name = name;};   //Init the personvar dude= new Person("renso");//Validate the instanceassert(dude instanceof Person);When a constructor function is called with the new keyword, the context changes from global window to a new and empty context specific to the instance; "this" will refer in this case to the "dude" context.Here is class pattern that you will need to define your own CLASS emulation library:var Class = function() {   var _class = function() {      this.init.apply(this, arguments);   };   _class.prototype.init = function(){};   return _class;}var Person a new Class();Person.prototype.init = function() {};var person = new Person;In order for the class emulator to support adding functions and properties to static classes as well as object instances of People, change the emulator:var Class = function() {   var _class = function() {      this.init.apply(this, arguments);   };   _class.prototype.init = function(){};   _class.fn = _class.prototype;   _class.fn.parent = _class;   //adding class properties   _class.extend = function(obj) {      var extended = obj.extended;      for(var i in obj) {         _class[i] = obj[i];      };      if(extended) extended(_class);   };   //adding new instances   _class.include = function(obj) {      var included = obj.included;      for(var i in obj) {         _class.fn[i] = obj[i];      };      if(included) included(_class);   };   return _class;}Now you can use it to create and extend your own object instances://adding static functions to the class Personvar Person = new Class();Person.extend({   find: function(name) {/*....*/},      delete: function(id) {/*....*/},});//calling static function findvar person = Person.find('renso');   //adding properties and functions to the class' prototype so that they are available on instances of the class Personvar Person = new Class;Person.extend({   save: function(name) {/*....*/},   delete: function(id) {/*....*/}});var dude = new Person;//calling instance functiondude.save('renso');

    Read the article

  • How not to suffer from ideologists when you're a pragmatic person?

    - by Lukas Eder
    My story: I'm a pragmatic person. Sometimes, the most simple solution to a problem to get the job done is the one that fits best for me, if its not an utter blasphemy and reproach to any design principles. Check out my answer to this question on stackoverflow. Simple. Works. Was accepted. Could be improved. Is clearly not perfect. And along comes this guy. He downvotes me, comments on the question how his answer is better, more accurate etc and calls me "plain wrong". Reminds me of this comic strip. :-) While on stackoverflow I can laugh at these things because those people are far away, in the real world I'm suffering from ideologies every now and then. Heck, I'm not creating a miracle piece of software, I need to keep that huge legacy thing running, and it's an adventure to me every day. I don't have the time or passion to beautify my code (or other people's code) to that extent. My question(s): How do you deal with ideologies / ideologists, when you're a pragmatic person? How do you deal with pragmatism / pragmatists, when you're an ideologic person? I'm interested in both point of views. Tell me your experience. But please, be fair, somewhat objective, and understand that you may NOT be entirely correct and your opinion is NOT the only true one... :-)

    Read the article

  • How do I create a third Person View using DXUTCamera in DX10?

    - by David
    I am creating a 3d flying game and using DXUTCamera for my view. I can get the camera to take on the characters position, But I would like to view my character in the 3rd person. Here is my code for first person view: //Put the camera on the object. D3DXVECTOR3 viewerPos; D3DXVECTOR3 lookAtThis; D3DXVECTOR3 up ( 5.0f, 1.0f, 0.0f ); D3DXVECTOR3 newUp; D3DXMATRIX matView; //Set the viewer's position to the position of the thing. viewerPos.x = character->x; viewerPos.y = character->y; viewerPos.z = character->z; // Create a new vector for the direction for the viewer to look character->setUpWorldMatrix(); D3DXVECTOR3 newDir, lookAtPoint; D3DXVec3TransformCoord(&newDir, &character->initVecDir, &character->matAllRotations); // set lookatpoint D3DXVec3Normalize(&lookAtPoint, &newDir); lookAtPoint.x += viewerPos.x; lookAtPoint.y += viewerPos.y; lookAtPoint.z += viewerPos.z; g_Camera.SetViewParams(&viewerPos, &lookAtPoint); So does anyone have an ideas how I can move the camera to the third person view? preferably timed so there is a smooth action in the camera movement. (I'm hoping I can just edit this code instead of bringing in another camera class)

    Read the article

  • Using XSD to validate node count

    - by heath
    I don't think this is possible but I thought I'd throw it out there. Given this XML: <people count="3"> <person>Bill</person> <person>Joe</person> <person>Susan</person> </people> Is it possible in an XSD to force the @count attribute value to be the correct count of defined elements (in this case, the person element)? The above example would obviously be correct and the below example would not validate: <people count="5"> <person>Bill</person> <person>Joe</person> <person>Susan</person> </people>

    Read the article

  • Objective-C: fetchManagedObjectsForEntity problem

    - by Meko
    Hi.I am trying to get value from CoreData entity name Person with predicate and then comparing with new data in dictionary.But it it returns every time 0 .And it creates about 5 person with same name. NSPredicate *predicate = [NSPredicate predicateWithFormat:@"userName == %@",[flickr usernameForUserID:@"owner"]]; peopleList = (NSMutableArray *)[flickr fetchManagedObjectsForEntity:@"Person" withPredicate:predicate]; NSEnumerator *enumerator = [peopleList objectEnumerator]; Person *person; BOOL exists = FALSE; while (person = [enumerator nextObject]) { NSLog(@" Person is: %@ ", person.userName); NSLog(@"Person ID IS %@",person.userID); NSLog(@"Dict ID is %@",[dict objectForKey:@"owner"]); if([person.userID isEqualToString:[dict objectForKey:@"owner"]]) { exists = TRUE; NSLog(@"-- Person Exists : %@--", person.userName); [newPhoto setPerson:person]; } } Here peopleList returns 0 and the enumerator also 0 and it does not use if and not comparing.In my entity I have Person and Photo entities.In Person I have userName and userID attributes and also one-to many relationship with Photo entity. I think problem in predicate but i cant figure out it .

    Read the article

  • Join two list comparing their elements properties

    - by 100r
    public class Person() { int ID; string Name; DateTime ChangeDate } var list1 = new List<Person> { new Person { ID= 1, Name = "Peter", ChangeDate= "2011-10-21" }, new Person { ID= 2, Name = "John", ChangeDate= "2011-10-22" }, new Person { ID= 3, Name = "Mike", ChangeDate= "2011-10-23" }, new Person { ID= 4, Name = "Dave", ChangeDate= "2011-10-24" } }; var list2 = new List<Person> { new Person { ID= 1, Name = "Pete", ChangeDate= "2011-10-21" }, new Person { ID= 2, Name = "Johny", ChangeDate= "2011-10-20" }, new Person { ID= 3, Name = "Mikey", ChangeDate= "2011-10-24" }, new Person { ID= 5, Name = "Larry", ChangeDate= "2011-10-27" } }; As output I would like to have list1 + list2 = Person { ID= 1, Name = "Peter", ChangeDate= "2011-10-21" }, Person { ID= 2, Name = "John", ChangeDate= "2011-10-22" }, Person { ID= 3, Name = "Mikey", ChangeDate= "2011-10-24" }, Person { ID= 4, Name = "Dave", ChangeDate= "2011-10-24" } Person { ID= 5, Name = "Larry", ChangeDate= "2011-10-27" } And the Algorithm is like this. Join two list. If elements of lists have same ID, compare them by ChangeDate and take the ond with bigger date. If ChangeDate are equeal take any of them but not both. Maybe its easier to concat both lists and than to filter them with lambda. I tried, but always came out with some ugly code :/ Anyone have any idea?

    Read the article

  • glibc detected ./.a.out: free(): invalid pointer

    - by ExtremeBlue
    typedef struct _PERSON { size_t age; unsigned char* name; }PERSON; int init(PERSON** person) { (* person) = (PERSON *) malloc(sizeof(struct _PERSON)); (* person)->age = 1; (* person)->name = (unsigned char *) malloc(sizeof(4)); (* person)->name = "NAME"; return 0; } void close(PERSON** person) { (* person)->age = 0; if((* person)->name != NULL) { free((* person)->name); } if((* person) != NULL) { free((* person)); } } int main(int argc, char* argv[]) { PERSON* p; init(&p); printf("%d\t%s\n", (int) p->age, p->name); close(&p); return 0; } 1 NAME *** glibc detected *** ./a.out: free(): invalid pointer: 0x000000000040079c *** ======= Backtrace: ========= /lib/libc.so.6(+0x774b6)[0x7fa9027054b6] /lib/libc.so.6(cfree+0x73)[0x7fa90270bc83] ./a.out(close+0x3d)[0x400651] ./a.out[0x40069f] /lib/libc.so.6(__libc_start_main+0xfe)[0x7fa9026acd8e] ./a.out[0x4004f9] ... 7fa8fc000000-7fa8fc021000 rw-p 00000000 00:00 0 7fa8fc021000-7fa900000000 ---p 00000000 00:00 0 7fa902478000-7fa90248d000 r-xp 00000000 08:12 23068732 /lib/libgcc_s.so.1 7fa90248d000-7fa90268c000 ---p 00015000 08:12 23068732 /lib/libgcc_s.so.1 7fa90268c000-7fa90268d000 r--p 00014000 08:12 23068732 /lib/libgcc_s.so.1 7fa90268d000-7fa90268e000 rw-p 00015000 08:12 23068732 /lib/libgcc_s.so.1 7fa90268e000-7fa902808000 r-xp 00000000 08:12 23068970 /lib/libc-2.12.1.so 7fa902808000-7fa902a07000 ---p 0017a000 08:12 23068970 /lib/libc-2.12.1.so 7fa902a07000-7fa902a0b000 r--p 00179000 08:12 23068970 /lib/libc-2.12.1.so 7fa902a0b000-7fa902a0c000 rw-p 0017d000 08:12 23068970 /lib/libc-2.12.1.so 7fa902a0c000-7fa902a11000 rw-p 00000000 00:00 0 7fa902a11000-7fa902a31000 r-xp 00000000 08:12 23068966 /lib/ld-2.12.1.so 7fa902c25000-7fa902c28000 rw-p 00000000 00:00 0 7fa902c2e000-7fa902c31000 rw-p 00000000 00:00 0 7fa902c31000-7fa902c32000 r--p 00020000 08:12 23068966 /lib/ld-2.12.1.so 7fa902c32000-7fa902c33000 rw-p 00021000 08:12 23068966 /lib/ld-2.12.1.so 7fa902c33000-7fa902c34000 rw-p 00000000 00:00 0 7fff442d5000-7fff442f6000 rw-p 00000000 00:00 0 [stack] 7fff44308000-7fff44309000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] Aborted

    Read the article

  • Google lance son outil Person Finder suite au tsunami japonais, pour aider les personnes concernées par le drame

    Google relance son outil Person Finder suite au tsunami japonais, la base de données devrait aider à prendre des nouvelles des personnes touchées par le drame Suite au terrible Tsunami qui a ravagé le Japon ce matin après un tremblement de terre de magnitude 8.9, Google a mis en place un service d'aide aux victimes et à leurs proches. Person Finder, une sorte de grande base de données participative, permettra de lancer un avis de recherche pour quelqu'un doit on souhaite avoir des nouvelles, mais aussi sera à la disposition des personnes touchées par la catastrophe pour publier des messages assurant qu'ils vont bien et donnant des informations sur la situation. Le service est accessible depuis Google.com et se prése...

    Read the article

  • Plongée dans les entrailles de l'outil Person Finder de Google, une API open-source codée en Python

    Plongée dans les entrailles de l'outil Person Finder de Google, une API open-source codée en Python Mise à jour du 14.03.2011 par Katleen Comme indiqué dans la news précédente, Google a lancé son outil Person Finder à destination des personnes concernées par le drame survenu le 11.03.2011 au Japon (victimes et entourage de victimes). Ce service a déjà servi auparavant, lors des sinistres de Haiti ou de Christchurch par exemple. En fait, il est né à l'initiative de la firme comme projet sur Google.org, dans le cadre du secteur Google Crisis Response qui y a été lancé en janvier 2010 (séisme d'Haïti), en réponse ...

    Read the article

  • How to convert an ORM to its subclass using Hibernate ?

    - by Gaaston
    Hi everybody, For example, I have two classes : Person and Employee (Employee is a subclass of Person). Person : has a lastname and a firstname. Employee : has also a salary. On the client-side, I have a single HTML form where i can fill the person informations (like lastname and firstname). I also have a "switch" between "Person" and "Employee", and if the switch is on Employee I can fill the salary field. On the server-side, Servlets receive informations from the client and use the Hibernate framework to create/update data to/from the database. The mapping i'm using is a single table for persons and employee, with a discriminator. I don't know how to convert a Person in an Employee. I firstly tried to : load the Person p from the database create an empty Employee e object copy values from p into e set the salary value save e into the database But i couldn't, as I also copy the ID, and so Hibernate told me they where two instanciated ORM with the same id. And I can't cast a Person into an Employee directly, as Person is Employee's superclass. There seems to be a dirty way : delete the person, and create an employee with the same informations, but I don't really like it.. So I'd appreciate any help on that :) Some precisions : The person class : public class Person { protected int id; protected String firstName; protected String lastName; // usual getters and setters } The employee class : public class Employee extends Person { // string for now protected String salary; // usual getters and setters } And in the servlet : // type is the "switch" if(request.getParameter("type").equals("Employee")) { Employee employee = daoPerson.getEmployee(Integer.valueOf(request.getParameter("ID"))); modifyPerson(employee, request); employee.setSalary(request.getParameter("salary")); daoPerson.save(employee ); } else { Person person = daoPerson.getPerson(Integer.valueOf(request.getParameter("ID"))); modifyPerson(employee, request); daoPerson.save(person); } And finally, the loading (in the dao) : public Contact getPerson(int ID){ Session session = HibernateSessionFactory.getSession(); Person p = (Person) session.load(Person.class, new Integer(ID)); return p; } public Contact getEmployee(int ID){ Session session = HibernateSessionFactory.getSession(); Employee = (Employee) session.load(Employee.class, new Integer(ID)); return p; } With this, i'm getting a ClassCastException when trying to load a Person using getEmployee. XML Hibernate mapping : <class name="domain.Person" table="PERSON" discriminator-value="P"> <id name="id" type="int"> <column name="ID" /> <generator class="native" /> </id> <discriminator column="type" type="character"/> <property name="firstName" type="java.lang.String"> <column name="FIRSTNAME" /> </property> <property name="lastName" type="java.lang.String"> <column name="LASTNAME" /> </property> <subclass name="domain.Employee" discriminator-value="E"> <property name="salary" column="SALARY" type="java.lang.String" /> </subclass> </class> Is it clear enough ? :-/

    Read the article

  • Randomize table guests in Excel

    - by Jo Voud
    I have a list of people: Column A: person A, person A guest, person B, person C, person C guest, ... Column B: 1, 1, 2, 3, 3, ... So in column A there is the person's name, column B gives a person a unique ID (the same id for their guest so we know that they are together). Now pretend we have a list of 100 people (also note that not all persons have guests) and we have to seat them. We have a list of tables (for example 10 * 4 person table and 10*6 person tables). We have to randomize that each person is assigned to a table and the guest is seated on the same table. What is the best way to do this? (it is also needed that I can generate this 4 times in a row without the same results, so when during the 4 courses of the diner the person are switching tables but not losing their guest).

    Read the article

  • How to use Object Type Converter

    - by arun.x.sridharan(at)oracle.com
    UseCase Description A person form where in user will enter String which has to be converted to Number while persisting. From the User Interface we might be getting a String value which has to be persisted in the database as a number in that scenario we can use converters to map the java object which is of type String to its database value which is a Number. For example , there is a 'Person' table in database which is used to store the user details passed from the User Interface. It has a 'Status' column which is of the value  Number. But from the User Interface String values (Active/InActive) are passed . For persisting the user details we can use Object type converter and provide the mappings for status column corresponding to the String values. Object type converter can be used if you wanted to have a mapping for a field for example when departmentName on the entity was of String value and mapped to dept_name field on the database table which is of the value NUMBER.   Implementation steps Sample EJB API for setting the value of status on Person Entity as a String     public void createPerson(String status,String firstName,String lastName) {                Person person = new Person();                // status will be set as a String value received from the User Interface         person.setStatus(status);                person.setFirstname(firstName);        person.setLastname(lastName);                persistPerson(person);         } In the sample code shown above status is passed as a String, this has to be converted to Number. The String value obtained will be set on Person object and persistPerson API will be called for creating a new person from the values passed from the User Interface.  Steps to configure Object type converter: 1. Navigate to Person Entity from persistence.xml and navigate to status field2. Click on Conversion tab and select Converted check box3. Select Object Type Converter radio button and set the Data Type Class to      java.math.BigDecimal and Object Type Class to java.lang.String4. Specify the conversion values for all the values that can be passed from the user interface  as shown below5. Set the Default Object value

    Read the article

  • Does a 77 Year Old Person Like To Use iPhone Siri? Of course!

    - by Gopinath
    When Apple releases any product, they just work irrespective of age, capability and ability of the users. It’s in the DNA of Steve Jobs and his colleagues at Apple to build products that just work with out any learning curve. The recent iPhone is loaded with Siri, an intelligent personal assistant. But can a 77 year old person quickly learn to use Siri for his day to day activities? Lets hear from a son who trained his 77 year old dad to use Siri on iPhone He caught on much faster than I thought he might. I was feeling proud of him and believed Siri would be a real productivity help in his life — seeing that, at 77, my dad still works full time as a realtor. I was encouraged that he really liked and would use his new personal assistant. Or at least I was until my mom called later that night. "Your father and I were just practicing with his new phone," Sigh. Well Siri will be great for my dad…if and when he remembers how to find her. Apple products are not for just techies like Android mobiles, they are for everyone. You can read the full story over here This article titled,Does a 77 Year Old Person Like To Use iPhone Siri? Of course!, was originally published at Tech Dreams. Grab our rss feed or fan us on Facebook to get updates from us.

    Read the article

  • How do managers know if a person is a good or a bad programmer?

    - by Pavel Shved
    In most companies that do programming teams and divisions consist of programmers who design and write code and managers who... well, do the management stuff. Aside from just not writing code, managers usually do not even look at the code the team develops, and may even have no proper IDE installed on their work machines. Still, the managers are to judge if a person works well, if he or she should be put in charge of something, or if particular developer should be assigned to a task of the most importance and responsibility. And last, but not least: the managers usually assign the quarterly bonuses! To do the above effectively, a manager should know if a person is a good programmer—among other traits, of course. The question is, how do they do it? They don't even look at the code people write, they can't directly assess the quality of the components programmers develop... but their estimates of who is a good coder, and who is "not as good" are nevertheless correct in most cases! What is the secret?

    Read the article

  • Is it bad to be the only person supporting software you have developed?

    - by trpt4him
    My employer has a need for a web-based application to manage and share data within the department, with approximately 50-75 possible users. I feel I have the ability to write it for them. I would likely use Python/Django with a MySQL database, so it would be open source. However, I'm the only IT person in my department (our larger organization has a separate IT support staff with which I often work, but not for web development). I want to develop this application, but if I leave in 1-2 years, and someone else has to come in after me and support it, will this be seen as a bad decision? This is assuming all the obvious points -- I will write documentation, I will comment my code, and I will strive to follow good application design principles. But will that be enough? In principle, is it acceptable for one person to develop and support an entire web application? Is this a "do first, then show and ask" kind of situation, or should I be certain it will be adopted by everyone involved first?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >