Suppression not working for overridden Methods

From<EMAIL_ADDRESS>on January 25, 2012 13:11:48
Suppression doesn't work if the method that should be suppressed is overridden.
Example class structure:
class A {
public void dontCallMe(Object someParameter) {...}
...
}
}
public final class B extends A {
@Override
public void dontCallMe(Object someParameter) {...}
...
}
}
I try suppressing dontCallMe using "suppress(method(B.class, "someMethod", Object.class))". This results in the following exception given below.
Workaround: suppress all methods with the same signature ("suppress(method(B.class, Object.class));").
Several matching methods found, please specify the argument parameter types so that PowerMock can determine which method you're referring to.
Matching methods in class B were:
void dontCallMe( java.lang.Object.class )
void dontCallMe( java.lang.Object.class )
at org.powermock.reflect.internal.WhiteboxImpl.throwExceptionWhenMultipleMethodMatchesFound(WhiteboxImpl.java:1821)
at org.powermock.reflect.internal.WhiteboxImpl.findMethod(WhiteboxImpl.java:1749)
at org.powermock.api.support.membermodification.MemberMatcher.method(MemberMatcher.java:81)
at MockTest.hello(MockTest.java:45)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:312)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.executeTest(PowerMockJUnit44RunnerDelegateImpl.java:296)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThenTestThenAfters(PowerMockJUnit44RunnerDelegateImpl.java:284)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:209)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:148)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:122)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.run(PowerMockJUnit44RunnerDelegateImpl.java:120)
at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:102)
at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.run(AbstractCommonPowerMockRunner.java:53)
at org.powermock.modules.junit4.PowerMockRunner.run(PowerMockRunner.java:42)

Maven dependencies:
<dependency>
<groupId>org.mockito
<artifactId>mockito-core
<version>1.9.0
<scope>test
</dependency>
<dependency>
<groupId>org.powermock
<artifactId>powermock-module-junit4
<version>1.4.11
<scope>test
</dependency>
<dependency>
<groupId>org.powermock
<artifactId>powermock-api-mockito
<version>1.4.11
<scope>test
</dependency>
Original issue: http://code.google.com/p/powermock/issues/detail?id=364

From<EMAIL_ADDRESS>on January 31, 2012 00:02:53
Looks like a bug! Thanks for reporting. It would be really cool if you could help out with a patch.
Status: Accepted

From<EMAIL_ADDRESS>on July 25, 2012 02:38:50
I've uploaded a patch for issue #51 that solves this issue.

From<EMAIL_ADDRESS>on July 25, 2012 04:23:44
Status: Duplicate
Mergedinto: 51

Still stuck with this problem using the latest version of powermockito (1.6.2), any plan to release a new version soon ?
@johanhaleby
Thank you!

Could you help out and convert the patch to a pull request?! That would make it much easier for me.

I still experience this problem with PowerMock 1.6.6
"Problem with PowerMocking overridden methods (createToDoItemView). See: https://github.com/jayway/powermock/issues/384"
I was not able to find the patch attached to #51, in #51 it says it works with EasyMock, but I get similar Error in EasyMock (Multiple definitions of the method found)
Is there a way I can fix this problem, as this is a real stopper for my tests.


Drop macOS ARM wheels from 0.15 release

Per discussion in SIG meeting we will not gait the Addons releases until tensorflow-macos provides an SLA. We will continue to publish tfa-nightly m1 wheels.

Just to notify again @kulinseth  about this


Add Support for Multi-Feature Crates

I maintain a crate that has a feature "correct", which implements a slow, but correct algorithm. When "correct" is not present, it uses a fast, but lossy algorithm that is generally quite close. As a result, the two features have a lot of conditionally-compiled code, with ~2,000 lines solely for the lossy algorithm, and ~4,000 lines solely for the correct algorithm. What this means is code coverage is quite low for any singular test, even though my unittests cover both cases: with the presence or absence of the feature.
It would be nice therefore to have 1 of 2 tools to simplify this: either, allow the user to provide a list of features for each build, and tarpaulin runs coverage analysis on all of them, merging the result into a single report, or allow us to run an analysis merging with a previous report.
A sample use would be as follows:
cargo tarpaulin --feature-list=" a b a,b"

In this case, the features would be split on whitespace, producing the following: ["", "a", "b", "a,b"]. Each of these would be tested and then the combined coverage would be reported.

@pksunkara So the documentation on the options is meant to be fully contained within the help text, you can check that in main.rs and let me know if there is anything unclear and I'll attempt to improve it. If you want to open a new issue I can support you in getting tarpaulin running as desired for clap

@Alexhuszagh so if you have a look in the latest develop you'll see there's now a config file section https://github.com/xd009642/tarpaulin/tree/develop#config-file which adds support for this feature. So feel free to try it out before I do my next release the extra set of eyes on the readme and ergonomics of it can always help. But I think this should solve your use case nicely :smile:

Just cause I'm posting this in other issues I'll close this one and any feedback can go here https://github.com/xd009642/tarpaulin/issues/350

Thank you, this is perfect. Above and beyond what I had initially hoped for.


(PUP-5036) Ensure that future reserved words can be used

This commit ensures that the future reserved words 'application'
'consumes', and 'produces' can be used without errors. A warning
will be issued if an attempt is made to use it as a class name.

matthaus@wyclef-2  /Users/matthaus/src/puppet [issue/pup-5036/application-keyword-breaks-class]> puppet apply -e 'class application {}'
Notice: Compiled catalog for wyclef-2.local in environment production in 0.01 seconds
Notice: Finished catalog run in 0.05 seconds
matthaus@wyclef-2  /Users/matthaus/src/puppet [issue/pup-5036/application-keyword-breaks-class]> puppet apply -e 'class application {}' --parser=future
Warning: Use of future reserved word: 'application', must later be quoted if intended to be a String value  at line 1:1
Notice: Compiled catalog for wyclef-2.local in environment production in 0.37 seconds
Notice: Finished catalog run in 0.04 seconds

:+1:

I think we need a different warning when used as a class / defined type name.  Strings are not acceptable for class / defined type names in the grammar, so fixing this as suggested would just lead to a confusing compiler error.

The message is indeed confusing. I would like us to agree on a wording that would cover all cases though. Perhaps just skip the part about the need to quote? IMO, that's implied in for all cases where a string is expected anyway, and it's not confined to use of reserved words.

I agree. I.e. just Use of future reserved word: '#{word}'?

Updated PR with new wording.

+1


Force some tests to run serially

Forces some tests to run serially if ctest is given the -j option.
I've set all distributed tests, benchmarks, and tests that request all or cores threads. I've been a bit conservative and set the compile tests to run serially as well as I've seen problems before trying to build multiple header tests concurrently.
This would allow us to run tests much more quickly on hardware that has spare resources (most tests run with 1 or 4 threads).
@haampie I'm currently running the tests to see if there are any unexpected results. The option does work as advertised, I just have to make sure I haven't missed any other tests that require running serially.

This should be ready now. I added an additional option which adds --hpx:bind to tests that are allowed to run in parallel, to avoid having all of them bind to the first few cores. I also reduced the running times of some of the longer running tests. #4772 also came up while doing this. I've forced the affected test (parallel_fill_4132) to run serially (i.e. without --hpx:bind=none) to work around the problem in this PR.

Could this fix the transient test errors we see for partitioned_vector?

Could this fix the transient test errors we see for partitioned_vector?

I very much doubt it. We don't actually run tests anywhere in parallel. This is meant to allow us to run some tests in parallel.


Skip the flaky e2e test

Proposed Changes

For now, skip the flaky test mentioned in https://github.com/knative/eventing-contrib/issues/627

Release Note

NONE

/cc @nachocano
/cc @matzew

/lgtm

/lgtm
/approve


remove obsolete eventFinder

@jeffmcaffer,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot


check(Permissions.PERMISSIONS.IOS.LOCATION_ALWAYS) returns granted even for While in Use on latest ios

Bug
Version: 2.0.2
On iOS 13.2.2 iPhone 11
1 - change app location permission settings to While Using the App

2- perform check for Always Allow:

Library reports that the permission is granted although this is not the case!

Environment info
System:
    OS: macOS Mojave 10.14.4
  Binaries:
    Node: 10.15.0 - /usr/local/bin/node
    npm: 6.4.1 - /usr/local/bin/npm
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
  IDEs:
    Xcode: 11.2.1/11B500 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0
    react-native: 0.61.4 => 0.61.4
  npmGlobalPackages:
    react-native-cli: 2.0.1

Library version: 2.0.2
Steps To Reproduce

on iOS Set App Location permission to While Using the App
Use library to check permission for "Always Allow"
Note that you are informed that the permission is granted

Describe what you expected to happen:

on iOS Set App Location permission to While Using the App
Use library to check permission for "Always Allow"
You are informed that the permission is denied

Reproducible sample code
           // Are we authorized to use location?
            await Permissions.check(Permissions.PERMISSIONS.IOS.LOCATION_ALWAYS).then(async response => {

                console.vialog('location is ' + response)
                if (response === Permissions.RESULTS.GRANTED) {
                    this.setState({ authorizedLocation: true })

Thank you Mathieu. Will review the doc, also the explanation for what “while using the app” really means was useful as well: (https://support.apple.com/en-us/HT203033) although it would be nice to find an article that explains how the OS handles the case technically.

On 31 Jan 2020, at 18:42, Mathieu Acthernoene<EMAIL_ADDRESS>wrote:

Closed #406.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.


Bump version to v1.3.1

@takekoputa and @ayaz91, I want to try to merge this today, but it's blocked on #124 and #125 and possibly hn/docs-mongodb-uri-fix
Let me know if there are any other changes we want to get into this release.
Once this is merged, I'll tag it and we'll update pypi. Then we'll be ready to create a gerrit change on googlesource.

Great! @takekoputa, it's all in your court :)

I'm working on it

#124 and #132 are ready I think. They need code review, however.
#125 is closed.


Realm Internal Error Class

As in Swift 3 ErrorType has been named to Error, it conflicts with your internal Error class and so if I want to create my own Error enum as follows I get an ambiguous error from the debugger.
public enum UserServiceError: Error {
case UnableToRetrieveUser
case UnableToCreateUser
case UnableToParseUser
case NoCurrentUser
}
Please rename your internal Error.

We LOVE to help with any issues or bugs you have!
Questions: If you have questions about how to use Realm, ask on
StackOverflow.
We monitor the realm tag.
Feature Request: Just fill in the first two sections below.
Bugs: To help you as fast as possible with an issue please describe your issue
and the steps you have taken to reproduce it in as many details as possible.
Thanks for helping us help you! :-)
Please remove this line and all above before submitting.

Goals
What do you want to achieve?
Expected Results
What did you expected to happen?
Actual Results
What did happened instead?
e.g. the stack trace of a crash
Steps to Reproduce
What are steps we can follow to reproduce this issue?
Code Sample
Provide a code sample or test case that highlights the issue.
If relevant, include your model definitions.
For larger code samples, links to external gists/repositories are preferred.
Alternatively share confidentially via mail to<EMAIL_ADDRESS>Full Xcode projects that we can compile ourselves are ideal!
Version of Realm and Tooling
In the CONTRIBUTING guidelines, you will find a script,
which will help determining these versions.
Realm version: ?
Xcode version: ?
iOS/OSX version: ?
Dependency manager + version: ?

You can avoid the ambiguity by qualifying the base class with a module name. In your case, that'd be by specifying the base class as Swift.Error.

Thanks for the fast response! Did not see that, my mistake.

My take on this is that since the Swift standard library makes use of many standard terms, conflicts will inevitably arise between types it provides and types provided in third-party frameworks. Module namespaces provide a way around this that's cleaner than prefixes on type names like in Objective-C, or giving types unnatural names to avoid conflicts. I'm not sure how others feel about this though.


Some suggestions for the UI

Hi, I have some suggestions:
(1) For the textfields marked by red circle below:

Could you make the textfield values auto-calculated when users are typing on the textfields? Currently I have to press Enter or switching the textfield focus (by pressing TAB key or clicking other textfield) to trigger the calculation, so if the values can be calculated automatically, it will be more convenient.
(2) Shows pips/points difference information between the SL/TP & Entry price on the main window.

Hi!
I'll think about the (1). Not sure if this is possible with MQL4/5.
(2) I don't think it's a good idea. One can already switch to pips display and see the pips distances near the lines.

About the (2), you're right, there is already pips/points distance info shown near the lines, I didn't realize that.
Another minor issue: if I have the PositionSizeCalculator's SL & TP lines shown in the currency chart (e.g. EURUSD) and if I use Symbol Changer Profit Display v5.1 indicator to switch the chart to indices chart (e.g. US30) and then switch back to the previous currency chart, the SL & TP pips distance labels will get shifted a bit to the right.

Although this can be corrected by switching the timeframe back and forth, but I still think it's better if this can be fixed.

That's weird. I will look into this. Thanks for reporting!

Hello again!
(1) Looks impossible as the actual object's text value doesn't change until you press Enter/Tab.

I see, that's unfortunate.

(2) fixed in 2.42.


Support for specifying components of FindPython3 in IgnPython

Desired behavior
It should be possible to have a macro that allows to specify what exactly should be searched for by the CMake command of FindPython3. Right now it supports Interpreter, Compiler, Development and NumPy which might be helpful in some cases or are required for specific modules.
A possible use-case is pybind11 as noted in https://github.com/gazebosim/gz-math/pull/402 because it requires some components.
Additional context

https://cmake.org/cmake/help/latest/module/FindPython3.html
https://github.com/gazebosim/gz-cmake/issues/215

we have deprecated GzPython in favor of calling find_package(Python3) directly, so users should specify their own components


Randomize patient characteristic birthdate along with birthdate on pa…

When randomizing birthDatetime, change on patient and patient characteristic birthdate element
Pull requests into Cypress require the following. Submitter and reviewer should :white_check_mark: when done. For items that are not-applicable, note it's not-applicable ("N/A") and :white_check_mark:.
Submitter:

[x] This pull request describes why these changes were made.
[x] Internal ticket for this PR: https://jira.mitre.org/browse/CYPRESS-357
[x] Internal ticket links to this PR
[x] Code diff has been done and been reviewed
[x] Tests are included and test edge cases
[x] Tests have been run locally and pass

Reviewer 1:
Name:

[ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
[ ] The tests appropriately test the new code, including edge cases
[ ] You have tried to break the code

Reviewer 2:
Name:

[ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
[ ] The tests appropriately test the new code, including edge cases
[ ] You have tried to break the code

Trying to get travis building on this (093ca5398f043beb99bbbca6118d46f6919bdb65) but it might require a rebase or merge of the cypress_v4_fixes branch.


Add validusage.json to LVL repo

In the future, this file will be updated as part of the Vulkan header update process, and will be used as part of managing VUID identifiers and lifetimes.
@mikes-lunarg, I'm thinking we should modify spec.py to use this file by default?

@mark-lunarg That would be my preference.  Right now spec.py goes out and gets the latest validusage.json from the web which is fine for public header updates but becomes awkward in other scenarios.

[ ] TODO for updating the wiki when this gets merged


[r2.5 port][ROCm] Port PR 47491 to r2.5

/cc @mihaimaruseac @angerson
#47491

Can you fix the merge conflict please?


Favorite/Star repos

One of the things that bugs me about BitBucket server is that I have yet to figure out a way to star repos and keep them in a list like you can on GitHub and then see the list to navigate easier. I work for a very large company and my organization under it alone has a few hundred repos let alone the other organizations I have access to because of my role so it can be annoying to find them. I realize that I could bookmark the repos but given my role, I have a ton of those as well.
Would this be a possible feature to add to this project?

I'm not sure if this is best match for this, but I don't see why it wouldn't be possible, to start some repos and have list of your favorites. Question is, where to show the list.

this might be candidate for #hacktoberfest label :) @dragouf?


TS String Literal Performance: TypeScript string-parsing opts out of tail-recursion

Acknowledgement

[X] I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.

Comment
Hey all,
We've been working on gql.tada the project aims to implement the GraphQL language as TypeScript types. This all works pretty well however we are sometimes hitting performance issues. One of them being when our GraphQL document is lengthy, this seemingly makes TypeScript opt out of tail-recursion when tokenising/parsing the StringLiteral due to hitting an internal limit. The pattern we moved to is slicing the first character and parse like that, maybe that optimisation is currently missing?
On the side, another performance ceiling we have been hitting is with large schema's when we transform the large schema to an introspection (the structure we use to do lookups) we can hit very high memory usage (we have observed 8GB). One thing we are currently doing is to pre-generate the internal TypeScript type and use that instead of our current .d.ts approach.
I realise that all of this is quite vague and I am here to provide any further detail or if pointed in the right direction to figure this out myself. Also apologies if there's a different template for performance concerns, I did not spot one immediately.
Benchmark it yourself
The problematic query in question
git clone git@github.com:0no-co/gql.tada.git
git checkout bench
pnpm i
pnpm build

Now go to examples/example-pokemon-api/src/components/PokemonList.tsx, notice the huge query, if we add more fields we will get a Type instantiation too deep and possibly infinite.

Just FYI, template strings are explicitly not suited/meant for parsing DSL.
https://github.com/microsoft/TypeScript/issues/45504#issuecomment-901464966

"I want to write a full GraphQL parser and provide exact API shapes back"
This is a moderate 👎 - we think we'd be encouraging people to use the wrong tools to solve these problems

Related: #43335

@MartinJohns: We talked to @jakebailey about this, and just because this isn't recommended / accounted for in TypeScript’s type checker, to us, that doesn't mean that there aren't some valuable insights to be had here from discussing what we ran into ❤
FWIW, we're planning to have a hybrid approach for codegen + in-typesystem parsing in the future to get around linear increases in parsing time, and even ignoring this, the project also has a lot of non-string-literal parsing insights, since we're dealing with large data sets.
For now though, the issue we ran into is that the string literal inferences we're using, which are done character by character, cause a performance cliff, where cost increases per character when we bail out of tail recursion (due to the max tail recursion limit), which is potentially related to allocations for each string literal type.
I'd say, no matter whether we're dealing with a DSL or not, that's potentially an indicator that per-character inference in literals could do with a fast path, if that's possible

Compiling the linked project completes in 4 seconds on my machine; is the problem strictly that you hit a limit? Can you provide an example that hits a limit or is slow?

This feature was designed around modifying property names, e.g. turning
type In = {
  foo: string;
}

into
type Out = {
  getFoo(); string;
}

or parsing short data like /foo/bar -> ["foo", "bar"]
The fact that it even lets you try to do something with literals over 100 characters long was probably a huge mistake. I'd really, really ask that people not try to do this except as a learning exercise, and accept that you're absolutely going to encounter limitations. The editor performance you're going to see from this approaches is going to be uniformly terrible.
If people want to write a lisp interpreter in the type system string parser for fun that's fine, but it's not a mainline scenario and anything even close to it is going way past the design limits of what it's there for. It's like trying to use a kitchen knife as a wheel axle -- you might be able to make it work but it's not what it's there for and the knife manufacturer isn't going to document the bending modulus of it for you.
As such, we're not able to spend time investigating reports like this. That said, if you independently find and verify some fix, PRs would possibly be accepted.

I see that there's no interest for this, I made this issue to see if there was a possible collaboration. It is disappointing that it was met with this kind of rude commentary. If anything in this issue could have been seen as bad intent, I apologize. I acknowledge the size of the project and the amount of issues that come in, I was in no way shape or form requesting urgent help or whatever. I was merely suggesting that there's room for improvement and if anyone was up for that to point me in the right direction.
I suspect that issues like this one might arise in the future, as folks explore the boundaries of TypeScript more and more, heck the router-space doing string literal parsing might fall into that bucket soon enough (unless that's also a DSL...). You lot have created something to be proud of and I respect that you have clear boundaries in your project.
That being said, I suspect that when folks started building types on top of JavaScript there could have been similar reactions... Yet here we are, we got an amazing language that allows us to express complex types on top of JavaScript, maybe someday TypeScript will enable all of these wonderful features and enable us to be even more expressive and push the boundaries of static-types.

It is disappointing that it was met with this kind of rude commentary.

I haven't seen any rude commentary.

I am not going to debate what is rude or not but the following comment, at least to me, comes across quite rude for an issue of this kind. It's not like this red-line is documented anywhere, I will however leave it at that.

It's like trying to use a kitchen knife as a wheel axle -- you might be able to make it work but it's not what it's there for and the knife manufacturer isn't going to document the bending modulus of it for you.

That was simply an analogy; any sarcastic or rude intent you read in it is on you.

It's not like this red-line is documented anywhere

FWIW, the documentation for the hypothetical knife probably wouldn't say anywhere "Don't use our product as a wheel axle." 😄  That said, GitHub issues are considered part of documentation, and template string inference not being intended for this use case is well-established by the maintainers here.

I apologize if any rudeness was perceived in that message; it was not my intent and I'll try to do better in the future.

I made this issue to see if there was a possible collaboration

I just want to reiterate that the door is totally open if other people want to optimize something in a way that doesn't incur other significant costs. We're not able to offer time to research optimization approaches, but if you do this and find something that works well, we can help you get it into a workable PR.


i18n everything

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.


Random error when performing tests - empty range in randrange(3, 3)

In order to test plot_pca_coords_3d(), at least 3 components are needed when computing the PCA, so the number of components is chosen as random.randint(3, min(n_samples, n_snps)). Which is fine because there should be more than 3 samples and 3 snps but n_snps is actually set as random.randint(1, n_snps_available) which can be 3 or less.

The same bad random value is used elsewhere in the same file. I am going to update the rest of the code in the same way.


urllib2- or requests-compatible wrapper for app engine's async urlfetch

app engine's async urlfetch feature is useful, but awkward to use in established codebases that already have existing code paths using urllib2 or requests.
one solution would be to write a wrapper that reproduces urllib2's or requests's API, or at least a minimal subset, and passes through to async urlfetch underneath. it would fire off the initial RPC when called, immediately return, and only block on the result when the caller tries to read() the response, access response headers, etc.
this would help snarfed/bridgy#578, snarfed/bridgy#603, snarfed/bridgy#624, etc. converting even small parts of bridgy to async urlfetch would be pretty invasive otherwise.
i'm filing this issue here because it could be part of webutil, but ideally it should probably be its own pypi package.
cc @kylewm in case you're interested in a small but complex/deep project!

this would also make it easy to make libraries use async urlfetch even if they don't depend on/aren't aware of app engine at all, e.g. granary. :P

btw, i figured someone must have done this already, and i searched high and low, but no luck. i'd happily use anything that does exist though!

I like the idea of a wrapper that granary can use to not be dependent on appengine.
My gut reaction is that it should not follow requests or urllib2 too closely, should present an interface specific to async requests instead. Like instead of returning a Response, it should return a Future/Promise. The code is going to have to be rearranged pretty significantly already, and we have to deal with async requests in a very specific way, and I worry making it look to much like a sync API will make that confusing.

huh. thanks for the feedback!
my motivation was a bit different. i was explicitly thinking of being compatible with urllib2/requests so we could make some parts of the existing code async as is, without invasive changes.
you're right though, there are definitely drawbacks to that. meh.

the new python 3 app engine runtime drops all of the proprietary APIs like urlfetch entirely, so this is now obsolete.


Make golint happy

Summary
It used to be:
go run golang.org/x/lint/golint ./...

calnex/cmd/cmd.go:24:5: exported var RootCmd should have comment or be unexported
cmd/ntpcheck/checker/chrony.go:38:32: exported func DialUnix returns unexported type *checker.chronyConn, which can be annoying to use
cmd/ntpcheck/checker/system.go:62:1: exported function NewSystemVariablesFromChrony should have comment or be unexported
leapsectz/leapsectz.go:19:1: package comment is detached; there should be no blank lines between it and the package statement
ntp/chrony/packet.go:450:6: exported type SourceStats should have comment or be unexported
ntp/protocol/ntp.go:17:1: package comment should be of the form "Package protocol ..."
ntp/shm/ntpshm.go:35:7: don't use ALL_CAPS in Go names; use CamelCase
ntp/shm/ntpshm.go:40:1: comment on exported type NTPSHM should be of the form "NTPSHM ..." (with optional leading article)
ptp/protocol/protocol.go:169:1: exported method Announce.MarshalBinaryTo should have comment or be unexported
ptp/protocol/protocol.go:207:1: exported method SyncDelayReq.MarshalBinaryTo should have comment or be unexported
ptp/protocol/protocol.go:224:1: exported method SyncDelayReq.UnmarshalBinary should have comment or be unexported
ptp/protocol/protocol.go:245:1: exported method FollowUp.MarshalBinaryTo should have comment or be unexported
ptp/protocol/protocol.go:262:1: exported method FollowUp.UnmarshalBinary should have comment or be unexported
ptp/protocol/protocol.go:284:1: exported method DelayResp.MarshalBinaryTo should have comment or be unexported
ptp/protocol/protocol.go:303:1: exported method DelayResp.UnmarshalBinary should have comment or be unexported
ptp/protocol/unicast.go:45:1: exported method Signaling.MarshalBinaryTo should have comment or be unexported
ptp/protocol/unicast.go:163:1: exported method RequestUnicastTransmissionTLV.MarshalBinaryTo should have comment or be unexported
ptp/protocol/unicast.go:192:1: exported method GrantUnicastTransmissionTLV.MarshalBinaryTo should have comment or be unexported
ptp/protocol/unicast.go:222:1: exported method CancelUnicastTransmissionTLV.MarshalBinaryTo should have comment or be unexported
ptp/protocol/unicast.go:246:1: exported method AcknowledgeCancelUnicastTransmissionTLV.MarshalBinaryTo should have comment or be unexported
ptp/ptp4u/server/server.go:21:1: package comment is detached; there should be no blank lines between it and the package statement
ptp/ptp4u/server/subscription.go:1:1: package comment should be of the form "Package server ..."
ptp/ptp4u/server/worker.go:56:1: exported function NewSendWorker should have comment or be unexported
ptp/ptp4u/server/worker.go:56:54: exported func NewSendWorker returns unexported type *server.sendWorker, which can be annoying to use
timestamp/timestamp.go:40:2: comment on exported const ControlSizeBytes should be of the form "ControlSizeBytes ..."
timestamp/timestamp.go:44:2: comment on exported const PayloadSizeBytes should be of the form "PayloadSizeBytes ..."
timestamp/timestamp.go:116:9: if block ends with a return statement, so drop this else and outdent its block

Test Plan
Now the output is completely empty.

Codecov Report

Merging #85 (491add7) into main (0e2dfc6) will decrease coverage by 0.00%.
The diff coverage is 55.55%.

@@            Coverage Diff             @@
##             main      #85      +/-   ##
==========================================
- Coverage   53.40%   53.39%   -0.01%
==========================================
  Files          63       63
  Lines        4737     4736       -1
==========================================
- Hits         2530     2529       -1
  Misses       1911     1911
  Partials      296      296

Impacted Files
Coverage Δ

calnex/cmd/cmd.go
0.00% <ø> (ø)

cmd/ntpcheck/checker/chrony.go
43.29% <0.00%> (ø)

cmd/ntpcheck/checker/runner.go
0.00% <0.00%> (ø)

cmd/ntpcheck/checker/system.go
96.55% <ø> (ø)

leapsectz/leapsectz.go
59.83% <ø> (ø)

ntp/chrony/packet.go
63.38% <ø> (ø)

ntp/protocol/ntp.go
100.00% <ø> (ø)

ptp/protocol/protocol.go
78.78% <ø> (ø)

ptp/protocol/unicast.go
51.51% <ø> (ø)

ptp/ptp4u/server/server.go
1.40% <0.00%> (ø)

... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0e2dfc6...491add7. Read the comment docs.


Issue: trace.ana.tasks.plot_task_residency() fails to plot for all domains

Describe the bug
The system have two CPU freq domains, the first domain is CPU0/1/2/3, the second domain is CPU4/5/67/; When use notebook to analyze task behaviour, the method trace.ana.tasks.plot_task_residency() only can plot the task residency on the first CPU domain (CPU0/1/2/3), but it doesn't show up the task residency on the second CPU domain.
To Reproduce
Steps to reproduce the behavior:

what part of LISA is being used (synthetic tests, WA-related features, etc.): synthetic tests
what kind of target is being used (linux, android, etc.): Hikey960 with Android
what code is being run if that is a custom script using LISA APIs:
Please see the ipython script: https://gist.github.com/Leo-Yan/c1e33b0c399762dcbbe943fc632fbad5; you could see at the box 'In [84]:', it calls method trace.ana.tasks.plot_task_residency("tsk4_1-13"), the picture only show CPUs 0~3 but have no CPUs 4~7.

Could you run this and share the output please ?
print(target.plat_info)

As side notes I would recommend:

using bokeh backend rather than matplotlib (unless you specifically need matplotlib for some reason). This will give you significantly better plots for interactive use:

import holoviews as hv
# Enable bokeh as default backend, for interactive plots
hv.extension('bokeh')

https://lisa-linux-integrated-system-analysis.readthedocs.io/en/master/workflows/ipynb/examples/analysis_plots.html#Holoviews

There is a good chance you will find this plot better if you are familiar with kernelshark: https://lisa-linux-integrated-system-analysis.readthedocs.io/en/master/trace_analysis.html#lisa.analysis.tasks.TasksAnalysis.plot_task_activation

Looking at the code of plot_task_residency it seems to be using plat_info["freq-domains"]. If for some reason CPU4/5/6/7 are not appearing anywhere in that, that would explain the missing part. plot_tasks_activation should not suffer from that, but if the freq domains are inaccurate you will probably encounter other issues.

Not sure if it was related with the platform info file or not before.  But I can confirm this issue is dismissed on my Hikey960 board and QEMU emulation platform.  So close it.


Implement TCP Retransmission and RTT

This is currently turned off, since the current implementation is kinda dirty, and due to bugs with IRQ/Timers.
This is also dependent on calculating RTT, which isn't there either.

Fixed.


Support for JSON

Doesn't appear to support JSON yet....
aws-sam-local validate -t sam_build.json
2017/08/14 11:12:07 PANIC: YAML contains malformed structures
panic: PANIC: YAML contains malformed structures

Hi Glyn,
Working on it!

We're rewriting some of the library we use for CloudFormation/SAM parsing (github.com/awslabs/goformation). Part of this rewrite will include JSON support.
The dev work is mostly done, in the 0.1.0 branch of goformation, however we've got a bit more work to do before we can start using it in SAM Local. Shouldn't be much longer.

Fixed in v0.2.0


Sign lost for Comparison in AST

Dear Roland,
Could you have a look at the following test cases?
$ python -c 'import clingo.ast; clingo.ast.parse_string(":- not 1 == 1.", print)'
#program base.
#false :- 1 = 1.
$ python -c 'import clingo.ast; clingo.ast.parse_string(":- not not 1 == 1.", print)'
#program base.
#false :- 1 = 1
Unrelated to the above issue, the empty show directive is printed in a form that cannot be parsed back (not sure if it is wanted):
$ python -c 'import clingo.ast; clingo.ast.parse_string("#show.", print)'
#program base.
#show /0.
Many thanks for your hard work!
All the best,
Mario

Thanks Mario! Already created a PR. Now will wait for the tests to finish and then deploy dev packages.


Build failing with ninja: fatal: unknown tool 'msvc'

I have been trying to build ninja but getting this error when building this command
C:\Users\-----\AppData\Local\Programs\Python\Python39\python.exe" "tools\gn\bootstrap\bootstrap.py" "-o" "out\Default\gn.exe" "--skip-generate-buildfiles"
The error I am getting is
ninja: fatal: unknown tool 'msvc'
I am using Windows 10 with Ninja 1.10.0

I got the same issue, how did you solved it?

This sounds like Visual Studio or one of the required components is not installed correctly


Use a more up-to-date base image

It seems to me that the Docker images are based on Debian Jessie which is too old. For example, sqlite3 fts5 is not available on it. Can we use a more up-to-date base image or allow user-define Docker image as suggested in https://github.com/rmotr/notebooks-help/issues/8?

Yes, Jessie is old but still supported and stable. Stretch (Debian 9) would probably be a better more-moderns still stable option. The newer versions (>9) are either in testing or still unstable. Check it here: https://en.wikipedia.org/wiki/Debian_version_history

Why not use Debian Stretch?

@dclong I'm marking this as a feature request. Thanks again for submitting it!

We need to decide if we should update or not. Scheduled for this sprint.

Any update on this issue?

@dclong Docker images have been updated to use Debian Stretch (python:3.6-stretch).


use require('buffer') instead of global Buffer

Fixed by https://github.com/dcodeIO/node-memcpy/commit/5bd6b5fa536e14b88c735e0ce92c6aa11898cc0d


Better solution to ignore properties

I appreciate the mention of a workaround in the docs but I wonder if something like this would be a better pattern, similar to the behavior used by eslint (i.e. with a comment):
Input:
h1 {
  font-size: 48px;
}
h2 {
  /* pxtorem-disable-next-line */
  font-size: 24px;
}

Output:
h1 {
  font-size: 3rem;
}
h2 {
  font-size: 24px;
}

I haven't looked at the source yet to see what kind of lift this would be, but would you accept a PR with this kind of solution?
Cheers, and thanks for the great library
Jeremy

Yeah. Love the solution!

A similar solution could also be used for forcing the transformation of custom properties:
:root {
  /* pxtorem-transform */
  --font-size-h1: 24px;
}


SSR Support

Tasks

[ ] Research and find a solution to make the library SSR friendly.
[ ] Implement and test found solution.

This issue is too generic and will be explored on a framework-by-framework case. The first being React.


Update enum ReportPackageReason, and problem description text on the form

Update ReportPackageReason.cs
public enum ReportPackageReason

{

    [Description("Other")]

    Other,

    [Description("The package has a bug/failed to install")]

    HasABugOrFailedToInstall,

    [Description("The package contains malicious code")]

    ContainsMaliciousCode,

    [Description("The package is infringing my copyright or trademark")]

    ViolatesALicenseIOwn,

    [Description("The package contains private/confidential data")]

    ContainsPrivateAndConfidentialData,

    [Description("The package was not intended to be published publicly on nuget.org")]

    ReleasedInPublicByAccident,

}

Here is the updated Details text when the user has selected "The package is infringing my copyright or trademark" as a reason.
Please provide a detailed description of the problem. If you are reporting trademark infringement, include the name of your trademark, registration number and country where registered.

There is a bug. @ryuyu why am I seeing the highlighted text for owner support request? I remember working on this with you where this should show up only for report abuse and when the reason selected is copyright/TM infringement.

I got to that page by clicking on contact support on the delete page.

This should be hotfixed


[AutoPR mariadb/resource-manager] typo: mariadb/resource-manager/Microsoft.DBforMariaDB

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/4710

This PR has been merged into https://github.com/Azure/azure-sdk-for-go/pull/3553


Create publicly accessible palette

It would be useful to be able to import the onedark colors for use in configs of other plugins (e.g., custom config of lualine).  I have forked the repo to add this functionality and can make a PR.
Example use case here:  https://github.com/jonathanlamar/nvim/blob/tmp/lua/colorschemes/onedark.lua#L3.  Previously, I had to manually copy the hex code.  Not a huge deal, but I think it's better to import them.

Merged


Wiki Data

This issues tracks all wiki processing as the different sources have been unified. Will be closing https://github.com/r-three/common-pile/issues/7 and https://github.com/r-three/common-pile/issues/1
There are three sources of wiki data we will be using:

Internet Archive dumps (from the wikiteam)
Official wiki dumps (wikimedia---i.e., wikipedia---fandom, etc.)
v2: Wiki scrapes using the wikiteam tools

Sources to create a list of wikis:

Enumeration of the wikimedia sources (wikipedia, wikibooks, wikinews, wikiquote, wikisource, wikiversity, wikivoyage, wiktionary)
Search on the internet archive
v2: List of wikis scraped from wikiindex (checked against the internet archive search

Data Processing Pipeline:
Data Collection
Archive Sources:

[X] Collect Wikimetadata from the Internet Archive via search

Resulted in ~325,000 wikis based on looking for CC-BY, CC-BY-SA, and publicdomain

This is restricted to wiki's that are in the wikiteam collection. When you allow the wikicollections tag too it jumps to ~4million wikis.

Takes ~40 hours to download the metadata serially using the Internet Archive python library. Speed up by merging the result of mutually exclusive queries.

[X] Download wiki's from IA based on their metadata

Download of 4.4TB, extracted to 13TB, reduced to 8.8T by removing unneeded things like images.
Dumps have multiple formats, multiple compression methods, and multiple places where the real data lived.
Can be parallelized by providing --worker_id and --num_workers
During downloading and the like the metadata.identifier field is used as the key, but our actual "source" field will use the domain name.
Dispatch on special cases

[X] When a wiki is dead, download the IA dump (most recent) -> wiki/archive
[ ] v2: When a wiki is live, if it has an official dump (like fandom), then download that dump -> wiki/dump
[ ] v2: When a wiki is live, if the IA dump is older than ...days, then rescrape with wikiteam tools -> wiki/scrape
Currently all data is downloaded from the IA.

[ ] In Progress: Converting target directory naming from just ${target_dir}/${id} to ${target_dir}/${id}[:n]/${id}[n:2n]/.../${id}. Things like os.path.exists`, used to check for data already processed are currently really slow (~40 minutes to check if all ~325,000 exist on disk), this should help speed things up.
[ ] In Progress: Convert each dump to the dolma format such that the "text" field has wikitext in it.

Dump Sources:

[X] Download the enumeration of wikimedia sources
[X] Extract the wikimedia dumps
[X] Convert each dump to the dolma format such that the "text" field has wikitext in it.

This is pretty fast, running a single thread on a CPU from 2017 took <2hr to extract all the pages from the wikipedia dump

Currently unclear if a dump grabbed based on IA metadata should be saved into the same area as the wikimedia dumps where processing is based on what lives in the dirs or it should stay in the IA area where the metadata file dictates what is processed.
Scrape Sources:

[ ] v2: Scrape Wikis listed in wikiindex that aren't included in the IA metadata using the wikiteam3 tools (it is in python3). Make sure to include the talk pages in the scrape.
[ ] v2: Scrape wikis from our manual list that aren't included in the IA metadata. One difficultly will be entity linking, the id's used in IA are not super consistent, some wiki's have multiple dumps (from different times) available while others have multiple dumps from different points in times as different entities with unique ids (which have the date in them).
[ ] v2: Include wiki's from the IA that are found with the wikicollection tag in addition to the wikiteam tag

WikiText parsing:
Now that everything is in a unified sharded format, actual parsing of wikitext is essentially infinitely horizontally scalable.

[X] Create a dolma parallel processor that converts wikitext in "text" field to plain text.

This currently uses wtf_wikipedia behind a simple nodejs server.
Dolma handles parallelization over the possible worker cores (each worker processes a shard at a time)
The parallel processor calls to the nodejs server.
Multiple instances of the nodejs server can be run behind a load balancer like HAproxy
My 4 core laptop can process ~700 documents/second with this setup (4 dolma workers and 4 server instances)

[X] Modify wtf_wikipedia parsing to do what we want wrt math

Currently we are editing the math tags and templates in python in such a way that they aren't touched by wtf_wikipedia.
Conversion from wikimath to latex is mostly done, just 0.6% of templates are not handled (they just get removed)
[ ] In Progress v2?: Convert processing to a real grammar and convert to latex by munging the AST.

[x] Spot check wtf_wikipedia output and add python post processing (for example the headers for things like "external links" seem to be left in the pages.
[ ] Run wikitext conversion for all the wiki dumps

[x] MediaWiki
[ ] WikiTeam3

The wikiarchive wikis are chugging along, I think the main bottleneck is I/O contention so there isn't much we can do to speed it up.
The wikiarchive wikis don't tend to include the talk pages, which is another reason we will want to re-scrape in v2
The wikimedia data I have processed (wikipedia, wiktionary, etc) didn't have talk pages either. I'm updating code, redownloading, and reprocessing to include the talk pages (will post some stats about how much more data that is when done)
wikitext parsing updates
wtf_wikipedia seems to work well. One place it leaves weird artifacts is images with really long (could be caused by newlines) captions, it leaves the [[ in there. It also remove section names, but I have an easy fix to get them back.
I've also been working on handling math parsing. wtf_wikipedia is pretty inconsistent on how it handles maths. It handles simple stuff well but strips out anything more complex. When processing 1 shard of the wikipedia dataset, 49% of the <math> tags got stripped out (of those, 91% of the more complex <math display="block"> sections were stripped). It does a bit better with the math template syntax that wikitext supports (but that might be because people tend to use it for less complex stuff). Only ~5% of those are totally stripped, but it's processing of the ones that aren't removed is still wrong, the clearest way is that it removes the  and  tags.
My current approach is to:

convert all the <math> tags to appropriate $ and $$. This converts it to latex and seems to cause wtf_wikipedia to leave it alone
detect the {{math|...}} templates in the wikitext and either:
a) remove them from the wikitext, leaving a simple marker, convert the template into latex, use wtf_wikipedia to convert the rest of it, and substitute them back in at the correct place. An issue with this is that the templates can contain random wikitext like the link syntax so we'll need to ~reimplement some wikitext parsing into math template -> latex conversion code.
b) Do rewrites in the templates for things like / into a more latex-like format and then pass things into wtf_wikipedia. It it unclear how many of these rewrites will be needed to avoid stripping these templates (for example wtf_wikipedia can handle a template like {{math|1=F=ma}} but will strip a template like {{math|F {{=}} ma}}. We would also want to add $ around these parts.

Some mathlike templates (for example {{mvar|X}} can appear without the {{math|...}} template so my plan is to find the {{math|...}}  ones first, which will contain most of the other template, and then pick up the other ones later.
An open question is the handling of unicode symbols. Lots of math articles have symbols like π or θ directly. In a latex conversion would we want to convert these to \pi and \theta? Similarly, there are fraction templates like {{sfrac|1|2}} that wtf_wikipedia converts to 1/2 but might make more sense to have as \frac{1}{2}
I might convert all the dumps with just wtf_wikipedia as a v0 it get approximate token counts while I work on refining the math handling.

Nice!
I dug out my old codes and notes on wtf_wikipedia processing. Apart from the math stuff you raised, I also found that it would dump out stuff like
File:V Train AC.JPG|Class 310
when there was an image, and that it dumped out wikitext tables (which we probably want to omit in the context of modeling natural text). There also was one example where there were a bunch of instances of
In:
Out:

Maybe that stuff has changed by now though.
Regarding standalone symbols, I think it's appropriate to leave them as unicode rather than try to convert them to LaTeX.
I think when I was messing with wtf_wikipedia before I also just had code that manually stripped out the references section. If it's not natural text, let's just remove it.

I've seen some of the image thing, looking into how to fix that. I haven't seen the In: Out: thing yet.
I've updated stuff to remove the references sections (also things like external links, see also, etc.)
I found an issue that comes up in how editors tend to style math, basically the indentation is handled wrong and text from below an equation can end up before it. I opened an issue https://github.com/spencermountain/wtf_wikipedia/issues/577 but I don't know JS/wtf wikipedia enough to solve it myself right now. Looking for a quick workaround, otherwise it might be a v2 thing.

hey! just stumbled on this, and am happy to help with any issues - it's really useful to find examples where things break.
There is a max-length for images - happy to increase this, if there are known issues.
I've been blessed to never learn latex, and this is probably the cause of the shy  parsing. Happy to tweak a regex so more things pass through. I always assumed .text() would just kill that template, but it doesn't have to. Amazing what these new models can do.
cheers

Hi Spencer, I think the issue with images is just that in our use case we don't want the "File:V Train AC.JPG|Class 310" text. I can see why that would be reasonable to include otherwise though.

I have some math template munging that seems good enough for now. The general approach is to use a regex to find where to start editing, then iterate forward in the text to find the end of the scope. Then you loop over a bunch of these edits. Only a few cases support nesting of the same template (mset and abs are the main ones that needed it) but it does support nesting of different templates (you can have a overline template inside of a strong template for example)
Examples:
{{math|{{abs|''ε''(''x'')}} < 7.5·10−8}} -> |ε(x)| < 7.5·10^{−8}
{{math|''v''p {{=}} ''ω''/''k''}} -> v_{p} = ω/k
{{math|''x''pij {{ = }} {{Fraction|{{delta}}|{{abs|1 - {{abs|y}}}}}}}}-> x^{p_{i}}_{j} = \delta⁄|1 - |y||
{{math|x24}} -> x^{2^{4}}

I extracted all the {{math|...}} templates from wikipedia and ran my fixes over them. There are 161,459 math templates, and only 971 them now result in an empty string (0.6%). There are a few templates type that make up most of these errors. The commonality of these is that they require parsing the template into parameters and doing different things based on those. For example {{overset|~|a}} puts a tilde over the a. If we want to handle these, the approach I used will get really brittle and we probably need to switch over to an actually grammar (I'm going to try my hand at this, a help page claims wikitext isn't context-sensitive, it just has really complex error handling, but I'm not sure, having things like | to insert a | that doesn't delimit parameters seems pretty context sensitive to me). The mis-handled templates include:

{[vec|...}}
{{font color|...}}
{{color|...}}
{{pars|...}}
{{nuclide|...}}
{{Subatomic Particle|...}}
{{music|...}}
{{thinspace|...}}
{{#if|....}}
{{gap|...}}
{{su|...}}
{{SubSup|...}}
{{braket|...}}
{{bra-ket|...}}
{{overset|...}}

There are also a few cases where the output for {{mset|...}} are a bit mangled as you can use the different arguments to create sets that look like {x | x \in S} There are also a lot of templates defined in wikitext that don't appear in wikipedia so I have no code that handled them. Not sure if they appear in other wikis.
There are some cases that I don't handle atm, for example, one template is {{math|<big><big>(</big></big>...}}. This becomes just ( after running wtf_wikipedia. It would be more correct to translate it to some latex like \bigg( but currently none of the code exposes a nesting depth count. I figured this was good enough.
There are also a few symbols that get stripped out of {{math|...}} templates that seem like they shouldn't. I noticed :, #, * when they are by themselves and () when there isn't anything between them.

This seems reasonable for v1!

I've been fixing a bug where a malformed template stops processing of all the other templates later in the document. Now the malformed on is removed and the rest is processed correctly.
Working on running the preprocessor on all the data next

I'm finished processing the MediaWiki wikis, working on the wikiteam archives next (delayed by having to move data around). The data so far is here https://huggingface.co/datasets/blester125/wiki
The MediaWikis (which include talk pages) have ~14 billion tokens.
Some Stats:

On my desktop (Ryzen 9 7950X) it took ~4hours 15min to process the 64 million documents.
36 documents caused issues with wtf_wikipedia (mostly crashes from trying to look up the read attribute on undefined, I assume a regex didn't match and it isn't handled, 1 crashed from "Invalid String Length", it seems like this is from a document being too long for the maximum string length that v8 allows lol)
12 documents causes OoM issues (I've tried to avoid these by tweaking things like heap sizes but it still happens)
83 documents took so long (>3 minues) to do wtf_wikipedia parsing that our server setup timed them out
~1000 documents ended up blank after wtf_wikipedia parsing, I haven't looked into the quality of these documents before going in (i.e. should they be saved by special case handling)

Nice. It seems like there's a lot of markup in the text field though, is that expected? e.g.

[[Image:CormacportraitBig.jpg|thumb|100px|right|Greetings!]] Hi, my real name is Cormac Lawler. I've been closely involved with setting up and developing Wikiversity. This process has been the focus of my ongoing PhD (which began in September 2006, and which I will be submitting early 2011): to participate in the definition of what this space is, what it means in the context of the wider world of education, and what its opportunities and limitations are. *Real name: Cormac Lawler *Email: cormaggio (at) gmail (dot) com *Cormaggio on [[w:user:Cormaggio|Wikipedia]] | [[m:User:Cormaggio|Meta]] | [[commons:User:Cormaggio|Commons]] | [[b:User:Cormaggio|Wikibooks]] and many other places :-) (It's an old nickname that I resurrected for an email address, which has subsequently stuck as an online moniker) *[http://www.cormaggio.org/wiki/index.php?title=User:Cormac more detailed bio and interests] *[http://cormaggio.org blog] {{#babel:en|es-1}} ==Research== * [[Wikiversity:Developing Wikiversity through action research|Developing Wikiversity through action research]] - main research page I'm using a [http://cormaggio.org/ blog] and a [http://www.cormaggio.org/wiki/index.php?title=Main_Page wiki] to help document and facilitate my research, but I also intend to carry out much (if not most) of this on Wikiversity itself, particularly as we have developed this project with the potential for actually ''doing'' [[Wikiversity:Research|research]] (though these [http://beta.wikiversity.org/wiki/Wikiversity:Scope_of_research/En guidelines] still need to be developed). ==Courses== * I participated for a while in [[Action research/AREOL25|AREOL25]] (course home page [http://www.scu.edu.au/schools/gcm/ar/areol/areolhome.html here]), until I lost track of a few weeks' emails, and gave up. :-( * Hoping to participate in David Wiley's [http://opencontent.org/wiki/index.php?title=Intro_Open_Ed_Syllabus Open Ed Intro course] - but didn't :-( * [[Composing free and open online educational resources]] - beginning March 3rd 2008 ==Conferences== * [[Learning and learning about learning in Wikiversity]] (Paper at [[Wikimania/2007|Wikimania 2007]]) * [[User:Cormaggio/ALT-C|ALT-C resources]] ([http://www.alt.ac.uk/altc2007/timetable/abstract.php?abstract_id=1318 details]) * I'll be participating in a [http://wiki.cetis.ac.uk/ECSIG_May08_meeting ECSIG meeting] on "openness", in which I'll be outlining Wikiversity and its implications for education (see [http://wiki.cetis.ac.uk/Creating_open_content_for_Wikiversity notes]) * [[Collaborative research on Wikiversity]] (paper for Wikimania 2008) ==Statistics== At '''{{CURRENTTIME}}, [[{{CURRENTMONTHABBREV}} {{CURRENTDAY2}}]], [[{{CURRENTYEAR}}]]''' ([[UTC]]): {{NUMBEROFPAGES}} pages, {{NUMBEROFARTICLES}} articles, {{NUMBEROFFILES}} files, {{NUMBEROFUSERS}} users & {{NUMBEROFADMINS}} admins; version {{CURRENTVERSION}} * At 22:27, Jan 23, 2007 (UTC): 20,606 pages, 1,628 articles, 892 files, 5,725 users & 14 admins; version 1.10alpha (r19597) ==Bureaucrat== I was made an English Wikiversity bureaucrat as a temporary measure on the project's first day, and held that lonesome position for quite a while (unnecessarily long as I subsequently found out), since when I've been joined by [[User:Sebmol|Sebmol]]. If you need any assistance, you can '''[http://en.wikiversity.org/w/index.php?title=User_talk:Cormaggio&action=edit&section=new leave me a message]''' on my [[User_talk:Cormaggio|talk page]]. If it's a general custodian (ie "admin") query, you might be better off with [[Wikiversity:Request custodian action]], as this is monitored by all custodians, not just me. ==Some things I'm interested in doing== *Write research-related guidelines (eg. [[Wikiversity:Research]] and [http://beta.wikiversity.org/wiki/Wikiversity:Scope_of_research/En on Beta]) *Help out on providing a comprehensive and easy-to-follow tutorial on '''what Wikiversity is, and how you can contribute and/or benefit from it'''. *Help in providing a framework for building Wikiversity, which I don't really think exists yet (so far, it's a bit piece-meal, and particular learning materials are connected with particular pedagogies, without making that explicit) **Develop [[School:Education]], [[Wikiversity:Learning]], [[Wikiversity:Disclosures]] *Work on [[Media literacy]] (and all my other interests), hopefully learning about what will work on Wikiversity through that process **[[Making an educational video]] *Metadata - what's happening on that front, I wonder..? *Participate in [[Portal:Audio engineering|Topic:Audio Engineering]] - learn about making music ==[[Portal:Learning Projects|Projects]]== *[[Learning to learn a wiki way]] *[[Wikiversity:Wiki as a tool for learning]] *[[Wikiversity the Movie]] ==Interests== *[[Portal:Media]] *[[Wikiversity:Research|Research]] *[[School:Education|Education]] ==Workspaces== *[[User:Cormaggio/My? research]] *[[User:Cormaggio/Visions of Wikiversity]] *[[User:Cormaggio/Issues for Wikiversity]] *[[User:Cormaggio/Ongoing discussions]] ==Contacts== *[http://www.teachforward.org/ Teachforward] and [http://wikimania2006.wikimedia.org/wiki/Proceedings_talk:KD1 Rob and Kevin's Wikimania talk talkpage] *[http://wikigogy.org/Main_Page Wikigogy] (yet to contact) *[http://www.cnx.org/ cnx.org] Very interesting resource - see [[Wikiversity and Connexions collaboration]] *[http://www.teachingforthefuture.com/ Teaching for the future] (blog on technology and education) *[http://academia.wikia.com/wiki/User:MartinY MartinY at academia wikia (Yorkshireman)] [[de:Benutzer:Cormaggio]] [[es:Usuario:Cormaggio]] [[fr:Utilisateur:Cormaggio]] [[it:Utente:Cormaggio]]

:thinking: which shard/example is this?

It looks like huggingface was picking up the .../raw/documents/*.jsonl.gz files to display in the dataset preview.
I uploaded a metadata file that restricts the dataset viewer to the `.../v0/documents/*jsonl.gz" files, now it seems to be showing the cleaned versions

It look like wtf_wikipedia only removed some of the in-line html/css. The original version has a lot more markup

[[Wikibooks:Featured books|Featured books]] •
[[Wikijunior|Wikijunior]] •
[[Cookbook:Table of Contents|Cookbook]] •
[[Wikibooks:Card Catalog Office|Browse books]] •
[[Help:Contents|Help]] •
[[Wikibooks:Reading room|Forum]] •
[[Using Wikibooks]]

[[Wikibooks:Welcome|Welcome]] to [[Wikibooks:What is Wikibooks|Wikibooks]],

the open-content textbooks collection that [[Help:Contributing|anyone can edit]].

[[Wikibooks Stacks/Departments|{{NUMBEROFBOOKS}} books]] with [[Special:Allpages|{{NUMBEROFARTICLES}} pages]].

* [[Department:Computing|Computing]]
* [[Department:Engineering|Engineering]]
* [[Department:Humanities|Humanities]]

* [[Department:Languages|Languages]]
* [[Department:Mathematics|Mathematics]]
* [[Department:Miscellaneous|Miscellaneous]]

* [[Department:Recreational activities|Recreational activities]]
* [[Department:Science|Science]]
* [[Department:Social sciences|Social sciences]]

* [[Department:Standard curricula|Standard curricula]]
* [[Department:Wikijunior|Wikijunior]]
* '''[[Wikibooks Stacks/Departments|All subjects]]'''

{{:Main Page/Featured}}

{{:Main Page/Wikijunior}}

{{:Main Page/Recipe}}

{{Promoted shelf|title=Shelf:Games|cover=Chess_board_blank.svg|desc=[[Shelf:Games]] contains books on games, and includes the subsection shelves [[Shelf:Athletic games|athletic games]], [[Shelf:Board games|board games]], [[Shelf:Card games|card games]], [[Shelf:Electronic games|electronic games]], and [[Shelf:Game design|game design]].}}

{{Promoted shelf|title=Shelf:Computer programming|cover=Openscad SVG.svg|desc=[[Shelf:Computer programming]] contains books on programming, such as [[LaTeX]], [[OpenSCAD User Manual]], [[Python Programming]], and [[Java Programming]].}}

{{Promoted shelf|title=Shelf:Languages of Asia|cover=Taj Mahal in March 2004.jpg|desc=[[Shelf:Languages of Asia]] contains books on Asian languages, such as [[Marathi]], [[Bengali]], [[Kannada]], [[Hindi]], and [[Sanskrit]].}}

{{:Main Page/Sisters}}

[[Category:Main page| ]]

Got it. In that case we may want to do a simple HTML removal pass (via bs4 or whatever). Also, is it an artifact of the dataset viewer that there are no newlines?

Also, is it an artifact of the dataset viewer that there are no newlines?

Yeah it must be, the actual data has \ns in it, and everything looks right if you pass an example to print in python

Got it. In that case we may want to do a simple HTML removal pass (via bs4 or whatever)

I tried this out, it seems a bit non-trivial/bs4 isn't well suited to remove html fragments in the text, the main issues are:

People talk about code and have examples, these get stripped out
People talk about code that look almost like an html tag (regex with < for example) and that crashes the html parser (can pass through, but it stops the removal of other html from the page)

It also doesn't seem very consistent, for example: The div in the example above gets removed, but this div in another example doesn't
...
Yours, Keegan Peterzell Community Liaison, Wikimedia Foundation 23:06, 17 March 2015 (UTC)\n\nRenamed\n
 This account has been renamed as part of single-user login finalisation.
...

Not sure what the difference is, it isn't something like the divs gets closed in one example but not the other, they are not closed in either example

I'm less worried about the example code getting stripped out (a small price to pay to make the rest of the text much more "natural"). I'm surprised the parser is brittle to things that "look like" an HTML tag, that's too bad - I would also guess that's parser-dependent though? And it's bizarre that the one of the divs is removed and not the other. I don't want you to go down a rabbit hole, so I will ask around a little.

Poking around a little more I'm mostly seeing unclosed  and  tags - I wonder if we can just strip those out via simple postprocessing?
Separately there are many very short pages (many of which are almost empty user talk pages). Probably worth doing some heuristic filtering to remove them (though this could be done before training, not to the dataset itself)

Are most of these unclosed tags coming from any particular source/namespace/shard?

Poking around a little I see them on wikinews, wikibooks, wikiversity, etc... and apparently across shards.

To be conservative, I only stripped out div and font tags to start with (<(div|font).*?> instead of something like <.*?>).
There were 115,201 tags that got stripped from 00000_wikibooks.com.jsonl.gz
There didn't seem to be any false positives (i.e. real looking that gets removed), but a few have a title field, but only like 4 so I don't think it's worth trying to put the title text into the plain text. Examples:
      1 "
"
      1 "
"
      1 "
"
      1 "
"

I'll look through it later, but if you noticed any other tag types that were common let me know. I won't be able to actually run the processing until later

Thanks. If we want to be more thorough we could write a little script that searches for HTML tags and dumps out the most common of them (if there are 115k div/font tags in one shard, they are probably overrepresented compared to tags that would appear otherwise in example code).


Source and pip versions mismatch

Hi,
I noticed that the version available via pip (1.0.12) is not the same as the one in this repository (latest commit appears to be 1.0.0). Is the updated source available somewhere else?
Thanks.

Hey @carlosafonso, sorry for the delay, I have updated the version.

Thanks.


Button added succesfully

Issue no. - #539
Hi, @PoorviShetty ,I have added the new button

My branch name is Adityamishra9719
Please merge it .
Thank you

Hi, there seems to be a merge conflict, please resolve it


Twitter report: Text in root Information pop up can't be scrolled (App is unusable)

Avoid duplicates

[X] Bug is not mentioned in the FAQ
[X] Bug is specific for Android only, for general issues / questions that apply to iOS and Android please raise them in the documentation repository
[X] Bug is not already reported in another issue

Technical details

Device name: Samsung Galaxy A5 (2017)
Android version: 8.0.0
App version: 2.16.2

Describe the bug
The text in the root information pop up can't be scrolled. This leaves some apps unusable, as the buttons to continue are not reachable.
Steps to reproduce the issue

Root your device
Start the app
See the pop up and try to scroll the text down
Notice that this does not work

Expected behaviour
The text should be scrollable.
Additional context
This report is based on feedback I received on Twitter: https://twitter.com/RchMichele/status/1488434394092220417?s=20&t=4hDpPxnYTpYNOlVRxlitdw

Internal Tracking ID: EXPOSUREAPP-11676

Internal Tracking ID: EXPOSUREAPP-11676

@Ein-Tim Thanks for forwarding this issue. Could you suggest maybe this workaround: Decrease font size in system settings, click away the notification, and then the user can increase font size again. Might help(?)

@dsarkar
I have transferred the suggestion!

I think this is the fasted fix ever, #4778 fixes this and merges into release/2.17.x, so this will be part of the version 2.17.2 hot fix!
Thank you @mtwalli!!


fix memory leak by setting logger for controller-runtime in keda-adapter

Set logger for controller-runtime in keda-adapter
Checklist

[x] Commits are signed with Developer Certificate of Origin (DCO - learn more)
[ ] Tests have been added
[ ] A PR is opened to update our Helm chart (repo) (if applicable, ie. when deployment manifests are modified)
[ ] A PR is opened to update the documentation on (repo) (if applicable)
[ ] Changelog has been updated

Fixes #

memory leak of keda-adapter

Related issue

https://github.com/kedacore/keda/issues/1639
https://github.com/kubernetes-sigs/controller-runtime/issues/1122
https://github.com/kubernetes-sigs/controller-runtime/pull/1309

Oof, good catch. KB3 added a fix for this but we're still on 2 >_<

Oof, good catch. KB3 added a fix for this but we're still on 2 >_<

looking forward to the next release~ 😉


Implement Self-CheckIn (EXPOSUREAPP-5747)

The self-check-in on the organizer flow's event card implementation.

When starting the app for the first time, adding a new event and then press "Self-Checkin" I get directly redirected to the screen that shows the event. The initial onboarding screen is jumped over and not shown, it only appears when opening "Check-Ins" the next time.
https://user-images.githubusercontent.com/75120552/113882246-6be95900-97bd-11eb-9acc-18b760b96c74.mp4

When starting the app for the first time, adding a new event and then press "Self-Checkin" I get directly redirected to the screen that shows the event. The initial onboarding screen is jumped over and not shown, it only appears when opening "Check-Ins" the next time.

Good catch. I reused the existing deep-link navigation. So it should be the same as when the user scans QR-code. We should clarify if it's correct or not

When starting the app for the first time, adding a new event and then press "Self-Checkin" I get directly redirected to the screen that shows the event. The initial onboarding screen is jumped over and not shown, it only appears when opening "Check-Ins" the next time.

Good catch. I reused the existing deep-link navigation. So it should be the same as when the user scans QR-code. We should clarify if it's correct or not

I already spoke to @chris-cwa  about that, it should be the same as in ContactDairy shortcuts


Build CUDA 12.0 ARM conda packages.

This PR builds conda packages using CUDA 12 on ARM.
Closes #469.

/merge


Fix erratic remaining balance

Fix erratic remaining balance
corresponding issue: https://github.com/OriginProtocol/origin-dollar/issues/235

Merging this in, happy to address stuff later if needed.


Remove experimental warning for dispatch namespaces

Remove experimental warning for dispatch namespaces since the feature is GA.
Update namespace to dispatch_namespace in upload form.

Tested with Workers for Platforms Example Project.
npm start -w wrangler publish -- --config /path/to/workers-for-platforms-example-project/wrangler.toml

Thanks for the PR @markjmiller - do you mind adding a changeset? (npx changeset)

@penalosa we have a PR ready to merge for docs, but our doc writer won't be able to merge until they get back from holiday vacation. Is that a blocker, or can we merge this now?

LGTM @markjmiller

@markjmiller can you please link the associated docs PR for posterity?

https://developers.cloudflare.com/workers/wrangler/commands/#dispatch-namespace


pkg/trace/api: better responses

This change improves the responses given to clients in case of decoding
errors. Whereas previously we had a response saying simply
decoding-error, now the response will be decoding-error: {actual_error}.

I think it might be better to just produce a value directly derived from an enum, which would make it safer to use as the key for counters on the other side. We don't want to risk broken communication to lead to 1M counters, however unlikely that is to happen.

Honestly I had that thought too. I guess it would possibly be a breaking change now. We might want to introduce better text responses though, and even consider JSON with a key being an enum to help with counters on the other end. I hope I understood what you're saying.
Not feeling fully confident about this change so closing for now.


chore: Setup Azure DevOps Pipeline

LGTM. It would be good if we preserve .visx for manual testing purpose.

Sure. I'll add some steps then.


[Request] modify users picks

anybody have the code for allowing an admin to modify a users picks?
Looks like phppickem.org isn't activating new users and there's no other place for me to find the mod.

This is not a feature I plan to implement at any point.  This could enable a person to potentially cheat.


CSS variables (with PostCSS) don't seem to work in lib files

Describe the bug
I'm trying to replace SASS with PostCSS. I have a PostCSS file that contains my CSS variables (e.g. colors, custom media queries etc.). I'm using postcssPresetEnv to enable the following future CSS features: nesting-rules, custom-media-queries and media-query-ranges.
The issue is that CSS variables related to custom media queries work fine in the files present in my routes directory (+page.svelte files) but don't work for files present in the lib directory (components mainly). Also, everything works in dev mode but not in production. Other CSS variables for color work in all files. Not sure if this is a SvelteKit issue, PostCSS issue or something wrong with my config.
Reproduction
Install latest sveltekit and use the PostCSS Svelte adder along with postcssPresetEnv with the following config:
import preprocess from 'svelte-preprocess';
import adapter from '@sveltejs/adapter-auto';

/** @type {import('@sveltejs/kit').Config} */
const config = {
	kit: {
		adapter: adapter()
	},

	preprocess: [
		preprocess({
			postcss: true
		})
	]
};

export default config;

Additionally, I've added lang = "postcss" to all my style tags
Logs
No response
System Info
System:
    OS: macOS 12.5.1
    CPU: (8) x64 Apple M1 Pro
    Memory: 256.03 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.15.1/bin/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm
  Browsers:
    Brave Browser: <IP_ADDRESS>
    Firefox: 104.0.2
    Safari: 16.0
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.75
    @sveltejs/kit: next => 1.0.0-next.484
    svelte: ^3.44.0 => 3.50.1
    vite: ^3.1.0 => 3.1.2

Additional Information
postcss.config.cjs:
const autoprefixer = require('autoprefixer');
const postcssPresetEnv = require('postcss-preset-env');

const config = {
	plugins: [
		postcssPresetEnv({
			stage: 3,
			features: {
				'nesting-rules': true,
				'custom-media-queries': true,
				'media-query-ranges': true
			}
		}),
		autoprefixer
	]
};

module.exports = config;

Please include an actual reproduction, as requested in the issue template

Closing due to inactivity and lack of a proper reproduction.


Fixed unless check in grant_role so that it can grant roles to superusers

Updated version of PR#801 (sorry, I had a bit of a git fail and accidentally closed the last PR)
This is my fix for MODULES-3967, an issue where grant_role did not work with superusers.

great work, thanks for this @crispygoth !


Elements > Checkbox Group >In control state select Error Checkbox spacing issue

While going through the application process, found following issue,
Actual Result:

Checkbox Group In controls state select Error Checkbox spacing issue.

Screenshot:

Completed-


Big atomic update to cf-icons

Default usage of icons required an empty elem because the font family was set on the elem level. This change restricts the font-family to the pseudo-elem allowing icons to be used with standard text. This change will eliminate the duplicated icon classes in cf-buttons and cf-typography. Icon only elems can still be used by adding cf-icon__before the existing class list.
Changes

Updated the cf-icon class to be a mixin only, so that it's not duplicated when cf-icon-prefix is set as cf-icon.
Updated the pseudo elem to only include an icon when a modifier class is used, this is important to mix icons into elems with normal text like buttons, links, etc.
Removed IE7 support because the hack stopped working.

Testing

check out this branch and run npm run link
check out Sandbox branch example/cf-icons and run npm run link
run npm start
check http://localhost:3000/components/cf-icons/

Review

@Scotchester
@KimberlyMunoz

Screenshots
Everything's the same
Notes

Adding the __before modifier is a small but necessary hurdle to making this possible. The benefit of removing 20kb of duplicated code outweighs that extra work.

Todos

Remove the duplicated icon code through the rest of the project.

Checklist

[ ] Changes are limited to a single goal (no scope creep)
[ ] Code can be automatically merged (no conflicts)
[ ] Code follows the standards laid out in the front end playbook
[ ] Passes all existing automated tests
[ ] New functions include new tests
[ ] New functions are documented (with a description, list of inputs, and expected output)
[ ] Placeholder code is flagged
[ ] Visually tested in supported browsers and devices
[ ] Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)

I'm not a big fan of the before/after classes as opposed to the empty elements. The empty span elements can be controlled with an aria-hidden to avoid reading nonsense to a screenreader, but using pseudo-elements is a little riskier. Hopefully when y'all switch to SVGs this won't be a big deal, but until then, there's some accessibility concerns I'd test with Jennifer Horan.

@KimberlyMunoz If we were to continue using the empty elems with the __before class, but removed the already in use psuedo specific elems in buttons and links in favor of this approach, do you see any accessibility issues?

Someone would have to test, but my guess is that it probably won't be worse than what we have now. The icon fonts just do funny things with what they read out to screenreaders.

Yeah, my hope is once we move to svg, we'd have the option of using the image with either the content or background of the pseudo-elem and solve any accidental screen readings. I'm glad you pointed out the aria rule, it doesn't look like we're currently using it on the empty icon elems in production. It's definitely something we need to fix.
I've tested with VoiceOver and that currently skips the icons. I'll try and set something up with Jennifer to test with Windows.

Thanks! I know this is something that still has a ways to go, so I appreciate the progress being made here!

@Scotchester Fixed the issue in your last comment by creating a reusable mixin that contains all of the chained pseudo elems


Passing no-tablespaces flag into drush sql-dump for task

Checklist

[ ] Affected Issues have been mentioned in the Closing issues section
[ ] Documentation has been written/updated
[ ] PR title is ready for changelog and subsystem label(s) applied

Explain the details for making this change. What existing problem does the pull request solve?

Closing issues
Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if such).

ok (another comment incoming about the drush version command) but broadly this works on Drush9/10
in Drush 8, the issues in https://github.com/drush-ops/drush/issues/4489 arise, namely that whilst the dump works, it doesn't truncate the cache or watchdog tables, resulting in a potentially enormous backup.
Will continue digging

so, to replicate the truncating of a "common" structure-tables-list
$command_specific['sql-dump'] = array('structure-tables-list' => 'cache,cache_*,history,sessions,watchdog,feeds_log');
drush sql-dump --extra=--no-tablespaces | grep -Ev 'INSERT INTO `(cache|cache_|history|sessions|watchdog|feeds_log)' | gzip > $file.gz

or similar via awk (fewer matches for brevity)
drush sql-dump --extra=--no-tablespaces | awk '!/INSERT INTO `cache_ && !/INSERT INTO `watchdog' | gzip > $file.gz

The question is - do we want to define which tables aren't dumped for customers....

ok - going to press ahead with this - large dumps are better than broken dumps.


Suggestion: The object primitive type

The object primitive type
This proposal describe a new primitive type for typescript object.
Use case
JavaScript core api contains some functions that takes object as parameter :

Object.getPrototypeOf
Object.getOwnPropertyDescriptor
Object.create
...etc

Currently there is no way in typescript to prevent passing other primitive type (string, number, etc ...) to those functions.
For example  Object.create('string') is a perfectly valid typescript statement, even if it will ends up with an error.
Creating a new object primitive type would allows to model more correctly the signature of those function, and every function that share similar constraint.
Type Checking
Assignability
The object type is the equivalent of {} minus the assignability of other basic type, that means that :

any other basic types are not assignable to object
any non-basic type is assignable to object
object is only assignable to {} and any

This behavior is coherant to how javascript works, the type represent every value that respect the constraint typeof value === 'object' plus undefined.
Type guard
A new type guard has to be introduced for object : typeof value === 'object'.
Optionally the compiler could also accept comparaison with the Object function cast : Object(value) === value.

It'd be useful to list some APIs other than the Object. functions which would benefit from this.

In the javascript core api except from Object only perhaps some es6 constructs will benefit from this (WeakMap, Proxy etc).
But for example every underscore collections function would also gain better typing, framework like React use a 'setState' method that accept only object or null, ImmutableJS, Mori etc etc.

Discussed at suggestion review meeting. This all makes sense, but we need to justify the complexity of a new primitive type with the number of errors / richness of description it is able to provide. Basically, more examples of APIs that can't operate on primitives, especially ones that aren't "expert" APIs (e.g. Proxies)

Posting more as reference than recommendation :wink:
interface String { _primitiveBrand?: string; }
interface Boolean { _primitiveBrand?: boolean; }
interface Number { _primitiveBrand?: number; }

interface ObjectOnly {	_primitiveBrand?: void; }

function fn(x: ObjectOnly) { }

// Error
fn(43);
// Error
fn('foo');
// OK
fn({});
// OK
fn(window);

+1 on this proposal. I wouldn't consider WeakMap an "expert" API, but I do consider it reason enough alone to implement this. Since the runtime makes a distinction between object types and primitive types, it only makes sense to have a facility in TypeScript to make the distinction as well.
This proposal will also solve the problem of typing "object bags" where each property is optional, but other primitive types should be disallowed.

Object.observe requires a non-primitive target as well: http://arv.github.io/ecmascript-object-observe/#Object.observe

I think the title is a bit confusing since it mentions the word "primitive". This could alternatively be called the "ECMAScript object type" or the "Runtime object type". Which would be assignable from anything other than primitive types (including undefined type and symbols), function or constructor types. The criteria for what is a legal object type should be based on the following guard:
let isObject (x) => typeof x === "object";

According to MDN, this is the output of typeof:
Undefined: "undefined"
Null: "object" (see below)
Boolean: "boolean"
Number: "number"
String: "string"
Symbol (new in ECMAScript 2015): "symbol"
Host object (provided by the JS environment): Implementation-dependent
Function object (implements [[Call]] in ECMA-262 terms): "function"
Any other object: "object"
Without this type, there is no to correctly match a precise type for the above mentioned guard, not even as a user-defined guard. This is also essential for use with any function that strictly requires an object that has properties and allows for in loops and calls to the Object prototype, and for implementing generic constraints like T extends object and then safely referencing properties or using the prototype functions.
Having functions and constructors excluded, though, would be a bit limiting in some cases, so there could be another type that would include them as well and called the "non-primitive object type". A partial workaround could be the union Function | object though casts or additional guards would be needed to handle it correctly.

Accepting PRs. This seems to be a common problem; this will be a breaking change for anyone brave enough to have written interface object { ... }. Implementation should be straightforward and follows the rules outlined above.
Side note: We're all wondering where @fdecampredon has been!

@RyanCavanaugh Change of town of work, and unfortunately not a lot of typescript in my new job :D

Great. I want to use this type in TS1.8.

I would also like to see something like an object type. However, I question whether it should conform to typeof value === 'object', as this would exclude functions. Instead, it seems to me that the prospective object type should reflect the Object language type, which includes functions. There are a few reasons for this:

APIs that accept plain objects always, as far as I know, also accept functions.
Functions inherit from the Object constructor.

I'll take these in order.
APIs
APIs such as WeakMap that only take objects accept the Object language type, not just plain objects. The following is ok:
function theAnswer() {}

let map = new WeakMap();

map.set(theAnswer, 42);
console.log(map.get(theAnswer)); // 42

This is as true for custom APIs as it is for built-in APIs. If I expect an object, I usually just want a bundle of properties. Functions are just callable bundles of properties.
Inheritance
Since Function extends the Object constructor, we can use the static and instance methods available on Object on functions as well. For example, the following is possible:
class DeepThought {
  static getAnswer() {
    return 42;
  }
}

let computer = Object.create(DeepThought);

console.log(computer.getAnswer()); // 42
console.log(Object.getPrototypeOf(computer)); // [Function: DeepThought]

While the example above is a bit silly, it just illustrates that APIs that use the Object methods internally could just as well accept functions.
So I would suggest that the object type conform to the following, which corresponds to the Object language type (except that it includes null, but there's no guarding against null in TypeScript in any case).
function isObject(value) {
  return typeof value === 'object' || typeof value === 'function';
}

Use Case
I have a project called Deep Map that recurses through the key-value pairs of nested objects and transforms primitive values along the way. As such, it distinguishes between primitive and non-primitive types. I had to define a custom NonPrimitive interface, as follows:
interface NonPrimitive {
  [key: string]: any;
  [index: number]: any;
}

export class DeepMap {
  // ...
  private mapObject(obj: NonPrimitive): NonPrimitive { /* ... */ }
}

This is not the first time I've had to define the NonPrimitive interface. It would be nice if I could just do this:
export class DeepMap {
  // ...
  private mapObject(obj: object): object { /* ... */ }
}

As I suggested above, I don't really care whether the obj parameter is callable or not. All that matters is that it is of the Object language type, i.e., that it is a bundle of properties whose key-value pairs I can iterate through.

I would agree that functions are objects. The intent is to exclude primitives.

Ok, I thought that must have been the intent. I just thought maybe I was missing something with all this talk of typeof value === 'object'.

would this object type allow ad-hoc property assignment (like any)?  For example:
const foo: object = {};

foo.bar = 'baz';

No

What's the practical difference between
export class DeepMap {
  // ...
  private mapObject(obj: object): object { /* ... */ }
}

and
export class DeepMap {
  // ...
  private mapObject(obj: Object): Object { /* ... */ }
}

? (Using object vs Object). It seems to me that a Function extends from Object, so I don't see why we can't already do that. Can you explain?

@trusktr All values other than null and undefined are assignable to the Object type; a function that accepts an Object will take a string, number, boolean, or symbol. Only non-primitive values are assignable to object; passing a string, etc, will produce a compile-time error. The object type is useful where we expect a non-primitive value, but where we don't care what its properties are.


Crashes when built for Catalyst on M1

Catalyst support is not complete for Letterbox. At the moment Letterbox compiles and runs on Catalyst M1 only, using My Mac (Designed for iPad) as target.
Two classes of crashes have been found:

Crashes on layoutIfNeeded.
Crashes on date components formatting.

The date components formatting crash occurs because the time is sometimes infinite, most notably when opening AOD content. I pushed a fix onto the feature/catalyst-fixes branch.
The other crash is a deeper issue probably related to Catalyst itself. Not sure this is something we can fix without reporting the problem to Apple directly. A sample project using layoutIfNeeded in a similar way as Letterbox should probably give us more insights.
What is unclear, though, is how these issues affect real code built for the App Store. With Letterbox demo built in debug mode and running on an M1, the layoutIfNeeded crash occurs with any kind of content, while this is not the case with Play installed from the App Store on M1. On the other hand, opening an AOD in Play crashes, like it does in Letterbox demo debugged on M1, and though this crash seems more related to an assertion.
My proposal:

We deliver the date components formatting fix on feature/catalyst-fixes and a next version of Play using this version.
We check whether the Play app sill crashes in production when run on M1 and attempting to play an AOD.

If the app otherwise does not crash this means that the layout crash might be only relevant to the project being run with My Mac (Designed for iPad) as target (we cannot enable the Catalyst checkbox officially yet), in which case I would wait until we can properly build the project with Catalyst to see if some bug reporting to Apple is really required.

Crash in production code confirmed to be related to date components formatting: https://appcenter.ms/orgs/RTS-Organization/apps/Play-RTS-1/crashes/errors/481926084u/overview


Fix NPE in vSphere etcd machine datastore usage calculation

The vSphere datastore usage logic for etcd machine configs has a bug in the specific scenario where we upgrade from a stacked etcd cluster to an unstacked etcd cluster. In this case, the previous cluster's ExternalEtcdConfiguration object will be nil, but we try to access its Count field without checking for nilness, which causes a panic in the validation phase. This PR adds a nil check to the object so that we can safely dereference it, along with unit tests to cover this logic.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/lgtm


UTC

I wanted to also have UTC time listed in my list of timezones - but it isn't exactly a city.
Any suggestions?

I would love it too. @jaroslawhartman what do you think?

@tcurdt hey man, I created a workflow for this.
Can you test it out and let me know if it works as expected?  :)
BTW this PR should be closed as this feature request is maybe out-scope for this project.

Hi guys, I'm not sure if I understand the request. Since a few versions UTC zones can be added to the list; you need to search using keyword timezone add universal:

Best regards,
Jarek

I didn't see the new releases. Thanks!


Export table column names as variables

I'd like the ability to access prisma-defined variables for the table columns.
There's an example on this page
As authored in the docs:
var json = { [{ name: 'Bob the dog' }, { name: 'Claudine the cat' }] }

const getUsers = await prisma.user.findMany({
  where: {
    extendedPetsData: {
      equals: json,
    },
  },
})

I'd like to pass in extendedPetsData as a variable defined in Prisma (possibly enum, or object).
var json = { [{ name: 'Bob the dog' }, { name: 'Claudine the cat' }] }

const getUsers = await prisma.user.findMany({
  where: {
    [prisma.user.keys.extendedPetsData]: {
      equals: json,
    },
  },
})

This would help code fail if someone changes the name of the column, and help keep track of what's queried where.
Just a thought, perhaps useful to others, or maybe workaround exists.

Hey @reggi,
I think I'm missing what you're hoping to achieve here. The Prisma Client generates type definitions based on your Prisma Schema precisely to raise TS errors if your db migrations are breaking.
Suppose you rename the extendedPetsData column. In that case, type definitions will change and TS will let you know that extendedPetsData is not a valid key object in the where clause, which is what you seem to be hoping to achieve with the dynamic key.
Don't hesitate to elaborate if I've missed something

@Weakky  i suppose you're right the typings take care of this case, I still think a string for column names would be useful will close for now.


Incorrect Time Zones Being Returned From PhoneNumberToTimeZonesMapper

Hello,
I've been using the PhoneNumberToTimeZonesMapper to get time zones from phone numbers and I found a few in the United States that are not returning the correct time zone.
Example Test
//Test Wisconsin
String phone = "5342201462";
String country = "US";
PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
PhoneNumberToTimeZonesMapper phoneTimeZoneMapper = PhoneNumberToTimeZonesMapper.getInstance();

List<String> timeZoneList = phoneTimeZoneMapper.getTimeZonesForNumber(phoneUtil.parse(phone, country));

assertTrue(timeZoneList.size() == 1);
assertEquals(timeZoneList.get(0), "America/Chicago"); //Fails, America/Los_Angels is found.

Results can be found at the repository
PhoneNumberToTimeZoneTestResults
Below is a description of the columns
Phone Number: The phone number tested. Phone numbers were derived from area code/prefix combos found at the following sites.

allareacodes.com

Searching for an area code will bring up what prefix’s are valid.

nanpa.com

Clicking on the state code will display the area codes.

Country Code: The country code used with the phone number.
Expected State: The state the area code/prefix should belong to.
Expected Time Zone: The time zone that should be returned. If two time zones are present, it should be one of the two.
Actual Returned Time Zone: What was actually returned as the time zone.
These tests were done with the following jars
libphonenumber:7.0.4
geocoder:2.20
carrier:1.9
prefixmapper:2.20
Thanks

We've update the timezone mapping data. Can you check again?

libphonenumber 7.0.7 has been released. Can you please check again?

I have checked again and I'm getting the same failing results when using the following jars
libphonenumber-7.0.7.jar
geocoder-2.23.jar
carrier-1.13.jar
prefixmapper-2.23.jar
I also updated to the newest javascript version and  now the following phone number is failing
phone number: 50328401
country code: BF

By trying on the demo, the timezone for the US number<PHONE_NUMBER> is already working. If there are many more you think should be fixed, creating a pull requests would be the quickest way to get them fixed.

Yes, sorry, the example above does work now, but my linked repository still has a list of 1,639 phone numbers that still do not work.
PhoneNumberToTimeZoneTestResults
For example on googleLibPhoneIssues_1.csv
Phone:<PHONE_NUMBER> (US)
Should be time zone [America/Chicago]
But is [America/Anguilla, America/Antigua, ...]

Note that the way we derived the timezone mapping is by statistical analysis, so it won't be perfect. That being said, we will be very glad to accept a code patch from you. Please feel free to send us a pull request to address this if you want this to be fixed.

Closing this as a duplicate of the more up-to-date https://github.com/googlei18n/libphonenumber/issues/991.


Add URL to instructions for Postman in "Examine the PostTodoItem create method"

https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-3.0&tabs=visual-studio#test-posttodoitem-with-postman
In the steps to test the PostTodoItem with Postman, need to add the url (https://localhost:5001/api/TodoItems) to the steps (after the request type set to POST)

Moved to https://github.com/aspnet/AspNetCore.Docs/issues/14711
@owens2024 Please use the feedback form at the bottom of any topic. It will add metadata for issue work and automatically pings the author. No worries tho ... I moved it. Track on the new issue.


Adding ruler in leaflet and toggling grids on map.

Is there any way to add ruler to map ?
My requirment is to add ruler on map. Something like this along x and y axis.

I am using leaflet to creat floorplan application and for that I need ruler and grid on map.
Also ,I used SimpleGraticule to draw grid on my floormap.
I need a toggle button or control to switch on or switch off the grids and rulers on map.
Please suggest if this is possible in leaflet to draw ruler on map and also providing toggle to switch it on and off.

This is a good idea for a leaflet plugin, but the leaflet core bugtracker is not the place to ask for help on that.

Do we have ruler or anything like that , that i can use ? Also the toggle?

I don't see any rulers on the leaflet plugins page. If it's not there, it probably doesn't exist.
A toggler to enable/disable a graticule is trivial to do:
var map = L.map(...);
var graticule = L.graticule(...)

function toggleGraticule(){
   if (map.hasLayer(graticule)){
      map.removeLayer(graticule);
   } else {
      map.addLayer(graticule);
   }
}

Thanks alot Ivan . It worked :)