Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

AliAmjad

@AliAmjad
About
Posts
147
Topics
28
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Standard Input & Output
    A AliAmjad

    Hello All, How can I read from standard input and write to standard output. System.Diagnostics.Process.StandardInput's MSDN reference didn't help as it separately starts the process and then redirects the Standard Input/Output but what If the process is already running and called my Application to feed it some data. Here's an example to make things a bit clear: I am simply using Unix pipes i.e. cat command in cygwin (A Linux like Environment for windows) that basically just reads standard input and print to standard output. following is the command: % cat input/sample.txt | src/csharp/maptest But that doesn't seems to work. Any solutions? Thanks in advance.

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    C# question csharp linux mcp help

  • TcpListener problem
    A AliAmjad

    Thanks for your answers guys now i got the reason for this kind of behavior.

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    Visual Basic help csharp mcp question

  • TcpListener problem
    A AliAmjad

    Thank you for your reply daveauld. Actually it didn't throw any exception at all just stops the execution and won't continue the loop or the remaining statements after the loop which is kind of weird. Do you have any idea what's wrong with the above code???

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    Visual Basic help csharp mcp question

  • TcpListener problem
    A AliAmjad
            Dim listener As New TcpListener(System.Net.IPAddress.Any, 7778)
    
            'start it
            listener.Start()
    
            Dim bytes(1024) As Byte
            Dim Command As String = Nothing
    
            While True
    
                Console.WriteLine("Waiting for a connection... ")
                Dim client As TcpClient = listner.AcceptTcpClient()
                Console.WriteLine("Client connected... ")
                Console.WriteLine("Please Wait... ")
    
                Dim ns As NetworkStream = client.GetStream()
    
                Command = Nothing
    
                Dim i As Integer
    
                i = ns.Read(bytes, 0, bytes.Length)
                While (i <> 0)
    
    
                    Command = System.Text.Encoding.ASCII.GetString(bytes, 0, i)
    
                    Console.WriteLine(Command)
    
                    i = ns.Read(bytes, 0, bytes.Length) 'stopper
    
                End While
    
                ns.Close()
                client.Close()
    
                Console.WriteLine("...")
    
            End While
    

    Can anyone please help me why the execution stops at the bold line. Compiler don't execute anything after this line?

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    Visual Basic help csharp mcp question

  • VS 2008 is behaving strange!
    A AliAmjad

    Hello All, Visual Studio is behaving kind of strange, the problem occurred when we refactored our solution, we just organized our xslt style sheets and placed them in a separate folder but the changes we made to them doesn't reflect unless and until we move them to their previous location. Are we missing something?

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    Visual Studio visual-studio csharp mcp xml help

  • Time Difference w.r.t Dates
    A AliAmjad

    Thanks Bro... :)

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    Database csharp mcp question

  • Time Difference w.r.t Dates
    A AliAmjad

    I want to get time in HH:mm:ss format e.g. 13:15:02

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    Database csharp mcp question

  • Time Difference w.r.t Dates
    A AliAmjad

    Actually i just want to output the difference of two Timespans with respect to its dates e.g. 07/03/2009 05:00:00 07/04/2009 10:00:00 and the difference i get is 05:00:00 which is not correct i am using the following code:DECLARE @EnterTime datetime, @DischargeTime datetime Select @EnterTime = convert(varchar,EnterTime,8) from visit Select @DischargeTime = convert(varchar,NextTime,8) from visit Select convert(varchar,@DischargeTime - @EnterTime,8)
    the above code is working fine if the duration is between 24 hours. Can you please suggest me a solution or i have to apply the logic on programmatic side i.e. .NET?

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    Database csharp mcp question

  • HttpWebRequest/HttpWebResponse Execution Problem
    A AliAmjad

    I'm issuing a Web Request and the stream i receive in response is empty but when i navigate to the same URL in my browser it's working fine and returning the data. Bellow is the basic code i am using right now.

    Dim req As HttpWebRequest = HttpWebRequest.Create("http://192.168.15.40/touchscreens/get.qsp?display=1")
    
            Dim res As HttpWebResponse = req.GetResponse
    
            Dim sr As New StreamReader(res.GetResponseStream)
    
            Dim dataReturned As String = sr.ReadToEnd
    
            sr.Close()
    
            MsgBox(dataReturned)
    

    What could be the problem? Thanks for your help!

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    Visual Basic help mcp question

  • Windows Installer - Preparing to Install?
    A AliAmjad

    Previously everything was working just fine but today when I opened Visual Web Developer and then opened the Web Form in design view it gives me this ever lasting dialog box "Windows Installer - Preparing to Install". Please Help!

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    ASP.NET design mcp help question

  • An existing connection was forcibly closed by the remote host? [modified]
    A AliAmjad

    Previously my code was working perfectly fine but suddenly showing up this error Unable to write data to the transport connection:An existing connection was forcibly closed by the remote host; whenever i try to write something on the network stream. Following is the code i am using right now:

     Dim PacketSize As Integer = 8192
    
            Dim client As New TcpClient
            client.Connect(IPAddress.Parse("192.168.15.51"), 7771)
    
            Dim ns As NetworkStream = client.GetStream
    
            Dim fs As New FileStream(FileName, FileMode.Open, FileAccess.Read)
    
            Dim buffer(PacketSize - 1) As Byte
    
            Dim i As Integer
            i = fs.Read(buffer, 0, PacketSize)
    
            While i <> 0
    
                ns.Write(buffer, 0, i) <-- this line cause the error
    
                i = fs.Read(buffer, 0, PacketSize)
    
            End While
    
    
            fs.Close()
            ns.Close()
    

    There's no anti-virus or firewall on target machine. I've even turned window's firewall off. Do i have to start any service on the target machine which somehow stopped??? I've searched everywhere but didn't find solution. Please help.

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    modified on Tuesday, May 5, 2009 2:13 AM

    Visual Basic help sysadmin mcp question

  • Accessing File
    A AliAmjad

    Can anyone please give me a hint how to check whether a file i being accessed by another process or not, so that i can open it for manipulation. Thanks in advance!

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    Visual Basic mcp tutorial

  • Time Addition Problem
    A AliAmjad

    I am using the following code to Add up the difference of two time fields but It's not showing the correct record when the hours part increases above 24 means It shows the correct addition only if It's between 24 hours. For example WaitingTimeTotal (hh:mm:ss) ---------------- 03:18:46 03:25:06 ________ 06:43:52 which is correct but WaitingTimeTotal (hh:mm:ss) ---------------- 03:18:46 03:25:06 16:23:46 07:24:20 ________ wrong answer!!! The code i am using is

    convert(varchar,convert(DateTime, SUM(convert(real, ConfTime - EnterTime))),108)WaitingTimeTotal

    Can you please guide me. Thanks in advance !

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    modified on Thursday, January 15, 2009 1:28 AM

    Database tutorial mcp help

  • DataTable Events in ASP.NET?
    A AliAmjad

    Thank you buddy for your response and putting me in the right direction :)

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    ASP.NET question csharp asp-net

  • DataTable Events in ASP.NET?
    A AliAmjad

    My Question is how can we access DataTable events inside a Dataset in ASP.NET because I can't access the Partial Class for writing logic for RowChanging or RowChanged events. Thanks in advance !

    AliAmjad First make it Run THEN make it Run Fast!

    ASP.NET question csharp asp-net

  • [Message Deleted]
    A AliAmjad

    I am completely off the road i think if i can rephrase the question should i ask - How memory is allocated to an object in Heap? If you came across any technical article on this topic please let me know Thanks.

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    Visual Basic

  • [Message Deleted]
    A AliAmjad

    I know all this but may be i am not able to ask the question properly or you are not getting my point anyway thanks a ton for your help Dave.

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    Visual Basic

  • [Message Deleted]
    A AliAmjad

    WHAT THE HELL ! when someone don't understand the question he/she mark it as bad question. You all guys are expert out there i am sure but i don't consider myself one that's why i was asking for help from all the experts & brilliant brains out there in order to eliminate the confusion i am facing. If by asking something that hurts your ego or that's way too below your expectation then please don't even bother to answer just IGNORE.

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    Visual Basic

  • [Message Deleted]
    A AliAmjad

    Ok here is what i am trying to accomplish i am working on an Application Framework and using both the composition approach and inheritance approach all i was asking the technical working of the code given what is actually happening in the memory as there is some confusion i am facing that's why asking.

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    Visual Basic

  • [Message Deleted]
    A AliAmjad

    I am not incapable of reading the comments because they have been written by myself. I think you didn't understand the question all i was asking the technical working what is happening in the memory when we execute the given code.

    AliAmjad(MCP) First make it Run THEN make it Run Fast!

    Visual Basic
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups