|
Wpf <-> internet <-> server <-> internet <-> Google; UPS; USPS; VISA; etc.
I have WPF apps, running as kiosks, calling into my (ASP.NET) web server that has "no presence" other than to handle client requests), that calls multiple API's for credit card verification, postal rates, address verification, and retrieving shipping label images; all using different accounts and passwords "stored on the server" along with "back end code" and an SQL data base.
Does that help?
(Sounds like you have a simple / local "file server"; and not a remote / distributed application / database / web server).
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Seems like the other thread has a miscommunication.
Your current app has the credential information in the client code. The type of credential information is irrelevant.
The credential information is hard-coded because you stated that. (That means every actual user of the client will be using the same exact credentials.)
So the other solution is to modify the code to do the following
1. Create a server API method that expects a requests from the client code. The client code does NOT make a call to google. The client code does not have the credentials.
2. The server code API uses the credentials and makes the call to google.
3. The server code returns the result of the google code to the client.
Note in the above that I did not specify where the server code gets the credentials from. Could be it still hard-coded but in the server code. There are other possible solutions to providing the credentials to the server code.
|
|
|
|
|
I have a really strange problem with WebRequest in a ServiceStack web application (hosted by XSP on Mono). It seems that the registration of request modules works in a very strange way; I am using WebRequest to create an HTTP request, and it is failing because it was not able to find a creator for that "prefix" (HTTP).
The exception I am seeing is NotSupportedException, and I was able to track it to the fact that no creator is registered for the HTTP prefix (I am hitting https://github.com/mono/mono/blob/master/mcs/class/System/System.Net/WebRequest.cs, around line 479)
EDIT: more details: NotSupportedException is thrown by WebRequest.GetCreator, which uses the URL prefix as a key to choose which creator to return; in my case, a HttpRequestCreator. The exception is thrown because there is no creator registered for the "HTTP" prefix (actually, there are no creators at all).
So I searched around a little bit, dug into Mono sources, and found that modules are (or should be) added to the webRequestModules section of system.web in one of the various *.config files.
I looked at my machine.config file, and there it is:
System.Net.HttpRequestCreator, System, Version=4.0.0.0
Looking at WebRequest Mono sources it seems that prefixes are added from configuration(s) inside the class static constructor (not a good choice, IMHO, but still.. it should work).
To test it, I tried to add an HttpRequestCreator to system.net/webRequestModules in my web.config; this is loaded by XSP/Mono and results in a duplicate key exception (which is expected since HttpRequestCreator should be already loaded, as it is already present in machine.config).
Even stranger: if I add a mock handler for Http, like this:
bool res = System.Net.WebRequest.RegisterPrefix ("http", new MyHttpRequestCreator ());
Debug.Assert (res == false);
The assertion sometimes pass... sometimes not! (RegisterPrefix returns "false" if a creator for the same prefix is already registered; I expect it always to return false, but this is not the case! Again, it is completely random)
When the registration "fails" (i.e., returns false because an "HTTP" prefix is already registered), then the WebRequest can create requests for HTTP. It is as if calling RegisterPrefix "wakes up" the static constructor and let it run.
I am perplexed: it seems like a race condition in the execution of the static constructor of WebRequest, but this does not make sense (the runtime protects static constructors with a lock, IIRC)
What am I missing? How could I solve or work around this problem? Is it my fault (misunderstanding or missing something), or does it look like a Mono bug, so should I submit it?
modified 16-Dec-22 4:27am.
|
|
|
|
|
Isaac Tack wrote: (it is not possible to reduce the amount of data).
That statement is unqualified.
You might not be able to reduce the total amount of data but you might be able to reduce the amount of data that is returned.
Isaac Tack wrote: I have the following ideas:
What happens if they want to turn off access to a user. Or change access. So the database is updated (delete the user, set a flag or change associated attributes.)
So now what happens with either of your ideas?
|
|
|
|
|
It is possible to compare two git remote repositories ? Those two repositries were clone, and I need to see if the source repository was updated. I didn't see any example of how to do that ... and I am thinking its not possible ?!
|
|
|
|
|
Depends what tools you're using. For the command-line, there are several suggestions in this StackOverflow thread[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Ok, I see, but I don't have access to the source repository ...
|
|
|
|
|
If you don't have access to it, then there's no way to know what's in it. You can't even perform a manual comparison.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Right click the branch you are targeting and select Compare with Current Branch. Alternatively, you can utilize the branch list on the Git Repository window to access the same command.
|
|
|
|
|
1) Why are you replying to me, and not the OP?
2) How do you think that's going to work when the OP has said they don't have access to one of the branches they want to compare?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
First you must have access to both of them. At least to download. You do not need permission to modify.
Then if it was me I would download both to different directories on my local computer.
Then I would get a tool that does file comparisons. Myself I use both WinMerge (free) and BeyondCompare (need to buy.)
|
|
|
|
|
Hi!
I want to upgrade my programming skills but don't know where to go.
Programming is an important hobby for me and I also made some tools for my company and for me to facilitate my work and my other hobbies.
For decades I used Visual Basic in MS Visual Studio. The last years a also tried HTML, CSS, JS, PHP, Python, SQL. And a view months ago I changed from Visual Basic to C#. And I ask myself if I should leave MS.
What I need and want:
- Nice graphical user interfaces.
- At the moment preferred Windows desktop apps. Web apps only if they also can handle local data.
- Maybe Linux and/or mobiles in the farer future, never ever Apple.
- Local and server databases. (XML, SQLite; MySQL, ...)
- Graphics (photos, charts, simple games, ...).
What I think of different tools and languages:
- Visual Studio WinForms: Old, outdated but still not bad.
- Visual Studio WPF and UWP: Nice but also outdated, MS stopped them.
- Visual Studio ASP.NET: I never tried it.
- JS: Great but not for local data(bases) und code is readable for everyone.
- Python: Great but no nice GUIs and I don't know if the compiler is good.
- Java: I never tried it but I think it can do everything. What about GUIs? How difficult to learn?
So what do you think? What are your experiences? What can you recommend?
Thanks
|
|
|
|
|
If you want to stick with MS, their latest offering is MAUI:
.NET Multi-platform App UI documentation - .NET MAUI | Microsoft Learn[^]
That will let you create apps that work on Android, iOS, macOS, Windows, and Tizen.
However, I haven't tried it yet, so I don't know how good or bad it is. I'm still using WPF, which still works and is still supported.
There's also Avalonia UI, which is an open-source cross-platform system "considered a spiritual successor to WPF":
Avalonia UI - Home[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
While WPF and UWP are "deprecated", they are not abandoned; and make it easier to transition to WinUI3 due to the similarities. UWP is the equivalent of WinUI2, and I still haven't found anything in WinUI3 to make me take notice.
While an EV may be the future, a lot of people are still buying ICE in the meantime in order to get somewhere.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
... and what about Electron?
|
|
|
|
|
hi i will recomended Visual Studio it's best note code software.
|
|
|
|
|
I am researching some standard models for Datawarehouse of accounting/ financial model? Is there any recommended books or knowledge base for these? I would like to find some best practice samples or the good way to identify the model. Any advice is really appreciated. Thanks!
|
|
|
|
|
He's got every model and relation under the sun. Sometimes its easier to reverse engineer Quick Books or something similar.
https://www.amazon.ca/Len-Silverston/e/B000APUYFQ/ref=dp_byline_cont_book_1
For data warehouses (publications), the keyword is "snow flake".
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
With the hodgepodge of frameworks available to make Windows applications these days - MFC, WinForms, WPF, WinUI, UWP, MAUI, Blazor Hybrid - and that's just the ones made by Microsoft! - it's really difficult to know which are suitable for a modern commercial application.
Rather than ask for recommendations or believe marketing hype, the best evidence for whether a framework or language is good is who's actually developing commercially successful applications with it. So what frameworks and languages are the big commercial shops using when publishing Windows applications these days?
Specific applications I'd like to know about are -
- Microsoft Office for Windows - this appears to be C++ with some kind of Javascript engine. There might be some .NET in there but it doesn't seem to be prevalent. I'm guessing they're using DirectComposition and have a homegrown control library that's completely untethered from the OS, but does anyone know for sure?
- Adobe Suite - also appears to be C++, but I'm guessing they have some home-grown cross-platform framework that allows them to keep the Mac and Windows versions in sync easily.
- Visual Studio IDE (not Code) - At one point this was WPF, but I can't tell what it is now.
- Slack - Electron maybe?
- Google Chrome - Obviously not .NET - guessing C++ and DirectComposition?
Secondarily, I can't find any evidence that big commercial applications are actually written using any of the Microsoft frameworks that are publicly available, other than perhaps WPF. UWP, WinUI, and Blazor all seem to be commercially irrelevant as far as I can tell. Would love to hear evidence to the contrary though.
|
|
|
|
|
XAML (WPF, UWP, WINxUI) does not appear to be going away. Pick a flavor and a device. Desktop, mobile, Xbox, all of the above, etc. Then use the corresponding (Visual Studio) project type(s).
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Not at all what I'm asking.
|
|
|
|
|
I think you need to define "big commercial" better, are you talking twatter, FB, and the host of social media or large corporates, banks, insurance etc?
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Has anyone here used RIBs architecture before? I’m starting a new cross platform mobile project using it. I’m trying to figure out:
- For Android whether to use Kotlin or Java,
- For iOS whether to use SwiftUI or UIKit
- What good dependency injection practices using needle and RIBs are? Does needle replace RxSwift?
- How and where to properly use “Plugins” on a more practical level than this article gives
- How to write unit tests for the interactor. Unfortunately I have almost no experience writing unit tests in Java/Kotlin & Swift but I really want to learn.
Thank you for reading this and I greatly appreciate any assistance.
|
|
|
|
|
in a video game you have a ton of different objects, they usually fall into categories: walls, characters/units, buildings, resource type objects (crystals, gold mines etc). the categories behave very differently. My question is how do you keep it all organized? I only have two types of objects and it`s a mess already, and I need to add another type or two. I have been keeping a separate list for each type of object, the exchange of information between types tends to be messy and that will just increase if I add new types.
|
|
|
|
|
Without knowing all the details of your problem, it seems like a case where object inheritance can help. Your objects can inherit from a base class, let’s say “entity” and reimplement various polymorphic functions.
For instance, each can have a collide function that does different things depending on the specific type of object. On the other hand, all objects have a location on the game map so you might have a function Entity::location() that returns the position of an object without having to reimplement it.
Also, your hierarchy might become more complicated as you find common traits between various classes of objects. You might have FixedEntity that describes walls and other things that stay put, and MobileEntity for players, dragons and what not.
Mircea
|
|
|
|
|