|
Hello thanks, im looking around to learn anything about the parsing?, an howto with examples, better than the microsoft site?
|
|
|
|
|
Yes, that's it, but now I must find a way to solve my problem
thank you for the tip
oh, thats a very good side to learn for all beginners like me
https://www.dotnetperls.com/parse
|
|
|
|
|
I have been looking at various ORM libraries. Many of these seem to rely on attributes placed on classes and fields in the model. I understand that attributes can be completely ignored by the build process but I'm not sure how such library-specific attributes fit with the whole idea of dependency injection and being able to swap in/out different data providers without requiring any other changes - and certainly not as 'deep down' as the model layer.
I am also puzzled by the workflow using ORM tools. Some require the POCO class to be defined and some ask the data tables to be designed first, but once the first iteration of all this is in a production environment, how on earth do you then instigate any changes without obliterating the live database?
I'd be extremely grateful if anyone could point me at some good reading around this whole subject.
Kind wishes - Patrick
Thank you to anyone taking the time to read my posts.
|
|
|
|
|
In Entity Framework, you can use "fluent configuration" to configure the store, so that you don't need to add library-specific attributes to the classes.
Creating and configuring a model - EF Core | Microsoft Docs[^]
You can even mix-and-match; I tend to add the non-library-specific attributes like StringLength to the classes, and put the EF-specific stuff in an IEntityTypeConfiguration<T> class.
Patrick Skelton wrote: once the first iteration of all this is in a production environment, how on earth do you then instigate any changes without obliterating the live database?
For Entity Framework, you can use migrations to update the database schema to match the model:
Migrations Overview - EF Core | Microsoft Docs[^]
Other ORMs will probably have something similar.
There are also third-party tools to manage your schema migrations (eg: Flyway) but they tend to cost money.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Interesting stuff, Richard. Thank you. Looks like I have some reading and experimenting to do.
Thank you to anyone taking the time to read my posts.
|
|
|
|
|
I use Entity Framework; I like to keep it simple; and have never gone much beyond [KEY]. I maintain my data relationships in code; I use primarily "code-first" versus "data-base" first since I'm primarily developing / prototyping. I think you should examine your own style before subscribing to a particular approach.
"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
|
|
|
|
|
Thanks, Gerry. Code-first does sound best for me, for the same reasons as you.
Thank you to anyone taking the time to read my posts.
|
|
|
|
|
Patrick Skelton wrote: and being able to swap in/out different data providers without requiring any other changes
Having spent decades working with data providers that is pipe dream.
If the system evolves into any complexity then differences between systems will crop up that at best will exhibit problems that make at least one service provide behave in a less than optimal way compared to others.
This can be minimized, but not eliminated, by the following
1. Very carefully review all requirements BEFORE committing to evaluate impact on data flows especially those that have any chance of involving performance (volume and size.) The impact must always be rigorously sized.
2. Have a custom data layer that STRICTLY enforces the data rules.
3. Do not allow any exceptions. If you allow even one exception then over time there will be more exceptions.
|
|
|
|
|
I have a C# app in .NET framework 4.6.1 where it uses WebClient.DownloadString(url) to download content from a url that uses TLS 1.3 and it throws exception because app is intended for a use on Windows Vista that doesn't have TLS 1.3
.NET framework 4.8 can't be installed on Vista.
How can I solve this problem so that app can work on Vista?
|
|
|
|
|
I just browsed to namespace System.Net, using VS2010, and can see that WebClient.DownloadString(ur(i)) is a member of System [4.0.0.0] so I'd suggest going into the Project Properties and see if you can't switch the Target framework from the green one, 4.6.1, to ... say 2.0 or a little higher. Maybe 4.0.
Nothing I've ever compiled with VS2010 gave me troubles on Vista but TLS did superceed SSL as I recall back around Windows 2000. Then again, I've actually has RDP running on Vista (though not attaching to Windows 2000) ... so I don't know what gives with RDP.
Perhaps I'm confusing help here with some other help somewhere else
|
|
|
|
|
Hi,
It's not possible. The .NET framework utilizes Schannel for TLS 1.3[^] and Vista uses outdated libraries.
moxol wrote: How can I solve this problem so that app can work on Vista? The only thing that comes to mind is maybe using a C# wrapper around libcurl[^].
Best Wishes,
-David Delaune
|
|
|
|
|
You can get your app to use the OS-default protocols by setting a registry key:
Transport Layer Security (TLS) best practices with the .NET Framework - .NET Framework | Microsoft Docs[^]
Of course, that won't help if the OS doesn't support TLS 1.3 in the first place. As far as I can see, it's only supported in Windows 10 (build 1903 or later) and Windows 11, and in Windows Server 2019 and 2022. Vista doesn't even support TLS 1.1 without a patch!
I guess the real question is, why are you still using an OS which has been out of mainstream support for over a decade, and out of extended support for over five years?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Yep,
There are a few third-party options. I'm not a C# dev, but I heard that Bouncy Castle[^] does TLS 1.3 or maybe a libcurl wrapper would be an option.
|
|
|
|
|
|
I would probably try to explain customer that the problem is not in my application but in operating system. If I was creating a protocol that does not work on an operating system, I would have explored further to fix it. But here it appears you are creating an application which has some pre-requisites which are outside or your control and must be provided by consumer of your application.
I would stay away from try to fix this as soon someone would show up with a XP based computer and now I need to support that as well.
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]
|
|
|
|
|
Hello everybody,
If i used ClickOne, where could i say the path the program has to be installed in the user pc?
|
|
|
|
|
ClickOnce apps are installed per-user, meaning every user on a machine has their own copy of the app in their user profile under C:\Users\userId\AppData\Local\Apps\2.0. Each app has it's own folder and another folder assigned to it under the Data folder.
|
|
|
|
|
Thanks a lot, than mean that i can not change the pre-defined folder:
C:\Users\userId\AppData\Local\Apps\2.0. ?
|
|
|
|
|
No, you can't.
If you're looking for something more akin to a normal .MSI installer, you're going to have to use a 3rd party packaging tool, like Wix, InnoSetup, Advanced Installer, InstallShield, or the like to package up your app.
|
|
|
|
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class moviment1 : MonoBehaviour
{
public float Speed;
public float JumpForce;
public bool isJumping;
public bool doubleJump;
private Rigidbody2D rig;
void Start()
{
rig = GetComponent<Rigidbody2D>();
}
void Update()
{
Move();
Jump();
}
void Move()
{
Vector3 movement = new Vector3(Input.GetAxis("Horizontal"), 0.0f, 0.0f);
transform.position += movement * Time.deltaTime * Speed;
}
void Jump()
{
if (Input.GetButtonDown("Jump") )
{
if(!isJumping)
{
rig.AddForce(new Vector2(0.0f, JumpForce), ForceMode2D,Impulse);
doubleJump = true;
}
else
{
if(doubleJump)
{
rig.AddForce(new Vector2(0.0f, JumpForce), ForceMode2D,Impulse);
doubleJump = false;
}
}
}
}
void OnCollisionEnter2D(Collision2D collision)
{
if(collision.gameObject.layer == 8)
{
isJumping = false;
}
}
void OnCollisionExit2D(Collision2D collision)
{
if(collision.gameObject.layer == 8)
{
isJumping = true;
}
}
|
|
|
|
|
If that's how your code is really formatted, it's no wonder you're getting this error.
It means you have mismatched { and } characters in your code.
Clean up the formatting, making sure matching { and } line up and are indented properly and you'll find the problem.
The error says you're missing a closing brace at the end of the code snippet you posted.
|
|
|
|
|
Hi Joana,
You need one more } to close the class. Add it to the end of your class.
See Sample below:-
//==================================================================================
public class moviment1 : MonoBehaviour
{
public float Speed;
public float JumpForce;
public bool isJumping;
public bool doubleJump;
private Rigidbody2D rig;
// Start is called before the first frame update
void Start()
{
rig = GetComponent<Rigidbody2D>();
}
// Update is called once per frame
void Update()
{
Move();
Jump();
}
// MOVE
void Move()
{
Vector3 movement = new Vector3(Input.GetAxis("Horizontal"), 0.0f, 0.0f);
transform.position += movement * Time.deltaTime * Speed;
}
// JUMP
void Jump()
{
if (Input.GetButtonDown("Jump"))
{
if (!isJumping)
{
rig.AddForce(new Vector2(0.0f, JumpForce), ForceMode2D, Impulse);
doubleJump = true;
}
else
{
if (doubleJump)
{
rig.AddForce(new Vector2(0.0f, JumpForce), ForceMode2D, Impulse);
doubleJump = false;
}
}
}
}
void OnCollisionEnter2D(Collision2D collision)
{
if (collision.gameObject.layer == 8)
{
isJumping = false;
}
}
void OnCollisionExit2D(Collision2D collision)
{
if (collision.gameObject.layer == 8)
{
isJumping = true;
}
}
}
|
|
|
|
|
|
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with - we get no other context for your project.
Imagine this: you go for a drive in the country, but you have a problem with the car. You call the garage, say "it broke" and turn off your phone. How long will you be waiting before the garage arrives with the right bits and tools to fix the car given they don't know what make or model it is, who you are, what happened when it all went wrong, or even where you are?
That's what you've done here. So stop typing as little as possible and try explaining things to people who have no way to access your project!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
You have already posted this in QA:
Windows devices humaninterfacedevice[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|