Search Results

Search found 1102 results on 45 pages for 'recurrence relation'.

Page 25/45 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Error when using TransformToAncestor: "The specified Visual is not an ancestor of this Visual."

    - by Brian Sullivan
    I'm trying to get the offset of a control relative to the top of its window, but I'm running into trouble when using the TransformToAncestor method of the control. Note: this code is in a value converter which will convert from a control to its relative Y position in relation to the window. public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var ctrl = (Control) value; var win = Window.GetWindow(ctrl); var transform = ctrl.TransformToAncestor(win); // Exception thrown here. var pt = transform.Transform(new Point(0, 0)); return pt.Y; } The call to Window.GetWindow works just fine, and returns the correct window object inside which the control resides. Am I misunderstanding what WPF thinks of as an "ancestor"? I would think that given the result of GetWindow, that window would be an ancestor of the control. Are there certain nesting patters that would cause the line of ancestry to be cut off at a certain point?

    Read the article

  • LiNQ to Entities, Include less

    - by Freddy
    Hi, If you are making a LinQ to entities expression for ClassA where A has a relation to ClassB like this: var temp = from p in myEntities.ClassA.Include("ClassB") where ... select p; You will get a set of ClassA:s with the reference to ClassB loaded. The thing in my case is that I dont really need to load ALL the ClassB-references, just a few of them. But I dont want to loop through the list of ClassA:s and load them individually, i want my database operations to be fewer and bigger instead of reading small chunks here and there. Is it possible to put some kind of restrictions on which references to include or do you have to accept this all or nothing style?

    Read the article

  • JPQL check many-to-many relationship

    - by Juriy
    Just a quick question: There's the entity (for example User) who is connected with the ManyToMany relationship to the same entity (for example this relation describes "friendship" and it is symmetric). What is the fastest way in terms of execution time to check if User A is a "friend" of user B? The "dumb" way would be to fetch whole List and then check if user exists there but that's obviously the overhead. I'm using JPA 2 Here's the sample code: @Entity @Table(name="users") public class UserEntity { @ManyToMany(fetch = FetchType.LAZY) private List<UserEntity> friends; .... }

    Read the article

  • Wandering CGAffineTransformMakeRotation

    - by Joe
    Okay this is about to make me insane -- any help would be appreciated. I have two images which are part of a timer application. One is the needle/hand and the other is a little hub which is styled to look like the needle base. I'm using a CGAffineTransformMakeRotation to rotate the needle and the base stays stationary. The problem: there is like a 1-2px 'wander' to the needle's rotation which makes it look like it's moving off center in relation to the base. I have worked the base and needle image over in PS extensively, and both are dead center pixel wise -- seriously. My method to rotate the hand: -(IBAction) rotateSteamArrow{ CGAffineTransform rotate = CGAffineTransformMakeRotation( degreesSteam / 180.0 * 3.14159265); degreesSteam = degreesSteam + 1.5; if (degreesSteam <= 180) { [steamNeedle setTransform:rotate]; } else { [self handleSteamTimer]; [self toggleButton:(id)timerButton]; [self switchSound]; } }

    Read the article

  • Regarding BMA-150 Acceleration sensor

    - by vinaykumar
    Hi all, At present i am working on hal part of sensors in android sdk, we are using 3- Axis BMA-150 Accelerometer sensor to get acceleration values with respect to X,y,Z Axis, I want to know whether this sensor will give o/p directly in SI units by using some calibration techniques or what ? , and i noticed that in sensor.c file they mentioned 720.0 LSG = 1G(9.8 m/s2), what is the relation between LSG and acceleration due to gravity? what is meant by LSG why they are multiplying the o/p of accelerometer x,y,z valuse with 9.8/720.0f . please help on this part . Thanks Vinay

    Read the article

  • Is there a fingerprint reader api/sdk?

    - by Nir
    I need to read the user's fingerprint from my application. What I really want is a simple SDK that works with a lot of inexpensive fingerprint readers but I can deal with something that works only with one specific model if that model is cheap and available worldwide. And it has to be royalty-free, I can pay for a development license but if I have to pay for each installation I just can't use it. What I'm doing has no relation to login or encryption, so the software included with the reader will probably be useless to me.

    Read the article

  • Find coordinate by angle

    - by George Johnston
    I am developing in application in XNA which draws random paths. Unfortunately, I'm out of touch with graphing, so I'm a bit stuck. My application needs to do the following: Pick a random angle from my origin (0,0), which is simple. Draw a circle in relation to that origin, 16px away (or any distance I specify), at the angle found above. (Excuse my horrible photoshoping) The second circle at (16,16) would represent a 45 degree angle 16 pixels away from my origin. I would like to have a method in which I pass in my distance and angle that returns a point to graph at. i.e. private Point GetCoordinate(float angle, int distance) { // Do something. return new Point(x,y); } I know this is simple, but agian, I'm pretty out of touch with graphing. Any help? Thanks, George

    Read the article

  • Two Key HashSet?

    - by athena
    I need a HashSet implementation where the elements are a pair of Integers eg. Set s = { {1,2} , {3,4} , {1,4}}. Here the set s has 3 elements. This kind of two key HashSet is needed in many situations like, I have a relation in my database where the candidate key is a combination of two columns. Is there some library which already provides this? If no such implementation is available, then rather then implementing the entire data structure from scratch, will it be easier (and efficient?) to extend the HashSet implementation in Java?

    Read the article

  • The relationship between OPC and DCOM

    - by typoknig
    Hi all, I am trying to grasp the link between OPC and DCOM. I have watched all four of the tutorials here and I think I have a good feeling for what OPC is, but in one of the tutorials (the third one 35 seconds in) the narrator states that OPC is based on DCOM, but I do not understand how the two are really linked. My confusion comes from a question my professor posed in which he asked "How and where would you deploy OPC instead of DCOM and vice-versa." His question makes it seem like the two are not as linked as my research suggests. I'm not looking for anyone to answer the question, I just want to know the relation between OPC and DCOM, then I can figure the rest out. Specifically I would like to know if: 1.) One is always based on the other 2.) One can always be deployed without the other.

    Read the article

  • Unresponsive form instance when instantiating form gets minimized

    - by sjlewis
    There's form A is the main form that gets hidden and is accessible via NotifyIcon's context menu. Form A instantiates form B via NotifyIcon's context menu also. Form B reacts to mouse events, etc. No problem there. Form B instantiates form C. Form C reacts to mouse events, etc. No problem here as well, but when form B gets minimized, form C no longer reacts to mouse events (eg. can no longer move, button clicks do not respond). Any idea why form C behaves like this in relation to form B getting minimized. I also tried to instantiate form C through form A (eg. form B calling a method in form A to instantiate form C) but the same thing happens. Is there any way to make form C respond even w/ form B (initiator) minimized?

    Read the article

  • NHibernate IPreUpdateEventListener weird behaviour

    - by mcaaltuntas
    I am using NHibernate 2.0.1 and IPreUpdateEventListener,IPreInsertEventListener events for audit logging purposes. I have a basic entity that has a one to many relation like this. User-------Books From an ASP.NET MVC controller method i am adding a book to a user like this. Book book =new Book("LOTR"); var userBook=user.AddBook(book); After session flushing OnPreInsert event called once for newly created Book object than OnPreUpdate called for all books objects in user's books collection even they have not changed.So I am updating LastMofiedDate property of all books objects and I dont want to do this. Is this supposed behaviour of NHibernate or am I missing something?

    Read the article

  • How to set up an insert to a grails created file with next sequence number?

    - by Jack BeNimble
    I'm using a JMS queue to read from and insert data into a postgres table created by grails. The problem is obtaining the next sequence value. I thought I had found the solution with the following statement (by putting "DEFAULT" where the ID should go), but it's no longer working. I must have changed something, because I needed to recreate the table. What's the best way to get around this problem? ps = c.prepareStatement("INSERT INTO xml_test (id, version, xml_text) VALUES (DEFAULT, 0, ?)"); UPDATE: In response to the suggested solution, I did the following: Added this to the the domain: class XmlTest { String xmlText static constraints = { id generator:'sequence', params:[name:'xmltest_sequence'] } } And changed the insert statement to the following: ps = c.prepareStatement("INSERT INTO xml_test (id, version, xml_text) VALUES (nextval('xmltest_sequence'), 0, ?)"); However, when I run the statement, I get the following error: [java] 1 org.postgresql.util.PSQLException: ERROR: relation "xmltest_sequence" does not exist Any thoughts?

    Read the article

  • Java App Engine - ranked counter

    - by Richard
    I understand the sharded counter, here: http://code.google.com/appengine/articles/sharding_counters.html The problem is that a simple counter will not work in my application. I am sorting my entities by a particular variable so I am returned not so much a count, but more of a rank. My current method is: SELECT COUNT(this) FROM Entity.class WHERE value <= ? Result + 1 is then the rank of the parameter in relation to the value variable in the persistent Entity objects. The limitation of this is the highest rank being returned is 1001 because count() can give a maximum of 1000. The reason I cannot store the rank on the Entity object is that the ranks are updated very often, and re-setting this rank variable would be much too costly. Any ideas on the best way to accomplish this?

    Read the article

  • Calling one DAO from another DAO?

    - by es11
    Can this ever make sense? Say I need to fetch an object from the DB which has a relation to another object (represented by a foreign key in the DB, and by a composition in my domain object). If in my first DAO I fetch the data for object 1, then call the dao for object 2, and finally (from within the first DAO, call the setter in object 1 and give it the previously fetched object 2). I know I could do a join instead, but it just seems more logical to me to decouple the functionality (which is why I am skeptical about calling one dao from another). Or should I move some of the logic to the service layer? Thanks Update: I think I solved the problem with help from the answers: all I needed to do was add the following to my mapping of Object 1: <one-to-one name="Object2" fetch="join" class="com...Object2"></one-to-one> I didn't have to change anything else. Thanks for the help!

    Read the article

  • Join query in doctrine symfony

    - by THOmas
    I have two tables userdetails and blog question The schema is UserDetails: connection: doctrine tableName: user_details columns: id: type: integer(8) fixed: false name: type: string(255) fixed: false BlogQuestion: connection: doctrine tableName: blog_question columns: question_id: type: integer(8) fixed: false unsigned: false primary: true autoincrement: true blog_id: type: integer(8) fixed: false user_id: type: integer(8) fixed: false question_title: type: string(255) I am using one join query for retrieving all the questions and user details from this two tables My join query is $q = Doctrine_Query::create() ->select('*') ->from('BlogQuestion u') ->leftJoin('u.UserDetails p'); $q->execute(); But it is showing this error Unknown relation alias UserDetails Pls anybody help me Thanks in advance

    Read the article

  • ExpressionEngine: {exp:query} producing error

    - by Josh Brown
    Hi. I have this code in place to pull some relation data from the database based on a ID of another weblog entry. The relationship custom field would not work for my situation. I have tested the SQL with MySQL and get no errors. But I get an error when I pull up the page. {exp:query sql="SELECT entry_id,field_id_16,field_id_19 FROM exp_weblog_data WHERE field_id_15='2' AND weblog_id='6'"} Also, I want to populate the “field_id_15” from the url. I have tried using the “segment_*” tag, but nothing. Maybe it is something else. Any help is greatly appreciated. Thanks, Josh

    Read the article

  • Staging database good practices

    - by Tom
    Hi, I'm about to deploy to production a fairly complex site and for the first time need a staging environment where I can test things in a more realistic environment, especially with regard to some external services that cannot be run locally. My general plan is to develop & test first locally, push simple changes (small bug fixes, HTML/CSS, JS, etc) direct to production, and for larger changes, push first to staging subdomain for thorough testing and then to production. I don't think that I need to keep the staging and production databases in sync (occasional manual updating would do) but I'm wondering if there are any general good practices with regard to maintaing a staging environment in relation to a production environment, especially when it comes to databases. Any general thoughts/advice/experience would be appreciated.

    Read the article

  • Sql simple query

    - by Josemalive
    Hello, I have the following table Persons_Companies that shows a relation between persons and companies knowns by these persons: PersonID | CompanyID 1 1 2 1 2 2 3 2 4 2 Imaging that company 1="Google" and company 2 is ="Microsoft", i would like to know the query to have the following result: PersonID | Microsoft | Google 1 0 1 2 1 1 3 1 0 4 1 0 Until this moment i have something similar: select PersonID, case when CompanyID=1 then 1 else 0 end as Google, case when EmpresaID=2 then 1 else 0 end as Microsoft from Persons_Companies My problem is with the persons that knows both companies, i cant imagine how could this query be. Could you give me a hand? Thanks in advance. Best Regards. Josema.

    Read the article

  • good books on numerical computation with C

    - by yCalleecharan
    Hi, I've read the post "What is the best book on numerical methods?" and I wish to ask more or less the same question but in relation to C programming. Most of the time, C programming books on numerical methods are just another version of the author's previous Fortran book on the same subject. I've seen Applied numerical methods in C by Nakamura, Shoichiro and the C codes are not good programming practice. I've heard bad comments about Numerical Recipes by Press. Do you know good books on C that discusses numerical methods. It's seem better for me to ask about good books on C discussing numerical methods than rather asking books on numerical methods that discusses C. I've heard about Numerical Algorithms with C by Giesela Engeln-Müllges and A Numerical Library in C for Scientists and Engineers bu Lau but haven't read them. Good books will always have algorithms implemented in the programming language in a smart way. Thanks a lot...

    Read the article

  • Unix file naming convention for effective tab completion?

    - by thebossman
    I feel like I often name files in such a way that my computer constantly beeps while I program because the tab completion is ambiguous. Before doing a lot of Unix programming, I tended to name related files with the same prefix to indicate their relation. Now I must re-think my approach to folder and file structures and names to program more effectively. What heuristics or rules do you apply when programming to simplify tab completion? Do you use any tools to make tab completion smoother (e.g., emacs icicles)?

    Read the article

  • Oracle SQL clause evaluation order

    - by jon.johnson
    In Oracle, which clause types get evaluated first? If I had the following ( pretend .... represent valid expressions and relation names ), what would the order of evaluation be? SELECT ... FROM ..... WHERE ........ GROUP BY ........... HAVING ............. ORDER BY ................ I am under the impression that the SELECT clause is evaluated last, but other than that I'm clueless.

    Read the article

  • Strange behaviour of code inside TransactionScope?

    - by Krishna
    We are facing a very complex issue in our production application. We have a WCF method which creates a complex Entity in the database with all its relation. public void InsertEntity(Entity entity) { using(TransactionScope scope = new TransactionScope()) { EntityDao.Create(entity); } } EntityDao.Create(entity) method is very complex and has huge pieces of logic. During the entire process of creation it creates several child entities and also have several queries to database. During the entire WCF request of entity creation usually Connection is maintained in a ThreadStatic variable and reused by the DAOs. Although some of the queries in DAO described in step 2 uses a new connection and closes it after use. Overall we have seen that the above process behaviour is erratic. Some of the queries in the inner DAO does not even return actual data from the database? The same query when run to the actaul data store gives correct result. What can be possible reason of this behaviour?

    Read the article

  • ruby on rails, searchlogic and refactoring

    - by JohnMerlino
    Hey all, I'mt not too familiar with searchlogic plugin for rails (I did view the railscasts but wasn't helpful in relation to the specific code below). Can anyone briefly describe how it is being used in the three methods below? Thanks for any response. def extract_order @order_by = if params[:order].present? field = params[:order].gsub(".", "_") field = field.starts_with?('-') ? 'descend_by_'+field[1..-1] : 'ascend_by_'+field field.to_sym else # Workaround 'searchlogic'.to_sym end end def find_resources @search_conditions = params[:search_conditions] || {} # See http://www.binarylogic.com/2008/11/30/searchlogic-1-5-7-complex-searching-no-longer-a-problem/ @resources = @resource_model.send(@order_by).searchlogic(:conditions => @search_conditions) end def apply_filters f = filter_by f.each do |filter_field| filter_constraints = params[filter_field.to_sym] if filter_constraints.present? # Apply searchlogic's scope @resources.send(filter_field,filter_constraints) end end end

    Read the article

  • How to I create an HQL query to return objects in a many to many relationship?

    - by Dave
    Hi there. I have an application that includes 2 classes Club and Article. These are mapped in Hibernate as a many to many relationship. As a result, hibernate has created a table called CLUB_ARTICLE which it uses to manage the many to many relation ship. The CLUB and ARTILCE tables have no direct reference to each other and the mapping is only represented in the CLUB_ARTICLE table. I need to create an HQL query that returns a list of articles for a particlular club. So I need to supply the club id and get back a list of Article objects that belong to it. For some reason, I just can't work out how to do this. Any help would be very much appriciated! Thanks.

    Read the article

  • Linq to Entities and LEFT OUTER JOIN issue with MANY:1 relations

    - by Robert Koritnik
    Can somebody tell me, why does Linq to Entities translate many to 1 relationships to left outer join instead of inner join? Because there's referential constraint on DB itself that ensures there's a record in the right table, so inner join should be used instead (and it would work much faster) If relation was many to 0..1 left outer join would be correct. Question Is it possible to write LINQ in a way so it will translate to inner join rather than left outer join. It would speed query execution a lot... I haven't used eSQL before, but would it be wise to use it in instead of LINQ? Edit I updated my tags to include technology I'm using in the background: Entity Framework V1 Devart dotConnect for Mysql MySql database If someone could test if the same is true on Microsoft SQL server it would also give me some insight if this is Devart's issue or it's a general L2EF functionality... But I suspect EF is the culprit here.

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >