₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,330,989 members, 8,448,112 topics. Date: Sunday, 19 July 2026 at 07:00 PM

Toggle theme

Csharpjava's Posts

Nairaland ForumCsharpjava's ProfileCsharpjava's Posts

1 2 3 4 5 6 7 8 9 10 (of 12 pages)

ProgrammingRe: How Do I Get A Value From Another Form Using C#.NET 2008 by csharpjava(m):
Here is an example if you are working with asp.net

Put this code within the body of the html page where the value will come from:

<asp:Label ID="Label1" runat="server" Text="Query String"></asp:Label>
<a href = "About.aspx?Answer=<%= Label1.Text %>"> Send to Another Page </a>

And this code below should go in the page load event of the server code of the .aspx page that will accept the value above

protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = Request.QueryString["Answer"];
}
ProgrammingRe: How Do I Get A Value From Another Form Using C#.NET 2008 by csharpjava(m):
@ Poster, what you need if you are working with asp.net is a Query String in .net, if you are still interested let me know and I will post a sample code here for you to see.
ProgrammingRe: VB.NET Problem, Printing Receipt With Thermal Printer From Crystal Report. by csharpjava(m):
I saw the example below on Microsoft's website, I hope you'll find it useful.

ReportDocument.PrintToPrinter Method:
Public Overridable Sub PrintToPrinter(ByVal nCopies As Integer, ByVal collated As Boolean, ByVal startPageN As Integer, ByVal endPageN As Integer)

Parameters:
nCopies
Indicates the number of copies to print.
collated
Indicates whether to collate the pages.
startPageN
Indicates the first page to print.
endPageN
Indicates the last page to print.

To print all pages, set the startPageN and endPageN parameters to zero.

The following example sets the report's page margins, selects the printer, and prints the report.

Private Sub PrintReport(ByVal printerName As String)
Dim margins As PageMargins

' Get the PageMargins structure and set the
' margins for the report.
margins = Report.PrintOptions.PageMargins
margins.bottomMargin = 350
margins.leftMargin = 350
margins.rightMargin = 350
margins.topMargin = 350
' Apply the page margins.
Report.PrintOptions.ApplyPageMargins(margins)

' Select the printer.
Report.PrintOptions.PrinterName = printerName

' Print the report. Set the startPageN and endPageN
' parameters to 0 to print all pages.
Report.PrintToPrinter(1, False, 0, 0)
End Sub
ProgrammingRe: Running Software From A Server To A Local Pc by csharpjava(m): 9:55pm On Aug 26, 2012
What you need is a client server application. This is done at the development stage of the software using TCP/IP or Socket Programming.
ProgrammingRe: Software Engineering by csharpjava(m):
No response from poster. Well I'm out of here.
ProgrammingRe: Why Do Young Startup Founders Drop Out Of School by csharpjava(m): 4:26am On Aug 12, 2012
lordZOUGA: It doesn't explain how or why he had to make 28billion dollars annually in 5years after he opened facebook.
huh huh huh
ProgrammingRe: Why Do Young Startup Founders Drop Out Of School by csharpjava(m): 6:26pm On Aug 10, 2012
"Zuckerberg began using computers and writing software as a child in middle school. His father taught him Atari BASIC Programming in the 1990s, and later hired software developer David Newman to tutor him privately. Newman calls him a "prodigy", adding that it was "tough to stay ahead of him". Zuckerberg also took a graduate course in the subject at Mercy College near his home while he was still in high school" Source: Wikipedia

These successful dropouts in computing have already had their university education at home when they were still a child, so unless you too have had such a privilege when you were a child my advice to you will be to complete your university education in a course you have passion for.
ProgrammingRe: Having Consistent Headaches Because Of Programming by csharpjava(m): 1:17pm On May 27, 2012
My advice for you will be to practice writing the codes on an A4 exercise book and just copy and paste codes from Google to test on the computer that what you are writing down works, this will help you to spend less time in front of your computer. I wish you the best of luck with what you are learning.
ProgrammingRe: Suppose That You Had Nairaland's Friend Graph by csharpjava(m):
Creating an efficient Friends Graph will require the use of a Map for languages that supports Map or IDictionary in C# or VB.Net and a Composite Object which can be used with an in memory Database or a flat file. A Composite Object will be good for storing and retrieving the different attributes you want for each user.
ProgrammingRe: How Do I Convert Photo To Html Code ? by csharpjava(m): 3:36pm On May 24, 2012
mkwayisi: @delomos: Not true. Anything is possible under the sun. You just have to look deeper.

@csharpjava: WTF! Are you kidding?
I'm not kidding. See this link that does it for you online http://www.patternmedia.com/projects/image_to_html_converter
ProgrammingRe: First thing on your mind when asked to develop a website ? by csharpjava(m):
First: Website Requirement Document with Agreement Contract
If not see cartoon below:
https://www.nairaland.com/866437/humour-does-this-realy-says

ProgrammingRe: How Do I Convert Photo To Html Code ? by csharpjava(m): 10:37pm On May 08, 2012
You can use input output streams to read and then write the the image file out as binary digits, then convert the binary codes to hexadecimal codes which are used for colour codes in HTML. You will need to understand low level programming in order to pull this through.
ProgrammingRe: Algorithm Design & Analysis: Because It's What Some Do by csharpjava(m): 9:45pm On Apr 29, 2012
delomos: No offense but often Professors live in their heads,
Design and Analysis of Algorithms I
By: Tim Roughgarden, Associate Professor
ProgrammingRe: Creating A Future For Nigerian Programmers by csharpjava(m): 9:04pm On Apr 21, 2012
prodam: Presently, real programmers, I mean raw code writers here in Nigeria are deprived of their entitlements financially and socially.
No standards, no opportunities, no enabling environments, unending discrimination from companies that hire Indian programmers.
This trend will continue if your observations are correct, as long as Nigerian programmers feel they know all and are not willing to learn more advanced programming than just writing codes from a class diagram. I posted an extract of a class diagram and a formal specification language on another thread and to my greatest surprise no programmer on this forum made any attempt to have had a go at it or to find out more about it. Formal specification is a must when writing business, mission and life critical applications, so why will these companies not continue to hire Indian programmers when these programmers are already gurus in a formal specification language.
ProgrammingRe: Testing Programmers: Puzzles Or Web Applications? by csharpjava(m):
okeyxyz: @csharpjava, while the bolded is correct, i do not agree that you need a software engineer to accomplish them. A database expert is more than capable to do the job perfectly well. i don't know about software engineering & i can't make head or tail of the formula you posted earlier, but the requirements here are certainly not beyond the scope of database analysis of business processes, relationships & design. so, the expertise of a software engineer must include somethings beyond this scenario.
Sorry I brought S/E into this thread, I had to in order to correct some misconceptions about S/E, for the sake of those who do not know about S/E.

You are right you don't need Formal Specifications in Software Engineering for most applications, but when it comes to Mission, Business and Life Critical applications you will need a S/E to convert UML Class Diagrams to Formal Specifications like the one I posted before, it is from these Formal Specification that the actual code are then written, this will help save time, effort and money involved if it had been coded straight from the UML Class Diagram and then tested. But with Formal Methods in S/E, all the testing would already have taken place in the Formal Specification.
ProgrammingRe: Testing Programmers: Puzzles Or Web Applications? by csharpjava(m): 3:43am On Apr 11, 2012
delomos: @csharpjava:
What I need is your own personal credentials that gives you so much confidence to say to my ogas or I have never met a software engineer. After which I will dutifully relay the message

That's my curiosity.
Don't worry when I'm around next time, I'll be able to put your curiosity to rest by showing myself to you in person with my personal credentials so you can take me to your ogas, for them to meet a REAL Software Engineer for the first time.
ProgrammingRe: Testing Programmers: Puzzles Or Web Applications? by csharpjava(m): 7:23pm On Apr 10, 2012
@delomos
I have already given real facts to back up my claims and you have not even tried to complete the Formal specification I posted earlier. Here is another fact, see below the work of a software Engineer at Google, this is an extract from a recent job advert and I hope you show it to your ogas. The bolded involes coding which are what your ogas have told you Software Engineers cannot do.

The role: Software Engineer, GoogleDotcom

As a Software Engineer working on Google's critical production applications and infrastructure, your mission will be to ensure Google is always fast, available, scalable and engineered to withstand unparalleled demand.

"You will design and develop systems to run Google Search, Gmail, YouTube, Maps, Voice, AppEngine, and more."

"As a successful candidate for this role you will have strong analytical and troubleshooting skills, fluency in coding and systems design"

"Manage availability, latency, scalability and efficiency of Google services by engineering reliability into software and systems"

"Respond to and resolve emergent service problems; write software and build automation to prevent problem recurrence"
ProgrammingRe: Testing Programmers: Puzzles Or Web Applications? by csharpjava(m): 2:56pm On Apr 10, 2012
delomos: So you advice I ask what I don't know; I will take that into account right away and ask:
- what software project "in the wild" have you personally contributed to lately, please post the excerpt or @ least a link or better yet source code(if it's O/S)?
Don't miss quote me, I'm not here to show off what I have done, I'm only here to share my knowledge with those that are interested and to correct any false claims from your ogas and others about Software Engineers.
ProgrammingRe: Testing Programmers: Puzzles Or Web Applications? by csharpjava(m):
@ delomos
My advice for you is to stop posting stuff you know nothing about. You and your ogas are not Software Engineers so it is not for you to come on this forum to post what you don't know about Software Engineers. I can see that you believe software developments starts and ends with what your ogas tell you and what you do at your place of work. This makes you feel you know all, but the truth is that you know very little about Software development and instead of criticizing advance stuff you know nothing about, it will be better for you to ask questions about what you don't know so that you can learn something new, which you can tell your ogas about.
ProgrammingRe: Testing Programmers: Puzzles Or Web Applications? by csharpjava(m):
delomos: @csharpjava
#1. You made a very bold statement, "...you are sure"? I'm tempted to ask how sure you are but that will digress my point.

Apart from being quoted out of context, my original statement you didn't agree with is: "Per my ogas, it's a waste of time bringing an engineer in for interview and asking them to "code"." Which was a follow up from: "Given X problem, how would you approach it (X being a problem the team is currently working on and as pointed by @techytom the process is a lot more important than the answer)."

#2. Perhaps that answers your question, maybe not, people who are sure about people they never met are rather strange people to have logical conversations with, or maybe not...

#3. It's easy to show nice looking symbols and UMLs and theorem -- it generally explains why we have Professors and people solving real problem. Maybe that was a bit too poetic. I must commend digging up that picture, it indeed looks interest, I will print it out and show a Software Engineer if I'm ever lucky enough to meet one.
#1. In that case I'm sure your ogas have never met a qualified Software Engineer.

#2. So if your ogas tell you the earth is flat, I'm I not right in saying that I'm sure your ogas are still leaving in the past.

#3. The Formal Specification I posted above is for solving real life problems and it's a must for any programmer writing Business, Mission or Life Critical applications to follow before writing a single line of code as testing intergrity software after coding is a waste of time, money and effort, just as engineers do not build a bridge and then ask you to drive your car over to test whether the bridge will fall down or not so that they can go back and fix the error they have made, no they only have one shot at getting the bridge right the first time. This is the reason software engineers too have to convert from UML specification to a Formal Specification from which they can then write their codes for that application.
ProgrammingRe: Testing Programmers: Puzzles Or Web Applications? by csharpjava(m):
techytom: if he's a programmer(neatness of code), software engineering(approach to information gathering). I don't want to be one of the folks that put programming and software engineering as the same
delomos: it's a waste of time bringing an engineer in for interview and asking them to "code".
I'm sure that both of you have never met a qualified Software Engineer before, because if you have then you won't make such comments. Software Engineers are trained to handle all stages of software development life circle, which includes programming. Ok here is a simply programming test for a Software Engineer, you can try it yourself.

Question: Convert the class diagram extract below to a Formal specification that will guarantee that the code will not fail and then convert each line of the Formal specification to either Java, C# etc. An extract of the Formal specification has been provided for you to complete.

ProgrammingRe: Networking Involves Programming But Not Otherwise? by csharpjava(m): 10:56pm On Mar 12, 2012
prodam: @kodewrita:
@csharpjava: the code you posted shows the principle or logic behind the pinging of an address, thereby burtressing my advocacy that networking in general stands on programming
okay, more simpler: codes are inevitable in networking but networking concept can be left out in programming.
The concept, architecture and the code implementation are all the work of senior network programmers.
ProgrammingRe: Networking Involves Programming But Not Otherwise? by csharpjava(m): 10:17pm On Mar 12, 2012
A router and other networking devices would not have been available without network programmers. This area of programming is called TCP, UDP, Client Socket and Server Socket programming. Here is an advance ping application and the C# code for it


/*
C# Network Programming
by Richard Blum

Publisher: Sybex
ISBN: 0782141765
*/
using System;
using System.Drawing;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Windows.Forms;

public class AdvPing : Form
{
private static int pingstart, pingstop, elapsedtime;
private static TextBox hostbox, databox;
private static ListBox results;
private static Thread pinger;
private static Socket sock;

public AdvPing()
{
Text = "Advanced Ping Program";
Size = new Size(400, 380);

Label label1 = new Label();
label1.Parent = this;
label1.Text = "Enter host to ping:";
label1.AutoSize = true;
label1.Location = new Point(10, 30);

hostbox = new TextBox();
hostbox.Parent = this;
hostbox.Size = new Size(200, 2 * Font.Height);
hostbox.Location = new Point(10, 55);

results = new ListBox();
results.Parent = this;
results.Location = new Point(10, 85);
results.Size = new Size(360, 18 * Font.Height);

Label label2 = new Label();
label2.Parent = this;
label2.Text = "Packet data:";
label2.AutoSize = true;
label2.Location = new Point(10, 330);

databox = new TextBox();
databox.Parent = this;
databox.Text = "test packet";
databox.Size = new Size(200, 2 * Font.Height);
databox.Location = new Point(80, 325);

Button sendit = new Button();
sendit.Parent = this;
sendit.Text = "Start";
sendit.Location = new Point(220,52);
sendit.Size = new Size(5 * Font.Height, 2 * Font.Height);
sendit.Click += new EventHandler(ButtonSendOnClick);

Button stopit = new Button();
stopit.Parent = this;
stopit.Text = "Stop";
stopit.Location = new Point(295,52);
stopit.Size = new Size(5 * Font.Height, 2 * Font.Height);
stopit.Click += new EventHandler(ButtonStopOnClick);

Button closeit = new Button();
closeit.Parent = this;
closeit.Text = "Close";
closeit.Location = new Point(300, 320);
closeit.Size = new Size(5 * Font.Height, 2 * Font.Height);
closeit.Click += new EventHandler(ButtonCloseOnClick);

sock = new Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.Icmp);
sock.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, 3000);
}

void ButtonSendOnClick(object obj, EventArgs ea)
{
pinger = new Thread(new ThreadStart(sendPing));
pinger.IsBackground = true;
pinger.Start();
}

void ButtonStopOnClick(object obj, EventArgs ea)
{
pinger.Abort();
}

void ButtonCloseOnClick(object obj, EventArgs ea)
{
sock.Close();
Close();
}

void sendPing()
{
IPHostEntry iphe = Dns.Resolve(hostbox.Text);
IPEndPoint iep = new IPEndPoint(iphe.AddressList[0], 0);
EndPoint ep = (EndPoint)iep;
ICMP packet = new ICMP();
int recv, i = 1;

packet.Type = 0x08;
packet.Code = 0x00;
Buffer.BlockCopy(BitConverter.GetBytes(1), 0, packet.Message, 0, 2);
byte[] data = Encoding.ASCII.GetBytes(databox.Text);
Buffer.BlockCopy(data, 0, packet.Message, 4, data.Length);
packet.MessageSize = data.Length + 4;
int packetsize = packet.MessageSize + 4;

results.Items.Add("Pinging " + hostbox.Text);
while(true)
{
packet.Checksum = 0;
Buffer.BlockCopy(BitConverter.GetBytes(i), 0, packet.Message, 2, 2);
UInt16 chcksum = packet.getChecksum();
packet.Checksum = chcksum;

pingstart = Environment.TickCount;
sock.SendTo(packet.getBytes(), packetsize, SocketFlags.None, iep);
try
{
data = new byte[1024];
recv = sock.ReceiveFrom(data, ref ep);
pingstop = Environment.TickCount;
elapsedtime = pingstop - pingstart;
results.Items.Add("reply from: " + ep.ToString() + ", seq: " + i +
", time = " + elapsedtime + "ms"wink;
} catch (SocketException)
{
results.Items.Add("no reply from host"wink;
}
i++;
Thread.Sleep(3000);
}
}

public static void Main()
{
Application.Run(new AdvPing());
}
}
class ICMP
{
public byte Type;
public byte Code;
public UInt16 Checksum;
public int MessageSize;
public byte[] Message = new byte[1024];

public ICMP()
{
}

public ICMP(byte[] data, int size)
{
Type = data[20];
Code = data[21];
Checksum = BitConverter.ToUInt16(data, 22);
MessageSize = size - 24;
Buffer.BlockCopy(data, 24, Message, 0, MessageSize);
}

public byte[] getBytes()
{
byte[] data = new byte[MessageSize + 9];
Buffer.BlockCopy(BitConverter.GetBytes(Type), 0, data, 0, 1);
Buffer.BlockCopy(BitConverter.GetBytes(Code), 0, data, 1, 1);
Buffer.BlockCopy(BitConverter.GetBytes(Checksum), 0, data, 2, 2);
Buffer.BlockCopy(Message, 0, data, 4, MessageSize);
return data;
}

public UInt16 getChecksum()
{
UInt32 chcksm = 0;
byte[] data = getBytes();
int packetsize = MessageSize + 8;
int index = 0;

while ( index < packetsize)
{
chcksm += Convert.ToUInt32(BitConverter.ToUInt16(data, index));
index += 2;
}
chcksm = (chcksm >> 16) + (chcksm & 0xffff);
chcksm += (chcksm >> 16);
return (UInt16)(~chcksm);
}
}

ProgrammingRe: In Search Of "that" Software Development Methodology by csharpjava(m):
Ghenghis: If you think through the entire discussion, you'll realize "complex" does not translate to "critical". Business applications are complex, not necessarily life critical.
Complex applications can be built (and are built) using agile methods. If we're talking "life critical" like biomedical software or systems software then the playground is different. Requirements are usually very clear up front, and changes go through a stringent or very costly process. Waterfall's rigorous process might act as a form of Quality assurance ... I'm certain the "website" is not built using waterfall, maybe a core component technology.
There are three categories of critical applications, they are: life critical, Mission Critical and Business critical applications. The core applications for companies like eBay and banks are Business Critical applications, this is the reason they are developed using a Waterfall or Iterative Waterfall methodology as it is important that the entire core requirements are fully developed and tested with one of the methodologies of Formal Methods in Software Engineering like VDM-SL to ensure they will not fail, before they are put into production. Business Critical applications are complex because they are high Integrity applications which must not fail, if not organisations like eBay and banks will loose millions of money if their core applications should fail.

Agile methodologies are used for applications that are not life critical, Mission Critical or Business critical, when application developed with agile fails life and money are not lost, you just have to wait for a patch few weeks or months down the line to fix it.
ProgrammingRe: In Search Of "that" Software Development Methodology by csharpjava(m):
delomos:
^^ this gent continues to speak my mind BECAUSE these are war stories (I have mine too) not an academic debate. So can you answer that question: Who do you know that currently uses waterfall ?
Here is a recent job advert by eBay on indeedDotCom:
Software Engineer 3 - new
eBay - Salt Lake City, UT
"to ensure the success of the team and project Experience in formal waterfall development and agile iterative methodologies Ability to translate abstract..."
eBay - 7 days ago - save job - block - email - more...

Remember that it was a question about how Ecommerce sites like eBay and Amazon were developed that lead to you opening this thread. This should prove to you that waterfall is still very well in use today for complex applications. If you look back at most of my post you'll see that I have always been in support of an Iterative Waterfall development.
ProgrammingRe: In Search Of "that" Software Development Methodology by csharpjava(m):
@delomos:


Please ignore the attached image below as the article was written in 2004, this is too old for this discussion. I have tried to remove it but I keep getting the message: An unexpected error has occurred. So sorry about this.

ProgrammingRe: In Search Of "that" Software Development Methodology by csharpjava(m): 9:28pm On Mar 10, 2012
delomos:
In addition, will I really trust this company with doing any web development for me? I highlighted some serious issue on their on site but in honesty, they're probably still "planning" to get them fixed.
Alright if you cannot trust that company I mentioned above, then what about IBM here is what Per Kroll the director of the Rational Unified Process development and product management teams at IBM Rational Software has to say. "Most software teams still use a waterfall process for development projects." Source: IBM if you still disagree with this guy at IBM then you will have to post your own article on the website of a top company like IBM.
ProgrammingRe: In Search Of "that" Software Development Methodology by csharpjava(m): 1:37am On Mar 10, 2012
Ghenghis:
Using the Waterfall in this age is too painful. the application would be obsolete by the time its released. Who do you know that currently uses waterfall ?
delomos:
question: Who do you know that currently uses waterfall ?
OK I will leave professors out of this discussion as both of you have shown that you do not agree with their claims about waterfall. Going back to your question above, well here is a company that uses waterfall: Saahi Systems This is what they have to say:

"Our clients range from Global Fortune 500 companies to small start up and medium sized companies."

"Web Development : As per the customer requirements, Saahi follows the waterfall model (which was the original SDLC method) and rapid application development (RAD) model or a hybrid of other development models to deliver web solutions."

"Application Development : Saahi uses the Software development life cycle (SDLC), which is a conceptual model, used in project management that describes the stages involved in an information system development project, from an initial feasibility study through maintenance of the completed application. Various SDLC methodologies have been developed to guide the processes involved. We at Saahi basically use the waterfall model (which was the original SDLC method) and rapid application development (RAD) model or a hybrid of other development models to deliver solutions to our customers depending on the need."
ProgrammingRe: In Search Of "that" Software Development Methodology by csharpjava(m): 11:16pm On Mar 09, 2012
delomos:
^^^ No offense but often Professors live in their heads,
Not the professors I know in the UK, which ones are you referring to? If you should hold a seminar for businesses on how to choose the right software methodology and a professor should also do the same who's seminar do you think businesses will turn up at, yours or the professor's?
ProgrammingRe: In Search Of "that" Software Development Methodology by csharpjava(m): 1:02pm On Mar 09, 2012
Ghenghis:
Using the Waterfall in this age is too painful. the application would be obsolete by the time its released. Who do you know that currently uses waterfall ?
delomos:
^^ this gent continues to speak my mind BECAUSE these are war stories (I have mine too) not an academic debate. So can you answer that question: Who do you know that currently uses waterfall ?
Sorry I don't have that information right now, but if I find organisations that provide information on the software projects they have used waterfall for, then I will let you know. I know professors who say waterfall is used for complex software projects both in commerce and industry. Well if you say you disagree with these professors, then you should know that these professors gets millions from orgainisations to carry out researches for them to implement, so for this reason I have to believe some of the things they say.

1 2 3 4 5 6 7 8 9 10 (of 12 pages)