Search Results

Search found 131 results on 6 pages for 'chase florell'.

Page 6/6 | < Previous Page | 2 3 4 5 6 

  • Sell good Dumps, track 1&2, CVV, Paypal, WU TRANSFER Service

    - by gOOD dUMPS cvv
    my products for sale: Sell CVV; Dumps, track1&2; Bank logins; Paypal Accounts;Ebay Accounts Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Cards, ATM Card; MSR, ATM SKIMMERS. Do WU Transfers and Bank Transfers I am here to sell, supply good and quality CVV for shipping;booking airline ticket;shopping online;ordering Laptop,Iphone;... In last 5 years my Job Is This. PRESTIGE is my first motto. Not easy to build the good PRESTIGE. My motto is Always make customers satisfied & happy ! I have unlocked many softwares make good money, example: -Software to make the bug and crack MTCN of the Western Union. Version : 2.0.1.1 ( new update ) -Software to open balance in PayPal and Bank Login -Software hacking credit card, debit card Version 1.0 **I only sell it for my good customers, and my familiarity ***I update more than 200 CC + CVV everyday. Fresh + good valid + Strong,private + high balance with best price Our products are checked by a partner who works in a bank. Our products are better than 5-7 days after they are dead. They are raised mainly for money atm. Can be used in most countries. ** If you are a serious buyer, let contact via : Yahoo ID: goodcvv_dumps Mail: [email protected] ICQ: 667686221 * Sell CVV; Dumps,track1&2; Bank logins; Paypal Accounts;Ebay Accounts Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Cards, ATM Card; MSR, ATM SKIMMERS. Do WU Transfer and Bank Transfers. CVV for shipping;booking airline ticket;shopping online;ordering Laptop,Iphone;... I promise CC of mine are good,high balance and fresh all with good price. PRESTIGE is my first motto. I sure u will be happy All I need is good & serious buyer to business for a long time * SELL GOOD CVV for shipping;booking airline ticket;shopping online;ordering Laptop,Iphone;...!IF NOT GOOD, WILL CHANGE IMMEDIATELY * Contact me to negotiate about the price if buying bulk. I really need more serious buyers to do long business. You will be given many endow when we have long time business,you do good for me, I do good for u too. Long & good business.This is all I need :) - US (vis,mas)= $3/CC; US (amex,dis)= $5/CC; US BIN; US fullz; USA Visa VBV info for sale. - UK (vis,mas)= $8/CC; UK (amex,dis)= $20/CC; UK BIN; UK DOB; UK with Postcode; UK fullz; UK pass VBV - EU (vis,mas)= $20/CC; EU Amex = $30/CC; EU DOB; EU fullz; EU pass VBV. Include: Italy CVV; Spain CVV; France CVV; Sweden CVV; Denmark CVV; Slovakia CVV; Portugal CVV; Norway CVV; Belgium CVV Greece CVV; Germany CVV; Ireland CVV; Newzealand CVV; Switzerland CVV; Finland CVV; Turkey CVV; Netherland CVV - CA (vis,mas)= $8/CC; CA BIN; CA GOLD; CA Amex; CA Fullz; CA pass VBV - AU (vis,mas)= $10/CC; AU BIN; AU Amex; AU DOB; AU fullz; AU pass VBV - Brazil random = $15/CC; Brazil BIN - Middle East: UAE = $15/CC; Qatar= $10/CC; Saudi Arabia;... - ASIA ( Malay; Indo; Japan;China; Hongkong; Singapore...) = $10/CC - South Africa = $10/CC - And All CC; CC pass VBV; CVV pass VBV; CCN SSN- INTER ( BIN,DOB,SSN,FULLZ) of another Countries. Good CC, CVV for shipping;booking airline ticket;shopping online;ordering Laptop,Iphone;... [Sell CVV; Dumps, track1&2; Bank logins; Paypal Accounts;Ebay Accounts Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Cards, ATM Card; MSR, ATM SKIMMERS. Do WU Transfer and Bank Transfers] [Sell CVV; Dumps, track1&2; Bank logins; Paypal Accounts;Ebay Accounts Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Cards, ATM Card; MSR, ATM SKIMMERS. Do WU Transfers and Bank Transfers] ------------------------------ CONTACT via Y!H: goodcvv_dumps or ICQ: 667686221 or Mail: [email protected] ------------------------------------ * WARNING!!! BEFORE MAKE BUSINESS or add my ID, let read carefull my rule because i really hate Spammers,Rippers and Scammers - Dont trust, dont talk more - Don't Spamm And Don't Scam! I very hate do spam or rip and I don't want who spam me. - All my CVV are tested before sell, that's sure - I accept LR; WU or MoneyGram. - I only work with reliable buyers. Need good & serious buyer to business for a long time - I work with only one slogan: prestige and quality to satisfy my clients !!! - I was so happy to see you actually make more big money from the business with me Once you trust me, work with me. And if not trust,dont contact me, dont waste time! --------------------------THANKS, LOOK FORWARD TO WORKING WITH ALL of YOU !!!---------------------------- * Sell CVV; Dumps, track1&2; Bank logins; Paypal Accounts,Ebay Accounts; Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Cards, ATM Card; MSR, ATM SKIMMERS. Do WU Transfers and Bank Transfers. CVV for shipping;booking airline ticket;shopping online;ordering Laptop,Iphone;... [Sell CVV; Dumps, track1&2; Bank logins; Paypal Accounts,Ebay Accounts; Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Cards, ATM Card; MSR, ATM SKIMMERS. Do WU Transfers and Bank Transfers] * Contact via Y!H: goodcvv_dumps or ICQ: 667686221. Mail: [email protected] ===================== WESTERN UNION TRANSFER SERVICE ======================= We are Very PROFESSIONAL in WESTION UNION. Our Special Job Is this We Have big Western Union Service for everywhere and every when for you. We transfer money to all country in world. We can transfer big amount. And you can receive this money from your country. Our service accept payment 15% of transfer amount for small transfer . And 10% of big transfer. For large transfer . We make is very safe. And this service is very fast. We start to run software to make transfer to your WU info very fast,without delay and immediately. We give you MTCN and sender info and all cashout info, 15 mins after your payment complete. CONTACT US via Y!H: goodcvv_dumps or ICQ: 667686221 or Mail: [email protected] to know more info, price list of WU TRANSFER SERVICE ====================== Verified Paypal Accounts for sale ======================== If u are interested in it, contact me to know the price list & have the Tips for using above accounts safely,not be suspended when using accounts. I will not responsible if you get suspended. ===================== Dumps, Track1&2 with PIN & without PIN for ATM Cashout ======================= - Tracks 1&2 US;Tracks 1&2 UK;Tracks 1&2 CA,AU; Tracks 1&2 EU, with PIN and without PIN. - Dumps US; Dumps CA; Dumps EU; Dumps ASIA; Dumps AU, Brazil with good quality & price. Update Types of Dumps having now: Mix; Debit Classic; MC Standard;MC World; Gold; Platinum; Business/Corporate; Purchasing/Signature; Infinite - Contact me via Y!H: goodcvv_dumps (ICQ: 667686221) to know more info & price list of dumps, tracks ! ======================== Bank Logins Account (US UK CA AU EU) ======================== Sell Bank acc: Bank BOA, Bank HSBC USA, HSBC UK, Chase,Washovia, Halifax, Barclays, Abbey,... I make sure that my BANK LOGIN are security & easily to use. If u are interested in this, contact me to know more info about balance, price list,...! ================= Top-up Prepaid Cards, Debit Cards ========================= - If you hold any prepaid cards, debit cards, any country or any company. - I can top you funds into your prepaid cards, debit cards or any virtual cards. - top up your debit cards with hacked credit cards - top up your prepaid card with bank account login - top up you card with paypal account or any other - Have all tools to top your cards account - Top up does not take more then 10 minutes - Payoneer Cards top up available at cheap ================= Service: Provide Ebay - Apple - Amazon - Itunes GIFT CARD & Game Card with best price ===================== Contact me to negotiate about the price if buying bulk - PlayStation® Network Card - Xbox LIVE 12 Month Gold Membership = 30$ Xbox LIVE 4000 Microsoft Points = 30$ Zynga $50 Game Card (World Wide) = 30$ Ultimate game card 50$ = 30$ Ultimate game card 20$ = 10$ Key Diablo 3 = 25$ ITUNES GIFT CARD AMAZON GIFT CARD Ebay gift card Visa gift card ---------------- Our products are checked by a partner who works in a bank -------------------- Our products are better than 5-7 days after they are dead. They are raised mainly for money atm. Can be used in most countries. ---------------- Contact Via Y!H: goodcvv_dumps or ICQ: 667686221. Mail: [email protected] ------------------------ Need good & serious buyer to business for a long time [Sell CVV, Dumps,track1&2; Bank logins; Paypal Accounts;Ebay Accounts; Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Card, ATM Card, MSR, ATM SKIMMERS. Do WU Transfer and Bank Transfers....Contact via Y!H: goodcvv_dumps or ICQ: 667686221. Mail: [email protected]] [Sell CVV, Dumps,track1&2; Bank logins; Paypal Accounts;Ebay Accounts; Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Card, ATM Card, MSR, ATM SKIMMERS. Do WU Transfer and Bank Transfers....Contact via Y!H: goodcvv_dumps or ICQ: 667686221. Mail: [email protected]] [Sell CVV, Dumps,track1&2; Bank logins; Paypal Accounts;Ebay Accounts; Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Card, ATM Card, MSR, ATM SKIMMERS. Do WU Transfer and Bank Transfers....Contact via Y!H: goodcvv_dumps or ICQ: 667686221. Mail: [email protected]] [Sell CVV, Dumps,track1&2; Bank logins; Paypal Accounts;Ebay Accounts; Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Card, ATM Card, MSR, ATM SKIMMERS. Do WU Transfer and Bank Transfers....Contact via Y!H: goodcvv_dumps or ICQ: 667686221. Mail: [email protected]] [Sell CVV, Dumps,track1&2; Bank logins; Paypal Accounts;Ebay Accounts; Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Card, ATM Card, MSR, ATM SKIMMERS. Do WU Transfer and Bank Transfers....Contact via Y!H: goodcvv_dumps or ICQ: 667686221. Mail: [email protected]]

    Read the article

  • Sell good CVV, Dumps track 1&2, Paypal, WU TRANSFER

    - by Good Dumps CVV for sale
    My products for sale: Sell CVV; Dumps, track1&2; Bank logins; Paypal Accounts;Ebay Accounts Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Cards, ATM Card; MSR, ATM SKIMMERS. Do WU Transfers and Bank Transfers I am here to sell, supply good and quality CVV for shipping;booking airline ticket;shopping online;ordering Laptop,Iphone;... In last 5 years my Job Is This. PRESTIGE is my first motto. Not easy to build the good PRESTIGE. My motto is Always make customers satisfied & happy ! I have unlocked many softwares make good money, example: -Software to make the bug and crack MTCN of the Western Union. Version : 2.0.1.1 ( new update ) -Software to open balance in PayPal and Bank Login -Software hacking credit card, debit card Version 1.0 **I only sell it for my good customers, and my familiarity ***I update more than 200 CC + CVV everyday. Fresh + good valid + Strong,private + high balance with best price Our products are checked by a partner who works in a bank. Our products are better than 5-7 days after they are dead. They are raised mainly for money atm. Can be used in most countries. ** If you are a serious buyer, let contact via : Yahoo ID: goodcvv_dumps Mail: [email protected] ICQ: 667686221 * Sell CVV; Dumps,track1&2; Bank logins; Paypal Accounts;Ebay Accounts Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Cards, ATM Card; MSR, ATM SKIMMERS. Do WU Transfer and Bank Transfers. CVV for shipping;booking airline ticket;shopping online;ordering Laptop,Iphone;... I promise CC of mine are good,high balance and fresh all with good price. PRESTIGE is my first motto. I sure u will be happy All I need is good & serious buyer to business for a long time * SELL GOOD CVV for shipping;booking airline ticket;shopping online;ordering Laptop,Iphone;...!IF NOT GOOD, WILL CHANGE IMMEDIATELY * Contact me to negotiate about the price if buying bulk. I really need more serious buyers to do long business. You will be given many endow when we have long time business,you do good for me, I do good for u too. Long & good business.This is all I need :) - US (vis,mas)= $3/CC; US (amex,dis)= $5/CC; US BIN; US fullz; USA Visa VBV info for sale. - UK (vis,mas)= $8/CC; UK (amex,dis)= $20/CC; UK BIN; UK DOB; UK with Postcode; UK fullz; UK pass VBV - EU (vis,mas)= $20/CC; EU Amex = $30/CC; EU DOB; EU fullz; EU pass VBV. Include: Italy CVV; Spain CVV; France CVV; Sweden CVV; Denmark CVV; Slovakia CVV; Portugal CVV; Norway CVV; Belgium CVV Greece CVV; Germany CVV; Ireland CVV; Newzealand CVV; Switzerland CVV; Finland CVV; Turkey CVV; Netherland CVV - CA (vis,mas)= $8/CC; CA BIN; CA GOLD; CA Amex; CA Fullz; CA pass VBV - AU (vis,mas)= $10/CC; AU BIN; AU Amex; AU DOB; AU fullz; AU pass VBV - Brazil random = $15/CC; Brazil BIN - Middle East: UAE = $15/CC; Qatar= $10/CC; Saudi Arabia;... - ASIA ( Malay; Indo; Japan;China; Hongkong; Singapore...) = $10/CC - South Africa = $10/CC - And All CC; CC pass VBV; CVV pass VBV; CCN SSN- INTER ( BIN,DOB,SSN,FULLZ) of another Countries. Good CC, CVV for shipping;booking airline ticket;shopping online;ordering Laptop,Iphone;... [Sell CVV; Dumps, track1&2; Bank logins; Paypal Accounts;Ebay Accounts Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Cards, ATM Card; MSR, ATM SKIMMERS. Do WU Transfer and Bank Transfers] [Sell CVV; Dumps, track1&2; Bank logins; Paypal Accounts;Ebay Accounts Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Cards, ATM Card; MSR, ATM SKIMMERS. Do WU Transfers and Bank Transfers] ------------------------------ CONTACT via Y!H: goodcvv_dumps or ICQ: 667686221 or Mail: [email protected] ------------------------------------ * WARNING!!! BEFORE MAKE BUSINESS or add my ID, let read carefull my rule because i really hate Spammers,Rippers and Scammers - Dont trust, dont talk more - Don't Spamm And Don't Scam! I very hate do spam or rip and I don't want who spam me. - All my CVV are tested before sell, that's sure - I accept LR; WU or MoneyGram. - I only work with reliable buyers. Need good & serious buyer to business for a long time - I work with only one slogan: prestige and quality to satisfy my clients !!! - I was so happy to see you actually make more big money from the business with me Once you trust me, work with me. And if not trust,dont contact me, dont waste time! --------------------------THANKS, LOOK FORWARD TO WORKING WITH ALL of YOU !!!---------------------------- * Sell CVV; Dumps, track1&2; Bank logins; Paypal Accounts,Ebay Accounts; Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Cards, ATM Card; MSR, ATM SKIMMERS. Do WU Transfers and Bank Transfers. CVV for shipping;booking airline ticket;shopping online;ordering Laptop,Iphone;... [Sell CVV; Dumps, track1&2; Bank logins; Paypal Accounts,Ebay Accounts; Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Cards, ATM Card; MSR, ATM SKIMMERS. Do WU Transfers and Bank Transfers] * Contact via Y!H: goodcvv_dumps or ICQ: 667686221. Mail: [email protected] ===================== WESTERN UNION TRANSFER SERVICE ======================= We are Very PROFESSIONAL in WESTION UNION. Our Special Job Is this We Have big Western Union Service for everywhere and every when for you. We transfer money to all country in world. We can transfer big amount. And you can receive this money from your country. Our service accept payment 15% of transfer amount for small transfer . And 10% of big transfer. For large transfer . We make is very safe. And this service is very fast. We start to run software to make transfer to your WU info very fast,without delay and immediately. We give you MTCN and sender info and all cashout info, 15 mins after your payment complete. CONTACT US via Y!H: goodcvv_dumps or ICQ: 667686221 or Mail: [email protected] to know more info, price list of WU TRANSFER SERVICE ====================== Verified Paypal Accounts for sale ======================== If u are interested in it, contact me to know the price list & have the Tips for using above accounts safely,not be suspended when using accounts. I will not responsible if you get suspended. ===================== Dumps, Track1&2 with PIN & without PIN for ATM Cashout ======================= - Tracks 1&2 US;Tracks 1&2 UK;Tracks 1&2 CA,AU; Tracks 1&2 EU, with PIN and without PIN. - Dumps US; Dumps CA; Dumps EU; Dumps ASIA; Dumps AU, Brazil with good quality & price. Update Types of Dumps having now: Mix; Debit Classic; MC Standard;MC World; Gold; Platinum; Business/Corporate; Purchasing/Signature; Infinite - Contact me via Y!H: goodcvv_dumps (ICQ: 667686221) to know more info & price list of dumps, tracks ! ======================== Bank Logins Account (US UK CA AU EU) ======================== Sell Bank acc: Bank BOA, Bank HSBC USA, HSBC UK, Chase,Washovia, Halifax, Barclays, Abbey,... I make sure that my BANK LOGIN are security & easily to use. If u are interested in this, contact me to know more info about balance, price list,...! ================= Top-up Prepaid Cards, Debit Cards ========================= - If you hold any prepaid cards, debit cards, any country or any company. - I can top you funds into your prepaid cards, debit cards or any virtual cards. - top up your debit cards with hacked credit cards - top up your prepaid card with bank account login - top up you card with paypal account or any other - Have all tools to top your cards account - Top up does not take more then 10 minutes - Payoneer Cards top up available at cheap ================= Service: Provide Ebay - Apple - Amazon - Itunes GIFT CARD & Game Card with best price ===================== Contact me to negotiate about the price if buying bulk - PlayStation® Network Card - Xbox LIVE 12 Month Gold Membership = 30$ Xbox LIVE 4000 Microsoft Points = 30$ Zynga $50 Game Card (World Wide) = 30$ Ultimate game card 50$ = 30$ Ultimate game card 20$ = 10$ Key Diablo 3 = 25$ ITUNES GIFT CARD AMAZON GIFT CARD Ebay gift card Visa gift card ---------------- Our products are checked by a partner who works in a bank -------------------- Our products are better than 5-7 days after they are dead. They are raised mainly for money atm. Can be used in most countries. ---------------- Contact Via Y!H: goodcvv_dumps or ICQ: 667686221. Mail: [email protected] ------------------------ Need good & serious buyer to business for a long time [Sell CVV, Dumps,track1&2; Bank logins; Paypal Accounts;Ebay Accounts; Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Card, ATM Card, MSR, ATM SKIMMERS. Do WU Transfer and Bank Transfers....Contact via Y!H: goodcvv_dumps or ICQ: 667686221. Mail: [email protected]] [Sell CVV, Dumps,track1&2; Bank logins; Paypal Accounts;Ebay Accounts; Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Card, ATM Card, MSR, ATM SKIMMERS. Do WU Transfer and Bank Transfers....Contact via Y!H: goodcvv_dumps or ICQ: 667686221. Mail: [email protected]] [Sell CVV, Dumps,track1&2; Bank logins; Paypal Accounts;Ebay Accounts; Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Card, ATM Card, MSR, ATM SKIMMERS. Do WU Transfer and Bank Transfers....Contact via Y!H: goodcvv_dumps or ICQ: 667686221. Mail: [email protected]] [Sell CVV, Dumps,track1&2; Bank logins; Paypal Accounts;Ebay Accounts; Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Card, ATM Card, MSR, ATM SKIMMERS. Do WU Transfer and Bank Transfers....Contact via Y!H: goodcvv_dumps or ICQ: 667686221. Mail: [email protected]] [Sell CVV, Dumps,track1&2; Bank logins; Paypal Accounts;Ebay Accounts; Mailpass; SMTP;RDP;VPS;CCN;SSN; Sell Amazon gift card & itunes gift card; Game Card, ATM Card, MSR, ATM SKIMMERS. Do WU Transfer and Bank Transfers....Contact via Y!H: goodcvv_dumps or ICQ: 667686221. Mail: [email protected]]

    Read the article

  • Anyone succeeded at injecting Interfaces into Entity Framework 4 Entities, using T4?

    - by Ciel
    Hello: POCO sort of leaves me wanting: (how can I say I use DI/IoC, if the Repository is not the only place that is creating the entities?)...hence my desire to lock it down, get rid of the temptation of newing up POCOs or EntityObjects anywhere in the code, and just allowing entity interfaces above the Repository/Factory layer. For a second there, I nearly thought I had it...was editing EF4's T4 in order to inject in an Interface def. Was going swimmingly, compiled and worked, until I got to the Associations... I wrapped them with a ICollection, and renamed the underlying original collection with a prefix of Wrapped. Unfortunately, when run, throws an error: //The Member 'WrappedSubExamples' in the CLR type 'XAct.App.Data.Model.EF4.Example' is not present in the conceptual model type 'XAct.App.Data.Model.Entity.Example'. var examples = context2.CreateObjectSet(); My T4 segment I used was (this may not work, as it's the longest code snippet I've ever posted here...sorry): #region Generic Property Abstraction <# if (navProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many) {#> //XAct.App Generic Wrapper: <#=code.SpaceAfter(NewModifier(navProperty))#><#=Accessibility.ForProperty(navProperty)#> ICollection<I<#=MultiSchemaEscape(navProperty.ToEndMember.GetEntityType(), code)#>> <#=code.Escape(navProperty)#> { get { if (_X<#=code.Escape(navProperty)# == null){ _X<#=code.Escape(navProperty)# = new WrappedCollection,<#=MultiSchemaEscape(navProperty.ToEndMember.GetEntityType(), code)#(this.<#=(navProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many)?"Wrapped":""#<#=code.Escape(navProperty)#); } return _X<#=code.Escape(navProperty)#; } } private ICollection _X<#=code.Escape(navProperty)#; <# } else { # <#=code.SpaceAfter(NewModifier(navProperty))#<#=Accessibility.ForProperty(navProperty)# I<#=MultiSchemaEscape(navProperty.ToEndMember.GetEntityType(), code)# <#=code.Escape(navProperty)# { get { return (I<#=code.Escape(navProperty)#)this.Wrapped<#=code.Escape(navProperty)#; } set { this.Wrapped<#=code.Escape(navProperty)# = value as <#=code.Escape(navProperty)#; } } <# } # #endregion which then wraps the original collection, renamed with the prefix 'Wrapped': /// <summary> /// <#=SummaryComment(navProperty)#> /// </summary><#=LongDescriptionCommentElement(navProperty, region.CurrentIndentLevel) #> [XmlIgnoreAttribute()] [SoapIgnoreAttribute()] [DataMemberAttribute()] [EdmRelationshipNavigationPropertyAttribute("<#=navProperty.RelationshipType.NamespaceName#>", "<#=navProperty.RelationshipType.Name#>", "<#=navProperty.ToEndMember.Name#>")] <# if (navProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many) { #> <#=code.SpaceAfter(NewModifier(navProperty))#><#=Accessibility.ForProperty(navProperty)#> EntityCollection<<#=MultiSchemaEscape(navProperty.ToEndMember.GetEntityType(), code)#>> Wrapped<#=code.Escape(navProperty)#> { <#=code.SpaceAfter(Accessibility.ForGetter(navProperty))#>get { return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<<#=MultiSchemaEscape(navProperty.ToEndMember.GetEntityType(), code)#>>("<#=navProperty.RelationshipType.FullName#>", "<#=navProperty.ToEndMember.Name#>"); } <#=code.SpaceAfter(Accessibility.ForSetter(navProperty))#>set { if ((value != null)) { ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<<#=MultiSchemaEscape(navProperty.ToEndMember.GetEntityType(), code)#>>("<#=navProperty.RelationshipType.FullName#>", "<#=navProperty.ToEndMember.Name#>", value); } } } <# } else { #> <#=code.SpaceAfter(NewModifier(navProperty))#><#=Accessibility.ForProperty(navProperty)#> <#=MultiSchemaEscape(navProperty.ToEndMember.GetEntityType(), code)#> Wrapped<#=code.Escape(navProperty)#> { <#=code.SpaceAfter(Accessibility.ForGetter(navProperty))#>get { return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<<#=MultiSchemaEscape(navProperty.ToEndMember.GetEntityType(), code)#>>("<#=navProperty.RelationshipType.FullName#>", "<#=navProperty.ToEndMember.Name#>").Value; } <#=code.SpaceAfter(Accessibility.ForSetter(navProperty))#>set { ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<<#=MultiSchemaEscape(navProperty.ToEndMember.GetEntityType(), code)#>>("<#=navProperty.RelationshipType.FullName#>", "<#=navProperty.ToEndMember.Name#>").Value = value; } } <# string refPropertyName = navProperty.Name + "Reference"; if (entity.Members.Any(m => m.Name == refPropertyName)) { // 6017 is the same error number that EntityClassGenerator uses. Errors.Add(new System.CodeDom.Compiler.CompilerError(SourceCsdlPath, -1, -1, "6017", String.Format(CultureInfo.CurrentCulture, GetResourceString("Template_ConflictingGeneratedNavPropName"), navProperty.Name, entity.FullName, refPropertyName))); } #> /// <summary> /// <#=SummaryComment(navProperty)#> /// </summary><#=LongDescriptionCommentElement(navProperty, region.CurrentIndentLevel)#> [BrowsableAttribute(false)] [DataMemberAttribute()] <#=Accessibility.ForProperty(navProperty)#> EntityReference<<#=MultiSchemaEscape(navProperty.ToEndMember.GetEntityType(), code)#>> <#=refPropertyName#> { <#=code.SpaceAfter(Accessibility.ForGetter(navProperty))#>get { return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<<#=MultiSchemaEscape(navProperty.ToEndMember.GetEntityType(), code)#>>("<#=navProperty.RelationshipType.FullName#>", "<#=navProperty.ToEndMember.Name#>"); } <#=code.SpaceAfter(Accessibility.ForSetter(navProperty))#>set { if ((value != null)) { ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<<#=MultiSchemaEscape(navProperty.ToEndMember.GetEntityType(), code)#>>("<#=navProperty.RelationshipType.FullName#>", "<#=navProperty.ToEndMember.Name#>", value); } } } <# } The point is...it bugs out. I've tried various solutions...none worked. Any ideas -- or is this just a wild goose chase, and time to give it up?

    Read the article

  • ASP.NET Frameworks and Raw Throughput Performance

    - by Rick Strahl
    A few days ago I had a curious thought: With all these different technologies that the ASP.NET stack has to offer, what's the most efficient technology overall to return data for a server request? When I started this it was mere curiosity rather than a real practical need or result. Different tools are used for different problems and so performance differences are to be expected. But still I was curious to see how the various technologies performed relative to each just for raw throughput of the request getting to the endpoint and back out to the client with as little processing in the actual endpoint logic as possible (aka Hello World!). I want to clarify that this is merely an informal test for my own curiosity and I'm sharing the results and process here because I thought it was interesting. It's been a long while since I've done any sort of perf testing on ASP.NET, mainly because I've not had extremely heavy load requirements and because overall ASP.NET performs very well even for fairly high loads so that often it's not that critical to test load performance. This post is not meant to make a point  or even come to a conclusion which tech is better, but just to act as a reference to help understand some of the differences in perf and give a starting point to play around with this yourself. I've included the code for this simple project, so you can play with it and maybe add a few additional tests for different things if you like. Source Code on GitHub I looked at this data for these technologies: ASP.NET Web API ASP.NET MVC WebForms ASP.NET WebPages ASMX AJAX Services  (couldn't get AJAX/JSON to run on IIS8 ) WCF Rest Raw ASP.NET HttpHandlers It's quite a mixed bag, of course and the technologies target different types of development. What started out as mere curiosity turned into a bit of a head scratcher as the results were sometimes surprising. What I describe here is more to satisfy my curiosity more than anything and I thought it interesting enough to discuss on the blog :-) First test: Raw Throughput The first thing I did is test raw throughput for the various technologies. This is the least practical test of course since you're unlikely to ever create the equivalent of a 'Hello World' request in a real life application. The idea here is to measure how much time a 'NOP' request takes to return data to the client. So for this request I create the simplest Hello World request that I could come up for each tech. Http Handler The first is the lowest level approach which is an HTTP handler. public class Handler : IHttpHandler { public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; context.Response.Write("Hello World. Time is: " + DateTime.Now.ToString()); } public bool IsReusable { get { return true; } } } WebForms Next I added a couple of ASPX pages - one using CodeBehind and one using only a markup page. The CodeBehind page simple does this in CodeBehind without any markup in the ASPX page: public partial class HelloWorld_CodeBehind : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Response.Write("Hello World. Time is: " + DateTime.Now.ToString() ); Response.End(); } } while the Markup page only contains some static output via an expression:<%@ Page Language="C#" AutoEventWireup="false" CodeBehind="HelloWorld_Markup.aspx.cs" Inherits="AspNetFrameworksPerformance.HelloWorld_Markup" %> Hello World. Time is <%= DateTime.Now %> ASP.NET WebPages WebPages is the freestanding Razor implementation of ASP.NET. Here's the simple HelloWorld.cshtml page:Hello World @DateTime.Now WCF REST WCF REST was the token REST implementation for ASP.NET before WebAPI and the inbetween step from ASP.NET AJAX. I'd like to forget that this technology was ever considered for production use, but I'll include it here. Here's an OperationContract class: [ServiceContract(Namespace = "")] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class WcfService { [OperationContract] [WebGet] public Stream HelloWorld() { var data = Encoding.Unicode.GetBytes("Hello World" + DateTime.Now.ToString()); var ms = new MemoryStream(data); // Add your operation implementation here return ms; } } WCF REST can return arbitrary results by returning a Stream object and a content type. The code above turns the string result into a stream and returns that back to the client. ASP.NET AJAX (ASMX Services) I also wanted to test ASP.NET AJAX services because prior to WebAPI this is probably still the most widely used AJAX technology for the ASP.NET stack today. Unfortunately I was completely unable to get this running on my Windows 8 machine. Visual Studio 2012  removed adding of ASP.NET AJAX services, and when I tried to manually add the service and configure the script handler references it simply did not work - I always got a SOAP response for GET and POST operations. No matter what I tried I always ended up getting XML results even when explicitly adding the ScriptHandler. So, I didn't test this (but the code is there - you might be able to test this on a Windows 7 box). ASP.NET MVC Next up is probably the most popular ASP.NET technology at the moment: MVC. Here's the small controller: public class MvcPerformanceController : Controller { public ActionResult Index() { return View(); } public ActionResult HelloWorldCode() { return new ContentResult() { Content = "Hello World. Time is: " + DateTime.Now.ToString() }; } } ASP.NET WebAPI Next up is WebAPI which looks kind of similar to MVC. Except here I have to use a StringContent result to return the response: public class WebApiPerformanceController : ApiController { [HttpGet] public HttpResponseMessage HelloWorldCode() { return new HttpResponseMessage() { Content = new StringContent("Hello World. Time is: " + DateTime.Now.ToString(), Encoding.UTF8, "text/plain") }; } } Testing Take a minute to think about each of the technologies… and take a guess which you think is most efficient in raw throughput. The fastest should be pretty obvious, but the others - maybe not so much. The testing I did is pretty informal since it was mainly to satisfy my curiosity - here's how I did this: I used Apache Bench (ab.exe) from a full Apache HTTP installation to run and log the test results of hitting the server. ab.exe is a small executable that lets you hit a URL repeatedly and provides counter information about the number of requests, requests per second etc. ab.exe and the batch file are located in the \LoadTests folder of the project. An ab.exe command line  looks like this: ab.exe -n100000 -c20 http://localhost/aspnetperf/api/HelloWorld which hits the specified URL 100,000 times with a load factor of 20 concurrent requests. This results in output like this:   It's a great way to get a quick and dirty performance summary. Run it a few times to make sure there's not a large amount of varience. You might also want to do an IISRESET to clear the Web Server. Just make sure you do a short test run to warm up the server first - otherwise your first run is likely to be skewed downwards. ab.exe also allows you to specify headers and provide POST data and many other things if you want to get a little more fancy. Here all tests are GET requests to keep it simple. I ran each test: 100,000 iterations Load factor of 20 concurrent connections IISReset before starting A short warm up run for API and MVC to make sure startup cost is mitigated Here is the batch file I used for the test: IISRESET REM make sure you add REM C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin REM to your path so ab.exe can be found REM Warm up ab.exe -n100 -c20 http://localhost/aspnetperf/MvcPerformance/HelloWorldJsonab.exe -n100 -c20 http://localhost/aspnetperf/api/HelloWorldJson ab.exe -n100 -c20 http://localhost/AspNetPerf/WcfService.svc/HelloWorld ab.exe -n100000 -c20 http://localhost/aspnetperf/handler.ashx > handler.txt ab.exe -n100000 -c20 http://localhost/aspnetperf/HelloWorld_CodeBehind.aspx > AspxCodeBehind.txt ab.exe -n100000 -c20 http://localhost/aspnetperf/HelloWorld_Markup.aspx > AspxMarkup.txt ab.exe -n100000 -c20 http://localhost/AspNetPerf/WcfService.svc/HelloWorld > Wcf.txt ab.exe -n100000 -c20 http://localhost/aspnetperf/MvcPerformance/HelloWorldCode > Mvc.txt ab.exe -n100000 -c20 http://localhost/aspnetperf/api/HelloWorld > WebApi.txt I ran each of these tests 3 times and took the average score for Requests/second, with the machine otherwise idle. I did see a bit of variance when running many tests but the values used here are the medians. Part of this has to do with the fact I ran the tests on my local machine - result would probably more consistent running the load test on a separate machine hitting across the network. I ran these tests locally on my laptop which is a Dell XPS with quad core Sandibridge I7-2720QM @ 2.20ghz and a fast SSD drive on Windows 8. CPU load during tests ran to about 70% max across all 4 cores (IOW, it wasn't overloading the machine). Ideally you can try running these tests on a separate machine hitting the local machine. If I remember correctly IIS 7 and 8 on client OSs don't throttle so the performance here should be Results Ok, let's cut straight to the chase. Below are the results from the tests… It's not surprising that the handler was fastest. But it was a bit surprising to me that the next fastest was WebForms and especially Web Forms with markup over a CodeBehind page. WebPages also fared fairly well. MVC and WebAPI are a little slower and the slowest by far is WCF REST (which again I find surprising). As mentioned at the start the raw throughput tests are not overly practical as they don't test scripting performance for the HTML generation engines or serialization performances of the data engines. All it really does is give you an idea of the raw throughput for the technology from time of request to reaching the endpoint and returning minimal text data back to the client which indicates full round trip performance. But it's still interesting to see that Web Forms performs better in throughput than either MVC, WebAPI or WebPages. It'd be interesting to try this with a few pages that actually have some parsing logic on it, but that's beyond the scope of this throughput test. But what's also amazing about this test is the sheer amount of traffic that a laptop computer is handling. Even the slowest tech managed 5700 requests a second, which is one hell of a lot of requests if you extrapolate that out over a 24 hour period. Remember these are not static pages, but dynamic requests that are being served. Another test - JSON Data Service Results The second test I used a JSON result from several of the technologies. I didn't bother running WebForms and WebPages through this test since that doesn't make a ton of sense to return data from the them (OTOH, returning text from the APIs didn't make a ton of sense either :-) In these tests I have a small Person class that gets serialized and then returned to the client. The Person class looks like this: public class Person { public Person() { Id = 10; Name = "Rick"; Entered = DateTime.Now; } public int Id { get; set; } public string Name { get; set; } public DateTime Entered { get; set; } } Here are the updated handler classes that use Person: Handler public class Handler : IHttpHandler { public void ProcessRequest(HttpContext context) { var action = context.Request.QueryString["action"]; if (action == "json") JsonRequest(context); else TextRequest(context); } public void TextRequest(HttpContext context) { context.Response.ContentType = "text/plain"; context.Response.Write("Hello World. Time is: " + DateTime.Now.ToString()); } public void JsonRequest(HttpContext context) { var json = JsonConvert.SerializeObject(new Person(), Formatting.None); context.Response.ContentType = "application/json"; context.Response.Write(json); } public bool IsReusable { get { return true; } } } This code adds a little logic to check for a action query string and route the request to an optional JSON result method. To generate JSON, I'm using the same JSON.NET serializer (JsonConvert.SerializeObject) used in Web API to create the JSON response. WCF REST   [ServiceContract(Namespace = "")] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class WcfService { [OperationContract] [WebGet] public Stream HelloWorld() { var data = Encoding.Unicode.GetBytes("Hello World " + DateTime.Now.ToString()); var ms = new MemoryStream(data); // Add your operation implementation here return ms; } [OperationContract] [WebGet(ResponseFormat=WebMessageFormat.Json,BodyStyle=WebMessageBodyStyle.WrappedRequest)] public Person HelloWorldJson() { // Add your operation implementation here return new Person(); } } For WCF REST all I have to do is add a method with the Person result type.   ASP.NET MVC public class MvcPerformanceController : Controller { // // GET: /MvcPerformance/ public ActionResult Index() { return View(); } public ActionResult HelloWorldCode() { return new ContentResult() { Content = "Hello World. Time is: " + DateTime.Now.ToString() }; } public JsonResult HelloWorldJson() { return Json(new Person(), JsonRequestBehavior.AllowGet); } } For MVC all I have to do for a JSON response is return a JSON result. ASP.NET internally uses JavaScriptSerializer. ASP.NET WebAPI public class WebApiPerformanceController : ApiController { [HttpGet] public HttpResponseMessage HelloWorldCode() { return new HttpResponseMessage() { Content = new StringContent("Hello World. Time is: " + DateTime.Now.ToString(), Encoding.UTF8, "text/plain") }; } [HttpGet] public Person HelloWorldJson() { return new Person(); } [HttpGet] public HttpResponseMessage HelloWorldJson2() { var response = new HttpResponseMessage(HttpStatusCode.OK); response.Content = new ObjectContent<Person>(new Person(), GlobalConfiguration.Configuration.Formatters.JsonFormatter); return response; } } Testing and Results To run these data requests I used the following ab.exe commands:REM JSON RESPONSES ab.exe -n100000 -c20 http://localhost/aspnetperf/Handler.ashx?action=json > HandlerJson.txt ab.exe -n100000 -c20 http://localhost/aspnetperf/MvcPerformance/HelloWorldJson > MvcJson.txt ab.exe -n100000 -c20 http://localhost/aspnetperf/api/HelloWorldJson > WebApiJson.txt ab.exe -n100000 -c20 http://localhost/AspNetPerf/WcfService.svc/HelloWorldJson > WcfJson.txt The results from this test run are a bit interesting in that the WebAPI test improved performance significantly over returning plain string content. Here are the results:   The performance for each technology drops a little bit except for WebAPI which is up quite a bit! From this test it appears that WebAPI is actually significantly better performing returning a JSON response, rather than a plain string response. Snag with Apache Benchmark and 'Length Failures' I ran into a little snag with Apache Benchmark, which was reporting failures for my Web API requests when serializing. As the graph shows performance improved significantly from with JSON results from 5580 to 6530 or so which is a 15% improvement (while all others slowed down by 3-8%). However, I was skeptical at first because the WebAPI test reports showed a bunch of errors on about 10% of the requests. Check out this report: Notice the Failed Request count. What the hey? Is WebAPI failing on roughly 10% of requests when sending JSON? Turns out: No it's not! But it took some sleuthing to figure out why it reports these failures. At first I thought that Web API was failing, and so to make sure I re-ran the test with Fiddler attached and runiisning the ab.exe test by using the -X switch: ab.exe -n100 -c10 -X localhost:8888 http://localhost/aspnetperf/api/HelloWorldJson which showed that indeed all requests where returning proper HTTP 200 results with full content. However ab.exe was reporting the errors. After some closer inspection it turned out that the dates varying in size altered the response length in dynamic output. For example: these two results: {"Id":10,"Name":"Rick","Entered":"2012-09-04T10:57:24.841926-10:00"} {"Id":10,"Name":"Rick","Entered":"2012-09-04T10:57:24.8519262-10:00"} are different in length for the number which results in 68 and 69 bytes respectively. The same URL produces different result lengths which is what ab.exe reports. I didn't notice at first bit the same is happening when running the ASHX handler with JSON.NET result since it uses the same serializer that varies the milliseconds. Moral: You can typically ignore Length failures in Apache Benchmark and when in doubt check the actual output with Fiddler. Note that the other failure values are accurate though. Another interesting Side Note: Perf drops over Time As I was running these tests repeatedly I was finding that performance steadily dropped from a startup peak to a 10-15% lower stable level. IOW, with Web API I'd start out with around 6500 req/sec and in subsequent runs it keeps dropping until it would stabalize somewhere around 5900 req/sec occasionally jumping lower. For these tests this is why I did the IIS RESET and warm up for individual tests. This is a little puzzling. Looking at Process Monitor while the test are running memory very quickly levels out as do handles and threads, on the first test run. Subsequent runs everything stays stable, but the performance starts going downwards. This applies to all the technologies - Handlers, Web Forms, MVC, Web API - curious to see if others test this and see similar results. Doing an IISRESET then resets everything and performance starts off at peak again… Summary As I stated at the outset, these were informal to satiate my curiosity not to prove that any technology is better or even faster than another. While there clearly are differences in performance the differences (other than WCF REST which was by far the slowest and the raw handler which was by far the highest) are relatively minor, so there is no need to feel that any one technology is a runaway standout in raw performance. Choosing a technology is about more than pure performance but also about the adequateness for the job and the easy of implementation. The strengths of each technology will make for any minor performance difference we see in these tests. However, to me it's important to get an occasional reality check and compare where new technologies are heading. Often times old stuff that's been optimized and designed for a time of less horse power can utterly blow the doors off newer tech and simple checks like this let you compare. Luckily we're seeing that much of the new stuff performs well even in V1.0 which is great. To me it was very interesting to see Web API perform relatively badly with plain string content, which originally led me to think that Web API might not be properly optimized just yet. For those that caught my Tweets late last week regarding WebAPI's slow responses was with String content which is in fact considerably slower. Luckily where it counts with serialized JSON and XML WebAPI actually performs better. But I do wonder what would make generic string content slower than serialized code? This stresses another point: Don't take a single test as the final gospel and don't extrapolate out from a single set of tests. Certainly Twitter can make you feel like a fool when you post something immediate that hasn't been fleshed out a little more <blush>. Egg on my face. As a result I ended up screwing around with this for a few hours today to compare different scenarios. Well worth the time… I hope you found this useful, if not for the results, maybe for the process of quickly testing a few requests for performance and charting out a comparison. Now onwards with more serious stuff… Resources Source Code on GitHub Apache HTTP Server Project (ab.exe is part of the binary distribution)© Rick Strahl, West Wind Technologies, 2005-2012Posted in ASP.NET  Web Api   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

  • NetBeans Development 7 - Windows 7 64-bit … JNI native calls ... a how to guide

    - by CirrusFlyer
    I provide this for you to hopefully save you some time and pain. As part of my expereince in getting to know NB Development v7 on my Windows 64-bit workstation I found another frustrating adventure in trying to get the JNI (Java Native Interface) abilities up and working in my project. As such, I am including a brief summary of steps required (as all the documentation I found was completely incorrect for these versions of Windows and NetBeans on how to do JNI). It took a couple of days of experimentation and reviewing every webpage I could find that included these technologies as keyword searches. Yuk!! Not fun. To begin, as NetBeans Development is "all about modules" if you are reading this you probably have a need for one, or more, of your modules to perform JNI calls. Most of what is available on this site or the Internet in general (not to mention the help file in NB7) is either completely wrong for these versions, or so sparse as to be essentially unuseful to anyone other than a JNI expert. Here is what you are looking for ... the "cut to the chase" - "how to guide" to get a JNI call up and working on your NB7 / Windows 64-bit box. 1) From within your NetBeans Module (not the host appliation) declair your native method(s) and make sure you can compile the Java source without errors. Example: package org.mycompanyname.nativelogic; public class NativeInterfaceTest { static { try { if (System.getProperty( "os.arch" ).toLowerCase().equals( "amd64" ) ) System.loadLibrary( <64-bit_folder_name_on_file_system>/<file_name.dll> ); else System.loadLibrary( <32-bit_folder_name_on_file_system>/<file_name.dll> ); } catch (SecurityException se) {} catch (UnsatisfieldLinkError ule) {} catch (NullPointerException npe) {} } public NativeInterfaceTest() {} native String echoString(String s); } Take notice to the fact that we only load the Assembly once (as it's in a static block), because othersise you will throw exceptions if attempting to load it again. Also take note of our single (in this example) native method titled "echoString". This is the method that our C / C++ application is going to implement, then via the majic of JNI we'll call from our Java code. 2) If using a 64-bit version of Windows (which we are here) we need to open a 64-bit Visual Studio Command Prompt (versus the standard 32-bit version), and execute the "vcvarsall" BAT file, along with an "amd64" command line argument, to set the environment up for 64-bit tools. Example: <path_to_Microsoft_Visual_Studio_10.0>/VC/vcvarsall.bat amd64 Take note that you can use any version of the C / C++ compiler from Microsoft you wish. I happen to have Visual Studio 2005, 2008, and 2010 installed on my box so I chose to use "v10.0" but any that support 64-bit development will work fine. The other important aspect here is the "amd64" param. 3) In the Command Prompt change drives \ directories on your computer so that you are at the root of the fully qualified Class location on the file system that contains your native method declairation. Example: The fully qualified class name for my natively declair method is "org.mycompanyname.nativelogic.NativeInterfaceTest". As we successfully compiled our Java in Step 1 above, we should find it contained in our NetBeans Module something similar to the following: "/build/classes/org/mycompanyname/nativelogic/NativeInterfaceTest.class" We need to make sure our Command Prompt sets, as the current directly, "/build/classes" because of our next step. 4) In this step we'll create our C / C++ Header file that contains the JNI required statments. Type the following in the Command Prompt: javah -jni org.mycompanyname.nativelogic.NativeInterfaceTest and hit enter. If you receive any kind of error that states this is an unrecognized command that simply means your Windows computer does not know the PATH to that command (it's in your /bin folder). Either run the command from there, or include the fully qualified path name when invoking this application, or set your computer's PATH environmental variable to include that path in its search. This should produce a file called "org_mycompanyname_nativelogic_NativeInterfaceTest.h" ... a C Header file. I'd make a copy of this in case you need a backup later. 5) Edit the NativeInterfaceTest.h header file and include an implementation for the echoString() method. Example: JNIEXPORT jstring JNICALL Java_org_mycompanyname_nativelogic_NativeInterfaceTest_echoString (JNIEnv *env, jobject jobj, jstring js) { return((*env)->NewStringUTF(env, "My JNI is up and working after lots of research")); } Notice how you can't simply return a normal Java String (because you're in C at the moment). You have to tell the passed in JVM variable to create a Java String for you that will be returned back. Check out the following Oracle web page for other data types and how to create them for JNI purposes. 6) Close and Save your changes to the Header file. Now that you've added an implementation to the Header change the file extention from ".h" to ".c" as it's now a C source code file that properly implements the JNI required interface. Example: NativeInterfaceTest.c 7) We need to compile the newly created source code file and Link it too. From within the Command Prompt type the following: cl /I"path_to_my_jdks_include_folder" /I"path_to_my_jdks_include_win32_folder" /D:AMD64=1 /LD NativeInterfaceTest.c /FeNativeInterfaceTest.dll /link /machine:x64 Example: cl /I"D:/Program Files/Java/jdk1.6.0_21/include" /I"D:/Program Files/java/jdk1.6.0_21/include/win32" /D:AMD64=1 /LD NativeInterfaceTest.c /FeNativeInterfaceTest.dll /link /machine:x64 Notice the quotes around the paths to the 'include" and 'include/win32' folders is required because I have spaces in my folder names ... 'Program Files'. You can include them if you have no spaces without problems, but they are mandatory if you have spaces when using a command prompt. This will generate serveral files, but it's the DLL we're interested in. This is what the System.loadLirbary() java method is looking for. 8) Congratuations! You're at the last step. Simply take the DLL Assembly and paste it at the following location: <path_of_NetBeansProjects_folder>/<project_name>/<module_name>/build/cluster/modules/lib/x64 Note that you'll probably have to create the "lib" and "x64" folders. Example: C:\Users\<user_name>\Documents\NetBeansProjects\<application_name>\<module_name>\build\cluster\modules\lib\x64\NativeInterfaceTest.dll Java code ... notice how we don't inlude the ".dll" file extension in the loadLibrary() call? System.loadLibrary( "/x64/NativeInterfaceTest" ); Now, in your Java code you can create a NativeInterfaceTest object and call the echoString() method and it will return the String value you typed in the NativeInterfaceTest.c source code file. Hopefully this will save you the brain damage I endured trying to figure all this out on my own. Good luck and happy coding!

    Read the article

  • Followup: Python 2.6, 3 abstract base class misunderstanding

    - by Aaron
    I asked a question at Python 2.6, 3 abstract base class misunderstanding. My problem was that python abstract base classes didn't work quite the way I expected them to. There was some discussion in the comments about why I would want to use ABCs at all, and Alex Martelli provided an excellent answer on why my use didn't work and how to accomplish what I wanted. Here I'd like to address why one might want to use ABCs, and show my test code implementation based on Alex's answer. tl;dr: Code after the 16th paragraph. In the discussion on the original post, statements were made along the lines that you don't need ABCs in Python, and that ABCs don't do anything and are therefore not real classes; they're merely interface definitions. An abstract base class is just a tool in your tool box. It's a design tool that's been around for many years, and a programming tool that is explicitly available in many programming languages. It can be implemented manually in languages that don't provide it. An ABC is always a real class, even when it doesn't do anything but define an interface, because specifying the interface is what an ABC does. If that was all an ABC could do, that would be enough reason to have it in your toolbox, but in Python and some other languages they can do more. The basic reason to use an ABC is when you have a number of classes that all do the same thing (have the same interface) but do it differently, and you want to guarantee that that complete interface is implemented in all objects. A user of your classes can rely on the interface being completely implemented in all classes. You can maintain this guarantee manually. Over time you may succeed. Or you might forget something. Before Python had ABCs you could guarantee it semi-manually, by throwing NotImplementedError in all the base class's interface methods; you must implement these methods in derived classes. This is only a partial solution, because you can still instantiate such a base class. A more complete solution is to use ABCs as provided in Python 2.6 and above. Template methods and other wrinkles and patterns are ideas whose implementation can be made easier with full-citizen ABCs. Another idea in the comments was that Python doesn't need ABCs (understood as a class that only defines an interface) because it has multiple inheritance. The implied reference there seems to be Java and its single inheritance. In Java you "get around" single inheritance by inheriting from one or more interfaces. Java uses the word "interface" in two ways. A "Java interface" is a class with method signatures but no implementations. The methods are the interface's "interface" in the more general, non-Java sense of the word. Yes, Python has multiple inheritance, so you don't need Java-like "interfaces" (ABCs) merely to provide sets of interface methods to a class. But that's not the only reason in software development to use ABCs. Most generally, you use an ABC to specify an interface (set of methods) that will likely be implemented differently in different derived classes, yet that all derived classes must have. Additionally, there may be no sensible default implementation for the base class to provide. Finally, even an ABC with almost no interface is still useful. We use something like it when we have multiple except clauses for a try. Many exceptions have exactly the same interface, with only two differences: the exception's string value, and the actual class of the exception. In many exception clauses we use nothing about the exception except its class to decide what to do; catching one type of exception we do one thing, and another except clause catching a different exception does another thing. According to the exception module's doc page, BaseException is not intended to be derived by any user defined exceptions. If ABCs had been a first class Python concept from the beginning, it's easy to imagine BaseException being specified as an ABC. But enough of that. Here's some 2.6 code that demonstrates how to use ABCs, and how to specify a list-like ABC. Examples are run in ipython, which I like much better than the python shell for day to day work; I only wish it was available for python3. Your basic 2.6 ABC: from abc import ABCMeta, abstractmethod class Super(): __metaclass__ = ABCMeta @abstractmethod def method1(self): pass Test it (in ipython, python shell would be similar): In [2]: a = Super() --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /home/aaron/projects/test/<ipython console> in <module>() TypeError: Can't instantiate abstract class Super with abstract methods method1 Notice the end of the last line, where the TypeError exception tells us that method1 has not been implemented ("abstract methods method1"). That was the method designated as @abstractmethod in the preceding code. Create a subclass that inherits Super, implement method1 in the subclass and you're done. My problem, which caused me to ask the original question, was how to specify an ABC that itself defines a list interface. My naive solution was to make an ABC as above, and in the inheritance parentheses say (list). My assumption was that the class would still be abstract (can't instantiate it), and would be a list. That was wrong; inheriting from list made the class concrete, despite the abstract bits in the class definition. Alex suggested inheriting from collections.MutableSequence, which is abstract (and so doesn't make the class concrete) and list-like. I used collections.Sequence, which is also abstract but has a shorter interface and so was quicker to implement. First, Super derived from Sequence, with nothing extra: from abc import abstractmethod from collections import Sequence class Super(Sequence): pass Test it: In [6]: a = Super() --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /home/aaron/projects/test/<ipython console> in <module>() TypeError: Can't instantiate abstract class Super with abstract methods __getitem__, __len__ We can't instantiate it. A list-like full-citizen ABC; yea! Again, notice in the last line that TypeError tells us why we can't instantiate it: __getitem__ and __len__ are abstract methods. They come from collections.Sequence. But, I want a bunch of subclasses that all act like immutable lists (which collections.Sequence essentially is), and that have their own implementations of my added interface methods. In particular, I don't want to implement my own list code, Python already did that for me. So first, let's implement the missing Sequence methods, in terms of Python's list type, so that all subclasses act as lists (Sequences). First let's see the signatures of the missing abstract methods: In [12]: help(Sequence.__getitem__) Help on method __getitem__ in module _abcoll: __getitem__(self, index) unbound _abcoll.Sequence method (END) In [14]: help(Sequence.__len__) Help on method __len__ in module _abcoll: __len__(self) unbound _abcoll.Sequence method (END) __getitem__ takes an index, and __len__ takes nothing. And the implementation (so far) is: from abc import abstractmethod from collections import Sequence class Super(Sequence): # Gives us a list member for ABC methods to use. def __init__(self): self._list = [] # Abstract method in Sequence, implemented in terms of list. def __getitem__(self, index): return self._list.__getitem__(index) # Abstract method in Sequence, implemented in terms of list. def __len__(self): return self._list.__len__() # Not required. Makes printing behave like a list. def __repr__(self): return self._list.__repr__() Test it: In [34]: a = Super() In [35]: a Out[35]: [] In [36]: print a [] In [37]: len(a) Out[37]: 0 In [38]: a[0] --------------------------------------------------------------------------- IndexError Traceback (most recent call last) /home/aaron/projects/test/<ipython console> in <module>() /home/aaron/projects/test/test.py in __getitem__(self, index) 10 # Abstract method in Sequence, implemented in terms of list. 11 def __getitem__(self, index): ---> 12 return self._list.__getitem__(index) 13 14 # Abstract method in Sequence, implemented in terms of list. IndexError: list index out of range Just like a list. It's not abstract (for the moment) because we implemented both of Sequence's abstract methods. Now I want to add my bit of interface, which will be abstract in Super and therefore required to implement in any subclasses. And we'll cut to the chase and add subclasses that inherit from our ABC Super. from abc import abstractmethod from collections import Sequence class Super(Sequence): # Gives us a list member for ABC methods to use. def __init__(self): self._list = [] # Abstract method in Sequence, implemented in terms of list. def __getitem__(self, index): return self._list.__getitem__(index) # Abstract method in Sequence, implemented in terms of list. def __len__(self): return self._list.__len__() # Not required. Makes printing behave like a list. def __repr__(self): return self._list.__repr__() @abstractmethod def method1(): pass class Sub0(Super): pass class Sub1(Super): def __init__(self): self._list = [1, 2, 3] def method1(self): return [x**2 for x in self._list] def method2(self): return [x/2.0 for x in self._list] class Sub2(Super): def __init__(self): self._list = [10, 20, 30, 40] def method1(self): return [x+2 for x in self._list] We've added a new abstract method to Super, method1. This makes Super abstract again. A new class Sub0 which inherits from Super but does not implement method1, so it's also an ABC. Two new classes Sub1 and Sub2, which both inherit from Super. They both implement method1 from Super, so they're not abstract. Both implementations of method1 are different. Sub1 and Sub2 also both initialize themselves differently; in real life they might initialize themselves wildly differently. So you have two subclasses which both "is a" Super (they both implement Super's required interface) although their implementations are different. Also remember that Super, although an ABC, provides four non-abstract methods. So Super provides two things to subclasses: an implementation of collections.Sequence, and an additional abstract interface (the one abstract method) that subclasses must implement. Also, class Sub1 implements an additional method, method2, which is not part of Super's interface. Sub1 "is a" Super, but it also has additional capabilities. Test it: In [52]: a = Super() --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /home/aaron/projects/test/<ipython console> in <module>() TypeError: Can't instantiate abstract class Super with abstract methods method1 In [53]: a = Sub0() --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /home/aaron/projects/test/<ipython console> in <module>() TypeError: Can't instantiate abstract class Sub0 with abstract methods method1 In [54]: a = Sub1() In [55]: a Out[55]: [1, 2, 3] In [56]: b = Sub2() In [57]: b Out[57]: [10, 20, 30, 40] In [58]: print a, b [1, 2, 3] [10, 20, 30, 40] In [59]: a, b Out[59]: ([1, 2, 3], [10, 20, 30, 40]) In [60]: a.method1() Out[60]: [1, 4, 9] In [61]: b.method1() Out[61]: [12, 22, 32, 42] In [62]: a.method2() Out[62]: [0.5, 1.0, 1.5] [63]: a[:2] Out[63]: [1, 2] In [64]: a[0] = 5 --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /home/aaron/projects/test/<ipython console> in <module>() TypeError: 'Sub1' object does not support item assignment Super and Sub0 are abstract and can't be instantiated (lines 52 and 53). Sub1 and Sub2 are concrete and have an immutable Sequence interface (54 through 59). Sub1 and Sub2 are instantiated differently, and their method1 implementations are different (60, 61). Sub1 includes an additional method2, beyond what's required by Super (62). Any concrete Super acts like a list/Sequence (63). A collections.Sequence is immutable (64). Finally, a wart: In [65]: a._list Out[65]: [1, 2, 3] In [66]: a._list = [] In [67]: a Out[67]: [] Super._list is spelled with a single underscore. Double underscore would have protected it from this last bit, but would have broken the implementation of methods in subclasses. Not sure why; I think because double underscore is private, and private means private. So ultimately this whole scheme relies on a gentleman's agreement not to reach in and muck with Super._list directly, as in line 65 above. Would love to know if there's a safer way to do that.

    Read the article

< Previous Page | 2 3 4 5 6