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
M

Mel Feik

@Mel Feik
About
Posts
529
Topics
101
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Conditional ?:
    M Mel Feik

    sorry on that - I had another issue on my mind when I read the question and posted that. I just thought of how I would stick that in a console app - where method1 & 2 were helpers to Main (ie. methods in the Program class) - in which case static would be required. But on considering.. should have just posted my own question quietly.

    --------------------------------------------- Help... I'm embedded and I can't get out! If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    C# com tools question

  • Process.Kill() problem
    M Mel Feik

    I have a simple application timer program - allows any executable to launched, with command line arguments (optional) and terminates after specified number of minutes. Here's how I'm currently terminating timed process:

    while (true)
    {
    //keep checking if timer expired or app closed externally (ie. by user)
    if (dtEndTime <= DateTime.Now || p.HasExited)
    {
    if (!p.HasExited)
    p.Kill();
    break;
    }
    System.Threading.Thread.Sleep(500);
    }

    Rather straight forward and works most of the time. A crash occurs when I am timing a program called Fraps.exe and its minimized to the tray. The crash itself doesn't always have the same results. What is consistant is: - the app Kill() is called for IS closed - a crash occurs What varies: - another app in the tray will crash as well (intermittently) If I do not minimize Fraps.exe to the tray no crash occurs (however, leaving it on the desktop is not an acceptable solution). Fraps can be closed via task manager without issue. Any suggestions on how to terminate an external application more gracefully? Process.Close() and Process.CloseMainWindow() have already be ruled out for the case of being in the tray. I'm open to anything will work and not cause a crash.

    --------------------------------------------- Help... I'm embedded and I can't get out! If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    C# help question hardware tutorial learning

  • Conditional ?:
    M Mel Feik

    I believe they (method1/2) would also have to be static (?)

    --------------------------------------------- Help... I'm embedded and I can't get out! If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    C# com tools question

  • Knowing when the date changes with less cost...
    M Mel Feik

    Thanks for that... I didnt even know the Enterprise Library existed. I have been taking a look at on off moments the past couple days, learning curve is a bit high for me to make use of it for what I'm presently working on; however, it is something I can make good use of in the near future (much more than just the file listener at that!).

    --------------------------------------------- Help... I'm embedded and I can't get out! If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    C# css hardware help question learning

  • Knowing when the date changes with less cost...
    M Mel Feik

    I have an application that writes any data it receives on a port to a file. The files have the date appended to them which means I have to keep an eye out for a new day to roll around. At present I'm using this little bit of code...

    DateTime today = DateTime.Now;
    //..........
    if (!(today.Date == DateTime.Now.Date))
    {
    today = DateTime.Now;
    //... do my new day stuff
    }

    ...which is straight forward enough. I am just wondering if there is a better (more efficient) means to know when the clock rolls over to a new day? As it is, I'm running that bit of code immediately before EVERY file write, and change the file name as needed. For now, its not an issue take the time to do things this way, but as my incoming data load increases I can see where streamlining is going to become an issue. Any suggestions?

    --------------------------------------------- Help... I'm embedded and I can't get out! If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    C# css hardware help question learning

  • Pipes! and they aint for smoke'n
    M Mel Feik

    The APPs are actually socket listeners - and they are the "priority" of this project. For example, if I send a "kill" message via the pipe, the APP needs to be a finished state on its port before it will shut down to aid in preventing data loss. But with my current skills set, I suspect I would find myself in the same situation - using an array in the service to establish/handle each socket connection to the APPs if I went that route. And its the array that I'm looking at as being the cumbersome aspect of my service.

    --------------------------------------------- Help... I'm embedded and I can't get out! If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    C# hardware learning

  • Calculate length of textBox for N number of characters
    M Mel Feik

    I dont think you can.. unless you know ahead of time what each character is going to be. A fair approximation would be 9xN since the default text is at 8.5 points. But this leave the box looking a bit "longer" than needed if it contains mostly "skinny" chars. Consider these 10 char field widths: OPOPOPOPOPO itititititi Perhaps if there is a setting that forces the character spacing to be equal - then you can certainly make a calculation.

    --------------------------------------------- Help... I'm embedded and I can't get out! If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    C# question

  • Pipes! and they aint for smoke'n
    M Mel Feik

    Having been kicked out of the basement yet again to develop a little something in the "higher" level code I'm muddling around in the dark and trying to look bright doing it. I need to create a service that will launch mulitple instances of an application (APP) and be able to have some interaction with each APP as well as the service itself (via a serperate application to be developed later - which will be mostly used to add/remove APPs). Just to get the blood flowing, and something started on my desktop, I came up with this little mess...

    Process[] p = new Process[portsAL.Count];
    NamedPipeServerStream[] pipeServer = new NamedPipeServerStream[portsAL.Count];
    for (int i = 0; i < portsAL.Count; i++)
    {
    p[i] = new Process();
    p[i].StartInfo.FileName = appPath;
    p[i].StartInfo.Arguments = portsAL[i].ToString();
    p[i].Start();
    pipeServer[i] = new NamedPipeServerStream("pipe" + portsAL[i].ToString(), PipeDirection.InOut);
    pipeServer[i].WaitForConnection();
    }

    While that actually works (put in a bit-o-code into APP and each instance reported in on its assigned pipe) I will be the first to agree [admit] its not very elegant and I suspect its going to lead to my doing alot more work than my inheritently lazy nature will appreciate. Also, it became clear rather abruptly just how cumbersome it was going to become if I went much farther along these lines. Soooo..... here I am humbly seeking the wisdom of my betters to give me a shove in the right direction.

    --------------------------------------------- Help... I'm embedded and I can't get out! If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    C# hardware learning

  • Oppss....
    M Mel Feik

    and I didnt know where else to post this. I had a question posted in the C# forums that was likely too general to get a useable answer so I decided to delete it. There was a response to the thread but it was not particularly useful/relevant. I deleted my starting thread and a follow up reply of my own, then went to "vote to remove" the response from another user only to see that a message came up saying it was "reported as abuse". This was not intended and don't know how to fix or whom to message to state as much. Sorry for any inconvienience this may have caused.

    --------------------------------------------- Help... I'm embedded and I can't get out! If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    Site Bugs / Suggestions csharp hardware help tutorial question

  • Client
    M Mel Feik

    Perhaps you could post the actual exception. Often e.Source and e.Message are useful as well as the e.StackTrace. I have no problem using: myClient.Connect("xxx.xxx.xxx.xxx", port); in my current project. I'm using UdpClients but the overloads for .Connect are the same.

    --------------------------------------------- Help... I'm embedded and I can't get out! If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    C# help csharp ios sysadmin

  • [Message Deleted]
    M Mel Feik

    [Message Deleted]

    C#

  • C# client server communication [modified]
    M Mel Feik

    Sounds like the message is correct - suspect a pasted example that has its own main (???) And I wouldn't go so far as "hopelessly" unreliable. There are times when UDP can be implemented with the same reliability as TCP - at least I "hope" so, or I might have to go back to the basement where I belong before I get to much farther along in my current project (see post above).

    --------------------------------------------- Help... I'm embedded and I can't get out! If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    C# csharp visual-studio help sysadmin debugging

  • Ouch!
    M Mel Feik

    sorry .. was deliberate... but also intended on the humorous side.... not much room left in the world for a dry sense of humor. --------------------------------------------- Help... I'm embedded and I can't get out! It's amazine how simeple life can be when one get's his head out of his ass...embly If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    The Lounge help

  • Ouch!
    M Mel Feik

    I'm really not sure of the exact state of Canada... although I must say that 'she' has been an excellent 'friend' in that she supplied help when it was most needed. In fact, Canada has supplied many a decent man to protect the idea of international democracy around the globe. --------------------------------------------- Help... I'm embedded and I can't get out! It's amazine how simeple life can be when one get's his head out of his ass...embly If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    The Lounge help

  • Ouch!
    M Mel Feik

    Chris Maunder wrote: the state of Canada" i was with you until this. --------------------------------------------- Help... I'm embedded and I can't get out! It's amazine how simeple life can be when one get's his head out of his ass...embly If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    The Lounge help

  • Time Management
    M Mel Feik

    I so agree.... although I manage my break time rather different (prefer to go shoot squirlles or weed in my garden... the still leaves the problem of not jumping straight back into work when I return (that is.... when I return from a break participating in CP seems a foul to those who pay me. --------------------------------------------- Help... I'm embedded and I can't get out! It's amazine how simeple life can be when one get's his head out of his ass...embly If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    The Lounge hardware tutorial question learning

  • Time Management
    M Mel Feik

    I'm just curious as I suspect I'm not the only person who experiences this; but how do you all find the time to be so dedicated to participating here at CP? I find that I'm off in so many different 'proprietary' environments that I don't generally have time to come to one focused on the main-stream ones that are offered here. Just thought I would ask as I might get some useful tips on how to better balance my time. PS> for anyone interested in how the pond came out I'm going to post some pics soon as I have time to create a new site on my new host. -m --------------------------------------------- Help... I'm embedded and I can't get out! It's amazine how simeple life can be when one get's his head out of his ass...embly If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    The Lounge hardware tutorial question learning

  • return value from a register write
    M Mel Feik

    Hey all, I'm working with a Phillips LPC2129 chip using a Keil compiler. In viewing the example code supplied by Keil, I noticed that they returned an 'int' from a call to a function sending a char out a UART configured as ab RS232 port. To write to the UART the following is requiredL U1THR = . The problem I have is that in the sample code provided by Keil they return that value in the 'putchar' call and I have no clue how to determine the value of the return. Moreover the manner in which a byte is written to the UART is a register write, not a function call. For example: return( U1THR = ch ); where ch is the char to be sent. Regardless of what value ch = the return value is 'H' (0x48). I reckon my question lies in how to determine the return value of an assignment? -any got any input on this? --------------------------------------------- Help... I'm embedded and I can't get out! It's amazine how simeple life can be when one get's his head out of his ass...embly If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    Mobile tutorial question hardware help learning

  • Article!
    M Mel Feik

    do you think there might be an interest for articles on dysfuntional software? That might be a topic I could work with myself. :wtf: --------------------------------------------- Help... I'm embedded and I can't get out! It's amazine how simeple life can be when one get's his head out of his ass...embly If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    The Lounge tutorial question

  • Site Hosting
    M Mel Feik

    do you have link to your service? --------------------------------------------- Help... I'm embedded and I can't get out! It's amazine how simeple life can be when one get's his head out of his ass...embly If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

    The Lounge php css mysql com hosting
  • Login

  • Don't have an account? Register

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