|
And how can that help me?
|
|
|
|
|
Because if you knew the basics, you would know what the error message meant, rather than have to have Pete explain it...
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I knew what It meant. Read my reply about the difficulties to pass an object that implements IAuthService.
|
|
|
|
|
It sounds like you're trying to use Dependency Injection with your provider instances. It's not simple, but there are a few suggestions in this StackOverflow thread[^].
For example:
public class Startup
{
public void Configuration(IAppBuilder app)
{
var container = SimpleInjectorConfig.Register();
GlobalConfiguration.Configure(WebApiConfig.Register);
Func<IAuthService> authServiceFactory = () => container.GetInstance<IAuthService>();
var OAuthServerOptions = new OAuthAuthorizationServerOptions
{
AllowInsecureHttp = true,
TokenEndpointPath = new PathString("/token"),
AccessTokenExpireTimeSpan = TimeSpan.FromDays(1),
Provider = new SimpleAuthorizationServerProvider(authServiceFactory),
RefreshTokenProvider = new SimpleRefreshTokenProvider(authServiceFactory),
};
app.UseOAuthAuthorizationServer(OAuthServerOptions);
app.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions());
}
}
Your provider classes will need to be changed to take a Func<IAuthService> delegate instead of an IAuthService instance. Whenever they need an IAuthService instance, they call the factory delegate.
public class SimpleAuthorizationServerProvider : OAuthAuthorizationServerProvider
{
private readonly Func<IAuthService> _authServiceFactory;
public SimpleAuthorizationServerProvider(Func<IAuthService> authServiceFactory)
{
_authServiceFactory = authServiceFactory;
}
...
public override Task GrantAuthorizationCode(OAuthGrantAuthorizationCodeContext context)
{
IAuthService authService = _authServiceFactory();
...
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi mates
i hope its been awesome
i got a question...?
i have to do some project in C#
who can help me?
that is ...
a management clinic which is include
1) adult or 2) child
and it has a person as a GP
if GP diagnosis Cold , then give a prescription with price
else referral to Specialist (with random function)
if specialist diagnosis the patient need to surgery , print coast
else print all prescription with price
I'll appreciate in advance to help me guys
|
|
|
|
|
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.
Try it yourself, you may find it is not as difficult as you think!
If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Questions like this depend entirely on your definition of "help".
If you're asking for a "partner" to write your code for you, you're not going to get that help.
If you've written a bunch of code and you're stuck with a particular problem, that we can help with, provided you ask a detailed question describing the problem.
|
|
|
|
|
|
What is your basis for merge? Also, how is the visual representation different from underlying data source?
The control does not directly give options to merge. You will need to override the Paint event for the control and then show/hide borders.
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]
|
|
|
|
|
I purchased a Bosch BNO055 multifunction sensor USB stick. I believe I need to add it to the appxmanifest file manually. I don't know where/how to find the correct DeviceID and Function Type values to enter into the xml elements. The driver that I downloaded does not seem to offer any hints and I am not fluent in C++.
If anyone has experience with this type of unit I would like to benefit from your experience.
|
|
|
|
|
1. plug the device into the PC.
2. Open Device Manager
3. Right-click the device and choose properties. I think you can find the Device ID there.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Yes, thank you for the help.
|
|
|
|
|
I'm currently using C++ Builder and I'm only doing console programming at the moment. But eventually I will move forward into making some Windows programs. One program I'd like to write is a test. I'd like to make a psychology test. This will have about 10 questions. Either just true or false or maybe I'll decide they will be multiple choice.
My question is which language and IDE do you think would be easier to get this done? Visual Studio using C# or Embarcadero C++ Builder?
I can't seem to come to a conclusion myself so here I ask.
|
|
|
|
|
That isn't up to us: only you can make that decision.
Why? Because we have no idea how competent you are in either of those languages. Me? I'd probably be faster in C# because I use it more these days. Some other members will reverse that, because they use C++ more often so are more comfortable using that.
Pick the language you know best, and you'll probably have made the right decision.
Sent from my Amstrad PC 1640
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
In addition to OriginalGriff's comments, Visual Studio 2017 Community Edition (which is free) is an ideal IDE. Furthermore is supports Windows application building in C, C++, C#, VB.NET etc., and Web development in ASP.NET. So choose the language that you are most experienced with and use Visual Studio as the IDE.
|
|
|
|
|
Member 12974235 wrote: This will have about 10 questions. Either just true or false or maybe I'll decide they will be multiple choice. Most languages know the concept of a "loop". So, the language to use is not determined by the amount of questions.
I'd say Visual Basic is the way to go. Lots of examples out there, including psychology tests.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: I'd say Visual Basic is the way to go With a C++ background!!! I would have thought c# would be the best platform to learn and there are many more examples on the interweb that VB.net (one of the reasons I moved from VB.Net).
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: With a C++ background!!! Then he'll be able to grasp VB quickly
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
|
Eddy Vluggen wrote: I'd say Visual Basic is the way to go.
You dislike him that much?
Sent from my Amstrad PC 1640
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Eddy Vluggen wrote: Visual Basic is the way to go. Lots of examples out there, including psychology tests. Question 1: What possessed you to choose Visual Basic?
|
|
|
|
|
Everone knows that C# is better for 11 questions or more. For 10 and lower, we use VB.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I'm not a beginner by any means. I done a lot of console programming. I will probably use a console program as a prototype for the Windows version.
But you're right. Either language will work just fine.
|
|
|
|
|
Don't use a console program as a prototype: the two operate completely differently. The console is functional programming, where the app determines what is to happen at any time. The Windows version is event driven, where the user (and to an extent the data) determines what is to happen when. Trying to write a windows program as if it was a console app will not work at all well.
Sent from my Amstrad PC 1640
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I'd recommend Windows Forms / C#: you have a great IDE, Visual Studio, all the essentials for single-inheritance OOP (with Interfaces to kind-of implement multiple inheritance), and a time-tested (albeit quirky) set of useful controls ... and the ability to create custom controls, or controls that inherit from (and modify) the native controls.
I think that once you get going with these tools, you'll feel like your days in console programming were a jail sentence
cheers, Bill
«... thank the gods that they have made you superior to those events which they have not placed within your own control, rendered you accountable for that only which is within you own control For what, then, have they made you responsible? For that which is alone in your own power—a right use of things as they appear.» Discourses of Epictetus Book I:12
|
|
|
|