Giter VIP home page Giter VIP logo

delphi-tips's Introduction

Delphi Tips

This project contains a bunch of Delphi language tips.

Some of the tips are published online at tips.delphidabbler.com.

Health Warning! All the tips are very old now. Very few have been tested, and those that have were tested quite some time back on an old version of Delphi. Consider yourself warned!

The project has the following folders:

db

Contains a single SQL file - tips-v2.sql - that provides meta data about the tips. The file can be used to create a database.

Such a database would need to be used in conjunction with the files in the docs/_tips folder, and some suitable CSS and HTML templates, to generate complete web pages for each tip.

demos

Contains Delphi Pascal demo projects associated with some of the tips in the docs/_tips directory.

Each demo has its own sub-directory whose name is the number of the associated tip. Where there is more than one demo for a single tip there are further sub-directories for each demo.

Note: .html files in docs/_tips link to this directory. Should the directory, or any of its sub-directories, be renamed or moved then links in the affected .html files must be updated accordingly.

docs

This folder contains the source code of the Delphi Tips website.

The site is developed and deployed using Jekyll. Builds are published via GitHub Pages.

Warning: The CNAME file in this directory should not be changed or removed: it ensure the micro-site is served as the tips sub-domain of delphidabbler.com.

extra

There are two open document format files in this directory.

  • One contains a large number of tips downloaded from the former Delphi Pool website.
  • The second contains tips collected online by "topellina".

There may be some duplication of tips between the PDF files. Further, some tips that appear in the docs/_tips directory may have been sourced, and later deleted, from these files.

delphi-tips's People

Contributors

delphidabbler avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

delphi-tips's Issues

D10.2.3

Screenshot - 22_06_2020 , 19_33_06

I compiled with D10.2.3
I loaded Tips.tps
I got on the left pan and the right pan TEXT OK.
I took one tip (press the green icon) got gibberish on the right pan

Restyle tips site

Now that the Delphi tips website is a sub-domain of delphidabbler.com it would be beneficial if the rather garish tips site was toned down and restyled to fit in with the main site better.

Re-integrate tips into delphidabbler.com

It would be useful if the whole tips database was to be moved back to DelphiDabbler.com - possibly in a tips.delphidabbler.com sub-domain.

The old PHP code could possibly be adapted and the project could database driven again.

This delphi-tips repo could be used to develop the code as a stand alone project that anyone could use and delphidabbler.com could simply import releases.

The existing Jekyll site would need to be completely rewritten to simply redirect to delphidabbler.com.

Add sitemap for SEO

Need to add a sitemap for the tips.delphidabbler.com sub-domain and register it with Google.

May also need authorisation files from Google and Bing.

Change any http: protocol references to https: where valid

There are URLs in the tips, either in the text or (possibly) in links, the reference the http: protocol.

Where the referenced sites support https: update the URL.

At the same time drop any "www." prefixes from delphidabbler website URLs.

Invalid source code in tip 210

The source code for Answer 1 in tip 210 has some missing code: probably the class declaration:

type
 

private
  procedure SetParent(AParent: TWinControl); override;
  procedure WMEraseBkGnd(Var Message: TWMEraseBkGnd); message WM_EraseBkGnd;
  ...

I'm guessing this should actually be:

type
   TTransparentPanel = class(TPanel)
  private
    procedure SetParent(AParent: TWinControl); override;
    procedure WMEraseBkGnd(Var Message: TWMEraseBkGnd); message WM_EraseBkGnd;
    ...

Maybe a good idea to add that missing code with a comment saying it's a guess!

Ansi text

On D10.2.3 I had problems when pressing TV to see the text file.
So I had to change a few places to ANSI
If you want my source get in touch or tell me where to send it?

Spurious characters in tip 199

The first paragraph of tip 199 ends in spurious characters as follows: course�

It appears that this could be an encoding issue.

Cater for, or remove, "offsite" CSS class

Several <a> links in docs\_tips have an offsite CSS class. This is not defined in SASS. Best to either remove the class from HTML or provide a suitable style for it in SASS.

Inhibit loading of favicons or provide them

At present Delphi tips web pages are attempting to load favicons and are logging 404 errors when they fail to find one.

There are two possible ways to resolve this problem.

Option 1: inhibit loading favicons

Adding the following line of HTML to docs/_includes/head.html will inhibit loading an external favico:

<link rel="icon" href="data:;base64,iVBORw0KGgo=">

Option 2: provide favicons

Create different size copies of the simpler version of the new DelphiDabbler logo:

dd-logo-1-512

The required sizes are 16x16, 32x32, 128x128, 180x180 and 192x192.

Name the files favicon-xx.png, where xx is the dimension of one side of the image. Place the image files in the /assets/img directory. Finally, add the following HTML to docs/_includes/head.html:

<link rel="icon" href="/assets/img/favicon-16.png" type="image/png" sizes="16x16">
<link rel="icon" href="/assets/img/favicon-32.png" type="image/png" sizes="32x32">
<link rel="icon" href="/assets/img/favicon-128.png" type="image/png" sizes="128x128">
<link rel="icon" href="/assets/img/favicon-180.png" type="image/png" sizes="180x180">
<link rel="icon" href="/assets/img/favicon-192.png" type="image/png" sizes="192x192">

Garbled question in tip 206

The last sentence in the question box of tip 206 is partially garbled:

I would like OnDrawCell to return the inner rectangle of the button look set the colors of the bevel so that they look like a button.

Redirect URLS in form `/<n>` to `/tips/<n>`

Using the URL tips.delphidabbler.com/<n> instead of tips.delphidabbler.com/tips/<n> is much friendlier. Is there any way to do this using the jekyll-redirect-from plugin?

Tip 106 is badly formatted

The tip uses bullet lists extensively. The lists look cramped, and any spacing there is breaks the logical grouping.

The lists need to be restyled.

Meaningless sentence in tip 192

Just before the penultimate code block in tip 192 the end of the following line makes no sense:

If reg is a TRegistry instance already with key open a

Replace with the following?

If reg is a TRegistry instance with an already open key then

Add tips examples from Assembla repo to this repo

There are a bunch of demos on Assembla.com at: https://app.assembla.com/spaces/delphi-doodlings/subversion/source/HEAD/trunk/TipDemos

These are in subdirectory of a SVN repo. Since there have been no updates to the subdirectory since it was created, there's no need to try to convert the repo to Git. Simply downloading and inserting into a new examples directory of this repo will suffice and no history will be lost.

Note: Any links to the Assembla repo within the tips should be updated to reference this Git repo when the transfer is complete.

Typo in note in tip 136

The Note box at the end of tip 136 should read:

If you want to change a font instead of text...

Fix nokogiri vulnerability per Dependabot alert

Dependabot has reported another nokogiri vulnerability, flagged as high severity.

Suggested remediation

Upgrade nokogiri to version 1.12.5 or later. For example:

gem "nokogiri", ">= 1.12.5"

Update sitemap

Sitemap could do with an update - not been touched for a long time.

Errors in question block of tip 222

Three errors:

  1. There is only one question so the question title should be just Question
  2. The sentence I want to build a combo box with this options. should be I want to build a combo box with THESE options.
  3. The Items property name should be italicised (using <var> tags?)

Add keywords and decent titles for SEO

The site uses pretty lousy titles and keywords.

This will be a big job though: there's a lot of tips to deal with!

Maybe add keywords & description to SQL?

Add search facility to site

There really should be some kind of search facility, with a search box on every page.

Since the site is static options are limited:

  1. Use Google (easiest)
  2. Use JavaScript in some way

A few typos in tip 216

There are a few (at least two) minor typos in tip 216.

It's going to be quicker to find them by reading the tip than listing them here.

A few minor typos in tip 160

There are several minor typos in tip 160.

It will be quicker to read the tip and find them rather than to list them here.

Typo etc. in tip 229

In 1st paragraph of tip 229 there's the following typo;

paste the fallowing 3 methods

There are also some other bits of the text that need some tweaking. Quicker to read the tip than explain.

Garbled question section in tip 112

In tip 112 the Question box begins like this:

Has anyone seen a with a checkbox...

Need to change to read:

Has anyone seen a group box with a checkbox...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.