Jump to content

David Schwartz

Members
  • Content Count

    1189
  • Joined

  • Last visited

  • Days Won

    24

Everything posted by David Schwartz

  1. David Schwartz

    Hosting a console in a Delphi Application

    See if this helps: https://www.dropbox.com/s/rbslh6vrzyxio43/RedCon.pas?dl=0 It's from D5 era, so it might need some touching-up.
  2. Someone asked me recently if there are any REST frameworks for Delphi that run on Linux? I know TMS XData doesn't (yet). Are there any that do?
  3. David Schwartz

    Delphi REST frameworks that run on Linux?

    Well, however you want to describe it, my only real concern is that it's now possible to target services for linux hosts now. That's a Good Thing. 🙂
  4. David Schwartz

    Delphi REST frameworks that run on Linux?

    That's quite a list!
  5. David Schwartz

    Delphi REST frameworks that run on Linux?

    TBH, I was talking with someone who asked if there are other REST libs I could use to build my service to run in Linux, and I really only know of a couple, which is why I asked. (from the TMS XData product page) However, I got Holger's latest book and I see that it does talk about how to get around the Sparkle dependency on Windows and show how to deploy XData on Linux. Sorry, I can't edit the original post at this point.
  6. David Schwartz

    optical character recognition

    Well, the website seems just as vague today as it was when I worked with it (mid-2020). It was an incredibly fast library that was very easy to use in Delphi and cost under $100 USD for a license that had no limits on its use (ie, as many products as you wanted), no royalties, and no DLL. It was at work and I don't have a copy of it, so I can't give you any more details. But if whatever you've seen makes you think you'll be better off with OCR libs that are set up as DLLs where they restrict your usage, charge you royalties, or won't let you use it in a situation where you're getting data fed to you by clients through a web site, then by all means open your wallet and hand them your credit card. They'll ping it monthly for quite a bit. People do not write software that does OCR processing to deal with 50 pages of material. They're dealing with thousands to millions, usually being sent over the internet, and they are trying to replace workers with faster automated processing to boost their profits. The OCR software vendors know this, and they do all they can to ensure you're paying for every scan you process with their software. Again, I replaced an old ABBYY DLL with this and the workload went down from 6-10 hours to 30-50 minutes. The number of rejected documents before was about 30% (mostly because of a poor software design) and after it was under 1%. The accuracy rates were 25% higher with this library. The ABBYY people refused to sell us a newer DLL, and after our IT guy explained what we were wanting to do, the ONLY option they gave us was to connect our software with their server, upload each scan and have it processed by them for something like a nickel a page. The estimated cost they were going to charge us far exceeded what we were already charging the customer for everything. I was told this part was just a courtesy we were extending to the customer, and there's no way they'd stick with us if we raised their price by even 5%. (so I was told.) I still got dinged on my annual review because Mgt believed it was supposed to be a "one-week effort to migrate this from Win XP to Win 10" and it ended up taking nearly 3 months while I had to research OCR libs and find one to replace the DLL that just did not work in Win 10. (That analysis was done before I was even hired and they didn't seem to care what I had to say about it.) And they grumbled that it cost them $85 no less.
  7. David Schwartz

    optical character recognition

    I used this one on a project a few years back to replace an old version of ABBYY DLL (V1.0). https://transym.com It's a component written in Delphi and runs incredibly fast. NOT A DLL! If you value your your time at all, this thing is cheaper than most programmers charge for an hour of their time. Tesseract will take you more than an hour to get a demo working in Delphi. I'll give you a tip about OCR scanning ... If you're processing any kinds of forms, first look for anything on the forms that lets you determine their orientation. Some OCR scanners do that, but they can be really slow b/c they'll scan in all four orientations and pick the one with the best results. Look for a few "landmarks" like a few words and isolate an area where you'd expect them to be on the page. Scan those spots and see if you get a match or not. Then rotate 180 degrees and try again. If it doesn't match, chances are either (1) the page is upside down (ie, it's blank) or (2) it's not the form with those landmarks on it. Identify forms and their orientation by landmarks first. Then extract the data you need as follows: Break the page into boxes that are big enough to contain the text you're looking for. Don't scan the whole page if you're only looking for, say, an invoice number in the top-right corner, a date, and an ID#. Just look in the places where you expect those things to be and ignore everything else. If the forms are being scanned and sent by FAX, look for "noise" (lots of random dots). If you find a high noise level, then run something to get rid of the noise first as it will increase the recognition rate tremendously (and accuracy).
  8. Can't say, but for my purposes, I don't want to have to pay for a server thing to run my app. WEB Core translates the the Delphi code into javascript and embeds it into an HTML page that you can edit any way you want. All you have to do is copy the contents of the Debug or Release folder to a folder on your server and set the URL to open the HTML file (or if it's index.html, then just the folder it's in). I think that's a much simpler approach than unigui and IntraWeb offer, but that's just me.
  9. Check out TMS WEB Core. https://www.tmssoftware.com/site/tmswebcore.asp It lets you build your entire app in the Delphi IDE or VS Code -- both the front-end and back-end. It's awesome technology! They have a blog and Andrew Simard has written a bunch of detailed articles on how you can work with common javascript libraries to tailor the UI to work fully in HTML/CSS rather than use the default Delphi screen widgets. Said another way, this lets you use Delphi to build an entire app and then refine the UI using JS if you want. No python is needed, although you could use it (or anything else) for the back-end if you wanted.
  10. This is going to seem like a really strange question, but hear me out.... Suppose you're writing a web app for something people will typically run on their mobile devices (phones and tablets). Your app is going to have some audio files on it for them to listen to. You can provide a variety of things for them, but you KNOW that people are eventually going to ask, "I've got this one song I really like that I'd love to use for this; how can I upload it?" On a desktop or laptop running Windows, MacOS, or Linux, the answer is simple. But I'm having a hard time answering that question when it comes to mobile devices -- not for the reason that's obvious to most programmers, but because of two conflicting issues: (1) it's a web app, and on a mobile device, it cannot access the local file system; and (2) even if it could, most users have no idea where their media files are located there, even if they ARE there. The thing is, many people use streaming services like Pandora or Spotify, and have no idea where the music files they listen to actually live -- that's why they're called streaming services. Personally, I have a microSD card that I loaded up with a ton of music files and put in my phone (most Android phones let you do that, Apple products don't). I copied the files to a small thumb drive and plugged that into the USB port in my car so I can listen to them there. This saves me from having to subscribe to Satellite radio or some streaming service, or pay for iCloud / iTunes hosting. But I do have access to the files. I don't know how that works for people with iPhones. (I have an iPad, but I don't listen to music on it.) So if I had a song on my (Android) phone (in the SD card) that I wanted to upload to your web app, I know where it lives, but I don't know how I'd get it to your app. If I had an iPhone, I don't even know where it lives. The obvious questions are: do they have the ability to download the music file from somewhere else that they want to hear in your app? (Ie, is it accessible via a web browser?) If so, where can it be saved to? And then, how do they upload it (considering that they can't access the local device's storage)? It's basically a file-sharing problem at this point. "I have this spreadsheet I'd like you to look at, can I send it to you?" Ok ... how? In my mind, the easiest solution would be to put the file on Dropbox or Google Drive and get a DL URL for it, then paste that URL into a field in your app and press the [OK] button. It's a workable soluition ... IF it's not blocked by a CORS policy. (My remote service can try to DL the file, but my experience lately is that it will very likely be denied access to it.) I'm hoping some folks here have faced this problem in some way or another and have either come up with a solution or have seen something that has worked. Because I'm rather stumped at this point. Think of it this way: You're creating this web app, and you have a few friends who are total technophobes but they like your app, and they want to know how to upload a favorite song so they can hear it in your app on their iPhone or Android phone. How do you solve that problem in a way that's simple enough for them to deal with, other than taking it to the Geek Squad at Best Buy? (Or calling you.)
  11. David Schwartz

    Use-case question for average phone users re: file-sharing

    So what if running my web app on your desktop (Win, Mac, or Linux) would let you access the file system and upload it that way? Just not as easily from your mobile device?
  12. David Schwartz

    Use-case question for average phone users re: file-sharing

    I totally get what you're saying, and thanks for playing along. Now, to further this discussion, tell me how you'd upload a few MP3 files to your iPhone and then upload them to, say, Dropbox or Google Drive -- anything you'd access via the web browser (ie, not using their APPS.) I asked a friend who knows iOS inside and out (a "power user") how he'd do this and he thought about it, and suggested some ways. Then I said, "Ok, now explain that to your sister so SHE can do it." His reply: "Uh, no. It ain't happening. There's no way she could do this." THAT is what I'm faced with. YES, it's POSSIBLE -- for POWER USERS. Not the average person. At least, not that I've identified yet. Tell me you have a simple solution! PLEASE!!! 🙂🙂 🙂
  13. David Schwartz

    Use-case question for average phone users re: file-sharing

    Thanks, you're providing a larger view of the landscape here. Apple had a service for a couple of years (2014-16 or so) that let you insert an audio CD in your computer and it would sort of "rip it" and "upload" it to their cloud. Then you could play songs from whatever albums you had uploaded. I forget what it was called, and I was surprised when they shut it down. But the thing to note here was that you had to have the physical CD, and you had to "upload" it using your desktop or laptop -- not your phone or tablet. I know how things have been in the past, and I'm seeing a lot of shifts happening now that so many (mostly younger) people are doing the majority of their internet activities on their phones. I'm seeing people complaining about not being able to fill out forms online that don't fit on phones because they're designed to work on larger screens like desktops and laptops. I'm at the other end of that spectrum: I just got a new credit card and I had to download their app to activate it, and now that so many companies are going "mobile-first", it's getting harder to access stuff on my computer. This app will let you take notes, and I'm wondering, "How can they get them off of the device?" I can use the "Share with..." thing you're referring to, but it only works with APPS -- and "web apps" are web pages with logic that runs in a browser, not "apps". The BROWSER is the app in this case, and it has no idea what's running inside of it. But I digress ... I'm hoping someone can identify something they've seen recently that might point to a solution. For example: say you're filling out a job application and they want a copy of your resume, and you're on your phone's web browser ... so where's your resume? Is it on the phone? Or is it on another site? Or is it on your desktop or laptop? Same problem I'm trying to solve, see? I just don't know how people can do everything on their damn phone without being able to access an underlying file system! They've got to store files SOMEWHERE, right? Where would they have MP3 files they'd want to upload to a service? (Not a media streaming service.) Note that the devices let you capture videos, audios, and images, and all of them have a place where you can access them on the device. Yes, they're on the device's file system, but it's virtualized. If you wanted to upload something via the web browser, there's a way to access those virtual areas -- as opposed to going to c:\home\users\<username>\media\video\blahblahblah.mp4 Apple has always been rather paranoid of letting people upload copyrighted materials from uncontrolled (non-DRM) sources. Android is a little looser, but not much.
  14. David Schwartz

    Use-case question for average phone users re: file-sharing

    I'm trying to solve a design challenge. I get the sense that most people who hang out here are pretty darn good at that. That's why I'm asking for help here. I think if I posted this on SO it would get locked before anybody answered. It's just not the right venue for it. It's a software design issue, not a programming issue. I have not seen that SO is very welcoming to design-related questions, I guess b/c they come too close to their prohibition around "making recommendations". I dunno. It's just my observation. This thing I'm working on is for a market with two major demographics: Millenials and Baby Boomers. The Millenials are probably more tech savvy than the Boomers, but I think the Boomers are more used to working with desktops and laptops, and would have an easier time with this than younger folks who do everything on their phones. I seriously doubt anybody here would have a problem with ANY solution could imagine. PEOPLE ON THIS FORUM ARE NOT MY TARGET MARKET! I'm inviting you to help me solve this particular puzzle. Put your design hat on and let me know what comes to mind. 🙂
  15. David Schwartz

    Use-case question for average phone users re: file-sharing

    That's my point. It doesn't answer my question. And for the record, I pretty much expected these types of responses from a bunch of programmers. Which is why I ended it saying this: Think of it this way: You're creating this web app, and you have a few friends who are total technophobes but they like your app, and they want to know how to upload a favorite song so they can hear it in your app on their iPhone or Android phone.  How do you solve that problem in a way that's simple enough for them to deal with, other than taking it to the Geek Squad at Best Buy? (Or calling you.) I'm asking here how you'd solve this as programmers. YOU ARE NOT THE TARGET MARKET, and I don't expect anybody here to identify with what I'm asking.
  16. David Schwartz

    E-Payment processing software for Delphi

    It's not hard to add payment processing to anything using a 3rd-party API or a turnkey solution. I asked what country you / your client are in because security issues will vary. I work with websites that have payment handling integrated from PayPal, Stripe, and others. They have mature solutions that aren't problematic. I haven't investigated using them with a Delphi app, but the issues are probably similar. Integrating a POS terminal from a payment processor can be problematic. I've been involved with it using Delphi at several places, and while it's a PITA for a company, there's no way I'd want to do it myself. What I'm trying to say is there are literally dozens of turn-key solutions you can choose from that put you in the role of being a VAR -- Value-Added Reseller. That may not be as much fun as writing a bunch of Delphi code, but it's very profitable and your goal is to understand enough of the tech side to keep them happy while charging them a monthly maintenance fee -- without having to do any programming. Again, Square and Clover are two popular POS vendors with turn-key systems that you simply need to upload files and menus and text content, adjust some settings, and you're ready to go. They may even have a web portal you can use as well. I'm a programmer ... I love designing and building software. But over the years there are things that I simply don't want to do for various reasons, and integrating code into payment processing and health-care systems are two of them. The regulations here in America are simply too burdensome for my tastes. Where you're at, it might be different. I'm personally looking into doing something obvious in the realm of bio-feedback, and there are products on the market that would make perfect sense for the vendors to have already done this, and it's puzzling to me why they have not. Someone suggested it may be due to FTC regulations that make it nearly impossible to mention anything about what to expect without having them nail you for making "medical claims". I've yet to dig into it, but the fact that nobody in the market is going in this fairly obvious direction makes me wonder if it's for regulatory reasons.
  17. David Schwartz

    E-Payment processing software for Delphi

    I don't get that intepretation from the OP. He did say, I am 100% new to this field although it's unclear to me what "field" he is talking about. It could be several, including: programming; Delphi; restaurants; ecommerce; online payment processing; and others. I have worked in a half-dozen companies that did online payment processing, and I learned several things: (1) online payments are very security-centric; (2) they take a long time to solve and get certified; (3) they can take several dedicated resources, so are very expensive; (4) there are considerable legal and financial liabilities involved in a DIY approach; (5) he wants both POS and web-based, which are two completely different cans of worms; (6) a one-man shop will be more likely to go bankrupt before finishing. The last place I was at, monitoring compliance for PCI and something else kept three people busy full-time, and it required a computer be set up in an isolated room with multiple security barriers and no direct connection to the internet or even WiFi access. I remarked to my boss one day how I thought it was rather excessive and he almost blew a gasket. I do not pretend to understand it very deeply, only that the companies I've worked for who did this stuff took it extremely seriously. My take-away was simple: let someone else invest the time and money into building and maintaining a secure solution that meets all of the legal compilance stuff, and just buy or lease it from them.
  18. David Schwartz

    delphi Twebbrowser Javascript error

    Wait ... what? Didn't Bill Gates testify before Congress that IE is an "integral part of the OS" and that "Windows would not work without it?"
  19. David Schwartz

    E-Payment processing software for Delphi

    What country is your client in? This can be very important. I don't think typical restaurants can afford what it would cost for you or anybody to do this DIY. It's something I _could_ do, but I wouldn't touch it with a 10' pole. Too much liability for my taste. I'd urge you to look around at vendors who sell turn-key POS + Web solutions that can suck in the existing content and have it up and running in a week or so. There are HUNDREDS of them! Many even include a mobile app with online ordering. Also, ask any hardware vendors you're talking with about security requirements, like PCI and some other things; they'll vary by country. Square has a popular POS package that includes a cash drawer if needed, as does Clover. There are some that provide a case for a mobile phone with a card swiper. And there are also the table-top devices that have games for the kids and let you pay your bill when you're done. I would highly recommend NOT doing this yourself.
  20. David Schwartz

    E-Payment processing software for Delphi

    This has little to do with Delphi, per se, and more to do with using Delphi to access your payment procssor's API. It probably belongs in another part of the site as it has nothing to do with VCL. If you don't have any experience calling REST APIs in Delphi, then play around with some free ones first. Then find a payment processor you like that has a public API and use Delphi to access it. They'll probably have examples of several languages, like js, python, php, etc. Not likely any Delphi example. So what? If it's a REST API, just use Delphi's REST debugger and go from there. TMS Software has the VCL Cloud Pack which implements an API for PayPal. https://www.tmssoftware.com/site/cloudpack.asp They also have their FNC Cloud Pack (a cross-platform library) that supports PayPal and SumUp https://www.tmssoftware.com/site/tmsfnccloudpack.asp Stripe also has a REST API you could call with examples for several languages: Ruby, Python, PHP, Java, Node.js, Go, and .NET, as well as a basic Curl example. https://stripe.com/docs/api There's also a platform called Plaid that offers services to talk with several banking platforms: https://plaid.com/docs/api/ (There are actually a bunch of services similar to Plaid you can use.) But all of this is simply payment processing. If you're looking at using Delphi to build the next eBay, Amazon, or Shopify, that's a whole 'nuther can of worms, and I would not recommend Delphi as the implementation platform. That said, I've worked at a number of places that sold various services and did integrated billing -- some that supported healthcare providers like Doctors and Dentists, and others that just did various other specific services. Explain your use-case and you might get some more substantive insights.
  21. static (ie, 'class' methods) cannot access members since they don't refer to any instance of an object. You seem to be conflating a Factory pattern with ... a mess (?) Are you wanting a Singleton here? i can't really tell what you're trying to accomplish. Try explaining it in words first because your code makes no sense to me.
  22. It has nothing to do with taxes, per se. Look up the term "charging order" for LLCs and how they come about. They sound pretty nasty for the LLC, except for single-member LLCs.
  23. David Schwartz

    'for i:= 0 to 4' does 6 loops when not in Debug mode

    I'd think your time would be better invested changing code like this: for i := 1 to 8 do Myvar[i] := 0; to this: for i := Low(Myvar) to High(Myvar) do Myvar[i] := 0; when the target is an array type. Or use an iterator if possible, but it's not possible here.
  24. We're talking about liabilities here. Corp-to-Corp is NOT an "independent contractor" nor a 1099 tax situation. The legal and financial liabilities don't apply in Corp-to-Corp engagements as they do with IC's and personal 1099s, which is why C2C is preferred. However, can you explain why a lot of job shops won't hire you if your business entity is set up as a typical LLC (ie, a pass-through entity)? Corp-to-Corp MEANS just what it says. Some places might be dumb enough to hire you thru an LLC not taxed as a C-Corp, but that's only because they haven't been burned yet by a regular LLC they hired. Or their corporate attorney isn't aware of the liabilities that pass-thru LLCs come with. (You might like them, but the hiring agency certainly won't once they understand them.)
  25. This is absolutely untrue. What they call "burdened head count" adds around 50% of the salary. Right off the top, about 1/3 of an employee's salary is added-on for Government mandated taxes as well as things that employers typically pay just to be competitive. You can opt to get paid as an "independent contractor", but Congress has made it nearly impossible in engineering fields here in America to know how an IRS agent auditing your business might rule on that. As a result, very few companies are willing to risk it. But if a US Citizen can get the employer to treat them as a "1099 worker", you can easily boost your "salary" by 25%-30% to arrive at your hourly compensation, because you won't get any of the benefits you'd get as an employee. You guys who work outside of the US as "contractors" to US companies ARE most likely paid on a 1099 basis because a big chunk of those "employee benefits" are worthless to foreigners. And the IRS will never question your employment status (contractor vs. employee) since you won't pay US taxes.
×