Re: Many years ago

2023-12-07 Thread Alan Ingleby via ozdotnet
bsky-social-vqjpx-ripzb
bsky-social-3g3ga-riozy
bsky-social-jctra-bhn5j


On Fri, 8 Dec 2023 at 07:07, mike smith via ozdotnet 
wrote:

> Some more
>
>
>
> On Mon, Nov 6, 2023, 18:54 mike smith  wrote:
>
>> We'd post invite codes for Gmail, when it was beta and invite only.
>>
>> Here's some bsky invite codes, 3, if it doesn't work its been used
>>
>> Mike
>>
> --
> ozdotnet mailing list
> To manage your subscription, access archives: https://codify.mailman3.com/



-- 
Alan Ingleby
-- 
ozdotnet mailing list 
To manage your subscription, access archives: https://codify.mailman3.com/ 

Re: VS2022 format all files

2023-04-11 Thread Alan Ingleby
There's also a command line tool called dotnet-format which may do part of
what you are looking for.  https://github.com/dotnet/format

Apparently quite extensible.

On Wed, 12 Apr 2023 at 11:18, Greg Keogh via ozdotnet 
wrote:

> Resharper?
>>
>
> I accidentally used it for one day back in about 2010 and it was a
> constant battle of keystrokes and interruptions that drove me bonkers and
> I'm glad I've never seen it again. I thought Reshaper was basically
> redundant now that recent VS releases have incorporated most of its
> original features (vague gossip I've heard). In any case, even if it does
> have the global formatting that I desire, I don't want to buy it or install
> it --
> *Greg K*
> --
> ozdotnet mailing list
> To manage your subscription, access archives: https://codify.mailman3.com/



-- 
Alan Ingleby


Re: VS2022 format all files

2023-04-11 Thread Alan Ingleby
Resharper?

On Wed, 12 Apr 2023 at 11:04, Greg Keogh via ozdotnet 
wrote:

> Folks, is there a way to apply commands like *Format Document* and *Remove
> and Sort Usings* to multiple C# files, perhaps all open files or all
> files in the project?
>
> Web searches suggest it's not possible at the moment. I see an Extension
> for this which looks a bit flakey and I won't try it yet.
>
> Taking this even further, I occasionally need to "beautify" C# code in
> hundreds of files in projects to fix things like indentation, tabs, usings
> and more fiddly things like removing excess blank lines, putting gaps
> between methods, etc. That is, I want to bring code that is sometimes
> haphazardly formatted back to a vanilla format acceptable to typical
> developers.
>
> Cheers,
> *Greg Keogh*
> --
> ozdotnet mailing list
> To manage your subscription, access archives: https://codify.mailman3.com/



-- 
Alan Ingleby


Re: [OT] Finding duplicate rows in Sql Server

2022-11-16 Thread Alan Ingleby
If the ID is unique across all records,

SELECT * FROM  WHERE ID NOT IN (SELECT MAX(ID) FROM
GROUP BY NAme,Desc,Date,Etc)

On Thu, 17 Nov 2022 at 16:02, Tom P via ozdotnet 
wrote:

> Apologies if this is basic for probably most of you but I just can't get
> my head around it.
>
> I have a flat table in sql server which contains lots of duplicates,
> differing only by one column.
>
> Id,Name,Desc,Date,Etc
> 1,abc,abc abc,2022-11-17,a
> 2,abc,abc abc,2022-11-17,a
> 5,def,def def,2022-11-17,a
> 4,abc,abc abc,2022-11-17,a
> 3,def,def def,2022-11-17,a
> 6,xyz,def def,2022-11-17,a
>
> I'm trying to write a query that finds all duplicates *excluding the ones
> with the highest Id*. So for the above example it would return the
> following:
>
> Id,Name,Desc,Date,Etc
> 1,abc,abc abc,2022-11-17,a
> 2,abc,abc abc,2022-11-17,a
> 3,def,def def,2022-11-17,a
>
> There are many millions of rows to process so looking for something
> efficient. Any advice would be appreciated.
>
> Regards
> Tom
>
> --
> ozdotnet mailing list
> To manage your subscription, access archives: https://codify.mailman3.com/



-- 
Alan Ingleby


Re: [OT] UHF Check

2021-03-21 Thread Alan Ingleby
Working for me.?

On Mon, 22 Mar 2021 at 13:24, kirsten greed  wrote:

> I see this but not the last 3
>
> On Mon, Mar 22, 2021 at 2:19 PM Greg Keogh  wrote:
>
>> My last 3 posts to this group bounced, and I notified David at Codify,
>> but received no reply. Is the group active? -- *Greg Keogh*
>>
>

-- 
Alan Ingleby


Re:

2019-12-18 Thread Alan Ingleby
I guess the key requirement here is "I'm about to write this string to a
log file, is there a chance there's a credit card number in here?".  All
other things considered, this is reasonably good safeguard.  I'd imaging if
the quick and dirty regex I listed picks anything up, you could do a
further mod10 to validate against valid credit card numbers etc.

All seems a bit iffy though doesn't it.  If a CC # has gotten its way to a
log file, you really need to question your developers.

On Wed, 18 Dec 2019 at 23:11, Grant Maw  wrote:

> I thought all credit cards use the Mod10 (Kuhn) algorithm. I seem to
> remember it being a safeguard against data entry errors back in the day,
> so this is possibly a hangover from those days.
>
> We never validate card numbers.  We pass the card data to the processing
> gateway and let their APIs handle all that stuff. Less code for us to
> maintain.
>
> On Wed, 18 Dec. 2019, 3:33 pm Preet Sangha,  wrote:
>
>> Hi Ed,
>>
>> Thanks for that. We are an large enterprise platform doing thousands of
>> transactions via gateways - CC info is normally flowing through our code
>> except in the most secure of ways - we are PCI compliant. However to be
>> extra careful I'm trying to remove anything that looks like a known CC
>> shape from logging. It's to prevent issues in case someone inadvertently
>> stores CC in fields that they shouldn't. Yes there education but sometimes
>> mistakes happen.
>>
>> regards,
>> Preet, in Auckland NZ
>>
>>
>>
>> On Wed, 18 Dec 2019 at 16:57,  wrote:
>>
>>> Hi Preet,
>>>
>>>
>>>
>>> I don’t know of any libraries that handle this, but I do have a question
>>> for you.
>>>
>>>
>>>
>>> Why are you validating credit card info?
>>>
>>>
>>>
>>> I ask this because if you are validating card info then you are
>>> handling/processing card info. Any business handling credit card
>>> information should have PCI-DSS compliance.
>>>
>>>
>>>
>>> Personally, I find it is much easier to use external providers (eway,
>>> paypal et al) to handle the whole payment process, meaning your code never
>>> needs to touch a credit card number and you never have to worry about
>>> compliance, *security etc.
>>>
>>>
>>>
>>> Just a another random thought, YMMV.
>>>
>>>
>>>
>>> *Security of the card information
>>>
>>>
>>>
>>> Ed.
>>>
>>>
>>>
>>> *From:* ozdotnet-boun...@ozdotnet.com  *On
>>> Behalf Of *Preet Sangha
>>> *Sent:* Wednesday, 18 December 2019 2:41 PM
>>> *To:* ozDotNet 
>>> *Subject:*
>>>
>>>
>>>
>>> Would anyone know of any credit card validation/detection or similar
>>> libraries that we may be able incorporate into our .net framework code
>>> (preferably in nuget form) in order to eliminate our own hand coded regexs
>>>  please?
>>>
>>>
>>>
>>> Regards Preet
>>>
>>>
>>>
>>

-- 
Alan Ingleby


Re:

2019-12-17 Thread Alan Ingleby
https://www.regextester.com/106873

Still using Regex, but so simple.

On Wed, 18 Dec 2019 at 15:56, mike smith  wrote:

> There's the odd number/arrangement that amex uses to check for as well
>
> On Wed, Dec 18, 2019, 16:14 Eddie de Bear  wrote:
>
>> Hi Preet,
>>
>> I always check when somebody mentions credit card processing..
>>
>> Anyways, off the top of my head I don't know of any component that can
>> easily identify credit card info. I suspect your in for a world of pain
>> using Regex to identify potential card numbers and then a Luhn check to see
>> if it is actually a valid card number.
>>
>> From my bookmarks:
>> https://en.wikipedia.org/wiki/Luhn_algorithm
>>
>> https://stackoverflow.com/questions/21249670/implementing-luhn-algorithm-using-c-sharp
>>
>> Might be helpful..
>>
>> Ed.
>>
>> On Wed, Dec 18, 2019 at 4:33 PM Preet Sangha 
>> wrote:
>>
>>> Hi Ed,
>>>
>>> Thanks for that. We are an large enterprise platform doing thousands of
>>> transactions via gateways - CC info is normally flowing through our code
>>> except in the most secure of ways - we are PCI compliant. However to be
>>> extra careful I'm trying to remove anything that looks like a known CC
>>> shape from logging. It's to prevent issues in case someone inadvertently
>>> stores CC in fields that they shouldn't. Yes there education but sometimes
>>> mistakes happen.
>>>
>>> regards,
>>> Preet, in Auckland NZ
>>>
>>>
>>>
>>> On Wed, 18 Dec 2019 at 16:57,  wrote:
>>>
>>>> Hi Preet,
>>>>
>>>>
>>>>
>>>> I don’t know of any libraries that handle this, but I do have a
>>>> question for you.
>>>>
>>>>
>>>>
>>>> Why are you validating credit card info?
>>>>
>>>>
>>>>
>>>> I ask this because if you are validating card info then you are
>>>> handling/processing card info. Any business handling credit card
>>>> information should have PCI-DSS compliance.
>>>>
>>>>
>>>>
>>>> Personally, I find it is much easier to use external providers (eway,
>>>> paypal et al) to handle the whole payment process, meaning your code never
>>>> needs to touch a credit card number and you never have to worry about
>>>> compliance, *security etc.
>>>>
>>>>
>>>>
>>>> Just a another random thought, YMMV.
>>>>
>>>>
>>>>
>>>> *Security of the card information
>>>>
>>>>
>>>>
>>>> Ed.
>>>>
>>>>
>>>>
>>>> *From:* ozdotnet-boun...@ozdotnet.com  *On
>>>> Behalf Of *Preet Sangha
>>>> *Sent:* Wednesday, 18 December 2019 2:41 PM
>>>> *To:* ozDotNet 
>>>> *Subject:*
>>>>
>>>>
>>>>
>>>> Would anyone know of any credit card validation/detection or similar
>>>> libraries that we may be able incorporate into our .net framework code
>>>> (preferably in nuget form) in order to eliminate our own hand coded regexs
>>>>  please?
>>>>
>>>>
>>>>
>>>> Regards Preet
>>>>
>>>>
>>>>
>>>
>>
>> --
>> *EDDIE DE BEAR*
>> Mob: 0417066315
>> Messenger: eddie_deb...@hotmail.com
>> Skype: eddiedebear
>>
>

-- 
Alan Ingleby


Re: High-performance string reading and parsing

2019-12-10 Thread Alan Ingleby
What if you do parallel, but on batches of
/Environment.ProcessorCount lines per thread?

On Wed, 11 Dec 2019 at 15:32, Greg Keogh  wrote:

> Folks, I just went through an performance comparison exercise and I
> thought a summary of the results might be of interest here. A colleague is
> converting some C++ code to C# to see if it's possible to maintain the
> legacy high performance while enjoying the benefits of the managed world.
> The core code reads from 1 to 15 text files line-by-line and parses the
> contents of the lines which may look like these samples:
>
> 83;61;58;18;42;96;24;15;42;39
> a1b1*0.333a2b1*0.333a3b1
> a3b1*826;2*93;3*101a19b1*526;2*557;3*518
>
> The input files often contain up to 1 million lines. Each parsed number is
> used to update a cell in a large matrix that is typically hundreds wide or
> high, but might be tens of thousands wide. So you can see that this is
> mainly a CPU and memory intensive task. We know that most of the time is
> taken in the tight loop parsing of millions of numbers out of the input
> lines. I wrote a test harness that simulated the processing in C# and
> discovered the following:
>
>- Release or Debug build made little difference.
>- Using compiled Regex slows by a factor of 5.
>- Using string Split slows by a factor of about 3.
>- Using Parallel.ForEach slows things slightly.
>- Using an unmanaged buffer with unsafe unchecked pointers slows
>things slightly.
>- The fastest way to parse the lines is with an index loop over the
>chars in the line string.
>
> In a normal business app you would of course use Regex or string methods
> for parsing because it's clear and maintainable, but in this case where
> every millisecond counts I found that any FCL usage would blow-out the time
> and only a for-loop was viable.
>
> Parallelism is probably useless in this case because the processing on
> each worker thread is just a blink, meaning the threading burden was
> heavier than the processing it carried.
>
> So it turns out that an old-fashioned C-style for-loop to manually parse
> the lines is the fastest by a long-shot. It's fragile of course, but my
> colleague has translated the old well-tested C++ code directly over to C#
> (it's rather ugly). This whole scenario is rather unusual and not very
> applicable to LOB apps, but I thought it was worth posting anyway.
>
> Cheers,
> *Greg Keogh*
>
> [image: image.png]
>
> Regex.Match(es)
> Regex.Match(es) with Parallel Processing (PPL)
> String Split
> String Split with PPL
> For-loop
> For-loop with PPL
> Plain file reads with no parsing (lowest baseline)
>


-- 
Alan Ingleby


Re: NUC

2019-05-08 Thread Alan Ingleby
I used an older i7/16G Ram/256SSD model as a dev machine for a little
while.  Nice little unit, but it really did not handle the occasional
evening Minecraft session well enough for me. ;)

On Thu, 9 May 2019 at 12:53, Grant Maw  wrote:

> It's time for a new dev PC. Someone drew my attention to Intel's NUC
> recently, and was wondering if anyone had any positive or negative
> experiences with these?
>
>
> https://www.intel.com/content/www/us/en/products/docs/boards-kits/nuc/mini-pcs/business.html
>
> Thanks
>


-- 
Alan Ingleby


Re: Slightly off topic - Pros and con of moving to an Apple machine

2019-03-15 Thread Alan Ingleby
Get top spec Macbook and set up bootcamp.  Best of both worlds!

On Sat, 16 Mar 2019 at 09:28, Preet Sangha  wrote:

> I am starting with a new role in a few weeks and I've been asked the
> question if want a windows or apple laptop. I do .net development but it's
> all still framework not core. but we're moving in that direction. I'm
> thinking of using this opportunity to finally start working on a 'unixy'
> machine for the first time in my career.
>
> Would it be a major PITA working on MacOS for framework development?
>
> regards,
> Preet, in Auckland NZ
>
>

-- 
Alan Ingleby


Re: Legacy Asp.net application change from 32bit to 64bit

2019-02-18 Thread Alan Ingleby
Also consider any ODBC calls to databases for which there are only 32 bit
drivers.  I've had this problem with MYOB drivers for example.

On Tue, 19 Feb 2019 at 13:42, Greg Keogh  wrote:

>
> Just doing it would require full regression testing, would it not?
>> I don’t suppose there is a simple way to check if any non compliant old
>> DLLs are used?
>>
>
> Okay, too big to easily test. If it was mine, I suppose I'd first run
> searches for [DllImport] attributes and similar things in the
> System.Runtime namespace. Then I'd look through the project references and
> the bin folder and try to identify anything unusual --* GK*
>
>>

-- 
Alan Ingleby