Unofficial Programming Thread III

Post » Tue Aug 03, 2010 8:29 am

So a program that looks at it's own executable and decompiles it to original source code?

1) No, and
2) that's impossible.

The program needs to output its own source code to stdout (the thing C writes to with printf). No decompiling involved, the program just needs to be capable of printing out its own source code exactly.
User avatar
Kelly Tomlinson
 
Posts: 3503
Joined: Sat Jul 08, 2006 11:57 pm

Post » Tue Aug 03, 2010 6:09 pm

That is tricky. Seems interesting though. I'll try it. Thanks!
User avatar
Timara White
 
Posts: 3464
Joined: Mon Aug 27, 2007 7:39 am

Post » Tue Aug 03, 2010 7:34 pm

Anyone have any ideas for a programming project. I'm completely out of ideas.

I just worked out my own toggle for the Windows Update service to disable/enable the service and then start and stop it. The enabling is for the startup type to keep it from auto starting, and start/stop is to actually set it in motion. Those familiar with windows services will know the difference. Since I like to keep the service disabled but then need it to do updates every so often.

Just find little things like that and write the small program. It even gave me ideas of what to add to my class library. I even sat down and rewrote a program to rewrite a confuration file for a program to change values in the middle of it (800+ line file) to save timeand effort when I switch monitors.
User avatar
Shirley BEltran
 
Posts: 3450
Joined: Wed Jul 26, 2006 4:14 pm

Post » Tue Aug 03, 2010 10:39 pm

To all .NET developers: I am starting a large project to keep track of personal items on Ebay. Initially this won't integrate with your account so will need some manual input but it is planned. I will be doing the UI in WPF and the coding in C# but anyone who knows VB.NET or can wrap C++ code for use with .NEt is welcome to join in on this.

This stems from me wanting to sell things on Ebay but keep my own records with more information for offline viewing, sort of like an inventory system. I know you can probably do all of this via Ebay but I need a decent sized project to work on that others might benefit from. I am thinking I will store the details in a SQL Compact database on the local system, and it will have two tables. The two tables will be Inventory (and Ebay details related to it NOT LOGINS), and a Customer table to keep track of each buyers information for reference, and you can cross check the inventory item to the buyer easily. More details are being slowly worked out but if anyone has more ideas that could benefit this it would be great.

I have the summer free, minus work of course, to work on it but the more people the sooner it can get done. Plus a good team project always looks good to others.
User avatar
Amanda Leis
 
Posts: 3518
Joined: Sun Dec 24, 2006 1:57 am

Post » Tue Aug 03, 2010 12:17 pm

does anyone see any errors in this?

public class DebugFour4
// This class discounts prices by 10%
{
public static void main(String args[])
{
int price = 100;
double price2 = 100.00;
tenPercentOff(price);
tenPercentOff(price2);
}
public static void tenpercentOff(int p)
{
double newPrice = p * .90;
system.out.println("Ten percent off");
System.out.println("New price is " + newPrice);
}
public static void tenPercentOf(double p)
{
double newPrice = p * .90;
System.out.println("Ten percent off");
System.out.println("New price is " + newPrice);
}
}

User avatar
Kellymarie Heppell
 
Posts: 3456
Joined: Mon Jul 24, 2006 4:37 am

Post » Tue Aug 03, 2010 3:02 pm

To all .NET developers: I am starting a large project to keep track of personal items on Ebay. Initially this won't integrate with your account so will need some manual input but it is planned. I will be doing the UI in WPF and the coding in C# but anyone who knows VB.NET or can wrap C++ code for use with .NEt is welcome to join in on this.

This stems from me wanting to sell things on Ebay but keep my own records with more information for offline viewing, sort of like an inventory system. I know you can probably do all of this via Ebay but I need a decent sized project to work on that others might benefit from. I am thinking I will store the details in a SQL Compact database on the local system, and it will have two tables. The two tables will be Inventory (and Ebay details related to it NOT LOGINS), and a Customer table to keep track of each buyers information for reference, and you can cross check the inventory item to the buyer easily. More details are being slowly worked out but if anyone has more ideas that could benefit this it would be great.

I have the summer free, minus work of course, to work on it but the more people the sooner it can get done. Plus a good team project always looks good to others.

Why SQL Compact exactly?
User avatar
vicki kitterman
 
Posts: 3494
Joined: Mon Aug 07, 2006 11:58 am

Post » Tue Aug 03, 2010 3:47 pm

Does anyone here use C++/CLI?
User avatar
Vincent Joe
 
Posts: 3370
Joined: Wed Sep 26, 2007 1:13 pm

Post » Tue Aug 03, 2010 7:48 am

So I decided to just use Microsoft Access 2007 for the Ebay database and not worry about creating my own program for it. However I now have a project in mind I plan to follow through with and it is a Minecraft server wrapper using C# and .NET 4.0. I found out how to at least connect it to the serever so I just need to implement all my commands (console version) or build a WPF interface for the GUI version. This will take some work but will be nice when finished.
User avatar
Amiee Kent
 
Posts: 3447
Joined: Thu Jun 15, 2006 2:25 pm

Post » Tue Aug 03, 2010 9:18 am

Does anyone here use C++/CLI?

Why would anyone want to?

Ok. If you want to bridge unmanged and managed code sure, otherwise I can't see why anyone would want to.
User avatar
.X chantelle .x Smith
 
Posts: 3399
Joined: Thu Jun 15, 2006 6:25 pm

Post » Tue Aug 03, 2010 1:28 pm

Why would anyone want to?

Ok. If you want to bridge unmanged and managed code sure, otherwise I can't see why anyone would want to.

Well I'm not entirely even sure what it is to be honest. Basically C++ modified to run on .NET? Why not just have C#? What's the point of it?
User avatar
steve brewin
 
Posts: 3411
Joined: Thu Jun 21, 2007 7:17 am

Post » Tue Aug 03, 2010 9:55 pm

Does anyone know of a good way to handle command line arguments in C#?
Say I want to have the command as follows: send filename destination

If the filename is broken up into multiple words how would I handle it? I can't break it up by spaces because the name will get chopped up and will cause an error.
User avatar
renee Duhamel
 
Posts: 3371
Joined: Thu Dec 14, 2006 9:12 am

Post » Tue Aug 03, 2010 11:14 am

Does anyone know of a good way to handle command line arguments in C#?
Say I want to have the command as follows: send filename destination

If the filename is broken up into multiple words how would I handle it?

Enclose it in quotation marks.
User avatar
Amy Siebenhaar
 
Posts: 3426
Joined: Fri Aug 10, 2007 1:51 am

Post » Tue Aug 03, 2010 4:12 pm

So my custom Minecraft server wrapper is coming along great. I ended up with WPF for it. So far it handles commands the same as the normal server but keeps a count of the players, and can send a custom message to people when they login, as well as send timed messages to all players. Going to add a whole second window though for more detailed information and my own commands as well.
User avatar
Neil
 
Posts: 3357
Joined: Sat Jul 14, 2007 5:08 am

Post » Tue Aug 03, 2010 1:30 pm

Well I'm not entirely even sure what it is to be honest. Basically C++ modified to run on .NET? Why not just have C#? What's the point of it?
Native-Managed code interop in most cases. This http://www.gotw.ca/publications/C++CLIRationale.pdf should be a good read on the topic.
User avatar
Da Missz
 
Posts: 3438
Joined: Fri Mar 30, 2007 4:42 pm

Previous

Return to Othor Games