15,949,686 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 Visual Basic questions
View .NET 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 Amr Mohammad Rashad (Top 49 by date)
Amr Mohammad Rashad
20-Mar-19 12:02pm
View
Thanks a lot for your consideration. I will read it and I hope I find an answers to my questions :)
Amr Mohammad Rashad
18-Mar-19 7:15am
View
I was thinking of creating the solution in that way I begin to find all the diseases that have the given symptoms then I begin to pick up only those diseases having the given symptoms in common then start to choose the closest disease based on the percentage of symptoms given to the percentage of symptoms in the disease, for example, given 3 symptoms that are common within 4 diseases if each of the diseases having only those 3 then it has 100% match etc. Otherwise, I begin to choose the diseases with the highest percentage, on the other hand, if either all the percentage results <= 50% or one of the symptoms have no disease matched I will return a negative response.
It that considered a sort of expert system or that considered an illusion :)?!
Amr Mohammad Rashad
14-Mar-19 10:43am
View
I used to use Prolog few years ago, almost 2011, was my last time I used to Prolog. The problem is that I had to create the system using PHP because we are using PHP Laravel and I do not know if there is any mean to connect Prolog to PHP Laravel, in such case, I may program against Prolog and pass the results to the Laravel...
Amr Mohammad Rashad
14-Mar-19 8:10am
View
Swear a God, I am trying, however, I need some help because it is a completely new topic for me and I am very confused... I am seeking for thing such as a specific type of tree data structure to study, how such system is working, for sure it is not a lengthy if... else... chains. Even if it like that how rules are being represented?! etc. And after all, I am very grateful for any sort of help...
Amr Mohammad Rashad
14-Mar-19 7:43am
View
I got the reason why it was not working properly. However, I need to ask you a question why almost of time when I ask a question I got answers like the one you gave to me! if we did not paste the code we got blamed/asked as askers! if we did not paste the code we got blamed/asked for not pasting the code.
I hope you know that if I know the answer I won't ask and when pasting my code I did it so if someone sees a defect in it or he may tell me to check something as the pasted code has not defects. In addition, when I figured out the answer I will put it so those who have similar issue may got benefit from my solution.
Amr Mohammad Rashad
6-Jan-19 19:57pm
View
I just wanted to say I cannot deal with it through PHP
Amr Mohammad Rashad
1-Jan-19 12:28pm
View
Anyway, thanks for you time and consideration!
Amr Mohammad Rashad
31-Dec-18 18:23pm
View
The case not a simple master\detail because eloquent definitely handle this but what I am talking about many tables\models one for each type (i.e., coordinator, hospital, shipper etc.) each has its own id column and a user table\model has columns stores id value and a type value according to the type that user entity relates to. For example, I stored a coordinator within a coordinator table with an id value of 10 then within the user table a column called userable_id will have the value 10 and a column called userable_type will have the value 'coordinator' if I stored a hospital within the hospital table with an id value of 5 then within the user table a column called userable_id will have the value 5 and a column called userable_type will have the value 'hospital'...
Amr Mohammad Rashad
31-Dec-18 14:25pm
View
I am using PHP specifically its MVC framework i.e., laravel and its ORM framework eloquent and I am using the ORM to store/fetch and according to my knowledge it does not work that way
Amr Mohammad Rashad
31-Dec-18 14:16pm
View
Deleted
I have different info for each model i.e., coordinator, carrier, dietitian all have first/last name and other data on the other hand shipper and hospital one has company name and the other has hospital name. As you can see I need to multiple models each has its own data and the idea of generalization/specialization will make the system far complex for storing/retrieving data. In addition, we plugged laravel with wordpress as we need wordpress so my intention is to use wordpress's users table, wp_users, instead of re-creating a new one. I hope you got my point of view
Amr Mohammad Rashad
7-Apr-18 0:26am
View
Deleted
Again I appreciate your consideration and your time for taking a look at my lengthy question and trying to help me :)!. I deployed the application on the server before and it was creating a new excel file with the data but as I said I was unable to get the file back from the client side because, at first, I was returning the newly created file as a stream (i.e., array of bytes) and I do not know how to create a blob/file using Javascript using the returned stream, I am a newbie to web development specifically client side scripting languages.
Amr Mohammad Rashad
7-Apr-18 0:21am
View
Again I appreciate your consideration and your time for taking a look at my lengthy question and trying to help me!. At first, as I mentioned, the application was working but I was returning the file as array of bytes, however, I am a newbie to web development and I do not know much about it, I was unable to create a blob from the returning array of bytes using Javascript. So I figured out that if I can direct the browser using "ip/folder/file" that the browser download the created file from the server. Now each time the execution enters the finally block, specifically at the following line: workbook.SaveAs(Filename: AppConfiguration.SaveAsName, FileFormat: XlFileFormat.xlOpenXMLWorkbook); an exception being thrown: "ClassName": "System.NullReferenceException",
"Message": "Object reference not set to an instance of an object.",
"Data": null,
"InnerException": null,
"HelpURL": null,
"StackTraceString": " at WebDataExporter.WebCore.Core.ExcelExporter.ExportToExcel(IEnumerable`1 data) in E:\\Demo\\WebDataExporter\\WebDataExporter.WebCore\\Core\\Adaptee\\ExcelExporter.cs:line 48\r\n at WebDataExporter.WebCore.Core.ExcelDataExporter.Export() in E:\\Demo\\WebDataExporter\\WebDataExporter.WebCore\\Core\\Adapter\\ExcelDataExporter.cs:line 11\r\n at WebDataExporter.WebCore.Core.Invoker.Execute() in E:\\Demo\\WebDataExporter\\WebDataExporter.WebCore\\Core\\Invoker.cs:line 18\r\n at WebDataExporter.WebCore.Controllers.ExportController.Export(String countrycriteria, String productcriteria) in E:\\Demo\\WebDataExporter\\WebDataExporter.WebCore\\Controllers\\ExportController.cs:line 78",
"RemoteStackTraceString": null,
"RemoteStackIndex": 0,
"ExceptionMethod": "8\nExportToExcel\nWebDataExporter.WebCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\nWebDataExporter.WebCore.Core.ExcelExporter\nVoid ExportToExcel(System.Collections.Generic.IEnumerable`1[WebDataExporter.Model.Analytics])",
"HResult": -2147467261,
"Source": "WebDataExporter.WebCore",
"WatsonBuckets": null
Amr Mohammad Rashad
6-Apr-18 5:05am
View
Your solution seems illogical to me! why? because it was working once on my local machine and on the server, I was just facing a problem how I am going to direct the browser to the newly created Excel file to be downloaded. I just installed new copy of the operating system and I do not remember what I did before and what I may be missing!. Thanks a lot for your time and consideration!
Amr Mohammad Rashad
6-Apr-18 0:30am
View
I depend on another view in creating mine and those columns, together, form a unique identifier for each row within the row set!
Amr Mohammad Rashad
14-Mar-18 6:55am
View
What do you mean by handling the exception properly? I am debugging which mean when I enter the catch block I will be able to watch the exception variable "e" and know exactly the exception.
Amr Mohammad Rashad
12-Mar-18 17:54pm
View
I do not know if DISTINCT will fulfill my need or not. I changed the composite key to use unique list of element within each column (i.e., product id, doctor name, medical representative name, and doctor's specialization) and it worked fine for me.
Amr Mohammad Rashad
12-Mar-18 17:34pm
View
OK! I will in the next time sorry did not see it :). I know what causes the problem. The problem was in the model configuration. I configured the Analytics model with an composite key, countryid and productid, respectively, the problem is that productid and countryid are repeated, they are not uniquely identify each individual row in the database. As a result the returning result list in general takes the first occurrence that fulfill the condition and repeated it number of times for all other objects that fulfill the condition too within the returned list (i.e., after fulfilling the condition I should have 532 unique object within the list of Analytics, however, I got 532 object within the list but they are not unique it took the first occurrence that fulfill the condition and repeated it 532 times).
Amr Mohammad Rashad
12-Mar-18 17:20pm
View
Again Mr. Richard during debugging for sure exception information is useful but you do not want to show the end user an exception telling them, index was out of range, for example, because he will not understand what means index out of range, instead, I should showing him an error message he can understand like the one I wrote within my thrown Exception "Error while processing file" but as you can see I wrote the catch block with Exception e so that when I debug I can watch the e variable and know the details of the exception.
Amr Mohammad Rashad
9-Mar-18 15:25pm
View
I am giving just an example of what is going on. Indeed the SelectAll method in the code I posted returns List of Analytics. The problem is not what type is being returned the problem is that the result contains a repeated element. For example, if the filter condition should return Analytics1, Analytics2, Analytics3, and Analytics4. It returns Analytics1 repeated 4 times Analytics1, Analytics1, Analytics1, and Analytics1
Amr Mohammad Rashad
9-Mar-18 14:31pm
View
You are right I should paste what the original exception is. However, I wanted people to help me correcting the setting value statement which is an incorrect
Amr Mohammad Rashad
9-Mar-18 14:25pm
View
I tried cells[rowindex, columnindex] but did not work to! I find many solution having lots of methods on either workbook or worksheet objects which I do not find and also that involve the using of row/column index but it did not work too. "Maciej Los" solution above worked find for me!
Amr Mohammad Rashad
9-Mar-18 14:19pm
View
Thanks a lot your solution worked for me perfectly! :) Thank you for your time and consideration. Thanks for all people tried to help! giving me positive or negative help!
Amr Mohammad Rashad
9-Mar-18 14:18pm
View
Again real exception should not be thrown to user which is 100% bad user experience you should, instead, throw another message to the user which is acceptable to him and he can understand!
Am right or wrong?
Amr Mohammad Rashad
9-Mar-18 14:01pm
View
As you can see I can catch the original exception. However, you cannot throw the actual exception to the user. I hope you not throw your real exceptions to the user :). I can pass the arg (e) to the inner exception property of the new Exception I am throwing
Amr Mohammad Rashad
9-Mar-18 11:26am
View
Yes there is an error within the code and I need to know how to set the value to the cell that is all what I need
Amr Mohammad Rashad
23-Feb-18 16:25pm
View
I already encoded the data and I wrote them on the card using the reader API but I do not know how to read them back what approach to use! I can read all the data but the approach of processing these data, read to get certain part, the response start address and seeking to this location etc. is what I do not know how to do it!
Amr Mohammad Rashad
16-Jan-18 6:34am
View
I am using JWT (i.e., Json Web Token) as my authentication mechanism. I added my Jwt message handler and it just works fine for me. There is also the OWIN version of such authentication mechanism but I do not know about it. Now the cors works fine for me! using the first above mentioned approach by adding a new application setting within the web.config of the service and registers it using the config.EnableCors(enableCors) however I do not know exactly what the issue is why it was not working from previously? May be it is related to IIS or it was a Front-End incorrect urls?
Amr Mohammad Rashad
13-Jan-18 6:42am
View
Unfortunately I am not using Core framework :(. I saw a lot of solution and I have tried almost all of them but I got lots of wired working/not working situations. Also I've added my own json web token handler and I am not using OWIN type of token authentication as I do not know anything about OWIN and I do not have time to investigate as we should present some demo to the client or we are going to loss the tender :(.
Amr Mohammad Rashad
13-Jan-18 6:42am
View
Deleted
Unfortunately I am not using Core framework :(. I saw a lot of solution and I have tried almost all of them but I got lots of wired working/not working situations. Also I've added my own json web token handler and I am not using OWIN type of token authentication as I do not know anything about OWIN and I do not have time to investigate as we should present some demo to the client or we are going to loss the tender :(.
Amr Mohammad Rashad
13-Jan-18 6:40am
View
Is my question is a mystery or there can be a solution?
Amr Mohammad Rashad
12-Jan-18 18:56pm
View
Deleted
Unfortunately I am not using Core framework :(. I saw a lot of solution and I have tried almost all of them but I got lots of wired working/not working situations. Also I've added my own json web token handler and I am not using OWIN type of token authentication as I do not know anything about OWIN and I do not have time to investigate as we should present some demo to the client or we are going to loss the tender :(.
Amr Mohammad Rashad
12-Jan-18 17:15pm
View
Lazey loading? Based on my knowledge that when you write an expression like that one "List<employee> wList = BLL.GetEmployeeAlternatives(id);" the method "BLL.GetEmployeeAlternatives(id)" won't be called until I tried to access the variable wList and use it that's why I saying that short circuit evaluation did not work as I expected because in the WHERE method condition I first accessed "wList" then "oList" which means first method BLL.GetEmployeeAlternatives(id); so if the first two conditions where FALSE (i.e., Where(c => BLL.Misc.Instantiation.LoginUser.IsAdmin ||
(c.AccountManagerID == BLL.Misc.Instantiation.LoginUser.EmployeeID) then method "BLL.GetEmployeeAlternatives(id);" will be and returns data according to lazey loading concept and if the third condition evaluates to TRUE "wList.Any(r => r.AbsentID == c.AccountManagerID)" then method "BLL.GetEmployeesManagedById(id);" won't be called due to short circuit. I hope my point of view is clear
Amr Mohammad Rashad
10-Dec-17 15:27pm
View
Thanks in first place for you time and consideration. I found an easy solution as I can use either Postman or SoapUI to create a mocking service :). It is easy and it suits my needs for now :). Thanks again for your time and consideration.
Amr Mohammad Rashad
16-Sep-17 11:08am
View
Nobody faced the same issue before?!!!
Amr Mohammad Rashad
12-Sep-17 5:58am
View
I will check if that can be done in my case.
Amr Mohammad Rashad
21-Aug-17 16:12pm
View
Both APPLY operator or the JOIN operator can be used and will have the same result but I was asking from the performance point of view that is from one side. From another side I was asking if there is a way preventing the execution of the query within the function instead of using IF statements within the function body to do such prevention.
Amr Mohammad Rashad
21-Aug-17 14:28pm
View
I want to know what are the COM limitations that are eliminated by .NET. I do not know if getting knowledge about COM basics would be suffice for that or not. As I was reading through "O'Reilly .NET Framework Essentials, 2nd Edition" and almost the first two chapters exposure to the COM and DCOM subjects many times to tell one of the .NET invention motivations. That is why I need to know about COM to be able to continue read the book as I found it very useful from the first 3 chapters. Thank you for your time and consideration.
Amr Mohammad Rashad
21-Aug-17 14:28pm
View
Deleted
I want to know what are the COM limitations that are eliminated by .NET. I do not know if getting knowledge about COM basics would be suffice for that or not. As I was reading through "O'Reilly .NET Framework Essentials, 2nd Edition" and almost the first two chapters exposure to the COM and DCOM subjects many times to tell one of the .NET invention motivations. That is why I need to know about COM to be able to continue read the book as I found it very useful from the first 3 chapters. Thank you for your time and consideration
Amr Mohammad Rashad
8-Jul-17 9:05am
View
I used to program in C# for many years. I read about Java once long time ago but for sure I do not remember many of things :(. The problem is that we have a product written using Spring and the programmer who wrote it left the company and we are expecting to expand the product's functionality within the coming few days and I need to to establish myself to get ready. I am having a practice, which I do not know if it is bad of good?!, I do not like working with a tech. without reading about it and that makes me big fat problem and it makes me not eligible for some jobs. I believe that getting knowledge about what you are going to use makes you use it professionally as good as possible. Thank you for your time and consideration.
Amr Mohammad Rashad
8-Jul-17 8:57am
View
Not necessarily because when I saw, for example, a terminology as
bean
, that does not mean I knew where that terminology lies in the language and therefore I jump to know about it. Thanks for your time and consideration.
Amr Mohammad Rashad
20-Feb-17 6:16am
View
After searching for hours those are the best books I found. There is no book I found that can be compared to those ones in terms of covered topics and the explanations. I cannot read both because I am trying to enhance my skills in many areas
ASP.NET, ASP.NET MVC, HTML5, CSS3, JavaScript, Ajax, jQuery, ASP.NET Web API, WCF, Entity Framework, LINQ, and T-SQL
. It is a long list so I am trying to pick as much as I can the best resource to read from. I know about programming well, however, unfortunately I know that I have shortcomings and I am trying to overcome such shortcomings. After reading about T-SQL I realized that I was writing T-SQL relying on knowing how SQL statement looks like not on how it operates. I realized that programming based on knowledge is better 1000 times than programming based on experience only because in the former case you will write code you understand and will apply as much as you know the best practices while in the later case you are writing code based on how you did that before and depending on the internet to write even the simple code blocks. I've read about C# before using
Visual C# 2012 How to Program
and
Visual C# 2005 How to Program
. These 2 books are good to start with however they are not covering many topics and not in more detail.
Amr Mohammad Rashad
20-Feb-17 6:15am
View
Deleted
After searching for hours those are the best books I found. There is no book I found that can be compared to those ones in terms of covered topics and the explanations.
Amr Mohammad Rashad
20-Feb-17 3:31am
View
Thank you for your time and consideration. I will :)
Amr Mohammad Rashad
19-Feb-17 23:37pm
View
My confusion comes from that I've read a book on ASP.NET it was
Beginning ASP.NET 4.5.1 in C# and VB - Imar Spaanjaars
and while reading it every time the author telling the readers that if they want to know about an issue or topic in more detail they can pick up another reference
Professional ASP.NET 4.5 in C# and VB - Jason N. Gaylord, Christian Wenz, Pranav Rastogi, Todd Miranda, Scott Hanselman
. When I checked that referred book, I found it indeed better and more detailed than the one I was reading from and containing topics the book I am using did not mention anything about them. If we compare the number of pages/chapters the first one is about 754 pages and 19 chapters while the second is 1331 pages and 35 chapters, in addition to, its appendix sections talking about useful topics too. Since that I am confused picking up any resource to read from not just in LINQ but in other things HTML5, CSS3, JavaScript, jQuery, ASP.NET Web API, Ajax, and even C# for example which better to read from
C# 6.0 in a Nutshell
or
C# 6.0 and the .NET 5 Framework, 7th edition
?. So I am trying to ask hoping that someone can giving an advice/tell me about which reference is better to use because it is more detailed or having that section explained better than others etc.
Amr Mohammad Rashad
19-Feb-17 23:31pm
View
Thank you. The first link is great one, covering great range of LINQ functionality :). "LINQ Pocket Reference" I have that one but I am searching for a comprehensive reference to learn from what is that technology about, how to use, best practices etc. I have the above mentioned books and I am confused to pick one to start reading from. I think "Book-Name Pocket Reference" can be used a memory refresher using it just to remember about a specific topic or functionality etc.
Amr Mohammad Rashad
18-Feb-17 10:49am
View
Thank you for sharing that link.
Amr Mohammad Rashad
18-Feb-17 10:48am
View
Thank you for your time and consideration. It was a helpful link
Amr Mohammad Rashad
18-Feb-17 10:48am
View
Thank you for your time and consideration.
Amr Mohammad Rashad
2-Jan-17 11:10am
View
Fortunately I had a contact with the manufacturer before posting my question. Unfortunately they informed me that they cannot support such product as it is an old product version by now, a 2009 production year :(. That is why I am trying to find a solution through asking help from others who may have an idea.
Show More