Implemented basic views for an Apple Watch app using the Recent and ...

...Bookmarked stops to create a glance and simple app for checking arrival times.
Greetings. I didn't see anything on the list for supporting the Apple Watch, but this is a feature that I want (as do some of my friends and co-workers).
This is a fairly simple implementation that is limited to ONLY displaying information about your bookmarked stops (with filtered routes) and your most recent stop.  The "Glance" looks for the two next buses that will arrive to any stop that is within the bookmark group or recent stop that is closest to you (if current location is allowed) or your most recent stop if it is not.
I made very few changes to the iPhone project, though there were a few that were required in order to support the watch implementation. B/c the project supports iOS 6, I couldn't use shared code without a lot of changes to the iPhone app. To limit those changes I created some simple model objects that I grouped in the Apple Watch project and added the suffix "WK" to differentiate them from the base iPhone app implementations. They use a simple KVO pattern to parse the json.
Anyhow, hope you like it.

@syoung-smallwisdom - sorry I didn't reply sooner. The PR email seems to have been buried somewhere in my inbox. It looks like the Travis failure will be resolved "soon'ish": https://github.com/travis-ci/travis-ci/issues/3373
I should (fingers crossed) have an   Watch on Friday, and I can—assuming on-device testing is there on day 1—take a better look into this then. Otherwise, 2,000+ LOC is a lot to review. Thanks, by the way, this is awesome!

@aaronbrethorst
Thanks for your patience.  Yeah, it's a lot of code.  Worth keeping in mind that a bunch of it is setup files and the "scaled down object model" I'm using as a work-around to not being able to create a shared embedded library targeting iOS 6.
And yes, really curious to see if this actually works when it's not the simulator.  ;)

I'd recommend looking into the possibility of building a framework by adding model files both to the framework and OBA targets. It'll result in some binary bloat, but I'd guess that would be a megabyte or three or so at most, which is a totally reasonable outcome as far as I'm concerned.
Sent from my iPhone

On Apr 21, 2015, at 5:43 PM, Shannon Young<EMAIL_ADDRESS>wrote:
@aaronbrethorst
Thanks for your patience. Yeah, it's a lot of code. Worth keeping in mind that a bunch of it is setup files and the "scaled down object model" I'm using as a work-around to not being able to create a shared embedded library targeting iOS 6.
And yes, really curious to see if this actually works when it's not the simulator. ;)
—
Reply to this email directly or view it on GitHub.

I emailed Travis CI and got us access to the Xcode 8.2 test boxes. Simply add osx_image: beta-xcode6.2 to .travis.yml to access the new infrastructure. We're also on a list to be notified when Xcode 6.3 is ready for testing.

Updated .travis.yml file and changed NSString properties to copy.

@syoung-smallwisdom - when trying to build I'm getting this error:
error: The value of WKCompanionAppBundleIdentifier in your WatchKit app's Info.plist "BUNDLE_IDENTIFIER" does not match the bundle identifier of your companion app "BUNDLE-IDENTIFIER".

Can you say why you changed that value?

@syoung-smallwisdom looking good! there are some rough edges here and there to polish, but it's working! https://twitter.com/aaronbrethorst/status/591832686538272768

@aaronbrethorst
I have re-submitted since it was not working on my Apple Watch. I think that the requests were taking too long to fetch.  When I'd originally done this, I'd thought that the requests for stop info were cached but turns out a slow network connection makes a difference.  If the requests take too long, then the openParentApplication doesn't reply.
Additionally, I'm tired and adding the script for replacing the BUNDLE_IDENTIFIER and GIT_COMMIT_SHA flags was too much for my brain. I included the GIT_COMMIT_SHA change in a separate commit.
This adventure definitely got more complicated than I'd originally thought it would. Can definitely see a future where a shared library would not only be "nice" but necessary b/c the next "want" would be to add "search for buses near my current location".

@aaronbrethorst @syoung-smallwisdom There is a OSX network link conditioner that you can use to "simulate" adverse network conditions.   I have not tried it with Apple Watch sim, but it may be something of use for us to test with.

@beliyd
The Apple Watch app actually runs as an extension on the iPhone, so yes, the network simulator will work for the watch as well.
@aaronbrethorst
So... this was an interesting experiment and I will leave it up for a few days so you can test or pull the code if you would like. I cannot recommend it (as is) for submission for a couple of reasons. First, the number of work-arounds to a shared SDK that I had to do are fairly substantial at this point and should be refactored to be in the shared library. Second, for the life of me, I cannot figure out the magic for getting the Glance to update consistently. It will work for a while and then will stop updating and will show stale data. No idea why and I just don't have the time to look into it right now. Sorry.

No apologies needed, this is awesome! :) I'll happily help shepherd this through to the App Store. Thanks again for your help. Since you know about ten times more about building WK apps than I do at this point, I may ping you for help.
Sent from my iPhone

On Apr 25, 2015, at 10:43 PM, Shannon Young<EMAIL_ADDRESS>wrote:
@beliyd
The Apple Watch app actually runs as an extension on the iPhone, so yes, the network simulator will work for the watch as well.
@aaronbrethorst
So... this was an interesting experiment and I will leave it up for a few days so you can test or pull the code if you would like. I cannot recommend it (as is) for submission for a couple of reasons. First, the number of work-arounds to a shared SDK that I had to do are fairly substantial at this point and should be refactored to be in the shared library. Second, for the life of me, I cannot figure out the magic for getting the Glance to update consistently. It will work for a while and then will stop updating and will show stale data. No idea why and I just don't have the time to look into it right now. Sorry.
—
Reply to this email directly or view it on GitHub.

@aaronbrethorst , @beliyd, Hi guys, thanks for all your help and reviews.
I'm going to close this pull request. I've been testing it for a couple of weeks now and I was able to fix some issues but...
The problem is in the limitations of the Apply Watch. Because the only code that third-party devs have access to is on the iPhone (and not running on the watch itself) there is no way of guaranteeing that the information displayed on the watch's Glance isn't stale. Specifically, when your glance is shown, the watch is suppose to send -willActivate to the phone, and eventually it does. The phone can react to that and send a message to the phone to clear stale data, and again, eventually it does.
The problem is that word "eventually". Meanwhile, the watch is showing stale data which can be very confusing. The only thing the dev can do is hint at the state, by using a WKInterfaceDate element to display the current time. Since this is also stale for a stale view, it will be incorrect and the user could say to themselves, "Wait, it's not 4pm, it's 8am. That's not right". Of course, then the user blames the app for confusing them. sigh (I've been reading user reviews that say basically this.)
With v1 of the Apple Watch, I am not really sure how to resolve this so that the UI/UX isn't confusing and inaccurate. Ideally, Apple will provide an option to expire the content and allow the display to change to a loading state prior to displaying that stale data to the user, but currently they do not.
Bit of a bummer. Since you have access to the code, you might play with it a bit yourselves and see what you think.


Write compiled output to stdout

It doesn't seem possible to compile and output to stdout. There was some discussion on CodePlex before the migration to github: https://typescript.codeplex.com/workitem/600

I wanted this functionality for compiling little inline snippets of TypeScript within my templates which I could inject back into <script> tags. I wouldn't use it for anything that generated multi-file output.

have you considered typestring?

I agree with @mklement0's proposal. This would be very helpful.
@RyanCavanaugh It seems like you should treat stdout the same as if any filename was passed to the out argument. That will cover the majority of use cases anyway.
The rational for this is wanting to pipe the output to something else, for example a minifier or gzip or ng-annotate or whatever. I think it is likely that people will generally be using this against single files, and using downstream tools to concatenate or whatever.

I agree. You can see the behavior of related node packages such as node-sass, less, coffeescript. Based on the commonalities, I propose:
tsc blah.ts

to print to stdout instead of carrying out the unwanted/unintended IO op with presumed destination name "blah.js"..
tsc blah.ts anotherBlah.js

should write to anotherBlah.js without requiring the --out flag.
There was a proposal somewhere in node community to provide some kind of standard interface for transpiler and linter packages. That would have prevented everyone inventing their own way.

I propose:

tsc blah.ts

> to print to stdout instead of carrying out the unwanted/unintended IO op with presumed destination name "blah.js"

That is a major breaking change in behavior, so we wouldn't be able to do that.

Perhaps this would be best implemented as a wrapper package.

@nicksloan How would you implement it as an external tool? Have tsc write to a temporary file, read it back in, and dump it to stdout? I could do that myself, but I don't want the overhead of an intermediate file.
I think they should just add an --stdout option. Just have it the throw an error if it needs to generate multiple output files.
If you need further control, a Node package as @mhegazy suggested would be ideal. AFAIK, gulp-typescript and other tools have to invoke a separate process and build up a command-line string to do anything. I've hit the maximum command length with other similar tools on many occasions.

How would you implement it as an external tool?

@teppeis has made typescript-simple.

@DanielRosenwasser I assumed  there would be a way to get at the compiler API, and it looks like you guys have made it easy enough. Typescript-simple makes it even easier. Either way, this is a perfectly viable approach.
I wonder if the Typescript team would be open to bundling such a thing as an alternative executable within Typescript once it showed some degree of maturity?

Supporting emitting to stdout by default would have been a good idea a few years back when tsc first came out; but now changing the behavior is a huge breaking change that we can not justify to our customers.
bundling another tool that does mostly what tsc does except slightly different would not be something we would pursue either.
I do not see any harm in taking a dependency on another package that wraps tsc or some of its functionality (e.g. typescript-simple). I think this is a decision you make based on your workflow and other tools you need to support. We have invested in making the API simple and usable to simplify such scenarios, and we will continue to invest into this space moving forward.

Supporting emitting to stdout by default would have been a good idea a few years back when tsc first came out; but now changing the behavior is a huge breaking change that we can not justify to our customers.

@mhegazy Is it possible to add this to the 2.0 release? As npm evolves, I think more people will use npm scripts as a build-tool in the future and for that use-case piping is quite essential to reduce overhead.

@youngroger i would be new typescript-cli tool that does that, or possibly adding a commandline flag to support this if there is enough user demand.

I can only see writing to stdout helpful if that works in watch mode too, but I have no idea how. Writing to stdout is a performance optimization, as is watch mode.
Use case:
tsc -out - -w | ng-annotate -a - > release.js

I can't think of an use case of reading from stdin.

Another question: how do you differentiate between output and message output? I guess we could use standard error as well.

Output errors to console: tsc
Redirect errors to a file: tsc 2> err.txt

@awerlang As I said before, reading from stdin and writing to stdout is useful for composing multiple commands to create a pipeline. It's not a performance optimization, it's a usability improvement.

If typescript wants to be a good Unix citizen, outputting to stdout is a minimal requirement.
For reference, the following does not work, while it should at the very least be supported.
tsc --out /dev/stdout example.ts
error TS5033: Could not write file '/dev/stdout': ESPIPE, invalid seek

@sebastien i like this proposal. i think this will resolve the issue and is not a breaking change. i have filed #4841 to track it.

PRs for #4841 are also welcomed.

@mhegazy This won't resolve the issue for Windows users.

@mnpenner we have not had a complete proposal for this issue so far.

Note that going with the POSIX convention of using - to represent stdout and/or stdin - would also work on Windows.
For instance, reading from stdin and writing to stdout would then take the form
tsc - --out -   # 1st '-' is stdin, 2nd '-' is stdout.

There is a hypothetical backward-compatibility issue, if there are people out there currently using files literally named -, but I don't think that's a real-world concern.
(Going forward, you could still use that filename by specifying ./- to disambiguate.)
As an added convenience, if the input comes from stdin, you could consider outputting to stdout by default, given that no meaningful output filename can be derived; this would:

allow convenient use in pipes; e.g., ... | tsc - | ...
permit the following shortcut for tsc foo.js --out -: tsc < foo.js

Using - would be desirable, but in any case you should be able to write to/read from named pipes as well. I don't get why tsc is seeking on the output file, opening with write mode should be enough.

@sebastien Agreed. Fortunately, it looks like the behavior is an incidental byproduct of tsc using Node.js's fs.writeFileSync() function to write output files. (Why the Node.js function behaves that way, I don't know).
A naïve fix that implements - as representing stdout would be (file tsc.js):
        function writeFile(fileName, data, writeByteOrderMark) {
            if (writeByteOrderMark) {
                data = "\uFEFF" + data;
            }
            if (fileName === '-') {
                process.stdout.write(data, "utf8");
            } else {
                _fs.writeFileSync(fileName, data, "utf8");
            }
        }

A potential problem is that the Node.js documentation states that process.stdout is non-blocking when writing to pipes on Windows, unlike on Unix-like systems - I'm not sure what the implications are.
P.S.: Here's a simple test that you can run in the Node.js REPL to reproduce the problem:
require('fs').writeFileSync('/dev/stdout', 'hello');   # breaks as of Node.js v0.12.7

Interestingly, Linux reports error 'ESPIPE, invalid seek', while OSX reports 'ENXIO, no such device or address'.

So this issue is not really about writing the compiled output to stdout anymore, that was fixed by #5454. This is about making it nice to use, so reading from stdin, writing errors to stderr and accepting - shortcuts, is that right?

That would be a nice addition, given that it's standard practice in UNIX . So yes, - should be aliased to stdin for input and stdout for output.

@sebastien with https://github.com/Microsoft/TypeScript/pull/5454 --outFile /dev/stdout works on *NIX systems.

:+1:
--outFile - on Windows please (neither - nor CON work with 1.8.9).

This issue hasn't had any activity for quite some time. I think that Windows should be supported better, as *NIX can only output to stdout at this point (by specifying --out /dev/stdout).
It seems like the best solution to this, which has been proposed in a few locations (1, 2), is to allow a special value - to --out and --outFile which instructs tsc to, instead of writing to a file, writes to stdout.
Example usage:
tsc src/compiler/binder.ts --out -
tsc src/compiler/binder.ts --outFile -

If a compiler error occurs, the errors will be appended after the emitted output.
I've worked on a very simple implementation for this issue which is essentially just the following in compiler/sys/writeFile
// If `-` is provided as the fileName, output to stdout
if (fileName === '-') {
  process.stdout.write(data, "utf8");
  return;
}

I'm wondering how to author tests for a change like this, and what kind of documentation changes need to happen, and where those go. Thanks.

This would definitely be the expected behaviour from a Unix perspective.

Using --outfile=/dev/stdout works now, but if there is an error on compilation, the error is printed in-place of/alongside the compiled output. This, again, is not standard practice and can cause issues when scripting. To work around this, I use the following.
(tsc -m system ./path/to/file.ts --outfile /dev/stderr 3>&2 2>&1 1>&3-) | someOtherCommand

Because the errors are printed on stdout, I'm telling tsc to print code on stderr, and then switching the file descriptors on it, resulting in errors on stderr, and code on stdout.
Hope this helps someone!

Declining this one - outFile compilations (which is the only place this makes sense) are definitely getting increasingly rare and it's straightforward enough to use ts.transpileModule if you need this in a scripting context of some sort.

This becomes a necessity again. I am currently experimenting with deno. As you know deno and typescript go hand in hand. Node modules on the other hand not really. So ts.transpileModule is not an option at the moment. This issue stops some creative workflow rn.
Why would the result code not be piped to stdout if no --outFile is declared?

Printing to stdout is a basic function for most command line tools. I'm not quite sure why there's such resistance to implement this. It's nice to have DevOps scripts written in TypeScript, but having to set up their own build directories for a CI pipeline is cumbersome and unnecessary because generated JS files are transient and are only needed to complete whatever they are intended to do. On Linux this works:
tsc --module none --outFile /dev/stdout some-script.ts | node

, but it is not portable. Yes, ts.transpileModule works, but I have to copy this same script from a project to a project and maintain any changes to this file across projects.
Mind boggling.

Given a ts file:
var foo = {
    "id": 13,
    "name": "horst",
    "cars": [{
            "brand": "VW",
            "maxSpeed": 120,
            "isWastingGazoline": true
        }]
};

one can get the generated JavaScript to stdout as @gh-andre pointed out:
tsc --module none --outFile /dev/stdout sample.json.ts
var foo = {
    "id": 13,
    "name": "horst",
    "cars": [{
            "brand": "VW",
            "maxSpeed": 120,
            "isWastingGazoline": true
        }]
}

Unfortunately, it doesn't work for getting the declarations onto stdout:
tsc --emitDeclarationOnly --declaration --module none --outFile /dev/stdout sample.json.ts                                                                                error TS5033: Could not write file '/dev/stdout.d.ts': EACCES: permission denied, open '/dev/stdout.d.ts'.

Found 1 error.

I am interested in getting the typescript declaration from a json file
declare const foo: {
    id: number;
    name: string;
    cars: {
        brand: string;
        maxSpeed: number;
        isWastingGazoline: boolean;
    }[];
};

tsc --module none --outFile /dev/stdout some-script.ts | node

This doesn't work if script.ts contains ES Modules import/export syntax
npx tsc --target esnext --outFile /dev/stdout --module none --moduleResolution node script.ts | node --input-type module

@Soberia I struggled with this and other things TypeScript for a bit and then moved my DevOps scripts to JavaScript. Far from ideal, but I cut down DevOps scripts enough to justify some duplication between the main TypeScript app and DevOps scripts. Will probably need to revisit it this year, as both codebases grow, but so far it's simpler to manage for my use cases.


Tooltips: Refactor to ES6 and add support for touch and tab input.

Continued from #8354

Follow-up to our Discord chat.
@bakert, can you take a look? I'm not sure how you manage regressions in your UI.

Looks good, thanks :)


faq component needs some work

source actual questions and answers from other hackathon websites

e.g. do you need to bring food, will there be parking reimbursements

component should be centered

Fixed Added the chage color in the arrow and the text when clicked and the Accordion only push down the items in the same column

resolved in multiple commits


Fix code coverage job

The code coverage job has been failing recently with this error. I think we now need a codecov token in order to upload the results, as seen in the usage documentation for the action. I think we should also bump codecov/codecov-action to v4 at the same time.
@sseemayer I don't have the permissions to create a token in codecov, and I don't have admin access to this repo, so I can't handle the token provisioning myself.

Unfortunately I don't see an option to make you an admin to the repo, but I've added a token secret and bumped the CI tool versions in the attached PR.


Spying on methods when using the composition api

Hello, it seems that when using the options api, it is recommended to create spies for methods before mounting to avoid issues with event handlers that don't have braces (example 1, example 2, example 3).
How would one do the same with the composition api? The following doesn't work, as methods isn't available/exposed when using the composition api?
const spy = jest.spyOn(ComponentName.methods, 'methodName');
// mount stuff
expect(spy).toHaveBeenCalled()

Thanks
Cheers

I think you should be able to do something like:
const wrapper = mount(ComponentName);
const spy = (wrapper.vm.methodName = jest.fn());
await wrapper.get('button').trigger('click');
expect(spy).toHaveBeenCalled();

Feel free to reopen this issue with a concrete example if that doesn't work, but I think I've used this pattern several times with success.

Hello, thanks for looking into this. I created an example project with tests to demonstrate the issue (https://github.com/maurer2/vue3-testing-question). I have two two buttons that have click event handlers. One with parentheses and one without.
 <ButtonComponent
      id="button-2a"
      @click="handleClick1"
/>

<ButtonComponent
      id="button-2b"
      @click="handleClick2()"
/>

The second click handler can be tested like so:
  it('button2 triggers counter update function when clicked', async () => {
    const spy = jest.spyOn(cmp.vm, 'handleClick2');

    await cmp.find('#button-2b').trigger('click');
    expect(spy).toHaveBeenCalled();
  });

This doesn't work for the first one as the following test fails:
it('button1 triggers counter update function when clicked - spied on the fly', async () => {
    const spy = jest.spyOn(cmp.vm, 'handleClick1');

    await cmp.find('#button-2a').trigger('click');
    expect(spy).toHaveBeenCalled();
  });

This seems to only work when performing the spying before mounting the component like so:
let cmp: any
 let spyHandleClick1: any;

 beforeEach(() => {
    spyHandleClick1 = jest.spyOn((ComponentOptionsAPI.methods as any), 'handleClick1');
    cmp = shallowMount(ComponentOptionsAPI, {});
  });

 it('button1 triggers counter update function when clicked - spied before mount', async () => {
    await cmp.find('#button-2a').trigger('click');

    expect(spyHandleClick1).toHaveBeenCalled();
  });

Unfortunately ComponentName.method doesn't seem to be available for components that are written using the composition api, so this workaround doesn't work there. What would be the equivalent to get this working other than always using parentheses for event handlers?
Cheers

Thanks for the use-case 👍
I sadly think we can't do much, as the generated code is fundamentally different between  @click="handleClick1" and  @click="handleClick2()".
See here
Is it really a problem to have to use parens if you want to spy on the handler?
I'll reopen in the meantime, maybe @lmiller1990 or @afontcu will have an idea on how to handle this.

Hello, thanks for reopening the issue. I guess it would make sense to always use parentheses when using the composition api and set v-on-style from eslint-plugin-vue (https://eslint.vuejs.org/rules/v-on-style.html) to always when using the composition api to avoid flaky tests.
I got a somewhat related question regarding the lifecycle methods. If I wanted to check if a function is called on mount, I would do it like before:
let spyRunOnMount: any;

beforeEach(() => {
    spyRunOnMount = jest.spyOn((ComponentOptionsAPI.methods as any), 'runOnMount');

    mount stuff
  });

it('run runOnMount runs on mount', async () => {
    expect(spyRunOnMount).toHaveBeenCalled();
});

With the composition api I would need to return runOnMount function from setup to expose it in the test, but when I register the spy the lifecycle hook has already run and the test fails:
let spyRunOnMount: any;

beforeEach(() => {
    spyRunOnMount = jest.spyOn(cmp.vm, 'runOnMount');
    mount stuff
  });

it('runOnMount runs on mount', async () => {
    expect(spyRunOnMount).toHaveBeenCalled();
  });

Is there some way to test this or is just not possible with components that use the composition api?
Cheers

In that case what I usually really want to check is not that the method itself was called, but rather what it does or that an external dependency was properly called. For example, if I fetch some data on mount, I'll check that the composable that does the HTTP call was properly called:
const mockRaceService = {
  list: jest.fn()
};
jest.mock('@/composables/RaceService', () => ({
  useRaceService: () => mockRaceService
}));

describe('Races.vue', () => {
  test('should display every race', async () => {
    const wrapper = mount(Races);
    await flushPromises();
    expect(mockRaceService.list).toHaveBeenCalled();

I hope this helps. I don't think we'll be able to allow to spy on the method as you would expect, because the model is fundamentally different. Or maybe with some hacky method, but I'm not really sure that's worth the complexity... We've been using the composition API for more than a year, and we manage to test everything in our projects.

Okay, makes sense. Thanks for explanation.

 If you don't mind, I'll close the issue for now, and we can revisit if some other use cases come up.

It doesn't work on my side.
MyComponent.vue
<template>
  <div @click="methodA"> </div>
</template>

<script setup lang="ts">
const methodA = () => {
  console.log("methodA");
  methodB();
};

const methodB = () => {
  console.log("methodB");
};
</script>

MyComponent.spec.ts
import { mount } from "@vue/test-utils";
import MyComponent from "./MyComponent.vue";

it("a", () => {
  const wrapper = mount(MyComponent);
  const spy = jest.spyOn(wrapper.vm, "methodB");
  wrapper.vm.methodA();
  expect(spy).toHaveBeenCalled();
});

=> Error
 expect(jest.fn()).toHaveBeenCalled()

    Expected number of calls: >= 1
    Received number of calls:    0

       7 |   const spy = jest.spyOn(wrapper.vm, "methodB");
       8 |   wrapper.vm.methodA();
    >  9 |   expect(spy).toHaveBeenCalled();
         |               ^
      10 | });

Hello, have you tried adding the parentheses to the event handlers? Vue permits both syntaxes, e.g.
<template>
  <div @click="methodA()"> </div>
</template>

If that doesn't fix the issue, you could turn it into a hook/composable.

Why is there no way to spy on a Composition API method before mount? I am having to go on a major refactoring spree to bypass this limitation. Please don't tell me it is for my own good :)

This is a limitation for <script setu>, it is closed by default unless you do defineExpose.
I don't understand why you need a major refactoring spree - can you elaborate? If you are only refactoring and you need to make make changes to your test code, that's probably a good indication you are testing implementation details (like spying on a specific method).

I have a component method A that calls another method B only when certain conditions are met.
I want to test that by spyOn B.
Does not work.

What is the effect of calling sub1? I'd recommend asserting against that. If you do defineExpose are you able to spy on it?

Let me try defineExpose. Have not used it before.

defineExpose should not change anything, as Vue Test Utils bypasses it to make tests simpler. If it does, please open an issue.
If you already mock the database, then the easiest way to test if everything work is to assert that your mocked database is properly called instead of sub1.
See my comment above https://github.com/vuejs/test-utils/issues/775#issuecomment-883189164


tasks file for k8s_master

TASK [k8_master : Add kubeadm repositories on Master Node] *******************************************************************************************************
fatal: [<IP_ADDRESS>]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added '<IP_ADDRESS>' (ECDSA) to the list of known<EMAIL_ADDRESS>Permission denied (publickey).", "unreachable": true}

If you see EC2 role task file, then you will notice it's waiting for the SSH to come up in last node. That means we are considering, those instances which launched before the last instance's SSH has already started working. By looking at the error it's obvious that there's something wrong in the connectivity, but as per my knowledge I have already allowed all traffic in AWS Security Group. So, I'm unable to understand on which point the connectivity issues is happening.

Please watch the demonstration video & the blog to compare where you made any kind of mistakes - https://github.com/raktim00/Kubernetes-Multi-Node-AWS-Ansible/blob/main/README.md

It's been one week & now I'm closing the issue.


Also need the Indexable Concept to work with LINQ

Worth noting above (as I just found out) that while implement just the IterableConcept will allow you to return collections in "dx" commands, you also need the IndexableConcept to be able to run LINQ like queries over the results (e.g. ".Select(p => ...") - else you just get a very unhelpful "Interface not supported" error in the UI.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: f4f952be-abb7-35e1-8519-604376cbb7c0
Version Independent ID: 40874646-a80d-c505-61b4-e04759beac1b
Content: IIterableConcept (dbgmodel.h) - Windows drivers
Content Source: wdk-ddi-src/content/dbgmodel/nn-dbgmodel-iiterableconcept.md
Product: windows-hardware
Technology: windows-devices
GitHub Login: @DOMARS
Microsoft Alias: domars

@billti - I checked with the dev team and they indicated that you should be able to use the dx command and LINQ by just implementing IIterableConcept interface, so closing this as a docs issue.


Dependency on "ondat" addon which is apparently in "migration mode" breaks terraform init

When I run terraform init I get this:

Visiting the dependency's github page gives me this:

To verify that this does not work - a simple
git clone https://github.com/ondat/terraform-eksblueprints-ondat-addon.git also gives errors.
Anyone has an idea of what's going on or how we can work around this?

I just realized this may not have been the correct issue board to post this. Sorry!


Profile page when anonymously logged in has been improved.

Fixes Issue
Any issues haven't been fixed. Some changes have been added.
My PR closes #504
👨💻 Changes proposed(What did you do ?)
I've noticed that profile page when log in anonymously only consists of one text: "Please Create an Account".
Therefore, I've added codes so user can be easily go to login page and main page. Also default information is visible even if logged in anonymously.
✔ Check List (Check all the applicable boxes)

[x] My code follows the code style of this project.
[x] This PR does not contain plagiarized content.
[x] The title and description of the PR is clear and explains the approach.

Note to reviewers

A few changes have been updated but very useful for users.
📷 Screenshots

@BerkantGC you are blocked from this project


Perimeter of rectangle

Title of article
Write a C++ programme to find perimeter of rectangle.
Additional information
Perimeter of rectangle = 2 * ( length + breadth )
length   : 12
breadth : 2

perimeter : 28

Code of Conduct

[X] I have read and agree to the Codinasion project's Code of Conduct

Hey, I wish to contribute to this, but I have no idea how to since I'm a first-timer. Will you please help me out?

Hey @VSen910
Thanks for showing your interest in this project 👍🏻

Steps to contribute to this issue :-

fork this repo
clone the forked repo
add perimeter-of-rectangle.cpp file to perimeter-of-rectangle folder
commit and push
open a PR

If you are an absolute beginner to Github contributions, please consider this repo
You can contribute here first to get an idea about how Github contribution works
You can further ask for any clarification
Hope i helped 😃

Thank you so much for the help!😊
I'll get back here soon


Verify the certificate used for signing

Verify the EKU, keyUsage, etc.

Better yet, should these just be "checks" in the Linter instead of during signature validation?


Make it possible for AgentId to be exported

Swapping the functions GetAgentByInternalID and GetAgentByInternalId makes it possible for CExporter to export the AgentId enum, so we can read the names instead of having to look up the id:

🙂 👍

Also, I just realized it's missing Lobby = 0 in the export. 🤔


Build failure: floorp-unwrapped

Steps To Reproduce
Steps to reproduce the behavior:

build floorp-unwrapped

Build log
https://gist.github.com/h7lv2/535b4287714794abc00eb458defff0ed
Additional context
As a dependency for floorp, this also causes floorp to fail building
Notify maintainers
@christoph-heiss
Metadata
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.9.3-cachyos, NixOS, 24.11 (Vicuña), 24.11.20240612.57d6973`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - nixpkgs: `/nix/store/dydg48djlykksz8cxq0xjplyxpa9pvf4-source`

Add a :+1: reaction to issues you find important.

Should have been fixed with https://github.com/NixOS/nixpkgs/pull/320114
Built fine on hydra:
https://hydra.nixos.org/build/263542576
And fix should be in nixos-unstable:
https://nixpk.gs/pr-tracker.html?pr=320114

Should have been fixed with #320114 Built fine on hydra: https://hydra.nixos.org/build/263542576 And fix should be in nixos-unstable: https://nixpk.gs/pr-tracker.html?pr=320114

Yes, exactly, this has already been fixed with #320114 a few days ago.


Implement Stephen Gill's content changes to create flow

Please don't merge until we hear back from Stephen and the team tomorrow
Good to go

Please don't merge until we hear back from Stephen and the team tomorrow

I think we can just merge when this goes green, hard to argue with copy changes.

Fixed that test :/


Wrong detection of slot type alternatives

I have a sample utterances like:

I own a {{cat}|{dog}|{bird}|{fish}} with the name {search_term}

(While cat, dog, bird and fish are slot types for animal breeds)
The parser cannot handle the "{{" correctly (jump to code), since this is something which is impossible to parse with a regular expression (like regex and html).
Check also this online example where you can see that it is not correctly parsed: https://regex101.com/r/YdvLPX/1
The solution would be to parse the utterance and count the brackets, this would be also very helpful to detect typos like the wrong type of bracket { vs [ vs (

Nesting slots in alternative phrasing is currently not supported. However, I agree this would be a nice feature and I will consider adding it once I got the time for it. Feel free to send PR if you are not willing to wait for me :)

This would require a lot of changes to make that work. I started something very similar from scratch with the ability to maintain even 186,000,000 permutations per utterance. (I don't say that his makes sense. My 16GB json file for that single utterance is just crazy)
Here is my code for parsing in Kotlin:
    // Parse the line to make sure that there is no syntax error. Regex would not work for cases like {{Foo}|{Bar}}
    var start = 0
    var counter = 0
    val slots = mutableListOf<String>()
    var lastWasMasked = false
    line.forEachIndexed { i, c ->
        when (c) {
            '\\' -> lastWasMasked = true
            '{' -> {
                if (!lastWasMasked) {
                    when (counter) {
                        0 -> start = i
                        1 -> {
                            // we found a slot type, that is fine
                        }
                        else -> throw ParseException("This line has a syntax error: $line", i)
                    }
                    counter++
                }
                lastWasMasked = false
            }
            '}' -> {
                if (!lastWasMasked) {
                    when (counter) {
                        1 -> {
                            // we found the end of the slot
                            slots.add(line.substring(start, i + 1))
                        }
                        2 -> {
                            // we found the end of a slot type, that is fine
                        }
                        else -> throw ParseException("This line has a syntax error: $line", i)
                    }
                    counter--
                }
                lastWasMasked = false
            }
            else -> lastWasMasked = false
        }
    }
    if (counter != 0) throw ParseException("This line has a syntax error: $line", line.length)

I shipped some improvements the past few days and what you were looking for should now be available.
Check out:
https://github.com/KayLerch/alexa-utterance-generator#327-alternate-slots-

Resolved. Feature is now available.


Can't install sample rate in google colab

Version of python is 3.10.12.
!pip install samplerate --no-cache-dir returns
Collecting samplerate
  Downloading samplerate-0.2.1.tar.gz (21 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from samplerate) (1.25.2)
Building wheels for collected packages: samplerate
  error: subprocess-exited-with-error

  × Building wheel for samplerate (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  Building wheel for samplerate (pyproject.toml) ... error
  ERROR: Failed building wheel for samplerate
Failed to build samplerate
ERROR: Could not build wheels for samplerate, which is required to install pyproject.toml-based projects

Can't get any of the errors to display, but it also fails for me on my mac locally. seemed to be an issue there with cmake and "from cmake import cmake".

Hi @ajayarora1235 , actually, I had the same issue on colab, and I think I know the cause.
samplerate uses cmake to handle the compilation. Colab comes with the cmake python package (a wrapper around) cmake preinstalled, so that calling cmake calls this package instead of the real cmake.
However, the python package build system creates an empty environment to build the package, and there, the cmake python is not available, however, it still calls the same cmake wrapper that depends on it.
The solution is to add the cmake python wrapper as a build dependency of samplerate.
I will try to do that quickly.

I made a fix in PR #16 . You can try it by installing from the fix_cmake_dep branch. I have verified successful installation of the package on colab with the following command.
pip -q install git+https://github.com/tuxu/python-samplerate.git@fix_cmake_dep

Thanks for this fix! I came across the same problem today and this fixed it for me

same here, thanks for the fix.


Ensure file analytics are called before claiming reward

The Issue
Thanks to @LavRadis for spotting this one, I was able to reproduce. Looks like the file_view call came in after the reward tried to be claimed for featured content.
https://www.screencast.com/t/Tb1jNunH
Suggested Solutions
Tell us your suggested solutions if you have any.
System Configuration

LBRY Daemon version:
LBRY App version:
LBRY Installation ID:
Operating system:

Anything Else

Screenshots

Fixed in https://github.com/lbryio/lbry-desktop/pull/1918


Fix an error and a warning both shown when invalid values given for package name or org in Ballerina.toml

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues.

Fixes #42104
Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.

Check List

[ ] Read the Contributing Guide
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[ ] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

What is the solution approach taken?

What is the solution approach taken?

An error saying incompatible type for key 'name': expected 'STRING', found 'INTEGER' is printed. instead of missing key 'name' in table '[package]' in 'Ballerina.toml'. Defaulting to 'name = "sample_tool_runner"'. This warning should be printed when there is no key, value pair found. For schema violations, we print the error.


Learning Path 6 - Lab 1 - Exercise 3

Contact Details
<EMAIL_ADDRESS>What should we change?
We are currently employing the Log Analytics agent for establishing connectivity between Linux and Sentinel. It is pertinent to highlight that the Log Analytics agent is on a deprecation path, with support ceasing after August 31, 2024. Consequently, I believe it is imperative to transition to a lab environment that utilizes the new AMA for connecting with Sentinel by no later than August.
Lab
Lab 06 Exercise 03 Connect Linux hosts to Microsoft Sentinel using data connectors
Relevant screenshots
paste here 😉

Yes. I will redo this one.

It looks like installing Azure Arc is also required.

Updates are in progress to this lab.

This thread should be removed

This lab will be revised (or retired) soon. A major lab update is due at the end of November. This will coincide with the retirement/removal of Azure Passes. Without Azure Passes there will be no connection between the Microsoft Defender E5 tenant and Azure resources. This means that while we will promote use of the Defender for Endpoint agent protection, in the labs we will be using Data Collection Rules to install the AMA. Probably installed by the Windows Security Microsoft Sentinel solution. At least until we have a combined solution. I hope that helps.


Getting "Server Error: Evaluation Error: Error while evaluating a Function Call, Module support for upstart service provider has been temporarily disabled"

I am getting the following error during puppet agent runs with version 0.9.4 of the module.
root@agentname:~# puppet  agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Module support for upstart service provider has been temporarily disabled (file: /etc/puppetlabs/code/environments/production/modules/amazon_ssm_agent/manifests/init.pp, line: 78, column: 9) on node agentname.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

The ssm.pp is:
$ cat ssm.pp
class mymodule::ssm {

  class { 'amazon_ssm_agent':
    region => 'us-east-1',
  }

}

The error is pretty self evident from the message but I am wondering why I am hitting this on systemd based server.
# ps -p 1
  PID TTY          TIME CMD
    1 ?        00:00:03 systemd

OS: Ubuntu 18.04

@SohamChakraborty The most likely explanation is that the OS family for Ubuntu is not yet configured to use systemd in puppet-amazon-ssm-agent.
My apology for super late reply of this issue, I have just recently had the time to revisit old issues.

I am getting the following error during puppet agent runs with version 0.9.4 of the module.

root@agentname:~# puppet  agent -t

Info: Using configured environment 'production'

Info: Retrieving pluginfacts

Info: Retrieving plugin

Info: Retrieving locales

Info: Loading facts

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Module support for upstart service provider has been temporarily disabled (file: /etc/puppetlabs/code/environments/production/modules/amazon_ssm_agent/manifests/init.pp, line: 78, column: 9) on node agentname.com

Warning: Not using cache on failed catalog

Error: Could not retrieve catalog; skipping run

The ssm.pp is:

$ cat ssm.pp

class mymodule::ssm {

  class { 'amazon_ssm_agent':

    region => 'us-east-1',

  }

}

The error is pretty self evident from the message but I am wondering why I am hitting this on systemd based server.

# ps -p 1

  PID TTY          TIME CMD

    1 ?        00:00:03 systemd

OS: Ubuntu 18.04

@zahradaryan123 Try this please: https://github.com/SohamChakraborty/puppet-amazon-ssm-agent


requesting doc on usage of halin via halin.graphapp.io and needing certs

if you dont have a legitimate cert then one can not connect.
request that in the failure error message we indicate that the Neo4j instance needs to implement certs (other than self sgned)

@Dcanzano I've drafted this article on the community site.  Does this help?  https://community.neo4j.com/t/troubleshooting-connection-issues-with-halin/8413
On the error message -- unfortunately the message that comes back from the driver is very generic (the "websocket error") and could have lots and lots of different causes.   I can't say in Halin, "You need certs" because that's only one possibility of many.  What I will do in the next release of Halin is to include a link to this article in the "Troubleshooting" section when you fail to connect, so users have a chance to get to the right spot.   That was the intent behind the other "Troubleshooting connection issues" article a while ago (https://community.neo4j.com/t/troubleshooting-connection-issues-to-neo4j/129/6) but I think you're right that more halin specifics are needed.
I'm going to leave this issue open pending your feedback on that article if you have any -- and also as a reminder to update the troubleshooting section in the actual app on the next patch release.

Closed as per discussion with Dana


wlan: fix temperature regexp

two fixes:

stempC = Signed temp C = temperature can be negative. accept optional "-" prefix in number regexp for negative numbers.

temperature value should contain at least 1 digit. zero digits is invalid value.

Try using 'wlantemp'

wlantemp is empty. It's just a symlink to wlan. i fixed wlan.


TypeError in /

Error in ClashLeaders
TypeError in /
Property description must be an object: undefined
View on Bugsnag
Stacktrace
node_modules/chartist/dist/chartist.js:1783 -

View full stacktrace
Created automatically via Bugsnag

An error linked to this issue has been marked as fixed in Bugsnag
TypeError in /

An error linked to this issue has been reopened in Bugsnag
TypeError in /


Unable to use more than one option

Hello! I have a problem with using more than one option.
In example:
I want to download some videos from the first added. I'm using:
C:\youtube-dl\youtube-dl.exe --playlist-reverse --playlist-end 2 https://youtube.com/user/channel_name
In this case program will start downloading from the last added video and will download only 2 videos. How can i start downloading from the first added video and the amount necessary to me.

--playlist-reverse --max-downloads 2.

if i want to start from the 10th video what am i supposed to do then?

You can't without preliminary knowledge of videos count.


Decrypt attachments

Fixed decrypting attachments
Fixed the "should show image attachments as other attachments"
Fixed the case where inputting attachments of type .txt would be shown as normal email-content text

Some tests are failing - some of them related to the (now removed) image support, and something about utf-8 in base64 encoding.

LGTM, safe to merge. Fixes #25 and #30.

rebased via 0ce7c67


Fix clippy warnings for Rust 1.62.0

Codecov Report

Merging #139 (2de1b86) into development (b4a807e) will increase coverage by 0.02%.
The diff coverage is n/a.

:exclamation: Current head 2de1b86 differs from pull request most recent head 09d9663. Consider uploading reports for the commit 09d9663 to get more accurate results

@@               Coverage Diff               @@
##           development     #139      +/-   ##
===============================================
+ Coverage        83.40%   83.43%   +0.02%
===============================================
  Files               78       78
  Lines             8377     8377
===============================================
+ Hits              6987     6989       +2
+ Misses            1390     1388       -2

Impacted Files
Coverage Δ

src/algorithm/sort/heap_select.rs
97.72% <ø> (ø)

src/linear/lasso_optimizer.rs
94.11% <ø> (ø)

src/optimization/first_order/lbfgs.rs
94.44% <0.00%> (+1.58%)
:arrow_up:

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 b4a807e...09d9663. Read the comment docs.

Merging because this is a two lines change PR without any impact for library callers


Only sources of EV certificates

It would be helpful if the page indicated if the other companies advertising EV certificates and Authenticode EV certificates are recognized in the same way as the companies listed in the article.  Or if the list is simply the list of providers at the time the article was first published.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 93d3f097-d81b-66c2-4835-d63758687d34
Version Independent ID: fe9d1cdd-966e-89b5-c66b-60531b0ec655
Content: Get a code signing certificate - Windows drivers
Content Source: windows-driver-docs-pr/dashboard/get-a-code-signing-certificate.md
Product: windows-hardware
Technology: dashboard
GitHub Login: @mhopkins-msft
Microsoft Alias: mhopkins

Hi @jasonnet
Thank you for this feedback. I've created a work item to research this for possible future updates.
Thanks,
~ Mark

Thanks.  My English should have been better.   An abbreviated correction is: "...if the page indicated if THE CERTIFICATES OF the companies advertising... ...as THE CERTIFICATES OF the companies listed in the article".