@ThunderFrame MichKa was on Access team and sometimes adter that, worked on internationalization for Microsoft so I would not be surprised that he figured it out or had inside help
@Comintern pretty sure they are legal, just like in C
@IvenBach ok note so in response to my comments and I will stop whining. ;) just me, my belts, and my suspenders talking.
@MathieuGuindon so, we have been making lot more mistakes than Terrence and Sam? :p
sez very similar to C typedef, then goes to say it's augmented to allow for attribute decoration in IDL. Since we're dealing with IDL, the remarks regarding ACF can be ignored, I thinnk. I hope.
RE: why it mihgt not ork -- because not all typedefs are discovered via enumeration. You might need to first enumerate the members/parameters to find all typeinfos
I wouldn't re-instance it - the current collector already gets the non-typedef'd names, so it would basically just be string replacements at that point.
That might cause a bunch of unrelated issues though.
consider, if it references the lib B, then it. Has to have a method that uses it
so it benefits RD to know about them, even if the project doens't actually use it
BTW, I'm sure you can find an example of this w/ Access object library
it will return CurrentDb, which is a DAO.Database.. A different library
Ditto w/ CurrnetProject.Connection -> ADODB
it's more stark when doing interop - when you reference an Access object library, VS automatically adds DAO and ADODB reference whether you like it or not
But in the end @this @Comintern Ducksense (work in progress, right?) or was it Quacksense takes upon R# suggestions and makes RD suggestions smarter down the track regards snippets...
Wow, this is why I try to stay away from the VBA tag...
That's because you still have FileFormat:=xls. It has to be an XlFileFormat. If you have xls declared somewhere and it isn't a member of that enumeration, it's wrong. I think you mean FileFormat:=xlExcel8, but it's hard to tell which one you need. You have to pick one from the list. — Comintern29 secs ago
@PeterMTaylor I'm partial to Ducksense personally. ;-)
Woot!
Note the green hand-drawn circle as my compromise with @Phrancis.
@this A little of both. On that one, it's resolving as an alias, but is being renamed to LongPtr because it's an intrinsic VBA type. From the ComAlias ctor:
if (Name.Equals("LONG_PTR"))
{
TypeName = "LongPtr";
return;
}
...and in retrospect it should probably be TypeName = Tokens.LongPtr;
Wouldn't a HashSet<CodeInspectionSeverity> be a lot more efficient than multiple enumerations over and IEnumerable<CodeInspectionSeverity> in the lambda?
They are.2 diffenent implementation of hash functions
but really a hash function cna be anything
it only needs to be able to create an unique value given an input
@Comintern do we still benefit from a hashet even if we know all possible members? I always assumed that hash table is needed when you don't know all possible members in advance.
Do you use Excel @IvenBach. In particular the function VLookup that can match the supplied call to VLookup and return a property back to the caller. So I am able to find a matching pair elsewhere. Hashtable is similar in behaviour
@this I wish them luck with that. Permissive typing combined with regional settings and innumerable decisions on how to handle strings like "1E10". This will be a punishment for someone.
@PeterMTaylor Depends on the recordset implementation, mainly if you're using a cursor and the cursor type IIR.
@PeterMTaylor for a local recordset (e.g. adOpenStatic + adUseClient), I expect it to be a linked list. However, it's much more heavyweight than VBA.Collection because it provide simple sorting and filtering.
With a server-side recordset, I usually expect you to get a sorted list of keys to walk
To Collect or Hash
The VBA.Collection has a number of limitations, but it is enumerable and you can refer to items by index or key. But the VBA implementation of a Collection is 1-based, and they don't have any way of confirming membership, and the Item method returns a Variant, so they're loose...
NOTE: We are changing the date for ending OpenID support from August 15, 2018 to July 25, 2018. Notifications to the affected users are going out today and we will follow up with another round in two weeks.
Stack Overflow was an early and strong supporter of OpenID. We built our sign up/log ...
Howdy @SimonForsberg. A question for you if your checking on Duga tonight. If an issue contains a picture or png format on the first line. Could Duga be able post images into chat or I’m may be missing chat’s limitation regard images?
@IvenBach A hash function is just a function sending things to a defined range of values, e.g. x -> x mod N for fixed N is a hash function on integers, but not a very good one. A good hash function does this with next to no collisions, provided the target range is sufficiently large compared to range of inputs.
One example you have seen in action already is the one generating the git tags, which are just a hashes of your commits.
The idea of a hash table/set is that you use a hash function to dump your data into a large array indexed by the hashes of the data.
Since there are next to no collisions for a good hash function, when you try to add a value, the spot is next to never occupied already. So, you get inserts that are O(1) on average. Moreover, since the items you want to retrieve are almost always immediately at the hash, you also get O(1) average access time.
You actually also need a strategy for the rather unproblematisch case of a collision. There are basically two:
The first is to store linked lists of vales and just add to the list.
The other is to push the value to another spot determined the current insert position that is occupied already, e.g. by hashing that position with another hash function.
On lookup, you look at the value at the hash and then do an actual equality check. If it fails, you look at the next value according to your insert strategy.
Btw, if you only have a very small number of possible values, using a list is probably faster. Hash functions usually cost more than a few comparisons.
I always find it annoying that after clicking fixed font that button is selected and hitting enter just toggles the fixed font off and on instead of sending the message.
OK, Ok, ok... no need to pile on! I never said it was wrong, that's just the way I learned it, and The Way I've Always Done Itâ„¢, and now I need to get used to something different...
It's not like my code now resembles, in any way shape or form, the code I wrote before I discovered RD, this is just one more thing to change...
@this Wend is how you get your way through the foot traffic at the concert, BTW
I have a macro comprised of this and similar Subs. They work, but I feel like it's slowing it down. Two workbooks are open, and various ranges are copied from one that is hidden (wbSource) and pasted into the other (mainWB), which is not hidden. Is there a way to do this better?
Sub CopyData()
D...
@FreeMan normally, you'd loop backwards through a list to remove each item. Particularly if Remove 0, actually removes 0 and moves 1 into the 0 position.
@Comintern there was a commerical product I used to use. Let me see if I can remember it
@ThunderFrame That's frequently the case, and I always do so when removing rows in Excel. Is there any particular reason for doing so in this case? I suppose it might be a smidge faster removing the last item instead of moving them all up the list by 1...
I finally reinstalled Visual Studio 6, whittling it down to mandatory components, VB components and ActiveX controls. Installation froze, and killing it caused an error that said the installation had been unsuccessful, but VB6 starts, so I guess that's good enough, for now.
@mansellan My laptop has a 4K screen, but I run it at 200% scaling, so it looks like 1080p. When I load VB6 without Rubberduck enabled, the scaling is correct, but when I load VB6 with Rubberduck enabled (or I enable Rubberduck once VB6 is started), then the scaling adjusts as if it was 100%. That is, everything becomes really small.
I suspect it's got something to do with Rubberduck's use of WPF.
I have over 260k lines of data. This code is likely to take more than 30hrs to run. Would like help to speed this up. Or is there a way to use something else like PowerQuery to accomplish this? I am very new so please break it down clearly.
Some students may have multiple lines with the same sc...
@QuackExchange Is it acceptable to edit on CR for copy-paste formatting errors? I'm assuming that the line-wrapping of the comments without line continuations is not how it was coded.
@Comintern looks like the comments were added for descriptive purposes, just for the CR post. I doubt they're in the actual code. should be fine to edit, but I'd leave a comment about it to the OP, e.g. "I've edited the in-code comments so that the code can be copy-pasted into compilable code, but if these notes aren't in your actual code then it's best to just remove them and describe your code in actual text" or something
that said, it looks like the OP has posted-and-vanished
I guess the scaling issue with RD might be due to our Winforms containers. Usually, in WPF the style of a window/control should be inherited from the parent control unless overwritten, all the way down from the windows style.
I made sure that @Duga had an account at meta.stackexchange.com, which is where she logs in now, but during testing I was using my other bot - Greger - who, of course, did not have an account at meta.stackexchange.com
So then I thought that it didn't work while actually, it did work all the time.
While googling for the scaling issue, I found this: Troubleshooting Hybrid Applications which discusses WinForms/WPF issues including scaling, keyboard input, message loops and other issues.
@MathieuGuindon I think you could be right, as per these
That has a ring of familiarity to it. I'd always imagined it as more of a rendering or compositing service, but I'm not entirely sure how it's implemented.
As far as I can tell, there is no way to sort existing data in an unbound listbox in Access without storing off all the entries, manually sorting them, clearing the listbox, then adding all the entries back in the newly desired sort order.
I'm creating a report definition form. I have a table of available pages and a table that contains reports with a selection of pages and the order in which the pages are to be generated. I want to be able to add, rearrange & delete pages in the defined report, sort by page name, page description or page order, then save or cancel when I'm done.
select the existing records into the temp table, bind the listbox to the temp table, work with the bound table, then save the temp table to the permanent one or toss the contents as appropriate when you're done?
Or just use the temp table for sorting purposes...
(Except for the sorting issue, the code has done been slung...)
Every week I create two different reports from templates. From week to week the names of those reports change to include the week ending date. I have some VBA code to copy and paste values from one to the other. Rather than changing the file names in my code, I tried to utilize the workbook coden...
@MathieuGuindon I seem to be able to save a workbook with an altered codename for the sheet, an altered project name, and a reference to a macro-enabled workbook
"Utilize" the codename how? I've read this carefully three times now and can't figure out how you're intending to use it. Can you edit the question to include your code? — Comintern16 secs ago
@this I loaded up an Office 97 VM. I'd forgotten that Access didn't have a VBE in 97, it just opens a module window, and rejigs the menus and toolbars.