Circle disappears

Hey there,
despite the title, I'm not really sure about what's happening here.
I'm building an audio player for a website (the site is not live yet but I've attached an image of the player) and the progress circle works just fine with the first track I select but then disappears when I switch to another track.
The player is an instance of an Album object and the circle is initialized when the album code is created. When a track needs to be played, this function is fired:
playSound: function() {
    [...things]
    var audio = new Audio(this.currentPath);
    this.cachedTracks[this.currentTrack] = audio; // Caching the playing audio object
    audio.ontimeupdate = function() { events.emit('progress'); };
    audio.play();
    [other things...]
},

it essentially binds the ontimeupdate event to another function, that looks like this:
updateProgressBar: function() {
    if( !this.undefined() ) {
        var curr = this.cachedTracks[this.currentTrack];
        var prog = curr.currentTime / curr.duration;
        this.items.progressBar.circleProgress('value', prog);
    }
}

I determine the current track's progress value and update the progress circle accordingly.
As I've already written, this works just fine for the first track I select but selecting another track will make the circle disappear (the canvas is still there tho).
I've looked at jquery-circle-progress' code but couldn't figure out why, any ideas?
Thanks a lot

Alright, I have solved it and it was actually much simpler than I thought :/ I'm slapping my own face right now. The problem was for just one damn frame the value set was Not a Number. I have solved it with a simple isNaN() check.
Two lessons here:

Always check your damn variables.
If your circle disappears you have probably passed an incorrect value to the function.

Nope, nothing else :) You could make it throw an error when a NaN value is passed, tho. So people like myself would quickly find out the reason why it isn't working

That's a good idea, I'll think about it ;)


Improve code organization

Eliminate redundant code and make use of new php 7.2 and 7.3 features wherever possible.
Look at using a package like climate for cli operations.
Use Rector and Psalm for code enhancement
Look at vanilla laravel projects to get ideas of best practices to incorporate

Made some progress here. Removed things like zurb foundation and some other stuff like jquery that used to ship with this framework. Things are more bare-bones now. Also removed unnecessary methods & helper functions. This will continue to be an ongoing exercise.


Create Hello world.scala

Writing hello world program in scala language

correct the print command. It should be println

ohh...ok..rectified

Thanks! Make sure to give the repository a star and share about it as well! You can tweet about the repository as well using the tweet badge on the Readme file or website!


[BUG] radio-fill.svg is broken

Describe the bug
Newly added icon radio-fill.svg contains 2 shapes: one with black color, one with white color.
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12Z" fill="black"/>
<path d="M8 12C8 9.79086 9.79086 8 12 8C14.2091 8 16 9.79086 16 12C16 14.2091 14.2091 16 12 16C9.79086 16 8 14.2091 8 12Z" fill="white"/>
</svg>

I suspect it supposed to be wrapped in a mask.

@cyberalien Thank you for catching this. This has been fixed on the latest update.


How to initialize and apply an ensemble of models with same input?

In a haiku module, I would like to create N networks with the same structure but different parameters, then apply the same input to the N networks to get a stacked output. My current solution is using a for-loop (liist comprehension, see below) to init and apply models, but I wonder if functional (vmap over parameters, possibly) transform could apply here.
# In class A(hk.Module)
# __init__
self.models = [hk.Seqential(..., name=f“model_{i}”) for i in range(N)]
## Something like hk.lift. hk.transform, hk.vmap, jax.vmap?

# __call__(x)
y = [model(x) for model in models]  # x in shape of (B, C)
y = jnp.stack(y, axis=-2)  # y in shape of (B, N, D)

I was aware of hk.lift documentation, but the documentation, especially snippets in the summary part, does not seem to be fully working, making me more confused.

Yes. You can also use jax.pmap instead of vmap to run one model per device.
import haiku as hk
import jax.numpy as jnp
import jax

def model(x: jax.Array) -> jax.Array:
    weights = hk.get_parameter('w',
                               (x.shape[-1], 10),
                               init=hk.initializers.RandomNormal())
    return x @ weights

def main() -> None:

    USE_PMAP = False
    N_MODELS = jax.device_count() if USE_PMAP else 10

    rng = jax.random.PRNGKey(0)
    model_hk = hk.transform(model)
    model_hk = hk.without_apply_rng(model_hk)
    inputs = jnp.ones((N_MODELS, 1))
    rngs = jax.random.split(rng, N_MODELS)
    params = (jax.pmap if USE_PMAP else jax.vmap)(model_hk.init)(rngs, inputs)
    assert all(param.shape[0] == N_MODELS
               for param in jax.tree_util.tree_leaves(params))
    outputs = jax.vmap(model_hk.apply)(params, inputs)
    assert all(output.shape[0] == N_MODELS
               for output in jax.tree_util.tree_leaves(outputs))
    breakpoint()

if __name__ == '__main__':
    main()

@nlsfnr Thanks for your suggestion. The vmap outside transform way is what I am familiar with. However, the problem is that I want to achieve this within a hk.Module, to be assembled into a larger network and transform the top-level network. The snippet in my issue described the ideal interface, but I wish to use vmap instead of for-loop.
Also, that's why I'm looking into the hk.lift documentation, with no success.

Hi @jjyyxx, apologies for the delay getting back to you.
I agree with @nlsfnr that JAX transforms outside of Haiku is probably the safest route to implement this, but I understand that there are cases where this would require significant refactoring and so doing the transformation inside hk.transform is preferred.
This is a case where hk.lift is the right tool. Here is an example following the structure you proposed: https://colab.research.google.com/gist/tomhennigan/828ad6ade44713c487afd88c042a27dc/example-of-ensembling-models-in-haiku.ipynb#scrollTo=UALB9Ug2VLNY
The key part of the notebook is the create_ensemble function which drives lift for you:
def create_ensemble(model, ensemble_size):
  init_rng = hk.next_rng_keys(ensemble_size) if hk.running_init() else None
  model = hk.transform(model)
  # in_axes: rng is mapped, data is not.
  init_model = hk.lift(jax.vmap(model.init, in_axes=(0, None)),
                       name="ensemble")
  def ensemble(x):
    params = init_model(init_rng, x)
    # in_axes: params are mapped, rng/data are not.
    return jax.vmap(model.apply, in_axes=(0, None, None))(params, None, x)
  return ensemble

You can then use this to ensemble whatever network you prefer:
def model(x):
  return hk.nets.MLP([300, 100, 10])(x)

def f(x):
  model = create_ensemble(model, ensemble_size=4)
  return model(x)

f = hk.transform(f)

Of course this can be put inside another Haiku module:
def model(x):
  return hk.nets.MLP([300, 100, 10])(x)

class A(hk.Module):
  def __init__(self):
    super().__init__()
    self.models = create_ensemble(model, ensemble_size=4)

  def __call__(self, x):
    return self.models(x)

def f(x):
  return A()(x)

f = hk.transform(f)

I was aware of hk.lift documentation, but the documentation, especially snippets in the summary part, does not seem to be fully working, making me more confused.

I tried running the snippets in the docs and they are working for me in Colab, please let me know what is not working for you and I will take a look.

Thanks for your help @tomhennigan ! Your solution works perfectly. I think it's a good example to demonstrate vmapping over parameters and could be added to the hk.lift documentation.
My final snippet is
from typing import Optional

import jax
import haiku as hk

def create_ensemble(model: hk.Module, ensemble_size: int, name: Optional[str] = None):
    init_rng = hk.next_rng_keys(ensemble_size) if hk.running_init() else None
    transformed = hk.transform(model)
    init_model = hk.lift(jax.vmap(transformed.init, in_axes=(0, None)), name=name)
    def ensemble(x):
        params = init_model(init_rng, x)
        return jax.vmap(transformed.apply, in_axes=(0, None, None), out_axes=-2)(params, None, x)
    return ensemble

I used out_axes=-2 to put the ensemble axis after the batch axes (to fit the shape of other parts of my code). The substitution also leads to a 50% performance boost (of the module itself).

I was aware of hk.lift documentation, but the documentation, especially snippets in the summary part, does not seem to be fully working, making me more confused.

Sorry for this false statement. The document is correct. I found myself misunderstanding the document of hk.lift.


Expose variables in ComplexityContext to allow custom complexity calculation

Expose the variables in the ComplexityContext

This allows developers to access them when setting up a custom complexity calculation (see #6251)
Renamed it to Variables (suggested by @michaelstaib in Slack)

Closes #6251
Once this PR is approved, I can recreate them to target other branches where this is needed. Just let me know in which target branches this makes sense, please.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Some pages in storyblok are not getting called when clicked on button

I have been using @storyblok/react and react-router-dom to navigate through pages to serve the spa as we are using redux and i dont want my state to be cleared while navigating to next page/screen for some pages it is getting triggered and api call is happening and story is loaded components are rendered,for some it doesn't, although in the url of the page changes but storyblok api call is not happening .I faced this issue in the beginning and later this was working fine and showed up now I am not sure for which other pages the same issue might occur. Can i have quick solution for this please
if you see in the below image when I clicked on the my-bookings in the bottombar url has been changed but i am still in the homepage

Hi @bhavesh-chundru,
We just released Storyblok React SDK v2.0.0:
https://github.com/storyblok/storyblok-react/releases/tag/v2.0.0
With this PR we're removing the axios dependency. You don't need to install it anymore in order to use the Storyblok React SDK.
We are also adding other changes and fixes:
https://github.com/storyblok/storyblok-react/pull/345
Your feedback is appreciated


Following lost password link a second time throws exception

Affected Version
4.x-dev (probably 4.0.x too)
Description
When I follow the link to reset my password from a "forgot my password" email, reset it, log out and follow the link in my email again I get this exception:
[Emergency] Uncaught BadMethodCallException: Object->__call(): the method 'forTemplate' does not exist on 'SilverStripe\View\ArrayData'
GET /Security/changepassword?m=2&t=76e780df6db70e2d7f5416e85af0973b7d1256e88ff374afbe8b4853706e04262707451bea157bb92c5f74c8671e5d929f1fb49331ef9b2706246aa24fdca043

Full stack trace: https://gist.github.com/robbieaverill/c3ba17e20a445a444d48ec22ef7f9227
Steps to Reproduce

Create a user account with your email address
Log out of the CMS
Click on "forgot my password"
Enter your email address and submit
Follow the "reset your password" link in the email you receive
Enter a new password and submit
Log out
Follow the "reset your password" link in the email again

@robbieaverill I can confirm that I am also seeing this issue in v 4.1.0-rc2 when following a framework generated password reset e-mail link.
What is more of an issue for me, is that I see this error the first time I follow a password reset link which is generated by my codebase!
I generate a password reset link on creation of a new member and e-mail them this link in an 'notification of new account creation' e-mail (so they can set themselves a password for, as they see it, the first time). I get this error when following that link for the first time, meaning users cannot set their own passwords.
Have you found any causes of this yet? I need to find a fix before this project can go live :-(

@HARVS1789UK have you done any debugging around this issue?

@dhensby - Yes some, I have taken note of the state of the Member record in the DB in these 3 scenarios.
Framework Reset - Pre Reset
TempIDHash: null
TempIDExpired: null
AutoLoginHash: $2y$10$ae12a0a21f4ffda80dff2ud1HrolzkPdw.f.ARXLcZx13uO2/utQ6
AutoLoginExpired: 2018-03-09 11:38:44
Note: HTTP 302 redirect to strip query params
Framework Reset - Post Reset
TempIDHash: 7ecf0cd09b96ee601c0dda361c20a99b2c4b2a5d
TempIDExpired: 2018-03-10 11:42:21
AutoLoginHash: null
AutoLoginExpired: 2018-03-09 11:38:44
Note: HTTP 500 - ArrayData forTemplate issue
Custom Code Reset - Pre Reset
TempIDHash: null
TempIDExpired: null
AutoLoginHash: null
AutoLoginExpired: 2018-03-14 11:45:47 (expected as I set a 7 day validity on my link)
Note: HTTP 500 - ArrayData forTemplate issue
I notice that both instances where this error is thrown, AutoLoginHash is null, so I expect that it one of the root causes of the issue.
I need to work out why my custom code to create and send the reset link is not setting the AutoLoginHash in the database (it's clearly creating it because it is appended to the link in the query params), that will hopefully solve my issue about it happening on first view, but won't solve @robbieaverill 's issue regarding the second load of this page.

I am pretty sure that this is the culprit in both the above scenarios: (from ChangePasswordHandler.php -> changepassword() around line 118)
        // Show a friendly message saying the login token has expired
        if ($token !== null && $member && !$member->validateAutoLoginToken($token)) {
            $message = [
                'Content' => DBField::create_field(
                    'HTMLFragment',
                    _t(
                        'SilverStripe\\Security\\Security.NOTERESETLINKINVALID',
                        '
The password reset link is invalid or expired.
'
                        . '
You can request a new one here or change your password after'
                        . ' you logged in.
',
                        [
                            'link1' => $this->link('lostpassword'),
                            'link2' => $this->link('login')
                        ]
                    )
                )
            ];

            return [
                'Content' => $message,
            ];
        }

I have never seen DBField objects (or HTMLFragment?) be passed back to the template to be rendered directly before, but it seemingly works in the other scenarios a few lines above, like:
        $session = $this->getRequest()->getSession();
        if ($session->get('AutoLoginHash')) {
            $message = DBField::create_field(
                'HTMLFragment',
                '
' . _t(
                    'SilverStripe\\Security\\Security.ENTERNEWPASSWORD',
                    'Please enter a new password.'
                ) . '
'
            );

            // Subsequent request after the "first load with hash" (see previous if clause).
            return [
                'Content' => $message,
                'Form'    => $this->changePasswordForm()
            ];
        }

However, something about the first snippet seemingly means that ArrayData is returned to the template instead (perhaps the use of the 3rd parameter of the _t() method, to insert values a bit like sprintf() ?).
If I replace it with php $message = "I found the culprit!";  it resolves the issue!
Any thoughts @dhensby or @robbieaverill

@HARVS1789UK I would guess that it should be $message = DBField::create_field( rather than $message = ['Content' => DBField::create_field(. Looks like we’ve doubled-up on our arrays 😁

@kinglozzer Good spot, I hadn't noticed that part. I am just testing and confirming now.

Closed in https://github.com/silverstripe/silverstripe-framework/pull/7917


gitlab: fix the number of items per page

Instead of requesting multiple pages with the default number of items (20),
or requesting more than the max allowed by the API, request as much as
possible items per page, avoiding multiple calls in "list" subcommands.
Signed-off-by: Bruno Meneguele<EMAIL_ADDRESS>

OK. after days trying to understand why the testing code was "timing out" I discovered an infinite loop in the code.
The pagination loop was being tested against a local value instead of using the response structure already with a refreshed value, with that, we needed to keep refreshing our own to keep things in sync... which doesn't make much sense. So I added another patch to make use of the Response object.


Fixed #27008 -- Added --debug-mode option to DiscoverRunner.

merged in 5890b1613c0a348750a11239ab73a9f0075314ee, thanks!


next 3.0.x release date

Good evening,
I'd like to ask when the next 3.0.x release is planned.
Specifically I would be interested in the firmware for CC2531.
Thank you in advance

I'm currently not planning to provide updates for 3.0.x anymore

Thanks for the quick reply


Port != 8080 => this._ownerDocument.raise is not a function

I'm trying to connect to localhost:8081 (or any other port != 8080).
I get this error : TypeError: this._ownerDocument.raise is not a function
With 8080, it works as expected.
See this gist for a minimal example.

I ran into the exact same thing when trying to upgrade from ~5.0.5 to 6.1.3.
We're using port 3000. However, when I switch to port 8080, I get the same issue.
     TypeError: this._ownerDocument.raise is not a function
         at XMLHttpRequest.raise (node_modules/zombie/lib/xhr.js:250:25)
         at _window._eventQueue.http (node_modules/zombie/lib/xhr.js:175:16)
         at enqueue (node_modules/zombie/lib/eventloop.js:237:11)
         at Immediate.<anonymous> (node_modules/zombie/lib/eventloop.js:503:11)
         at runCallback (timers.js:789:20)
         at tryOnImmediate (timers.js:751:5)
         at processImmediate [as _immediateCallback] (timers.js:722:5)
     From previous event:
         at Browser.wait (node_modules/zombie/lib/index.js:258:143)
         at lazyResolve (node_modules/zombie/lib/index.js:295:36)
         at Object.then (node_modules/zombie/lib/index.js:302:16)
         at process._tickCallback (internal/process/next_tick.js:188:7)

Having the same issue when using browser.evaluate(jsCode)


How to update R for RTVS

RTVS is currently using R version 3.2.2. How do I update the R to the latest version 3.3.1?

RTVS is not linked to any specific R. You can install most recent R Open (3.3.2) from https://mran.microsoft.com/news/ or stock R from https://cran.r-project.org/bin/windows/base/

Thank you. I changed the R Engine in the R Tools -> Options menu.


Chain Page Updates

Problem solved
Short description of the bug fixed or feature added
Added Superseed Gas Credit, Funki, Somnia, lumia testnet
Linear tasks:
SOLU-1913
SOLU-1909
SOLU-1885
SOLU-1888

PR-Codex overview
This PR introduces new assets and updates metadata for various blockchain projects, particularly adding support for Funki and Somnia. It enhances the user interface by incorporating new images and updating descriptions for improved clarity and engagement.
Detailed summary

Added new image assets: funkiBanner.jpg, funkiCTA.jpg, and somniaBanner.png.
Introduced metadata records for Funki Mainnet and Funki Testnet, including descriptions and CTA buttons.
Updated Lumia metadata with a more detailed description and improved CTA.
Added metadata for Somnia Devnet with a comprehensive description and CTA.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Merge activity

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


Dynamic Folder Name Change for Multi Tenancy

I can change the folder names via the lfm.php file. But how can I dynamically change this folder name?
What I want to do:
folder_name = tenant('id').'/photos';
But when I call the tenant id in the config file, it is empty. The package I am using is tenancyforlaravel.com

I added TenancyInitialized in listener.

How? Can you explain your approach?


After installation Ray seems not working

Describe the bug
I have installed Ray and when I try to run in a controller I'm debugging anything related with Ray nothing happens.
ray('test'):  //nothing happens

ray($myvariable); //nothing happens

dd($myvariable); //I get the dump of the variable

Versions
1.3.0
You can use composer show to get the version numbers of:

spatie/ray package version:  1.5.2
spatie/laravel-ray package version (if applicable):   1.7.2

PHP version:
Laravel version (if applicable): 7.4
Desktop (please complete the following information):

OS:  macOS Catalina
Version 10.15.2

Could you create a minimal app for me to look at where in Ray is not working?

Could you create a minimal app for me to look at where in Ray is not working?

Maybe you app is in production mode? Try manually enabling it by calling ray()->enable()

Maybe you app is in production mode? Try manually enabling it by calling ray()->enable()

If it doesn't work after these tips, reopen a new issue at spatie/laravel-ray with a link to that minimal app.

If it doesn't work after these tips, reopen a new issue at spatie/laravel-ray with a link to that minimal app.

I tried with ray()->enable() and checking if by change I was in production mode but in my .env file I have APP_ENV=local.
When I have a bit of time I will create the minimal app and share the link.

I tried with ray()->enable() and checking if by change I was in production mode but in my .env file I have APP_ENV=local.
When I have a bit of time I will create the minimal app and share the link.

If you're using homestead / docker, do check our docs for a few additional tips

If you're using homestead / docker, do check our docs for a few additional tips

Yes I'm using Homestead!
after doing: php artisan ray:publish-config --homestead
now is working!!
Sorry I missed that line in the documentation.
Thank you! <3

Yes I'm using Homestead!
after doing: php artisan ray:publish-config --homestead
now is working!!
Sorry I missed that line in the documentation.
Thank you! <3


Test.py IndexError

I am using Ubuntu 18.04,Pytorch 0.4.1, Py27, no cuda
In test.py, i have deleted all line which format is ".cuda()" since my local computer is not suit the GPU way. Moreover , i haved modified the batch_size in agr.py  = 1 instead of 160.
Then, i meet the problem in :
File "test.py", line 107, in test
output = model(input_var[0],input_var[1], input_var[2], input_var[3], input_var[4])
IndexError: list index out of range
This the whole process with the command : python test.py --model_path=snapshots/model_e500_v-8.950.pth.tar
=> loading checkpoint 'snapshots/model_e500_v-8.950.pth.tar'
=> loaded checkpoint 'snapshots/model_e500_v-8.950.pth.tar' (epoch 500)
/home/minh/anaconda2/envs/im2recipe/lib/python2.7/site-packages/torchvision/transforms/transforms.py:188: UserWarning: The use of the transforms.Scale transform is deprecated, please use transforms.Resize instead.
"please use transforms.Resize instead.")
Test loader prepared.
Exception OSError: OSError(104, 'Connection reset by peer') in <bound method _DataLoaderIter.del of <torch.utils.data.dataloader._DataLoaderIter object at 0x7f1a29958810>> ignored
Traceback (most recent call last):
File "test.py", line 179, in
main()
File "test.py", line 81, in main
test(test_loader, model, criterion)
File "test.py", line 107, in test
output = model(input_var[0],input_var[1], input_var[2], input_var[3], input_var[4])
IndexError: list index out of range
Please give me some advices , Thanks anyway !

Hi! Thanks for the issue report. Do you know which of the inputs to model(...) are out of range? You can find this out by adding
from IPython import embed
embed()

before line 107 in test.py. That'll spawn an interpreter in which you can probe each of the inputs.

Hi! Thanks for the issue report. Do you know which of the inputs to model(...) are out of range? You can find this out by adding
from IPython import embed
embed()

before line 107 in test.py. That'll spawn an interpreter in which you can probe each of the inputs.

Thanks you. I realize that the target_val type is long while input_val type is float which is the main problem

Cool. Glad you were able to solve your problem. I'm tentatively closing this issue but you should feel free to reopen it if you run into any trouble.

I has taken a course project on my university (University of Science_HCMUS)
which we should follow and analyze a science paper in our favor topic. And
i choose your paper as the best one since i am a food lover .
I am running the your pretrained model (model_e500_v-8.950.pth.tar) well
now.However , i would like to see the visualization off this trained model
and view the dataset recipe.Cause i try alot to open the .mdb file on
ubuntu but no one is effective enough.
Could you send me some python code for this issue.
Moreover, i wonder if i want to have a new predict one,what size of image i
should prepared. Please give me some advices ?
Btw,I had read the issue #13 (
https://github.com/torralba-lab/im2recipe-Pytorch/issues/13?fbclid=IwAR0Y7eGzSQ4rPgLp6YN0uIaWc4WkofdRGFJvEwIYo1YSuR9DHhzQHLZSLx4)
but i can not get it well :(
Merry Christmas


Require_tree and Caching

If cacheDirectory is being used, changes to files with require_tree in them will not be picked up

It might make sense to mark files that have require_tree in them as not cacheable, perhaps for both the loader's persistent cache and for webpack's cache. It might be just as performant to recompile as it would be to try and cache a directory listing.

Could easily integration test both cases (persistent cache on, only webpack cache on) by using watch mode, adding files, and confirming they make it in

@cj - Fixed this (just merged into master) using the approach we talked about.


Add documentation page contents.

Closes #83, closes #105 closes #107, closes #113, closes #116.

Adds content for all of the documentation pages, including text, code examples, as well as carousel examples.
Fixes the transition of chevron styles when hovering over a button.

Checklist for this PR:

[x] #83
[x] #107
[x] #120
[x] #121

Completes all of the issues associated with the documentation site's documentation pages.


Bug: wrong processing of string that contains separator symbol

Based on this comment: http://stackoverflow.com/questions/22802491/create-csv-file-in-c-in-qt/30391988?noredirect=1#comment57510719_30391988
When data string contains separator symbol, writer (and reader) will split it in two different strings.
Example:
Separator: ","
Input: "one", "two", "str with, comma"
What we want to see in file: one,two,"str with, comma"
What we get: one,two,str with, comma
Solution: check if data string contains separator symbol. If yes, then we need to add double quotes at the begining and at the end of the date string.

Read the standard RFC 4180: http://tools.ietf.org/pdf/rfc4180.pdf

This also may help: http://csvlint.io/about

Fix bug for Reader: 2d4bddc498aa42664451c4a633299b5493ae8e66

Fix bug for Writer: 0cff93d207e4c728ae13ca293bc1794a1973ffef


Publish hexdocs on GitHub pages.

Publish Hexdocs via GitHub Pages. Might be automated with a CI/CD solution.

Docs are published at https://almightycouch.com/gitgud


Did some stuff

Updated README to say 0 0
Made the plugin support worlds not named world
Made the server support automatically fetching screen size
Made the server log IP, port, screen size, and fps on start
Formatting
I think thats it
There is a lot of junk that shows up in the changed. To see most of the stuff I changed without the formatting go to 908938eb4249fb4cbcc925a64229af58934cf745

Tabs, and some indentation choices, also many removing commits that could have been avoided by doing proper gitignore before first commit.


Add Kenyan calendar

[x] Tests with a significant number of years to be tested for your calendar.

[x] Docstrings for the Calendar class and specific methods.

[x] Use the workalendar.registry_tools.iso_register decorator to register your new calendar using ISO codes (optional).

[x] Calendar country / label added to the README.rst file.

[x] Changelog amended with a mention like: "Added <country> by @pseudo (#)".

Commit for the tag:

[ ] Edit version in setup.py
[ ] Add version in Changelog.md ; trim things
[ ] Push & wait for the tests to be green
[ ] tag me.
[ ] build sdist + wheel packages (make package)

Back to dev commit:

[ ] Edit version in setup.py
[ ] Add the "master / nothing to see here" in Changelog.md
[ ] Push & wait for the tests to be green

[ ] Merge --ff

Github stuff

[ ] Push tag in Github
[ ] Edit release on Github using the changelog.
[ ] Delete branch

[ ] upload release on PyPI using twine

[ ] (optional) Make feeback on the various PR or issues.

Fixed the linting.

Amended

The latest workalendar release (8.4.0) now integrates your Kenyan calendar. Happy upgrading! https://pypi.org/project/workalendar/8.4.0/


Multiple config files

Hi, looking for the possibility of handling multiple config files from the same server.  Would this be best handled through multiple RPC hosts?

It should be multiple aria2c instances and multiple AriaNg RPC config. Each pair connected individually, just as different servers.


WIP: Split ready fibers queue into two

@martty found a deadlock scenario that prevents forward progress of tasks:

Thread A manually decrements an AtomicCounter, which
"finishes" a waiting fiber.
The waiting fiber is added to thread A's readyFiber queue
However, thread A never calls Wait(). It only spawns tasks.
This leads to the ready fibers never being resumed.

To solve this, we need to allow readyFibers to be stolen. That is what the commit does.
All non-pinned ready fibers go to a set of MPMC queues. So Push, Pop, and Steal.
Pinned ready fibers to to a std::vector with with a mutex protecting it. This is ok, since it should have very low contention.
Thus each loop of a fiber, we do the following:

Lock, and check pinnedReadyFibers queue, unlock
If nothing, attempt to Pop from our own ReadyFibers queue
If nothing, attempt to Steal from other threads' ReadyFibers queue
If nothing, attempt to Pop a new Task from our TaskQueue
If nothing, attempt to Steal from other threads' TaskQueue

Create a high priority and low priority Task queue
The high priority queue also contains ready waiting fibers.
When looking for a task, we check in this order:

Check pinned waiting fiber queue
Then check high priority queue
a. Pop from our thread's queue
b. If a ready fiber task, check if the fiber is ready, if not, goto a
c. If no task found, steal from other threads' queues
d. Same check as b.
Finally check the low priority queue

I don't super love ftl-benchmark, but here's two runs at master:
PS T:\Programming_Projects\ftl\FiberTaskingLib\build\x64-Release\benchmarks> .\ftl-benchmark.exe
clock resolution: mean is 33.1671 ns (20480002 iterations)

benchmarking Empty
collecting 100 samples, 1 iterations each, in estimated 1601.37 ms
mean: 13.2377 ms, lb 12.2652 ms, ub 14.5401 ms, ci 0.95
std dev: 5.70206 ms, lb 4.5287 ms, ub 7.13368 ms, ci 0.95
found 12 outliers among 100 samples (12%)
variance is severely inflated by outliers

benchmarking ProducerConsumer
collecting 100 samples, 1 iterations each, in estimated 3.15773 s
mean: 25.3774 ms, lb 22.793 ms, ub 27.8074 ms, ci 0.95
std dev: 12.7586 ms, lb 10.8677 ms, ub 15.0716 ms, ci 0.95
found 32 outliers among 100 samples (32%)
variance is severely inflated by outliers
PS T:\Programming_Projects\ftl\FiberTaskingLib\build\x64-Release\benchmarks> .\ftl-benchmark.exe
clock resolution: mean is 33.1975 ns (20480002 iterations)

benchmarking Empty
collecting 100 samples, 1 iterations each, in estimated 1069.67 ms
mean: 12.3479 ms, lb 11.4641 ms, ub 13.6902 ms, ci 0.95
std dev: 5.4797 ms, lb 3.9467 ms, ub 7.22796 ms, ci 0.95
found 23 outliers among 100 samples (23%)
variance is severely inflated by outliers

benchmarking ProducerConsumer
collecting 100 samples, 1 iterations each, in estimated 12.7753 s
mean: 25.6367 ms, lb 22.9915 ms, ub 28.2638 ms, ci 0.95
std dev: 13.434 ms, lb 11.3587 ms, ub 15.9911 ms, ci 0.95
found 31 outliers among 100 samples (31%)
variance is severely inflated by outliers

And two runs at this branch
PS T:\Programming_Projects\ftl\FiberTaskingLib\build\x64-Release\benchmarks> .\ftl-benchmark.exe
clock resolution: mean is 33.4071 ns (20480002 iterations)

benchmarking Empty
collecting 100 samples, 1 iterations each, in estimated 760.368 ms
mean: 8.78763 ms, lb 8.02644 ms, ub 10.1283 ms, ci 0.95
std dev: 5.01098 ms, lb 3.2961 ms, ub 7.46224 ms, ci 0.95
found 19 outliers among 100 samples (19%)
variance is severely inflated by outliers

benchmarking ProducerConsumer
collecting 100 samples, 8 iterations each, in estimated 3.608 ms
mean: 257.059 us, lb 120.063 us, ub 486.435 us, ci 0.95
std dev: 886.812 us, lb 586.181 us, ub 1214.44 us, ci 0.95
found 10 outliers among 100 samples (10%)
variance is severely inflated by outliers
PS T:\Programming_Projects\ftl\FiberTaskingLib\build\x64-Release\benchmarks> .\ftl-benchmark.exe
clock resolution: mean is 33.1262 ns (20480002 iterations)

benchmarking Empty
collecting 100 samples, 1 iterations each, in estimated 726.762 ms
mean: 8.96797 ms, lb 8.25523 ms, ub 10.0026 ms, ci 0.95
std dev: 4.31554 ms, lb 3.25909 ms, ub 5.68321 ms, ci 0.95
found 23 outliers among 100 samples (23%)
variance is severely inflated by outliers

benchmarking ProducerConsumer
collecting 100 samples, 8 iterations each, in estimated 3.6152 ms
mean: 286.124 us, lb 143.426 us, ub 520.881 us, ci 0.95
std dev: 913.002 us, lb 615.77 us, ub 1238.15 us, ci 0.95
found 15 outliers among 100 samples (15%)
variance is severely inflated by outliers

Those benchmarks seem to show that not only does this commit fix behavior, but it also improves performance


cabal-dev ghci broken in 0.9

After cabal-dev install-deps in 0.8 cabal-dev ghci worked properly, in 0.9 it is broken. It says:

pwd:proj gracjan$ cabal-dev ghci
cabal-dev: user error (cabal: ghc-pkg: /Users/gracjan/proj/cabal-dev/packages-6.12.3.conf:
openFile: does not exist (No such file or directory)
)

Proper directory listed should be:

/Users/gracjan/Code/proj/cabal-dev/packages-6.12.3.conf

Note 'Code' part.

cabal-dev ghci produces:
cabal-dev: user error (cabal: Run the 'configure' command first)
with cabal-dev-0.9 on archlinux, ghc-7.2.1
hth

PS I have no symlinks in ~/.

Have you moved the project directory and/or cabal-dev sandbox to a new location on the filesystem? (possibly by creating the Code directory?)
Can you reproduce this if you move / delete the sandbox?

Tried moving ~/cabal-dev to ~/Code/cabal-dev => same usr error.

I'm sorry, my question was a bit ambiguous.
I think the problem is that the path without the Code was backed into some artifacts in the sandbox during the build -- we know that this sort of thing does happen with cabal, but I've been unable to reproduce your exact error message.
One way to test this is to remove the sandbox and rebuild everything with cabal-dev:

Delete the sandbox (or, if you want to save the existing sandbox for later analysis/use, copy it somewhere outside of your build tree, or rename it.)
$ cabal-dev install
$ cabal-dev ghci
then see what happens.

If that still causes the error you're seeing, then we'll have a concrete scenario to work from.  It's not clear that your existing sandbox isn't corrupted or fixed to a specific (different) path right now, and that uncertainty makes it hard for us to  debug.  The steps above will separate out some things that could be causing the problem, in a way that will give us a better chance at reproducing the specific issue you're running into.
Thanks!

Moved  ~/Code/cabal-dev.
cd Code
I'm afraid cabal-dev install produces "cabal: ghc=pkg: 3: unrecognised field or section "
It does however create a new sandbox.
cabal-dev ghci produces ""cabal-dev user error (cabal: No cabal file found. Please create a package description file .cabal
hth

To detect any of my cabal-dev pkgs I had to set GHC_PACKAGE_PATH as per ghc docs. However there's a hackage trac ticket #335 suggesting deprecating this envvar in favour of --package-db. I haven;t tried it as I haven't guessed the needed syntax :)
Thanks for the help...

Note: I tried to reproduce my error in some sensible way and failed to extract a test case out of it. Will try harder later!

Ok - keep us posted!

gracjan - have you been able to reproduce this? (If not, I'd like to close this bug report)

Close it as I have no idea what is going on. I hope it will just go away.

I'd like to figure out what's going on, if you're still having issues.
If you are still having problems, could you send:

the output of running the problematic cabal-dev commands with --verbose=3
if using ghc6, the package-.conf from the cabal-dev sandbox?

Only just got notified of you Oct 19th post. Unfortunately I ditched ghc-7.2.1 after multiple failures so can't even try to reproduce the problem. Perhaps it was limited to ghc-7.2.1? Can close for me.

Just updated to 0.9.1. I'm having an issue similar to the one the OP described.
$ cabal-dev ghci
cabal-dev: user error (cabal: Cannot find the program 'ghc' at 'fake-ghc-cabal-dev' or on the path
)

Here's a more detailed dump from a freshly built environment:
$ cabal-dev -v3 ghci
cabal-dev 0.9.1
built with Cabal <IP_ADDRESS>
searching for cabal in path.
found cabal at /usr/local/bin/cabal
("/usr/local/bin/cabal",["--numeric-version"])
/usr/local/bin/cabal is version 0.10.2
Using cabal-install 0.10.2 at FoundOnSystem {locationPath =
"/usr/local/bin/cabal"}
No sandbox specified. Using cabal-dev
Using cabal-dev as the relative cabal-dev sandbox
Using /home/christian/src/temp/cabal-dev as the cabal-dev sandbox
Creating local repo /home/christian/src/temp/cabal-dev/packages
searching for ghc-pkg in path.
found ghc-pkg at /usr/local/bin/ghc-pkg
("/usr/local/bin/ghc-pkg",["--version"])
/usr/local/bin/ghc-pkg is version 7.0.3
Using ghc-pkg 7.0.3
("/usr/local/bin/cabal",["--version"])
Complete arguments to cabal-install:
["--config-file=/home/christian/src/temp/cabal-dev/cabal.config","build","--verbose=3"]
("/usr/local/bin/cabal",["--config-file=/home/christian/src/temp/cabal-dev/cabal.config","build","--verbose=3","--with-ghc=fake-ghc-cabal-dev"])
/usr/local/bin/cabal returned ExitFailure 1 with error message:
cabal: No cabal file found.
Please create a package description file <pkgname>.cabal
cabal-dev: user error (cabal: No cabal file found.
Please create a package description file <pkgname>.cabal
)

@dowski Could you post how you got to a freshly build environment? I think the problem is related to how the sandbox is built (I got your follow-up with the $ cabal-dev -v3 ghci, but I'm not sure why it's not showing up on github).


Host parsed incorrectly for ipv6:port for AWSELB

When parsing ELB/ALB access logs where the client ip address is formatted as IP_ADDRESS:PORT the parsing fails and marks ipv6 requests as invalid because it splits the ipv6 on the first :
Is there a way to have the %h parse the full token before splitting on the :?

Could you please share a few lines from your access log?

 I believe this is why Caddy altered its format to have a separate field. If feasible, I recommend making it a distinct field. If that's not possible, you'll need to preprocess the log and then pass it to GoAccess. Tools like awk or sed should be able to handle this task.
sed -E 's/([0-9a-fA-F:.]+):([0-9]+)/\1 \2/g' access.log | goaccess - --log-format='.......'

No worries, just wondered if there was a possibility to do it without preprocessing! Then we'll go with preprocessing the files to split these.
Thanks for looking into this 😄!


Fanspeed shows only on and off

Hello,
Question, the fan speed entity is showing only in historical data on and off. Not the percentage. Hopefully someone can fix this? Thanks a lot!

Is the problem still present?

It still only show "On" or "Off"
Not percentage of speed.

I am trying to build a small automation that puts the Electrolux Well A7 Air Purifier into maximum power (and all the lights on) when the central vacuum cleaner is in operation. When the vacuuming is done I'd like the automation to put the Air Purifier into automatic, i.e. Smart Mode.
Both the manual Fan speed 1-5 setting and selection of Smart / Manual mode are available in the Air Purifier's own Android app, but not in the HACS integration. The only Action I can see is "Turn on Fan Speed" and even that doesn't seem to increase the fan speed.
Any chance to see this functionality in the next version?

Did you guys try to click on the text "fan speed"? That should open a new window where you can change from auto to manual and set the fan speed in %.

Did you guys try to click on the text "fan speed"? That should open a new window where you can change from auto to manual and set the fan speed in %.

Hi, I see indeed. That is looking new, many thanks! I'll close the issue now, this is a solution 👍👍


import *

Thank you for doing this!
I would like to allow my users to search for an icon in the UI. This means that I would like to import the metadata that you provide, as well as every single icon, so they are readily available. Is this possible today in a way that I am just missing?

Hi,
Are you talking about use the tags in for the search?
https://github.com/stnrd/healthicons/blob/main/icons/meta-data.json
I'm trying to do the same thing, but I didn't find any file in the repo where the relationship between icon name and component name is stored. Yesterday, I made a script trying to match component and icon name and store them in my app, but I found some components are missing (see #15)
If that information could be generated during the build of these packages, it would be amazing.

Yes, that is what I meant :-)

Hi all,
I can generate such a file during the build process that links an icon name with a React component, if that is what is desired. I do have some questions: How should I expose such file? Should I include it in the packages or is on root level fine?
About  the missing icons I have fixed them in this PR #16.

Awesome, thanks! I can only speak for myself here, but either would work for me. I guess if it's a part of the package, that would make things slightly more streamlined.

Sorry it took a while but I have done a big refactoring related on how I build the icons and how you can import them. At the moment I don't like the way import work and VSCode isn't picking up the icons automatically without importing at least one icon.
I have created an MR that changes the way to import from import healthicons-react/dist/filled to just  import healthicons-react. The default variant on the root level is filled, but this can be easily changed by doing healthicons-react/outline. I am going to release this a 2.0.0 version as it breaks the current way of importing.
To make the link between an React component and a Healthicons ID, I have included an updated-meta-data.json file in all the React packages. Example of an entry in the metadata file
{
    "id": "war",
    "category": "vehicles",
    "path": "vehicles/war",
    "tags": [
      "Armored Vehicle",
      "Cannon",
      "Gun",
      "Military",
      "Tank",
      "dhis2:war"
    ],
    "title": "Tank",
    "component_name": "War" <------ React component name
  },

This file can be easily imported directly out the import metadata from '../node_modules/healthicons-react/updated-meta-data.json'; package, see the attached examples/next where I am doing that and created a simple icon search.

That's awesome, thank you!


Doc needs guidance for RBAC enabled clusters.

Doc needs guidance for RBAC enabled clusters.
https://github.com/virtual-kubelet/virtual-kubelet/issues/107
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: acfb234b-c0db-3e6a-7938-cab614d530c0
Version Independent ID: 2adff671-6ccb-d84a-f689-8b0d72b1577c
Content: Run virtual kubelet in an Azure Kubernetes Service (AKS) cluster
Content Source: articles/aks/virtual-kubelet.md
Service: container-service
GitHub Login: @iainfoulds
Microsoft Alias: iainfou

@amazaheri
Thanks for the feedback! We are currently investigating and will update you shortly.

I validated that all steps work after adding the roleassignment :)

@amazaheri thanks for the update! I have assigned the issue to the content author to review and see where we can update the doc.
@iainfoulds can you take a look?

Sorry you ran into issues, @amazaheri. I'll work on updating the steps in the doc to note the role assignment required for RBAC-enabled clusters.
#in-progress


Code and related files for the dependency injection demos.

Hi Eugen,
This is just to let you know that my work is ready for review.
Kind regards,
rey malahay

Hey @reymalahay - jumping in here with a quick note (unrelated to the review) - I noticed the PR includes a lot of metadata files - let's get rid of these entirely. The goal is to keep things very clean and minimal in terms of changes - both to make the review easy as well as well as the work focused on what's actually going on in the article.
Cheers,
Eugen.

Hi @eugenp
I removed the metadata files and pushed to the server.
Kind regards,
rey malahay

@reymalahay Sounds good, but looking at the PR I still see 103 files changed - so it looks like either the PR isn't updated, or we still have a few files that we should remove from it.
Cheers,
Eugen.

@eugenp i've removed the .metadata files from my commit.

@reymalahay Down to 42 files? Are we really changing 42 actual files for the article?

@eugenp i excluded a lot of files that belong to the .metadata directory. those were generated by eclipse and not related to my contribution.

@reymalahay - yes, that's what I'm thinking as well, that most of these files are actually not related to the actual logic you're working on. So - everything that's unrelated needs to be excluded.
Basically - the PR should literally only have the changes that are actually part of the logic you're implementing.
Hope that makes sense.
Cheers,
Eugen.

@eugenp it makes sense. those metadata files were included when i checked out the code. i got the impression that i should leave as is. anyway, lesson learned.

@reymalahay So, the metadata files are generated by your IDE locally - that's why you see them as part of the PR.
The way to figure that out is - when you open the PR - have a look at the files that are in it. Usually you should only see 2-3 files in there.
OK, so, when you remove these, let me now and I'll have a look.
Cheers.

@eugenp I removed the metadata files from my commit and pushed to the remote repository.

Hey Rey - just to make sure I'm not seeing something different - how many files are you seeing as part of this PR?

@eugenp there are 42 files. aside from the .gitignore file, all the files are new.

@reymalahay OK, so we're seeing the same thing then.
My question is - why does the PR have 42 files?
I was thinking it should have 2-3 files, definitely not as many as 42.
As far as I see you're still including a lot of extra, metadata, generated files.

@eugenp i did a directory listing of my commit:
├── build.gradle
├── docs
│   ├── autowired-name-demo-classdiagram.dia
│   ├── autowired-name-demo-classdiagram.dia~
│   ├── autowired-name-demo-classdiagram.png
│   ├── autowired-type-demo-classdiagram.dia
│   ├── autowired-type-demo-classdiagram.dia~
│   ├── autowired-type-demo-classdiagram.png
│   ├── inject-demo-classdiagram.dia
│   ├── inject-demo-classdiagram.dia~
│   ├── inject-demo-classdiagram.png
│   ├── inject-name-demo-classdiagram.dia
│   ├── inject-name-demo-classdiagram.dia~
│   ├── inject-name-demo-classdiagram.png
│   ├── inject-qualifier-demo-classdiagram.dia
│   ├── inject-qualifier-demo-classdiagram.dia~
│   ├── inject-qualifier-demo-classdiagram.png
│   ├── resource-demo-classdiagram.dia
│   ├── resource-demo-classdiagram.dia~
│   ├── resource-demo-classdiagram.png
│   ├── resource-demo-usecase.dia
│   ├── resource-demo-usecase.dia~
│   ├── resource-method-byname-demo-classdiagram.dia
│   ├── resource-method-byname-demo-classdiagram.dia~
│   └── resource-method-byname-demo-classdiagram.png
└── src
└── test
├── java
│   └── com
│       └── baeldung
│           ├── autowired
│           │   ├── FieldAutowiredDemo.java
│           │   ├── FieldAutowiredNameDemo.java
│           │   └── FieldQualifierAutowiredDemo.java
│           ├── dependency
│           │   ├── AnotherArbitraryDependency.java
│           │   ├── ArbitraryDependency.java
│           │   └── YetAnotherArbitraryDependency.java
│           ├── inject
│           │   ├── FieldByNameInjectDemo.java
│           │   ├── FieldInjectDemo.java
│           │   └── FieldQualifierInjectDemo.java
│           └── resource
│               ├── FieldResourceInjectionDemo.java
│               ├── MethodByQualifierResourceDemo.java
│               ├── MethodByTypeResourceDemo.java
│               ├── MethodResourceInjectionDemo.java
│               ├── NamedResourceTest.java
│               ├── QualifierResourceInjectionDemo.java
│               └── SetterResourceInjectionDemo.java
└── resources
├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>└──<EMAIL_ADDRESS>basically, it includes the image files, integration test class files, xml files. All of these files are the code demos that are used in the article.

@reymalahay Sounds good.
So - here's a few of the files you can probably remove.
All the files ending with ~
build.gradle (all of the projects in the repo are using Maven, so unless Gradle is the topic of the article - it's better to use Maven)
I'm not sure we need the .dia files - the pngs should be enough
Also note that most articles on the site don't make a lot of use of images, so if you can, show the concepts via code only.
Cheers,
Eugen.

@eugenp, the dia files are the source files used to generate the png's. dia is an open source diagram tool, an alternative to visio, http://dia-installer.de/doc/en/index.html. i'll make the necessary modifications to change the build tool to maven (i moved to gradle many years ago)

Sounds good.

@eugenp I added the pom.xml file so that the demo code is accessible to Maven user. i left the build.gradle file.

@eugenp I added the pom.xml file so that the demo code is accessible to Maven users. i left the build.gradle file.

@reymalahay Sounds good

@eugenp i pushed revisions to the code as per discussion with Alex Theedom


Reverting gulp 4.0.2 upgrade

Gulp upgrade is breaking Lemur UI and thus reverting changes done so far (#3300 #3299 https://github.com/Netflix/lemur/pull/3297/commits/22d9ef77988f45db24a1059274ec28306723b8b5)

Coverage remained the same at 60.791% when pulling 892a668bf59ca68e07b6ae3650c896369ec10f89 on charhate:gulp4-revert into 2ffa691fe48bb44574231105895777b73159424d on Netflix:master.


[rdx compile] fails for default app w/o npm install

A user expects rdx compile to work after creating the default app with rdx app -d y.
rdx compile fails with a freshly-built default app because npm install hasn't been run.
consider automatically executing npm install as part of rdx app -d y, or adding info to the readme.

Yeah the plan was to log a message about running npm i and I forgot :P


Credentials returned in response

TL;DR
The configured GitLab repository uri containing the deploy token (credentials) is returned in any response.
Environment
Component       Version
Spring Boot     2.4.0
Spring Cloud    2020.0.0-M5
GitLab CE       13.5.3
Java VM         openjdk 11

Long Version
GitLab allows to read (pull) repositories with deploy or access tokens. I could not find any documents on explaining how to configure this in a spring cloud config server. According to the official documentation on spring.io, the server uses JGit to communicate with remote git repositories.
So I have looked up JGit documentation and found an explanation on how to use deploy tokens with GitLab. You specify a GitLab repository uri with basic http authentication and additionally specify a username and password separately.
Link: https://www.codeaffine.com/2014/12/09/jgit-authentication/ (Authentication @ GitLab)
I adopted this for the spring cloud config server and it works, but the credentials configured in the GitLab repository uri are exposed as well when content is served. When I remove either the credentials in the uri or the username/password properties the server fails to connect to the repository.
application.properties:
<EMAIL_ADDRESS>spring.cloud.config.server.git.username=<deploy-token-name>
spring.cloud.config.server.git.password=<token>
spring.cloud.config.server.git.clone-on-start=true
server.port=8888

Reading properties for a service returns a response like this:
GET https://cloud-config.home.local:8888/some-service/development
Response:
{
  "name": "some-service",
  "profiles": [
    "development"
  ],
  "label": null,
  "version": "b87f905c28cc911b056c5ecf6aef6724bfbbbe58",
  "state": null,
  "propertySources": [
    {
      "name"<EMAIL_ADDRESS>      "source": {
        "my.property": "Hello from development",
      }
    },
    {
      "name"<EMAIL_ADDRESS>      "source": {
        "my.property": "Hello from default"
      }
    }
  ]
}

Best regards,
David

This is a duplicate


Add a description #hackish

This fixes a problem where the markdown markup is displayed in the Read More section under another post (example). The problem should be fixed in /_includes/read-more.html in the long term.

Thank you once more!
I will force myself to use the description in my future posts and I will probably manually edit a list of current posts to include the description as a meta tag.

You are welcome.
I don't think it is necessary for all posts though: If you look at the latest post, the Read More section links to the Alan Turing posts, which does have markdown in it ("87th Academy Awards" is a link) but it is stripped correctly. Maybe Jekyll has a problem with stripping away ´´``?


MYRIAD-239 Fixed issue with * by updating conf files, added doc

comments, and added JUnit test case.

looks like we have a failed check based off style.  Also, not sure if I believe this fixes the issue.  Have you tested?

Hey Darin,
Just finished testing MYRIAD-229, moving on to this one and I'll let you
know how AWS testing goes.
--John
On Fri, Aug 19, 2016 at 1:16 PM, Darin<EMAIL_ADDRESS>wrote:

looks like we have a failed check based off style. Also, not sure if I
believe this fixes the issue. Have you tested?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/apache/incubator-myriad/pull/89#issuecomment-241078239,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKSRgboOsnw4i52XIR2lGgTglJGLAXFvks5qheT6gaJpZM4Jm2Ai
.

Tested yet?

Yep, tested it on our AWS cluster.
--John
On Wed, Aug 24, 2016 at 12:31 PM, Darin<EMAIL_ADDRESS>wrote:

Tested yet?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/apache/incubator-myriad/pull/89#issuecomment-242128186,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKSRgaMJ0fO_UzOOl-xRY1T4yUmjllp9ks5qjHHtgaJpZM4Jm2Ai
.

LGTM


iOS 7 support

Hi,
Thank you very much for this framework, i love it.
I just have a request. Can you add an iOS 7 support, please?
iOS 8 adoption is too slow (only 69%) https://developer.apple.com/support/appstore/
Regards,
Dohko

AFAIK, the library itself supoorts iOS 7 (not using iOS 8 API). But Dynamic Framework (and also CocoaPods support) is only supported at iOS 8 and later.
So if you'd like to use this library in iOS 7, you can use by using git submodule and add source files directory to your app project.

See also #23.

@ikesyo is correct. ObjectMapper does work on iOS 7 but unfortunately iOS 7 does not support including dynamic frameworks in a project (It will run with a warning but Apple will reject it if you submit that way). @ikesyo suggestion of using git submodule and adding the files to you app directly is probably your best bet.

Added source files directly to project and now it's running on iOs7. Hope there will be a way in the future to resolve this


Show datatype_tags under datatype page

We should list all datatype_tags used by various application under the new datatype page. We should also list applications for each datatype_tags that uses it.
We should also allow super-admin to edit datatype name / desc, and maybe add descriptions for each datatype tags to show how it's used.

+1

This has been implemented


Pylint

Enable pylint checks via travis build.
Do not merge until Travis build is successful. Establishing which messages to address vs. enable/disable will be discussed within this PR.

Pylint is run after successful unit/integration tests
Pylint configuration is contained in .pylintrc
Configuration reference = https://docs.pylint.org/features.html
Example of overriding check in source = https://docs.pylint.org/message-control.html

@gsfr Here's the breakout of failed checks. Looking for input on which checks can be disabled vs. resolved.
Message errors by type

Check
Hits

C0103:invalid-name
190

C0111:missing-docstring
185

C0113:unneeded-not
1

C0121:singleton-comparison
2

C0123:unidiomatic-typecheck
1

C0301:line-too-long
55

C0321:multiple-statements
2

C0325:superfluous-parens
1

C0326:bad-whitespace
184

C0330:bad-continuation
37

C0410:multiple-imports
1

C0411:wrong-import-order
52

E0203:access-member-before-definition
2

E0401:import-error
7

E0602:undefined-variable
21

E1101:no-member
23

E1120:no-value-for-parameter
4

E1121:too-many-function-args
1

R0201:no-self-use
10

R0204:redefined-variable-type
1

R0801:duplicate-code
4

R0902:too-many-instance-attributes
5

R0903:too-few-public-methods
4

R0911:too-many-return-statements
2

R0912:too-many-branches
5

R0913:too-many-arguments
7

R0914:too-many-locals
6

R0915:too-many-statements
2

W0102:dangerous-default-value
1

W0105:pointless-string-statement
2

W0106:expression-not-assigned
1

W0110:deprecated-lambda
2

W0120:useless-else-on-loop
4

W0141:bad-builtin
3

W0201:attribute-defined-outside-init
50

W0212:protected-access
10

W0221:arguments-differ
1

W0231:super-init-not-called
1

W0311:bad-indentation
2

W0403:relative-import
11

W0511:fixme
23

W0603:global-statement
1

W0611:unused-import
22

W0612:unused-variable
32

W0613:unused-argument
25

W0621:redefined-outer-name
6

W0622:redefined-builtin
8

W0631:undefined-loop-variable
2

W0640:cell-var-from-loop
1

W0702:bare-except
5

W0703:broad-except
1

W1201:logging-not-lazy
11

W1202:logging-format-interpolation
25

W1401:anomalous-backslash-in-string
1

W1501:bad-open-mode
1

I have started a similar effort on scitran/reaper, which is a much smaller codebase. Let me work on that for a couple of days and then report back here what I have learned.

pylintrc file updated

I also added pep8 to scitran/reaper. https://github.com/scitran/reaper/commit/7e2415c571d60a0b3c289dc62f2434dab20c1110

I pushed changes to address most of the error types.
@rentzso -- Can you review my changes, and comment on the correct resolution for the remaining 7? You can check results locally via pip install -r requirements_dev.txt ; pylint --disable=W,C,R api from the root of this repo either on your host, or within the running docker container.
api/files.py:125: [E0203(access-member-before-definition), getHashingFieldStorage.HashingFieldStorage._FieldStorage__write] Access to member '_FieldStorage__file' before its definition line 131
api/files.py:130: [E0203(access-member-before-definition), getHashingFieldStorage.HashingFieldStorage._FieldStorage__write] Access to member '_FieldStorage__file' before its definition line 131

api/handlers/searchhandler.py:96: [E1123(unexpected-keyword-arg), SearchHandler.get] Unexpected keyword argument '_source' in method call
api/handlers/searchhandler.py:96: [E1123(unexpected-keyword-arg), SearchHandler.get] Unexpected keyword argument 'size' in method call
api/handlers/searchhandler.py:109: [E1123(unexpected-keyword-arg), SearchHandler.get_datatree] Unexpected keyword argument 'size' in method call

api/handlers/containerhandler.py:257: [E0602(undefined-variable), ContainerHandler.get_all] Undefined variable '_id'
api/handlers/containerhandler.py:367: [E0602(undefined-variable), ContainerHandler.post] Undefined variable '_id'

@ryansanford Please rebase on master and then assign to @nagem for review.

@gsfr sounds good

@nagem
Can you review my changes, and the remaining 7 errors mentioned above?

Changes LGTM, fixed the few remaining errors. Looks like merging the advanced-search branch fixed a few as well.
Thanks, @ryansanford!

Rebased, found one new error:
api/search/queryprocessor.py:162: [E0602(undefined-variable), PreparedSearch._get_targets] Undefined variable 'min_length'

Remaining errors when using elasticsearch-py:
api/handlers/searchhandler.py:105: [E1123(unexpected-keyword-arg), SearchHandler.get_datatree] Unexpected keyword argument 'size' in method call
api/search/queryprocessor.py:54: [E1123(unexpected-keyword-arg), SearchContainer._exec_query] Unexpected keyword argument 'size' in method call
api/search/queryprocessor.py:128: [E1123(unexpected-keyword-arg), TargetProperty._exec_query] Unexpected keyword argument 'size' in method call

Looks like pylint doesn't have a good way to handle args that are injected via a decorator: https://github.com/elastic/elasticsearch-py/blob/master/elasticsearch/client/init.py#L456
They have a ticket open that has some recent activity:
https://github.com/PyCQA/pylint/issues/258
Until then we'll use single-line disables. We can reevaluate this plan if we add too many uses of the elasticsearch library before a fix is available.

Rebased to check analyses branch that was recently merged into master - this LGTM for merge as soon as CI is green!

Thanks for wrapping this up @nagem . Merging now...


Revise the logic for model specific grid information

Following on #105, I think it is worth discussing in more detail if we can improve the way this package is able to deal with grid setup information that can differ for each model (and is necessary for the xgcm grid setup in the grids module).
What is currently done
create_full_grid requires a dictionary that encodes the information parsed as coords to xgcm.Grid. The default value None will actually load this file here and look up if the current model (source_id) is given by that file. If not it will error out, which can lead to problems for users (see #105).
Problems
This approach relies on manual input of the grid configuration. It would be nice if this information was encoded in the metadata conventions somehow, but I am quite convinced that the metadata in any of the CMIP6 output is not sufficient to infer this. Additionally, some of the outputs have been shipped with incorrect lon/lat values (example), which makes inferring the grid positions (as I have done until now with this notebook) problematic.
Possible Solutions
a) A short term fix could be to insert reasonable defaults here if the yaml file does not have an entry.
Question: What do folks here think about that? Can we default to e.g. an A-grid, and raise a warning? That would trade off usability against accuracy. Personally I think this is acceptable (if appropriate warnings are included).
b) A longer term fix would be to study all of the models and actually confirm the grid setup! Long term it seems that this should be part of a broader outreach effort to modelling centers in order to get more detailed grid metrics.
I think that we can work on both in parallel! a) Should be a fairly easy start, but b) is a substantial long term effort (still worth it in my opinion).

Thinking further about this, I would also like to discuss the possibility of encoding the actual position of each variable somehow.
In particular this

some of the outputs have been shipped with incorrect lon/lat values

makes me believe that my attempt to detect grid positions of each variable (see here) might lead to undetected errors. It is also quite slow!
Since this is likely a longer-term effort, we should also think about inserting this information in the preprocessing stage  via additional metadata (SGRID comes to mind, see https://github.com/xgcm/xgcm/issues/109 and https://github.com/xarray-contrib/cf-xarray/issues/220) cc @dcherian.
I wonder if this sort of additional metadata would be considered a 'fix' in the daops database (ideally via the daops database https://github.com/roocs/daops/issues/55#issuecomment-782037323) cc @agstephens
That might slim down the grid specific logic here a lot and relegate to either cf-xarray or xgcm, which I would welcome.
Very eager for your thoughts.


How to handle active clients during re-deploys?

Hi, thanks for sharing this repo! Looks like lots of good work.
I've been doing some thinking about persisted queries as well (but not much doing). I'm curious how you'd handle this situation:

Many clients are out "in the wild" with persisted query IDs
You refactor the application, changing the data requirements and the graphql queries
You redeploy the application which now has new queries and new query IDs

For example, let's say you start with a .graphql file like
query getThing($id: ID!) {
  get(id: $id) {
    name
  }
}

And you run persistgraphql which generates a query map:
{"query getThing($id: ID!) {\n  get(id: $id) {\n    name\n  }\n}\n":1}

Then, later, you refactor the query:
  query getThing($id: ID!) {
    get(id: $id) {
-     name
+     title
    }
  }

And again, persistgraphql to get a map:
{"query getThing($id: ID!) {\n  get(id: $id) {\n    title\n  }\n}\n":1}

But now, ID 1 points at a new query, which may cause some clients to break! How should we avoid that?
The only thing I can think of is: never change or remove a persisted query until you're sure no outstanding clients depend on it. Instead of changing queries, always add new ones. Do we have any other tools to help in this case?

I think the right approach is to keep around all queries that have ever been persisted, until you are really sure there are no old clients out there. So I would suggest taking the output of this tool and adding some large number to every ID.
Perhaps a PR to switch to UUIDs instead of numbers would be good, then people can just insert the IDs as-is.

I think keeping them in a database would be reasonable. Are you planning on supporting a feature like this in Ruby?

Agree with @stubailo. I think persistgraphql should probably allow you to do a "merge with existing" kind of thing where you can crawl an updated codebase but merge it with an existing persisted queries JSON file.

Is that to avoid saving duplicate queries?
Actually, using a hash instead of an ID would probably solve that since you can just insert into your database of queries if the hash doesn't exist.

In my mind, it would just be a convenience thing that allows you to handle multiple client versions rather than something that's meant to reduce the number of queries represented in the map.

I guess I don't think anyone will actually be storing the queries in a JSON file, so if anything a more useful thing would be a function that saves the queries to some kind of storage.

Yeah, I'm definitely interested in building a persisted query system for Ruby servers. I took a crack at it a while back and it left me with these questions:

How to support outstanding clients? (This also applies to development: if you change the .graphql files, your currently-open browser is now stale, and at least for Rails, the only option is to reload the page. C-c-c-combo breaker!)
Is storage in memory enough? I have two questions there: will some users ever have so many queries that storing them in memory is burdensome? And, for Ruby, will we have threadsafety issues? (That can be worked around, but it's something to keep an eye on.)

So, I didn't come up with any answers ... just questions 😆  thanks for sharing your thoughts!

Oh, I think the server should accept all queries in development mode.
So the answers to your questions IMO are:

You never delete queries, only add them to a database; in development, the server should accept all queries and there's no need for persisting.
I think queries should be stored in a database and cached in memory, I can imagine people easily having many thousands of queries since you need to persist a new one every time you change just one field.

Let me know if I can help with a Ruby server addition!


Issues: Issue Types

Summary
It's no easy feat to search and triage issues across repositories when you have many teams working towards a shared goal. Issue types will allow users to classify and manage different types of issues across repositories.

Intended Outcome
Some folks have tried to use labels in order to do this - however labels are tied to repositories and label syntax can drift across repos. This makes triaging issues across repos difficult.
We believe that by creating a shared language to standardize work items across repositories we'll unlock reporting and automation use-cases.
How will it work?
Users will be able to define issue types (ex. bug, feature request, spike) at the org level and apply this syntax to an issue in a repo.

🚢 This has shipped: https://github.blog/changelog/2024-10-01-evolving-github-issues-public-preview/


Support serial test runner xunit output

Support xunit output for the serial test runner
Motivation:
Previously only the ParallelTestRunner could output xunit reports; however because the parallel test runner spawns multiple XCTest processes it ends up being slow compared to the serial TestRunner (when using --num-workers 1).
See also: https://bugs.swift.org/browse/SR-9133
Modifications:

Added skipped test result case (currently unsupported by parallel test runs)
Added xunit output support to the .runSerial case which does support skipped. Unfortunately because we only get human-readable output from XCTest we are forced into regex parsing which is less ideal.

Result:
Serial test runs (i.e. plain swift test) now output an xunit report when passing in the --xunit-output option.

I'm opening this PR mostly to gauge to room on the regex parsing strategy. I'm not in love with it but I do not know of another way to get this sort of output from XCTest. AFAIK it cannot output a machine-consumable format.

There are some APIs to hook into test reporting, like e.g. https://developer.apple.com/documentation/xctest/xctestcase/3546549-recordissue?language=objc

@neonichu Do you have an example of how to use? The almost looks like it would require some re-architecting of how SPM calls the XCTest framework (i.e. use it as a library instead of starting a subprocess). I'm happy to go down that route as it does sound ideal. I'm just not very familiar with those pieces.

@tomerd @abertelrud I would love your input on this PR when you have a moment.

sorry for the slow response @Austinpayne. iiic @neonichu suggestion it was that we pass a flag to XCTest when invoked from SwiftPM such that XCTest provides structured output and we do not have to parse its stdout stream. @stmontgomery may be able to provide further guidance on what is possible to that end

I think the ideal way to accomplish this would be to utilize XCTest's built-in XCTestObservation API, which is a protocol that allows interested parties to observe testing events and react to them. XCTest itself implements one such observer called PrintObserver which is what generates the stdout logging you're attempting parse here. (Take a look at that file for details.)
But if you're interested in xunit output, I think you'd essentially want to create another type conforming to the XCTestObservation protocol, implement its various methods to be notified when testing events occur, and then output the relevant xunit output. And then, there would be no need for any regular expression parsing in SwiftPM or elsewhere.
There would be one more thing needed to make this solution work: the test runner executable needs to be told, somehow, that it should use the new xunit-style observer instead of its built-in PrintObserver. That could be done via a new command-line argument passed down by SwiftPM to XCTest's main entrypoint function, perhaps.

Okay this is great @stmontgomery and @tomerd! This is a lot to go on. Sounds like I need to learn more about XCTest itself. I'm going to close this PR and take another pass at this using the methods you described, that sounds like a much better solution. Thank you!


Error with array of arrays

Gentleman,
Thank you so much in advance.
I have a hapi endpoint defined as this:
server.route({
    method: "POST",
    path: "/rest/v1/agent/update_profile",
    config: {
        handler: update_profile,
        tags: ["api"],
        description: "update_profile",
        notes: "An API method implementing account profile update",
        auth: "session",
        plugins: {
            "hapi-auth-cookie": {
                redirectTo: false
            }
        },
        validate: {
            payload: {
                first_name: Joi.string(),
                middle_name: Joi.string(),
                last_name: Joi.string(),
                phone_number: Joi.string(),
                profile: Joi.object().keys({

//The following is the array of arrays:

                    available_hours: Joi.array().items(
                        Joi.array().items(
                            Joi.string()
                        ).required()
                    ).required().length(7)

                })
            },
            headers: Joi.object({
                "accept-language": Joi.string().required(),
                "user-agent": Joi.string().required()
            }).options({
                allowUnknown: true
            })
        }
    }
});

The lines  above specify a Joi schema involving an array of arrays.  hapi-swagger fails in the browser to render the swagger-ui page, and the error in the browser is:
Uncaught TypeError: Cannot read property '$ref' of undefinedResolver.resolveTo @ spec-converter.js:244Resolver.resolveTo @ spec-converter.js:293Resolver.resolve @ schema-markup.js:259response @ resolver.js:219responseInterceptor @ resolver.js:710obj.on.response @ resolver.js:714(anonymous function) @ schema-markup.js:186Request.callback @ index.js:24(anonymous function) @ index.js:24Emitter.emit @ index.js:24xhr.onreadystatechange @ index.js:24
Does hapi-swagger support array of arrays by any chance?   I recently upgraded Joi to 9.x.x and if the issue is with Joi, please accept my apology for using your time.

Hi
I have just tried this with my current local copy and its seems to work without error. Can you check that your using the latest version.  v6.2.0
I am just about to release a v7 today so it would be good to this issue sorted before then
Glenn

Hi Glen,
I have found the cause for the issue I opened.   I am immensely indebted to you for all your contributions, and decided to try to help you with this issue, but your understanding of the code surpasses mine.  I am going to submit a pull request, subject of course to your vetting and verification.
I know you are about to release version  7 of this valuable module.  Please feel free to contact me if you have any questions/suggestions.
Basically, the fix I believe, is in the properties.js file - line 406, which should be:
                property.items = arrayProperty;

instead of:
                property.items = arrayProperty.schema;;

Many thanks for all your efforts on this very valuable hapi module.

Working on this at moment could take a couple more days as I am rewriting parts of the plugin to try and get this element to work more elegantly so its maintenance is less painful.

Hi Glenn,
Many thanks for all your efforts, please take your time, and thank you so
much.
Yours truly,
Ali
Yours truly,
Ali Ismael, Ph.D.
Gaaiat, Inc
On Tue, Aug 16, 2016 at 12:51 AM, Glenn Jones<EMAIL_ADDRESS>wrote:

Working on this at moment could take a couple more days as I am rewriting
parts of the plugin to try and get this element to work more elegantly so
its maintenance is less painful.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/glennjones/hapi-swagger/issues/312#issuecomment-240028885,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABCC3_zO8PUrBciNl2HhlhRq73yuwrHgks5qgWwdgaJpZM4Jhyle
.

Hi Sorry it took a little longer than I hoped
I have rewritten the part of the plugin that deals with array and object recursion, which was causing the issues with the parsing of JOI.array() and JOI.object() structures.
Can you download v7.0.0 and tell me if its fixed your issue
Thanks

Hi closing this down, just tested it again with v7.2.0. If you still have a problem let me known and I will reopen it

Hi Glenn,
The fix worked beautifully and sorry for the delayed response.  Thank you so much for everything.
Yours truly,
Ali


Review Goblin Tooltips

Follow-up ticket: https://github.com/AzerothWarsLR/WarcraftLegacies/issues/1061


IngestSegmentFirehose may not handle overlapping segments properly

See https://groups.google.com/d/msg/druid-development/ZCXRGzGfXSM/qVVl3W1jDgAJ
It looks like the factory is using a VersionedIntervalTimeline to figure out what segments to read, but doesn't use the interval of the timeline holders to filter the segments.

Failing test at: https://github.com/druid-io/druid/compare/master...gianm:ingest-segment-overlapping?expand=1#diff-8b56e359211a285701b559f7bd1296f4R249

looks like this one is going to impact batch delta ingestion as well, because same code is reused there to read data. We probably should put this one as a known bug inside 0.8.1 release notes till fixed.
Also IngestSegmentFirehoseFactory usage of VersionedIntervalTimeline  is looks redundant because IndexerSQLMetadataStorageCoordinator (see https://github.com/druid-io/druid/blob/master/server/src/main/java/io/druid/metadata/IndexerSQLMetadataStorageCoordinator.java#L75 ) does that as well.

This doesn't compile anymore after merging #1609, rebasing back onto master.

ok, now it compiles, and that is cool.


MCQ: move "shuffle choices" and "number of display columns" to choices column

Actually, maybe not.


Add Bevy to the game engine list

Thank you for contributing! Please confirm this pull request meets the following requirements:

[x] I followed the contributing guidelines: https://github.com/github/explore/blob/master/CONTRIBUTING.md
[x] I have no affiliation with the project I am suggesting (as a maintainer, creator, contractor, or employee).

Which change are you proposing?

[x] Suggesting edits to an existing topic or collection
[ ] Curating a new topic or collection
[ ] Something that does not neatly fit into the binary options above

Editing an existing topic or collection
I'm suggesting these edits to an existing topic or collection:

[ ] Image (and my file is *.png, square, dimensions 288x288)
[x] Content (and my changes are in index.md)

It's a game framework, with 8.2k stars

Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.
Closes https://github.com/github/explore/pull/2288 (edit by @mikemcquaid)

Thanks so much for your first contribution!  You rock, @LightningAA!


opt in local Electron crash reporter

This adds an opt in extra crash reporting for people with very screwed up electron setups. i figure in a github issue w/ a hard electron crash in github issues we can tell people to setup the env var and launch the app and send us the log (somehow). i didn't bother to setup log send to also send this. also consuming this crash report is a little tricky so i figure we can figure out that part if we get someone to actually send us one

@keybase/react-hackers bump


Allow proc as custom data

Custom data can now be a Proc which is called with the user or company at runtime.  The Proc must return a hash which will be set as the custom data and sent to Intercom.
Fix for #156
config.user.custom_data = Proc.new { |user| SomeObject.user_custom_attributes(user) }

Hi @graemeboyd, it seems like CI is failing, possibly due to the gemspec changes?

Actually I believe #73 was trying to do the same thing. and Issue #220 for reference. I would love to see this feature that makes using the intercom-rails horrible for a lot of attributes

@graemeboyd thanks for contributing. I just merged a PR that's allowing to create custom attributes with Proc (https://github.com/intercom/intercom-rails/pull/225) so I'm closing this one.


 ANY MANUAL CHANGES WILL BE LOST. --->

Wildfly issue links:

WFLY-19393

<--- END OF WILDFLY GITHUB BOT REPORT --->
More information about the wildfly-bot[bot]

Thanks @scottmarlow


Update scodec-bits to 1.1.29

Updates org.scodec:scodec-bits from 1.1.18 to 1.1.29.
GitHub Release Notes - Changelog - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scodec", artifactId = "scodec-bits" } ]

labels: library-update, semver-patch

Superseded by #202.


Implements Unique-Key possibility (issue #46)

Addes the UniqueKeyAttribute
Addes IUniqueKeyPolicyProvider and a default implementation
Addes Tests for the Provider
Uses the policies when creating a container

Fixes #46

@all-contributors please add @VeryCautious for code and tests


Incorrect return type of function with conditional return

TypeScript Version:  3.7.2

Hi guys! I'm sorry if I have misunderstood something but I really don't think this is the correct behaviour. If it is I would love the reasoning behind it. Cheers!
Search Terms:
Inferred return type
Function with conditional using wrong union - empty object
Code
// Return type inferred wrongly to empty object "{}"
const foo = (bar?: any) => {
  if (bar) {
    // if you inline property 'baz' in return then problem goes away ... (?)
    const baz = {
      baz: 'baz',
    };

    return {
      ...baz,
      foo: 'foo',
    };
  }

  return { };
};

// Return type inferred correctly to  { baz: string, foo: string, bar?: undefined } | { bar: string }
const foo2 = (bar?: any) => {
  if (bar) {

    const baz = {
      baz: 'baz',
    };

    return {
      ...baz,
      foo: 'foo',
    };
  }

  // just adding a random key here solves the problem
  return {
    bar: 'bar',
  };
};

Expected behavior:
Typescript correctly infers return type
type FooReturn = { baz: string, foo: string } | {}

Actual behavior:
type FooReturn = {}

Playground Link:
Playground Link
Related Issues:

Something to do with union reduction and how it works.
https://github.com/microsoft/TypeScript/issues/32237

It is indeed frustrating. I still find it weird that if I for example don't do the spread, i.e
const foo = (bar?: any) => {
  if (bar) {
    return {
      baz: 'baz',
      foo: 'foo',
    };
  }

  return { };
};

then it works as expected. It's just that explicit typing in this case is super cumbersome for us, we use a bunch of nested functions (hence the spreads) and they all have pretty complex overloads as it is.

Subtype reduction is in general the correct behavior because you have to account for the possibility of aliasing.
Consider this code, which is not meaningfully different from your example:
function getSomeObj(): {} {
  const obj = { baz: 10, foo: false };
  return obj;
}

function fn() {
  if (Math.random() > 0.5) {
    return { baz: "", foo: "" };
  } else {
    return getSomeObj();
  }
}

const k = fn();
// k.baz?

You cannot meaningfully say anything about k's baz or foo properties because the {} type includes values for which those properties have types other than string.

Subtype reduction is in general the correct behavior because you have to account for the possibility of aliasing.
Consider this code, which is not meaningfully different from your example:
function getSomeObj(): {} {
  const obj = { baz: 10, foo: false };
  return obj;
}

function fn() {
  if (Math.random() > 0.5) {
    return { baz: "", foo: "" };
  } else {
    return getSomeObj();
  }
}

const k = fn();
// k.baz?

You cannot meaningfully say anything about k's baz or foo properties because the {} type includes values for which those properties have types other than string.

I'm not sure I'm following. Wouldn't it perfect sense for your example fn to have return type of { baz: string, foo: string } | {}


broken link

https://archive.msdn.microsoft.com/wpfsamples

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

ID: 4baeeb7d-bba4-c8c5-6f54-97dc68a59aef
Version Independent ID: d248598d-5657-1a8c-3f91-b37384243eff
Content: WPF Globalization and Localization Overview
Content Source: docs/framework/wpf/advanced/wpf-globalization-and-localization-overview.md
Product: dotnet-framework
Technology: dotnet-wpf
GitHub Login: @dotnet-bot
Microsoft Alias: dotnetcontent

Thank you for letting us know. I fixed the target of that link to go to the right place.


Set up linting in the root Makefile

Lint each go module (similar to how the ibc-go repo does it)

Completed in https://github.com/cosmos/interchain-attestation/pull/57


:sparkles: Add custom query Column attribute

Add the ability to add Custom query on the Column attribute declaration
usage : [Column(Name, Query)]

Thanks for PR!
I see some problem: you define column as int value, but in fact you receve string, and loose advantage strong typing for query building. Writing WHERE clause ins this case will be a problem.
Maybe better to use here CAST function? See: https://github.com/oakio/Sqlify/commit/d351996bfb817731743aa8059f761447e77673b8
Can you give me an example of real use this feature?
If you really want this feature, you may do this now without any code changes:
interface IMyTable : ITable
{
    [Column("name::varchar")]
    Column<sting> Name{ get; }
}

var t = Sql.Table("t");
var q = Sql.Select(t.Name).From(t); // SELECT t.name::varchar FROM My t

Hello !
Here a more relevant example :
Where we always need an alias and the query is quite complexe in order to compute a value for example.
[Column("value",((COALESCE(SUM(column1 ), 0)) / nullif((COALESCE(SUM(column2*50), 0)), 0))]
Thanks to that new header it will generate something like :
SELECT ((COALESCE(SUM(column1 ), 0)) / nullif((COALESCE(SUM(column2*50), 0)), 0)) AS value FROM t

Hi!
I'am see some problems with this:

Table aliases don't used in custom query for columns.
Column names are hardcoded as strings. Also we loose compile time type checking.

I heard you, and I will try to think how to can made this more graceful.

Hi!
Added computed column feature in version 0.3.11, and now you can write:
public interface IExampleTable : ITable
{
    Column<int> Column1 { get; }
    Column<int> Column2 { get; }

    Expression<int> Value => Sql.Coalesce(Sql.Sum(Column1), 0) / Sql.NullIf(Sql.Coalesce(Sql.Sum(Column2 * 50), 0), 0);
}

var t = Sql.Table<IExampleTable>("t");
var query = Sql.Select(t.Value).From(t);

// SELECT COALESCE(SUM(t.Column1), @p1) / NULLIF(COALESCE(SUM(t.Column2 * @p2), @p3), @p4) AS Value FROM Example t

PS: required C# language version 8+ (default interface methods)


Fix inconsistent cache bug

R: @bvolpato

Thanks. Validated that this PR fixes the bug reported at https://github.com/apache/beam/issues/25166.


DO NOT UPGRADE GLIBC

After upgrading glibc to 2.27, the instance will not start.
2.26 is working.

This issue was solved after upgrade to Windows 10 1706.
This issue will close.