|
I have several variables tagged with a DescriptionAttribute , like so:
<Description("String 1")> Public Str1 As String = "One"
<Description("String 2")> Public Str2 As String = "Two" I want to retrieve the text of the description off of both Str1 and Str2. I can find examples of how to get attribute information off of classes and members of an enumeration, but nothing at all on how to get metadata that was applied to an instance of a class. I assume it is possible, but how can it be done?
|
|
|
|
|
The answer seems to be that metadata is attached only to type objects, not to instances. My examples above serve as documentation in the source and nothing more. By the time the code is running, only static objects still have metadata.
|
|
|
|
|
Hi,
I got problem with sample code provided by the FedEx Services i need to access FedEx Rates based on Zip code while running sample code getting error like "Requested package detail type is missing or invalid." Can any one help me its very urgent.
Code used by me:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
RateRequest request = CreateRateRequest();
RateService rst = new RateService();
RateReply reply = rst.getRates(request);
if (reply.HighestSeverity == NotificationSeverityType.SUCCESS || reply.HighestSeverity == NotificationSeverityType.WARNING)
{
//showReply(reply);
Response.Write("SUCCESS");
}
else
{
Response.Write(reply.Notifications[0].Message);
}
}
private static RateRequest CreateRateRequest()
{
// Build the RateRequest
RateRequest request = new RateRequest();
//
request.WebAuthenticationDetail = new WebAuthenticationDetail();
request.WebAuthenticationDetail.UserCredential = new WebAuthenticationCredential();
request.WebAuthenticationDetail.UserCredential.Key = "Key"; // Replace "XXX" with the Key
request.WebAuthenticationDetail.UserCredential.Password = "Password"; // Replace "XXX" with the Password
//
request.ClientDetail = new ClientDetail();
request.ClientDetail.AccountNumber = "AccountNumber"; // Replace "XXX" with client's account number
request.ClientDetail.MeterNumber = "MeterNumber"; // Replace "XXX" with client's meter number
//
request.TransactionDetail = new TransactionDetail();
request.TransactionDetail.CustomerTransactionId = "TEST"; // This is a reference field for the customer. Any value can be used and will be provided in the response.
//
request.Version = new VersionId(); // WSDL version information, value is automatically set from wsdl
//
// Origin information
request.ReturnTransitAndCommit = true;
request.ReturnTransitAndCommitSpecified = true;
request.CarrierCodes = new CarrierCodeType[1];
request.CarrierCodes[0] = CarrierCodeType.FDXE;
request.RequestedShipment = new RequestedShipment();
request.RequestedShipment.Shipper = new Party();
request.RequestedShipment.Shipper.Address = new Address();
request.RequestedShipment.Shipper.Address.StreetLines = new string[1] { "Sender Address Line 1" };
request.RequestedShipment.Shipper.Address.City = "tennessee";
request.RequestedShipment.Shipper.Address.StateOrProvinceCode = "TN";
request.RequestedShipment.Shipper.Address.PostalCode = "38115";
request.RequestedShipment.Shipper.Address.CountryCode = "US";
//
// Destination Information
request.RequestedShipment.Recipient = new Party();
request.RequestedShipment.Recipient.Address = new Address();
request.RequestedShipment.Recipient.Address.StreetLines = new string[1] { "Recipient Address Line 1" };
request.RequestedShipment.Recipient.Address.City = "Quebec";
request.RequestedShipment.Recipient.Address.StateOrProvinceCode = "PQ";
request.RequestedShipment.Recipient.Address.PostalCode = "H1E1A1";
request.RequestedShipment.Recipient.Address.CountryCode = "CA";
//
// Payment Information
request.RequestedShipment.ShippingChargesPayment = new Payment();
request.RequestedShipment.ShippingChargesPayment.PaymentType = PaymentType.SENDER; // Payment options are RECIPIENT, SENDER, THIRD_PARTY
request.RequestedShipment.ShippingChargesPayment.PaymentTypeSpecified = true;
request.RequestedShipment.ShippingChargesPayment.Payor = new Payor();
request.RequestedShipment.ShippingChargesPayment.Payor.AccountNumber = "AccountNumber"; // Replace "XXX" with client's account number
request.RequestedShipment.DropoffType = DropoffType.STATION; //Drop off types are BUSINESS_SERVICE_CENTER, DROP_BOX, REGULAR_PICKUP, REQUEST_COURIER, STATION
request.RequestedShipment.ServiceType = ServiceType.INTERNATIONAL_PRIORITY; // Service types are STANDARD_OVERNIGHT, PRIORITY_OVERNIGHT, FEDEX_GROUND ...
request.RequestedShipment.ServiceTypeSpecified = true;
request.RequestedShipment.PackagingType = PackagingType.FEDEX_BOX; // Packaging type FEDEX_BOK, FEDEX_PAK, FEDEX_TUBE, YOUR_PACKAGING, ...
request.RequestedShipment.PackagingTypeSpecified = true;
//
request.RequestedShipment.TotalInsuredValue = new Money();
request.RequestedShipment.TotalInsuredValue.Amount = 100;
request.RequestedShipment.TotalInsuredValue.Currency = "USD";
request.RequestedShipment.ShipTimestamp = DateTime.Now; // Shipping date and time
request.RequestedShipment.ShipTimestampSpecified = true;
request.RequestedShipment.RateRequestTypes = new RateRequestType[2];
request.RequestedShipment.RateRequestTypes[0] = RateRequestType.ACCOUNT;
request.RequestedShipment.RateRequestTypes[1] = RateRequestType.LIST;
//
// The RateRequest can be populated with one of the following:
//
// RequestedPackageSummary - Details of multi piece shipment rate request - Use this to rate a total piece total weight shipment.
// Array of RequestedPackage - Details of single piece shipment rate request or multiple packages with differing parameters.
bool bPassRateRequestPackageSummary = false;
if (bPassRateRequestPackageSummary)
{
// -----------------------------------------
// Passing multi piece shipment rate request
// -----------------------------------------
request.RequestedShipment.TotalWeight = new Weight();
request.RequestedShipment.TotalWeight.Value = 20.0M;
request.RequestedShipment.TotalWeight.Units = WeightUnits.LB;
//
request.RequestedShipment.PackageCount = "2";
request.RequestedShipment.PackageDetail = RequestedPackageDetailType.PACKAGE_SUMMARY;
//
request.RequestedShipment.RequestedPackageSummary = new RequestedPackageSummary();
request.RequestedShipment.RequestedPackageSummary.Dimensions = new Dimensions(); // package dimensions, applies to each package
request.RequestedShipment.RequestedPackageSummary.Dimensions.Length = "10";
request.RequestedShipment.RequestedPackageSummary.Dimensions.Width = "10";
request.RequestedShipment.RequestedPackageSummary.Dimensions.Height = "3";
request.RequestedShipment.RequestedPackageSummary.Dimensions.Units = LinearUnits.IN;
}
else
{
// ------------------------------------------
// Passing individual pieces rate request
// ------------------------------------------
request.RequestedShipment.PackageCount = "2";
request.RequestedShipment.PackageDetail = RequestedPackageDetailType.INDIVIDUAL_PACKAGES;
//
request.RequestedShipment.RequestedPackages = new RequestedPackage[2];
request.RequestedShipment.RequestedPackages[0] = new RequestedPackage();
request.RequestedShipment.RequestedPackages[0].SequenceNumber = "1"; // package sequence number
//
request.RequestedShipment.RequestedPackages[0].Weight = new Weight(); // package weight
request.RequestedShipment.RequestedPackages[0].Weight.Units = WeightUnits.LB;
request.RequestedShipment.RequestedPackages[0].Weight.Value = 15.0M;
//
request.RequestedShipment.RequestedPackages[0].Dimensions = new Dimensions(); // package dimensions
request.RequestedShipment.RequestedPackages[0].Dimensions.Length = "10";
request.RequestedShipment.RequestedPackages[0].Dimensions.Width = "13";
request.RequestedShipment.RequestedPackages[0].Dimensions.Height = "4";
request.RequestedShipment.RequestedPackages[0].Dimensions.Units = LinearUnits.IN;
//
request.RequestedShipment.RequestedPackages[0].InsuredValue = new Money(); // insured value
request.RequestedShipment.RequestedPackages[0].InsuredValue.Amount = 100;
request.RequestedShipment.RequestedPackages[0].InsuredValue.Currency = "USD";
//
request.RequestedShipment.RequestedPackages[1] = new RequestedPackage();
request.RequestedShipment.RequestedPackages[1].SequenceNumber = "2"; // package sequence number
//
request.RequestedShipment.RequestedPackages[1].Weight = new Weight(); // package weight
request.RequestedShipment.RequestedPackages[1].Weight.Units = WeightUnits.LB;
request.RequestedShipment.RequestedPackages[1].Weight.Value = 25.0M;
//
request.RequestedShipment.RequestedPackages[1].Dimensions = new Dimensions(); // package dimensions
request.RequestedShipment.RequestedPackages[1].Dimensions.Length = "20";
request.RequestedShipment.RequestedPackages[1].Dimensions.Width = "13";
request.RequestedShipment.RequestedPackages[1].Dimensions.Height = "4";
request.RequestedShipment.RequestedPackages[1].Dimensions.Units = LinearUnits.IN;
//
request.RequestedShipment.RequestedPackages[1].InsuredValue = new Money(); // insured value
request.RequestedShipment.RequestedPackages[1].InsuredValue.Amount = 500;
request.RequestedShipment.RequestedPackages[1].InsuredValue.Currency = "USD";
}
return request;
}
}
modified on Monday, June 15, 2009 12:56 AM
|
|
|
|
|
If it's that urgent - call FedEx's developer support.
|
|
|
|
|
A tip: when you're using a web service that requires authentication, remove the key, password, account number, postal code and meter number
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
Whoops! The OP's client might want to get FedEx to change their credentials toot sweet (as the French are wont to say) before some hackery types start using them...
That was a bit of a fox paw (as the French etc. etc.)
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
Just browsing the forums, and I'm surprised this is still here unedited.
saritha_codeproject wrote: request.WebAuthenticationDetail.UserCredential.Key = "eek!!!"; // Replace "XXX" with the Key
request.WebAuthenticationDetail.UserCredential.Password = "aaarghhh!"; // Replace "XXX"
request.ClientDetail.AccountNumber = "yikes!!"; // Replace "XXX" with client's account number
request.ClientDetail.MeterNumber = "crivens!!"; // Replace "XXX" with client's meter number
OP (Saritha) you really need to edit your post to remove the sensitive information. Also, if this is your company, or if this is a client you're doing work for, you need to let them know their account information may now be public, and get them to at least change their password, if not the whole account.
It may have just been a silly mistake, copying and pasting the code here, but it's very unprofessional to leave this exposed to anyone and everyone.
(I'll send this by PM as well, since the OP may not be reading replies to his post.)
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
I have placed it mistakenly. Thank you for your valuable suggestion.
|
|
|
|
|
Can Anyone Help me regarding Natural Language Processing??
What I need is .....
I want to match the sentance with respect of its context meaning for example i search for a pharase 'Status of the given task is updated' so with Natural Language Processing all sentences in a file that are written in the context of informing about the status of the task should be searched by algo as May be sentence in the file is 'The status of the task is completed assigned to John'.
I want any open source language processing tool ar any web service for this purpose that i can include into my project as third party tool....
Plzzzz Help....
Thanks
|
|
|
|
|
Have a read of this[^] article. It was at the top of a simple google search.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I have already check and run the whole sharpNLP/openNLP Project but it only split sentences , Tokenize and find Names etc.Realy didinot fullfill my requirement of understanding the sentence with its context
|
|
|
|
|
So, how is the computer going to "understand the context" of a sentance??
I think the thing you're going to get, that isn't a university research project, is sentance splitting, and having the code guess what the sentance is supposed to be talking about, possible scoring the sentence on keywords.
|
|
|
|
|
Natural language processing is something I got interested in a few years ago, and it is, as you say, a hugely complex and difficult area. There are plenty of research papers and experimental systems around, but we're still a long way from even reasonable "understanding" that could be used in practical situations.
I love these questions where people ask about things like this, or face recognition, or image analysis for driving, without realising just how massively complicated they are. I blame too much sci-fi on TV, with all those robots, automated translators and "intelligent computers"...
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
IMO there is nothing wrong with sci-fi on TV.
The problem is a lack of common sense, people expecting natural language processing, facial recognition, car driving, ... to be in the same league as syntax coloring a code snippet or creating a card game.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Hi guys.....
First of all Thanks for Participation...
And Well I Know thats not much easy i m asking about as i have checked so many tools/softwares regarding NLP and text mining and the first question that was in my mind exactly match with Mr. Dave "how is the computer going to "understand the context" of a sentance??" Sentance splitting is only the first part and can be done easily but only by splitting the sentence how can we know what the sentance want to be talked about..
For example if I say that I have completed my task.... and after some time i say it in this way that The status of the given task is completed....
So the context of both sentances is same but how can computer recognize that thing that in both sentences actually there is information about the status of task. Can I Extract it???????
|
|
|
|
|
maybe first run a sentance splitting and the run everything through an artificial neural network?
|
|
|
|
|
Will you please explain a little more how to run through artificial neural network?????
modified on Tuesday, June 16, 2009 1:38 AM
|
|
|
|
|
Don't you think that Microsoft would have added this functionality to SQL Server if it were that easy to implement?
Protege[^] and OWL come to mind, but that's kinda overkill for your average bussiness-application. This technology is interesting for Google and Wolfram|Alpha, but these also got the resources for this kind of research
I are troll
|
|
|
|
|
List Of Projects
Projects that I had worked during the period - Feb 2008 to Jan 2009…
1. ARAP/OA/FA From 6-Jun-2008 To Till Now
2. WMS From 15 Dec 2008 To Till Now
3. EMS From 20 Jan 2008 to Till Now
4. AMS From April 2008 To May 2008
5. ICD From Jan 2008 To March 2008
Role and Responsibilities
1.Creating Design Document of Project
2.Developing Database structure
3.Coding of Assigned web forms
4.Testing of the Application Work Flow
5. Providing Demo and Training to Client
5 Handling Change Request/Enhancements in the application.
Details Project List
1) ARAP( Account Receivable & Account Payable)
Client: Company product (In defended Module for OA Application )
Tools: Microsoft Visual Basic .NET 2005 , Ajax
Back end: MSSQL-Server 2005
Team Size: 1
Project Details:
ARAP is developed as an Independent module which helps the user organizations to track the customer’s amount receivables and the vendor’s amount to be paid.
This module [application] gets the relevant information [invoice details (sales & purchase), Debit note details (sales & purchase)] from the operational modules.
Responsibility:
Development & enhance the code in this project.
Database Design and UI Design.
Bug Fixing and Testing.
2) OA(Operation Accounting)
Client:Company product (In defended Module for all Logistic Project )
Tools: Microsoft Visual Basic .NET 2005 , Ajax
Back end: MSSQL-Server 2005
Team Size: 3
Project Details:
OA means Operation Accounting module. This application is an independent module useful for generating invoices, maintaining the invoices received and track the accounts receivable and accounts payable. This system will have the add-on fields to the customer master which will store the accounts receivable parameter details for the customer [customer wise payment terms]
Similarly the system will have the add-on fields to the vendor master which will store the accounts payable parameters for the vendor [vendor wise payment terms]
Responsibility:
Develop & enhance the code in this project.
Bug Fixing and Testing.
3) WMS( Warehouse Management System)
Client: BLR , V-Trans
Tools: Microsoft Visual Basic .NET 2005 , Ajax
Backend: MSSQL-Server 2005
Team Size: 4
Project Details:
WMS is a user friendly Warehouse Management System, designed to track the
activities performed in a Distribution Center (DC)/ Warehouse. It automates entire
process flow of warehouse right from receiving of goods in the warehouse to
managing them till finally shipping to customers. Our Warehouse Solution is
designed for all sizes of businesses, warehouses, and budgets.
Responsibility:
Responsible for study of System that include the Detailed Module Plan.
Develop & enhance the code in this project.
Bug Fixing and Testing.
Demonstration to client
Providing Training at client site
On line client Support
4)ICD(Inland Container Depot)
Client: Company product
Tools: Microsoft Visual Basic .NET 2005
Backend: MSSQL-Server 2000
Team Size: 4
Project Details:
ICD is a user friendly Inline container Depot, designed to track the
activities performed in a ICD. It automates entire process flow of ICD right from
booking to Gate pass in / Gate Pass Out
Responsibility:
Develop the Web Controls in this project.
Bug Fixing and Testing.
5) EMS(Expense Management System)
Client: Company product ( In defended Module for all Project)
Tools: Microsoft Visual Basic .NET 2005
Backend: MSSQL-Server 2005
Team Size: 2
Project Details:
Expense Management System is used to Capture the Expenses and the same will go through the approval process for generating voucher and debit note
Responsibility:
Develop & enhance the code in this project.
Bug Fixing and Testing.
|
|
|
|
|
Hello
Am working on a system but currently am stuck on reporting. One of my columns (Rates) is very dynamic depending on settings within the system. Other columns are TimeIn, TimeOut, Duration, ... and the row of course is the the person's names. How can I tackle this especially using cross tabs or any other way?
Thanx
|
|
|
|
|
Could you explain a little better what your report is trying to do? If we knew a little bit more about your table structure, we could try and help.
|
|
|
|
|
How to get the list of windows components installed on a Windows Server 2008?
Roman
|
|
|
|
|
I have not seen that OS yet. Does it not have the Add Remove Programs with a list of installed components?
|
|
|
|
|
How to get the list of windows components installed on a Windows Server 2008 from my C# code?
|
|
|
|
|
Have you looked into using this[^]?
|
|
|
|