Csharpjava's Posts
Nairaland Forum › Csharpjava's Profile › Csharpjava's Posts
1 2 3 4 5 6 7 8 9 10 (of 12 pages)
I have a question for both sides of this argument, would you call someone that wrote a two player Knots and Crosses game a 'games developer' or a 'computer programmer'
|
lordZOUGA: thread successfully derailedSorry O, let the arguments continue............ |
Alot has been said here about Bill Gates. To know more about Bill Gates, we need to read about his early life on Wikipedia At 13 he enrolled in the Lakeside School, an exclusive preparatory school.[20] When he was in the eighth grade, the Mothers Club at the school used proceeds from Lakeside School's rummage sale to buy a Teletype Model 33 ASR terminal and a block of computer time on a General Electric (GE) computer for the school's students.[21] Gates took an interest in programming the GE system in BASIC, and was excused from math classes to pursue his interest. He wrote his first computer program on this machine: an implementation of tic-tac-toe that allowed users to play games against the computer. Gates was fascinated by the machine and how it would always execute software code perfectly. When he reflected back on that moment, he said, "There was just something neat about the machine."[22] After the Mothers Club donation was exhausted, he and other students sought time on systems including DEC PDP minicomputers. One of these systems was a PDP-10 belonging to Computer Center Corporation (CCC), which banned four Lakeside students—Gates, Paul Allen, Ric Weiland, and Kent Evans—for the summer after it caught them exploiting bugs in the operating system to obtain free computer time. http://en.wikipedia.org/wiki/Bill_Gates |
The code below should get you started. C# codes are similar to Java codes so you can write what you can with Java and then we can work together to convert them to C#: using System; using System.Text; using System.Data.OleDb; using System.Collections.Generic; namespace BankApplication { class Program { static void Main(string[] args) { string optionSelected; // Write to console/get input Console.Write("Select One From The Following Options" + "\n" + "1 - Deposit" + "\n" + "2 - Withdraw Cash" + "\n" + "3 - Transfer" + "\n" + "4 - Etc" + "\n" + "You Selected: " ;Console.Write("You Selected, {0}! ", Console.ReadLine()); optionSelected = Console.ReadLine(); Console.ReadLine(); } } } //Next you need a select case statement that will receive the option selected by the user for processing................ |
@Poster you can help answer yourself by asking this qusetion too. If a programmer wants to become an Accountant, would you advice the programmer to read books on their own or would you advice the programmer to look for a good institution where they can study accountancy? |
How do you want to go about writing the application, is it with note pad or do you want to use Visual Studio .Net? |
leastpay: I'll love to have a copy from you. How is that possible ?Downloading it from the link above will be the best option. |
You need to download SQL Server 2008 Management Studio Express from Microsoft see link: http://www.microsoft.com/en-gb/download/details.aspx?id=7593 From that link select the version of your windows 7, x86 or x64 to download. |
goddyzee: Hello,I am a young lad who studied accounting,ilove oracle.can someone tell me the prospect of doing oracle both for seelf emplyed or being employed.am a novice in programming.what are the basics I nid to know before doing the oracle to enable me to be gud at itI studied accounting myself but it was after I went back to study a programming related course that I can really call myself a programmer, my advice to you is to try and find a higher institution where your can study a programming related course, then do a short course in Oracle if you think you still need this. There might be an alternative route for you to get into programming, but l'm not aware of that at present. |
leastpay: Meaning i don't need to install any sql server 2008 again.That's right, for small to medium size applications sql server express is fine and you can distribute your database with your application, unlike the standard SQL Server which will require the users of your application to install the standard SQL server before they can use your application. |
leastpay: I'm using ms visual studio.net 2008By default this will install MS SQL Server 2008 Express edition for you. |
leastpay: Pls. How is microsoft sql server 2005 install on window 7. Pls i need ur help. ThanksYou need to get a hold of the express edition, or if you have MS Visual Studio 2005, just install it and it will also install microsoft sql server 2005 express edition for you. |
megawealth: turn it to a business dirctory....Good idea! |
Don Ocso: Sell linksThanks. But what about web applications that will generate good income. |
If you happen to own this domain nigeria.bz what would you use if for that will generate a good income? |
Kennyinusa: .....java is not so IDE dependent. Unlike C#, .Net and the like.You can write a windows GUI in C# with Notepad, this method is for you if you don't like IDEs
|
bunmiokunowo: About TechlaunchpadThose overseas should be exempted from being in Nigeria throughout the duration of the programme. |
Source: clickatell.com/apis-scripts/scripts/vb-net/ 'Use the VB.Net code below to send SMS via Clickatell's SMS Gateway, Developers’ Central. Simply register for an HTTP API account, and you will automatically 'receive 10 FREE SMS credits to try our service. Imports System.Net Imports System.IO Dim client As WebClient = New WebClient ' Add a user agent header in case the requested URI contains a query. client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705 "![]() client.QueryString.Add("user", "xxxx" ![]() client.QueryString.Add("password", "xxxx" ![]() client.QueryString.Add("api_id", "xxxx" ![]() client.QueryString.Add("to", "xxxx" ![]() client.QueryString.Add("text", "This is an example message" ![]() Dim baseurl As String = "http://api.clickatell.com/http/sendmsg" Dim data As Stream = client.OpenRead(baseurl) Dim reader As StreamReader = New StreamReader(data) Dim s As String = reader.ReadToEnd() data.Close() reader.Close() Return |
If you don't mind me intruding as this is meant for Javanian, then I think what you need is a Java map, see example below from mkyong.com/java/how-to-loop-a-map-in-java which you can modify. import java.util.HashMap; import java.util.Iterator; import java.util.Map; public class LoopMap { public static void main(String[] args) { // initial a Map Map<String, String> map = new HashMap<String, String>(); map.put("1", "Jan" ;map.put("2", "Feb" ;map.put("3", "Mar" ;map.put("4", "Apr" ;map.put("5", "May" ;map.put("6", "Jun" ;System.out.println("Example 1..." ;// Map -> Set -> Iterator -> Map.Entry -> troublesome Iterator iterator = map.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry mapEntry = (Map.Entry) iterator.next(); System.out.println("The key is: " + mapEntry.getKey() + ",value is :" + mapEntry.getValue()); } System.out.println("Example 2..." ;// more elegant way for (Map.Entry<String, String> entry : map.entrySet()) { System.out.println("Key : " + entry.getKey() + " Value : " + entry.getValue()); } System.out.println("Example 3..." ;// weired way, but work anyway for (Object key : map.keySet()) { System.out.println("Key : " + key.toString() + " Value : " + map.get(key)); } } } |
It is good to start learning programming with Java because it will teach you programming from the ground up, but once you have mastered Java try learning C# and ASP.Net, as Java and C# syntax are very similar, having C# skills will help boost your career as C# and ASP.Net is now gradually taking the lead in web applications development. This is because Microsoft is among the brains that developed SOAP and XML which they have built into C# from the beginning and they have continued to improve on it. Your Java skills will still be useful for Android mobile applications development and legacy applications. |
[quote author=₱®ÌИСΞ]ok first of all, " " (ie space) isnt a letter so it shouldn't print the occurence secondly, its supposed to print the occurence of all the letters from a-z thirdly the challenge has a format for output...[/quote]No 1: Has been fixed with Regular Expressions http://london.gs.aster.arvixe.com/default.aspx Nos 2 & 3: Work is in progress. Credit should have been given for mine being available online for anyone to try. |
[quote author=₱®ÌИСΞ]Hahaha chill...I'm replying with my phone now...when I arrive my destination I will compare d speed. Let's see if mr c# leaves d bar in a wheelchair[/quote]Oya make we see if no be the Java, Python etc loving guys go leave the bar with a black eye ! |
[quote author=omo_to_dun]Chei, see as you yab us finish![/quote] ![]() |
Is the lack of response to the C# .NET code I posted similar to a case of: A guy walking into a bar wearing a Microsoft C# .NET T-shirt and challenges any Java, Python etc loving pansy to fight. and The place gets deathly quiet, and one guy in the back of the room slides his chair back from a table, stands up, and glares at the intruder. ![]() |
[quote author=₱®ÌИСΞ]And for the c++ etc issue I count only the lines in the main methods[/quote]@omo_to_dun In that case the code I posted before has only 6 lines and anyone can try it online at http://london.gs.aster.arvixe.com/default.aspx The execution time shown makes me feel this code might be the fastest .{ string sentence = TextBox1.Text; var sentenceQuery = from sentenceIn in sentence.ToLower().ToCharArray() group sentenceIn by sentenceIn into m select new { Key = m.Key, Count = m.Count() }; foreach (var item in sentenceQuery) {Label1.Text += string.Format("Character: {0} Appears {1} time/s <br />", item.Key.ToString(), item.Count);}}} |
@omo_to_dun Sorry I wasn't aware of the rules before. Updated Now 14 lines with C# to make it compile and run online, you can try it online at: http://london.gs.aster.arvixe.com/default.aspx Question: How many lines will yours take on the server side that will allow us to try it online? using System; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class _Default : System.Web.UI.Page {protected void Page_Load(object sender, EventArgs e){} protected void Button1_Click(object sender, EventArgs e) { string sentence = TextBox1.Text; var sentenceQuery = from sentenceIn in sentence.ToLower().ToCharArray() group sentenceIn by sentenceIn into m select new { Key = m.Key, Count = m.Count() }; foreach (var item in sentenceQuery) {Label1.Text += string.Format("Character: {0} Appears {1} time/s <br />", item.Key.ToString(), item.Count);}}} [quote author=omo_to_dun]Your code cannot compile as is! Javanian's code can be compiled and run. Mine can simply be pasted onto a Python CLI and it will run. You have used ojoro. And btw, it only runs for that particular string. [/quote] |
Just six lines with C#: { string sentence = TextBox1.Text; var sentenceQuery = from sentenceIn in sentence.ToLower().ToCharArray() group sentenceIn by sentenceIn into m select new { Key = m.Key, Count = m.Count() }; foreach (var item in sentenceQuery) {Label1.Text += string.Format("Character: {0} Appears {1} time/s <br />", item.Key.ToString(), item.Count);}}} |
mitey: while($row = mysql_fetch_assoc($query)){Instead of storing the names of the pages in a new table row in the database table, why don't you use the $query like this: if($query){ echo "<tr>"; while($row = mysql_fetch_assoc($query)){ echo "<th width='200' align='center' ><a href='".$row[$query]".html? cat_id=". $row["cat_id"]. "'<b>". $row["type"] . "<img src='images/".$row["cat_image"]."' width='200' height='200' /></a>Price: ".$row["price"]."<br /><b> Quantity:</b> <input name= 'qty' size='5'> <br /><a href=''>add to cart</a></th>"; } I have not tried this as my computer is not yet setup for PHP but I'm sure this should work. |
okeyxyz: @csharpjava's code has a flaw(though the strategy is right) in that he's running a switch statement on $query, forgetting that $query is a rowset and not a variable expression, therefore $query is not resolved before running switch statement. So the solution would still be to resolve $query through mysql_fetch_assoc(), after including "pages" column in your database table.Note that '$query' is not rowset. I was assuming that there is a calling page that will pass the '$query' value to this PHP page. The poster will need to update my code above to reflect this incoming value for '$query'. |
Try this code below which uses a switch: <html> <head> <title>Shopping Cart</title> </head> <body> <center> <img src="images/carton cahrt.jpg" /> <br /> <table> <form> <tr> <td width="200"><input type="submit" name="goods" value="Goods For sale" /></td> <td width="200"><input type="submit" name="basket" value="Basket Content" /></td> <td width="200"><input type="submit" name="order" value="Order" /></td> </tr> </form> <?php //connect to server include('config.php'); $sql = "Select * from category"; $query = mysql_query($sql); { echo "<tr>"; while($row = mysql_fetch_assoc($query)){ switch ($query) { case 'books' : echo "<th width='200' align='center' ><a href='books.html?cat_id=". $row["cat_id"] . "'<b>". $row["type"] . " <img src='images/".$row["cat_image"]."' width='200' height='200' /></a>Price: ".$row["price"]."<br /><b> Quantity:</b> <input name= 'qty' size='5'> <br /><a href=''>add to cart</a></th>"; break; case 'gadgets' : echo "<th width='200' align='center' ><a href='gadgets.html?cat_id=". $row["cat_id"] . "'<b>". $row["type"] . " <img src='images/".$row["cat_image"]."' width='200' height='200' /></a>Price: ".$row["price"]."<br /><b> Quantity:</b> <input name= 'qty' size='5'> <br /><a href=''>add to cart</a></th>"; break; case 'phone' : echo "<th width='200' align='center' ><a href='phone.html?cat_id=". $row["cat_id"] . "'<b>". $row["type"] . " <img src='images/".$row["cat_image"]."' width='200' height='200' /></a>Price: ".$row["price"]."<br /><b> Quantity:</b> <input name= 'qty' size='5'> <br /><a href=''>add to cart</a></th>"; break; default : // do some error handling here echo "Please Select a Category"; break; } } echo "</tr>"; } ?> </table> </center> </body> </html> |
;
!
.