User Profile

Collapse

Profile Sidebar

Collapse
BeemerBiker
BeemerBiker
Last Activity: Aug 14 '18, 03:18 AM
Joined: Jul 28 '08
Location: San Antonio, Texas
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Probably going to look for "OneDrive" in the string returned by environment and if the open fails then remove that phrase and try again.
    See more | Go to post

    Leave a comment:


  • How to stop Environment.SpecialFolder from opening OneDrive

    I am using Environment.Get FolderPath(Envi ronment.Special Folder.Personal ); to open a file in "users\username \saved game" (for example) but when deployed I see OneDrive substituted after username and I do not know how to stop that.

    I read where one can set FileDialog.Auto UpgradeEnabled= False to stop dialog box widget from using OneDrive but I dont see the equivalent.

    I used grpedit to stop OneDrive service....
    See more | Go to post

  • BeemerBiker
    replied to Multiple IP Address Conundrum...
    I am not a network expert but since no one has answered I will make a guess. If the service needs to use a certain IP address then set up a route using the IP address you want such as
    route add -host 1.2.3.4 dev eth0 (probably something like that in windoz but I got the idea from here

    HTH
    See more | Go to post

    Leave a comment:


  • Yea - I found the solution and didnt bother posting it exactly. I noticed this post seem to have a lot of views and this was what I found that worked:
    Code:
     public static byte[] ConvertImage(System.Drawing.Image img)
        {
            Byte[] data;
            using(MemoryStream ms = new MemoryStream())
            {
                img.Save(ms, img.RawFormat);
                data = new byte[ms.Length];
    ...
    See more | Go to post

    Leave a comment:


  • How to access raw image data in resource file?

    I have a .png file that my console app reads and puts into a structure that is saved as a file. The png is always the same so I thought I could just add it as a resource image to a resource file so it would be included in my program and not as a separate file. When I did that, the png shows up as a "SystemDrawingB itmap". If I examine this resource in a watch I see "Base" and "Static" members. Expanding those properties...
    See more | Go to post

  • BeemerBiker
    replied to how to get CTRL-Z to close a pipe?
    in C
    solved!

    I read your response and it got me thinking and trying a couple of things and I suddenly realized that I had reversed the pipe direction. The following works:

    makelist.exe dvd1.txt | sort.exe > sorted.txt
    See more | Go to post

    Leave a comment:


  • BeemerBiker
    started a topic how to get CTRL-Z to close a pipe?
    in C

    how to get CTRL-Z to close a pipe?

    My 'c' program reads each line of a .txt file, makes a few changes and then outputs the line of text (which are names). I want the contents to be sorted and did not want to bother writing my own sort. The program runs in a command prompt from inside a batch file for example:

    sort | makelist.exe BluRay1.txt > sorted.txt
    sort | makelist.exe Dvd1.txt >> sorted.txt
    ..etc..

    I have to supply a ctrl-z manually...
    See more | Go to post

  • missing an assembly when all exceptions thrown

    I changed the exceptions as suggested, but then had a problem with XML Serialization as shown below. Googleing I see where this may be a bug with VS2008.

    With exceptions thrown, the serializer fails to work as shown here


    With exceptions turned off, the serializer runs ok.


    There is probably one exception that is thrown that should...
    See more | Go to post

    Leave a comment:


  • Didnt work worth a hoot, got a null reference as shown


    After commenting out my custom throw-catch, I got the following useful stuff
    ...
    See more | Go to post

    Leave a comment:


  • How do I re-throw an exception back to the debugger?

    I am trying my hand at throwing custom exceptions. Unfortunately, while my code to catch them does work, all the other exceptions go thru my exception handler. How do I let the exception continue on so that the VS debugger stops at the line of code that caused the problen and not in my custom catch routine which is only looking for a few things?

    Code:
                try
                {
                    SolveProblem();
    ...
    See more | Go to post

  • can this C++ xml serialization be de-serialized into C# classes?

    I have a (fairly simple?) xml file that was created (serialized I assume) by a C++ program. I am trying to deserialize it with my C# program so I can analyze it. I cannot arrange my C# classes so as to properly deserialize all the parts of the xml file. I assume that some C++ class layouts cannot be duplicated in C# and that is the problem. I have easily walked thru the tree and converted the xml data into my own class structure, but I am learning...
    See more | Go to post
    Last edited by BeemerBiker; Sep 13 '10, 04:17 PM. Reason: Included an attachment

  • missing casts when mixing Int16 vars with constants (how to avoid?)

    None of the following work. Surely there is a way to do simple operations with mixed integer types.
    Code:
    Int16 v = 4;
    v = v << 2;
    v = v << (Int16)2;
    v = v << Convert.ToInt16(2);
    v = v << 0x2;
    v = v << unchecked(2);
    v = unchecked(v << 2);
    the following does not work either

    Code:
    Int16 v = 4;
    Int16 I_am_a_2 = 2;
    ...
    See more | Go to post

  • parameters: struct unexpectedly not passed by value

    I am getting unexpected behavior in parameter passing, and was wondering if by adding "code" to a "public struct", I have made it behave like a class.

    Code:
            static void SpinOneCard(board tb, ref OneSavedBoard osb, int SrcCol, int SrcCard, int DesCol, int DesCard)
            {
                tb.nSpins = 0;
                osb.moveto(ref tb , SrcCol, SrcCard, DesCol, DesCard);
    ...
    See more | Go to post
    Last edited by BeemerBiker; Aug 25 '10, 02:19 AM. Reason: solved problem

  • Thanks Jeff - I would not have spotted the problem with the regex, especially since it worked on the first call to the subroutine.

    I also tried the following which got rid of the $1 but still had the same bad behavior:
    Code:
    my ($uno) = $c=~ ?<nonce>(.*)</nonce>?;
    print "between the nonce: " . $uno . " \n";
    I am thinking that the fact it worked on the first call...
    See more | Go to post

    Leave a comment:


  • what is scope of $1 or why can't I call the same sub twice?

    This should have worked. It only printed 11111 and did not print the 22222. So am I missing a "delete $1" or a "free $1" before the routine returns? Googleing was not helpful.

    Code:
    use strict;
    use warnings;
    
    sub printit {
     my ($c) = @_;
    
    print "arg:" . $c . "\n";
    
     $c=~ ?<nonce>(.*)</nonce>?;
    
     print "between
    ...
    See more | Go to post

  • Thanks - that did it. However, that forcearray also stopped hash's from working :-(
    See more | Go to post

    Leave a comment:


  • Is <id> reserved and unusable in perl XML::Simple?

    I cannot get the following code to work unless I
    (1) Change <id> to anything else, or
    (2) Add an empty section to the bottom of my xml file.

    Could this be a bug in 5.10.1 ActivePerl or my test xml script is no good?

    Code:
    use strict;
    use warnings;
    use XML::Simple;
    use XML::Parser;
    use Data::Dumper;
    
    my @failxml = (
    "<tests>\n",
    "<test>\n",
    ...
    See more | Go to post

  • BeemerBiker
    replied to how do I reference key in xml::simpleview
    in Perl
    Found an answer here http://interoperating.info/courses/perl4data/node/26

    However, I had tried what should have worked earlier but it failed because, unaccountably, the following line failed to be parsed correctly in my xml file

    <id>0</id>

    If I substutite "<id1>" for "<id>" and "</id1>" for "</id>" everywhere, then the source...
    See more | Go to post
    Last edited by BeemerBiker; May 30 '10, 05:12 PM. Reason: explain that program should have worked on my first attempt

    Leave a comment:


  • BeemerBiker
    started a topic how do I reference key in xml::simpleview
    in Perl

    how do I reference key in xml::simpleview

    The following work fine:

    $doc->{computer}[1];

    I wasted about 2 hours but can't figure out how to access the same thing using "foreach"
    $rows = \@($doc->{computer}) seemed like it should have worked but it didnt.

    Once the foreach works, I should be able to use something like
    # foreach my $key (keys (%{\@doc->{computer}}) )
    # {
    # print...
    See more | Go to post
    Last edited by BeemerBiker; May 29 '10, 09:47 PM. Reason: show results

  • how do I stop server from running when I want to cancel out?

    I am using CancelAsyncPost back in an attempt to stop a page from loading. It actually works (the page wont get a postback) but the server keeps running, processing data I dont want processed until it gets done with a task I really didnt want done because I didnt realize how long it took

    I tried adding a button to do a server transfer to "./Default.aspx" but it only transfered AFTER the processing was complete.
    ...
    See more | Go to post
No activity results to display
Show More
Working...