15,793,605 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Python questions
View PHP questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge ย
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by raddevus (Top 78 by date)
raddevus
20-Sep-23 14:33pm
View
Have you looked at the Trusted Execution Environment sample ==> https://learn.microsoft.com/en-us/windows-hardware/drivers/samples/tree-driver-samples
Then within that, (code at github) take a look at the sample test code ==> https://github.com/microsoft/Windows-driver-samples/blob/main/TrEE/Test/SampleTest.cpp
It may show you how to make the calls. Hopefully this helps.
raddevus
25-Aug-23 14:01pm
View
I found this, which could be similar and may just provide a bit more related info: https://stackoverflow.com/questions/75006774/capn-proto-unaligned-data-error-while-trying-to-sendreceive-serialized-object
raddevus
25-Aug-23 13:45pm
View
Also, there are numerous reasons this problem can occur and many of the differing solutions can be see on this StackOverflow => https://stackoverflow.com/questions/19645441/avrdude-stk500v2-receivemessage-timeout
raddevus
25-Aug-23 13:42pm
View
Which OS are you running? There is a problem on Linux where you don't have access to the port, which shows up like this.
raddevus
10-Aug-23 14:34pm
View
Way to go! I think you have discovered the answer for this mysterious question -- most likely it is the "click" event that needs to be changed to a "touch" event.
raddevus
20-Apr-23 9:37am
View
I can't tell what you want from your question. I don't see any reference to your 3rd table.
Why don't you try writing up working example at http://sqlfiddle.com/ then add a link to your question?
raddevus
3-Apr-23 8:14am
View
Hmm...both of my ALT keys show up when I run the example code at my link.
Did you know that when you RDP to a box only the left ALT key works on the remote box?
It's interesting that you're seeing that behavior locally.
raddevus
31-Mar-23 8:19am
View
ok, well sorry to hear about your keyboard problem, but at least you were able to discover what the root cause was. Thanks for posting back and mentioning that you found the problem. Good luck to you.
raddevus
29-Mar-23 10:17am
View
If you tried my example and it still didn't work then either:
1. it is your browser -- which browser are you using?
2. it is your keyboard
Good luck,
raddevus
20-Feb-23 16:25pm
View
We posted at the same time. :) Took me a minute to see that the from was missing.
raddevus
10-Jan-23 10:25am
View
Glad you got it working. Way to stick to it and not give up until you get it done. ๐๐ฝ
raddevus
10-Jan-23 9:39am
View
Are you looking for something like:
let allValues = ["first","second","third","fourth"];
allValues.map(val => console.log(`I like ${val}`))
OUTPUT
I like first
I like second
I like third
I like fourth
Or if you're trying to replace multiple values in the one string with multiple values from an array, it becomes a bit more imperative-style programming -- step-by-step.
In that case you'd have to 1) get the value from the string 1,2,3 etc then get the target value from the array, then replace the value in the original string with that value.
raddevus
10-Jan-23 9:17am
View
The addition of the / means replace all of the (left bracket, followed by 1) [1
Then there is the | (or) (right bracket) \]
So in natural language it would be something like:
Replace All left bracket followed by 1
or any right bracket ] with an empty char
raddevus
6-Oct-22 8:29am
View
Deleted
It is very close to the same, but the first answer changes the actual row of data background:
DefaultCellStyle
.SelectionBackColor
My solution changes the HEADER of the column -- not the data.
YourDataGridView.
ColumnHeaders
DefaultCellStyle
raddevus
13-Sep-22 16:01pm
View
what does text variable look like?
raddevus
16-Jun-22 15:31pm
View
This line seems suspect: temp_df = pd.read_html(base_URL)[2]
You're indexing off the HTML that comes back into the 2nd element??
What if it fails? What would temp_df value be when it hits the code that you seem to be indicating that fails?
results.append(temp_df,
raddevus
9-May-22 14:57pm
View
It's a long time since this has been posted, but I've been thru this problem also (and had to entirely reset my app & lost my users). This was about to happen again, as AndroidStudio was telling me that the keystore was tampered with or I had wrong password. I knew it wasn't wrong password because it is stored in a password manager.
I stumbled upon a fix however & wrote it up at: https://stackoverflow.com/questions/72176501/why-does-androidstudio-fail-when-building-signed-apk-for-google-play-says-bad-p
The thing that fixed it was running the command-line keytool app like:
$ keytool -list -keystore 'fakeNmae.jks' -storepass fake-password-same-one-i-used-in-android-studio
except, of course, using the real password & keystore file name.
After that AndroidStudio built the signed APK & I couldn't believe it.
raddevus
3-Feb-22 11:53am
View
This may help -- It mentions the command you're wanting to run: https://stackoverflow.com/questions/62034545/dockerfile-how-to-set-apt-mirror-based-on-the-ubuntu-release
It looks like maybe you need to first run:
$ apt-get update && apt-get install -y lsb-release
raddevus
27-Jan-22 11:33am
View
Additional details....
If you just want to try my template out. then...
1) clone it
2) $ npm install
3) $ npm start
You will see the proper icon -- the temporary one that the template uses.
If you do a $ npm run dist it will generate the target exe for your current platform. If you go down into that /dist directory and run the target it will probably not show the icon.
It wants the ICON in the same directory where the EXE starts from.
So if you take the EXE and the app.png and put them in the same directory and then run the app you will see the icon.
raddevus
27-Jan-22 11:26am
View
I noticed a couple of things about the icon. 1) If I run two copies of my app the first one will display the icon and the other one will display the generic electronjs icon. 2) Your real icon may only display when you run the _real_ copy (not the dev version). Do a build and then try running the deployed version you may see the proper icon.
Also, I struggled with this and with building for all platforms (win,linux, mac) so much I finally found a really nice electron builder and I created a complete project template that even sets up the icon properly.
I created a public github for it at: https://github.com/raddevus/electron-template
Please take a look at that. Clone it, build and see if you see that icon.
There are complete set of instructions there with the project.
let me know if it helps.
raddevus
25-Jan-22 9:55am
View
Actually, I can't remember why. I just remember working through this and it was the only way I could get it to finally work. My solution may be related to deploying my app on https://snapcraft.io/ also. I can't remember now.
Good luck.
raddevus
7-Dec-21 17:21pm
View
Have you tried it without the code that is in the catch{}?
Remove the async call from the catch and try it again.
I believe the error is occurring because it's attempting to add the same module more than once. and that is possibly happening because it throws an exception and calls the async call.
Also, try debugging / stepping over each line and see what happens.
raddevus
27-Nov-21 13:31pm
View
I'm wondering if Python has updated on your computer recently and now VS Code doesn't know how to get to the proper EXE?
Were you by chance, using Python 2.x before?
has Python 3.x been recently installed?
or has Python just been updated and now VS Code can't find it?
raddevus
15-Sep-21 20:58pm
View
Iโm saying it is a concept, an idea, a classification, a model or way of thinking about functionality that is grouped together. Thatโs it. You can say , โI downloaded a libraryโ but you really downloaded DLLs that contain functionality that has been grouped together. A library is really only conceptual not physical.
raddevus
15-Sep-21 17:05pm
View
Library is probably more conceptual. You may have something like the .NET library which is made up of one or more packages (physical downloadable DLLs).
So a library is a broad term that envelops the conceptual idea of one or more packages that solve a specific problem.
A Graphics Library provides functionality that helps you do drawing in your app (lines, rectangles, etc). And to use that library you download the physical DLLs (aka Assemblies in .NET) which are generally known as packages.
and they are known as packages more now because of NPM (node package manager) and nuget (.NET package manager).
raddevus
25-Aug-21 11:40am
View
Here's a very short snippet of code at codepen that uses some of your concepts:
https://codepen.io/raddevus/pen/KKqwRPa
raddevus
25-Aug-21 11:34am
View
Add your html & code to something like codepen.io (click the Start Coding button on the left side & add your code). Save the code and link then let us know so we can see the entire code sample. Then we may be able to help you.
raddevus
23-Jun-21 10:47am
View
๐๐ฝ๐
raddevus
23-Jun-21 8:41am
View
You better hope The Delphi people don't read this. They'll hound you to the ends of the earth. ๐ค๐ (Psst...Delphi is Pascal)
raddevus
12-Apr-21 16:27pm
View
Time-complexity would be O(n^2) because you iterate through n items once in the foreach loop and then once in the while loop.
The print part isn't really a part of the algorithm and should actually be removed into a separate function and shouldn't really be counted as an iteration through the items, since it is just for output.
raddevus
13-Feb-21 10:29am
View
I've added new info to my original answer. Hope it helps. :)
raddevus
29-Jan-21 8:45am
View
Try...
return null;
instead of the...
return View()
I think you may be pleasantly surprised. If this works, you can determine some way to return null when you want.
raddevus
23-Jan-21 15:12pm
View
Did you set up the SMTP options (outgoing server) for the outgoing email?
--smtp-server=<host>
--smtp-server-port=<port>
see more at: https://git-scm.com/docs/git-send-email
raddevus
1-Jan-21 16:34pm
View
I tried your code. It failed upon attempting to enter the two player names. I wanted to see it run so I altered the case 1 statement to include newGame() and the game started without a player 2 name anyways.
I played an entire game and I'm impressed with this example program in C. It's quite nice and amazing that it actually determines a winner.
Also... to save your data you should just save each value the user enters into a CSV (comma separated values) file.
raddevus
6-Nov-20 13:47pm
View
Also, the value is an _attribute_ of the XML tag. I'm assuming you're attempting to get the value of the attribute which is named value.
The value of a tag would be something like <title>The Bering Sea: A Book About Sea Life </title> It's what is between the tags. An attribute value is different.
raddevus
26-Oct-20 10:06am
View
Really great and interesting answer. Thanks
raddevus
26-Oct-20 10:05am
View
I've often wondered about this also and this is a great question. Thanks for asking it here where there are people who can offer some answers. Really great. Thanks
raddevus
5-Oct-20 17:13pm
View
Great points and resources. thanks
raddevus
31-Aug-20 15:12pm
View
check out part 2 (added to my answer above) - what you're wanting to know how to do is set up the XMLHTTPRequest XHR so you can post to the controller, it was in part 2 of my articles: https://www.codeproject.com/Articles/5268710/NET-Core-Web-API-The-Least-You-Need-To-Know-Part-2
raddevus
8-Jul-20 14:32pm
View
Post a snippet of your code that you have tried. You marked this as Java but I'm guessing (from the names of the controls) that it is actually Java on the Android application dev platform, right? Explaining how to pass values like this takes a longer explanation.
Mention all important details like that so the person with the correct expertise can help you. Here's a book, only $2.99 that will help you understand how to pass values in Android: https://amzn.to/3fd2TsC
raddevus
30-Apr-20 13:33pm
View
create a specific span or div element with an id="yourId", then use query selector to select the item and add the style to the specific item.
Also, modern element selector is document.querySelector("#yourId") for single and document.querySelectorAll(".classItem") -- returns collection of elements (id selector can be used with querySelectorAll() also.
raddevus
27-Apr-20 16:40pm
View
I understood that, but I've seen this occur when the control isn't properly "registered" to Visual Studio. I have had the problem in the past and adding it into the Toolbox has resolved it for me in the designer.
The process of doing that somehow "registers" the control and Visual Studio can render the control. Did you try it? Did you restart VSTudio? Did it not work?
raddevus
21-Feb-20 9:33am
View
Yes, looks good. Now the month1 variable has scope that is larger than just the try block.
raddevus
20-Feb-20 17:36pm
View
I think you are saying that you have a 1 to Many relationship from User to Quest.
1 user can have 1 to many quests.
In this case you can create a simple table that contains only two columns:
User_id, Quest_id
Then you simply put your data in there and use it for the join later.
User_id, Quest_id
1 , 1
1 , 3
1 , 4
1 , 5
2, 3
3, 1
3, 2
You see, some users have many quests(userid 1) and others (userid 2) only have 1.
raddevus
9-Dec-19 14:20pm
View
This is interesting, because I tried it with a local extra spreadsheet file and it failed too. It is a security thing. You need to add a Module and then add your code to that module and you'll be able to run it.
Here's how you add a new module ---> https://i.stack.imgur.com/OTELN.png
I've actually solved this another time and you can see my answer (which displays that image) at StackOverflow: https://stackoverflow.com/questions/33741488/cannot-run-the-macro/42773999#42773999
My answer is NOT the official answer but has been upvoted more than the official. :)
This will get you to the solution. In the end, the problem is really because of newer security features of Excel -- it doesn't want other files to be opened unless the code is in the protected module area. Please let me know if that works.
raddevus
16-Aug-19 9:42am
View
Very good points. Was attempting to provide basic "test" solution with string concatenation.
raddevus
7-Aug-19 15:44pm
View
Oh, also, I see that it looks as if WPF doesn't implement NotifyIcon according to this: https://stackoverflow.com/questions/17674761/can-i-use-notifyicon-in-wpf
But there is a project here on CP that may work you thru it: https://www.codeproject.com/Articles/36468/WPF-NotifyIcon
raddevus
7-Aug-19 15:42pm
View
I know that there is no requirement under WinForms and using NotifyIcon so it is probably the same under WPF. Here's an example I just fired up and got running in LINQPad (Linqpad.net) and it displayed the notifyicon in the tray even though I'm not an admin on my machine : https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.notifyicon.-ctor?view=netframework-4.8#System_Windows_Forms_NotifyIcon__ctor
raddevus
23-Jul-19 8:25am
View
I have waited so long to be a hero, but I knew I'd make it one day. :D Glad it helped.
raddevus
21-Jul-19 18:26pm
View
What is on line 138 of Cusinfo.aspx.cs?
C:\Users\Zeeyana\source\repos\Money Changer\Money Changer\Cusinfo.aspx.cs:138
That is the thing that the runtime thinks is null.
raddevus
1-Jul-19 13:13pm
View
Check out the selected answer on this SO: https://stackoverflow.com/questions/6328713/urls-with-slash-in-parameter
raddevus
1-Jul-19 11:14am
View
I don't believe UrlEncode will work here, since it won't encode the slash (/). if you open your browser tools F12 and type the following in the console you'll see you get the same string (non-encoded): encodeURI("B0015/A") // javascript's version of url encode.
I tried the other one also and it does the same -- does not encode the slash:
Console.WriteLine(Uri.EscapeUriString("B0015/A"));
If you want to try base64 encoding as javascript you can try:
btoa("B0015/A") // in console
raddevus
20-Jun-19 15:42pm
View
Send it in as a querystring variable, then extract it.
build your URL that you will submit:
www.yourthing.com/thing/?divCount=195
<?php
echo $_GET['divCount']; //Output: 195
?>
Your next question will be: HOw do I post the URL?
Check out this --> https://stackoverflow.com/questions/5647461/how-do-i-send-a-post-request-with-php
raddevus
22-Apr-19 15:37pm
View
Yeah, since it's a winform app try using just the DataSource, DisplayMember and ValueMember properties on that clientDropDown and then it may work -- depending upon a number of other things. it can be a bit tricky getting it just right.
raddevus
22-Apr-19 14:22pm
View
Yes, I think that is the cause. I don't have a lot of info to help you fix that though.
Is this a WPF app? I thought it was WinForms.
If it is WPF there is a very good explanation here at CP about this databinding like you are attempting: https://www.codeproject.com/Articles/671544/Understanding-SelectedValue-SelectedValuePath-Sele
it's short and may help.
raddevus
22-Apr-19 13:24pm
View
Since it works with the hard-coded ID value (a known integer) then the problem is probably with how the value is being retrieved from the droplist. Have you set DisplayMember and ValueMember of the droplist (combobox, or whatever that is) properly?
For example of what I mean see:
https://stackoverflow.com/questions/9521980/combobox-valuemember-and-displaymember
raddevus
22-Apr-19 11:42am
View
It's difficult to determine what is going on. But I do have two suggestions (maybe you've already tried them?).
1) replace the SelectedValue with a hard-coded value (possibly one you know is valid) and try running.
change => { "@ClientId", ClientDropDown.SelectedValue }
to => { "@ClientId", 5 }
2) Run in debug mode step into LoadDateDropDown and press F11 on each line (step into) to determine exactly where the code is failing.
raddevus
8-Apr-19 13:59pm
View
Fantastic! I was just reading this and I googled for a solution and the answer at https://stackoverflow.com/questions/3159213/how-do-i-create-a-simple-web-server-using-wcf-without-the-servicehost-class is really great. You can run that example in LINQPad.net (https://www.linqpad.net) with the following using statements:
System.Runtime.Serialization, System.ServiceModel.Channels, System.ServiceModel, System.ServiceModel.Web
raddevus
31-Jan-19 14:56pm
View
If you successfully create a separate thread it will not be allowed to write to the UI since the UI-thread (main thread) is managing that work too. In most instances if you get it to do so your app will crash. However, I believe you are saying you are attempting to do a delegate for that exact reason.
Unfortunately, you're probably not going to find a lot about it in VB.NET resources, but here is a fantastic write-up that should help you understand these concepts better: http://www.albahari.com/threading/ -- This is the original author of C# In A Nutshell O'Reilly book. It'll help you get through the challenges if you ignore that it is C# centric.
raddevus
25-Jan-19 13:25pm
View
You get a full column of blue because it iterates through every row in the datagridview and sets it blue : dgvSODetail.Rows[i].Cells[3].Style.BackColor = Color.Blue
Rows[i].Cells[3] is every row since i changes.
raddevus
19-Nov-18 18:14pm
View
sizeof(List) returns the number of bytes the entire list takes in memory.
sizeof(List[0]) returns the number of bytes one element take in memory.
If Int is Int32 then each one takes 4 bytes.
So if you have 4 elements in your list then sizeof(List) returns 16 bytes.
And, of course, sizeof(List[0]) returns 4.
16 / 4 = 4
so while i < 4 (0 - 3) the for loop will execute.
raddevus
10-Oct-18 15:00pm
View
It's no problem. Thanks. :)
raddevus
10-Oct-18 13:45pm
View
Wait. Was I down-voted for answering an old question or because my answer was bad? Inquiring minds want to know. Actually, I don't really care, just hoping these comments are posting to your email. hahahhaaaaaa!!! Lighten up, Francis.
raddevus
10-Oct-18 13:30pm
View
Haha! "A good answer never grows old".* ~Confucious
Actually, right after I submitted the answer I was like, "wait, when was that question asked?" and I noticed how old it was.
The question bubbled up on the right side of the questions page and I answered it before I noticed that it was old.
I often do lame stuff so I figured leave this additional lame thing in the history record. :)
*Totally fabricated quote, but it sounds good here. :)
raddevus
9-Oct-18 14:23pm
View
Okay, easy enough, I updated the script -- updated my entry to show the code. You can go to the jsbin and see the final code. You'll need to make sure you close the tab you had it previously loaded on and then open the link in a new tab in your browser to insure a refresh.
raddevus
9-Oct-18 14:11pm
View
i updated it with the addt'l code. Tried to get it done before comment but was late. :)
raddevus
9-Oct-18 14:09pm
View
Deleted
i updated it with the addt'l code. Tried to get it done before comment but was late. :)
raddevus
12-Jul-18 8:24am
View
But the question was about PHP, so... :) Which from my understanding is a version of the Java ASCII Unicode standard library. xD
raddevus
1-Jun-18 14:59pm
View
You definitely got me. Haha :)
raddevus
1-Jun-18 14:58pm
View
Deleted
oh, no sorry, I meant the technology. I totally understand that others do not necessarily speak English as their first language. I wish I could read/write/understand another language well enough to ask tech questions in that language. THe original question just sounded interesting to me because of the encryption of an image. Nothing more. Thanks
raddevus
1-Jun-18 14:58pm
View
oh, no sorry, I meant the technology. I totally understand that others do not necessarily speak English as their first language. I wish I could read/write/understand another language well enough to ask tech questions in that language. THe original question just sounded interesting to me because of the encryption of an image. Nothing more. Thanks
raddevus
1-Jun-18 12:48pm
View
I was actually finding humor in the original question because it was basically a jumble of sentences. I'm still not sure what the original question was.
Zipping with a password sounds good.
raddevus
31-May-18 18:33pm
View
But if I get your password will it still be secure? Will image still be encrypted? Sounds like a single point of failure to me.
Please, please, please know that everything I've just said it meant as comic relief. Also, please note that if you cannot understand this humor, it is only because you haven't applied the proper decryption algorithm. Try ROT-13 first and other super-secure algos first. :D
raddevus
25-Feb-18 16:39pm
View
That is interesting and could be because mine is the same program running multiple times --- meaning the random value is seeded the same every time it is run. I will add the loop to mine just to see what it does.
Mine is also compiled with g++ under Debian but since this is all standard library stuff that shouldn't matter.
EDIT
Yep that's it. I added the for loop to call rand() ten times and I get pseudo-random list of values.
2 1 2 2 2 2 1 1 2 2
However, every time I run it I get that same list of 10 values, of course.
And, of course if I add the call to srand() then every time I run the program I get a more random list of 10 values.
Here's my final code:
#include <stdlib.h>
#include <iostream>
using namespace std;
int main(){
srand(time(NULL));
int random_number = (rand() % 2) + 1;
for (int i = 0; i< 10;i++){
cout << random_number << " " ;
random_number = (rand()%2)+1;
}
cout << endl;
}
raddevus
25-Feb-18 12:53pm
View
I just compiled that and ran it about 10 times and I got 2 every time.
I put the program in a shell script and called it a number of times and still got 2 every time.
Does the rand() call need to be seeded first or something?
Just curious
Here's my code
#include <stdlib.h>
#include <iostream>
using namespace std;
int main(){
int random_number = (rand() % 2) + 1;
cout << random_number <<endl;
}
EDIT
I added the following line of code before the call to rand() and it seems to generate 1 as the output now too.
srand(time(NULL));
raddevus
6-Dec-17 15:26pm
View
I know. I thought the same thing. Funny, right? :)
raddevus
19-Dec-16 16:22pm
View
I just tried that, but unfortunately, that doesn't quite get it. In this case you cannot break on JavaScript lines (no debug available). I do have a web.config that sets debug mode to be true and in the Studio editor I've set a breakpoint and Studio looks as if it will hit the breakpoint (it's red in the UI) but it never does. Also, obviously, in this case the web.config is basically ignored because the ASP.NET engine isn't really running since my app is just html, js, css.
Also, as an FYI I did add all files successfully to the empty project and Studio recognizes them all.
Also, I'm not sure how to get the JS minification to run outside of the call that an MVC project makes in the global.asax, so I don't get minification either.
Also, @RyanDev, did you down-vote the question? That doesn't seem very helpful of you, if you did.
Later after my last comment and attempting to discuss...Another down-vote without explanation. It's too bad you guys couldn't actually create a real community of discussion. It's too bad CP allows this behavior.
I am open to discussion and changing my question.
Good luck.
Edit 3
Yes, I'm going to keep editing this and responding to your down-votes, because it is fun. You trolls are so dim-witted. I think it is fantastically hilarious. Keep 'em coming bro.
When you down-vote a question on the community, you are actually down-voting yourself and the community.
And you live in that community. Hilarious.
raddevus
28-Apr-16 10:59am
View
Reason for my vote of 5 \n Interesting tip and interesting thinking to get to the result. Thanks for sharing.
Show More