Search Results

Search found 93838 results on 3754 pages for 'aspire one'.

Page 14/3754 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Android: Nexus One - Geocoder causes IOException - works perfectly with other devices and emulator

    - by Stefan Klumpp
    The code below works perfectly for real devices running on 1.5, 1.6 and 2.0 as well as the emulator running on 2.1. However, executing it on the Nexus One (running 2.1) raises an IOException: java.io.IOException: Unable to parse response from server at android.location.Geocoder.getFromLocation(Geocoder.java:124) That's the code snippet where it happens: Double myLatitude = AppObject.myLocation.getLatitude(); Double myLongitude = AppObject.myLocation.getLongitude(); DEBUG.i(TAG, "My location: " + myLatitude + " | " + myLongitude); Geocoder geocoder = new Geocoder(MainActivity.this); java.util.List<Address> addressList; try { addressList = geocoder.getFromLocation(myLatitude, myLongitude, 5); if(addressList!=null && addressList.size()>0) { currentAddress = new String(); DEBUG.i(TAG,addressList.get(0).toString()); currentAddress = addressList.get(0).getAddressLine(0) + ", " + addressList.get(0).getAddressLine(1) + ", " + addressList.get(0).getAddressLine(2); } return true; } catch (IOException e) { e.printStackTrace(); return false; }

    Read the article

  • python histogram one-liner

    - by mykhal
    there are many ways, how to code histogram in Python. by histogram, i mean function, counting objects in an interable, resulting in the count table (i.e. dict). e.g.: >>> L = 'abracadabra' >>> histogram(L) {'a': 5, 'b': 2, 'c': 1, 'd': 1, 'r': 2} it can be written like this: def histogram(L): d = {} for x in L: if x in d: d[x] += 1 else: d[x] = 1 return d ..however, there are much less ways, how do this in a single expression. if we had "dict comprehensions" in python, we would write: >>> { x: L.count(x) for x in set(L) } but we don't have them, so we have to write: >>> dict([(x, L.count(x)) for x in set(L)]) however, this approach may yet be readable, but is not efficient - L is walked-through multiple times, so this won't work for single-life generators.. the function should iterate well also through gen(), where: def gen(): for x in L: yield x we can go with reduce (R.I.P.): >>> reduce(lambda d,x: dict(d, x=d.get(x,0)+1), L, {}) # wrong! oops, does not work, the key name is 'x', not x :( i ended with: >>> reduce(lambda d,x: dict(d.items() + [(x, d.get(x, 0)+1)]), L, {}) (in py3k, we would have to write list(d.items()) instead of d.items(), but it's hypothethical, since there is no reduce there) please beat me with a better one-liner, more readable! ;)

    Read the article

  • What is best practice about having one-many hibernate

    - by Patrick
    Hi all, I believe this is a common scenario. Say I have a one-many mapping in hibernate Category has many Item Category: @OneToMany( cascade = {CascadeType.ALL},fetch = FetchType.LAZY) @JoinColumn(name="category_id") @Cascade( value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN ) private List<Item> items; Item: @ManyToOne(targetEntity=Category.class,fetch=FetchType.EAGER) @JoinColumn(name="category_id",insertable=false,updatable=false) private Category category; All works fine. I use Category to fully control Item's life cycle. But, when I am writing code to update Category, first I get Category out from DB. Then pass it to UI. User fill in altered values for Category and pass back. Here comes the problem. Because I only pass around Category information not Item. Therefore the Item collection will be empty. When I call saveOrUpdate, it will clean out all associations. Any suggestion on what's best to address this? I think the advantage of having Category controls Item is to easily main the order of Item and not to confuse bi-directly. But what about situation that you do want to just update Category it self? Load it first and merge? Thank you.

    Read the article

  • one-to-many with criteria question

    - by brnzn
    enter code hereI want to apply restrictions on the list of items, so only items from a given dates will be retrieved. Here are my mappings: <class name="MyClass" table="MyTable" mutable="false" > <cache usage="read-only"/> <id name="myId" column="myId" type="integer"/> <property name="myProp" type="string" column="prop"/> <list name="items" inverse="true" cascade="none"> <key column="myId"/> <list-index column="itemVersion"/> <one-to-many class="Item"/> </list> </class> <class name="Item" table="Items" mutable="false" > <cache usage="read-only"/> <id name="myId" column="myId" type="integer"/> <property name="itemVersion" type="string" column="version"/> <property name="startDate" type="date" column="startDate"/> </class> I tried this code: Criteria crit = session.createCriteria(MyClass.class); crit.add( Restrictions.eq("myId", new Integer(1))); crit = crit.createCriteria("items").add( Restrictions.le("startDate", new Date()) ); which result the following quires: select ... from MyTable this_ inner join Items items1_ on this_.myId=items1_.myId where this_.myId=? and items1_.startDate<=? followed by select ... from Items items0_ where items0_.myId=? But what I need is something like: select ... from MyTable this_ where this_.myId=? followed by select ... from Items items0_ where items0_.myId=? and items0_.startDate<=? Any idea how I can apply a criteria on the list of items?

    Read the article

  • one-to-many with criteria question

    - by brnzn
    enter code hereI want to apply restrictions on the list of items, so only items from a given dates will be retrieved. Here are my mappings: <class name="MyClass" table="MyTable" mutable="false" > <cache usage="read-only"/> <id name="myId" column="myId" type="integer"/> <property name="myProp" type="string" column="prop"/> <list name="items" inverse="true" cascade="none"> <key column="myId"/> <list-index column="itemVersion"/> <one-to-many class="Item"/> </list> </class> <class name="Item" table="Items" mutable="false" > <cache usage="read-only"/> <id name="myId" column="myId" type="integer"/> <property name="itemVersion" type="string" column="version"/> <property name="startDate" type="date" column="startDate"/> </class> I tried this code: Criteria crit = session.createCriteria(MyClass.class); crit.add( Restrictions.eq("myId", new Integer(1))); crit = crit.createCriteria("items").add( Restrictions.le("startDate", new Date()) ); which result the following quires: select ... from MyTable this_ inner join Items items1_ on this_.myId=items1_.myId where this_.myId=? and items1_.startDate<=? followed by select ... from Items items0_ where items0_.myId=? But what I need is something like: select ... from MyTable this_ where this_.myId=? followed by select ... from Items items0_ where items0_.myId=? and items0_.startDate<=? Any idea how I can apply a criteria on the list of items?

    Read the article

  • Entity Framework One-To-One Mapping Issues

    - by Baddie
    Using VS 2010 beta 2, ASP.NET MVC. I tried to create an Entity framework file and got the data from my database. There were some issues with the relationships, so I started to tweak things around, but I kept getting the following error for simple one-to-one relationships Error 1 Error 113: Multiplicity is not valid in Role 'UserProfile' in relationship 'FK_UserProfiles_Users'. Because the Dependent Role properties are not the key properties, the upper bound of the multiplicity of the Dependent Role must be *. myEntities.edmx 2024 My Users table is consists of some other many-to-many relationships to other tables, but when I try to make a one-to-one relationship with other tables, that error pops up. Users Table UserID Username Email etc.. UserProfiles Table UserProfileID UserID (FK for Users Table) Location Birthday

    Read the article

  • InvalidOperationException sequence contains more than one element even when only one element

    - by user310256
    I have three tables, tblCompany table, tblParts table and a link table between them tblLinkCompanyParts. Since tblLinkCompanyParts is a link table so the columns that it has are LinkCompanyPartID(primary key), CompanyID from tblCompany table and PartID from tblParts as foreign keys. I have tied them up in the dbml file. In code if I write LinkCompanyParts.Parts (where LinkCompanyParts is an object of the tblLinkCompanyParts type) to get to the corresponding Part object I get the "InvalidOperationException: Sequence constains more than one element". I have looked at the data in the database and there is only one Parts record associated with the LinkCompanyPartID. The stack trace reads like at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source) at System.Data.Linq.EntityRef`1.get_Entity() at ... I read about SingleOrDefault vs FirstOrDefault but since the link table should have a one-one mapping therefore I think SingleOrDefault should work and besides "SingleOrDefault" statement is being generated behind the scenes in the designer.cs file at the following line return this._Part.Entity; Any ideas?

    Read the article

  • ATI Radeon 5850 video card one analog, one digital and one tv connected to hdmi, unable to run all 3

    - by McLovin
    I have one analog monitor connected through dvi adapter one digital monitor connected through dvi tv connected through hdmi I'm unable to run all 3 at the same time, when I try to extend desktop it asks me to disable one of the monitors so I can only have 2 at one time. I tried finding solution but according to some forums I should be able to achieve it since one is analog I should be able to run 3 outputs with hdmi that way. Does any one have any suggestions? Thank you.

    Read the article

  • Hibernate - why use many-to-one to represent a one-to-one?

    - by aberrant80
    I've seen people use many-to-one mappings to represent one-to-one relationships. I've also read this in a book by Gavin King and on articles. For example, if a customer can have exactly one shipping address, and a shipping address can belong to only one customer, the mapping is given as: <class name="Customer" table="CUSTOMERS"> ... <many-to-one name="shippingAddress" class="Address" column="SHIPPING_ADDRESS_ID" cascade="save-update" unique="true"/> ... </class> The book reasons as (quoting it): "You don't care what's on the target side of the association, so you can treat it like a to-one association without the many part." My question is, why use many-to-one and not one-to-one? What is it about a one-to-one that makes it a less desirable option to many-to-one? Thanks.

    Read the article

  • What subject do you discuss with your manager during a one-on-one?

    - by Martin
    Every week, I have a 30 minutes meeting scheduled with my manager to talk about pretty much anything. So far, I haven't taken those one-on-one very seriously. As a new year resolution, I would like to take more seriously my one-on-ones with my manager. One way I though I could do that is to plan in advance (come up with a list of questions and/or agenda) my one-on-one. With the exception of the status report, what subject do you discuss with your manager during a one-on-one? Have you ever seen an agenda for one-on-one?

    Read the article

  • Original Windows 7 Home Premium on Acer Aspire 5740G

    - by elr
    Is it posible to get the original Windows 7 Home Premium 64bit for the Acer Aspire 5740G? I bought this notebook and the license for this Windows is in the package. There is an partition with the data for the recovery. But than, there are a lot of senseless application which I don't want to use. I'm searchin for the complete clear Windows 7 Home Premium. I tried to download the original Windows 7 Home Premium and entered the serial key of the bottom of the laptop but I can't activate my Windows with this key. Any ideas or experiens with this?

    Read the article

  • Acer Aspire 5719 with Windows XP does not boot

    - by Sri
    Hi, I have an Acer Aspire 5710 which came pre-loaded with Windows Vista. O/S has been changed to Win SXP SP2 and was working fine till today. The laptop starts up and then hangs (does not reach till the Windows screen). Have tried the following Repair with XP CD. Re-install with XP CD (In both cases the error "No hard disk" is displayed.) Tried F5/F8 to boot with other options. Guess the hard-disk is not being recognised. The 160 Gb SATA disk is shown as IDE0 in the Phoenix Bios. There is no floppy drive. Any suggestions. Thanks, Sri.

    Read the article

  • Acer Aspire 5532 crashes with no warning

    - by keenan
    I have an Acer Aspire 5532. I don't have more specs off the top of my head but from what I've looked up it has all the factory stock stuff in. My keyboard is completely shot and doesn't work at all. It was working fine for quite a while, however I go to get on it Thanksgiving night and all of a sudden it just crashes with no warning. I try to restart it and it beeps 3 times with about 15 seconds in between each beep. After that it will go to start up and get to the log in screen, and about 3 minutes later it will crash again with absolutely no warning. The same thing happens every time I try to start it up. I've taken it completely apart and cleaned the fan and all the airways. I made sure all the connections are good (or at least all the ones that I can get to above the mother board), put it back together and I get the same problem.

    Read the article

  • Acer Aspire 7750-6801 windows 7 Home Premium x64 not charging properly [closed]

    - by MaurerPower
    I have an Acer Aspire 7750-6801 laptop running Windows 7 Home Premium 64 bit OS. The issue is that it will only charge sometimes when plugged in. I thought it might be a hardware issue, so I tried charging with the laptop off, and it works fine. Also when in Linux, or any other environment other than Windows, it also charges fine. The intermittent charging issue ONLY presents itself when in Windows. I've tried the following: Open Device Manager Under 'Batteries->', I uninstalled 'Microsoft ACPI-Compliant Control Method Battery' Then re-installed using 'Scan for hardware changes' Still no luck. It's quite urgent, any help would be appreciated as I am totally at a loss...

    Read the article

  • My laptop (Acer Aspire) doesn't want to start.

    - by Adi87
    I have an Acer Aspire 5520G and recently I had a big problem with it. A couple of days ago I was watching a video on the internet and my laptop froze. I had to shut it down after waiting a couple of minutes and when I wanted to restart it, it acted normally for 2 seconds then it restarts automatically over and over again. I can only shut it down by unplugging it. Nothing appears on screen. I think that it is a hardware problem. If you need further information please leave comment.

    Read the article

  • Update one-to-many EntityKey using Foreign Key

    - by User.Anonymous
    To use by the easiest way Entity Framework, I use partial class to add Foreign Key on most important Entities Model. For example, I have an Entity "CONTACT" which have "TITLE", "FUNCTION" and others. When I update a CONTACT, with this code, Foreign Key are automatically updated : public int? TitId { get { if (this.TITLE_TIT != null) return TITLE_TIT.TIT_ID; return new Nullable<int>(); } set { this.TITLE_TITReference.EntityKey = new System.Data.EntityKey("Entities.TITLE_TIT", "TIT_ID", value); } } But I have a join with ACTIVITY, that can have many CONTACT, and I don't know how to update EntityKey on setters. public IEnumerable<EntityKeyMember> ActId { get { List<EntityKeyMember> lst = new List<EntityKeyMember>(); if (this.ACT_CON2 != null) { foreach (ACT_CON2 id in this.ACT_CON2.ToList()) { EntityKeyMember key = new EntityKeyMember(id.CON_ID.ToString(),id.ACT_ID); lst.Add(key); } } return lst; } set { this.ACT_CON2.EntityKey = new System.Data.EntityKey("Entities.ACT_CON2", value); } } How set many EntityKey ? Thank you.

    Read the article

  • Initialization of an ArrayList in one line.

    - by Macarse
    I am willing to create a list of options to test something. I was doing: ArrayList<String> places = new ArrayList<String>(); places.add("Buenos Aires"); places.add("Córdoba"); places.add("La Plata"); I refactor the code doing: ArrayList<String> places = new ArrayList<String>(Arrays.asList("Buenos Aires", "Córdoba", "La Plata")); Is there a better way of doing this? Thanks for reading!

    Read the article

  • Many-to-one relationship in SQLAlchemy

    - by Arrieta
    This is a beginner-level question. I have a catalog of mtypes: mtype_id name 1 'mtype1' 2 'mtype2' [etc] and a catalog of Objects, which must have an associated mtype: obj_id mtype_id name 1 1 'obj1' 2 1 'obj2' 3 2 'obj3' [etc] I am trying to do this in SQLAlchemy by creating the following schemas: mtypes_table = Table('mtypes', metadata, Column('mtype_id', Integer, primary_key=True), Column('name', String(50), nullable=False, unique=True), ) objs_table = Table('objects', metadata, Column('obj_id', Integer, primary_key=True), Column('mtype_id', None, ForeignKey('mtypes.mtype_id')), Column('name', String(50), nullable=False, unique=True), ) mapper(MType, mtypes_table) mapper(MyObject, objs_table, properties={'mtype':Relationship(MType, backref='objs', cascade="all, delete-orphan")} ) When I try to add a simple element like: mtype1 = MType('mtype1') obj1 = MyObject('obj1') obj1.mtype=mtype1 session.add(obj1) I get the error: AttributeError: 'NoneType' object has no attribute 'cascade_iterator' Any ideas?

    Read the article

  • jQuery: Inserting li items one by one?

    - by Legend
    I wrote the following (part of a jQuery plugin) to insert a set of items from a JSON object into a <ul> element. ... query: function() { ... $.ajax({ url: fetchURL, type: 'GET', dataType: 'jsonp', timeout: 5000, error: function() { self.html("Network Error"); }, success: function(json) { //Process JSON $.each(json.results, function(i, item) { $("<li></li>") .html(mHTML) .attr('id', "div_li"+i) .attr('class', "divliclass") .prependTo("#" + "div_ul"); $(slotname + "div_li" + i).hide(); $(slotname + "div_li" + i).show("slow") } } }); } }); }, ... Doing this maybe adding the <li> items one by one theoretically but when I load the page, everything shows up instantaneously. Instead, is there an efficient way to make them appear one by one more slowly? I'll explain with a small example: If I have 3 items, this code is making all the 3 items appear instantaneously (at least to my eyes). I want something like 1 fades in, then 2 fades in, then 3 (something like a newsticker perhaps). Anyone has a suggestion?

    Read the article

  • computer shows up twice, connection unknown

    - by Thomas G. Seroogy
    added two computers to Ubuntu One. One machine is windows. The windows version seems to work fine, and I started syncing a folder by placing it into the Ubuntu One folder. All files and folders are visible when I go to my account online. On Ubuntu machine. I selected to sync the Download folder. Shortly thereafter, I realized that one folder exceeded my storage max. I tried to un-sync the folder, but Ubuntu One and the Stop Syncing This Folder were not visible in the menu. Per Ubuntu instructions, I removed my Ubuntu computer from the list of syncing computers. Per Ubuntu instructions, I re-added the Ubuntu computer. However, I find that two computers by the same name are added on both the desktop app and on the web. Plus, I the connection is "unknown." I have removed and re-added the computer several times with the same results. In all cases, I remove the computers using the Ubuntu One desktop app, then removing them from my account on the web, removing the Ubuntu One password, and restart the Ubuntu One app. Problem remains. Thanks in advance for any replies and help.

    Read the article

  • Can all-in-one desktops be good developer machines?

    - by user6900
    I was just going through some all-in-one desktop PCs (Dell Studio One, HP Touch Smart, Lenovo IdeaCenter, etc.) and their specs really look good (4 GB RAM, 2.x GHz Core 2 Duo, etc.) Are there any disadvantages of such PCs as a developer machine? I mostly do Java (Eclipse + MySQL + Tomcat / JBoss) or .NET (Visual Studio + MsSQL) development. Edit: One common question I could see is harddrive size and that's around 320 GB 7200 RPM.

    Read the article

  • Ruby on Rails: having two xmlbuilder templates per action , one for errors one for regular output

    - by randombits
    What's the best way to handle having two templates (or should it be one, DRY?) for xml builder templates? I'm building a web api with Rails and wanted to see an example of how to have a view that does regular output vs one that does error output. I've been using @obj.to_xml for a while, but my requirements have changed and require me building my own error templates. do you typically have both views in one with a condition above for errors such as app/views/myresource/create.xml.builder unless @myobj.errors.empty? // xml for errors here? end // regular xml view

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >