Welcome edit

Hello, Matroc, and Welcome to Wikipedia!

Please remember to sign your name on talk pages by clicking   or   or by typing four tildes (~~~~); this will automatically produce your username and the date. Also, please do your best to always fill in the edit summary field. Below are some useful links to facilitate your involvement. Happy editing! — Mr. Stradivarius ♪ talk ♪ 04:28, 8 June 2013 (UTC)Reply

Getting started
Finding your way around
Editing articles
Getting help
How you can help

Lua code snippets edit

For Loop a -z edit

local c = ""
for x = string.byte('a'), string.byte('z') do
    c = c .. string.char(x)                           -- 'a' to 'z
end 

Length of a String edit

test = "This is a string"
length = #test
or
length = test:len()

Combine tables together edit

   newtable = {}
   t1 = {"Alabama", "New York"}
   t2 = {"New Hampshire", "Vermont"}
   for k,v in ipairs(t1) do table.insert(newtable, v) end
   for k,v in ipairs(t2) do table.insert(newtable, v) end
   -- newtable now has both t1 and t2 --- can do this for multiple tables

Trim white space left edit

string = string:match'^%s*(.*)'

Trim white space right edit

string = string:match'^(.*%S)'

Trim both left and right edit

string = string:match'^%s*(.*%S)'

Is a table edit

if (type(var) == "table") then do table work else do non-table work end 

Pad to left of String edit

test = "Some String" char="." len=40
test =  test .. string.rep(char, len - #test)

Pad to right of String edit

test = "Some String" char ="." len = 40
test = string.rep(char, len - #test) .. test 

Chop to length edit

test = "This is a test"
test = test:sub(1,5)
  • can pad left or right to insure size is fixed
  • may wish to trim spaces off right and left as well

Reverse a String edit

test = "This is a test"
test = test:reverse()

Str left edit

test = "This is a test"
test = test:sub(1,count)
  • Have to make decision as in case of count being greater than the length of a string or empty string or nil

Str right edit

test = "This is a test"
test = test:sub(#test - count + 1, test:len())
--or
test = test:reverse()
test = test:sub(1,count)
test = test:reverse()
  • Have to make decision as in case of count being greater than the length of a string or empty string or nil

Str lower edit

test = "Yes"
test = test:lower()

Str upper edit

test = "Yes"
test = test:upper()

ESCAPE LUA SPECIAL CHARACTERS edit

ESC = mw.ustring.gsub(SOMESTRING, '[%-%.%+%[%]%(%)%$%^%%%?%*]','%%%1')

Sandbox TEST modules created on en.wikipedia edit

  1. These are some of the Lua Modules created in Sandbox for testing/learning

Get Wikidata id if article exists in Wikipedia edit

  • Battle of Hoke's Run Q1497885

Get DISPLAYTITLE edit

  • No Display Title
  • iCarly (season 6)

ArbCom Elections 2016: Voting now open! edit

Hello, Matroc. Voting in the 2016 Arbitration Committee elections is open from Monday, 00:00, 21 November through Sunday, 23:59, 4 December to all unblocked users who have registered an account before Wednesday, 00:00, 28 October 2016 and have made at least 150 mainspace edits before Sunday, 00:00, 1 November 2016.

The Arbitration Committee is the panel of editors responsible for conducting the Wikipedia arbitration process. It has the authority to impose binding solutions to disputes between editors, primarily for serious conduct disputes the community has been unable to resolve. This includes the authority to impose site bans, topic bans, editing restrictions, and other measures needed to maintain our editing environment. The arbitration policy describes the Committee's roles and responsibilities in greater detail.

If you wish to participate in the 2016 election, please review the candidates' statements and submit your choices on the voting page. MediaWiki message delivery (talk) 22:08, 21 November 2016 (UTC)Reply

Thanks edit

Thanks Matroc, my objective was to get all points and shapes from osm which are tagged with federal bank qid ... checked with Yurik . asif now it is not supported -- naveenpf (talk) 05:30, 5 October 2017 (UTC)Reply

ArbCom 2017 election voter message edit

Hello, Matroc. Voting in the 2017 Arbitration Committee elections is now open until 23.59 on Sunday, 10 December. All users who registered an account before Saturday, 28 October 2017, made at least 150 mainspace edits before Wednesday, 1 November 2017 and are not currently blocked are eligible to vote. Users with alternate accounts may only vote once.

The Arbitration Committee is the panel of editors responsible for conducting the Wikipedia arbitration process. It has the authority to impose binding solutions to disputes between editors, primarily for serious conduct disputes the community has been unable to resolve. This includes the authority to impose site bans, topic bans, editing restrictions, and other measures needed to maintain our editing environment. The arbitration policy describes the Committee's roles and responsibilities in greater detail.

If you wish to participate in the 2017 election, please review the candidates and submit your choices on the voting page. MediaWiki message delivery (talk) 18:42, 3 December 2017 (UTC)Reply

Protected Module Edit (Opinion?) edit

{{Roman|MMXVIII}}2018

Given your past editing of {{Roman}} I wonder if you could point me in the right direction to get some competent eyes on this and also what you might think of {{Roman}} converting both ways depending on input only.

Not sure of process for getting code (as opposed to encyclopedia content) reviewed; didn't even realize there was a [diff] web function until after posting a static diff onto talk page.

ASiplas (talk) 11:17, 20 February 2018 (UTC)Reply

  • ASiplas - I don't think or remember if I edited the Roman Template - I think that perhaps the only person that I can think of to assist you would possibly be Mr. Stradivarius -- Best wishes! Matroc (talk) 00:35, 21 February 2018 (UTC)Reply

ArbCom 2018 election voter message edit

Hello, Matroc. Voting in the 2018 Arbitration Committee elections is now open until 23.59 on Sunday, 3 December. All users who registered an account before Sunday, 28 October 2018, made at least 150 mainspace edits before Thursday, 1 November 2018 and are not currently blocked are eligible to vote. Users with alternate accounts may only vote once.

The Arbitration Committee is the panel of editors responsible for conducting the Wikipedia arbitration process. It has the authority to impose binding solutions to disputes between editors, primarily for serious conduct disputes the community has been unable to resolve. This includes the authority to impose site bans, topic bans, editing restrictions, and other measures needed to maintain our editing environment. The arbitration policy describes the Committee's roles and responsibilities in greater detail.

If you wish to participate in the 2018 election, please review the candidates and submit your choices on the voting page. MediaWiki message delivery (talk) 18:42, 19 November 2018 (UTC)Reply

ArbCom 2019 election voter message edit

 Hello! Voting in the 2019 Arbitration Committee elections is now open until 23:59 on Monday, 2 December 2019. All eligible users are allowed to vote. Users with alternate accounts may only vote once.

The Arbitration Committee is the panel of editors responsible for conducting the Wikipedia arbitration process. It has the authority to impose binding solutions to disputes between editors, primarily for serious conduct disputes the community has been unable to resolve. This includes the authority to impose site bans, topic bans, editing restrictions, and other measures needed to maintain our editing environment. The arbitration policy describes the Committee's roles and responsibilities in greater detail.

If you wish to participate in the 2019 election, please review the candidates and submit your choices on the voting page. If you no longer wish to receive these messages, you may add {{NoACEMM}} to your user talk page. MediaWiki message delivery (talk) 00:16, 19 November 2019 (UTC)Reply

ArbCom 2020 Elections voter message edit

 Hello! Voting in the 2020 Arbitration Committee elections is now open until 23:59 (UTC) on Monday, 7 December 2020. All eligible users are allowed to vote. Users with alternate accounts may only vote once.

The Arbitration Committee is the panel of editors responsible for conducting the Wikipedia arbitration process. It has the authority to impose binding solutions to disputes between editors, primarily for serious conduct disputes the community has been unable to resolve. This includes the authority to impose site bans, topic bans, editing restrictions, and other measures needed to maintain our editing environment. The arbitration policy describes the Committee's roles and responsibilities in greater detail.

If you wish to participate in the 2020 election, please review the candidates and submit your choices on the voting page. If you no longer wish to receive these messages, you may add {{NoACEMM}} to your user talk page. MediaWiki message delivery (talk) 02:34, 24 November 2020 (UTC)Reply