The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,099 other followers

Archive for July, 2020

Bogus W1036 ? 

Posted by jpluimers on 2020/07/30

Reminder to self for checking if this still fails:

[WayBack] Bogus W1036 ? Documentation: … “If you do not explicitly initialize a global variab… – Stefan Glienke – Google+

Documentation: http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Variables_(Delphi)

“If you do not explicitly initialize a global variable, the compiler initializes it to 0.”

{$APPTYPE CONSOLE}

var
  i: Integer;
begin
  Writeln(i);
end.

Error:

[DCC Warning] Project1.dpr(6): W1036 Variable 'i' might not have been initialized

–jeroen

Posted in Delphi, Development, Software Development | 2 Comments »

Searching github commits

Posted by jpluimers on 2020/07/29

Finding the github commit search page was not obvious to me as the main page only allows searching for repositories, and commit pages insides repositories do not have a search box:

Luckily there are two search pages that can search issues:

You can get to both by stumbling on [WayBack] About searching on GitHub – User Documentation, then clicking “Search using a visual interface”

The first search page has built-in help which I have included below, though not explaining how to search for commits which are in [WayBack] Searching commits – User Documentation, and certainly does not tell you need to add type=commitsto the search box.

Actually, there is no “visual interface” for commit search: it is a question of assembling the search URL by hand, though this trick helps a lot:

  1. Use GitHub · Where software is built: Advanced Search to make a similar search for a repository:
    • define repository
    • define phrase
    • define date range
  2. Adopt the URL with key/value information from Searching commits – User Documentation
  3. Remember a base search inside a repository is like https://github.com/search?utf8=%E2%9C%93&q=repo:jpluimers%2FGExperts+search&type=commits which searches
    • repository jpluimers/GExperts
    • phrase search
    • type=commits

This is how I got

Back to the basic search

Search cheat sheet

GitHub’s search supports a variety of different operations. Here’s a quick cheat sheet for some of the common searches.

For more information, visit our search help section.

Basic search

This search Finds repositories with…
cat stars:>100 Find cat repositories with greater than 100 stars.
user:defunkt Get all repositories from the user defunkt.
tom location:”San Francisco, CA” Find all tom users in “San Francisco, CA”.
join extension:coffee Find all instances of join in code with coffee extension.
NOT cat Excludes all results containing cat.

Repository search

Repository search looks through the projects you have access to on GitHub. You can also filter the results:

This search Finds repositories with…
cat stars:>100 Find cat repositories with greater than 100 stars.
user:defunkt Get all repositories from the user defunkt.
pugs pushed:>2013-01-28 Pugs repositories pushed to since Jan 28, 2013.
node.js forks:<200 Find all node.js repositories with less than 200 forks.
jquery size:1024..4089 Find jquery repositories between the sizes 1024 and 4089 kB.
gitx fork:true Repository search includes forks of gitx.
gitx fork:only Repository search returns only forks of gitx.

Code search

Code search looks through the files hosted on GitHub. You can also filter the results:

This search Finds repositories with…
install repo:charles/privaterepo Find all instances of install in code from the repository charles/privaterepo.
shogun user:heroku Find references to shogun from all public heroku repositories.
join extension:coffee Find all instances of join in code with coffee extension.
system size:>1000 Find all instances of system in code of file size greater than 1000kbs.
examples path:/docs/ Find all examples in the path /docs/.
replace fork:true Search replace in the source code of forks.

Issue search

Issue search looks through issues and pull requests on GitHub. You can also filter the results:

This search Finds issues…
encoding user:heroku Encoding issues across the Heroku organization.
cat is:open Find cat issues that are open.
strange comments:>42 Issues with more than 42 comments.
hard label:bug Hard issues labeled as a bug.
author:mojombo All issues authored by mojombo.
mentions:tpope All issues mentioning tpope.
assignee:rtomayko All issues assigned to rtomayko.
exception created:>2012-12-31 Created since the beginning of 2013.
exception updated:<2013-01-01 Last updated before 2013.

User search

User search finds users with an account on GitHub. You can also filter the results:

This search Finds repositories with…
fullname:”Linus Torvalds” Find users with the full name “Linus Torvalds”.
tom location:”San Francisco, CA” Find all tom users in “San Francisco, CA”.
chris followers:100..200 Find all chris users with followers between 100 and 200.
ryan repos:>10 Find all ryan users with more than 10 repositories.

Then the commit search

Search within commit messages

You can find commits that contain particular words in the message. For example, fix typo matches commits containing the words “fix” and “typo.”

Search by author or committer

You can find commits by a particular user with the author or committer qualifiers.

Qualifier Example
author:USERNAME author:defunkt matches commits authored by @defunkt.
committer:USERNAME committer:defunkt matches commits committed by @defunkt.

The author-name and committer-name qualifiers match commits by the name of the author or committer.

Qualifier Example
author-name:NAME author-name:wanstrath matches commits with “wanstrath” in the author name.
committer-name:NAME committer-name:wanstrath matches commits with “wanstrath” in the committer name.

The author-email and committer-email qualifiers match commits by the author’s or committer’s full email address.

Qualifier Example
author-email:EMAIL author-email:chris@github.com matches commits authored by chris@github.com.
committer-email:EMAIL committer-email:chris@github.com matches commits committed by chris@github.com.

Search by authored or committed date

Use the author-date and committer-date qualifiers to match commits authored or committed within the specified date range.

Dates support greater than, less than, and range qualifiers.

Qualifier Example
author-date:YYYY-MM-DD author-date:<2016-01-01 matches commits authored before 2016-01-01.
committer-date:YYYY-MM-DD committer-date:>2016-01-01 matches commits committed after 2016-01-01.

Filter merge commits

The merge qualifier filters merge commits.

Qualifier Example
merge:true merge:true matches merge commits.
merge:false merge:false matches non-merge commits.

Search by hash

The hash qualifier matches commits with the specified SHA-1 hash.

Qualifier Example
hash:HASH hash:124a9a0ee1d8f1e15e833aff432fbb3b02632105 matches commits with the hash 124a9a0ee1d8f1e15e833aff432fbb3b02632105.

Search by parent

The parent qualifier matches commits whose parent has the specified SHA-1 hash.

Qualifier Example
parent:HASH parent:124a9a0ee1d8f1e15e833aff432fbb3b02632105 matches children of commits with the hash 124a9a0ee1d8f1e15e833aff432fbb3b02632105.

Search by tree

The tree qualifier matches commits with the specified SHA-1 git tree hash.

Qualifier Example
tree:HASH tree:99ca967 matches commits that refer to the tree hash 99ca967.

Search within a user’s or organization’s repositories

To search commits in all repositories owned by a certain user or organization, use the user or orgqualifier. To search commits in a specific repository, use the repo qualifier.

Qualifier Example
user:USERNAME gibberish user:defunkt matches commit messages with the word “gibberish” in repositories owned by @defunkt.
org:ORGNAME test org:github matches commit messages with the word “test” in repositories owned by @github.
repo:USERNAME/REPO language repo:defunkt/gibberish matches commit messages with the word “language” in @defunkt’s “gibberish” repository.

Filter public or private repositories

The is qualifier matches public or private commits.

Qualifier Example
is:public is:public matches public commits.
is:private is:private matches private commits.

Further reading

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, GitHub, LifeHacker, Power User, Software Development, Source Code Management | Leave a Comment »

UAC elevation steps

Posted by jpluimers on 2020/07/29

Just in case I need to explain this to someone, as it has been a long time ago I did this: [WayBack] windows – Is there a single UAC binary? – Super User.

Via: [WayBack] Jeroen Wiert Pluimers: Is there a UAC binary? – Google+

Most important reference: [WayBack] How User Account Control Works | Microsoft Docs

  1. Logon:
  2. Elevation steps: decision tree in the various pieces:
  3. Elevation confirmation via consent.exe
  4. Consent example prompt:

 

–jeroen

Posted in Development, Power User, Security, Software Development, Windows, Windows Development | Leave a Comment »

On my research list: “git merge –no-ff”

Posted by jpluimers on 2020/07/29

I need to put some time in understanding git merge --no-ff.

Some links to get started:

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management | Leave a Comment »

Using LEDs as mains indicator lights on 120V and 230V (live demos) – YouTube

Posted by jpluimers on 2020/07/28

I love the “bigclive” YouToube channel: it is full of neat ideas, and wise tips on disassembled electrical gadgets. Most of his videos involve soldering or/and making schematics of the things he tears apart or builds.

This one is on Using LEDS as mains indicator lights on 120V and 230V (live demos):

Modern LEDs are bright enough at low current to use as directly mains powered indicators with minimal circuitry. The slight downside is that with a simple resistor circuit the vast majority of the power gets wasted as heat. But the current is so low anyway that it doesn’t really matter. Here are some simple ways to drive LEDs from 110V to 240V with minimal circuitry. I tend to recommend running resistors at around half their rating at worst as it means they will last a long time and not discolour too much with age.

His [WayBack] bigclive.com web-site is very small and shows some of his projects.

You can follow him on either youTube or on the the BigCliveDotCom reddit channel.

–jeroen

Read the rest of this entry »

Posted in Development, Hardware Development | Leave a Comment »

 
%d bloggers like this: