Click here to Skip to main content
15,393,706 members

Comments by Mike Hankey (Top 101 by date)

Mike Hankey 24-Jul-22 8:40am View
I don't see anyway where you've declared c, only a.
Mike Hankey 21-Jul-22 11:59am View
Disable Checkbox until transition finished?
Mike Hankey 21-Jul-22 8:22am View
This worked for me just fine.

var btns = document.getElementsByTagName('button');
for (i = 0; i < btns.length; i++) {
btns[i].addEventListener('click', function () {
Mike Hankey 19-Jul-22 17:43pm View
I don't know VB very well but it looks like your SQL is correct.
Have you put a break to see what the value of 'codee' is in the SQL statement?
Mike Hankey 13-Jul-22 15:24pm View
If you have the temerity to ask me to do your work for you and then the brass gonads to do it quick...all I can say is your fair game.
Mike Hankey 13-Jul-22 12:21pm View
Ah good point, I'll amend the contract!
Mike Hankey 13-Jul-22 11:22am View
Only except wire transfers... :)
Mike Hankey 9-Jul-22 10:47am View
You've not given much information but as a general rule the two are totally different beasts and cannot be converted....refactored yes.
Mike Hankey 17-Jun-22 10:49am View
If you have a problem with the logic, ask your instructor.
If you have a problem with the code, post what code you have.
Mike Hankey 7-Jun-22 10:50am View
It will return to whatever color the menu item was originally set to.
Mike Hankey 8-May-22 21:08pm View
Comma at end of line after REFERENCES i.e. ...REFERENCES,
Mike Hankey 16-Apr-22 11:29am View
It's looking for the file "pdfdemo.Global", where ever you got this code they subclassed this from
Mike Hankey 1-Apr-22 7:52am View
Not a problem, I had a problem early on grappling with ADO and bought ADO.NET in a Nutshell book by Matthew MacDonald[^] this book. I very rarely find uSoft docs useful
Mike Hankey 23-Mar-22 15:29pm View
Let me give you a little piece of advice...if you down vote everyone that attempts to help you you will get no help. I took 20min. out of my busy day to try to help. Just a heads up!
Mike Hankey 1-Nov-21 12:43pm View
What about using the MOD (%) operator?

Seems like just the ticket here!
Mike Hankey 26-Oct-21 17:29pm View
Set a flag and check, if set answers trick or if false answers treat and updarte flag.
Mike Hankey 14-Oct-21 10:45am View
Where are trying to install it? PC, Laptop, VM, ??

More information would be very helpful.
Mike Hankey 9-Oct-21 14:28pm View
That's a very broad subject and depends a lot on your expectations.

Your skill level and confidence in programming c# will determine the outcome.

You might want to check out some of the other media apps instead.
Mike Hankey 16-Aug-21 11:07am View
What have you tried?

You will more likely to get help if you have attempted and have a particular question, but you will likely not find anyone willing to do the work for you.
Mike Hankey 28-Feb-21 12:20pm View
Why do you have the -= in this?

Mike Hankey 22-Feb-21 19:34pm View
Thanks Gerry, that'll get me thinking.
Mike Hankey 21-Feb-21 9:47am View
string str = value.ToString();
var baseUri = Environment.CurrentDirectory;
Uri uri = null;

if (str == "None")
// The secret is adding the file
uri = new Uri($"file:///{baseUri}" + "/Pictures/NoImage.jpg", UriKind.RelativeOrAbsolute);
bmi = new BitmapImage();
bmi.UriSource = uri;
return bmi;
Mike Hankey 21-Feb-21 9:08am View
You know I looked at that article and didn't think it pertained.

Works like a charm.
Mike Hankey 21-Feb-21 8:03am View
Tried that same result
Mike Hankey 21-Jul-20 16:41pm View
NewtonSoft is a very stable utility and is very popular. You can use NuGet package manager to load it into your application. As far as uSoft JSON utilities, I don't use them because NewtonSoft is so much better. I don't know if uSoft has similar functionality.
Mike Hankey 15-Jul-20 14:30pm View
Hadn't thought about loading order. Thanks!
Mike Hankey 27-Mar-20 13:17pm View
C Programming by Ritchie has been the standard for many years and the one I have on my desk!
Mike Hankey 4-Jan-20 15:02pm View
Here's a start
Mike Hankey 25-Nov-19 9:44am View
Thanks Pete
Mike Hankey 22-Nov-19 11:01am View
Yeah I changed them all to packs, I'm learning fairly quickly.

I bought the WPF 4.5 Unleashed and while it's a good book it doesn't go into much detail but covers most everything.

What I'm finding on the web, if I can find it usually doesn't work but gives me a general idea and I can most times figure out what needs to be done, but still struggling in other areas.

Can you recommend any in-depth books or tuts?
Mike Hankey 22-Nov-19 9:30am View
I did try that.

In your opinion should what I tried work?
Is this the way you would do it?

Thanks Pete
Mike Hankey 22-Nov-19 9:01am View
Yes I only remove the Color.xaml file because everything is based on defined colors.
The reason I save the rest off into temp list is because the order is important since everything is based on colors.
Mike Hankey 22-Nov-19 8:24am View
Pete, thanks for your input. I'm a complete NOOB, please bear with me.

I have a colors.xaml file that defines the colors that I'm using.
Then I have a brushes.xaml file that defines the brushes using the colors and all brushes are declared dynamic.
Then I have a styles.xaml file that defines the style for all the controls and these are declared as dynamic.

In my example above the first listing works fine, all the colors change between dark and light themes.
But the code in the 2nd listing does not work and I'm wondering if the temporary storage in the temp list is causing the problem?

I hope I've answered your question.
Mike Hankey 3-Oct-19 14:22pm View
You must keep track of the LED status, i.e. whether it is lit or not.

Why are you using a delay loop since the LED must remain lit until the other button is pressed?

If you're using Atmel Studio then use the simulator to debug your program and it will save you a lot of head aches.
Mike Hankey 2-Aug-19 12:32pm View is the place for help with AVR devices.
Mike Hankey 28-Jan-19 19:06pm View
This is so vague you'll never get an answer, well a civil anser.
What language?
What have you tried?
Where are you stuck?
What class is this for?
Mike Hankey 11-Sep-18 12:24pm View
A simple way would be to convert to character array "ToCharArray() " and just interate though the chars.
see here
Mike Hankey 10-Sep-18 9:24am View
Take a look at this site for a list of mime types.
Mike Hankey 9-Sep-18 8:55am View
There's an area at the bottom of the article to ask questions, would get an answer a lot faster there!
Mike Hankey 22-Jun-18 8:20am View
Depends on the RFID reader, most readers output serial data in a Wiegand format.

Let google be your friend
Mike Hankey 3-Apr-18 7:38am View
The 595 has a latch so no need for the flip flops.
You might have more luck posting this at, an arduino site.

Not that difficult of a problem.
Mike Hankey 4-Mar-18 15:13pm View
As Kornfeld says role based authorization is the way to go here are a couple of links;
Mike Hankey 8-Jan-18 13:06pm View
First and foremost how do you plan to store file data on 8051 with only 128 bytea of RAM. It does have 4k of ROM but you would have to buffer it.
Also what are you going to be using for hardware on mcu side, a development board, home made board? Most development boards have an USB port that converts the UART to USB but if you develop your own board you will need such a converter, they're available on ebay and other places. From there it is just a matter of serial communications between devices.
Mike Hankey 18-Dec-17 14:55pm View
Thanks for the response, I tend to get so frustrated and in this case in a hurry that I ask a stupid question out of pure desperation.
After 2 days of research and trial and error I have found that;
- Yes I was always using the meta with my connection string
- I've always had a problem with authorization, turns out I was using the DB on the server but authorization was done by a DB created locally. Maddening to say the least. So I've gone to a custom authorization and role providers and done away with the ASP stuff.
- I did try the Code First approach as many had suggested but to no avail.

Strangest thing is though this morning I told my GF about my problem and she answered back " must have fixed your problem because it's up..."
Tried it on FF Developer like I had been doing, no love, went to chrome and IE and it was up. Tried clearing cache, same thing so I don't know what the hell to think about that.

Anyway I'm going to create another web app and transition everything over to it just to be sure there are no remnants taking it a piece at a time.

The hurry up problem I have is that I have 1 week to finish the main part because after that I'm moving to another park (I volunteer at FL state parks) and the park that I'm moving to has very crappy internet.

Anyways thanks for your input, appreciate it!
Mike Hankey 27-Nov-17 20:53pm View
The code you've provided is for a serial connection, not TCP/ID.
Mike Hankey 11-Nov-17 14:08pm View
It will require not only physics but the combination and communication between many hardware devises. At least anything resembling a hover board.
Mike Hankey 25-Mar-17 9:49am View
What WiFi board?, which IDE?, what language?
Mike Hankey 25-Mar-17 9:13am View

This might help.
Mike Hankey 20-Feb-17 14:57pm View
I don't use the Arduino IDE but should be applicable;

There's 2 ways you can do this;
1) Either use 2 timers
2) Use 1 timer and set the interrupt rate at say 1mS and have the interrupt check targets at each interrupt and do whatever when target reached.

Say your 2 targets are 10mS and 100mS then when mS counter hits 10 and 100 take action!
Mike Hankey 20-Feb-17 13:08pm View
If you want to get the value from the browser you will need to look at Web scraping. A better way might be to have the Uno output to the serial port and use serialport class to receive the value?
Mike Hankey 2-Feb-17 15:01pm View
I realize that but when POST, PUT won't work and GET does I have to use it until I can solve this problem. The GET will work but have a cap, I believe of 2K or so, so I have to save in smaller chunks.
Mike Hankey 30-Jan-17 15:35pm View
Mr. Deeming you are the man. I had to modify what you provided but you got me on the right track.
FFR (For Future Reference) this worked for me!
'@Url.HttpRouteUrl("DefaultApi", new { controller = "AdminContentApi" })?name=' +;
Mike Hankey 28-Nov-16 11:39am View
Proper protection always. :)
Mike Hankey 28-Nov-16 11:24am View
Thanks Mehdi, when I get ready I will!
Mike Hankey 6-Jun-16 8:03am View
If you're using the Arduino IDE I would post the question on their site, you're more apt to get a quicker response there. I don't use their IDE so can't give you a URL to their QA.
Mike Hankey 13-May-16 13:56pm View
check out my article here
Mike Hankey 14-Mar-15 3:51am View
Ok y'all they say a picture is worth a 1000 words so here's a link to I hope a better understanding of the problem;
Mike Hankey 13-Mar-15 23:47pm View
Ok I don't think you understood my problem or maybe, as usual I didn't explain it simply enough...I get frustrated and lose my ability to explain myself.
From Acronis I fill in the file URL of my application and click a button to start my application. My application starts up and checks if there is a file name in the command line args, other than that there is no other need for these args so forget them.
Now when my application starts up I open a windows form in the lower right corner of the screen with a couple of button to either cancel the current operation or accept it or cancel and this terminates my application with either a Environment.Exit 0 for success or non zero for abort.
Now the crux of the problem my application works perfectly except along with the windows form opening in the lower right hand corner of the screen a console window also opens elsewhere on the screen. I did not create, spawn, pray for, receive as a gift or otherwise ask for this console window so how do I get it not to come up or be created.
If you need further explanation let me know.
Mike Hankey 3-Mar-15 13:58pm View
Richard thanks for your reply but my stupidity prevails, I'm using Bootstrap.DatePicker.
Mike Hankey 1-Mar-15 9:24am View
The error you've indicated and the line that it's supposedly thrown on doesn't make any sense. As Richard says step through the code and you will likely find your problem.
Mike Hankey 28-Feb-15 22:29pm View
What is the error message you are getting?
Mike Hankey 13-Feb-15 6:18am View
BTW the error is

The model item passed into the dictionary is of type 'System.Collections.Generic.List`1[JaxCoderV20.ViewModels.CommentViewModel]', but this dictionary requires a model item of type 'JaxCoderV20.ViewModels.UserViewModel'.
Mike Hankey 12-Feb-15 15:27pm View
Thanks for the extra hand Mike I'll keep that one in mind also for the future.
Mike Hankey 12-Feb-15 2:06am View
Great stuff thanks Maciej
Mike Hankey 8-Feb-15 5:48am View
That answered all my questions thanks! I don't see a way to mark it as solved or give credit other than saying thanks.
Mike Hankey 3-Nov-14 16:41pm View
dongle is a very private person and probably won't phone you so there's no use in creating an app just for him. Just saying!
Mike Hankey 9-Sep-14 11:35am View
Try Regex.Replace it can be used to replace any special characters see and if you want a good tool for testing Regex expressions try Expresso!
Mike Hankey 18-Jan-14 22:52pm View
Great link thanks
Mike Hankey 8-Jan-14 11:56am View
It works either way with or without the LEFT keyword.

Thanks again
Mike Hankey 8-Jan-14 11:48am View
Maciej it worked great but had to modify your solution

SELECT Com.*, Cat.[Title] as CategoryStr, Sct.[Title] as SubCategoryStr,
(SELECT COUNT(*) FROM Attachment WHERE ParentId = Com.ObjectID) as AttachmentCount
FROM Component AS Com
JOIN Category AS Cat ON Com.[CategoryId] = Cat.ObjectId
JOIN Subcategory AS Sct ON Com.[SubCategoryId] = Sct.ObjectId

Thanks for the help
Mike Hankey 8-Jan-14 11:39am View
It still returns a single record with the AttachmentCount = 0. What I am wanting is for the query to not return anything if there are no Components.
Mike Hankey 8-Jan-14 11:38am View
It still returns a single record with the AttachmentCount = 0.

What I am wanting is for the query to not return anything if there are no Components.
Mike Hankey 12-Oct-13 20:41pm View
If you explain the problem you are having, post code and explain what you've tried then ask for specific help in the area you are having problems you are much more likely to get help here.
Otherwise you can hire someone to do your homework in which case when you enter the job market you are going to have real problems if IT is your field.
Mike Hankey 13-Aug-13 19:33pm View
Zero, I thought this would be a generic question as GCC now supports C++11 anyway;

First, I am developing this for an embedded system using GCC.

Second, refer to first!

If this were to be developed using VS I would not be having this problem but GCC error messages are so vague that sometimes they have nothing to do with the problem at hand so it's been a PITA to say the least but I'm starting to catch on and eye the nuances.

Thanks for your feedback!
Mike Hankey 13-Aug-13 17:55pm View
Thanks, looks like I set off a fire storm?

As an aside, down voting only matters if you care. :)
Mike Hankey 13-Aug-13 14:39pm View
Excellent I had forgotten about the initialize once rule and you hit it right on the head. I've not worked much with templates and it's been a learning experience.
Mike Hankey 28-Apr-13 11:53am View
Thanks I'll eventually figure it out whether it's SVN or Git.

Turns out I can check out modules from various places to a project, just couldn't do it using AnkhSVN, had to go into Repo Explorer and do it there and then add to project.
Mike Hankey 28-Apr-13 11:36am View
I've just had problems off and on with SVN, especially with branching and mergin...PITA.
Another concern and I don't know wheter it's SVN or AnkhSVN ot Tortoise but I've moduralized my stuff (embedded libraries, AVR) and I want to be able to check out stuff from different areas into one project. As an example I've wrote SPI, Timer and assorted board libs and I want, as I say to be able to reuse them in different projects and as I enhance them I want changes to reflect back to a single spot in the repository. Maybe I just haven't researched it enough, maybe it's possible?
Mike Hankey 15-Apr-13 16:14pm View
The TextChanged event is called whenever text is changed in the editor. I use it in an RichTextBox editor I created.
Mike Hankey 26-Dec-12 14:43pm View
I understand you and agree it's a bad design thing.
Mike Hankey 26-Dec-12 14:42pm View
I understand you and agree it's a bad design thing.
Mike Hankey 26-Dec-12 13:31pm View
I wasn't somehow saying that by using the ListView as opposed to the ListBox that it was a reasonable or acceptable thing to do only that if he wanted to add the button for some reason not understood from his question that that would be the way to do it. Thanks for the vote!
Mike Hankey 21-Dec-12 18:24pm View
What have you tried? If you want someone to do it for you you're looking for
Mike Hankey 20-Dec-12 16:27pm View
Standalone, it's my home computer. I've never dealt much with security and UAC much so I'm kinda at a lose.
Mike Hankey 19-Dec-12 19:44pm View
You need to be more specific about what you're trying to do and what you've tried. Are you using the AVR UART?, are you bit banging or ???
What serial port virtual driver are you using?
Are you using AVR serial library code or your own?
Mike Hankey 19-Dec-12 14:42pm View
Curious you are disposing of the bitmap after you're through with it...hmmm
If the bitmap is the same size you might try creating it once and keeping it as a class variable so you don't have to create it every time.
Is there something in one of the other draw routines that is causing the problem? You might try commenting them out one by one and seeing if the problem lies there?
Mike Hankey 19-Dec-12 14:35pm View
Does the file and folder where the s3db is located have the correct privileges?
Mike Hankey 12-Oct-12 9:52am View
If you google "DynamicPopulate extender" you will get 11K hits and the link given is a video that shows how to use.
Mike Hankey 8-Jul-12 16:08pm View
Flicker when you try to do what?, Resize, draw?
Mike Hankey 9-Jun-12 9:35am View
"horizontally and/or vertically mirror my text" What does this mean?
If you are wanting to keep a duplicate copy of the text use the OnTextChanged event and/or the .Text property.
Mike Hankey 9-Jun-12 9:31am View
First you haven't posted the code in question and second there is plenty of online material to help you learn PHP, at least enough to decipher the code in question.
Mike Hankey 9-Jun-12 9:28am View
This is a very broad area I suggest you study up on the subject and then if you have any questions I'm sure you could get help.
Mike Hankey 23-Apr-12 2:26am View
You need to show the SQL statement you're using.
Mike Hankey 19-Apr-12 17:22pm View
One thing I noticed in your code (Form1.vb,Panel_1_Paint) you're not disposing the pen when you finish with it. ALWAYS dispose graphics objects when you are done with them.
Mike Hankey 16-Apr-12 14:21pm View
Is the data in the DefaultView correct?, and the grid just not mapping correctly?
Mike Hankey 4-Jan-12 10:26am View
You also need to add the overridden Equals code.
Mike Hankey 3-Jul-11 16:15pm View
True enough, guess was thinking more along the lines of C#. Like I mentioned above it's been a long time since I've done C++ in WinForms.
Mike Hankey 3-Jul-11 13:42pm View
I've found that drawing directly to the/a window is much more efficient and cuts down on flickering. Some controls are more efficient then others, i.e. the Panel control is very inefficient never use it as a canvas.
Mike Hankey 3-Mar-11 21:36pm View
Thanks...Yeah I had the editor open and was off double checking and it took a couple of minute, it happens.
Your's is the better answer I'm glad you got the credit.
Mike Hankey 3-Mar-11 20:52pm View
I guess we posted at the same time.
Mike Hankey 19-Aug-10 9:19am View
Doesn't everyone do it like this? :)