Daily Archives

Articles indexed Tuesday April 27 2010

Page 29/121 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • EF 4 - associations with keys that dont match

    - by Steve Ward
    We're using POCOs and have 2 entities: Item and ItemContact. There are 1 or more contacts per item. Item has as a primary key: ItemID LanguageCode ItemContact has: ItemID ContactID We cant add an association with a referrential constraint as they have differing keys. There isnt a strict primary / foreign key as languageCode isnt in ItemContact and ContactID isnt in Item. How can we go about mapping this with an association for contacts for an item if there isnt a direct link but I still want to see the contacts for an item? One of the entities originates in a database view so it is not possible to add foreign keys to the database Thanks Stephen Ward

    Read the article

  • Jets3t on Android

    - by Chubbs
    Hey guys, I am trying to use the Jets3t library within an Android application, and I keep getting errors with the Rest service when I use the library. 04-27 16:47:39.491: ERROR/S3Service(225): Couldn't initialize a sax driver for the XMLReader I have tried to include the Xerces library and the Crimson library, and it dont play well. I get this error: Attempt to include a core class (java.* or javax.*) in something other than a core library. It is likely that you have attempted to include in an application the core library (or a part thereof) from a desktop virtual machine. This will most assuredly not work. At a minimum, it jeopardizes the compatibility of your app with future versions of the platform. It is also often of questionable legality. If you really intend to build a core library -- which is only appropriate as part of creating a full virtual machine distribution, as opposed to compiling an application -- then use the "--core-library" option to suppress this error message. Is there something I can do to get it working ?

    Read the article

  • decompiling a DNS packet

    - by rgksugan
    I am trying to catch DNS packets which are sent from my system using Jpcap API. I have got an dns packet. I want to retrieve the ip address for which the DNS lookup is made. How can i get that?

    Read the article

  • Fatal error: Call to undefined function mysqli_connect()

    - by Jack
    I have installed WAMP. I am using Tomcat 6 to run my PHP scripts. I am also using JavaBridge.war and I have copied my php scripts into \webapp\JavaBridge\project. I have removed the semicolon from php.ini file before the statements extension=php_mysqli.dll extension=php_mysql.dll I have added C:\wamp\bin into my PATH env variable. I have copied all dll's from C:\wamp\bin\php\php5.3.0\ext into C:\windows\system32 I am still getting this error. Fatal error: Call to undefined function mysqli_connect() in C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\project\pf_query.php on line 534 Note - I dont get this error when I run my PHP script from Apache 2.2.11 of the WAMP package.

    Read the article

  • Can Java ServerSocket and Sockets using ObjectIOStreams lose packets?

    - by Joel Garboden
    I'm using a ServerSocket on my server and Sockets that use ObjectIOStreams to send serializable objects over the network connection. I'm developing an essentially more financial version of monopoly and thus packets being sent and confirmed as sent/received is required. Do I need to implement my own packet loss watcher or is that already taken care of with (Server)Sockets? I'm primarily asking about losing packets during network blips or whatnot, not full connection error. E.g. siblings move a lead plate between my router and computer's wi-fi adapter. http://code.google.com/p/inequity/source/browse/#svn/trunk/src/network Code can be found under network-ClientController and network-Server

    Read the article

  • MS Excel - Copying columns from multiple worksheets into a single worksheet based on some condition

    - by SpikETidE
    Hi everyone... Consider i have 4 workbooks with the following structure... 1. Main.xlsx Name Jan Feb Mar A B C 2. Jan.xlsx Name Jan A 3.3 B 6.4 C 5.3 3. Feb.xlsx Name Feb A 1.3 B 3.4 C 5.5 4. Mar.xlsx Name Mar A 1.3 B 3.4 C 5.5 I need to combine them like 1. Main.xlsx Name Jan Feb Mar A 3.3 1.3 1.3 B 6.4 3.4 3.4 C 5.3 5.5 5.5 And i need to automate the process... Can someone enlighten me about the possible options that i have to do this...? Thanks for your time....

    Read the article

  • In perl, how can I call a method whose name I have in a string?

    - by Ryan Thompson
    I'm trying to write some abstract code for searching through a list of similar objects for the first one whose attributes match specific values. In order to do this, I need to call a bunch of accessor methods and check all their values one by one. I'd like to use an abstraction like this: sub verify_attribute { my ($object, $attribute_method, $wanted_value) = @_; if ( call_method($object, $attribute_method) ~~ $wanted_value ) { return 1; } else { return; } } Then I can loop through a hash whose keys are accessor method names and whose values are the values I'm looking for for those attributes. For example, if that hash is called %wanted, I might use code like this to find the object I want: my $found_object; FINDOBJ: foreach my $obj (@list_of_objects) { foreach my $accessor (keys %wanted) { next FINDOBJ unless verify_attribute($obj, $accessor, $wanted{$accessor}); } # All attrs verified $found_object = $obj; last FINDOBJ; } Of course, the only problem is that call_method does not exsit. Or does it? How can I call a method if I have a string containing its name? Or is there a better solution to this whole problem?

    Read the article

  • how to hide some properties using ABPeoplePicker

    - by user321130
    greetings! when using peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person, a view with all of the contact's information is shown. I've seen apps which only display selected info only (e.g. phone numbers) how can I do this? I only want to display the contact's name and phone numbers. thank you very much

    Read the article

  • Disable the mouse click event of a button placed inside a listbox item

    - by Malcolm
    I have a button placed inside a listbox item and i have style defined fro that button where i have two images and on mouse hover i change the image. Now the problem is I am handling the listbox mouse event and when click the button the listbox mouse event doesn't fires. I tried to make the property of button ishittestvisisble=false And now if i click on button the listbox mouse event fires but the problem is the two images placed inside the styling of button don't apply as they are the child of button and by default their ishittestvisible also turn out to be false. So any suggestion or idea will be helpfull ....tx in advance...

    Read the article

  • problem Keyword token antlr

    - by batman_for
    If the 'for' is used both as a command and as "the English word": for_statement: 'for' ... id: 'for' | ID ; ID: ... right? My problem is how to differentiate the two cases. For example for_statement is only possible beginning of a line (only if preceded by ' ' or '\t'). Thanks.

    Read the article

  • Write an expression in javascript

    - by Hero
    hi everybody... I need a javascript code that split a string like below: Input string: "a=aa| b=b||b | c=cc" Output: a=>aa b=>b||b c=>cc I'd written different codes like: split(/ \ | /) or Split(/ \| (?! \ |) /) but didn't work. please help me... I really need it fast.

    Read the article

  • How to get Site Template Back?

    - by asher
    Hi Everybody, I have saved a site as tempalte (i.e. MyMarketing.stp) and added to sharepoint server using stsadm addtemplate command and after few days lost MyMarketing.stp file. Now it is available for creating top level sites as well. I want to get this site template back as MyMarketing.stp file. Is it possible to extract it from the server as MyMarketing.stp file? Thanks and in advance! Regards, Asher

    Read the article

  • Oracle ODBC x64 - getting 0 when selecting a number(9) column

    - by MatsL
    I'm having a really weird problem with a third party web service that uses an ODBC connection to Oracle 10.2.0.3.0. I've written a .NET client that generates the same SQL as the web service so I can find out what's going on. The web service is hosted by IIS 6 that's in x64 mode so we use Oracle x64 client. The oracle client version is 10.2.0.1.0. I have a table that looks like this (I've removed some columns and names): SQL> describe tablename; Name Null? Type ----------------------------------------- -------- ---------------------------- KOD VARCHAR2(30) ORDNING NUMBER(5) AVGIFT NUMBER(9) I then in SQL*Plus issue the following statement: SELECT KOD as kod, AVGIFT as riskPoang FROM tablename Where upper(KODTYP) = 'OBJLIVSV_RISKVERKSAMTYP' ORDER BY ORDNING And I get the following result: KOD RISKPOANG ------------------------------ ---------- Hög risk 55 Mellan risk 35 Låg risk 15 Mycket låg risk 5 But when I execute the exact same SQL using the same DSN on the same machine I get this: Values Kod: Hög risk RiskPoäng: 0 Kod: Mellan risk RiskPoäng: 0 Kod: Låg risk RiskPoäng: 0 Kod: Mycket låg risk RiskPoäng: 0 If I first cast the number to varchar and then back again to number, like this: SELECT KOD as kod, to_number(to_char(AVGIFT, '99'), '9999999999') as riskPoang FROM tablename Where upper(KODTYP) = 'OBJLIVSV_RISKVERKSAMTYP' ORDER BY ORDNING I get the correct result: Values Kod: Hög risk RiskPoäng: 55 Kod: Mellan risk RiskPoäng: 35 Kod: Låg risk RiskPoäng: 15 Kod: Mycket låg risk RiskPoäng: 5 Has anyone else experiences this? It's incredibly annoying and I'm completely stuck and not sure what to do next. We have a third party web service that use these tables so I must get the original SQL-statement to work since I can't modify its code. And pointers are greatly appreciated! :-) Best regards, Mats

    Read the article

  • Is there a pretty print for PHP?

    - by Aaron Lee
    I'm fixing some PHP scripts and I'm missing ruby's pretty printer. i.e. require 'pp' arr = {:one => 1} pp arr will output {:one = 1}. This even works with fairly complex objects and makes digging into an unknown script much easier. Is there some way to duplicate this functionality in PHP?

    Read the article

  • how to hide a window

    - by Nani
    Like window.open(); window.close(); Do we have any facility to hide a window. I have a window opened on a aspx page. That window has a button which opens second window. When 2nd window is opened I want to hide the 1st window. Is there a way? Plz Suggest me. Thank You.

    Read the article

  • Is is possible to programmatically change the resourceProviderFactoryType?

    - by Robert Massa
    I have a custom implementation of IResourceProvider and ResourceProviderFactory. Now the default way of making sure ASP.NET uses these custom types is to use the web.config and specify the factory like so: <globalization resourceProviderFactoryType="Product.Globalization.TranslationResourceProviderFactory" /> This works perfectly, except that in my resource provider I need database access. I want to use my IoC-container(Ninject) to inject the repositories needed to access this data into the CustomResourceProvider. But how am I going to do this? I have no control over the instantiation of the factory, so the factory can't get a reference to my IoC. Is there any way to register a custom provider programmatically, in for example the Global.asax?

    Read the article

  • how to detect sql server timeout from .NET application without using catch Exception

    - by haditeo
    Hi, In my current application, i am performing an update by invoking T-SQL Update command. The problem is when the same record is locked by other users at that time. At .NET application, the application will wait until SQL Server timeout, then it will throw the SqlException timeout. Is it possible to perform a check first whether a particular record is locked by other process rather than catching the exception ? Thanks, hadi teo Update : The SQL Server version used are 2000 and 2008

    Read the article

  • SQLite assembly not copied to output folder for unit testing

    - by Groo
    Problem: SQLite assembly referenced in my DAL assembly does not get copied to the output folder when doing unit tests (Copy local is set to true). I am working on a .Net 3.5 app in VS2008, with NHibernate & SQLite in my DAL. Data access is exposed through the IRepository interface (repository factory) to other layers, so there is no need to reference NHibernate or the System.Data.SQLite assemblies in other layers. For unit testing, there is a public factory method (also in my DAL) which creates an in-memory SQLite session and creates a new IRepository implementation. This is also done to avoid have a shared SQLite in-memory config for all assemblies which need it, and to avoid referencing those DAL internal assemblies. The problem is when I run unit tests which reside a separate project - if I don't add System.Data.SQLite as a reference to the unit test project, it doesn't get copied to the TestResults...\Out folder (although this project references my DAL project, which references System.Data.SQLite, which has its Copy local property set to true), so the tests fail while NHibernate is being configured. If I add the reference to my testing project, then it does get copied and unit tests work. What am I doing wrong?

    Read the article

  • Find all clauses related to an atom

    - by Luc Touraille
    This is probably a very silly question (I just started learning Prolog a few hours ago), but is it possible to find all the clauses related to an atom? For example, assuming the following knowledge base: cat(tom). animal(X) :- cat(X). , is there a way to obtain every possible information about tom (or at least all the facts that are explicitly stated in the base)? I understand that a query like this is not possible: ?- Pred(tom). so I thought I could write a rule that would deduce the correct information: meta(Object, Predicate) :- Goal =.. [Predicate, Object], call(Goal). so that I could write queries such as ?- meta(tom, Predicate). but this does not work because arguments to call are not sufficiently instantiated. So basically my question is: is this at all possible, or is Prolog not design to provide this kind of information? And if it is not possible, why?

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >