Search Results

Search found 93774 results on 3751 pages for 'one monkey'.

Page 11/3751 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Can I sync my Tomboy notes from Windows through Ubuntu One?

    - by badp
    I have setup my Ubuntu machine to synchronize Tomboy notes with the Ubuntu One service. I'm now trying Tomboy on Windows and it would be great to have it sync with Ubuntu One. However, while Tomboy for Ubuntu does expose a 'Ubuntu One' service for synchronization, version 1.2.0 of Tomboy for Windows does not. I can, however, use a "Tomboy Web" service. Does Ubuntu One behave as a Tomboy Web service and how would I configure it to do so?

    Read the article

  • Are there any famous one-man-army programmers?

    - by DFectuoso
    Lately I have been learning of more and more programmers who think that if they were working alone, they would be faster and would deliver more quality. Usually that feeling is attached to a feeling that they do the best programming in their team and at the end of the day the idea is quite plausible. If they ARE doing the best programming, and worked alone (and more maybe) the final result would be a better piece of software. I know this idea would only work if you where enough passionate to work 24/7, on a deadline, and great discipline. So after considering the idea and trying to learn a little more, I wonder if there are famous one-man-army programmers that have delivered any (useful) software in the past?

    Read the article

  • Rails Model Relationship: Has one but also belongs to many

    - by Lowgain
    I have two Models, Modela and Modelb. Modela can only own one Modelb, but Modelb can be a part of many Modela's. What I have right now is class Modela < ActiveRecord::Base has_one :modelb end class Modelb < ActiveRecord::Base belongs_to :modela, :foreign_key => "modela_id" #might not make sense? end Not too sure about the whole :foreign_key thing I was doing there, but it was where it was when I left off. As I am trying to allow Modelb to be part of many Modela's, I don't want to add a modela_id field to the Modelb table. What is the best way to do this?

    Read the article

  • Javascript one-liners

    - by peoro
    Often I find some really cool javascript one liners that you can copy and paste into your browser address bar in order to get some fancy effects or even useful ones. This, for example, will let you edit anything on the page. javascript:document.body.contentEditable='true'; document.designMode='on'; void 0 What is your favorite? EDIT: I know that technically all these snippets are just javascript scripts that gets evaluated by the browser as if they were defined in the page. I also know that many browsers have got extensions to let you run javascript code (also letting you store scripts somewhere, providing a good editor etc etc). However that's not so practical; I'm not a javascript developer, haven't got firebug installed, and I can't install it anywhere I go. My idea idea is that of collecting the best "mini-scripts" that whoever can just copy and paste in his browser without the need of installing extensions and stuff.

    Read the article

  • 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

  • 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

  • Copy / Move One SAP Client From One System to another System

    - by JonH
    We have one SAP system in the US (lets call it TKIJVPL1), this system has an SAP Client, client 241. We have another SAP system in Germany (lets call it Lockweiler). We need to move this client 241 from our TKIJVPL1 server to this new server. Can I simply use transaction SCC8? It says client export, but when I look at the options it says Source client : 241 (which is good), it says Profile Name SAP_ALL (which is also good as I need all data), but Target System all that is coming up is PL1 / QL1. What is the easiest way to export one client from one system to another system in SAP?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >