Search Results

Search found 147 results on 6 pages for 'nickname'.

Page 3/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • smtp.gmail.com from bash gives "Error in certificate: Peer's certificate issuer is not recognized."

    - by ndasusers
    I needed my script to email admin if there is a problem, and the company only uses Gmail. Following a few posts instructions I was able to set up mailx using a .mailrc file. there was first the error of nss-config-dir I solved that by copying some .db files from a firefox directory. to ./certs and aiming to it in mailrc. A mail was sent. However, the error above came up. By some miracle, there was a Google certificate in the .db. It showed up with this command: ~]$ certutil -L -d certs Certificate Nickname Trust Attributes SSL,S/MIME,JAR/XPI GeoTrust SSL CA ,, VeriSign Class 3 Secure Server CA - G3 ,, Microsoft Internet Authority ,, VeriSign Class 3 Extended Validation SSL CA ,, Akamai Subordinate CA 3 ,, MSIT Machine Auth CA 2 ,, Google Internet Authority ,, Most likely, it can be ignored, because the mail worked anyway. Finally, after pulling some hair and many googles, I found out how to rid myself of the annoyance. First, export the existing certificate to a ASSCII file: ~]$ certutil -L -n 'Google Internet Authority' -d certs -a > google.cert.asc Now re-import that file, and mark it as a trusted for SSL certificates, ala: ~]$ certutil -A -t "C,," -n 'Google Internet Authority' -d certs -i google.cert.asc After this, listing shows it trusted: ~]$ certutil -L -d certs Certificate Nickname Trust Attributes SSL,S/MIME,JAR/XPI ... Google Internet Authority C,, And mailx sends out with no hitch. ~]$ /bin/mailx -A gmail -s "Whadda ya no" [email protected] ho ho ho EOT ~]$ I hope it is helpful to someone looking to be done with the error. Also, I am curious about somethings. How could I get this certificate, if it were not in the mozilla database by chance? Is there for instance, something like this? ~]$ certutil -A -t "C,," \ -n 'gmail.com' \ -d certs \ -i 'http://google.com/cert/this...'

    Read the article

  • GIT : I keep having to merge my new branch

    - by mnml
    Hi, I have created a new branch and I'm working on it with others dev but for reasons when I want to push my new commits I always have to git merge origin/mynewbranch Otherwise I'm getting some errors: ! [rejected] mynewbranch -> mynewbranch (non-fast-forward) error: failed to push some refs to '[email protected]/repo.git' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes before pushing again. See the 'Note about fast-forwards' section of 'git push --help' for details. You asked me to pull without telling me which branch you want to merge with, and 'branch.mynewbranch.merge' in your configuration file does not tell me, either. Please specify which branch you want to use on the command line and try again (e.g. 'git pull <repository> <refspec>'). See git-pull(1) for details. If you often merge with the same branch, you may want to use something like the following in your configuration file: [branch "mynewbranch"] remote = <nickname> merge = <remote-ref> [remote "<nickname>"] url = <url> fetch = <refspec> See git-config(1) for details. Why is it not automatic? Thanks

    Read the article

  • How to write a Mork File Format file in Java?

    - by Sumit Ghosh
    Iam working on a project which involves writing a Mork File (Mork is a database format used by Mozilla to store url history and other information.) It has been replaced by an enhanced version of SQLite in latest Mozilla 3.0. Now I have the code for parsing a Mork File , but Iam struggling a bit with this part of the the file. <(A9=3)(81=)([email protected])(80=0)(85=2)(86=4ac18267)(83=1) (87=Mark)(88=Colbath)(89=Mark Colbath)([email protected])(8B [email protected])(8C=512-282-2509)(8D=+504-9907-1342)(8E=512-282-2510) (8F=512-282-2511)(90=512-282-2512)(91=Two Blocks Past Oxen Team)(92 =Villa Alicia)(93=Siguatepeque)(94=Comayagua)(95=NA)(96=Honduras) (97=9309 Heatherwood Dr)(98=Apartment 1)(99=Austin)(9A=TX)(9B=78748) (9C=USA)(9D=Programmer)(9E=Programming)(9F=MPC Solutions)(A0 =rentaprogrammer)(A1=http://www.mpcsol.com)(A2 =http://www.jesuslovesthelittlechildren.org)(A3=Hannah)(A4=John) (A5=Faith)(A6=Timothy)(A7=Some notes go here.)(A8 [email protected])> {1:^80 {(k^C0:c)(s=9)} [1:^82(^BF=3)] [1(^83=)(^84=)(^85=)(^86=)(^87=)(^88=)(^89^82)(^8A^82)(^8B=)(^8C=) (^8D=)(^8E=0)(^8F=2)(^90=0)(^91=)(^92=)(^93=)(^94=)(^95=)(^96=) (^97=)(^98=)(^99=)(^9A=)(^9B=)(^9C=)(^9D=)(^9E=)(^9F=)(^A0=)(^A1=) (^A2=)(^A3=)(^A4=)(^A5=)(^A6=)(^A7=)(^A8=)(^A9=)(^AA=)(^AB=)(^AC=) (^AD=)(^AE=)(^AF=)(^B0=)(^B1=)(^B2=)(^B3=)(^B4=)(^B5=)(^B6=)(^B7=) (^B8=)(^B9=)(^BA=)(^BB=)(^BC^86)(^BD=1)] [2(^83^87)(^84^88)(^85=)(^86=)(^87^89)(^88=)(^89^8A)(^8A^8A)(^8B^8B) (^8C=)(^8D=)(^8E=2)(^8F=0)(^90=1)(^91^8C)(^92^8D)(^93^8E)(^94^8F) (^95^90)(^96=)(^97=)(^98=)(^99=)(^9A=)(^9B^91)(^9C^92)(^9D^93)(^9E^94) (^9F=NA)(^A0^96)(^A1^97)(^A2^98)(^A3^99)(^A4=TX)(^A5^9B)(^A6^9C) (^A7^9D)(^A8^9E)(^A9^9F)(^AA^A0)(^AB=)(^AC=)(^AD=)(^AE=)(^AF=)(^B0=) (^B1=)(^B2^A1)(^B3^A2)(^B4=)(^B5=)(^B6=)(^B7^A3)(^B8^A4)(^B9^A5) (^BA^A6)(^BB^A7)(^BC=0)(^BD=2)] [3(^83=)(^84=)(^85=)(^86=)(^87=)(^88=)(^89^A8)(^8A^A8)(^8B=)(^8C=) (^8D=)(^8E=0)(^8F=0)(^90=0)(^91=)(^92=)(^93=)(^94=)(^95=)(^96=) (^97=)(^98=)(^99=)(^9A=)(^9B=)(^9C=)(^9D=)(^9E=)(^9F=)(^A0=)(^A1=) (^A2=)(^A3=)(^A4=)(^A5=)(^A6=)(^A7=)(^A8=)(^A9=)(^AA=)(^AB=)(^AC=) (^AD=)(^AE=)(^AF=)(^B0=)(^B1=)(^B2=)(^B3=)(^B4=)(^B5=)(^B6=)(^B7=) (^B8=)(^B9=)(^BA=)(^BB=)(^BC=0)(^BD=3)]} Can someone tell me how this part of the Mork file relates to the data given below? run: NickName=,LastModifiedDate=4ac18267,FaxNumberType=,BirthMonth=,LastName=,HomePhone=,WorkCountry=,HomePhoneType=,PreferMailFormat=0,CellularNumber=,FamilyName=,[email protected],AnniversaryMonth=,HomeCity=,WorkState=,HomeCountry=,PhoneticFirstName=,PhoneticLastName=,HomeState=,WorkAddress=,WebPage1=,WebPage2=,HomeAddress2=,WorkZipCode=,_AimScreenName=,AnniversaryYear=,WorkPhoneType=,Notes=,WorkAddress2=,WorkPhone=,Custom3=,Custom4=,Custom1=,Custom2=,PagerNumber=,AnniversaryDay=,WorkCity=,AllowRemoteContent=0,CellularNumberType=,FaxNumber=,PopularityIndex=2,FirstName=,SpouseName=,CardType=,Department=,Company=,HomeAddress=,BirthDay=,SecondEmail=,RecordKey=1,DisplayName=,DefaultEmail=,DefaultAddress=,BirthYear=,Category=,PagerNumberType=,[email protected],JobTitle=,HomeZipCode=, NickName=,LastModifiedDate=0,FaxNumberType=,BirthMonth=,LastName=Colbath,HomePhone=+504-9907-1342,WorkCountry=USA,HomePhoneType=,PreferMailFormat=2,CellularNumber=512-282-2512,FamilyName=,[email protected],AnniversaryMonth=,HomeCity=Siguatepeque,WorkState=TX,HomeCountry=Honduras,PhoneticFirstName=,PhoneticLastName=,HomeState=Comayagua,WorkAddress=9309 HeatherwoodDr,WebPage1=http://www.mpcsol.com,WebPage2=http://www.jesuslovesthelittlechildren.org,HomeAddress2=VillaAlicia,WorkZipCode=78748,_AimScreenName=rentaprogrammer,AnniversaryYear=,WorkPhoneType=,Notes=Some notes go here.,WorkAddress2=Apartment 1,WorkPhone=512-282-2509,Custom3=Faith,Custom4=Timothy,Custom1=Hannah,Custom2=John,PagerNumber=512-282-2511,AnniversaryDay=,WorkCity=Austin,AllowRemoteContent=1,CellularNumberType=,FaxNumber=512-282-2510,PopularityIndex=0,FirstName=Mark,SpouseName=,CardType=,Department=Programming,Company=MPC Solutions,HomeAddress=Two Blocks Past Oxen Team,BirthDay=,[email protected],RecordKey=2,DisplayName=Mark Colbath,DefaultEmail=,DefaultAddress=,BirthYear=,Category=,PagerNumberType=,[email protected],JobTitle=Programmer,HomeZipCode=NA, NickName=,LastModifiedDate=0,FaxNumberType=,BirthMonth=,LastName=,HomePhone=,WorkCountry=,HomePhoneType=,PreferMailFormat=0,CellularNumber=,FamilyName=,[email protected],AnniversaryMonth=,HomeCity=,WorkState=,HomeCountry=,PhoneticFirstName=,PhoneticLastName=,HomeState=,WorkAddress=,WebPage1=,WebPage2=,HomeAddress2=,WorkZipCode=,_AimScreenName=,AnniversaryYear=,WorkPhoneType=,Notes=,WorkAddress2=,WorkPhone=,Custom3=,Custom4=,Custom1=,Custom2=,PagerNumber=,AnniversaryDay=,WorkCity=,AllowRemoteContent=0,CellularNumberType=,FaxNumber=,PopularityIndex=0,FirstName=,SpouseName=,CardType=,Department=,Company=,HomeAddress=,BirthDay=,SecondEmail=,RecordKey=3,DisplayName=,DefaultEmail=,DefaultAddress=,BirthYear=,Category=,PagerNumberType=,[email protected],JobTitle=,HomeZipCode=, I have been breaking my head for almost 2 days now, please someone who is part of the mozilla team can help, it would be really appreciated.

    Read the article

  • dotnetopenid attribute extensions just not working for me!

    - by Rob Ellis
    So here's some code on the request:- IAuthenticationRequest req = openid.CreateRequest(Request.Form["openid_identifier"]); //add extention requests here req.AddExtension(new ClaimsRequest { Email = DemandLevel.Request, BirthDate = DemandLevel.Request, Country = DemandLevel.Request, FullName = DemandLevel.Request, Gender = DemandLevel.Request, Language = DemandLevel.Request, Nickname = DemandLevel.Request, PostalCode = DemandLevel.Request, TimeZone = DemandLevel.Request } ); //get the request from openid return req.RedirectingResponse.AsActionResult(); And here's some on the pickup:- //get attributes from site var sreg = response.GetExtension<ClaimsResponse>(); string sreg_email = "Unknown Email"; DateTime sreg_birthdate; string sreg_birthdateraw; Gender sreg_gender; Version sreg_version; string sreg_timezone; string sreg_nickname; string sreg_postalcode; System.Globalization.CultureInfo sreg_culture; string sreg_country; string sreg_fullname; System.Net.Mail.MailAddress sreg_mailaddress; string sreg_language; if (sreg != null) { sreg_email = sreg.Email; sreg_birthdate = sreg.BirthDate.Value; sreg_birthdateraw = sreg.BirthDateRaw; sreg_country = sreg.Country; sreg_culture = sreg.Culture; sreg_fullname = sreg.FullName; sreg_gender = sreg.Gender.Value; sreg_language = sreg.Language; sreg_mailaddress = sreg.MailAddress; sreg_nickname = sreg.Nickname; sreg_postalcode = sreg.PostalCode; sreg_timezone = sreg.TimeZone; sreg_version = sreg.Version; } But it's all coming back as null no matter which OpenId provider I use... Am I missing something obvious? Rob

    Read the article

  • PHP cURL JSON Decode (X-AUTH Header)

    - by TheCyX
    <?php // Show Profile $curl = curl_init(); curl_setopt ($curl, CURLOPT_URL, "https://example/api"); curl_setopt ($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt ($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC ) ; curl_setopt ($curl, CURLOPT_HTTPHEADER, array('X-AUTH: 123456789')); $projects = curl_exec($curl); // This is empty? echo $projects; //Decode $phpArray = json_decode($projects); print_r($phpArray); foreach ($phpArray as $key => $value) { // Line 17, sure its empty, but why? echo "<p>$key | $value</p>"; } ?> Warning: Invalid argument supplied for foreach() in /html/api.php on line 17 The API needs this authentification: $ curl -i -H "X-AUTH: 123456789" https://example/api JSON File: {"id":"123456","hostId":null,"Nickname":"thecyx","DisplayName":"thecyx","AppDisplayName":"thecyx","Score":"300","Account":"Full"} The $project variable is empty. If I'm posting the API Url in the Broswer its working. And, if possible, what's the correct way to get the JSON Data e.g. [Nickname],[Score]?

    Read the article

  • Symfony fk issue on insertion

    - by Daniel Hertz
    Hi, I posted a similar problem but it could not be resolved. I create a relational database of users and groups but for some reason I cannot insert test data with fixtures properly. Here is a sample of the schema: User: actAs: { Timestampable: ~ } columns: name: { type: string(255), notnull: true } email: { type: string(255), notnull: true, unique: true } nickname: { type: string(255), unique: true } password: { type: string(300), notnull: true } image: { type: string(255) } Group: actAs: { Timestampable: ~ } columns: name: { type: string(500), notnull: true } image: { type: string(255) } type: { type: string(255), notnull: true } created_by_id: { type: integer } relations: User: { onDelete: SET NULL, class: User, local: created_by_id, foreign: id, foreignAlias: groups_created } FanOf: actAs: { Timestampable: ~ } columns: user_id: { type: integer, primary: true } group_id: { type: integer, primary: true } relations: User: { onDelete: CASCADE, local: user_id, foreign: id, foreignAlias: fanhood } Group: { onDelete: CASCADE, local: group_id, foreign: id, foreignAlias: fanhood } And this is the data i try to input: User: user1: name: Danny email: [email protected] nickname: danny password: f05050400c5e586fa6629ef497be Group: group1: name: Mets type: sports FanOf: fans1: user_id: user1 group_id: group1 I keep getting this error: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`krowdd`.`fan_of`, CONSTRAINT `fan_of_user_id_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE) The users and groups are clearly being created before the "fanhood" is so why am I getting this error?? Thanks!

    Read the article

  • Creating form using Generic_inlineformset_factory from the Model Form

    - by Prateek
    hello dear all, I wanted to create a edit form with the help of ModelForm. and my models contain a Generic relation b/w classes, so if any one could suggest me the view and a bit of template for the purpose I would be very thankful, as I am new to the language. My models look like:- class Employee(Person): nickname = models.CharField(_('nickname'), max_length=25, null=True, blank=True) blood_type = models.CharField(_('blood group'), max_length=3, null=True, blank=True, choices=BLOOD_TYPE_CHOICES) marital_status = models.CharField(_('marital status'), max_length=1, null=True, blank=True, choices=MARITAL_STATUS_CHOICES) nationality = CountryField(_('nationality'), default='IN', null=True, blank=True) about = models.TextField(_('about'), blank=True, null=True) dependent = models.ManyToManyField(Dependent, through='DependentRelationship') pan_card_number = models.CharField(_('PAN card number'), max_length=50, blank=True, null=True) policy_number = models.CharField(_('policy number'), max_length=50, null=True, blank=True) # code specific details user = models.OneToOneField(User, blank=True, null=True, verbose_name=_('user')) class Person(models.Model): """Person model""" title = models.CharField(_('title'), max_length=20, null=True, blank=True) first_name = models.CharField(_('first name'), max_length=100) middle_name = models.CharField(_('middle name'), max_length=100, null=True, blank=True) last_name = models.CharField(_('last name'), max_length=100, null=True, blank=True) suffix = models.CharField(_('suffix'), max_length=20, null=True, blank=True) slug = models.SlugField(_('slug'), max_length=50, unique=True) class PhoneNumber(models.Model) : phone_number = generic.GenericRelation('PhoneNumber') email_address = generic.GenericRelation('EmailAddress') address = generic.GenericRelation('Address') date_of_birth = models.DateField(_('date of birth'), null=True, blank=True) gender = models.CharField(_('gender'), max_length=1, null=True, blank=True, choices=GENDER_CHOICES) content_type = models.ForeignKey(ContentType, If anyone could suggest me a link or so. it would be a great help........

    Read the article

  • git doesn't show where code was removed.

    - by Andrew Myers
    So I was tasked at replacing some dummy code that our project requires for historical compatibility reasons but has mysteriously dropped out sometime since the last release. Since disappearing code makes me nervous about what else might have gone missing but un-noticed I've been digging through the logs trying to find in what commit this handful of lines was removed. I've tried a number of things including "git log -S'add-visit-resource-pcf'", git blame, and even git bisect with a script that simply checks for the existence of the line but have been unable to pinpoint exactly where these lines were removed. I find this very perplexing, particularly since the last log entry (obtained by the above command) before my re-introduction of this code was someone else adding the code as well. commit 0b0556fa87ff80d0ffcc2b451cca1581289bbc3c Author: Andrew Date: Thu May 13 10:55:32 2010 -0400 Re-introduced add-visit-resource-pcf, see PR-65034. diff --git a/spike/hst/scheduler/defpackage.lisp b/spike/hst/scheduler/defpackage.lisp index f8e692d..a6f8d38 100644 --- a/spike/hst/scheduler/defpackage.lisp +++ b/spike/hst/scheduler/defpackage.lisp @@ -115,6 +115,7 @@ #:add-to-current-resource-pcf #:add-user-package-nickname #:add-value-criteria + #:add-visit-resource-pcf #:add-window-to-gs-params #:adjust-derived-resources #:adjust-links-candidate-criteria-types commit 9fb10e25572c537076284a248be1fbf757c1a6e1 Author: Bob Date: Sun Jan 17 18:35:16 2010 -0500 update-defpackage for Spike 33.1 Delivery diff --git a/spike/hst/scheduler/defpackage.lisp b/spike/hst/scheduler/defpackage.lisp index 983666d..47f1a9a 100644 --- a/spike/hst/scheduler/defpackage.lisp +++ b/spike/hst/scheduler/defpackage.lisp @@ -118,6 +118,7 @@ #:add-user-package-nickname #:add-value-criteria #:add-vars-from-proposal + #:add-visit-resource-pcf #:add-window-to-gs-params #:adjust-derived-resources #:adjust-links-candidate-criteria-types This is for one of our package definition files, but the relevant source file reflects something similar. Does anyone know what could be going on here and how I could find the information I want? It's not really that important but this kind of things makes me a bit nervous.

    Read the article

  • Help on MySQL table indexing when GROUP BY is used in a query

    - by Silver Light
    Thank you for your attention. There are two INNODB tables: Table authors id INT nickname VARCHAR(50) status ENUM('active', 'blocked') about TEXT Table books author_id INT title VARCHAR(150) I'm running a query against these tables, to get each author and a count of books he has: SELECT a. * , COUNT( b.id ) AS book_count FROM authors AS a, books AS b WHERE a.status != 'blocked' AND b.author_id = a.id GROUP BY a.id ORDER BY a.nickname This query is very slow (takes about 6 seconds to execute). I have an index on books.author_id and it works perfectly, but I do not know how to create an index on authors table, so that this query could use it. Here is how current EXPLAIN looks: id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE a ALL PRIMARY,id_status_nickname NULL NULL NULL 3305 Using where; Using temporary; Using filesort 1 SIMPLE b ref key_author_id key_author_id 5 a.id 2 Using where; Using index I've looked at MySQL manual on optimizing queries with group by, but could not figure out how I can apply it on my query. I'll appreciate any help and hints on this - what must be the index structure, so that MySQL could use it?

    Read the article

  • Wicket testing - AnnotApplicationContextMock - There is no application attached to current thread ma

    - by John
    I've written a couple of tests for a small web app, but I get an error when I try to run the page specific tests that makes use of WicketTester. Google sends me to a mailing list for Apache Wicket, where a user experienced the same exception. He/she said the problem was that AnnotApplicationContextMock was initialized before the Wicket Application. I've pasted my WicketApplication class as well. Has any of you dealt with this error before? I've pasted the exception and the class below. Exception: ------------------------------------------------------------------------------- Test set: com.upbeat.shoutbox.web.TestViewShoutsPage ------------------------------------------------------------------------------- Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.545 sec (AnnotApplicationContextMock.java:61) at com.upbeat.shoutbox.web.TestViewShoutsPage.setUp(TestViewShoutsPage.java:30) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.internal.runners.MethodRoadie.runBefores(MethodRoadie.java:129) at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:93) at org.unitils.UnitilsJUnit4TestClassRunner$CustomMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:168) at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:84) at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49) at org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:127) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:59) at org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:42) at org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:87) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44) at org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:94) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) My page specific test class: package com.upbeat.shoutbox.web; import org.apache.wicket.application.IComponentInstantiationListener; import org.apache.wicket.protocol.http.WebApplication; import org.apache.wicket.spring.injection.annot.SpringComponentInjector; import org.apache.wicket.spring.injection.annot.test.AnnotApplicationContextMock; import org.apache.wicket.util.tester.FormTester; import org.apache.wicket.util.tester.WicketTester; import org.junit.Before; import org.junit.Test; import org.unitils.spring.annotation.SpringBeanByType; import com.upbeat.shoutbox.WicketApplication; import com.upbeat.shoutbox.integrations.AbstractIntegrationTest; import com.upbeat.shoutbox.persistence.ShoutItemDao; import com.upbeat.shoutbox.services.ShoutService; import com.upbeat.shoutbox.web.pages.ViewShoutsPage; public class TestViewShoutsPage extends AbstractIntegrationTest { @SpringBeanByType private ShoutService svc; @SpringBeanByType private ShoutItemDao dao; protected WicketTester tester; @Before public void setUp() { final AnnotApplicationContextMock appctx = new AnnotApplicationContextMock(); appctx.putBean("ShoutItemDao", dao); appctx.putBean("ShoutService", svc); tester = new WicketTester(new WicketApplication() { @Override protected IComponentInstantiationListener getSpringComponentInjector(WebApplication app) { return new SpringComponentInjector(app, appctx, false); } }); } @Test public void testRenderPage() { tester.startPage(ViewShoutsPage.class); tester.assertRenderedPage(ViewShoutsPage.class); FormTester ft = tester.newFormTester("addShoutForm"); ft.setValue("nickname", "test-nickname"); ft.setValue("content", "a whole lot of content"); ft.submit(); tester.assertRenderedPage(ViewShoutsPage.class); tester.assertContains("test-nickname"); tester.assertContains("a whole lot of content"); } } AbstractIntegrationTest: package com.upbeat.shoutbox.integrations; import org.springframework.context.ApplicationContext; import org.unitils.UnitilsJUnit4; import org.unitils.spring.annotation.SpringApplicationContext; @SpringApplicationContext({"/com/upbeat/shoutbox/spring/applicationContext.xml", "applicationContext-test.xml"}) public abstract class AbstractIntegrationTest extends UnitilsJUnit4 { private ApplicationContext applicationContext; } WicketApplication: package com.upbeat.shoutbox; import org.apache.wicket.application.IComponentInstantiationListener; import org.apache.wicket.protocol.http.WebApplication; import org.apache.wicket.request.target.coding.IndexedParamUrlCodingStrategy; import org.apache.wicket.spring.injection.annot.SpringComponentInjector; import com.upbeat.shoutbox.web.pages.ParamPage; import com.upbeat.shoutbox.web.pages.VeryNiceExceptionPage; /** * Application object for your web application. If you want to run this application without deploying, run the Start class. * * @see com.upbeat.shoutbox.Start#main(String[]) */ public class WicketApplication extends WebApplication { /** * Constructor */ public WicketApplication() { } /** * @see org.apache.wicket.Application#getHomePage() */ public Class getHomePage() { return HomePage.class; } @Override protected void init() { super.init(); // Enable wicket ajax debug getDebugSettings().setAjaxDebugModeEnabled(true); addComponentInstantiationListener(getSpringComponentInjector(this)); // Mount pages mountBookmarkablePage("/home", HomePage.class); mountBookmarkablePage("/exceptionPage", VeryNiceExceptionPage.class); mount(new IndexedParamUrlCodingStrategy("/view_params", ParamPage.class)); } protected IComponentInstantiationListener getSpringComponentInjector(WebApplication app) { return new SpringComponentInjector(app); } }

    Read the article

  • Creating a dynamic, extensible C# Expando Object

    - by Rick Strahl
    I love dynamic functionality in a strongly typed language because it offers us the best of both worlds. In C# (or any of the main .NET languages) we now have the dynamic type that provides a host of dynamic features for the static C# language. One place where I've found dynamic to be incredibly useful is in building extensible types or types that expose traditionally non-object data (like dictionaries) in easier to use and more readable syntax. I wrote about a couple of these for accessing old school ADO.NET DataRows and DataReaders more easily for example. These classes are dynamic wrappers that provide easier syntax and auto-type conversions which greatly simplifies code clutter and increases clarity in existing code. ExpandoObject in .NET 4.0 Another great use case for dynamic objects is the ability to create extensible objects - objects that start out with a set of static members and then can add additional properties and even methods dynamically. The .NET 4.0 framework actually includes an ExpandoObject class which provides a very dynamic object that allows you to add properties and methods on the fly and then access them again. For example with ExpandoObject you can do stuff like this:dynamic expand = new ExpandoObject(); expand.Name = "Rick"; expand.HelloWorld = (Func<string, string>) ((string name) => { return "Hello " + name; }); Console.WriteLine(expand.Name); Console.WriteLine(expand.HelloWorld("Dufus")); Internally ExpandoObject uses a Dictionary like structure and interface to store properties and methods and then allows you to add and access properties and methods easily. As cool as ExpandoObject is it has a few shortcomings too: It's a sealed type so you can't use it as a base class It only works off 'properties' in the internal Dictionary - you can't expose existing type data It doesn't serialize to XML or with DataContractSerializer/DataContractJsonSerializer Expando - A truly extensible Object ExpandoObject is nice if you just need a dynamic container for a dictionary like structure. However, if you want to build an extensible object that starts out with a set of strongly typed properties and then allows you to extend it, ExpandoObject does not work because it's a sealed class that can't be inherited. I started thinking about this very scenario for one of my applications I'm building for a customer. In this system we are connecting to various different user stores. Each user store has the same basic requirements for username, password, name etc. But then each store also has a number of extended properties that is available to each application. In the real world scenario the data is loaded from the database in a data reader and the known properties are assigned from the known fields in the database. All unknown fields are then 'added' to the expando object dynamically. In the past I've done this very thing with a separate property - Properties - just like I do for this class. But the property and dictionary syntax is not ideal and tedious to work with. I started thinking about how to represent these extra property structures. One way certainly would be to add a Dictionary, or an ExpandoObject to hold all those extra properties. But wouldn't it be nice if the application could actually extend an existing object that looks something like this as you can with the Expando object:public class User : Westwind.Utilities.Dynamic.Expando { public string Email { get; set; } public string Password { get; set; } public string Name { get; set; } public bool Active { get; set; } public DateTime? ExpiresOn { get; set; } } and then simply start extending the properties of this object dynamically? Using the Expando object I describe later you can now do the following:[TestMethod] public void UserExampleTest() { var user = new User(); // Set strongly typed properties user.Email = "[email protected]"; user.Password = "nonya123"; user.Name = "Rickochet"; user.Active = true; // Now add dynamic properties dynamic duser = user; duser.Entered = DateTime.Now; duser.Accesses = 1; // you can also add dynamic props via indexer user["NickName"] = "AntiSocialX"; duser["WebSite"] = "http://www.west-wind.com/weblog"; // Access strong type through dynamic ref Assert.AreEqual(user.Name,duser.Name); // Access strong type through indexer Assert.AreEqual(user.Password,user["Password"]); // access dyanmically added value through indexer Assert.AreEqual(duser.Entered,user["Entered"]); // access index added value through dynamic Assert.AreEqual(user["NickName"],duser.NickName); // loop through all properties dynamic AND strong type properties (true) foreach (var prop in user.GetProperties(true)) { object val = prop.Value; if (val == null) val = "null"; Console.WriteLine(prop.Key + ": " + val.ToString()); } } As you can see this code somewhat blurs the line between a static and dynamic type. You start with a strongly typed object that has a fixed set of properties. You can then cast the object to dynamic (as I discussed in my last post) and add additional properties to the object. You can also use an indexer to add dynamic properties to the object. To access the strongly typed properties you can use either the strongly typed instance, the indexer or the dynamic cast of the object. Personally I think it's kinda cool to have an easy way to access strongly typed properties by string which can make some data scenarios much easier. To access the 'dynamically added' properties you can use either the indexer on the strongly typed object, or property syntax on the dynamic cast. Using the dynamic type allows all three modes to work on both strongly typed and dynamic properties. Finally you can iterate over all properties, both dynamic and strongly typed if you chose. Lots of flexibility. Note also that by default the Expando object works against the (this) instance meaning it extends the current object. You can also pass in a separate instance to the constructor in which case that object will be used to iterate over to find properties rather than this. Using this approach provides some really interesting functionality when use the dynamic type. To use this we have to add an explicit constructor to the Expando subclass:public class User : Westwind.Utilities.Dynamic.Expando { public string Email { get; set; } public string Password { get; set; } public string Name { get; set; } public bool Active { get; set; } public DateTime? ExpiresOn { get; set; } public User() : base() { } // only required if you want to mix in seperate instance public User(object instance) : base(instance) { } } to allow the instance to be passed. When you do you can now do:[TestMethod] public void ExpandoMixinTest() { // have Expando work on Addresses var user = new User( new Address() ); // cast to dynamicAccessToPropertyTest dynamic duser = user; // Set strongly typed properties duser.Email = "[email protected]"; user.Password = "nonya123"; // Set properties on address object duser.Address = "32 Kaiea"; //duser.Phone = "808-123-2131"; // set dynamic properties duser.NonExistantProperty = "This works too"; // shows default value Address.Phone value Console.WriteLine(duser.Phone); } Using the dynamic cast in this case allows you to access *three* different 'objects': The strong type properties, the dynamically added properties in the dictionary and the properties of the instance passed in! Effectively this gives you a way to simulate multiple inheritance (which is scary - so be very careful with this, but you can do it). How Expando works Behind the scenes Expando is a DynamicObject subclass as I discussed in my last post. By implementing a few of DynamicObject's methods you can basically create a type that can trap 'property missing' and 'method missing' operations. When you access a non-existant property a known method is fired that our code can intercept and provide a value for. Internally Expando uses a custom dictionary implementation to hold the dynamic properties you might add to your expandable object. Let's look at code first. The code for the Expando type is straight forward and given what it provides relatively short. Here it is.using System; using System.Collections.Generic; using System.Linq; using System.Dynamic; using System.Reflection; namespace Westwind.Utilities.Dynamic { /// <summary> /// Class that provides extensible properties and methods. This /// dynamic object stores 'extra' properties in a dictionary or /// checks the actual properties of the instance. /// /// This means you can subclass this expando and retrieve either /// native properties or properties from values in the dictionary. /// /// This type allows you three ways to access its properties: /// /// Directly: any explicitly declared properties are accessible /// Dynamic: dynamic cast allows access to dictionary and native properties/methods /// Dictionary: Any of the extended properties are accessible via IDictionary interface /// </summary> [Serializable] public class Expando : DynamicObject, IDynamicMetaObjectProvider { /// <summary> /// Instance of object passed in /// </summary> object Instance; /// <summary> /// Cached type of the instance /// </summary> Type InstanceType; PropertyInfo[] InstancePropertyInfo { get { if (_InstancePropertyInfo == null && Instance != null) _InstancePropertyInfo = Instance.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly); return _InstancePropertyInfo; } } PropertyInfo[] _InstancePropertyInfo; /// <summary> /// String Dictionary that contains the extra dynamic values /// stored on this object/instance /// </summary> /// <remarks>Using PropertyBag to support XML Serialization of the dictionary</remarks> public PropertyBag Properties = new PropertyBag(); //public Dictionary<string,object> Properties = new Dictionary<string, object>(); /// <summary> /// This constructor just works off the internal dictionary and any /// public properties of this object. /// /// Note you can subclass Expando. /// </summary> public Expando() { Initialize(this); } /// <summary> /// Allows passing in an existing instance variable to 'extend'. /// </summary> /// <remarks> /// You can pass in null here if you don't want to /// check native properties and only check the Dictionary! /// </remarks> /// <param name="instance"></param> public Expando(object instance) { Initialize(instance); } protected virtual void Initialize(object instance) { Instance = instance; if (instance != null) InstanceType = instance.GetType(); } /// <summary> /// Try to retrieve a member by name first from instance properties /// followed by the collection entries. /// </summary> /// <param name="binder"></param> /// <param name="result"></param> /// <returns></returns> public override bool TryGetMember(GetMemberBinder binder, out object result) { result = null; // first check the Properties collection for member if (Properties.Keys.Contains(binder.Name)) { result = Properties[binder.Name]; return true; } // Next check for Public properties via Reflection if (Instance != null) { try { return GetProperty(Instance, binder.Name, out result); } catch { } } // failed to retrieve a property result = null; return false; } /// <summary> /// Property setter implementation tries to retrieve value from instance /// first then into this object /// </summary> /// <param name="binder"></param> /// <param name="value"></param> /// <returns></returns> public override bool TrySetMember(SetMemberBinder binder, object value) { // first check to see if there's a native property to set if (Instance != null) { try { bool result = SetProperty(Instance, binder.Name, value); if (result) return true; } catch { } } // no match - set or add to dictionary Properties[binder.Name] = value; return true; } /// <summary> /// Dynamic invocation method. Currently allows only for Reflection based /// operation (no ability to add methods dynamically). /// </summary> /// <param name="binder"></param> /// <param name="args"></param> /// <param name="result"></param> /// <returns></returns> public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result) { if (Instance != null) { try { // check instance passed in for methods to invoke if (InvokeMethod(Instance, binder.Name, args, out result)) return true; } catch { } } result = null; return false; } /// <summary> /// Reflection Helper method to retrieve a property /// </summary> /// <param name="instance"></param> /// <param name="name"></param> /// <param name="result"></param> /// <returns></returns> protected bool GetProperty(object instance, string name, out object result) { if (instance == null) instance = this; var miArray = InstanceType.GetMember(name, BindingFlags.Public | BindingFlags.GetProperty | BindingFlags.Instance); if (miArray != null && miArray.Length > 0) { var mi = miArray[0]; if (mi.MemberType == MemberTypes.Property) { result = ((PropertyInfo)mi).GetValue(instance,null); return true; } } result = null; return false; } /// <summary> /// Reflection helper method to set a property value /// </summary> /// <param name="instance"></param> /// <param name="name"></param> /// <param name="value"></param> /// <returns></returns> protected bool SetProperty(object instance, string name, object value) { if (instance == null) instance = this; var miArray = InstanceType.GetMember(name, BindingFlags.Public | BindingFlags.SetProperty | BindingFlags.Instance); if (miArray != null && miArray.Length > 0) { var mi = miArray[0]; if (mi.MemberType == MemberTypes.Property) { ((PropertyInfo)mi).SetValue(Instance, value, null); return true; } } return false; } /// <summary> /// Reflection helper method to invoke a method /// </summary> /// <param name="instance"></param> /// <param name="name"></param> /// <param name="args"></param> /// <param name="result"></param> /// <returns></returns> protected bool InvokeMethod(object instance, string name, object[] args, out object result) { if (instance == null) instance = this; // Look at the instanceType var miArray = InstanceType.GetMember(name, BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Instance); if (miArray != null && miArray.Length > 0) { var mi = miArray[0] as MethodInfo; result = mi.Invoke(Instance, args); return true; } result = null; return false; } /// <summary> /// Convenience method that provides a string Indexer /// to the Properties collection AND the strongly typed /// properties of the object by name. /// /// // dynamic /// exp["Address"] = "112 nowhere lane"; /// // strong /// var name = exp["StronglyTypedProperty"] as string; /// </summary> /// <remarks> /// The getter checks the Properties dictionary first /// then looks in PropertyInfo for properties. /// The setter checks the instance properties before /// checking the Properties dictionary. /// </remarks> /// <param name="key"></param> /// /// <returns></returns> public object this[string key] { get { try { // try to get from properties collection first return Properties[key]; } catch (KeyNotFoundException ex) { // try reflection on instanceType object result = null; if (GetProperty(Instance, key, out result)) return result; // nope doesn't exist throw; } } set { if (Properties.ContainsKey(key)) { Properties[key] = value; return; } // check instance for existance of type first var miArray = InstanceType.GetMember(key, BindingFlags.Public | BindingFlags.GetProperty); if (miArray != null && miArray.Length > 0) SetProperty(Instance, key, value); else Properties[key] = value; } } /// <summary> /// Returns and the properties of /// </summary> /// <param name="includeProperties"></param> /// <returns></returns> public IEnumerable<KeyValuePair<string,object>> GetProperties(bool includeInstanceProperties = false) { if (includeInstanceProperties && Instance != null) { foreach (var prop in this.InstancePropertyInfo) yield return new KeyValuePair<string, object>(prop.Name, prop.GetValue(Instance, null)); } foreach (var key in this.Properties.Keys) yield return new KeyValuePair<string, object>(key, this.Properties[key]); } /// <summary> /// Checks whether a property exists in the Property collection /// or as a property on the instance /// </summary> /// <param name="item"></param> /// <returns></returns> public bool Contains(KeyValuePair<string, object> item, bool includeInstanceProperties = false) { bool res = Properties.ContainsKey(item.Key); if (res) return true; if (includeInstanceProperties && Instance != null) { foreach (var prop in this.InstancePropertyInfo) { if (prop.Name == item.Key) return true; } } return false; } } } Although the Expando class supports an indexer, it doesn't actually implement IDictionary or even IEnumerable. It only provides the indexer and Contains() and GetProperties() methods, that work against the Properties dictionary AND the internal instance. The reason for not implementing IDictionary is that a) it doesn't add much value since you can access the Properties dictionary directly and that b) I wanted to keep the interface to class very lean so that it can serve as an entity type if desired. Implementing these IDictionary (or even IEnumerable) causes LINQ extension methods to pop up on the type which obscures the property interface and would only confuse the purpose of the type. IDictionary and IEnumerable are also problematic for XML and JSON Serialization - the XML Serializer doesn't serialize IDictionary<string,object>, nor does the DataContractSerializer. The JavaScriptSerializer does serialize, but it treats the entire object like a dictionary and doesn't serialize the strongly typed properties of the type, only the dictionary values which is also not desirable. Hence the decision to stick with only implementing the indexer to support the user["CustomProperty"] functionality and leaving iteration functions to the publicly exposed Properties dictionary. Note that the Dictionary used here is a custom PropertyBag class I created to allow for serialization to work. One important aspect for my apps is that whatever custom properties get added they have to be accessible to AJAX clients since the particular app I'm working on is a SIngle Page Web app where most of the Web access is through JSON AJAX calls. PropertyBag can serialize to XML and one way serialize to JSON using the JavaScript serializer (not the DCS serializers though). The key components that make Expando work in this code are the Properties Dictionary and the TryGetMember() and TrySetMember() methods. The Properties collection is public so if you choose you can explicitly access the collection to get better performance or to manipulate the members in internal code (like loading up dynamic values form a database). Notice that TryGetMember() and TrySetMember() both work against the dictionary AND the internal instance to retrieve and set properties. This means that user["Name"] works against native properties of the object as does user["Name"] = "RogaDugDog". What's your Use Case? This is still an early prototype but I've plugged it into one of my customer's applications and so far it's working very well. The key features for me were the ability to easily extend the type with values coming from a database and exposing those values in a nice and easy to use manner. I'm also finding that using this type of object for ViewModels works very well to add custom properties to view models. I suspect there will be lots of uses for this - I've been using the extra dictionary approach to extensibility for years - using a dynamic type to make the syntax cleaner is just a bonus here. What can you think of to use this for? Resources Source Code and Tests (GitHub) Also integrated in Westwind.Utilities of the West Wind Web Toolkit West Wind Utilities NuGet© Rick Strahl, West Wind Technologies, 2005-2012Posted in CSharp  .NET  Dynamic Types   Tweet !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })();

    Read the article

  • What are the warning signs of impending doom to watch out for on a project?

    - by ConroyP
    Having worked on a failed project is one of the few things that most programmers have in common, regardless of language used, industry or experience. These projects can be great learning experiences, soul-crushing disasters (or both!), and can occur for a multitude of reasons: upper management change of heart under-skilled / under-resourced team emergence of superior competitor during dev cycle over/under management Once you've worked on a couple of such projects, is it possible to recognise at an early stage exactly when a project is doomed to fail? For me, a big sign is having a hard & fast external deadline combined with feature creep. I've seen projects which were well planned out and proceeding right on schedule go horribly off the rails once the late feature requests started to roll in and get added to the final "deliverable". The proposers of these requests earned the nickname of Columbo, due to rarely leaving the room without asking for "just one more thing". What are the warning signs you look out for that set off the alarm bells of impending doom in your head?

    Read the article

  • How do I join a channel on Freenode with Empathy?

    - by sadmicrowave
    I have empathy already installed but am not sure how to configure it to join the channel at http://www.ape-project.org. I do not have a password or login name yet to properly configure the channel with Empathy and when I click "Join our IRC Channel" firefox comes back with an error stating: Firefox doesn't know how to open this address, because the protocol (irc) isn't associated with any program. What can I do to join this (freenode) channel? UPDATE 1 Using Empathy Version 2.23.1 When viewing accounts click "Add..." Protocol: "IRC" Network: "freenode" create new nickname, password, and real name. Then went back to ape-project.org link and click "Join our IRC Channel" again. It brings my Empathy contact list to the foreground but nothing happens...

    Read the article

  • Ubuntu doesn't start and I can't login

    - by Meph00
    My ubuntu 13.04 doesn't boot anymore. Eternal black screen. If I press ALT+CTRL+F1 I see that it's stucked on "Checking battery state [OK]." I'd like to try to go with sudo apt-get install gdm but I can't login on terminal tty2, tty3 etc. They correctly ask for my nickname, then they make me wait a lot, ask for password and make me wait again. After a lot of time (... a lot) the best I could achieve was visualizing "Documentantion https://help.ubuntu.com". I can never reach the point where I can give commands. Plus, during the long pauses, every 2 minutes it gives a messagge like this: INFO: task XXX blocked for more than 120 seconds. Any suggestion? Sorry for my bad english and thanks everyone for the attention.

    Read the article

  • iCalendar ATTENDEE

    - by Mick
    Hi is it possible to specify a 'nickname' as the ATTENDEE in Vcalendar . so that instead of the email address appearing in the email 'required' field it would display a more friendly name ? thanks for any help Mick

    Read the article

  • JPQL (JPA) search substring

    - by JavaBeginner
    Hi, Im facing simple problem with searching entities by some (sub)string, which they might contain. E.g. I have users user1, usr2, useeeer3, user4 and I will enter to search window "use" and I expect to return user1, useeer3, user4. Im sure you know what I mean now. Is there any construction in JPA (JQPL)? It would be nice to search using WHERE somehow in named queries. Something like "SELECT u FROM User u WHERE u.nickname contains :substring"

    Read the article

  • what is the purpose of this mysql query ?

    - by Harbhag
    SELECT id, CONCAT(lastname,', ',firstname) AS fullname, lastname, firstname FROM " . TABLE_CONTACT . " WHERE CONCAT(firstname,' ', lastname) LIKE '%$goTo%' OR CONCAT(firstname,' ', middlename,' ', lastname) LIKE '%$goTo%' OR nickname LIKE '%$goTo%' ORDER BY fullname"; Can anyone please tell me what is purpose of above query ? I am new to mysql so unable to understand it. Thanks

    Read the article

  • VB.net Simple IRC Client

    - by xzerox
    How would I go about making a simple IRC client with these things What I am using: Nickname TextBox Connect Button Message TextBox Send Message Button Refresh Button ListBox Restrictions: No commands at all just being able to send messages I am using a listbox for recieving messages

    Read the article

  • Flex, HBox: how to horizontally center all children ?

    - by Patrick
    hi, I cannot center the components in my VBox. I would like to set the standard css element "align: center". How can I do that in Flex ? <mx:VBox> <mx:LinkButton label="Tag1" /> <mx:Image source="@Embed(source='../icons/userIcon.png')" /> <mx:Label id="username" text="Nickname" visible="false" fontWeight="bold" /> </mx:VBox> thanks

    Read the article

  • Delphi & Access

    - by rebel_UA
    Hi all! Please, write small Delphi-program which working woth DB Access For example, in Access will create customer-base(nickname & password), but in Delphi simple autorization form. Thanks

    Read the article

  • select top 5 in entity framework

    - by fishiefishie
    I have [Person] PersonID, EmailAddress, FirstName, LastName [OnlineAccount] OnlineAccountID, PersonID, Nickname Each person is allowed to have 0-* OnlineAccount. In entity framework with C#, how do I select the top 5 Person that has the most accounts?

    Read the article

  • How to use "gContact namespace" in new version (c#) ?

    - by Jene
    Hi, I am trying to use " gContact:billingInformation" and "gContact:nickname" . But i am not getting "gContact" in c#. I am using : (Google.GData.Contacts.dll : File version 1.4.0.2) using Google.GData.Contacts; using Google.GData.Client; using Google.GData.Extensions; using Google.Contacts; How can use above features in my code? plz help Regards, Jene

    Read the article

  • how to get all 'username' from my model 'MyUser' on google-app-engine ..

    - by zjm1126
    my model is : class MyUser(db.Model): user = db.UserProperty() password = db.StringProperty(default=UNUSABLE_PASSWORD) email = db.StringProperty() nickname = db.StringProperty(indexed=False) and my method which want to get all username is : s=[] a=MyUser.all().fetch(10000) for i in a: s.append(i.username) and the error is : AttributeError: 'MyUser' object has no attribute 'username' so how can i get all 'username', which is the simplest way . thanks

    Read the article

  • Determine which active directory object is referred to by GUID in a Directory Synchronization Error Report

    - by Michael Shimmins
    We have active directory syncronization setup between our on-premises AD server and Microsoft hosted Exchange (business productivity online services). I've started getting a daily error report, which details an error for a specific AD user, however it references it by GUID. I can't find any info on how to translate that object guid into something meaningful so I can find and fix the problem. The error is reported as: Error 005: Unable to set the alias for this object in Microsoft Online Services because either the primary SMTP address, the e-mail nickname, or the SAM account name in the local Active Directory contains an invalid character. in reference to the Object GUID: CN={8443cbb4-5199-49f0-9529-ce965430dca6} How can I translate that object guid into a friendly object name?

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >