Google Groups จะไม่รองรับโพสต์หรือการสมัครสมาชิก Usenet ใหม่อีกต่อไป โดยคุณจะยังคงดูเนื้อหาเดิมได้อยู่

reCAPTCHA needs to be updated

ยอดดู 115 ครั้ง
ข้ามไปที่ข้อความที่ยังไม่อ่านรายการแรก

Cecil Westerhof

ยังไม่อ่าน,
27 พ.ค. 2561 09:44:0527/5/61
ถึง
I wanted to add a page to the WiKi, but I get:
reCAPTCHA V1 ID SHUTDOWN
Direct site owners to g.co/recaptcha/upgrade

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Cecil Westerhof

ยังไม่อ่าน,
28 พ.ค. 2561 03:28:0528/5/61
ถึง
Cecil Westerhof <Ce...@decebal.nl> writes:

> I wanted to add a page to the WiKi, but I get:
> reCAPTCHA V1 ID SHUTDOWN
> Direct site owners to g.co/recaptcha/upgrade

I do not get this message anymore. But when clicking the button:
create new page

I just keep going back to the page to create a new page. So I still
cannot create a new page. :'-(

stevel

ยังไม่อ่าน,
28 พ.ค. 2561 05:28:1328/5/61
ถึง
On Monday, 28 May 2018 15:28:05 UTC+8, Cecil Westerhof wrote:
>
> > I wanted to add a page to the WiKi, but I get:
> > reCAPTCHA V1 ID SHUTDOWN
> > Direct site owners to g.co/recaptcha/upgrade
>
> I do not get this message anymore. But when clicking the button:
> create new page
>
> I just keep going back to the page to create a new page. So I still
> cannot create a new page. :'-(

try again please

--Steve

Cecil Westerhof

ยังไม่อ่าน,
28 พ.ค. 2561 07:44:0528/5/61
ถึง
It worked:
http://wiki.tcl.tk/55240

Rich

ยังไม่อ่าน,
28 พ.ค. 2561 08:26:0128/5/61
ถึง
Cecil Westerhof <Ce...@decebal.nl> wrote:
> stevel <steve...@gmail.com> writes:
>
>> On Monday, 28 May 2018 15:28:05 UTC+8, Cecil Westerhof wrote:
>>>
>>> > I wanted to add a page to the WiKi, but I get:
>>> > reCAPTCHA V1 ID SHUTDOWN
>>> > Direct site owners to g.co/recaptcha/upgrade
>>>
>>> I do not get this message anymore. But when clicking the button:
>>> create new page
>>>
>>> I just keep going back to the page to create a new page. So I still
>>> cannot create a new page. :'-(
>>
>> try again please
>
> It worked:
> http://wiki.tcl.tk/55240
>

Small tip, foreach can iterate plural variables across a single list.
Your:

foreach {fizzBuzz} ${fizzBuzzLst} {
lassign ${fizzBuzz} value string

could be:

foreach {value string} $fizzBuzzLst} {

Also, for handling CLI arguments, you might want to look into Tcllib's
"cmdline" tool. In this case, since you are using positionals it does
not buy much. But with it you could have:

FizzBuzz --start 15 --end 25

if you wanted.

Cecil Westerhof

ยังไม่อ่าน,
28 พ.ค. 2561 09:14:0428/5/61
ถึง
Rich <ri...@example.invalid> writes:

> Cecil Westerhof <Ce...@decebal.nl> wrote:
>> stevel <steve...@gmail.com> writes:
>>
>>> On Monday, 28 May 2018 15:28:05 UTC+8, Cecil Westerhof wrote:
>>>>
>>>> > I wanted to add a page to the WiKi, but I get:
>>>> > reCAPTCHA V1 ID SHUTDOWN
>>>> > Direct site owners to g.co/recaptcha/upgrade
>>>>
>>>> I do not get this message anymore. But when clicking the button:
>>>> create new page
>>>>
>>>> I just keep going back to the page to create a new page. So I still
>>>> cannot create a new page. :'-(
>>>
>>> try again please
>>
>> It worked:
>> http://wiki.tcl.tk/55240
>>
>
> Small tip, foreach can iterate plural variables across a single list.
> Your:
>
> foreach {fizzBuzz} ${fizzBuzzLst} {
> lassign ${fizzBuzz} value string
>
> could be:
>
> foreach {value string} $fizzBuzzLst} {

I will change that.


> Also, for handling CLI arguments, you might want to look into Tcllib's
> "cmdline" tool. In this case, since you are using positionals it does
> not buy much. But with it you could have:
>
> FizzBuzz --start 15 --end 25
>
> if you wanted.

My idea is that most of the time you only change the end, so this is
simpler to use. The code is also simpler, but I will think about it.

Christian Gollwitzer

ยังไม่อ่าน,
28 พ.ค. 2561 14:14:0128/5/61
ถึง
Am 28.05.18 um 14:25 schrieb Rich:
> Small tip, foreach can iterate plural variables across a single list.
> Your:
>
> foreach {fizzBuzz} ${fizzBuzzLst} {
> lassign ${fizzBuzz} value string
>
> could be:
>
> foreach {value string} $fizzBuzzLst} {

That's not the same. The first loop iterates over lists of pairs,
whereas the second iterates over flat lists.

set fstlist {{a 1} {b 2} {c 3}}
set sndlist {a 1 b 2 c 3}

These would yield identical value/string pairs if used by the first and
second loop, respectively.

Christian

Rich

ยังไม่อ่าน,
28 พ.ค. 2561 22:36:3428/5/61
ถึง
Cecil Westerhof <Ce...@decebal.nl> wrote:
> Rich <ri...@example.invalid> writes:
>> Also, for handling CLI arguments, you might want to look into
>> Tcllib's "cmdline" tool. In this case, since you are using
>> positionals it does not buy much. But with it you could have:
>>
>> FizzBuzz --start 15 --end 25
>>
>> if you wanted.
>
> My idea is that most of the time you only change the end, so this is
> simpler to use. The code is also simpler, but I will think about it.

For this particular app, cmdline may just be overkill. But when you do
get to that app one day that takes several CLI switches/parameters,
remembering that cmdline exists in Tcllib might be worthwhile.

Rich

ยังไม่อ่าน,
28 พ.ค. 2561 22:37:2428/5/61
ถึง
Good point, I missed that in looking over the code.

Cecil Westerhof

ยังไม่อ่าน,
29 พ.ค. 2561 03:59:0629/5/61
ถึง
I found it out the hard way. ;-)

Normally I would find the list of lists ways better, but in this case
the data is so simple I went for the one list.
By going for:
set fizzBuzzLst {
3 "Fizz"
5 "Buzz"
}

I think the chance for errors is not high.

heinrichmartin

ยังไม่อ่าน,
29 พ.ค. 2561 04:26:2629/5/61
ถึง
On Tuesday, May 29, 2018 at 9:59:06 AM UTC+2, Cecil Westerhof wrote:
> I found it out the hard way. ;-)
>
> Normally I would find the list of lists ways better, but in this case
> the data is so simple I went for the one list.
> By going for:
> set fizzBuzzLst {
> 3 "Fizz"
> 5 "Buzz"
> }

Let me add two remarks:
* fizzBuzzLst is also a dict
* [concat {*}$listOfLists] does the conversion

Cecil Westerhof

ยังไม่อ่าน,
29 พ.ค. 2561 06:59:0529/5/61
ถึง
Thanks: with this I could improve the code.

I changed:
set fizzBuzzLst {
3 "Fizz"
5 "Buzz"
}
to:
set fizzBuzzLst [dict create 3 Fizz 5 Buzz]

And:
foreach {value string} ${fizzBuzzLst} {
to:
dict for {value string} ${fizzBuzzLst} {


I like tcl a bit more again. ;-)

I will update the page later.

Rich

ยังไม่อ่าน,
29 พ.ค. 2561 07:43:4629/5/61
ถึง
If you do that, and if "Lst" is meant to be "List" then you might
change the varname to "Dct" (fizzBuzzDct) for "dictionary".

Cecil Westerhof

ยังไม่อ่าน,
29 พ.ค. 2561 08:14:0529/5/61
ถึง
You are completely right. I will change that also.

Or I could even drop it. I originally used fizzBuzzLst because I
dissected it into fizzBuzz, but since I do not have that anymore …

Rich

ยังไม่อ่าน,
29 พ.ค. 2561 12:31:1529/5/61
ถึง
> dissected it into fizzBuzz, but since I do not have that anymore ?

Dropping the hungarian notation is also an option.
ข้อความใหม่ 0 รายการ