|
Now now, I'm not that great..
I'd like that brain interface thing though
Anyway, 19 is division, and I still don't understand the control flow. It's weird. 29 is definitely involved somehow.
For example, take
import units.types.Base;
class Test
{
object _first;
object _second;
somefunction()
{
return 1 / otherfunction();
}
otherfunction()
{
return 1;
}
}
Compiled to:
44584500 72000000 00000000 07E54100 // header stuff?
01 // import
756E6974 732E7479 7065732E 42617365 00 // import name
04 // class
54657374 00 // class name
02 // field
5F666972 737400 // field name
02 // field
5F736563 6F6E6400 // field name
03 // function def
50000000 // pointer to function code (little endian, add 0x10)
736F6D65 66756E63 74696F6E 00 // fundtion name
03 // function def
64000000 // pointer to function
6F746865 7266756E 6374696F 6E00 // function name
05 // end of class?
00 // ???
27 // ?? always seems to start a function, no idea what it does
00 // possibly an argument to the 27?
06 0000803F // load 1
0E 03 // load 3rd thingy of this-object (otherfunction)
2D 00 2F // probably something to do with invoking that function
19 // the division
29 63000000 // jump to 00000063 ?? (see label1)
0A // dunno, always seen near the end of a function
00 // dunno either, always at the end of a function, label1 points here
27 // already covered
00 //
06 0000803F // load 1
29 71000000 // jump to label2
0A // ??
00 // label2 points here
Label refs are little endian absolute addresses and start at 0 directly after the 16-byte header.
|
|
|
|
|
Awesome stuff
You certainly got farther then I ever did
you see if I can get a good decompiler for the dxe files
I can add new vehicles to the game, like boats and new tanks
cause right now there are no boats in it and you can only mount
ground guns. You can't drive anything or mount any of the guns on the vehicles
but ai can, so that just means we will be able too
I have made new vehicles with 3ds max and right now I can only replace one of the ingame
vehicles, but I did manage to get the Stryker and apache working and they only worked
in the first version of the game but not in the 2nd version
if you've never seen it or tried it, it's an Awesome first person shooter
it uses XML files for the mission scrips so thats easy amd even comes with
a map editor so you can create your own missions
this game has been out for a long time and will never get old
because of the new missions
I have also modded all of the Grand theft auto versions aswell
well enough of that, I'm rammbling
check out Cristina Cifuentes reverse techniques now that is a smart woman
|
|
|
|
|
I have this code so far, and am having issues with lining up the information output correctly. I'm not sure what I'm doing wrong at the moment. It's mainly the bold section that I can't get to output correctly
It is supposed to look like
Price .10 .15 .20 .25
--------------------------------------
10.00 1.00 1.50 2.00 2.25
15.00 1.50 2.25 3.00 3.25
20.00 2.00 3.00 4.00 5.00
25.00 2.50 3.75 5.00 6.25
But it looks like
.10 .15 .20 .25
10.00 15.00 20.00 25.00
1.00 1.50 2.00 2.25 1.50 2.25 3.00 3.25 etc.
namespace TippingTable2GUI
{
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
}
private void buttonCalc_Click(object sender, EventArgs e)
{
double dinnerPrice = Convert.ToDouble(minPrice.Text);
double tipRate;
double tip;
double maxRate = Convert.ToDouble(maxTax.Text);
double lowRate = Convert.ToDouble(minTax.Text);
double minDinner = Convert.ToDouble(minPrice.Text);
double maxDinner = Convert.ToDouble(maxPrice.Text);
const double TIPSTEP = 0.05;
const double DINNERSTEP = 10.00;
tipRate = lowRate;
label1.Text = "";
label6.Text = "";
label7.Text = "";
for (tipRate = lowRate; tipRate <= maxRate; tipRate += TIPSTEP)
label1.Text = label1.Text + String.Format(" {0, 8}", tipRate.ToString("F"));
label1.Text = label1.Text + String.Format("{0, 8}", tipRate.ToString("C"));
const int NUM_DASHES = 50;
for (int x = 0; x < NUM_DASHES; ++x) ;
while (dinnerPrice <= maxDinner)
{
label6.Text = label6.Text + String.Format("{0, 8}", dinnerPrice.ToString("C"));
while (tipRate <= maxRate)
{
tip = dinnerPrice * tipRate;
label7.Text = label7.Text + String.Format("{0, 8}", tip.ToString("F"));
tipRate += 0.05;
}
dinnerPrice += DINNERSTEP;
tipRate = lowRate;
}
}
}
|
|
|
|
|
Use a mono spaced font and pad you text
Use a proper label printing tool
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
There are a number of problems there, such as this:
for (int x = 0; x < NUM_DASHES; ++x) ;
Which does nothing.
And the very wasteful way you are assembling strings: they are immutable, remember, which means that each time you add two strings, you create a new, bigger string and copy both originals into it. You should consider looking at StringBuilder if you are going to do that in future.
But...as Mycroft said, a monospaced font and manual padding will work.
I just wouldn't do it.
Instead, I would use a DataGridView to display the data - it's a lot prettier, a lot more flexible, a lot friendlier for the user, and once you are used to it a lot easier to use.
Try it! Drag one onto your form, and give it 5 columns, with appropriate headings.
Then just add rows - MSDN will help you with an example.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
I agree with OriginalGriff if you don't have to output in a cmd window eg. try using a grid or listview or something.
aligning text into columns is not as easy as it looks.
|
|
|
|
|
i want to open emplyee profile by clicking datagrivew cell how it possible ? first i load all emplyees in datagribview and now i want to make click event on employee to show it profile in other form...
i am sok
|
|
|
|
|
Add an event handler for the function you wish to capture: CellClick, CellDoubleClick etc. You can do this in the properties window of the DataGridView, or just double click in the cell in the Form Design window in Visual Studio.
Veni, vidi, abiit domum
|
|
|
|
|
Create a cell click handler dynamically:
dataGridView1.CellClick += new DataGridViewCellEventHandler(dataGridView1_CellClick);
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
}
|
|
|
|
|
When i try to deserialize hexadecimal value it throws following exception?
hexadecimal value 0x03, is an invalid character.
While i am trying serialize ascii charactors it's not providing any type of issues,but when i try to deserialize it throws above exception.How to solve above issue?
Here i have attached sample project PFA.
https://skydrive.live.com/redir?resid=4A762A0B7460096A%21171
In above sample project ,i can able to serialize the input data but after serialization successful i can't do deserialization ,it throws some exception.Please give some solution .If unable to deserialize hexadecimal to ascii from serialized data means why should you allow to serialize the ascii characters?
|
|
|
|
|
I don't think anyone is going to download your project. It would be better to post the relevant code here.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
What's in your file that you serialize is not a representation of a hexadecimal value: it's the character-code "3," which is turned into a glyph when you see it on screen that looks like a super-scripted tiny "L." The CodeProject editor here will not display that character-code.
The writing process, whether you use StreamWriter or XmlWriter, cannot know your intent from such "raw" use of character codes outside the usual range.
The solution is to express your intent that the content is hexadecimal by using an Xml "legal" data format like
1#x3;: a
2#x3;: s
3#x3;: d
4#x3;: f
5#x3;: g
Which will serialize (if you use an XmlWriter) to:
<?xml version="1.0" encoding="utf-8"?><TestClass xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><No>25</No><Name>TestUser</Name><Address>No 4,East St</Address><AsciiCharactors> 1#x3;: a
2#x3;: s
3#x3;: d
4#x3;: f
5#x3;: g</AsciiCharactors></TestClass> The legal formats for Xml are provided in this document: [^]. Note the following:
"If the character reference begins with " &#x ", the digits and letters up to the terminating ; provide a hexadecimal representation of the character's code point in ISO/IEC 10646. If it begins just with " &# ", the digits up to the terminating ; provide a decimal representation of the character's code point." If you used the format " &#x??; ":
... not able to display that format correctly using CodeProject's editor ...
You would get this as output (using XmlWriter):
<TestClass xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><No>25</No><Name>TestUser</Name><Address>No 4,East St</Address><AsciiCharactors> 1: a
2: s
3: d
4: f
5: g</AsciiCharactors></TestClass>
“But I don't want to go among mad people,” Alice remarked.
“Oh, you can't help that,” said the Cat: “we're all mad here. I'm mad. You're mad.”
“How do you know I'm mad?” said Alice.
“You must be," said the Cat, or you wouldn't have come here.” Lewis Carroll
modified 15-Feb-14 5:39am.
|
|
|
|
|
rkarthickbeece wrote: 0x03, is an invalid character
No it isn't; it's a Ctrl-C. I've had to deal with that at times -- generally you can just filter out characters like that before trying to process the data.
This space intentionally left blank.
|
|
|
|
|
Dear friends and Bosses...
I am Arif. I am very new to programming world. Trying to make my 15 years old dream come true. Becoming a developer.
1. I have a very little knowledge about C. Never developed any application.
2. Want to become a Web developer then App developer.
3. Want to learn C#.
I am very confused about OOP. And so about C#.
Is there any book or website or reference about anything that tell me the similarities about C and C#.
Like USING SYSTEM in C# is as same as #include <headerfile.h>...
and also any very easy to understand book for C#... that explains everything including the c# terminologies like INSTANCE, METHOD, BUSINESS CLASS....like that...please....thanks a lot.
|
|
|
|
|
They're exactly the same except for the parts that are different.
Member 10583150 wrote: Like USING SYSTEM in C# is as same as #include <headerfile.h>...
No. In C# using directives are optional, but in C you won't be able to do much without including header files somehow.
This space intentionally left blank.
modified 14-Feb-14 19:31pm.
|
|
|
|
|
thanks a lot for your reply. that INCLUDE was an example. but is there book or website or youtube vdo do you know where i can learn c# from. I do not have any OOP idea. at all. its it is very confusing. the terminologies are extremely hard for a beginner. and i donno why none explains it properly.
|
|
|
|
|
PIEBALDconsult wrote:
They're exactly the same except for the parts that are different. |
Which are most of them, especially the ones that look the same.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
|
+5 for the links!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
The free e-book, .NET Book Zero[^] by Charles Petzold, is a very useful starter.
Veni, vidi, abiit domum
|
|
|
|
|
To add to the other examples, stop trying to compare C and C#: they are completely different languages which happen to share a similar looking syntax If you assume that all you need to know are "the differences" that you are going to get a completely wrong idea about C# and it will not work well for you.
If you want to learn C#, forget all you know about C - it will only confuse the issue. And get a good book (or a training course if you can) and do it completely, starting from the beginning and doing each and every exercise.
You've had some suggestions, and this is another: Pro C# 5.0 and the .NET 4.5 Framework
http://www.amazon.co.uk/Pro-NET-Framework-Professional-Apress/dp/1430242337[^] - I learned C# from one of the earlier incarnations of this and it covers the material well.
Might be a little heavy duty for a complete beginner to computers though!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Hi All, im having the following problem with a project.
Im trying to use the following (for a search bar button) to pull data from the Product table I have in my SQL db. However when I hit the search button, I get an error with the conn.Open() line
protected void btnsearch_Click(object sender, EventArgs e)
{
SqlCommand search = new SqlCommand("spSearchProductByName", conn);
search.CommandType = CommandType.StoredProcedure;
conn.Open();
search.ExecuteNonQuery();
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = search;
DataSet ds = new DataSet();
da.Fill(ds, "ProductName");
gvSearchResults.DataSource = ds;
gvSearchResults.DataBind();
conn.Close();
Any help would be appreciated
|
|
|
|
|
Remember, we're not mind readers and can't see your screen. So we have no idea what "error" you're receiving. Have you tried initializing conn ? Also, wrap your code in a try/catch block so you can inspect the exception and thereby identify the problem.
/ravi
|
|
|
|
|
Since you get an error when trying to open the connection, the most likely things are that:
1) You haven't initialized the connection string into the SqlConnection object
2) Your connection string is wrong.
So use the debugger, look at the connection and at the error object and see what it says. Then check your connection string. Chances are it's not valid - it could be your username is wrong, or the PC instance. But we can't tell from here!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Other possible errors
- Database isn't up
- Database isn't accessible from current location.
|
|
|
|