|
I do; this is not all code. You've prolly got drawing-events assigned, check out what happens if you put them into comments. Or paste enough code to reproduce the problem on the board
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
In a C# 2008 console application, I need to send doucments to a web service. This is marked with the following xml: subDocuments attachmentId="xx3">.
I need to send word documents, excel spreadsheets, and PDF files back to the web serivce. Can you tell me how I would accomplish this goal using code?
The xml that I need to generate along with the documents is listed below:
<ns2:RetsubPack serviceSuccessful="true" returnCode="0" xmlns:ns2="http://test1/test">
<statusDescription>Package Details retrieved Successfully</statusDescription>
<PackageDetails>
<Type>type2</Type>
<Category>dog</Category>
<ContName>Co 1</ContgName>
<TotalTrans>0</TotalTrans>
</PackageDetails>
<NumberOfDocuments>3</NumberOfDocuments>
<subDocuments attachmentId="xx1">
<DocumentMetadata>
<DocumentTypeCode>Spreadsheet1</DocumentTypeCode>
<PackageId>pkg1</PackageId>
</DocumentMetadata>
</subDocuments>
<subDocuments attachmentId="xx2">
<DocumentMetadata>
<DocumentTypeCode>Spreadsheet2</DocumentTypeCode>
<PackageId>pkg1</PackageId>
</DocumentMetadata>
</subDocuments>
<subDocuments attachmentId="xx3">
|
|
|
|
|
Perhaps if you could be much more specific with your question. Exactly what is it that you're having trouble with?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I do not know how or where to get started at.
|
|
|
|
|
Start by investigating webservices. Create a basic one from a tutorial and work from there.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Hi, I saw many open source programming projects but many of them are hard for the first time. Do you know any resources for my need?
|
|
|
|
|
atoi_powered wrote: many of them are hard for the first time
You should then be focusing on smaller projects that fit your skill level. Why not work on your own small projects that you feel confident in doing, and as you progress, add some advanced ideas.
There are plenty of articles around here that you can start to get some ideas. What topics in programming are you interested in?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Sorry I don't understand the programming topics. You mean like Web-based apps or so on?
|
|
|
|
|
Whatever interests you...
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Just simple programs for PC like one written for supermarkets (very simplest one just obeying the basic procedures).
|
|
|
|
|
I do not know what your level of expertise is, and a simple POS (point of sales) system at its most basic level might be okay. Just start thinking about the basic procedures and experiment around and learn. Just as a pointer, I will not give code out how to do this type of system, as it would not help you in your learning
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
.NET Book Zero[^] is a good introduction to both .NET and C#, with some easy samples to help you learn from.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
It's not what I was looking for but thanks. It's good and also, necessary!
|
|
|
|
|
Given your question I would say it's exactly what you are looking for.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I am a student of computer science given a topic to implement a lossless or lossy coding. this topic is entirely new to me. Can anybody tell me how to start and go about it?
Mubi
|
|
|
|
|
I would start by reading up on the various different types.
|
|
|
|
|
|
I'd suggest starting with LZ77: http://en.wikipedia.org/wiki/LZ78[^]
- It is one of the earlier most widespread lossless algo.
- It has been the base for many other algo.
- The compress and decompress code can be done in less than 100 lines of code.
It might take a while, but get a copy of the code and study it until you understand what every single line is doing. Then try to modify it and understand how all the parameters are inter-related.
...cmk
The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack
|
|
|
|
|
I have an explosion sprite, with 16 frames.
Everytime the player collides with an asteroid, the gamestate is set to loseScreen, and when the loseScreen is the gamestate, the lose() function is continually called until the gamestate changes.
Inside the lose() function, this code draws the animated spritesheet, which runs through the 16 frame animation. It should always start from frame 0, but it doesn't always. Sometimes it starts at frame 10, and only runs for 6 frames before finishing. That's the issue. The code inside the lose() function to draw the explosion animation is as follows:
expFrameID = 0;
expFrameID += (int)(time * expFPS) % expFrameCount;
Rectangle expRect = new Rectangle(expFrameID * expFrameWidth, 0, 63, 63);
spriteBatch.Draw(explosion, shipLocation, expRect, Color.White, 0f, new Vector2(32, 32), 1.0f, pickupSpriteEffects, 0.1f);
if (expFrameID == 15)
expIsDrawn = true;
The time variable is as follows, it gets the total elapsed game time.
time = (float)gameTime.TotalGameTime.TotalSeconds;
I've tried changing TotalGameTime to ElapsedGameTime, nothing changed.
It's the following line from the lose() function that I believe is the issue, perhaps:
expFrameID += (int)(time * expFPS) % expFrameCount;
It works, and it animates. However it doesn't always start at frame 0. it starts from random frames between 0 and 16, but it still runs correctly at 16 frames per second.
So, how do I get it to always start from frame 0?
Would I solve my issue by making a new time variable that starts a timer from 0 only when the lose() function is called? How do I do that?
|
|
|
|
|
In a C# 2008 application, I need to write code that will generate the following xml. Since
I am new to working with xml, I am wondering if you can tell me and/or
point me to a reference that will show me how to generate the following xml:
<xs:element name="AddDocuments">
<xs:complexType>
<xs:annotation>
<xs:documentation xml:lang="en">
adding Documents
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name ="PckId" type="ept:PackId"/>
<xs:element name ="FDocs" type="ept:FDocs" minOccurs="0" maxOccurs="10"/>
</xs:sequence>
<xs:complexType name="FDocs">
<xs:annotation>
<xs:documentation> Refer to the attributes doc</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="FDocMetadata" type="ept:FDocAttr">
<xs:annotation>
<xs:documentation>
This structure.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="attachmentId" type="ept:AttachmentId"/>
</xs:sequence>
</xs:complexType>
|
|
|
|
|
|
For something that small, I'd use an System.Xml.XmlDocument .
I'd use an System.Xml.XmlWriter for more complex documents.
|
|
|
|
|
In a C# 2010 desktop/console application, I am currently using linq to sql to connect to a sql server 2008 database. So far in this application, I have used straight linq to connect to the database. However now I need to obtain data from various tables so that the data can be setup for a new user to access the data. The database people at my job say it is easier to write the logic using a sql script they can give me.
Thus my question is, can linq to sql use 'stright sql' somehow? Basically can I have linq to sql use a stored procedure? If so, can you tell me and/or point me to a reference that will show me how linq to sql can use a stored procedure?
|
|
|
|
|
Take a look at this tutorial Retrieving Data Using Stored Procedures[^]. It is part 6 of an excellent LinQ to SQL tutorial.
Hope this helps
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
see below link ..
it will help ful for you
Link 1[^]
|
|
|
|