Click here to Skip to main content
15,218,139 members

Comments by GuyThiebaut (Top 52 by date)

GuyThiebaut 21-Oct-18 8:57am View
One extra thing that can help is to run the following to get the resources available first if you need to figure out the path of the resource you are looking for:
var resources = assem.GetManifestResourceNames();
GuyThiebaut 24-Mar-18 13:29pm View
"Get the default value in datetimepicker if date value from sql is null...that I want..."

Still not enough information.
How are you getting the value from sql?
What is the "default value" you speak of?

You really need to learn how to ask questions because I cannot see what is on you screen nor can I read your mind.

In stead of asking for the problem to be solved, try to break the problem into smaller pieces and first google solutions to those smaller pieces then if you don't find answers on google come back to this form to ask specific questions, not general questions.
GuyThiebaut 24-Mar-18 13:20pm View
I don't understand what you mean.

Please provide a longer question with:
(1)What you tried.
(2)What you expected the result to be.
(3)What the actual result was.
(4)Why the actual result is incorrect.
GuyThiebaut 24-Mar-18 13:11pm View
I originally pasted a typo - try what is in the comment above, also try to understand what it is doing.
Have a read up on what a ternary is.
GuyThiebaut 24-Mar-18 13:05pm View
In which case you were incorrect when you stated in your question that the value could be null.

You might want to try this instead:

vrijemeodjaveDateTimePicker.Value = vrijemeodjaveDateTimePicker.Value == System.DateTime.MinValue ? DateTime.Parse("2018-01-01 00:00:00") : vrijemeodjaveDateTimePicker.Value;
GuyThiebaut 24-Mar-18 12:14pm View
The current thinking on sending credentials via a REST service is that you should be using SSL in which case it's not necessary to encrypt or hash the credentials.

If you are not sending the credentials via SSL it will make no difference whether you hash or encrypt the credentials as anyone who intercepts that request can now authenticate and spoof as the user in the request.

So basically don't encrypt or hash data at the client - it's pointless and you should really be thinking about using SSL in which case you can send plain text passwords and return a token or whatever you will be using to show authentication has taken place.
GuyThiebaut 2-Feb-18 2:56am View
I have just tested it an it worked as expected - please provide detail as to how it is 'bugged'.
GuyThiebaut 14-Dec-17 8:56am View
"Oracle or any other kind of database should be used to store data."
Why bother wasting a solution post with this completely unhelpful answer?

Anyone who has worked on legacy code/databases needs to work with what they find and I find myself in the situation where I need to parse a string saved in an Oracle database as a JSON string.
GuyThiebaut 17-Feb-16 8:23am View
GWAN-ARGBUE0282-2011715E001 2014-03-14 00:00:00.000 2014-04-08 00:00:00.000 16 247
GWAN-ARGBUE0282-2011715E001 2014-03-14 00:00:00.000 2014-04-17 00:00:00.000 16 454

The two values above are different - your query is behaving correctly.
GuyThiebaut 7-Sep-15 3:11am View
This will get you started:
GuyThiebaut 7-Sep-15 2:49am View
We all have to start somewhere :)
Like I mentioned look into delegates too - it's a bit of a leap but it will set you in the right direction as directly referencing a control on the form from the form thread will lock the form.
This is not noticeable when you just update something once, however if you were to create a loop where you update a text box you would find that the form remains unresponsive until the loop ends.
GuyThiebaut 27-Jul-14 8:44am View
Thanks buddy!
I have spent most of the weekend trying to get a webservice and calling script working - trawling hundreds of pages and your solution works.

If you're ever in Cambridge UK I will buy you a beer!
GuyThiebaut 23-Jun-14 5:46am View
This may hep you on the way.
This is how I extract text from a PDF, you may need a different ITextExtractionStrategy for your purpose.

PdfReader pdfReader = new PdfReader(fileName);

for (int page = 1; page <= pdfReader.NumberOfPages; page++)
ITextExtractionStrategy strategy = new SimpleTextExtractionStrategy();
string currentText = PdfTextExtractor.GetTextFromPage(pdfReader, page, strategy);

currentText = Encoding.UTF8.GetString(ASCIIEncoding.Convert(Encoding.Default,Encoding.UTF8, Encoding.Default.GetBytes(currentText)));
GuyThiebaut 11-Jun-14 10:34am View
Where is the close directive?
GuyThiebaut 15-Apr-14 10:33am View
Is there a clustered index on the table or is the table partitioned.?
If there is then an insert will potentially slow things down because of the way a clustered index and partition works.
GuyThiebaut 11-Feb-14 5:36am View
Please provide the an example(meaning actual code) of what you are trying to do, as "it's not working" does not tell me very much that then enables me to help you.
GuyThiebaut 29-Jan-14 8:02am View
Reason for my vote of 1 \n Can we have an article on how to close down a Windows machine too please, it's the one thing I haven't yet figured out...
GuyThiebaut 9-Jan-14 4:42am View
You will need to communicate with your isp and service provider to explain that you are not a spammer.
The alternative is to use another company that will do this email send for you who specialise in bulk emails.
It's a complex area and there is not not a simple answer - basically if the email looks like spam then it is spam and ISPs hate spam.
GuyThiebaut 9-Jan-14 4:14am View
Thanks for your answer.
5000 emails a day is definitely going to flag you as a spammer.
GuyThiebaut 9-Jan-14 3:56am View
"after sending to a specific number of emails the
server return an error" What is the error returned?
I am guessing that you may be marked as a spammer if you do this on a large and regular scale.
How many emails are you sending in one go and how frequently?
GuyThiebaut 4-Jan-14 14:12pm View
I had a look on google and this may help:
GuyThiebaut 29-Dec-13 14:01pm View
I don't understand what it is you are trying to achieve.

Could you post what the string reponse might contain and what you expect to be returned in your first and second println commands.
GuyThiebaut 29-Dec-13 5:30am View
What do you mean by 'value'?
GuyThiebaut 29-Dec-13 5:14am View
Google broken again?
GuyThiebaut 29-Dec-13 4:56am View
I have amended the original solution.
GuyThiebaut 29-Dec-13 3:50am View
c.amount - isnull(d.debit,o) balance
company,sum(amount) amount
from credit
group by company
left join
company, sum(deb_amt) debit
from debit
group by company
on =
GuyThiebaut 12-Dec-13 9:26am View
Erm... the file cannot be found...
GuyThiebaut 20-Nov-13 6:59am View
As far as I know this is not possible without parsing the stored procedure i.e. writing code to analyse each line of the stored procedure.

The only meta data relating to a stored procedure that is available are the parameters which can be accessed via reflection.
GuyThiebaut 15-Nov-13 9:57am View
A bit of advice from a seasoned developer - if you don't know where to start:

1 - break your problem down into manageable chunks.
2 - search on google for clues on how to implement these manageable chunks.
3 - start coding.

Even developers like me who have 20+ years of programming experience get stuck sometimes, don't let getting stuck be something that defines you as a programmer ;)
GuyThiebaut 15-Nov-13 5:05am View
I don't understand what you are trying to do.
Can you give an example using data to illustrate what your expected result is - the example you give above only shows some of the data, I need to see more data and the result you expect to understand what you are wanting to do.
GuyThiebaut 8-Nov-13 12:00pm View
Try something like:

select top 1 name
from diesal1
order by date desc
GuyThiebaut 28-Oct-13 10:34am View
When you get directory information you will also need to handle the access denied exception - this may well be what is happening in this case.
GuyThiebaut 16-Oct-13 16:38pm View
Thanks Matt,

That does work - my code above was testing code so hopefully I can use what you have shown in the changes I have made.
GuyThiebaut 3-Sep-13 9:33am View
You can want whatever you like however your lack of courtesy means that the above is the only answer you are getting from me.
GuyThiebaut 29-Aug-13 10:06am View
Try this:

if (dataGridView2.Rows[0].Cells[col]!=DBNull)
GuyThiebaut 19-Aug-13 9:59am View
One issue with functions is that you cannot use dynamic sql within them.
GuyThiebaut 5-Apr-13 10:13am View
I posted a solution but on reading your question again I realised that I did not understand what it is you are trying to do.

Could you post an example with example data from both tables and the result you expect(do not post a query), then it should be fairly straightforward to show you the query required.

GuyThiebaut 19-Mar-13 7:35am View
In answer to why the number of rows increases, you will need to add this before you populate your listview:

GuyThiebaut 18-Mar-13 12:27pm View
Reason for my vote of 5 \n Great, thanks.

This is a great introduction and exactly what I was looking for 5

String whatIWasLookingFor = article.where(n => n == perfectExample).toString();
GuyThiebaut 12-Mar-13 12:30pm View
I think you make a very good point and you should register me to be isolated from this forum.
GuyThiebaut 9-Mar-13 7:12am View
One thing I have just spotted is that you have one too many commas.
The comma before the where clause needs to be removed and changed to:

" WHERE ID=" & TextBox1.Tag() & ""
GuyThiebaut 2-Jan-12 7:48am View
I don't understand your question "what is interface, give an apropriate example of interface", could you rephrase it please.
GuyThiebaut 2-Jan-12 7:47am View
I don't understand your question "what is interface, give an apropriate example of interface", could you rephrase it please.
GuyThiebaut 1-Jan-12 12:19pm View
In which case use: Encoding.UTF8.GetBytes(input)
instead of: Encoding.ASCII.GetBytes(input)
in the solution I provided.
GuyThiebaut 1-Jan-12 11:23am View
GuyThiebaut 12-Dec-11 15:44pm View
Hang on a minute - you set the rules then break them - you very clearly said in your original question that the user did not have an internet connection.
We could have provided much better solutions from the outset if you had not made this stipulation!
GuyThiebaut 12-Dec-11 14:03pm View
The algorithm used to generate the key also exists on the software you supply to the user - obfuscate the variable names etc so that they cannot easily work out how the algorithm works...
If your answer to this is that you don't want the user to have access to the algorithm or be able to hack it - then...
GuyThiebaut 12-Dec-11 5:03am View
In which case other than using the computer date/time as a seed for the cd key generation there is nothing much you can do.
If he is dishonest he could reset the system clock - however what I would do is within the program ensure that the date/time is integral to it so that any jimmying of the system clock will show up on the reports etc...
GuyThiebaut 12-Dec-11 4:31am View
Is the issue that the user needs to type in a new cd key each month or is it that you want to prevent the user giving your software and key away to other people(hence the new key each month)?
GuyThiebaut 30-Oct-11 5:22am View
Thanks - I think I've been spending too much time on Oracle databases and lost touch with Microsoft's databases.
There is a notice at the top of the page saying Microsoft is going to remove the image datatype(not using this as an excuse for my ignorance) and appear to be going the way of Oracle...
GuyThiebaut 26-Oct-11 3:52am View
I don't understand your question.

Please give more of a context, some examples and preferably illustrated with code.
A data structure can encompass anything from an byte to a database and I don't understand what you mean by weak and strong in this context...

GuyThiebaut 13-Oct-11 4:58am View
If you google the question you will discover that this is a copy and paste from a wikianswers post:

So either the authors are the same or the author of this response is not quoting his source...