Click here to Skip to main content
14,924,466 members

Comments by Maciej Los (Top 200 by date)

Maciej Los 4 days ago View
   
Great!
Maciej Los 5 days ago View
   
I have no idea. I haven't used NotifyIcon yet.
Maciej Los 5 days ago View
   
You're very welcome.
Maciej Los 5 days ago View
   
Logical operator is NOT causing slow execution of query.
Maciej Los 5 days ago View
   
Like this?
select * Table t where t.id = 1 and (@type <> 0 OR t.name = 'something')
Maciej Los 5 days ago View
   
:thumbsup:
Maciej Los 9-Jun-21 4:37am View
   
5ed!
Maciej Los 9-Jun-21 4:21am View
   
I'd suggest to add above content to your question. Use Improve Question widget.
Maciej Los 9-Jun-21 4:09am View
   
Deleted
-- removed --
Maciej Los 9-Jun-21 3:39am View
   
Why?
Maciej Los 9-Jun-21 3:23am View
   
We know what you want, but! we don't know what kind of issue do you have...
Can you be more specific and provide more details?
Maciej Los 8-Jun-21 9:13am View
   
5ed!
Maciej Los 8-Jun-21 9:13am View
   
The backslash is in this case an escape character.
Maciej Los 8-Jun-21 8:45am View
   
Good one!
Maciej Los 8-Jun-21 8:44am View
   
5ed!
Maciej Los 8-Jun-21 3:52am View
   
Maciej Los 8-Jun-21 3:28am View
   
Does "ARB_Library.dll" is registered on system?
I'd suggest to read this: ctypes — A foreign function library for Python — Python 3.9.5 documentation[^]
Maciej Los 25-May-21 7:16am View
   
You're very welcome.
Maciej Los 25-May-21 3:59am View
   
5ed!
Maciej Los 25-May-21 3:59am View
   
5ed!
Maciej Los 25-May-21 3:14am View
   
5ed!
Maciej Los 13-May-21 2:01am View
   
5ed!
Maciej Los 12-May-21 14:40pm View
   
5ed!
Maciej Los 12-May-21 14:40pm View
   
5ed!
Maciej Los 12-May-21 14:40pm View
   
5ed!
Maciej Los 12-May-21 12:22pm View
   
5ed!
Maciej Los 12-May-21 12:02pm View
   
5ed!
Maciej Los 12-May-21 8:42am View
   
5ed!
Maciej Los 7-May-21 8:14am View
   
5ed!
Maciej Los 7-May-21 5:20am View
   
5ed!
Maciej Los 7-May-21 5:01am View
   
5ed!
Maciej Los 7-May-21 5:01am View
   
Not a question at all! This is a code-request!
Maciej Los 5-May-21 15:37pm View
   
5ed!
Maciej Los 5-May-21 8:08am View
   
Thank you, Carlo.
Maciej Los 5-May-21 3:33am View
   
Are you working on dataframes in pandas?
Maciej Los 4-May-21 15:50pm View
   
5ed!
Maciej Los 4-May-21 9:21am View
   
Such of content should be posted as a comment...
Maciej Los 4-May-21 9:21am View
   
Good idea!
Maciej Los 23-Apr-21 8:42am View
   
Nope...
Maciej Los 23-Apr-21 7:39am View
   
Sorry, but your question is unclear...
Maciej Los 23-Apr-21 5:05am View
   
You're very welcome.
Maciej Los 23-Apr-21 3:40am View
   
5ed!
Maciej Los 22-Apr-21 2:22am View
   
5ed!
Maciej Los 21-Apr-21 5:28am View
   
Generous question - generous answer ;)
Maciej Los 21-Apr-21 3:58am View
   
5ed!
Maciej Los 21-Apr-21 3:23am View
   
:laugh:
Maciej Los 20-Apr-21 8:55am View
   
5ed!
Maciej Los 15-Apr-21 3:32am View
   
I have never used KQL. So, i can't help you. Please, take a look here: SQL to Kusto query translation - Azure Data Explorer | Microsoft Docs[^]
Maciej Los 14-Apr-21 15:13pm View
   
No. :D
Recursive queries are well known in postgres. You can use it ;)
Maciej Los 13-Apr-21 15:52pm View
   
5ed!
Maciej Los 13-Apr-21 15:03pm View
   
5ed!
Maciej Los 11-Apr-21 12:44pm View
   
"the code goes something like this"
Something - makes the difference!
Maciej Los 9-Apr-21 8:38am View
   
5ed!
Maciej Los 9-Apr-21 5:16am View
   
Please, do not repost!

Convert SQL query to KQL[^]
Maciej Los 9-Apr-21 5:13am View
   
Thank you :)
:thumbsup:
Best wishes to you!
Maciej Los 9-Apr-21 2:40am View
   
This is bad idea to use undefined variables due to tons of reason!

Another problem is here:
Dim strDDiff As String = ddiff.ToString
Dim intIdx As Int16
intIdx = strDDiff.IndexOf(".") '<= decimal separator depends on localization!!!
strDDiff = strDDiff.Substring(intIdx, strDDiff.Length - 1)
Y = ThisDate.Year.ToString & strDDiff

If your value is less than sepcific value, then you can multiply it by 10, 100, 1000, etc.
Finally, you should use ToString() function:
restultString = ThisDate.Year.ToString() &  ddiff.ToString("SpecificFormatHere")

See:
Localization | Microsoft Docs[^]
Standard numeric format strings | Microsoft Docs[^]
Custom numeric format strings | Microsoft Docs[^]
Maciej Los 9-Apr-21 0:16am View
   
Yes. Please, follow the instruction in solution #1.
[EDIT]
For example:
int inp = 4;
int term = 9;
int temp = term;
int total = term;
for(int i=0; i<inp; i++)
{
	temp *= 10;
	temp += term;
	Console.WriteLine($"current={total}; next={temp}");
	total += temp;
}
Maciej Los 8-Apr-21 15:03pm View
   
5ed!
Maciej Los 8-Apr-21 13:24pm View
   
Oh, yeah!
Please, see my answer ;)
Maciej Los 8-Apr-21 13:06pm View
   
7/8/2021 is not ISO date format! Does it mean: 7 August or 8 July?
Maciej Los 8-Apr-21 12:39pm View
   
5ed!
Maciej Los 8-Apr-21 2:27am View
   
Do you really want to work on chars?
Maciej Los 8-Apr-21 2:26am View
   
You're amazing, Master!
Maciej Los 7-Apr-21 3:33am View
   
5ed!
Maciej Los 7-Apr-21 3:11am View
   
I'd suggest to report "repost".
Maciej Los 7-Apr-21 3:10am View
   
5ed!
Maciej Los 6-Apr-21 7:32am View
   
5ed!
Maciej Los 2-Apr-21 9:07am View
   
Thank you, Richard.
Maciej Los 1-Apr-21 16:21pm View
   
5ed!
Maciej Los 1-Apr-21 16:16pm View
   
Asking the questions is a skill. Follow this steps: How to Ask Programming Questions — ProPublica[^]

When you'll be able to describe your issue, come back here and Improve question[^].
Maciej Los 1-Apr-21 8:59am View
   
5ed!
Maciej Los 1-Apr-21 8:01am View
   
Do you want to:
- get data from 'earth' table
or
- get data from a table - 'earth' column?
Maciej Los 1-Apr-21 6:47am View
   
5ed!
Maciej Los 1-Apr-21 5:58am View
   
5ed!
Maciej Los 1-Apr-21 5:58am View
   
5ed!
Maciej Los 1-Apr-21 5:08am View
   
Sorry, but your question is unclear...
Maciej Los 1-Apr-21 3:53am View
   
5ed!
Maciej Los 1-Apr-21 3:48am View
   
What's the question?
Maciej Los 1-Apr-21 2:47am View
   
5ed!
Maciej Los 1-Apr-21 2:41am View
   
Thank you. I was bit busy yesterday.
Maciej Los 31-Mar-21 6:14am View
   
:thumbsup:
Maciej Los 31-Mar-21 5:44am View
   
VB3? You mean 2.0 (~1992). There was a big jump from 2.0 to 4.0 (~1995).
That was the times...
Maciej Los 31-Mar-21 5:38am View
   
Reason of what?
Maciej Los 31-Mar-21 5:31am View
   
Caroline, i've got new nickname for you: VB6 Guru! ;)
5ed!
Maciej Los 31-Mar-21 5:08am View
   
So, replace it with custom text.
Maciej Los 31-Mar-21 2:36am View
   
Seems you're working on strings instead of dates...
Maciej Los 31-Mar-21 2:34am View
   
Also 5!
Maciej Los 31-Mar-21 2:14am View
   
We know now what you want... But what you have tried till now?
Maciej Los 31-Mar-21 2:08am View
   
Now, you can easily convert sql query to kql query.
Maciej Los 30-Mar-21 7:01am View
   
5ed!
Maciej Los 30-Mar-21 7:01am View
   
5ed!
Maciej Los 30-Mar-21 6:57am View
   
I'd avoid of answering such of old questions! First of all - there are 2 accepted answers and second of all - your answer does not improve anything.
Maciej Los 30-Mar-21 6:48am View
   
Try this:
SELECT tt.Evnt_GUID, tt.Transactiontimestamp, je.*
FROM TestTrasncstion tt(NOLOCK)
	LEFT JOIN 
	(
		SELECT  Evnt_GUID
		, StartTime = MIN(CASE WHEN SpecialEventName_s='Job Started' THEN TimeGenerated ELSE NULL END)
		, StopTime = MAX(CASE WHEN SpecialEventName_s='Job Stopped' THEN TimeGenerated ELSE NULL END)
		FROM JobsEvents
		GROUP BY Evnt_GUID
		WHERE SpecialEventDescription_s like '%GUID%' 
	) je (NOLOCK) ON tt.Evnt_GUID = je.Evnt_GUID AND tt.Transactiontimestamp BETWEEN je.StartTime and je.StopTime
ORDER BY 2
Maciej Los 30-Mar-21 5:47am View
   
No! Your first issue is to create proper sql query, then - the second - to write corresponding kql query.
Maciej Los 30-Mar-21 5:45am View
   
You're very welcome.
Maciej Los 30-Mar-21 5:00am View
   
Your sql query is very poor! Do you know what a join statement is for?
Maciej Los 29-Mar-21 15:25pm View
   
Do not use custom class. Use list of integers instead. For eaxmple:
Dim clipNumbers = clipboarddata.Split(New String(){Microsoft.VisualBasic.vbNewLine}, StringSplitOptions.RemoveEmptyEntries) _
    .Select(Function(x) Convert.ToInt32(x)) _
    .OrderByDescending(Function(x) x) _
    .ToList()
Maciej Los 29-Mar-21 15:23pm View
   
Why multiple textboxes?
Html tags has been added via service. Originall text did NOT contain them.
Maciej Los 29-Mar-21 6:50am View
   
:D I do and i'll do it again and again...
:D
Maciej Los 29-Mar-21 5:39am View
   
5ed!
Maciej Los 29-Mar-21 5:39am View
   
5ed!
Maciej Los 29-Mar-21 5:25am View
   
5ed!
Maciej Los 29-Mar-21 5:20am View
   
Maciej Los 29-Mar-21 5:15am View
   
Does it ever end?
One more time the thesis is proved: asking is a skill!
Maciej Los 29-Mar-21 5:11am View
   
5ed!
Maciej Los 25-Mar-21 17:29pm View
   
Are you sure that 120 is not already in a dictionary?
Maciej Los 25-Mar-21 9:12am View
   
5ed!
Maciej Los 25-Mar-21 3:12am View
   
You're very welcome.
Maciej Los 24-Mar-21 16:20pm View
   
:)
Maciej Los 24-Mar-21 11:21am View
   
Short And To The Point!
Maciej Los 24-Mar-21 11:19am View
   
"Merge into"?
Maciej Los 24-Mar-21 3:53am View
   
I did understand it earlier. The code provided by my is doing exactly what you said.
Maciej Los 24-Mar-21 3:50am View
   
AFAIK, it's impossible. Strongly recommend to read answer provided by Peter Morris.
Maciej Los 24-Mar-21 3:20am View
   
So, what stops you to use "disabled" attribute?
Also, see solution provided by Peter Morris.
Maciej Los 23-Mar-21 15:48pm View
   
And...
Maciej Los 23-Mar-21 4:08am View
   
Slipt or split?
Maciej Los 23-Mar-21 3:02am View
   
You're welcome.
Can you accept my answer as a solution (use green button)?
Maciej Los 22-Mar-21 10:01am View
   
If you want to compare to integer, why are you trying to parse it into double?
Maciej Los 22-Mar-21 9:23am View
   
Then use CONCAT
Maciej Los 22-Mar-21 9:16am View
   
What's database?
Maciej Los 22-Mar-21 7:34am View
   
5ed!
Maciej Los 22-Mar-21 7:03am View
   
5ed!
Maciej Los 22-Mar-21 6:49am View
   
You've got you wrote: update d set d.[validation]=case when d3.Output >0 then 'Yes' else 'No' end
Maciej Los 22-Mar-21 6:13am View
   
What???
Maciej Los 22-Mar-21 6:11am View
   
Not a column! Entire database!
Maciej Los 22-Mar-21 5:57am View
   
You're very welcome.
Maciej Los 22-Mar-21 5:53am View
   
Maciej Los 22-Mar-21 5:51am View
   
Do you think that OP is interested in another answer after 7 years?
Maciej Los 22-Mar-21 4:18am View
   
We know what you want, but we DON'T know what you have tried till now...
Maciej Los 22-Mar-21 4:16am View
   
5ed!
Maciej Los 22-Mar-21 4:16am View
   
5ed!
Maciej Los 22-Mar-21 4:09am View
   
5ed!
Maciej Los 22-Mar-21 3:27am View
   
Thank you, Carlo.
Maciej Los 22-Mar-21 2:59am View
   
5ed!
Maciej Los 22-Mar-21 2:41am View
   
Maciej Los 21-Mar-21 16:14pm View
   
Thank you, Richard!

:D
Maciej Los 21-Mar-21 16:13pm View
   
You're very welcome.
Maciej Los 21-Mar-21 11:34am View
   
This is not an answer. Please, delete it to avoid down-voting. To post coment, use "Have a question or comment" under the solution #2.
Maciej Los 21-Mar-21 6:21am View
   
5ed!
Maciej Los 21-Mar-21 6:17am View
   
5ed!
Maciej Los 21-Mar-21 6:17am View
   
No, you don't!
Richard MacCutchan showed you a proper way to achieve that!
Maciej Los 21-Mar-21 6:04am View
   
5ed!
Short And To The Point!
Maciej Los 21-Mar-21 6:04am View
   
You've made me sad ;(
The answer is correct even if the copy of code was made "without thinking".
5ed!
Maciej Los 21-Mar-21 5:56am View
   
5ed!
Maciej Los 21-Mar-21 5:52am View
   
5ed!
Maciej Los 21-Mar-21 5:41am View
   
What's your question?
What's the problem?
Maciej Los 21-Mar-21 5:33am View
   
You're very welcome.
Maciej Los 19-Mar-21 16:55pm View
   
Can't you just stop timer to prevent updates?
Maciej Los 19-Mar-21 16:46pm View
   
It may be much more...
Datagridview can be bound with datasource, which is read only..., etc.
Maciej Los 19-Mar-21 16:25pm View
   
Thank you very much, Bill.
Maciej Los 19-Mar-21 8:51am View
   
I'd suggest to:
1) create *.xslx file based on template
2) pass full path to that file as a parameter to the 'ExportToExcel' method.
Maciej Los 19-Mar-21 8:40am View
   
You're very welcome ;)
Maciej Los 19-Mar-21 7:22am View
   
Not like this. Use Dictionary object (solution #2) under the link.
Maciej Los 19-Mar-21 6:33am View
   
5ed!
Even if OP is struggling with body of function (logic), it's always good to refer to the documentation...
Maciej Los 19-Mar-21 4:31am View
   
Your question is not clear! Please, be more specific and provide more details about your database structure and relationships between tables.
Maciej Los 19-Mar-21 4:15am View
   
5ed!
I'd avoid of using old vb functions, such as Left. As Gerry Schmitz suggested, it should be Substring.
Dim mystring As String = Me.TextBox1.Text.Substring(0, 3)
Maciej Los 19-Mar-21 3:31am View
   
MS Access database does not store information about user(s). You need to get that value from Environment.
Maciej Los 19-Mar-21 3:30am View
   
Isn't that stated in MSDN documentation?
Maciej Los 19-Mar-21 3:26am View
   
Sorry, i was bit busy yesterday...
I'm not sure how it works in C#, because i've never used pointers in C#, as same as OriginalGriff. As to me, it should work the same way as in C.

The simplest way to find out is to write simple program. :)
Maciej Los 19-Mar-21 3:09am View
   
5ed!
Maciej Los 19-Mar-21 3:09am View
   
5ed!
Maciej Los 19-Mar-21 3:07am View
   
MS Access file... Am i right?
Maciej Los 18-Mar-21 10:52am View
   
As i said, it's quite similar. The difference is in a subquery. That's all.
Maciej Los 18-Mar-21 10:51am View
   
Of course, he do care to post spam everywhere :D
Maciej Los 18-Mar-21 10:29am View
   
You're very welcome.
Maciej Los 18-Mar-21 10:28am View
   
You're right, Richard. This sounds similar to: "you are good programmer, but..." The problem is in that "but". Thank for pointing me that out.
Maciej Los 18-Mar-21 9:47am View
   
Thank you for clarification, I'm sorry, i didn't mean to offend you. :)
Oh, yeah! Polish language offers several futures, including regional dialects.

Disclaimer: below content is not intended to people without sense of humor :)

The most interesting word in Poland is "kurwa" (pronunciation - similar to curve). As you suspect, this word is used when we want to say about some person in very insulting way. But this word can be used with adjective to "colorize" emotions. For eaxmple: "What a wanderful world!" -> "Kurwa, ale piękny świat"!

:D
Maciej Los 18-Mar-21 9:14am View
   
return listModel.Distinct().Take(3);?
Maciej Los 18-Mar-21 8:56am View
   
Do you think that a questioner is still interested in answer (after 8 years)?
I doubt...
Maciej Los 18-Mar-21 8:53am View
   
What's wrong with your Linq query?
Please, be more specific and provide more details about your issue. At this moment we know what SQL query returns, but we have no idea what your Linq query does... or what should do.
Maciej Los 18-Mar-21 8:46am View
   
Oooopss...
What statement should i use to say that person's knowledge is "quite/almost perfect"?
Maciej Los 18-Mar-21 8:26am View
   
I have to gentle disagree. Your knowledge is fair enough. :)
Maciej Los 18-Mar-21 7:19am View
   
5ed!
Maciej Los 18-Mar-21 7:19am View
   
How do you bind data to that combobox?
Maciej Los 18-Mar-21 7:17am View
   
5ed!
Maciej Los 18-Mar-21 7:14am View
   
Show us what you have tried.
Maciej Los 18-Mar-21 7:14am View
   
There's nothing like "end of level 1"!
Maciej Los 18-Mar-21 7:05am View
   
Thank you.
Maciej Los 18-Mar-21 5:14am View
   
Sorry, but your question is NOT clear. We can't read in your mind or direct from your screen, so please be more specific and exaplain in details what you want to achieve and where you did stuck.
Maciej Los 18-Mar-21 3:33am View
   
Does your Google is broken?
As to me - off-topic!
Maciej Los 18-Mar-21 3:18am View
   
5ed!
Maciej Los 18-Mar-21 3:17am View
   
5ed!
Maciej Los 18-Mar-21 3:16am View
   
5ed!
Maciej Los 18-Mar-21 3:16am View
   
return 666; i like it!
As to me, the name of method should be replaced with DevilNumber
:laugh:
Maciej Los 17-Mar-21 16:06pm View
   
You're very welcome.
Maciej Los 17-Mar-21 9:26am View
   
You wanted to know whether comp is available or not. Above query does it!
If you want to update existing field, you have to use UPDATE statement.
Maciej Los 17-Mar-21 9:23am View
   
Shouldn't be a 'SELECT'?
Maciej Los 17-Mar-21 8:17am View
   
What's wrong with above query? ROW_NUMBER is a part of SQLite database. UNION ALL too.
Maciej Los 17-Mar-21 5:26am View
   
What's database?
Maciej Los 17-Mar-21 4:57am View
   
The second statement of my answer is:
USER_NAME() and CURRENT_USER should return the same, the name of user, which currently executes the statement.
What's unclear here?
Maciej Los 17-Mar-21 4:53am View
   
Please, read my answer carefully...
Do NOT post the same content in comments. It's rude!
Maciej Los 17-Mar-21 4:51am View
   
Everything! Your code does NOT correspond to MVC...
Maciej Los 17-Mar-21 4:47am View
   
5ed!
Maciej Los 17-Mar-21 4:38am View
   
See updated answer.
Maciej Los 17-Mar-21 4:16am View
   
What system? Database (server) system or loacal computer system?
Maciej Los 17-Mar-21 4:05am View
   
Is there any primary key?
Maciej Los 17-Mar-21 3:56am View
   
What you mean by saying: "below row"?!?
Maciej Los 17-Mar-21 3:39am View
   
Why do you want to convert pdf to image? This makes no sense.
Maciej Los 17-Mar-21 3:12am View
   
What database?