|
when the user turns above 40
:Gong: 歡迎光臨 吐 西批 :Gong:
|
|
|
|
|
Code2326 wrote: a book
and a long, long time ago it was. Your best bet is to find a good book ( preferably one that doesn't have "21 days" or "For Dummies" in the title ). This site is a good place to learn from, too. People are pretty helpful with any questions you have, as long as you don't use the words "urgent" or make it sound like your problem is a school assignment problem.
Code2326 wrote: but im new here
Welcome aboard
That's no moon, it's a space station. - Obi-wan Kenobi
|
|
|
|
|
Code2326 wrote: How did you learn to program?
Is it from the internet? a book?
As it was about five years before the web even existed, care to guess?
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
Welcome Newbie!!!!
Don't worry we are all 'newbies' to something in the world of computers and development.
Code2326 wrote: How did you learn to program?
Trial and Error
Hint: if you keep running into a dead-end get up and walk way for awhile:i.e. hour, day, whatever it takes.
Code2326 wrote: Is it from the internet? a book?
One realy big word "GOOGLE" you can find almost anything or help you need out there on the internet.
Hint: When searching Google, if developing in C# use a search like: "C# OleDBConnection". This will narrow your results down to mostly C# results.
Get a couple of good books sometimes your mind can figure things out better on the 'can' than in front of the computer. I have found some very good -basic- information out of some of those 'learn in 24 hours' or 'are you a dumby' these books not a real good refernce but can show some basics.
And always remmeber CP check the boards and articals--lots and lots of help.
Code2326 wrote: When you first learn your language, was it hard and how long did it take you to start to create simple programs?
Hello World!!! an't she great Everything can be diffucult the first time but the more you do it the more you can learn.
Good Luck,
Jason
Programmer: A biological machine designed to convert caffeine into code. * Developer: A person who develops working systems by writing and using software.
[ ^]
|
|
|
|
|
During the 1970's at a mainframe manufacturers training establishment in London.
COBOL, Assembler and PLAN on these mainframes - CDC6600, IBM360 & ICL1900 Series. All using 80 column coding forms whose contents were transfered to either punched card or paper tape by an external bureaux. And what fun correcting these "typing" errors - each punched card had to be individually checked for correctness else very expensive and wasted time-shared computer time.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Code2326 wrote: im new here and i want to understand some of the experiences you had.
Welcome aboard. Your question would attract more those hot-shots old timers who programmed virtually with every language imaginable. They'd remmember the good ol' days, and show off how they programmed on machines that existed maybe even before the invention of electricity. You read this, you get depressed. Well, don't. Most of the people who answer here in C# forums -I can name many-, are C++ old timers -including me, though my c++ became real rusty these days-. They have one big advantage you still don't have yet you can aquire: Experience.
Each day you program you grow in that field. Books, internet, seminars, magazines, etc... aren't a sufficient source to learn from. Programming is merely problem solving using code, and until you face some programming problems, and solve them youself -or less educational: get stuck in them and see how they are solved by a pro-, you won't learn.
To cut things short -I don't like long posts-, you can learn from the following sources:
1- Books: You should choose the book that suites you, but know that any book talking about an entire language -e.g. C#, C++, Java, etc..- is usually introductory. I'd go for the "For Dummies", they are very basic and fun to read.
2- Google: Use it after you grasp the basics, and when you get stuck in a certain problem. you can search for quick solutions or hints for your problem.
3- CodeProject Articles: Use it if you need to know more about a certain topic, usually not covered -or not covered well-, in books. e.g. Sockets, Remoting, Cryptography, etc...
4- CodeProject Forums: Use it when you really get stuck while working andd need a push in the right direction. Or you can browse it to see what problems faced other people, and how they are solved. This could be very educational. Also there are other sites like CP. Look for them.
5- Read examples and source codes. You can find some interesting examples in Microsoft's website. I belive they are called "101 examples in C#".
6- You can subscribe in magazines, or read newsletters to get updates after you grasp the basics, but don't start with them.
7- Code youself. Programming is mainly based on experienced not just knowledge. Programming is like art, you have to practice it.
Code2326 wrote: When you first learn your language, was it hard and how long did it take you to start to create simple programs?
Each person is a special case. Don't worry about others. Rather concentrate on what is best for you. Before you go for any language, you should ask youself:
1- Why am I learning programming? What do I want to do with it?
2- Why am I interested in this particluar language? What benefits does it offer me that no other language does?
If you truely answer both question, you should be in the right direction.
And yes, programming isn't easy -though it's becoming much easier these days-. It's also virtually limitless. You can spend you life scratching the surface, happy with the small simple programs you make -you can achieve that in less than 2 weeks-, or dive into the deep, where sharks struggle for best practices -that's more like a lifetime-. It's your choice.
Good luck! See you again on the forums.
Regards
|
|
|
|
|
You asked on two forums C++/C#
|
|
|
|
|
|
I think he/she want all views not only C# programmers or C++ programer
|
|
|
|
|
There are numerous ways to learn but I can let you know what worked best for me. I started going to Grad school for Masters in CS, I got about 1/2 way done and felt I had no real world experience for which I could change my occupation.
I found defining a problem and then coding to solve the problem to be the easiest way to learn. Come up with an idea and just start coding it. You will come across numerous issues but everything has been done before so the solution should be available through Google.
I found studying for certification also helps, gives you a goal to strive for.
Read a book like Code Complete before you start, pick a language, read up on the syntax on the web to gain a high level understanding, create a project idea, and code away.. Just my 2 cents
|
|
|
|
|
I'm looking for a lazy loading solution in c#.
The idea is, to have a kind of object factory, which will be responsible for creating my entity objects.
When a property of such an object is accesed and it is not yet loaded, the factory
(or a magic watcher) will be able to pause the execution flow for a while (maybe that step is not necessary)
load the missing data (don't know how to specify, from where to load that data----maybe via attributes) and
return to the flow.
My entity objects, do not have a possibility to load the missing data by themselves, because they
are only data containers having private members, which are accessible via public properties.
These objects need to be filled with their data from outside, and therefore many lazy loading solutions
won't work here.
Maybe anyone of you knows the solution for my problem?
Thank You in advance!
Greetz!
cyberjoe
|
|
|
|
|
cebyrjoe2 wrote: The idea is, to have a kind of object factory, which will be responsible for creating my entity objects.
When a property of such an object is accesed and it is not yet loaded, the factory
(or a magic watcher) will be able to pause the execution flow for a while (maybe that step is not necessary)
load the missing data (don't know how to specify, from where to load that data----maybe via attributes) and
return to the flow.
Have you considered using properties?
public class MyClass
{
private bool isLazyLoaded;
private string someData;
public string SomeData
{
get
{
DoLazyLoadIfNecessary();
return this.someData;
}
}
private void DoLazyLoadIfNecessary()
{
if (!isLazyLoaded)
{
}
}
} Once you have this only the code that does the lazy load will access the lazy loaded fields directly. Everything else goes through the property.
cebyrjoe2 wrote: My entity objects, do not have a possibility to load the missing data by themselves, because they
are only data containers having private members, which are accessible via public properties.
These objects need to be filled with their data from outside, and therefore many lazy loading solutions
won't work here.
I should have read the whole thing before typing out that example - Sod it, I've typed it now so I'm keeping it!
Each object will need to know at least an ID so that it can go and request its data from a DAL or some such thing.
Many of my objects have lazy load functionality, when they are created all that is known about them is a corresponding database ID. For any lazy load solution to work some sort of identifier needs to be known.
|
|
|
|
|
|
Probably:
System.Diagnostics.Process.Start("NET STOP MSSQLSERVER");
System.Diagnostics.Process.Start("NET START MSSQLSERVER");
|
|
|
|
|
You can't do it that way, with Process.Start(" ~ DOS NET START/STOP ~ ");
You have to do it like this (assuming SQL Server is running on the same computer as your program):
string localComputer = Environment.MachineName.ToString();
// Stop MSSQLSERVER
ServiceController controller = new ServiceController();
controller.MachineName = localComputer;
controller.ServiceName = "MSSQLSERVER";
string status = controller.Status.ToString();
if (status == "Running")
{
// Stop the service
controller.Stop();
Console.WriteLine("MSSQLSERVER has been stopped.");
}
// Start MSSQLSERVER
controller.MachineName = localComputer;
controller.ServiceName = "MSSQLSERVER";
status = controller.Status.ToString();
if (status == "Stopped")
{
// Stop the service
controller.Start();
Console.WriteLine("MSSQLSERVER has been started.");
}
Also, make sure the service name is MSSQLSERVER in the Services console (Start -> Run -> services.msc). On named instances, this is not always the case.
-Tom
|
|
|
|
|
You can also use the ServiceController[^] class.
Using the GridView is like trying to explain to someone else how to move a third person's hands in order to tie your shoelaces for you.
-Chris Maunder
|
|
|
|
|
How to resize the row height in CF.Framework DataGrid control? For columns there is DataGridColumnStyle , but not the same for rows.
thanks.
|
|
|
|
|
Hi,
Currently I am using the _SelectionChanged event for the dataGridView control to get cell values for the selected row in the control.
Now I would like to order the coluomns by clicking on the header.
But I get an error if a column name is clicked on.
The error occurs on the following line inside _SelectionChanged event:
int rowNum = dataGridView1.CurrentCell.RowIndex;
Obviously at this stage there is no row selected because I have clicked on a column.
I basically would like the column order to work but the above scenario is preventing it.
|
|
|
|
|
dataGridView1.CurrentCell returns null if no cell is selected.
|
|
|
|
|
ERROR:
Cannot find the assembly MyProject, Version=1.0.1123.4445, Culture=neutral, PublicKeyToken=null.
CODE :
<br />
bytes bs[];<-- Receives data from Socket<br />
BinaryFormatter formatter = new BinaryFormatter();<br />
MemoryStream memStream2 = new MemoryStream(bs);<br />
obj = (object)formatter.Deserialize(memStream2);
When you send any data(anything object, like a DataTable) recognized by the framework, it doesn't throw this error.
But when I send my own structure, it throws this exception. Please help.
REFERENCE:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=961147&SiteID=1[^]
But the above thread talks about a web application. Mine is a windows application.
Also note, I'm new to .net
:Gong: 歡迎光臨 吐 西批 :Gong:
|
|
|
|
|
You need to add reference to the assembly which define the type you are trying to deserialize in the receiving application.
Usually what we do is, we will find out the classes needed by the both communicating applications into a separate class library and reference to this library in both the applications. I think this will help you solve ur issue at hand.
|
|
|
|
|
Thanks I'll try that.
:Gong: 歡迎光臨 吐 西批 :Gong:
|
|
|
|
|
Hi,
I am developing a project with C# in which i have a shared dataset. On many occasions, I need to delete tables from this dataset for which i call DataSet.Tables.Remove(Tablename). But I have found that this does not work perfectly. Since many times when i make the table with the same name in this dataset after deleting one, i think it contains some extra rows. Can anybody tell me the cause of the problem? Moreover should i call AcceptChanges on the removed table after removing it or it is removed automatically?
Regards,
Wasif Ehsan.
|
|
|
|
|
When you call Remove() (and this applies to DataTables and DataRows), underneath the covers its essentially equivalent to calling Delete() and AcceptChanges(). So, you do not need to call AcceptChanges() when calling Remove().
As for your additional rows, I would try to track down in your debugger the source of those rows.
|
|
|
|
|
I am new to visual C# but I have written a program that will gather hardware and software information from a PC then write this info to a database on a server.
The problem is that I can run the program from my PC, but I want to run it from multiple PCs on the network and I don't know how to set up credentials so everyone can get to the database on the server.
Can this be written in the program?
Thanks in advance.
|
|
|
|