|
There isn't a free client API for WhatsApp.
You need a business account with a line of credit.
|
|
|
|
|
I need verification code on WhatsApp
|
|
|
|
|
Hello friends, I want to do SQL Dependency capability in a database file without SQL management The default file address is also in (c:\database.mdf)
I run the service broker in the file, unfortunately I apply a record in the database, it will not be updated in another system, please help
|
|
|
|
|
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.
Typing as little as possible doesn't help much as we can't help you if we don't properly understand your problem! And at the moment, all I can see are buzzwords and mistakes.
The principle mistake is trying to store a database file in the root of any drive, much worse when it's the boot drive: as from Windows 7 the root of the boot drive was protected from non-admin activity, and this was extended in later revisions to cover non-boot drives as well.
Never store "normal files" in the root - always use a subdirectory!
This may help: Where Should I Store My Data?[^]
"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!
|
|
|
|
|
Given a large number of shapes that can be defined by vertices and edges how would you design the class structure for that?
|
|
|
|
|
Hi, i happen to be working on a shape library for WinForms C# right now; i'll eventually publish it here, but, can't predict when. Let me offer some general ideas:
1) choice of Framework is important: a lot depends on what you want to do with your shapes. my usage is for custom ring design; for example, i need to calculate equally spaced points along a path like an oval, and that point's tangent (requires calculus); i deal primarily with polygons, circles and ellipses; my goal is to have mock-ups i can take to my manufacturers. so, i'm not concerned with 3d rendering on screen, texturing, etc. and i'm not concerned with interacting with selecting/moving/duplicating shapes on-screen as you expect in a drawing program,
2) for other purposes, like the ones i just said i'm not concerned with, WPF offers a superior graphics engine and facilities; and, for 3d; use Unity. if you do need to select/move/duplicate/dock etc., shapes on-screen: don't use WinForms, use WPF.
3) the interface i am using now: the use of System.Windows requires your WinForm project to have a reference to WindowsBase.dll
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows;
using SdPoint = System.Drawing.Point;
using SwPoint = System.Windows.Point;
using SdSize = System.Drawing.Size;
using SwSize = System.Windows.Size;
using GraphicsPath = System.Drawing.Drawing2D.GraphicsPath;
using GReg = System.Drawing.Region;
using GMat2d = System.Drawing.Drawing2D.Matrix;
using GMatMed = System.Windows.Media.Matrix;
namespace GeomLib_August_2021_III
{
public enum ShapeType
{
Line,
Arc,
Rectangle,
Parallelogram,
Circle,
Ellipse,
RegPolygon,
IrregPolygon,
Grid,
Star
}
public interface IShape
{
string ShpName { get; }
string ShpComment { get; }
DateTime ShpTimeStamp { get; }
ShapeType ShpType { get; }
Rect SwRect { get; }
SwPoint CenterF { get; }
SwPoint[] PathPoints { get; }
double GetArea();
double GetPerimeter();
SwPoint GetCenter();
GraphicsPath GetGPath();
Region GetRegion();
IShape GetUnion(IShape s1, IShape s2);
IShape GetIntersection(IShape s1, IShape s2);
IShape Translate(IShape s1, Matrix m1);
IShape Rotate(IShape s1, Matrix m1);
IShape Scale(IShape s1, Matrix m1);
SwPoint[] Flatten();
void Render();
void Save();
void Load()
}
} Each shape name listed in the ShapeType Enum is implemented as a class that inherits from IShape, and implements its fields, and methods.
4) typical OO shape modeling uses "nested" inheritance; you might have:
class Poly : IShape
class Triangle : Poly
class Rectangle : Poly
class Parallelogram : Rectangle
class RegularPolygon : Poly
class EqTriangle : RegularPolygon // or EqTriangle : Triangle
class Square ; RegularPolygon // or Square : Rectangle
class Circle : IShape
class Ellipse : Circle
5) there any number of ways you can organize the top level hierarchy to meet your goals.
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
modified 18-Oct-21 3:18am.
|
|
|
|
|
Good morning Bill. Thanks for posting this code - it's great to see people sharing code like this. I have a couple of comments that I'd like to address.
The code sample here has a lot of shorthand in it so things like GetGPath have to be interpreted. Is there a reason why this isn't called GetGraphicsPath or just GetPath ? On that note, why have you chosen to implement Get methods over property getters? I'm just curious as to your reasoning here.
The Shp properties all feel like they should be in a separate class. Again, it feels to me like these are metadata items, rather than being intrinsic parts of the base interface. I would probably move these out into a separate metadata class and drop the Shp parts of the name.
The Union and Intersection methods also appear to be wrong, unless you are looking to determine whether this shape intersects with more than one shape - the first parameter of these methods is probably going to be the current instance so why pass it in? I would expect to see a method that looks more like this
IShape Union(IShape shape);
|
|
|
|
|
Hi Pete, i'm delighted to have feedback like this ! I'll study it carefully, and respond in more detail later.
current version calculating equally spaced points points on an ellipse: [^]
Context: currently this is very much in initial development, and, "final polishing" may address your concerns about my use of short aliases instead of longer, more mnemonic, names. For unknown reasons, my memory, at age 78, handles such short aliases without cognitive effort (just don't ask me where i left my house keys) ... and, it saves typing time
Quote: The Shp properties all feel like they should be in a separate class. Again, it feels to me like these are metadata items, rather than being intrinsic parts of the base interface. I would probably move these out into a separate metadata class and drop the Shp parts of the name. Excellent points ! As the design progresses, i may "break out" the IShape interface into component interfaces like IIdentity for ShpName, ShpComment, ShpTimeStamp (those i would call "metadata"). Right now, things like SwPoint, CenterF seem essential.
"Shp" as prefix: I often "go Hungarian" simply because when i view an object's contents at run-time when a breakpoint is hit, they appear grouped together in the alpha-ordered inspector dropdown, Same idea with public Properties i want exposed in a design-time PropertyGrid.
'Get methods instead of Property getters: somewhere along the line years ago (influenced by Richter ?), i decided to never do extensive calculations, or call external methods, in Properties (except for OnPropertyChanged). That "feels right," and, i believe that contributes to maintainability in the long run ... perhaps i should reevaluate that "habit/decision" ? Quote: The Union and Intersection methods also appear to be wrong, unless you are looking to determine whether this shape intersects with more than one shape - the first parameter of these methods is probably going to be the current instance so why pass it in? As of now, i have not implemented any "current ..." state/object facility. That is something I really like ever since my little career led me into specializing in PostScript.
My intent is to take two shape instances as input, and return a new shape which is the intersection/union of the two inputs: that syntax doesn't reflect that ?
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
I find that "super" controls that you can morph at run time (color, scale, content) are more manageable than trying to build things from lots of primitives.
You need a "focus"; e.g. military units already have many predefined shapes and derivatives. In architecture, there are door, window, etc. "patterns".
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Hey there,
My first time posting on this forum.
I've written and reformed this database a lot over the years. It was called metastrings, but that's a dumb name, and I've boiled it down to four operations, so 4db made more sense:
GitHub - michaelsballoni/4db: Simple database for high productivity and ease of use
To see how it works, check out the carsdb sample:
4db/carsdb · GitHub
I'd like to get some feedback on the general premise and the implementation. And I'm interested in contributions to make it more useful.
Thanks, -Michael
|
|
|
|
|
|
i respectfully disagree with you on the appropriateness of this post in this forum: see my comments to Michael on this thread.
cheers, Bill
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
Well Bill, I respectfully disagree with your disagreement. This forum is for questions on C#, not reviews of people's projects. And there is a perfectly adequate Database forum further down, which is still fairly active at times.
|
|
|
|
|
@chrismaunder
i do see your POV !
for me, the salient questions are:
1) if (your words) "This forum is for questions on C#" ... how does that make it any different from the C# QA forum ? why have two fora ?
2) if there's all kinds of questions that appear here that could just as well be appropriate on the C# QA forum, and that's okay, then why not tolerate other types of posts that do have some C# related content, like Michael's ?
ideally ... for me ... this would be a forum for serious discussions of C# language issues: new features; work-arounds, optimal techniques, and yes, code reviews. Questions/problems ? Yes: but, hopefully those that invite in-depth discussions and debate. Kevin Marois might have to use QA to get his code written for him
But, as i said to Honey,,,Witch on the Insider News forum recently: "i can't afford 'ideals' at my age; i have to get by living off 'values'."
And, speaking of "values:" allow me to propose that when we respond to a post like Michael's that may, indeed, be an "edge case" for content on this forum, based on perceptions that he's smart, that he's written some CP articles, that with encouragement/recognition (who doesn't want that ?) he may bring more of his knowledge and experience to CP ... that's valuable.
i call that value "collegialty."
cheers, past-his-use-by date-Bill
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
1. The two are different, and you have to go back a few years to when QA was introduced to understand why it was introduced.
2. I did not see anything related to C# in the original question.
Michael Balloni wrote: My first time posting on this forum. So why say that when he has been, as you pointed out, a contributor of many years standing? And that was why I suggested he was in the wrong place.
|
|
|
|
|
Richard MacCutchan wrote: go back a few years to when QA was introduced to understand why it was introduced. If you have time, i'd appreciate knowing your perceptions/memories of "why."Richard MacCutchan wrote: 2. I did not see anything related to C# in the original question. i interpreted this more narrowly: as meaning he had not posted in this forum before. But, i agree that his database article should have been mentioned, and that might have made the post less "ambiguous."
cheers, Bill
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
BillWoodruff wrote: perceptions/memories of "why. IIRC the idea was to attract 'quick' questions. That is to say ones that could be answered fairly easily without long discussion threads as tend to exist in the forums.
|
|
|
|
|
Hi, i'm not trying to go "legal" on you, and i am getting all i ever hoped for, and more , from CP; but, in your opinion, is it optimum to have (what i perceive as) the kind of overlap we have now ?
If i am the only one beating the gong, i'll just adjust my attitude and perceptions.
cheers, Bill
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
Well it is what Chris and the team wanted, and in some ways it works well for both questioner and responder. But the problem with an open forum is getting all the users (myself included) to follow the rules correctly.
|
|
|
|
|
... understood ... thanks !
i've been told i have a real gift for thinking up things other people should change
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
BillWoodruff wrote: a real gift for thinking up things other people should change
I think we can all do that.
|
|
|
|
|
Hi Michael, i'm surprised you didn't mention your 2021 CP article: [^] to which i and other people responded.
imho, your GitHub site has no Wiki; the intro (.md file) is a single statement that does not effectively "advertise" what the project is about, and motivate the viewer to explore it. i suggest adding much more information for the visitor. And, aren't there ways to promote a GitHub site ?
i have no quibble with your posting this here; over the years, this forum has mutated from being a place for C# language issue discussion to being a QA forum, and tolerating whatever else walks through the door.
There is a (relatively inactive) DB forum here: [^] ... why not post there, also ?
imho, code-review and concept-review, to any real depth, are rara avis in this section of the zoo (code-monkey-house ?) That's not a complaint ! Perhaps StackExchange's Code Review forum [^] might be fertile ground for you ?
Wish I had the database experience and depth (and youth !) to evaluate your implementation, and ask intelligent questions.
cheers, Bill
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
modified 17-Oct-21 5:44am.
|
|
|
|
|
Hey Bill,
Thanks for taking the time. Sorry this is so late, I don't know why CP wasn't emailing me with y'all's responses. Just got a comment here about the general premise, tried to speak to that. Yeah, I haven't fleshed out the GitHub "sites" at all yet, was hoping to get some direction based on my question as to how this tool might best be used, and a code review is always much appreciated. I posted to the Database group, no response there. I'm porting it to C++ for fun, that's been a blast, should make for another fun article.
Cheers, -Michael
|
|
|
|
|
Hi Michael,Michael Sydney Balloni wrote: was hoping to get some direction based on my question as to how this tool might best be used i think that without more of an overview of the project, and summary details of its architecture, api's, and work-flow, its features, its limitations, etc., you may not get the responses that would be useful.
imho, JSchell's reaction, posted here, probably reflects the naturally skeptic attitude people with significant db experience will take tom such innovation.
People like me, without pro-level db experience, may compare what you are doing with Mehdi Gholam's RaptorDB here on CP: [^] a major project developed over years, with extensive performance testing/timing.
If your project has a limited range of functionality ... and, i understand what that is ... and, performance in its range of use-cases is faster, more efficient, easier to use ... that's fine with me !
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
|