No support for PEM key import

So I have a Pxy Staking canister which got several admin methods which only works with my default identity installed in my ubuntu machine in the location '\wsl.localhost\Ubuntu-20.04\home\ving.config\dfx\identity\default'.
As you may know, the file 'identity.pem' has the private key.
Everyday, I run pxy's stats method (ex: runStats) in Ubuntu CLI and it runs in the default identity context of the above identity since that is the primary controller of the canister. It works just fine.
Ex: dfx canister --network ic call staking runStats
I am trying to automate this by using your ICP.Net library. I am using my default identity's Principal as "public key" and copied the base64 encoded string as the "private key". Then I am instantiating HttpAgent by passing the identity object. But for some reason, its throwing exception.
Please follow the code snippet below.
static async Task AdminUnstake()
{
    try
    {
        // public key
        // obtained from your identity's principal id by running following command
        // dfx identity get-principal
        // ex: ax3nc-yx45z-w6iew-d2hds-2gmuc-z4hkb-okg7h-4z6y5-3ach6-eclvr-yqe
        var principal = Principal.FromText("my-default-identity-principal");
        var hex = principal.ToHex();
        byte[] publicKeyBytes = ByteUtil.FromHexString(hex);
        var publicKey = DerEncodedPublicKey.FromEd25519(publicKeyBytes);

        // private key
        // copied from identity.pem file
        byte[] privateKeyBytes = Convert.FromBase64String("base-64-encoded-string-found-inside-identity.pem-file");

        var identity = new Ed25519Identity(publicKey, privateKeyBytes);

        var agent = new HttpAgent(identity);
        Principal canisterId = Principal.FromText("5xaxa-xaaaa-aaaal-abcpa-cai");
        var pxyStakingClient = new PxyStakingApiClient(agent, canisterId);
        var result = await pxyStakingClient.AdminUnstake(2829);
    }
    catch (Exception ex)
    {
        Console.WriteLine(ex.Message);
    }
}

The exception is not super informative. So, it didnt help much.
However, I am posting it below for your reference.

Very impressive work on how the ClientGenerator and it just saves a LOT of time. Thank you!! :-)

The main issue that I see is that the Principal is NOT the public key. The principal is derived from the key, essentially a hash of it.
Im working on something to where you can import your pem/private key and be able to get the public key from it

Thanks for the response.
Ah. I see. Somehow, I don't know how to obtain the public key from the private key and I thought Principal would help me get it. Probably, this is the part of my problem there, I guess.
Also, please validate my code above for the private key and let me know if the logic is alright.
Thank you.

@vingtheory Ive been stuck on this issue for a while. It breaks down to a couple things:

The dfx PEM file seems to create a Ecdsa key vs a ed22519. That is fine, but I am working on a new identity type for that
I have some code but the cryptography is above my head and I cant figure out why its not working quite yet

Im not sure if there is a workaround that I can think of so you might be stuck till I figure this out. I might reach out to some dfinity people

@vingtheory Ive been stuck on this issue for a while. It breaks down to a couple things:

The dfx PEM file seems to create a Ecdsa key vs a ed22519. That is fine, but I am working on a new identity type for that
I have some code but the cryptography is above my head and I cant figure out why its not working quite yet

Im not sure if there is a workaround that I can think of so you might be stuck till I figure this out. I might reach out to some dfinity people

Hey Sir. Its totally fine. I will also spend some time tinkering with the encryptions and visiting dev forums in coming days. Will let you know if anything comes up. Thank you.

Just wanted to give an update. Not much progress, but still working on it

Thank you for the prompt update. Appreciate it! There is a bounty from Dfinity to develop a file-share module (similar to a OneDrive desktop service which auto syncs the watched folders in the file system). I and @lightninglad working on this. We are currently covering the web side only. I am thinking your library will come handy when we get to work on desktop windows service. Probably we can collab on this. You got such a wonderful library which can be rewarding. Let me know. :-)

Sounds like fun. Ill try to help if you guys need it.
This library benefits a lot from getting feedback from different projects so this is a unique use case, most have been just gaming so far

Thank you so much for your positive attitude to help in this regard. 😊
Also, I just received a notification that you have a commit to support PEM integration. Looks like you already got it. Cant wait to use it. Thanks in advance. 🙏

@vingtheory Alright. I had a breakthrough with these PEM files/key encodings
Try out version 3.0.0-beta.1
I havent documented it quite yet or put in all the tests but wanted to see if this works for you before I polish it up
Youll want to try using the IdentityUtil.FromPemFile method to get it out of the PEM file
If you just have the private key I have added the IdentityUtil.FromSecp256k1PrivateKey or IdentityUtil.FromEd25519PrivateKey to derive the public keys if you dont have them
Let me know what you think, then ill make an non beta release and document it

Thank you for promptly getting this out. It will many of us. I will get to this next week and play around with what I was doing earlier. I will add some test cases and may issue PR. Can't wait to get to this soon.

Fixed by #64
Updated docs to give examples of PEM import in the Agent README
@vingtheory let me know if there are issues or anything missing
Version 3.0.0

thank you so much for making this available. will create test cases soon and send your way!


Font config should be partial

When using font config in an annotation, typescript gives an TS2739 error that says that you have to implement all font properties. Because this is an object that overrides the global font config, this should be partial so you can alter only specific elements.

PR #849 submitted


[collector] fix: move 'relabelings' and 'metricRelabelings' configs under endpoints in serviceMonitor spec

Fixes indentation issues causing an invalid ServiceMonitor spec when using relabeling/metricRelabeling configs  https://github.com/open-telemetry/opentelemetry-helm-charts/issues/1287

@rl0nergan can you do a helm template locally with these changes and post the result

yep. using the values below for the serviceMonitor:
  serviceMonitor:
    enabled: true
    # additional labels on the ServiceMonitor
    extraLabels: {}
    # add annotations on the ServiceMonitor
    annotations: {}
    metricsEndpoints:
      - port: metrics
    # Used to set relabeling and metricRelabeling configs on the ServiceMonitor
    # https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
    relabelings:
      - action: replace
        replacement: my-cluster
        targetLabel: cluster
      - action: replace
        replacement: my-cluster2
        targetLabel: cluster2
    metricRelabelings:
      - action: keep
        regex: otelcol_process_memory_rss|target_info
        sourceLabels:
        - __name__

Templates out to this:
# Source: opentelemetry-collector/templates/servicemonitor.yaml
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: otel-collector-opentelemetry-collector
  namespace: redpanda
  labels:
    helm.sh/chart: opentelemetry-collector-0.100.1
    app.kubernetes.io/name: opentelemetry-collector
    app.kubernetes.io/instance: otel-collector
    app.kubernetes.io/version: "0.105.0"
    app.kubernetes.io/managed-by: Helm

spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: opentelemetry-collector
      app.kubernetes.io/instance: otel-collector
      component: statefulset-collector
  endpoints:
  - port: metrics
    relabelings:
      - action: replace
        replacement: my-cluster
        targetLabel: cluster
      - action: replace
        replacement: my-cluster2
        targetLabel: cluster2
    metricRelabelings:
      - action: keep
        regex: otelcol_process_memory_rss|target_info
        sourceLabels:
        - __name__

Lets add more indentation so that
  endpoints:
  - port: metrics
    relabelings:
      - action: replace
        replacement: my-cluster
        targetLabel: cluster
      - action: replace
        replacement: my-cluster2
        targetLabel: cluster2
    metricRelabelings:
      - action: keep
        regex: otelcol_process_memory_rss|target_info
        sourceLabels:
        - __name__

Become
  endpoints:
    - port: metrics
      relabelings:
        - action: replace
          replacement: my-cluster
          targetLabel: cluster
        - action: replace
          replacement: my-cluster2
          targetLabel: cluster2
      metricRelabelings:
        - action: keep
          regex: otelcol_process_memory_rss|target_info
          sourceLabels:
          - __name__

Changes pushed. Renders like this now:
# Source: opentelemetry-collector/templates/servicemonitor.yaml
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: otel-collector-opentelemetry-collector
  namespace: redpanda
  labels:
    helm.sh/chart: opentelemetry-collector-0.101.1
    app.kubernetes.io/name: opentelemetry-collector
    app.kubernetes.io/instance: otel-collector
    app.kubernetes.io/version: "0.106.1"
    app.kubernetes.io/managed-by: Helm

spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: opentelemetry-collector
      app.kubernetes.io/instance: otel-collector
      component: statefulset-collector
  endpoints:
    - port: metrics
      relabelings:
        - action: replace
          replacement: my-cluster
          targetLabel: cluster
        - action: replace
          replacement: my-cluster2
          targetLabel: cluster2
      metricRelabelings:
        - action: keep
          regex: otelcol_process_memory_rss|target_info
          sourceLabels:
          - __name__


next 8.0.1 throws error when webpack method is written as pure function

Bug report
Describe the bug
Upon upgrading from next 7.0.2 to next 8.0.1 I received the following error:
ModuleNotFoundError: Module not found: Error: Can't resolve 'private-next-pages/_app.js'

After a little digging I identified that the issue had something to do with a webpack alias I had configured in my next.config.js:
module.exports = {
  webpack(config) {
    return {
      ...config,
      resolve: {
        ...config.resolve,
        alias: {
          ...config.alias,
          _: __dirname,
        },
      },
    };
  },
};

Background: Aliasing _: __dirname allows me to import files via very concise absolute references (e.g. import Foo from '_/components/Foo').  _ was chosen and npm packages are restricting from beginning with that character and I don't know of anything that might cause a conflict.
Since the docs and examples specify and show that a config object should be return from the webpack method I would expect a pure function (generally a best practice when possible) to adjust the config as expect.  This was indeed the case in next 7.
This is no longer the case in next 8.
I was able to make the alias config work as expected by adjusting the above to the following:
module.exports = {
  webpack(config) {
    // Nextjs 8 pukes if we don't do param-reassign
    // eslint-disable-next-line no-param-reassign
    config.resolve.alias._ = __dirname;
    return config;
  },
};

Both work, the issue here is that you probably weren't defining the aliases coming from Next.js's config object (making the assumption that Next.js would never add them in the future) so this is not a bug in Next.js and there's little we can do to resolve it.


Mangled new and delete symbols possibly wrong for x64 in patch_functions.cc

By accident I noticed that x86 and x64 mangles its symbols differently. This means that there probably should be another set of symbols to match for 64 bit code in patch_functions.cc.
Current code in patch_functions.cc:
const char kMangledNew[] = "??2@YAPAXI@Z";
const char kMangledNewArray[] = "??_U@YAPAXI@Z";
const char kMangledDelete[] = "??3@YAXPAX@Z";
const char kMangledDeleteArray[] = "??_V@YAXPAX@Z";
const char kMangledNewNothrow[] = "??2@YAPAXIABUnothrow_t@std@@@Z";
const char kMangledNewArrayNothrow[] = "??_U@YAPAXIABUnothrow_t@std@@@Z";
const char kMangledDeleteNothrow[] = "??3@YAXPAXABUnothrow_t@std@@@Z";
const char kMangledDeleteArrayNothrow[] = "??_V@YAXPAXABUnothrow_t@std@@@Z";
However for x64 the relevant parts of the get_mangled_names.cc+dumpbin output is:
008 00000000 SECT3  notype()    External | ??2@YAPEAX_K@Z (void * __cdecl operator new(unsigned __int64))
009 00000020 SECT3  notype()    External | ??3@YAXPEAX@Z (void __cdecl operator delete(void *))
00A 00000030 SECT3  notype()    External | ??_U@YAPEAX_K@Z (void * __cdecl operator new[](unsigned __int64))
00B 00000050 SECT3  notype()    External | ??_V@YAXPEAX@Z (void __cdecl operator delete[](void *))
00C 00000060 SECT3  notype()    External | ??2@YAPEAX_KAEBUnothrow_t@std@@@Z (void * __cdecl operator new(unsigned __int64, struct std::nothrow_t const &))
00D 00000080 SECT3  notype()    External | ??_U@YAPEAX_KAEBUnothrow_t@std@@@Z (void * __cdecl operator new[](unsigned __int64, struct std::nothrow_t const &))
00E 000000A0 SECT3  notype()    External | ??3@YAXPEAXAEBUnothrow_t@std@@@Z (void __cdecl operator delete(void *, struct std::nothrow_t const &))
00F 000000C0 SECT3  notype()    External | ??_V@YAXPEAXAEBUnothrow_t@std@@@Z (void __cdecl operator delete[](void *, struct std::nothrow_t const &))
Obviously these don't match. If this really is confirmed to be a bug I'll happily make a patch for it.

Thanks a lot. Looking forward seeing patch from you for this or indication that it works without patching.

Merged. Thanks.


The activated hook dosen't called on initial mount when the component is async.

Version
3.2.31
Reproduction link
sfc.vuejs.org/
Steps to reproduce

click the "Posts" button.
click the "AsyncPosts" button.

What is expected?
console:
Posts: onActivated
AsyncPosts: onActivated

What is actually happening?
console:
Posts: onActivated

AsyncPosts component's activated  hooks dosen't called on initial mount.

duplicate of #5095


Typo's + Question

Hi Joseph!
Besides the typo's I wanted to ask you for any reference or reasoning that went into picking these bandwidth calculating factors inside symtrack.c, or is it solely based on experience?
// set bandwidths accordingly
// TODO: set bandwidths based on input bandwidth
float agc_bandwidth     = 0.02f  * _bw;
float symsync_bandwidth = 0.001f * _bw;
float eq_bandwidth      = 0.02f  * _bw;
float pll_bandwidth     = 0.001f * _bw;

What also got me going for a while is the following statement inside modem_qam.c
EDIT: after dubble checking it does gives the expected result so I must have looked over something
// re-modulate symbol (subtract residual) and store state
_q->x_hat = _x - (res_i + _Complex_I*res_q);

Because the value that is put into _q->x_hat is not an estimate or re-modulation of _x right? For 16-QAM, the thing that is being put into res_i is cimagf(_x) - _ref[1] - _ref[0]  ,  same for res_q and crealf(_x). Because _ref[0] is just 0, _q->x_hat will contain _ref[1], but that still  works as an indication of the error calculated by modem_get_demodulator_evm, so that might be how it is supposed to be?
Thanks in advance!

with respect to the unused num_symbols variable, my original intent was to use that as a way to determine when to stop the loop, rather than the number of samples. It's actually the number of symbols that determines loop convergence as the signal could be highly over-sampled (many samples, but few symbols).

Thanks for the clarification! And thanks for making this awesome library and putting together all the examples and documentation, it really helped me a lot in understanding how some of these DSP elements are implemented!

 It's been a lot of fun working on this, but I know liquid-dsp has a long, long way to go!


Draft: Tzaffi temp experiment

Summary
Explain the goal of this change and what problem it is solving. Format this cleanly so that it may be used for a commit message, as your changes will be squash-merged.
Test Plan
How did you test these changes? Please provide the exact scenarios you tested in as much detail as possible including commands, output and rationale.

experiment succeeded


Better Suggestion

Is your feature request related to a problem?
I think it's going to look better.
Describe the solution you'd like.
Add be able move on OITC Event (Respawning State)
Every Event Host -> when died shoulda auto add to spectator in event for spectate that event
Specify event type -> Duo, Trio, 1v1 (Sumo, Bracket, Gulang, SkyWar)
Add option for matchHistory -> same matchSnapshot

WinnerUsername & LoserUsername
Potion Effect
Logest combo
Hit
Hunger
Match Duration
Health
Map Name
Percent of Potion Accuracy
Potion Count | Soup count
Maybe spectators (not really necessary)
This suggestion for website developer 💯

Now has username -> you can /stats, /matchhistory, other with offline player username
Describe alternatives you've considered.
for stronger frost
Agreements

[X] I have searched for and ensured there isn't already an open issue regarding this.
[X] I have ensured the feature I'm requesting isn't already in the latest Frost.

Other
No response

Duplicated suggestion.


Add nnguy223's file

Create a branch

Create a branch

Create a new branch

Create new pull request


Warn on formdata parameters with no matching content type

This is a joint issue with https://github.com/swagger-api/swagger-codegen/issues/4853
formData parameters require a Content-Type set to multipart/form-data or application/x-www-form-urlencoded. The client generator assumes that application/json is a reasonable default when the API doesn't contain a consumes directive.
This means that it's easy to write an API that simply doesn't work.
The parser does not emit an error in this case. Neither does the code generator.
Since there are two options with different tradeoffs for the content type, it may not be appropriate for the code generator to intuit an appropriate content type. Since this is a facet of HTTP instead of a specific codegen target, it's probably appropriate for the parser to emit a warning here.

Since the matching codegen issue has been closed without any code change on their side, this is all on the parser side.


Error loading nd2 from N-SIM

nd2 version: 0.1.6
Python version: 3.7.12
Operating System: Ubuntu 18.04

Description
Load N-SIM data stored in nd2 file. The data is interesting, all of the angles/phases for a channel are in one image when I load via bioformats. I'm not sure if the nd2 sdk is trying to crop these into individual images?
What I Did
Try to load data using
import nd2
import numpy as np

my_array = nd2.imread('test_sim.nd2')

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
[<ipython-input-14-d50f1da17a57>](https://localhost:8080/#) in <module>()
----> 1 my_array = nd2.imread('test_sim.nd2')

3 frames
[/usr/local/lib/python3.7/dist-packages/nd2/_sdk/__init__.py](https://localhost:8080/#) in <module>()
----> 1 from . import latest
      2
      3 __all__ = ["latest"]

src/nd2/_sdk/latest.pyx in init nd2._sdk.latest()

ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

I can send a link to example via email if helpful.

A link would be great.  I do actually have a couple examples of sim data in my test suite, so if you have a failing example that'd be helpful

Emailed!

ok, it worked for me:
In [3]: nd2.imread('/Users/talley/Downloads/test_sim.nd2').shape
Out[3]: (3, 3072, 3072)

so it must have something to do with environment (and... I should have looked earlier, the line numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject indicates as much).  This library is compiled with cython, so does require a specific numpy abi, and it's likely that i need to do a better job declaring that in my dependencies.
can you tell me your numpy version?

also, just curious, is this the first file you tried?  i.e. have any files worked for you?

On my laptop, nd2 loads this image and other images just fine.
I am hoping to also use this on Google Colab as part of tutorial, which is where I ran into this error. I haven't tried loading any other images on Colab.
Installation method: pip install nd2
Numpy version: 1.19.5

Ok, upgrading numpy worked! Thanks!
Should of thought of that myself...

good to know that that's how that error will manifest :)  thanks for posting


took away header footerborderline

im in a real goth phase right now
On Thu, Apr 26, 2018 at 7:45 PM, butlersrepos<EMAIL_ADDRESS>wrote:

@butlersrepos commented on this pull request.
In css/style.css
https://github.com/JDSalisbury/JDSalisbury.github.io/pull/2#discussion_r184560732
:

}

.left__note1, .left__note2, .left__note3, .left__note4 {

border-bottom: 2px solid navy;

border-bottom: 2px solid black;

like your soul?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/JDSalisbury/JDSalisbury.github.io/pull/2#pullrequestreview-115783972,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AV-RQPWRJooAacxWzVT8q5F9q27gX103ks5tslwtgaJpZM4ToEKt
.

--
Jeff Salisbury
Software Developer
419-307-7643
Github https://github.com/JDSalisbury | LinkedIn
https://www.linkedin.com/in/jeffery-salisbury/ | Portfolio
https://jdsalisbury.github.io/


Update ConversationSearch and RelatedConversation for for the new Indexing Structure

#302 updates the ConversationIndex to better support indexing of public channels. This requires also updates to the conversation search and releated conversation search services:

as the changed index structure requires to update the query logic
some assumptions made for those searches are around short conversations and do no longer apply when public channels are indexed

NOTE: required result format and UI changes to the related conversation Widget are described in #305

Conversation Segmentation
This is a feature of the ConversationIndexer that splits up conversations (aka. channels) into sections  considering requirements of content based recommendation.
NOTE: the goal is NOT to detect single conversations part of a channel, but to split up messages in a channel to sections useful for content based recommendations (e.g. as described in the above comment)
The algorithm uses the following parameter

minMsg = 2 ... the minimum number of messages per section
maxMsg = 10 ... the maximum number of messages per section
minContextLength = 100 ... the minimum desired length of the context in chars
contextLength = 300 ... the desired length of the context in chars

The algorithm considers merged messages. Those are subsequent messages sent by the same user within the mergeTimeout = 30sec. Merged messages do only count as a single message toward the configured minMsg and maxMsg limits
Other than those parameters the decision on how to segment a conversation in section is based on the duration between messages. The divides the duration to the previous message with the mean over the last messages (the gapRatio). If this gapRatio is

> 10 it will start a new section as soon as minMsg is fulfilled
> 5 it will start a new section as soon as minMsg and minContextLength is fulfilled
> 3 it will start a new section as soon as minMsg and contextLength is fulfilled
a new section is started if maxMsg is reached

The mean duration is reset to the defaultGap = 3min if a new section was started because of the gapRatio. If a new section is started because maxMsg is reached the mean is kept from the previous section.


SA1643: DestructorSummaryDocumentationMustBeginWithStandardText

This is low priority because my general rule is:

If you find yourself writing a user-defined finalizer in C#, you are probably doing something wrong.

To my knowledge, there is only one required finalizer (outside of the .NET Framework source code) which is included in a project I've worked on.

grabbed. Even though it is a very low priority one it is very easy to implement because SA1642 is already implemented


Error while loading rule 'hbs/check-hbs-template-literals': configPlugins is not iterable

After upgrading ember-template-lint to 2.8.0, eslint-plugin-hbs stopped working:
eslint .

Oops! Something went wrong! :(

ESLint: 7.4.0

TypeError: Error while loading rule 'hbs/check-hbs-template-literals': configPlugins is not iterable
Occurred while linting foo.js
    at processPlugins (node_modules\ember-template-lint\lib\get-config.js:161:24)
    at node_modules\ember-template-lint\lib\get-config.js:197:32
    at forEachPluginConfiguration (node_modules\ember-template-lint\lib\get-config.js:98:7)
    at processPlugins (node_modules\ember-template-lint\lib\get-config.js:195:3)
    at getProjectConfig (node_modules\ember-template-lint\lib\get-config.js:493:5)
    at Linter.loadConfig (node_modules\ember-template-lint\lib\linter.js:47:19)
    at new Linter (node_modules\ember-template-lint\lib\linter.js:39:10)
    at Object.create (node_modules\eslint-plugin-hbs\lib\rules\check-hbs-template-literals.js:65:16)
    at createRuleListeners (node_modules\eslint\lib\linter\linter.js:758:21)
    at node_modules\eslint\lib\linter\linter.js:928:31

It works fine with ember-template-lint 2.7.0.

Thanks for the report. Will look into this!

@psbanka I might've mixed up the versions. I think it was working with ember-template-lint 2.8.0 (the previous one, as of now), and stopped working with ember-template-lint 2.9.0 (the latest one, as of now).

Anyways, the point is, it's not working anymore.

I triple-checked it, it works with with ember-template-lint 2.8.0, it doesn't work with ember-template-lint 2.9.0. I updated the issue description accordingly.

I think this is the same as what was reported in https://github.com/ember-template-lint/ember-template-lint/issues/1401 and is fixed (pending release) on ember-template-lint master.

@rwjblue I installed it using npm install git://github.com/ember-template-lint/ember-template-lint.git#master, and I can confirm that it works. Looking forward to the next release. Thank you!

Thanks, y'all; I'll close this issue.


Remove "pr" from Makefile.

Otherwise when you try to install it says:
make: *** No rule to make target pr', needed by install-pkg-config_c'.  Stop.

Can one of the admins verify this patch?

Can one of the admins verify this patch?


Using Sematic kernel in Bot Framework SDK for great conversations

Use case:
How can we use sematic kernel to detect user intent and route to proper API function/skill dynamically.
For e.g.
For user query "I need information on my purchase order" -> it should route to PO skill and then ask user for PO number and then call the PO API
versus
For user query "I need to know my warranty status for serial no XYZ" -> it should route to Warranty Skill and then call the warranty API
Any ideas around this?
Thanks

tagging for more reach.
@microsoftShannon @alexchaomander

@sagarsat , thanks for the idea.  It should like you would like to see Semantic Kernel being available to use in the Bot Framework SDK - is that correct?  So that, for your example above the planner would find the intent and call a Plugin?

@evchaki Yes, I was looking for an example in samples above where the planner  would find the intent and call a Plugin.
Can you route me to that sample if its there?

@evchaki any update on above request. I'm looking for a basic implementation with SK where the SK can understand the intent and route to Plugin/Skill dynamically.

Hi @evchaki any updates?
@microsoftShannon @alexchaomander adding for better reach.

HI @evchaki,
I also have similar requirements for my application. Appreciate your help/guideline to get the solution.

@rameshneudesic and @sagarsat - thanks for the ping on this.  We are working with the Bot Framework team and talking about this use case.  We will let you know once we define the details on how this might work.

@evchaki  Thanks for the update. I will keep checking this thread for an update.

using bot framework you have different way to do that and you have to figure out which is the best mix bw sk and, for example dialogs and step by step flows. I'm working for a while with bot framework and i thing that sk could replace lu as is more strong and flexible so we could implement an ad hoc recognize. When the recognizer identify the intent you have to deal with the parametes for that intent and if not all are available ask for them. I thing that the bot framework can handle this part better than sk but after that you can use bot tools or sk at your convinience. Anyway best practice for the integration could be very usefull and this, in my mind, is a very pratical scenarious to use sk

I was struggling last few days from thoughts of how to integrate SK and bot framework.
Now its clear that intent detection from SK is not an option to run SK skill.
Will be waiting for some updates

I am actively using SK in a Bot Framework SDK Teams bot in an enterprise environment.
In the bot controller, we pull in the Kernel via dependency injection.
In "OnMessageRecievedAsync", we then run the "TurnContext.Activity.Text" through the SK intent detection skill & / or check for a !Command at the beginning of the text.
Further processing the text from there is as simple as writing any other SK / Bot Framework code.
Note: we are not using Dialogs for this, as we wanted more fine grained control over the processing of prompts, however the principal is the same. We do however use a Waterfall dialog, to capture an access token (for the current user) for later use in API calls from the bot to other services (IE: MS Graph).
In our bot, LU is not used at all :)

We're working on a proof of concept for integrating Bot Framework with Semantic-Kernel. We'll update with details once we have something.

Any updates on this?

Could this plug-in be of assistance to you?
You can find it at this link: AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Intent

Could this plug-in be of assistance to you?
You can find it at this link: AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Intent

This looks more like an intent recognition use case. I'm looking for something that would be able to identify the set of skills to use, and complete them. Do you think this would be able to do that?

Could this plug-in be of assistance to you?
You can find it at this link: AzureAI.Community.Microsoft.Semantic.Kernel.PlugIn.Intent

This looks more like an intent recognition use case. I'm looking for something that would be able to identify the set of skills to use, and complete them. Do you think this would be able to do that?

Could you kindly provide an example?

This is just an example:
Message: I am looking to find a trip to Europe that cost within $1000 next month.
Skills:

Flight finder: A tool to find all flights to Europe
Hotel finder: A tool to find all hotels in Europe
Car finder: A tool to find costs associated with cars
Calculator: A tool to add costs
Insurance: A tools to find all international insurance
Visa finder: A tool to detect if you need visa for the country visiting

So in this example, I want SK to identify the skills we need are flight finder, hotel finder, car finder, calculator (using any of the planner).
Will that plugin work for this example?

In my understanding, yes, you can accomplish that, but it won't be a single step. You'll need to follow a step-by-step process, such as first finding the location and then exploring travel options like flights, hotels, cars, and so on.

In my understanding, yes, you can accomplish that, but it won't be a single step. You'll need to follow a step-by-step process, such as first finding the location and then exploring travel options like flights, hotels, cars, and so on.

Could you elaborate a little more on what you mean by step by step process? Does the bot framework extension shared above return a list of all steps, and we apply them step by step?

@mahi83 check this out: https://learn.microsoft.com/en-us/semantic-kernel/ai-orchestration/planners/

@mahi83 check this out: https://learn.microsoft.com/en-us/semantic-kernel/ai-orchestration/planners/

Hmmmm. I'm trying to ask is there a formalized way of integrating this into bot framework? When using promptflow, semantic kernel integrates with it very nicely.

@mahi83 Can you accomplish this concept in SK without using the Bot Framework?

@mahi83 Can you accomplish this concept in SK without using the Bot Framework?

I believe so using what @martinlarosa shared. So one way to integrate bot framework is first to create an api that does it and use bot framework to connect to it. Was wondering if you all had any other OOB approaches/plugins.

@mahi83 Can you accomplish this concept in SK without using the Bot Framework?

I believe so using what @martinlarosa shared. So one way to integrate bot framework is first to create an api that does it and use bot framework to connect to it. Was wondering if you all had any other OOB approaches/plugins.

I currently don't think there are any other approaches available at the moment

Oh ok, then yes, you'll need to wait until they release the sample.

All .Net issues prior to 1-Dec-2023 are being closed. Please re-open, if this issue is still relevant to the .Net Semantic Kernel 1.x release. In the future all issues that are inactive for more than 90 days will be labelled as 'stale' and closed 14 days later.


Adds two new compositions – DirectionalEdges and DirectionalMargins

This PR introduces two new RTL-friendly compositions, directionalEdges and directionalMargins. These compositions behave identically to edges and margins, with the distinction of using leading and trailing instead of left and right.
DirectionalEdges
[.top, .leading, .bottom, .trailing]
DirectionalMargins
[.topMargin, .leadingMargin, .bottomMargin, .trailingMargin]

@robertjpayne any interest in taking a look at this?

Any comments?

@jctrouble thanks :) Sorry for delay!


get_lowest_price_interval.duration should be timedelta

It would be much easier to use the get_lowest_price_interval in scripts, if duration would be timedelta. The the differentiation of hours, minutes, seconds would not be necessary, which makes it much easier to use in scripts.

Good input. Will have a look at it.

Will this make something like
hours: {{states("sensor.hours2charge")}}
possible? Really need the possibillity to set the hours to charge dynamically.


outputs 500 results despite changing config

Hi! I have set the max-results inside my config file to be something other than 500, but the output always has 500 results no matter how I change the config file, even if max-results is smaller than 500. I wonder if there is anything I have done wrong in this case.

@peiyaoli2, thanks for the notice.
Can you share:

what your config file looks like (without keys, bearer tokens, or enterprise auth info)
what version of the python library you're using
how you are using the library (command-line application or in a program)
the query you are running

Thank you!

Hi - I'm using python 3, and I'm using the library as a command-line application.  This is how my config.yaml looks like:
search_rules:
    from-date: 2018-05-01
    to-date: 2018-05-24
    pt-rule: illinois2018 lang:en

search_params:
    results-per-call: 100
    max-results: 10000

output_params:
    save_file: True
    filename_prefix: test_illinois2018
    results_per_file: 10000000

and this is how my command-line looks like:
C:\ProgramData\Anaconda3\Scripts>python search_tweets.py --credential-file twitt er_keys.yaml --credential-file-key search_tweets_api --env-overwrite False --con fig-file config.yaml --no-print-stream
I actually wasn't sure about the env-overwrite flag, therefore I tried both True and False, but the results are the same.

@peiyaoli2 - thank you; I think you've discovered a bug. I believe some of the parameters in the companion config file are being overwritten by default values in the command-line application.
Until I can fix the underlying problem, specifying the parameters --results-per-call and --max-results on the command line should suffice.
Thank you for reporting this!

closed by #34.


Tye undeplo is not working

Describe the bug
I have deployed an application using Tye deploy successfully. When I run the Tye undeploy command it fails to undeploy the resources which were deployed to an AKS cluster. I can list the pods which are running using kubectl get pods command
To Reproduce
Deploy an application services using Tye deploy command
Run Tye Undeploy command. Tye shows Found 0 resource(s)
Further technical details
tye version : 0.3.0-alpha.20273.1+65c09d737e36edd3757b248967db252a7fff9e75

If possible rerun the command with -v debug

and include the output

The platform Windows 10

@jkotalik Did you try undeploy with dockerfile built containers?

@jkotalik you can find the repo on which I am trying Tye currently here
https://github.com/nileshgule/pd-tech-fest-2019

Yeah sounds like that is most likely the issue.

@NileshGule I think the bug is a bit on both sides here. The issue is that there is no application name defined in the tye.yaml. I see a few actions here:

Default to the application name, if not defined, to the current directory name.
Required that a name is defined in the tye.yaml.

@davidfowl thoughts?

hi @jkotalik,
It would be better to keep the deploy & undeploy commands in sync. If the tye deploy is able to deploy the application without specifying the application name, then undeploy can use the same convention used while deploying the application to reverse the action.
Other option could be to make the application name mandatory.

@NileshGule I fixed it and did the first option you suggested.

Feel free to try the latest nightly build and see if that works.


Prepare repo for reboot-dev-bot's eventuals auto-updates

This PR adds updated dev-tools submodule which is based on artur.PR-bot-for-updating-eventuals branch. In this branch there all scripts needed for reboot-dev-bot.
NOTE: before merging this PR make sure that PR in 3rdparty/dev-tools was merged!!! And then change branch to main in this PR!!!

Not sure if you'll need this after the changes suggested in the other PRs!

Yep, since all stuff will be moved from dev-tools to eventuals repo, we can close it!


Enum conversion is inconsistent between data storage types

Describe the bug
When enums are stored in SQL they can be a different value than when stored in Cosmos DB
To Reproduce
In the EnumLiteralJsonConverter.cs the FHIR Utility method GetLiteral is used to try to get a value for an enum in JSON data. This converter is used in the SQL data store, but not in the Cosmos DB data store. The GetLiteral method will attempt to map an enum value to its linked primitive value if it has one, while Cosmos DB persists the string representation of the enum value's name.
Expected behavior
The two data stores have the same data persisted.
Actual behavior
In SQL the value could be parsed to a primitive value, while in Cosmos DB the name of the enum value is persisted.
An additional question is whether we should be using the GetLiteral method from the FHIR Utility for non-FHIR enums. While the method is written to work on non-FHIR enums, it will error on enums set up in certain ways (most notably those without a 1 to 1 mapping).

closing a we won't prioritize this right now.


For actions that allows retrying, let the user retry again

Most of the time, if an action has to be retried, it's because A) the software is still running, or B) some of the uninstall actions are taking longer than expected, or C) I have a file opened in some software, e.g. a config file opened in a text editor.
In many cases, the user could solve the issue and retry; by now "ignoring" the error, we leave junk that could be avoided.
Suggestion:
Maximum tries of 3 reached. Try again? (Yes/No):

Example of what it currently does:
vagrant v1.6.3
 vagrant has been successfully uninstalled.
This is try 1/3. Retrying after 300 milliseconds.
 Error converted to warning:
 Cannot create a file when that file already exists.

This is try 2/3. Retrying after 400 milliseconds.
 Error converted to warning:
 Cannot create a file when that file already exists.

Maximum tries of 3 reached. Throwing error.
Move failed with message:
 Cannot create a file when that file already exists.

 Attempting backup move method.

vagrant v1.6.5
 Skipping auto uninstaller - AutoUninstaller feature is not enabled.
 Skipping auto uninstaller - AutoUninstaller feature is not enabled.
 vagrant has been successfully uninstalled.

For more details: https://groups.google.com/forum/#!topic/chocolatey/UVncL7PxXRg

Moved to choco repo


RHIF-190: undo insights dashboard nav ID change

It seems changing the ID of the RHEL dashboard nav was not a good idea. After the PR got merged, this renaming did get reflected. This undoes that ID change.
Small question if you have time to answer, otherwise please ignore it:
I am wondering what is difference between rhel-navigation.json and insights-navigation.json? It seems they are mapped to each other?

@Hyperkid123 can ask your one more review on this?

Small question if you have time to answer, otherwise please ignore it:
I am wondering what is difference between rhel-navigation.json and insights-navigation.json? It seems they are mapped to each other?

@mkholjuraev there is/was a discussion about renaming the insights bundle to Rhel. Because this question was popping out quote often, instead of duplicating/renaming the nav file, we just created a symlink so the devs don't have to care.


Inherited interface functions cause compile error when interface extensions are reordered.

TypeScript Version:  3.8.3

Search Terms:

Order sensitive Interface Extension
TS2551

I have two interfaces, one providing the function toJSON(), the other toJSONLD().  I then make an interface that inherits from both of these.  Depending on the order in which I place these interfaces, toJSON() and toJSONLD() get detected by intellisense and recognized by the type system, yet are marked as not found by the compiler.  Additionally, minor changes to the code (like changing the generic parameter of toJSON) also cause the function to once again be detected properly.
This playground snippet has two interfaces: ThingEventBroken and ThingEventFixed.  They are identical, and only differ in the order in which I specified the inheriting interfaces.
ThingEventBroken throws compile errors when trying to use the two functions, while ThingEventFixed handles them properly.
Additionally, ThingEventLobotomized uses the same interface order as ThingEventBroken, but uses any for the generic parameter to JSONAble.  The issue goes away in this case.
Code
Playground snippet
Expected behavior:
Functions provided by interface extension should be present regardless of order.
Actual behavior:
Changing the order of the interfaces results in toJSON() and toJSONLD() not being recognized by the compiler, while still being recognized by the type system.

A significantly simpler repro would be appreciated, if possible

I tried trimming out everything I could while still keeping the issue in place, and found another facet of the bug trigger:
playground link
The following code is part of the bug's cause:
export type ToJSON<T> = T extends Function
  ? T
  : T;

This should be equivalent to
export type ToJSON<T> = T

However, the former causes the functions on the interface to be removed, and the latter does not.  It shouldn't even have the capability of affecting the functions as this type is being used as a return type for one of the two functions; it is not responsible for defining the functions themselfs.
This triggers the issue when used in an interface like this:
export interface ThingEvent extends
  JSONAble<ToJSON<ThingEvent>>,
  JSONLDAble

Interestingly, with the stripped down version, flipping the order of interfaces causes a different behavior:
export interface ThingEvent extends
  JSONLDAble,
  JSONAble<ToJSON<ThingEvent>>

This now fixes ToJSONLD, but JSONAble remains broken.  This is odd, as the full example will have both functions work correctly when flipped.
More experimentation also reveals that replacing the interface with a type will work correctly:
type ThingEvent2 = JSONLDAble & JSONAble<ToJSON<{testProperty: number}>>
const thing2: ThingEvent2 = null as any;
thing2.toJSON();
thing2.toJSONLD()

This has both functions work as expected.  Perhaps the issue lies somewhere in the self-extending interface?


PLAT-72718: Scrollable and VirtualList: Update lifecycle method

Checklist

[x] I have read and understand the contribution guide
[ ] A CHANGELOG entry is included
[ ] At least one test case is included for this feature or bug fix
[x] Documentation was added or is not needed
[ ] This is an API breaking change

Issue Resolved / Feature Added
Removed deprecated componentWillReceiveProps methods used to configure Spotlight containers.
Resolution
Replaced componentWillReceiveProps with render method.
Additional Considerations
There was a missing code to reduce the number of calls of Spotlight.set in Scrollable, so I fixed it also.
Links
PLAT-72718

LGTM

I updated to remove side effects from the static method.

The call in constructor looks good for now. To reduce calls to Spotlight, I left code to check the modification of props and the initial Spotlight configuring is needed at least once at the beginning.

Any reason why we can't run configureSpotlightContainer in componentDidUpdate?

render is executed in render phase and componentDidUpdate is in commit phase, so I just wanted to set up spotlight config in render phase since a focus could be moved out of a scrollable area if a user input occurs during updates. But, I think now that I don't need to consider such an abnormal scenario which cannot happen in apps. So, it looks better to move the code. I will update. Thanks.

Updated.

I was thinking more like this https://github.com/enactjs/enact/compare/develop...feature/PLAT-72718-stephen

Oops, what a silly mistake I did! Thanks.


Lighthouse service comparison with AWS service

Could please provide the comparison service in AWS for Azure LightHouse.

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

ID: 30d02f16-9621-d204-4132-8ce8db79b0af
Version Independent ID: 65b4385b-79f0-d842-d4a1-5d013615f9b1
Content: AWS to Azure services comparison - Azure Architecture Center
Content Source: docs/aws-professional/services.md
Service: architecture-center
Sub-service: cloud-fundamentals
GitHub Login: @doodlemania2
Microsoft Alias: pnp

Thanks for reporting - this issue is under review.  This is a Microsoft Internal DevOps Bug ID AB#210457

Is there a comparable service to Azure Lighthouse?

thank you for the update. let me know, when the article is updated.
On Sun, Apr 26, 2020 at 9:16 PM absheik<EMAIL_ADDRESS>wrote:

Thanks for reporting - this issue is under review. This is a Microsoft
Internal DevOps Bug ID AB#210457
https://dev.azure.com/ceapex/0ed5b4a0-21d8-4dc2-8b95-5fdb8449e2bd/_workitems/edit/210457
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/architecture-center/issues/2100#issuecomment-619572842,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/APIX5MQSTB5R7N4GQ57BLOLRORJOVANCNFSM4MRJAZCA
.

--
Regards
Shashi Kanth Mantri
Systems Analyst
Bangalore
+919620475594

Perhaps AWS Control Tower is what you're looking for: https://aws.amazon.com/controltower/

That's certainly similar, but Lighthouse is really targeted at SIs or others managing subscriptions on behalf of their customers. So, I'm not thinking there's a 1-1 exact match. We'll continue to think on it though. Closing for now.


fix: Do not restart argocd-server on changes to argocd-tls

What type of PR is this?
/kind bug
What does this PR do / why we need it:
This bug fixes a reconciliation loop and race condition between the Argo CD Operator and Argo CD.
Argo CD usually picks up changes from argocd-secret without the need to restart. This is also true for changes to tls.key and tls.crt fields, as Argo CD would just restart the TLS listener with the new configuration on this occasion.
The Operator instructs the argocd-server deployment to restart after a change to tls.crt or tls.key in the -tls secret. This will, for some reason, trigger Argo CD to generate a new key in tls.key of argocd-secret, which leads to the reconciliation loop and the constant restarts.
Have you updated the necessary documentation?

[ ] Documentation update is required by this PR.
[ ] Documentation has been updated.

Which issue(s) this PR fixes:
Fixes #? GITOPS-1300
How to test changes / Special notes to the reviewer:

This needs a backport to rhos-v1.2 branch as well.


Potential issue with codegen for struct types

Have mixed feelings about this, would need to check what else has changed.
Main reason being, it looks like we've lowered a generic call further down (i.e. this is now <T> rather than ReadOnlySequence<byte>) and that may have implications around codegen for struct types.
Originally posted by @to11mtm in https://github.com/nats-io/nats.net.v2/pull/303#discussion_r1442268374

I have been browsing issues and found this one. What kind of codegen implications are you worried about regarding structs? Perhaps I can help.
Usually, the corresponding method bodies get their own monomorphized instantiations with optimal code and all generic-related checks get optimized away - CoreLib relies on this mechanic quite heavily to write zero-cost abstraction code which suspiciously looks like C++ templates.

I have been browsing issues and found this one. What kind of codegen implications are you worried about regarding structs? Perhaps I can help.
Usually, the corresponding method bodies get their own monomorphized instantiations with optimal code and all generic-related checks get optimized away - CoreLib relies on this mechanic quite heavily to write zero-cost abstraction code which suspiciously looks like C++ templates.

The concern to be had here is that the lower monomorphized calls exist, the more unique code branches exist... the lesser impact is that type args may have to get passed around more, but more important concern is that in scenarios where consumers are primarily using (a variety of) different struct types in their app, the number of monomorphized instantiations may be detrimental to code caches/etc.
This may be a scenario worth it's own benchmarks (it could very well be not worth worrying about,) That will give us more data and potentially see whether there are other potential optimizations to be had in the call. One option that sometimes helps is taking the 'nongeneric' sections of a method and moving those into calls (This way, the monomorphized code can be smaller and common bits stay in cache.)

It seems there is quite a bit going on so let me address these one by one :D

struct generic instantiations do not create more branches (unless you mean manually written code which does unbox + switch on type)
the number of generic instantiations is something that even CoreLib does not care about in 99% situations
CPU cache does not care for the number of generic instantiations either, it is populated along the execution path guided by branch predictor and is either way so large that it's not a concern in case of .NET
CoreLib cares about code size specifically because it usually means reducing the amount of work done, which is exactly what struct generics do since they eliminate generic dispatch cost that exists for objects (if methods are called on them)

struct generic instantiations do not create more branches (unless you mean manually written code which does unbox + switch on type)

poor wording here, but what I mean is that, to the best of my understanding, (could be wrong here) but .WritePublish<StructSizeOfInt32One>() and .WritePublish<StructSizeOfInt32Two> would each get their own monomorphized implementations. My understanding (again could be wrong here) is that the old code was writing to buffer, such that each serialized write to command queue was monomorphized, however the actual protocol writer was -not-, there was only the implementation for the enclosed ReadOnlyMemory (or other wrapping construct).

What actually does matter however is large method bodies that may cause JIT to regress due to running into either its inliner or locals tracked budget which causes the codegen quality to degrate significantly. For these, it is optimal to simply have high level throughput/latency benchmarks

Per above this is where my concern lies and where benchmarks would help. As it stands the method in question is ~100 lines (including spacing) so there is a question of if anything can be done to help.

with spot checks of codegen against hot paths detected by profiler (which you probably know better than I do :) )

More than happy to defer to your judgement if this is a nothingburger;
will happily admit if I can't compare the ASM in SharpLab (and shamefully admit my dotTrace workflow is atrocious) I just try to write some fair benchmarks and draw the line there.

poor wording here, but what I mean is that, to the best of my understanding, (could be wrong here) but .WritePublish() and .WritePublish would each get their own monomorphized implementations. My understanding (again could be wrong here) is that the old code was writing to buffer, such that each serialized write to command queue was monomorphized, however the actual protocol writer was -not-, there was only the implementation for the enclosed ReadOnlyMemory (or other wrapping construct).

If the access is synchronized, it's no different as two separate methods calling it. Perhaps another mental abstraction you could apply to this scenario is struct generics working the same way as object generics except being a zero-cost abstraction? They do not introduce program behavior differences in such way.


Fail when using hcpmmp1 atlas and verbosity level 3

Here is the command I ran (I have previously run this command successfully with the desikan atlas and no output verbosity flag):
dpat@Saci:/Volumes/Main/working/MRtrix_connectome2/data% docker run -i --rm -v ${PWD}:/bids_dataset -v ${PWD}/derivatives:/outputs diannepat/mrtrix3-hotfix /bids_dataset /outputs participant --participant_label 102 --parcellation hcpmmp1 --output_verbosity 3 --debug --skip-bids-validator
The error.txt contents:
labelconvert freesurfer/mri/aparc.HCPMMP1+aseg.mgz/aparc.HCPMMP1+aseg.mgz /mrtrix3/share/mrtrix3/labelconvert/hcpmmp1_original.txt /mrtrix3/share/mrtrix3/labelconvert/hcpmmp1_ordered.txt parc_init.mif
labelconvert: [INFO] opening image "freesurfer/mri/aparc.HCPMMP1+aseg.mgz/aparc.HCPMMP1+aseg.mgz"...
labelconvert: [ERROR] Not a directory
labelconvert: [ERROR] error opening image "freesurfer/mri/aparc.HCPMMP1+aseg.mgz/aparc.HCPMMP1+aseg.mgz"
I have saved the entire results directory, so if there is anything else you need, please let me know.  I just started rerunning with the desikan atlas to see if it completes (since this looks like the issue from the error.txt).
Thank you,
Dianne

Thanks for the report. Looks like I've buggered up and erroneously duplicated a line of code in the process of resolving different branches of code. The fix should be as simple as d69df96, but I'll hopefully leave a system running through the script overnight with your settings to confirm.
Ideally I'd test every possible set of command-line options as part of Continuous Integration, but unfortunately the run-times are too long :-(

Closed by #43, should now be on Docker Hub as 0.4.2.

Thank you so much!  I look forward to trying it.


x/tools/cmd/gotype: "could not import" packages

gotype fails to import local (not relative) packages within a Docker container.
Context
go is installed in a Docker container, the base image is alpine:3.2.
See the Dockerfile.
Steps
1. Mount the current path on the host dynamically in the container to fit in the GOPATH within the container: let's say my PWD is ~/go/foo/bla on my host, then I run the following command:
$ docker run --rm \
  -v $PWD:/root/go/src/github.com/foo/bla \
  -w /root/go/src/github.com/foo/bla \
  -it mycompany/go bash

2. Run gotype . in the project folder (located in the GOPATH)
Then I get the following errors:
cli.go:8:2: could not import github.com/foo/bla/logger (can't find import: github.com/foo/bla/logger)
cli.go:9:2: could not import github.com/foo/bla/processor (can't find import: github.com/foo/bla/processor)
cli.go:125:2: undeclared name: logger
cli.go:130:4: undeclared name: logger
cli.go:133:3: undeclared name: logger
cli.go:136:7: undeclared name: processor

The project local dependencies can't be imported. The other imports are OK though.
Environment
$ go version
go version go1.5.1 linux/amd64
$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/usr/lib/go"
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT=""
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"

CC @griesemer @alandonovan

The gotype tool assumes that you have recently done a "go install" of all dependency packages that are imported by the source files that it type checks, since it parses the pkg.a object code files produced by the compiler in order to obtain type information.  (This limitation is unfortunate and not well advertised.)
(The golang.org/x/tools/go/loader package provides an alternative means of getting type information for dependencies, by loading and type checking the whole program from source.  However, gotype doesn't use it, not least because it is not in the standard library.)

OK, good to know... thanks for the info.

@alandonovan Just tried to replace my "go install && go test -run=$^" onsave hook with x/tools/cmd/gotype and this made it pointless: I'll fix something in package A, go over to package B that imports A, save, and the result would be inconsistent.
What about having a flag to use golang.org/x/tools/go/loader? Would it make sense? Would you accept a PR to do this?

@FiloSottile x/tools/cmd/gotype is on life-support only (keep it building for now) since it depends on x/tools/go/types which also is not further developed. Instead, the new versions of both are now in the standard library: The most up-to-date type-checker is go/types, and the directory contains a stand-alone gotype command (see comment in gotype.go for how to build that binary).
Thus, both the library and the gotype command are now independent of x/tools. We don't want to introduce a dependency on x/tools by using x/tools/go/loader.
The long-term plan is to determine a long-term solution/placement for x/tools/go/loader; we are hoping to make some progress on this for 1.7.

Is there some reason gotype.go isn't in its own cmd package, and thus go-gettable?

gotype.go is a small tool mostly for "interactive" testing of go/types;
it's not super-useful on its own (you can always use the compiler). It
seemed easiest to just keep it as a separate package in go/types. It's a
single file so there's no problem in getting it if need be.

gri

On Wed, Mar 2, 2016 at 6:01 AM, Alec Thomas<EMAIL_ADDRESS>wrote:

Is there some reason gotype.go isn't in its own cmd package, and thus
go-gettable?
—
Reply to this email directly or view it on GitHub
https://github.com/golang/go/issues/12703#issuecomment-191248269.

Your use of the word "interactive" is relevant, as gotype is currently very useful for inline linting in text editors (see below). It is the only "linter" that picks up a certain class of errors (like misspelt keywords). Without it, these errors go unreported.
Using the compiler itself for inline linting is not ideal, as you generally don't want to generate artifacts. Additionally it may result in quite lengthy linting times under some circumstances (uncompiled dependencies).
I could simply copy gotype.go into its own repository and go get that, but that has ongoing maintenance issues. I'd prefer not to do this.
Please reconsider!
Linters using gotype:

Syntastic (VIM)
SublimeLinter
Atom

Also, any editor linter using gometalinter also relies on this functionality, including Emacs flycheck and many others.

@alecthomas Just to make sure I understand you correctly: You are bringing up a separate (different) issue here (gotype not being go-gettable). If that is what you mean with "Please reconsider", please file a separate issue for that. If not, please clarify. Thanks.

Ah yes, will do.

FWIW, go test -i is a workaround for the import issue if the issue is with test sources. I just submitted a patch for this issue for the gometalinter tool.

Note gotype cmd has now been removed in golang/tools@f5a6ee1

x/tools/cmd/gotype was removed because we don't want to maintain two slightly different versions. The latest and up-to-date version is in (std/lib) go/types. It's a stand-alone app gotype.go, and must be built with go build gotype.go in that directory, for now. It supports a new flag -c which permits the specification of the compiler that was used to create packages. Importing from source is now possible with -c=source. Thanks.

I have created a copy of the old source at https://github.com/jayvdb/gotype, and @coala is now using that as needed by its CI.
If there is any problem with my copy repository from a licensing/etc perspective, feel free to email me, or submit PRs.

@jayvdb There's no problem with your copy as long as you keep the copyright notice in the source. You may eventually want to move to the latest version which is in (std/lib) go/types/gotype.go (or copy it as needed).

re the fork repo, my needs are for regression testing only, so I have no need for the latest version in that repo.
coala can add a deprecation notice, and/or wrap the stdlib version.  Added https://github.com/coala/coala-bears/issues/1488 about that.


createArrowFunction: parenthesize comma sequence

Fixes: #25366
/cc @rbuckton

The build crashes on TravisCI Node.js v6 with an Out of memory error. Looks unrelated

@rbuckton can you please review.


Filters for large databases

I'm working with a very large database (oracle, in this case), for which i want to pull only a few tables. After setting filters in the .toml file and trying to generate the library, I'm finding that it is taking far too long.
I wonder if the logic for filtering can be partially applied earlier, when the GetSchema() methods are called.  The GetSchema() method has an overload for specifying exclusions that might have some performance gains here.
Here's a link to the oracle docs, but I believe that it's the same idea in each of the providers sqlhydra is using.
https://docs.oracle.com/cd/E85694_01/ODPNT/ConnectionGetSchema3.htm

How long does it take? How many tables do you have?

I checked some of the unfiltered results for the GetSchema calls:
Tables -> ~ 50,000  (returned this data quickly)
Views -> ~ 40,000 (returned quickly)
Columns -> ~ 4,000,000 (returned after about 45 minutes)
I kicked off the sql hydra tool and had to kill it after 3 hours.
Practically speaking, I think I'll just need to ask the db admins to create a user that can only access the tables that I'm interested in. Not ideal for dev, in my case, but not unreasonable.
BTW - I'm finding now that the I misunderstood how filters work - in my case, i just wanted 2 tables in scope.  I added those to the Include section of the config, but I guess there's not a way in the exclude to exclude everything except those two.  That would be why the file generation was especially long in my case.  Am I overlooking a simple way to do it without adding a bunch of individual schema/table names/wildcards?

It looks like GetSchema for all the db providers accepts a restrictionValues: string array argument.
For Oracle, it looks like:
restrictions[0] = schema/owner restrictions
restrictions[1] = table restrictions
restrictions[2] = column restrictions
I would assume that these would accept multiple args, but the example doesn't show what the delimeter is.
I'm also not sure if all the providers use the same format.
I don't think the current [filters] include / exclude in the TOML file can be repurposed for this use case.
The TOML config would probably need to be extended with a new section.
Maybe something like:
[schema_restrictions]
schema = [ "dbo" ]
tables = [ "Customers"; "Orders" ]
columns = [ ]

But there's still a lot of ambiguity here.

That sounds like an improvement for sure.
Regarding the restrictions arguments - when I played with it last week, I found that each kind of schema ("Tables", "Columns", etc)  has different parameter sets - but none of them are wildcard based, so it would have to be something done iteratively.  It's also different per provider (I only looked at Sql Server and Oracle, but they had different parameter sets).
For a giant database, it's probably not unreasonable to just have a concrete list without wildcards provided, and could be a big savings if collected/filtered at the beginning.  However, for smaller databases, it's probably not worth the effort.

Perhaps a better implementation would be to allow the user to configure a simple array of restrictions. The config wouldn’t try to prompt for tables, schemas, etc.
That way they use would be responsible for passing in the proper restrictions per the provider they are using.

Sounds reasonable - let a user do things the current way, or else opt in to the advanced filtering if they need it

I started to implement this and then realized that the GetSchema restrictions do not allow more than one "Tables", "Views" or "Columns" filter. I feel that this makes it not worth the added complexity of the implementation.
However, I did optimize the tables to filter before the columns are calculated, so that will at least provide some optimization for you.

Thanks for giving this some attention, I'll check it out when I find the time!

These changes are now available in v2.1.0.
Maybe you can take advantage of the new restrictions.
Hopefully, the earlier table filtering optimization will help.
https://github.com/JordanMarr/SqlHydra/releases/tag/v2.1.0

Hey, this was a great improvement!
You noted in the config docs the limitations.  Just a thought - it might be worth considering expanding the change to make the restrictions configuration a collection. In the schema providers, the calls to GetSchema(..) can happen for each record in collection, instead of just once.   sTables / sViews / sColumns would be the collected results
Hopefully that makes sense. This would allow for multiple tables, different schemas.

I did consider that as an option. However, I don't think there are enough users with schemas large enough to require this workaround; it's hard for me to justify the additional cyclomatic complexity it would impose.
Other solutions:

I think that your idea of creating a new user that only has permissions for a subset of tables is the most appropriate one.
Another "outside-the-box" solution would be to create a new schema with only the tables you care about (with no actual data) that serves only to facilitate type generation.

Your schema is by far the largest I have heard of! Mind if I ask how it came to be so large?

It's a standard Oracle EBS database, with some additional tables added over the years.  For development purposes, the developers on my team have db access for pretty much all of the tables, so that's usually used early in development.  Once things move along further, there's always going to be a user created with access only to a small set of tables that are needed.
So yea - outside of the box is certainly a sensible thing, as far as I'm concerned


Fix warnings in cargo doc

Which issue does this PR close?
Closes https://github.com/apache/arrow-rs/issues/1267
Rationale for this change
Non broken links are nice!
See https://github.com/apache/arrow-rs/pull/1266 for CI check
What changes are included in this PR?
Run
 cargo doc --document-private-items --no-deps --workspace --

Until it is clean
Are there any user-facing changes?
Doc links work better

Codecov Report

Merging #1268 (981a118) into master (43299cc) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1268      +/-   ##
==========================================
- Coverage   83.02%   83.02%   -0.01%
==========================================
  Files         180      180
  Lines       52269    52269
==========================================
- Hits        43398    43396       -2
- Misses       8871     8873       +2

Impacted Files
Coverage Δ

arrow/src/array/array_list.rs
95.52% <ø> (ø)

arrow/src/array/array_map.rs
81.50% <ø> (ø)

arrow/src/array/array_union.rs
90.76% <ø> (ø)

arrow/src/array/data.rs
83.02% <ø> (ø)

arrow/src/array/mod.rs
100.00% <ø> (ø)

arrow/src/array/raw_pointer.rs
100.00% <ø> (ø)

arrow/src/array/transform/mod.rs
84.64% <ø> (ø)

arrow/src/bytes.rs
56.25% <ø> (ø)

arrow/src/compute/kernels/partition.rs
97.45% <ø> (ø)

arrow/src/compute/kernels/sort.rs
95.13% <ø> (ø)

... and 8 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 43299cc...981a118. Read the comment docs.


CES-11082 adding rhosp release info to logs

Do we somehow want to state it is also the overcloud version, not just the undercloud?  Maybe add it to the useful IP's section we spit out?

Maybe add it to the useful IP's section we spit out?  that's done in this PR.

Looks good.


Deprecation Warning

\musicbot\bot.py:459: DeprecationWarning: change_status is deprecated, use change_presence instead.
  await self.change_status(game)

I still get this warning after so much time, and sometimes the bot crashes due to this. Is there a fix?

Crashing because of this is not a plausible cause. It is just sending this message saying that a code that MusicBot is using is outdated. You can safely disregard any DeprecationWarning messages and leave it to the bot maintainers to handle this issue. Actually, there has been proposed fixes (#684) that uses the new change_status method instead. Just wait for the new update for the new code.


DAs for Rommonkit

fixed in https://github.com/d3fend/d3fend-ontology/commit/51cb52585dec2a68ec00fefae75f1557f7f53bed


Monstrous Rebase

This PR is just meant to track changes between meta-toradex-torizon and common.
Let's build the images and test it out.

@microhobby for the manifest, which commit should I use? I'm not sure what's the strategy between the official and common releases.

you can get from https://git.toradex.com/cgit/toradex-manifest.git that was from where we forked it and then rebase the existent files and update the common one.

@microhobby that I get, what is a bit confusing is should I use https://github.com/commontorizon/meta-common-torizon/pull/15/commits/7afae1ca288061ad99af07a4dd996bc4d56288a6 for https://github.com/commontorizon/commontorizon-manifest/blob/kirkstone/torizoncore/common.xml#L92?
How exactly should we decide which commit from meta-common-torizon to base the release from?

@leonheldattoradex nope, this will be updated after the merge here with the top of kirkstone branch

@leonheldattoradex could you please share the command that you used to rebase the work here? I'm not sure, but I think that the commits from the common should stay on top 🤔

I'm not sure, but I think that the commits from the common should stay on top 🤔

They are... the stupid GitHub interface ranks the commits by date of creation, not by when they were commited to the repo itself.
Anyway, this also confused me, it's clear now. I'll update the manifest based on c38cbc8f003f7f52f9397d0637d252b279bf2a98.

Done here: https://github.com/commontorizon/commontorizon-manifest/pull/4
Let's trigger the builds on the Threadripper over the weekend and release?


Question about label map

Hello,
In the label map file, there is a background class included. I'm wondering if you found any difference with or without this? I.e. will the training work ok if there's only one face class defined?
Thanks,
Kevin

I think it's useless, but I prefer to keep it in that way.
Yeephycho
yeephycho.github.io

Hong Kong SAR, CHINA

huyixuanhyx<EMAIL_ADDRESS>________________________________
发件人: kevin-apl<EMAIL_ADDRESS>发送时间: 2019年6月8日 18:05
收件人: yeephycho/tensorflow-face-detection
抄送: Subscribed
主题: [yeephycho/tensorflow-face-detection] Question about label map (#55)

Hello,

In the label map file, there is a background class included. I'm wondering if you found any difference with or without this? I.e. will the training work ok if there's only one face class defined?

Thanks,
Kevin

―
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://github.com/yeephycho/tensorflow-face-detection/issues/55?email_source=notifications&email_token=AC2RI7CO6DYA2KVZUI66WCLPZN765A5CNFSM4HWG5RMKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GYMDMDA>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AC2RI7AS3A4CPN75QNRKEATPZN765ANCNFSM4HWG5RMA>.

Cool. Thanks!


Error while saving a Gist

I created a private gist (through Prestige UI), the file is created correctly in github and I see its contents on Prestige. When I try to save it, the label flashes to "saving" (or something like that, it does it too quickly) and then swtches back to "unsaved".
The file in github is inmodified.
This is what I see in the browser (Firefox 104.0.2 (64-bit) on Arch Linux) console:
This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. prestige.dev
proxyUrl / Env.ts:46:9
Load sheet at gist/fasolato-omicron/3a1907f8c7aaa7035ceed4d6d45c8ba8 from gist Persistence.ts:631:9
Initializing CodeMirror for Workspace. Workspace.ts:180:10
Updating editor display Workspace.ts:268:10
Updating editor display in workspace. 1 Workspace.ts:273:10
Loading failed for the <script> with source “https://gc.zgo.at/count.js”. prestige.dev:1:1
Some cookies are misusing the recommended “SameSite“ attribute 4
Updating editor display Workspace.ts:268:10
Updating editor display in workspace. 53 Workspace.ts:273:10
Updating editor display Workspace.ts:268:10
Updating editor display in workspace. 53 Workspace.ts:273:10
set isSaved to false Workspace.ts:215:12
Save auto Persistence.ts:696:9
Updating editor display Workspace.ts:268:10
Updating editor display in workspace. 68 Workspace.ts:273:10
set isSaved to false Workspace.ts:215:12
Save auto Persistence.ts:696:9
Save manual Persistence.ts:712:9
Error saving manually Error: null
    l request.js:151
    onreadystatechange request.js:166
Persistence.ts:721:11
    T Persistence.ts:721
Error: Promised response from onMessage listener went out of scope ExtensionMessagingService.js:89:34

On the network panel this is the request:
curl 'https://prestige.dev/gist/update/3a1907f8c7aaa7035ceed4d6d45c8ba8' -X PATCH -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0' -H 'Accept: application/json, text/*' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Origin: https://prestige.dev' -H 'Connection: keep-alive' -H 'Referer: https://prestige.dev/' -H 'Cookie: prestige_sid=...' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin' --data-raw $'{"readmeName": "_Test Studio torta (prestige).md","files": { "main.prestige": { "content": "..." } }}'

And this is the response: 502 with headers
PATCH /gist/update/... HTTP/2
Host: prestige.dev
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0
Accept: application/json, text/*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Content-Type: application/json
Content-Length: 1833
Origin: https://prestige.dev
Connection: keep-alive
Referer: https://prestige.dev/
Cookie: prestige_sid=...
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin

The file content seems to be irrelevant

He @fasolato-omicron, thank you for taking the time to report this. I'll take a look at this soon. 🙏

Thanks for reporting. This should be fixed now. Pleas reopen if you still see this problem. Cheers!


lua runtime error

fastfollow: lua runtime error: fastfollow/fastfollow.lua:410: attempt to index local 'A' (a nil value)
Getting this after doing //ffo me
Everything works fine though, tried duobox only.

Live version of FFXI, Windower4.
Should add that I only get these messages on my 2nd char, the one that starts following.

Alright, try the latest version, FastFollow v1.2.3. Should be fixed now.

Tested for a few hours, the initial error msg (fastfollow.lua:410: attempt to index local 'A' (a nil value)) appear to be gone but still getting Gearswap/flow.lua:374 errors. Again only on the char that is following

Do you know what action causes the error message to appear? Looks like GearSwap tries to create a packet from cache and it doesn't exist sometimes.


Including a shader at compile time

The problem is that I want to include shaders at compile time, but the #[src = include_str!("myfile.glsl")] doesn't seem to work. Is there any way to include shaders directly in the binary, while having the actual shader in a seperate file? Thanks.
error: src/graphics/shaders/mod.rs:43: proc-macro derive panicked
help: src/graphics/shaders/mod.rs:43: message: called `Result::unwrap()` on an `Err` value: "failed to parse macro input: \"#[ty = \\\"vertex\\\"]\\n#[src = include_str ! ( \\\"v_utm_line.glsl\\\" )]\\nstruct VertUtmLine;\""

Nevermind, just discovered that you can use #[path = "myshader.glsl"] instead.

This should probably be mentioned in the tutorial. Having to write the shader in-line is just yukky.


If validation not working in v1.2.10

I have this validator in my model:
question_type: [
    Validators.if({
                condition: function(fieldValue, fieldName) {
                    var val = parseFloat(fieldValue[0].id);
                    if(val > 1) {
                        return true;
                    }
                    else{
                        console.log("Here");
                        return false;
                    }
                },
                true: Validators.and([
                    Validators.required(),
                    Validators.array(),
                    Validators.minLength(1)
                ])
            })
]

The console log is printing out "Here", so I know that false is being returned from the condition. However, the overall document is being validated as true. Why is this?

You are returning false from your condition function.  This is telling the Validator to run the false validators, which you have not specified.
In pseudo code, you have If the float representation of the id of the first element of the array is greater than one, validate the field value is there, it's an array and it has at least 1 element.
You need to provide some false validators.

If I wanted to in-validate the question_type if the condition returns false, how would I do this?

You have to create reproduction repository.

ok, solved it just but putting false: Validators.equal('somerandomtext') under the true block.


Ensure paused containers can't be force-removed

Paused containers must be unpaused before being removed. Right now, if you specify --force when removing a paused container, bad things could happen.

LGTM

@rh-atomic-bot r+


"Exponential growth" Javascript submission does not work

The progress bar just keeps on circling.

@tiitlan Hi! This happens if the server is busy. We're currently using only one gunicorn engine server. Bumping it up a bit will help for sure. See this.

Thanks for clarifying.


[POAE7-2416] In Ops using Arrow Format

What changes were proposed in this pull request?
Switch InValues codegen to Arrow format
Why are the changes needed?
Arrow migration
Does this PR introduce any user-facing change?
No
How was this patch tested?
UT
Which label does this PR belong to?

@winningsix @jikunshang PR rebased with comments addressed. Please take a review again. Thanks.


Use Python instead of Java?

More Universities are using python because of the learning curve for students. We could possibly add alternatives to the programming courses.

MIT's 6.0001 and 6.0002 use Python. Although the focus is on fundamentals not the language. I think that's a good thing.

I think it all depends on the policies of each university.
And if there is python in the learning material it is also better, because currently python is more widely used in the world of education as a support for basic understanding for data processing.

Python and java should both be used. Python for more of a job oriented needs and java for greater understanding of programming,

There is already another list that changes all the Java courses to Python ones and adds the section Data Science, this addition is not necessary.

Could you point me to that list @arthurnunesc ? 🙏

https://github.com/ForrestKnight/open-source-cs-python here it is.


[pulsar-client] Fix pendingLookupRequestSemaphore leak when channel inactive

Motivation
https://github.com/apache/pulsar/blob/b89c1451551a6bbe681465726906a2e61c9d8a69/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java#L282-L297
The pendingLookupRequestSemaphore will leak when channel inactive. There are LookUpRequestSemaphore not released when removing it from pendingRequests
Modifications
We can't easily release the semaphore in channelInactive, because there are not only LookUpRequest. So release the semaphore when connectionException
Verifying this change
Add unit test case to cover this change
Documentation

[ ] doc-required
(Your PR needs to update docs and you will update later)

[x] doc-not-needed
bug fixs, no need doc

[ ] doc
(Your PR contains doc changes)

[ ] doc-complete
(Docs have been already added)

@codelipenghui @merlimat @eolivelli PTAL, thanks

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@b89c145). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master   #17856   +/-   ##
=========================================
  Coverage          ?   70.88%
  Complexity        ?      438
=========================================
  Files             ?       26
  Lines             ?     2246
  Branches          ?      245
=========================================
  Hits              ?     1592
  Misses            ?      481
  Partials          ?      173

Flag
Coverage Δ

unittests
70.88% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

@eolivelli I have done addressed your comments. PTAL again. Thanks

/pulsarbot run-failure-checks


Optimize image channel detection

Speeds up compression

Thanks!

Cherry-picked for 3.4.

Actually undid cherry-pick as it depends on _get_color_at_of which doesn't exist in 3.x. Should be backported manually if anyone is interested.


Using Clang + MSYS2 on Windows generates shared library names starting with "lib"

This seems inconsistent with what GCC does. For example, compiling with GCC results in sfml-system-3.dll, while compiling with Clang results in libsfml-system-3.dll. I suspect some mistake in the CMakeLists.

The logic is only done for GCC and not for Clang:
https://github.com/SFML/SFML/blob/master/cmake/Macros.cmake#L108-L113

What's the reason we remove the prefix anyway? To match what MSVC does?

The origin is unclear, probably for consistency, see #1422
If we want to change it, I think for SFML 3 it would be fine, I wouldn't change it for SFML 2.x though, for the reasons provided on the other PR.

Fixed in #1924.


Oauth server issue with token authentication

Hello!
I have a route which I am requesting to fetch some information that should only be allowed when the user is authenticated and the access_token is provided. To do so, I use the provided middleware as such:
    // Code in bootstrap.php
    $app->routeMiddleware([
        'oauth' => LucaDegasperi\OAuth2Server\Middleware\OAuthMiddleware::class
    ]);

    // Code in routes.php
    $app->get('{id:[0-9]+}/action/follow', [
        'as' => 'user.action.follow',
        'uses' => 'Users\UserController@getFollowUser',
        'middleware' => 'oauth|validate:users'
    ]);

When I use a REST client such as Rested or Paw, any requests to this URL containing the Authorization header yields the following response, which is correct and perfect:
HTTP/1.1 401 Unauthorized
Connection: keep-alive
Content-Type: application/json
Server: nginx/1.8.0
0: HTTP/1.1 401 Unauthorized
Date: Wed, 02 Dec 2015 08:30:04 GMT
Cache-Control: no-cache
Transfer-Encoding: Identity

{
    "error": "access_denied",
    "error_description": "The resource owner or authorization server denied the request."
}

But when the same request is performed through the web browser (Angular $http) I get the same response, but a different status code (500) and the response as HTML, which is not preferable at all:

If you can't see the image, visit this page: https://www.dropbox.com/s/4nsi6h4swbmn5jc/Skärmklipp 2015-12-02 09.57.14.png?dl=0
Could anyone explain why it suddenly generates an internal server error, and why it doesn't return it's response with the proper status code and payload as it does from any REST client? As far as I'm aware, this is something that started happening in the most recent update of this library, because I had not seen it occurring before.
These are the request headers sent by my REST client:
Accept: application/json
Accept-Encoding: gzip, deflate
Authorization: Bearer BaUbu9Nj2quK3VR4fizcscxA31Q1mE79iqxV2uc9
Accept-Language: sv-se

And these are the ones sent by my web browser (Google chrome, but same problem in Firefox)
Accept:application/json, text/plain, */*
Accept-Encoding:gzip, deflate, sdch
Accept-Language:sv-SE,sv;q=0.8,en-US;q=0.6,en;q=0.4
Cache-Control:no-cache
Connection:keep-alive
Host:*REMOVED*
Origin:*REMOVED*
Pragma:no-cache
Referer:*REMOVED*
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36

Even when I explicitly set Accept: application/json in the web browser, I still get the same results, and funny enough, omitting the same request header in the rest client yields the same results.
How can this be?
Thanks in advance,
Jonathan

Is this the same as in #602 ?

@vinkla Nope, this is not the same error. The authorization is functioning as expected, but my issue is that when I do not provide a token, or the token is invalid, a Internal Server Error (500) is returned in the browser, but 401 (Not authorized) when I use a REST Client.
There has to be some bug in the code, as it should always use 401, and not 500. Since we are building a REST API we only handle JSON, not HTML responses.

I have same error.

@jonathanlundstrom just to cover some basic questions; have you registered the OAuth exception handler middleware? https://github.com/lucadegasperi/oauth2-server-laravel/blob/master/docs/getting-started/lumen.md#register-package

@vinkla Yes, I have done so, and as I mentioned it works as expected from REST clients such as "Rested" and similar, but not in the actual web browser. My colleague is also experiencing this issue, and it started after the latest update.
I first noticed it on his computer after a fresh composer install with the latest version of this package. He started receiving 500 instead of 401. Having an older version, I didn't have these issues, but as soon as I ran ´composer update´and received a later version, this started happening to me too.
Could it have something do with this bug?
https://github.com/lucadegasperi/oauth2-server-laravel/issues/536
This is my middleware binding:
$app->middleware([
    Illuminate\Cookie\Middleware\EncryptCookies::class,
    Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
    LucaDegasperi\OAuth2Server\Middleware\OAuthExceptionHandlerMiddleware::class,
]);

Thanks again, I really hope we can get this bug sorted, seeing as we've integrated this package fully, and it works great other than this.
Regards,
Jonathan

Maybe it is related to #536 but then it shouldn't work in later versions either. I think this has to with something in the latest version of the league/oauth2-server package. Does it work if you specify version 4.1.3 for the league/oauth2-server package?

I just have same problem and tested all combination but the problem is in league/oauth2-server and not in lucadegasperi/oauth2-server-laravel (5.1.0).
it work if version is fixed: league/oauth2-server (4.1.3)

@talevskiigor do you get the same error as in #602?

yep

@vinkla How do I fix version? If I go inside oauth2-server-laravel and change the version to "league/oauth2-server": "4.1.3" nothing happens when I run composer update.

@jonathanlundstrom since we specify "league/oauth2-server": "4.1.*" you can just add "league/oauth2-server": "4.1.3" in your projects root composer.json file.

@vinkla Thank you.
I've updated my composer and installed version 4.1.3 instead of 4.1.4. Unfortunately, this doesn't make any difference at all. I still get a 500 server error as my first post states, rather than a 401 (Expired token) or 400 (No token), which I get if I use a restful client.
The request headers are set to only accept Application/json which is the same as any client. As I stated, this error started with the last update to this package and its dependencies.
How can this be?

Yeah, that is strange. What if specify the working version of this package?

Which was the last version before the current one, that terminal is long gone :/

Look at the releases page or on the packagist listing.

@vinkla Hmm, this is getting stranger. I tried with even older versions, and I still get the same issue. I'm assuming that you know what I mean. This is the setup I'm using now, so it might not be a version issue after all.
"lucadegasperi/oauth2-server-laravel": "5.0.0",
"league/oauth2-server": "4.1.0"

I just don't understand why this happens, and it's very frustrating. If we're not able to access the correct status codes, then we can't create a proper error handling. We can't just magically assume that an error 500 means that they're not/no longer authenticated. This should only be used in instances where the server has encountered an error.
How can InvalidRequestException be caught when I request the same URL through Rested or a similar application, but not when I call the same URL using Angular´s $http library, with the same headers?
Could it be that is an XHR issue? Because if I navigate to the requested URL with the browser, I get the correct response, but when the same URL is requested from the web client using XHR (cross-origin) I get the response as HTML and the 500 - Server Error code instead of 400 or 401, as it should be. Seems like there is an actual code fault.
If we can discuss in private, I can give you access to URL:s where you can see this issue in action.
For us, this really seems like a bug, and a critical one as well, might I add.
Thanks for helping me debug this!

500 will be thrown when something in your setup isn't called or executed as it should. Could you paste the controller which deals with the endpoint?

@vinkla All the endpoints have the same issue, and they're based in at least 8 or 10 different controllers. This error resides in the ResourceServer class (not your code), but the OAuthMiddleware does not seem to be working as expected under CORS. If it was, it would not let the request continue as it's either missing the access_token or the token is invalid. Hence the correct status code should be returned.
As the middleware lets the request continue, the ResourceServer fails to find the access_token and throws an exception, which should have been handled already in the Middleware.

@jonathanlundstrom do you use slack? If so, I can invite you to a Swedish channel for front-end devs.

@vinkla Here's one of the endpoints for the API Server:
$app->group([ 'prefix' => 'feeds', 'namespace' => 'Hubbit\Http\Controllers' ], function ($app) {
    $app->get('/posts/ids', [
        'as' => 'feeds.post.general.ids',
        'uses' => 'Feeds\FeedController@postGetGeneralIDs',
        'middleware' => 'cors|oauth'
    ]);
});

And this is the controller code used to handle the request:
public function postGetGeneralIDs(Request $request){

	// Set response:
	$responseCode = 200;
	$responseContainer = [ ];

	$displayedIDs = $request->has('ids') ? $request->get('ids') : [];
	$responseContainer['post_ids'] = DB::table('posts')
		->whereNotIn('id', $displayedIDs)
		->where('status', '=', 'published')
		->orderBy('created_at', 'DESC')
		->take(10)
		->lists('id');

	return $this->buildResponse($responseCode, $responseContainer);
}

Similar code is used for the other routes.

@vinkla Yes, you can invite me at this email<EMAIL_ADDRESS>Thanks!

@jonathanlundstrom Okay, you've been invited.

Great, I've joined and I'm online 😊
On Thursday, December 10, 2015, Vincent Klaiber<EMAIL_ADDRESS>wrote:

@jonathanlundstrom https://github.com/jonathanlundstrom Okay, you've
been invited.
—
Reply to this email directly or view it on GitHub
https://github.com/lucadegasperi/oauth2-server-laravel/issues/614#issuecomment-163595105
.

--
Hälsningar,
Jonathan Lundström
Telefon: 0768-95 25 25

Problem solved! Sort of...
It turns out that there is some kind of conflict between laravel-cors and this package.
In order to get the proper responses, you have to modify the default Lumen Exception Handler found in app/Exceptions/Handler.php. You must then update the render method to look something like the code below. The "solution" was found in these issues: https://github.com/barryvdh/laravel-cors/issues/70 and https://github.com/lucadegasperi/oauth2-server-laravel/issues/569.
/**
 * Render an exception into an HTTP response.
 *
 * @param  \Illuminate\Http\Request  $request
 * @param  \Exception  $e
 * @return \Illuminate\Http\Response
 */
public function render($request, Exception $e)
{
    if ($e instanceof OAuthException){
        return response()->json([
            'error' => $e->errorType,
            'error_description' => $e->getMessage()
        ], $e->httpStatusCode, $e->getHttpHeaders());
    } else {
        return parent::render($request, $e);
    }
}

Thanks @vinkla for the support, both here and at Slack. Hopefully a member of some of the teams will figure out what causes this, and renders the OAuthExceptionHandlerMiddleware useless.
// Jonathan

@jonathanlundstrom Good job, thanks!
Solved with (Laravel 5.1):
$e instanceof \League\OAuth2\Server\Exception\OAuthException

@ArtemFitiskin Thank you! Did you use the solution mentioned above, or something else? I'm guessing your code was just to reference the full namespace, right? :smile:

@jonathanlundstrom and @ArtemFitiskin  thanks your discussion has saved me

@jonathanlundstrom
Hello,I'm try to use your method to solve the problem,but I can't solve it.Can you help me to solve it.
https://github.com/lucadegasperi/oauth2-server-laravel/issues/641#issuecomment-224476755
thanks!


Broken due to TCP error

The currently version build is breaking because of some errors in TCP package with the new version of C7.

https://github.com/Zewo/Redis/pull/4


Added htl-kaindorf.ac.at (academic email of HTBLA Kaindorf)

Website URL (German): www.htl-kaindorf.at
Informatics Department: https://www.htl-kaindorf.at/abteilungen/informatik
There already is a entry for only the htl-kaindorf.at email but the ac.at one did not exist

@TheCrether Pull request merged. Thank you!


Satisfied, but still room to improvement

Currently, I am satisfied with the approach. But we are using smarter IDEs for development, and I need still to add model properties to the doc block for the type hinting while assigning or accessing model attributes as:
     @property string    $created_at
     @property Date      $updated_at
     @property DateTime  $deleted_at

with in the model class. If it is possible and easy to go, please add this feature with in class doc block.
Still searching for fair model generation modules as Yii has.
PS: I am using PHPStrom.

Closed by PR #41


Feature/tank

Description
This is a draft, to get a review of the Side Control and Syncing System and to get opinions on the CallOnly Annotation
Added Side Control For Capabilities
Added Extensible Syncing with current support for FluidStacks and NBTSerializeable Objects
Added FluidTankMaster and SidedFluidHandlerAccess which supports Side Control
Added ItemHandlerMaster and SidedItemHandlerAccess which supports Side Control and adding predicates to slots
simplified a mixin using new instanceof logic
Added Annotation to mark Methods as only callable on logical sides
Todo

[x] GUI and Menu
[x] Registering Block and BlockEntity
[x] Add Ticker to Block
[x] Test syncing

Checklist:

[x] My code follows the style guidelines of this project (.editorconfig, most IDEs will use this for you)
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation

Looks great

I've not got enough time to do a full review, however I fired it up and noted a couple things:

The colour of the redstone control button seemed to change when water was in the tank, but not lava (pictured below). Is this intended behaviour? If so, why?
When the block is broken, it should spit out any buckets in it.

No fluid:

Water:

Lava:

To the water coloring the button blue:
That's unintended, but I think it has to do with the shadercolor. Water is a grayscale texture and it's default color is in a fluid attribute, so I need to set the shadercolor. It may be, that I forgot to add a setShaderColor(1,1,1,1) after rendering the fluid

Another issue I've only just noted; the background doesnt gray out when you have an inventory open

Fixed Dark Background

Minor interaction bug, certainly not blocking.
Hoppers can place empty buckets into the extraction slot


refactor(ast): AstBuilder extra methods use SPAN

Pure refactor. SPAN is shorter than Span::default() and is what we use elsewhere.

#7770
#7769  👈 (View in Graphite)
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Trivial refactor, so merging without review.

Merge activity

Dec 10, 8:10 AM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.