473,394 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Hello World Day

Curtis Rutland
3,256 Expert 2GB
I have been informed that today is Hello World Day, so in honor of that, I'd just like to say:
Expand|Select|Wrap|Line Numbers
  1. static void Main(string[] args)
  2. {
  3.     int[] hwRevInt = { 33, 100, 108, 114, 111, 87, 32, 111, 108, 108, 101, 72 };
  4.     for (int i = hwRevInt.Length - 1; i >= 0; i--)
  5.         Console.Write((char)hwRevInt[i]);
  6.     Console.ReadKey();
  7. }
to you all!
Nov 21 '08 #1
2 1191
Plater
7,872 Expert 4TB
"dlroW olleH".Reverse() to all of you too
Nov 21 '08 #2
balabaster
797 Expert 512MB
Expand|Select|Wrap|Line Numbers
  1. Private DoWork As New ManualResetEvent(False)
  2. Private Shutdown As Boolean = False
  3. Private Queue As New Queue(Of String)
  4.  
  5. Private Sub ProcessThread(ByVal Args As Object)
  6.  
  7.         Dim Working As Boolean = True
  8.  
  9.         'Process message queue...
  10.         While Working
  11.  
  12.             DoWork.WaitOne()
  13.  
  14.             If Not Shutdown Then
  15.  
  16.                 Dim NextMessage As String = Queue.Dequeue
  17.                 Console.WriteLine(NextMessage)
  18.  
  19.                 SyncLock Queue
  20.                     If Queue.Count = 0 Then
  21.                         DoWork.Reset()
  22.                     End If
  23.                 End SyncLock
  24.  
  25.             Else
  26.                 Working = False
  27.  
  28.             End If
  29.  
  30.         End While
  31.  
  32. End Sub
  33.  
  34. Private Sub QueueMessage(ByVal Message As String)
  35.  
  36.         'Add message to the message queue...
  37.         SyncLock Queue
  38.             Queue.Enqueue(Message)
  39.             DoWork.Set()
  40.         End SyncLock
  41.  
  42. End Sub
  43.  
  44. Sub Main()
  45.  
  46.         'Start worker thread
  47.         Dim oWorkThread As New Thread(AddressOf ProcessThread)
  48.         oWorkThread.Start()
  49.  
  50.         'Queue up message
  51.         QueueMessage("Hello World")
  52.  
  53.         Console.Write("Press a key to exit")
  54.         Console.ReadKey()
  55.  
  56.         Shutdown = True
  57.         DoWork.Set()
  58.         oWorkThread.Join()
  59.  
  60. End Sub
Nov 21 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

24
by: Andy Sutorius | last post by:
Has anyone successfully created a Hello World program without using Visual Studio.NET? If so, what IDE did you use and what namespaces did you import? Thanks! Andy Sutorius
2
by: ME | last post by:
I am trying to find a prewritten method for converting a string like this:"Hello World" to this "Hello\sWorld". I plan to use it to build a regular expression. Specifically I am looking for a...
17
by: Tim Judd | last post by:
I must not be grasping anything here. Just a simple application, as follows (as any first-program is...) ---- #include <iostream.h> int main() { cout <<"hello world"; return 0;
6
by: RC | last post by:
Hello World, I am try do call a JavaScript function from XSLT, but I got function not avaible error. See "????" below. Would someone out there tell me how? Thank Q! <xsl:stylesheet...
8
by: vijay | last post by:
Hello, As the subject suggests, I need to print the string in the reverse order. I made the following program: # include<stdio.h> struct llnode { char *info;
4
by: arnuld | last post by:
i am learning C and doing the exercise 1-1 of K&R2, where K&R ask to remove some parts of programme and experiment with error, so here i go: #include <stdio.h> int main () { printf('hello...
0
by: C.W.Holeman II | last post by:
As K&R state the hardest part is getting a first instance to work. So I am looking for a "hello, world!" example for adding an additional element to an XHTML file. <html> <head><title>Hello,...
1
by: James T. Dennis | last post by:
You'd think that using things like gettext would be easy. Superficially it seems well documented in the Library Reference(*). However, it can be surprisingly difficult to get the external details...
11
by: cj | last post by:
Perhaps someone knows how to do this. When I open a new ASP.NET web service application in VS 2008, it opens with a simple Hello World web service already written. I want to see this work. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.