Using global scss variables in my components styles.

angular-cli: 1.0.0-beta.6
node: 6.2.1
os: darwin x64
Hi I have bootstrap override varaibles.scss, which I want to use as a Global style for my app.
So, I depend on these variables on every component.scss I write. Is there a way I can add a global dependency of variables.scss.
Right now I do import the variables.scss manually in every scss file that require.

There isn't any such functionality in the CLI itself, no. There is sass compilation but that's it.

@a5hik A temp fix for that is to make a _varaibles.scss and import where ever you use your variables. Not the cleanest way.

What @AmarildoK suggested could actually be incorporated as a feature into angular CLI. There could be a shared scss file somewhere and new .scss files in generated components could use have an import line to include the shared scss file by default.

Yup. Certainly need this feature.

+1

Still nothing?

Any updates about this people?

Any update on this?

I'm quite new to frontend, but I'm trying to declare some global SCSS vars for my Angular app, and I just want to be sure that it's not intended that what I'm doing should work.
I'm running angular-cli 1.0.0-beta.21. In my angular-cli.json file, in apps[0].styles, I reference my styles.scss file.
styles.scss
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');
@import url('https://fonts.googleapis.com/css?family=Droid+Sans:400,700');
@import '_vars';
@import 'reset';
@import 'global';
@import 'index';

_vars.scss
/* VARIABLES  */
/* brand colors */
$color-accent: #2980b9;
$color-primary: #ecf0f1;
$color-subtle: #aaaaaa;

/* rarity */
$color-rarity-legendary: #4c139d;
$color-rarity-ascended: #fb3e8d;
$color-rarity-exotic: #ffa405;

When I try to reference a variable declared this way in a component's .scss file, the console reports that the variable hasn't been declared.
Is this failing because of something I'm doing wrong, or is this not possible under the current version of the CLI?
Thanks so much for your time and help.

can someone explain to me how the SASS transpiling happens?
I assume this happens:

ng-cli transpiles global sass file to css
find all component specific sass and transpile those to css
concatenate all that css

is that correct?

I have the same problem with global sass variables. Also the transpile is for me at the moment a blackbox

What we do is create a folder called shared and under it a styles folder. We then create our sass there. Finally from your top level component typically "app.component.scss" just import.
@import './shared/styles/default';

@greenchapter yeah.. I wish there was some good documentation for it. if you find anything, do let me know.

@ahmed-musallam see my above example I had forgotten the encapsulation flag in the root component. Just remember that the app.component.scss will not be encapsulated so any style imported there will propagate to any child component etc.
In may cases this works just fine, I see little issue with it. you can still have encapsulated styles for components.

Even with the encapsulation set I'm still getting a missing var error on compile. Is there something else that needs to be setup?

@askdesigners hard to say I'd need to see it. The above example I showed works just fine is it possible there's something up with your sass itself? Maybe post some screenshots or something and maybe something will stand out.

@origin1tech @askdesigners you should not disable encapsulation. It's just bad when you have leaking CSS.
If you know SASS, you know that variable and mixin  declaration are NOT transpiled to CSS. So there is no issue with doing what @AmarildoK suggested above. just make a variables and mixins partial and include it when you needed. Since vars and mixins do not transpile unless you use them, there is no overhead here whatsoever.
What @a5hik is asking for in the thread is for convenience only... if you use angular, you are already familiar with angular's ceremonial steps for creating components and services.. this is the same thing... Additionally, I dont think the SASS transpiler supports injecting variables on the fly (during transpiling). the only way this can be done is by writing import statement into each sass file before SASS transpiling. And this can be done by a nodejs script if you must have that convenience.

@ahmed-musallam it's only a "leak" if you don't define it.
zero wrong with having a few styles that are global to your app for convenience. If that weren't the case cli wouldn't build with a global styles file pre-config'd nor would encapsulation option be avail. Disabling on a top level component does not negate encapsulation on sub-components.
If it's not what you prefer I understand but to emphatically suggest it's wrong is absurd. It would be unnecessary heavily lifting to have some separate build task/config just for those handful of global styles.

@origin1tech of course! you should use global CSS when you need global styles. Obviously no brainer there. And I would not repeat the same css in every component instead of using a global style.
but what your example, about setting encapsulation: ViewEncapsulation.none does not work as you described it nor was it intended to be used that way. the good folks at rangle.io explain the difference in the three encapsulation methods here: https://angular-2-training-book.rangle.io/handout/advanced-components/view_encapsulation.html. also Pascal Precht  has a really good article over at thoughtram.io describing that as well: https://blog.thoughtram.io/angular/2015/06/29/shadow-dom-strategies-in-angular2.html
anyway, we are not talking about "global styles" in this thread, we are talking about "sass variables" and finding a way to reuse them across components.

What we do, is that we define a base.sass, that does not generates any CSS but only defines global variables.
This stylesheet is then imported on top of the component sass stylesheets.
@import "./src/assets/private/sass/base";
It does not generate any CSS overhead in the components, you can leave ViewEncapsulation enabled and all is good.

Ahh this is a frustrating problem. I want to just import colors and things one time. Not on every scss file.

I'm so not sold on the encapsulated CSS train. I get the thinking, but honestly if you just write good reusable modular css from the get go it's not a problem at all. It's only an issue when you don't really get the cascade. BEM solves this issue pretty well IMO without any encapsulation at all.

Yes its kind of frustrating but thats the way scss works. What i don't understand is why component-styles are always inline. If they would be concatenated to global style.scss instead we would have no problems with undefined variables or mixins.

I see there is plenty of people having the same issue here. I understand Angular CLI is done the way it is (take it or leave it). But not listening so many people requesting for a more pragmatic way do define the Sass inheritance + stack looks more like a whim rather than a technical issue (should I have to say what CSS means?).
Is quite logic to think a developer would like to handle this in a reusable way avoiding over-importing and taking full advantage of cascading the styles.
Hope Angular CLI team understand this is a constructive critic from someone, like many others, that doesn't see a good reason why don't move forward with such a highly-demanded feature.

I'm expecting to see this feature implemented soon. It's so frustrated to write that import statement for every component style.

How vould this be fixed? The compiler does not include your variables, it just compiles each component-scss seperately. Therefor you need to include your variables/mixins/functions. This is how sass works and writing that import statement is the correct way.

I hope they fix this issue soon. Just in case you need import your sass, Webpack provides a better way to do it:
@import “~variables.scss”;
It's less frustrating than specify the full path.

Is there a fix coming or should one use the "work around" described here ?

There seems to be no 'fix' yet. But in any case, don't use the suggestion with encapsulation: ViewEncapsulation.None unless you really understand its implications.

There is a simple way of achieving this.
Add the following property into .angular-cli.json into "apps":
      "stylePreprocessorOptions": {
        "includePaths": [
          "scss"
        ]
      }

This assumes your scss is in a folder under src called scss.

@hellofornow, the above did not seem to work for me. Are there any gotchas?

@gustavossantos no gotchas. I can provide some more details though.
src/
 scss/
   - variables.scss
 app/
   components/
     - component1.ts
     - component1.html
     - component1.scss
.angular-cli.json

Contents of angular-cli.json are as described above.
Contents of component1.scss would be:
@import 'variables';

...rest of your scss goes here

@hellofornow what's the benefit for changing the angular-cli.json if I can achieve the same without it and using @import “~variables.scss”;, like @antoniocastanheira wrote?
Also, in general I see no problem implementing something. There might be some implications though, i.e. how are lazy loaded modules handled?
I suggest a discussion on can we do something about it and if, how and which edge cases we need to think about rather than do it now.

@daniel-seitz perhaps a bit of confusion -- this issue is going over many different topics.
Using @import “~variables.scss”; is great if your scss is inside of a folder within node_modules (unmodifiable).
Adding scss paths into angular.cli.json is required if you want "simple" imports for scss that are defined in your project.
Without adding the appropriate scss path(s) into angular.cli.json you will have to do relative path imports.
For example:
@import "./src/assets/private/sass/base"; should be simplified into @import "base";
(assuming you've added the correct entry into .angular.cli.json)
As for automagically importing variables or base into all scss files, that may be a nice feature.
It could be done similar to this comment:
https://github.com/webpack-contrib/sass-loader/issues/218#issuecomment-266669156
I do think if this feature was added it would need to be a new property of .angular.cli.json.

Thank you for the reply @hellofornow. I too would welcome this feature however from my current understanding its not trivial to implement this.
I was not clear enough with my question for you, so one clarification: Look out for the ~ symbol.
If one just imports like this @import “variables.scss”;, then yes this file needs to be inside node_modules - which is bad, don't do this.
BUT! if you do @import “~variables.scss”;, so with a ~, then you can import relative to your src folder. That's it, no other config. (Since we're in the angular-cli repo here I won't go into other structures and what we need to configure that 'home'-path)
Keeping that in mind, what's the need to do this then? I found no documentation.
"stylePreprocessorOptions": {
    "includePaths": [
        "scss"
    ]
}

Then I also did some tests (also with lazy loaded modules, ...) and - as we all know - we would not expect this to happen: Angular CLI with Sass compilation encapsulates the styles so that they won't have effects on other parts of the system.
When using import, we circumvent this and can use all variables, however when mixing variables with real css we also can cascade.
PROBLEM here is that each time use import, that 'real css' gets into the resulting file inline, over and over - which again goes against cascading and worse, makes our dist bigger.
The SOLUTION would be to make the variables (mixins, ...) available to the compilation so that it just knows about them and translating on the fly, nothing else.
I'd like to have these variables, or at least the starting point, in src/styles.scss as it is default but likely needs to be configurable.
If I find the time, I will dig deeper as I know that it's not just us who want this...

Sorry if this is off topic, but per my understanding in this thread, it seems that SASS process files more in isolation, then say LESS did, would that be correct?
In essence, the use case is of being able to use a @mixin which sets some color variables in one  file at an "app" level, and hope for that cascade down into all the other components (even if node_modules).
variables.css
$color: 'green';
$theme: 'generic';

@mixin setTheme($theme: 'generic') {
  @if($theme == 'a') {
    $color:  red;
  }

  @if($theme == 'b') {
    $color: blue;
  }
}

app.component.css
@import "~bootstrap/scss/bootstrap.scss";
@import "./styles/variables.scss";

@include setTheme('a');

header.component.css
@import "./styles/variables.scss";

@include setTheme('a');  // only changes red if this is set manually, which is hardcoded and not ideal for a reusable component from npm

h1 {
  color: $color;
}

In this case, anything processed in my app component using $color would change red, but anything in my other components would not change color (would stay the default color of green) unless I manually call setTheme in all my components, which doesn't make them very reusable.
Thanks, and hope that wasn't too confusing!  Any thoughts would be greatly appreciated!

I was able to get something working for my use case using sass-vars-loader.

Just an FYI, it looks like using the tilde to reference 'src' from the component level ala @import '~scss/variables'; is buggy (not working) in Angular 6 (issue). @import '~src/scss/variables'; and @import './src/scss/variables'; seem to work, though. Just a PSA if anyone runs into problems.

I can't believe how difficult Angular makes using SASS. I'm about to switch to React/webpack

this is ONE OF THE MOST COMMON THINGS I CAN IMAGINE.
Dear Angular team, greet 2013, because you're obviously stuck there. I'm going back to angular.js. It's incredible how you created something so useful and ruined it.

Guys this is how sass/scss works and has nothing todo with Angular. Just import your variables and you are good to go OR use a global stylesheets file.

So, in conclusion, if you @import  something but you doesn't use a var or mixing of that thing you've imported, it isn't included in the final bundle, right?

Is there a way to use sass variables globally without the need to manually import in every single component? Perhaps this would be bad practice anyway as every component then has access, even if t doesn't need it...

Do one thing. It will work.
import variable.scss file in the component where you want to use variables, it will work.
This is not standard, if something standard arrives, it is easily undo-able.

What we do is create a folder called shared and under it a styles folder. We then create our sass there. Finally from your top level component typically "app.component.scss" just import.
@import './shared/styles/default';

Forgot you also on the top level component need to set View Encapsulation.
encapsulation: ViewEncapsulation.None

viewencapsulation.none , is not good a thing to do , unless

What we do is create a folder called shared and under it a styles folder. We then create our sass there. Finally from your top level component typically "app.component.scss" just import.
@import './shared/styles/default';

Forgot you also on the top level component need to set View Encapsulation.
encapsulation: ViewEncapsulation.None

i feel that viewencapsulation.none should not be done , view encapsulation is a good feature of angular to avoid conflicts between the styles of different components and making the css cleaner and easier to understand , by doing viewencapsulation.none we are disabling that feature.
instead, it would work even  if we would just create a _variables.scss file and import it into our specific component in which we want the those style variables, that would be a better approach.


humanfriendly.Timer won't work properly if the system clock changes

If the system clock changes while the Timer class is busy timing something, it won't track the elapsed time correctly. This could happen if daylight saving kicks in, or if someone travels across a border and their timezone changes, or for any number of other reasons, such as a NTP client kicking in and changing the time. A great example of this can be found in this video by Tom Scott: https://www.youtube.com/watch?v=QCwpVtqcqNE
The solution is to use a monotonic clock to track the time. Fortunately, python has built-in support for monotonic clocks: https://docs.python.org/3/library/time.html?highlight=time.monotonic#time.monotonic
There is also a polyfill available for when time.monotonic isn't available: https://pypi.python.org/pypi/monotonic
It would be great if Timer could be adjusted to use a monotonic clock so that it can properly track the elapsed time regardless of its conditions of use.

Hi Matthew and thanks for the feedback! I was aware of time.monotonic() being available in Python 3.3 and higher, but I'd never encountered pypi.python.org/pypi/monotonic before. There's actually a sense of elegance to the  monotonic package, in that it doesn't require compilation (binary code) and it's contained in a single Python module. I like!
Just now I released humanfriendly 2.3 which uses monotonic timers when available, whether via the new conditional monotonic dependency or time.monotonic(). If no monotonic clock is available it falls back to time.time(), but now only as a last resort :-).
I believe this resolves the problem you reported so I'm going to close this issue now. If you notice anything wrong, feel free to reopen this issue or open a new one.


Prevent tour from showing if already seen

Issue Title: [Bug]: Tutorial appears even if the website has already been accessed before.
closes #434
Type of change ☑
What sort of change have you made:

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Code style update (formatting, local variables)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Checklist: ☑

[x] My code follows the guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly wherever it was hard to understand.
[ ] I have made corresponding changes to the documentation.
[x] My changes generate no new warnings.
[x] I have added things that prove my fix is effective or that my feature works.
[ ] Any dependent changes have been merged and published in downstream modules.

How Has This Been Tested? ⚙
Hosted my own instance of the website and tested the new bugfix there, everything seemed to work.

@LyubomirT You could have done the cookies part without using any library too, isn't it?

@singodiyashubham87 Sorry for that, I just figured it'd be more convenient for you if I used JS-Cookie, I guess it's the opposite. Changing the code to work with cookies without it.

@singodiyashubham87 Implemented what you asked for, please review the code again and let me know if it works well.

@LyubomirT Kindly resolve the conflicts.

@LyubomirT Well Done!


Doesn't Appear to Work with BenQ HT3550

Integration finds and adds the projector.  The projector also turns on when I hit the power button, but it doesn't seem to register any statuses and you can't then turn it off.

Hi @conjalka, any error messages that you can share to resolve the issue?

Sorry for the long response time.  Here's the error messages I'm getting using a null modem FTDI serial to USB cable:
This error originated from a custom integration.
Logger: benqprojector.benqprojector
Source: custom_components/benqprojector/init.py:120
Integration: BenQ Projector (documentation, issues)
First occurred: 3:22:16 PM (20 occurrences)
Last logged: 3:22:51 PM
Command *pp=?# illegal format
Command *ltim2=?# illegal format

This error originated from a custom integration.
Logger: benqprojector.benqprojector
Source: custom_components/benqprojector/init.py:143
Integration: BenQ Projector (documentation, issues)
First occurred: 3:22:16 PM (10 occurrences)
Last logged: 3:22:16 PM
Unexpected response: b'F'
Unexpected response: b'#'
Unexpected response: b'\r'
Unexpected response: b'\n'
Unknown power status: ?

This error originated from a custom integration.
Logger: benqprojector.benqprojector
Source: custom_components/benqprojector/init.py:77
Integration: BenQ Projector (documentation, issues)
First occurred: 3:22:15 PM (1 occurrences)
Last logged: 3:22:15 PM
Command macaddr=? not supported

This error originated from a custom integration.
Logger: benqprojector.benqprojector
Source: custom_components/benqprojector/config_flow.py:113
Integration: BenQ Projector (documentation, issues)
First occurred: 3:22:15 PM (1 occurrences)
Last logged: 3:22:15 PM
Command macaddr=? not supported

Good morning, @rrooggiieerr!  Is there anything else that I can provide to help you look into this issue?  Thanks so much for your help!

Hi @rrooggiieerr, I just thought I'd check in again.  Is there anything else you need from me to dig into the issue?  I would love to be able to use this integration with my HT3550!  Thanks so much for your help!

Hi @conjalka , sorry for the slow response, been busy with other things. You can try to make the library work first.
https://github.com/rrooggiieerr/benqprojector.py
Instructions are in the readme

Not sure if related, but I'm seeing my projector throw out random characters while using the examine script.
I had modified line 431 of benqprojector.py to _response = self._connection.read(1024) get this to appear.
See line 434 of the attached debug.txt. With the original code, the script will return response: m and not detect my smartsystem source.
debug.txt


Fuse single-use filter calculations with their filters

Scope & Purpose
This is a request for comments.
Add AQL optimizer rule to fuse calculations that are only used in a single filter together with their filter, so that the calculation result is never stored and does not allocate any register in an AqlItemBlock.
This adds a new optimizer rule fuse-calculation-filter and a new ExecutionNode type CalculationFilterNode.
For example, a (contrived) query without the feature in effect:
Query String (146 chars, cacheable: true):
 FOR doc1 IN x FOR doc2 IN x FILTER doc1.value >=92 && doc2.value <= 93 && doc1.value >= doc2.value
 && doc1.value <= doc2.value RETURN {doc1, doc2}

Execution plan:
 Id   NodeType                     Est.   Comment
  1   SingletonNode                   1   * ROOT
  2   EnumerateCollectionNode      1000     - FOR doc1 IN x   /* full collection scan */
  3   EnumerateCollectionNode   1000000       - FOR doc2 IN x   /* full collection scan */
  4   CalculationNode           1000000         - LET #2 = ((((doc1.`value` >= 92) && (doc2.`value` <= 93)) && (doc1.`value` >= doc2.`value`)) && (doc1.`value` <= doc2.`value`))   /* simple expression */   /* collections used: doc1 : x, doc2 : x */
  5   FilterNode                1000000         - FILTER #2
  6   CalculationNode           1000000         - LET #4 = { "doc1" : doc1, "doc2" : doc2 }   /* simple expression */   /* collections used: doc1 : x, doc2 : x */
  7   ReturnNode                1000000         - RETURN #4

Optimization rules applied:
 none

With the feature enabled, the execution plan changes to
Query String (146 chars, cacheable: true):
 FOR doc1 IN x FOR doc2 IN x FILTER doc1.value >=92 && doc2.value <= 93 && doc1.value >= doc2.value
 && doc1.value <= doc2.value RETURN {doc1, doc2}

Execution plan:
 Id   NodeType                     Est.   Comment
  1   SingletonNode                   1   * ROOT
  3   EnumerateCollectionNode      1000     - FOR doc2 IN x   /* full collection scan */
  2   EnumerateCollectionNode   1000000       - FOR doc1 IN x   /* full collection scan */
  8   CalculationFilterNode     1000000         - FILTER ((((doc1.`value` >= 92) && (doc2.`value` <= 93)) && (doc1.`value` >= doc2.`value`)) && (doc1.`value` <= doc2.`value`))   /* simple expression */   /* collections used: doc1 : x, doc2 : x */
  6   CalculationNode           1000000         - LET #4 = { "doc1" : doc1, "doc2" : doc2 }   /* simple expression */   /* collections used: doc1 : x, doc2 : x */
  7   ReturnNode                1000000         - RETURN #4

Optimization rules applied:
 Id   RuleName
  1   move-calculations-up
  2   move-filters-up
  3   interchange-adjacent-enumerations
  4   move-calculations-up-2
  5   move-filters-up-2
  6   fuse-calculation-filter

The second plan, with the feature enabled, has one processing step less, and uses one less output register, so a lot of stores of the filter conditions results (#2) into the AqlItemBlock are saved. In addition, this allows to reduce the width of the AqlItemBlock by one register, shortening the AqlItemBlocks internal storage vector. This makes initialization and cleanup of the AqlItemBlock slightly more efficient, because no work needs to be done for an entire register.
Note that only queries will benefit in which the filter condition is not on the data of a single collection. Filter conditions on data from a single collection are normally moved into the EnumerateCollectionNode/IndexNode and executed in there via early pruning. These types of queries will not benefit, but other queries with more complex filters will. And there the small savings may add up.
The contrived example query runs approximately 15% faster with the change, when the underlying collection contains 1,000 documents.

[ ] :hankey: Bugfix (requires CHANGELOG entry)
[x] :pizza: New feature (requires CHANGELOG entry, feature documentation and release notes)
[x] :fire: Performance improvement
[ ] :hammer: Refactoring/simplification
[x] :book: CHANGELOG entry made

Backports:

[x] No backports required

Related Information

[x] Docs PR: TO DO

Testing & Verification

[ ] This change is a trivial rework / code cleanup without any test coverage.
[ ] The behavior in this PR was manually tested
[ ] This change is already covered by existing tests, such as (please describe tests).
[ ] This PR adds tests that were used to verify all changes:

[ ] Added new C++ Unit tests
[ ] Added new integration tests (e.g. in shell_server / shell_server_aql)
[ ] Added new resilience tests (only if the feature is impacted by failovers)

[ ] There are tests in an external testing repository:
[ ] I ensured this code runs with ASan / TSan or other static verification tools

Link to Jenkins PR run:

Closing this PR, as it is too limited in scope and adds more complexity than desired.

Closing this PR, as it is too limited in scope and adds more complexity than desired.


added goveralls

Changes Unknown when pulling c8d03ff62543b4073010a287459a8d7bf659a0e1 on yuce:add-coveralls into ** on pilosa:master**.

Changes Unknown when pulling c8d03ff62543b4073010a287459a8d7bf659a0e1 on yuce:add-coveralls into ** on pilosa:master**.


Fixed yaml dumpArray() for PHP 7.1

The function dumpArray() returned warnings about non-numeric values in the inline function of the array_reduce call. This was fixed by adding an explicit check for a numeric value.
Run php test/unit/yaml/sfYamlInlineTest.php on PHP 7.1 to see the original problem and to verify my fix.

Looks like your change is breaking an other test: https://travis-ci.org/LExpress/symfony1/jobs/181123500
Could you please check what's could be wrong?

I don't think I've introduced that problem. The most recent test on PHP 7.0 on the master branch has te same issue with the IP validator: https://travis-ci.org/LExpress/symfony1/jobs/181278235

Hum right, I'll check that and your PR.

Thanks for the quick response!

was:
array_reduce($keys, create_function('$v,$w', 'return (integer) $v + $w;'), 0)
maybe this is better in this case?
array_sum(array_map('intval', $keys))

That looks better indeed

You can fire a PR for that :wink:

https://github.com/LExpress/symfony1/pull/146


Fix timestamp scale

It should be equal to 3 because it supports milliseconds
https://cassandra.apache.org/doc/stable/cassandra/cql/types.html#timestamps

@kornilova203. Ok, makes sense from this point of view. I think we can keep your change in this case, but could you please just add a comment in the code to explain this choice of implementation (and avoid any further discussion in the future regarding this point)?


Fix: Keybindings Interference Between Video Player and Comments

PR Fixes:

Fixing the issue of keybindings interference between the video player and comments.

Resolves #364
Description:
This PR addresses an issue where keyboard shortcuts used in the comment textarea were affecting the video player's behavior. The problem occurred when certain keys, such as < or >, were pressed while typing comments, causing unintended effects on the video playback speed.
To resolve this issue, I added event handling to prevent the propagation of keyboard events when typing in the comment textarea.
This change ensures that keyboard shortcuts are properly isolated to the comment input area, providing a smoother user experience without interfering with the video playback.
Checklist before requesting a review

[x] I have performed a self-review of my code
[x] I assure there is no similar/duplicate pull request regarding the same issue

https://github.com/code100x/cms/assets/111479342/f526a7cd-b23a-4619-ab6f-086e913751d5

There is already a PR for this issue created #365

/bounty $5


specify virtual_delegate types to avoid deadlock

https://bugzilla.redhat.com/show_bug.cgi?id=1700378
deriving the attribute type for delegates required the target method to be loaded.
This forced a string of load_schema calls that introduced a race condition.
This PR explicitly declares the attribute type so target class no longer needs to be loaded and the race condition (and deadlock) are avoided.

changed the :bigint over to :integer. that seems to be the type that would be detected.

@kbrock it's still failing 😢

A hammer version of this code is put into a separate PR - there were conflicts back porting this. The main issue is that hammer does not have the virtual attributes functionality as a separate gem)


Update autotune.md

Added information how to use autotune inside nightscout. Added "detail" tags for increased readability

Understood, thanks for the explanation and feedback.

(Closing as we'll be pointing people to AutotuneWeb as the easiest way to run autotune for non-OpenAPS'ers)


Populate plant database

Make more plants to better showcase the statistics and info screen features.

Have populated the database with approximately 30 plants


Add an interface defining all the API methods

Backported from docker/docker project. Makes it easy and readable to know what methods to implement to be considered as a complete docker client 🐰.
/cc @calavera @MHBauer
🐸
Signed-off-by: Vincent Demeester<EMAIL_ADDRESS>

@vdemeester tests are welcome :bee:
LGTM

@calavera I know :smile: It's on my TODO list as you probably guessed 🐸

LGTM


How to Run

First of all it's not an issue.  If I wish to run it, how to do this..
I have downloaded this repo and wants to run it in Eclipse  Version: 2022-06 (4.24.0) Build id: 20220609-1112 in windows environment.
It will be better if you tell me the steps which I missed
Thanks for this beautiful repo.

I am closing this as I am able to run it. Thanks


Server receiving requests multiple times

Sometimes a server receives a request that was sent a long time ago again

I think that can happen when the server loses connection to the websocket and reconnects, this causes the server to receive the current value of the TO_HOST cloud variable again . I’ll try to fix that bug

I found a fix. This should be the _update method of WsCloudEvents:
def _update(self):
    while True:
        try:
            data = self.connection.websocket.recv().split('\n')
            result = []
            for i in data:
                try:
                    result.append(json.loads(i))
                except Exception:
                    pass
            for activity in result:
                if "on_"+activity["method"] in self._events:
                    self._events["on_"+activity["method"]](self.Event(user=None, var=activity["name"][2:], name=activity["name"][2:], value=activity["value"], timestamp=time.time()*10000))
        except Exception:
            try:
                self.connection._connect(cloud_host=self.connection.cloud_host)
                self.connection._handshake()
                self.connection.websocket.recv()
            except Exception:
                if "on_disconnect" in self._events:
                    self._events["on_disconnect"]()

when connecting to Scratch’s cloud websocket, it sends the values of all cloud variables
This is how it should work and used to work, but for some reason Scratch does not send the values of all cloud variables when connecting to the websocket anymore.

I don't know what's causing the problem

Sometimes Scratch's cloud websocket sends a message with the values of all cloud variables after connecting. The WsCloudEvents event handler considers this message as cloud activity, this causes the problem. Will be fixed soon

Will be fixed in v1.2.6

Uhmm, i'm using v1.2.6 and i have still the same error.


Images in some Tweets aren't appearing in the tweet data

I ran across a tweet today for which the Twython.show_status dict doesn't contain the URL for the image in the tweet. Previously I've checked the tweet dict for 'entities' or 'extended_entities' (the latter being a set of images), but this isn't working for this tweet. Not sure what's going on.
from twython import Twython

# Contains an image
url = 'https://twitter.com/joshharrison_2/status/779143860006125568'
tweet_id = url.split('/')[-1]

twitter = Twython(APP_KEY, APP_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET)
tweet = twitter.show_status(id=tweet_id)

if 'extended_entities' in tweet:
    entities = tweet['extended_entities']
elif 'entities' in tweet:
    entities = tweet['entities']

urls = []
if 'media' in entities:
    medias = entities['media']
    for media in medias:
        url = media['media_url']
        urls.append(url)

https://dev.twitter.com/overview/api/upcoming-changes-to-tweets
That tweet has "truncated": true which is an indication that the tweet has > 140 chars.
You need to specify tweet_mode tweet = twitter.show_status(id=tweet_id, tweet_mode='extended') to get the full tweet payload and if you're using the tweet text field originally, you must now switch to using the full_text, example: tweet_text = tweet.get('full_text') or tweet['text'].

Ah, that's great. Thank you! Really appreciate it.

The previous comment resolved my issue.


Twig support

This project supports the default laravel template engine (blade), but does it also support twig or is this feature planned?
ps: really nice plugin!

@inkrement thanks for pointing out twig one. we do not have support for it. but will take it in queue in future.


executor/fuchsia: Don't map memory as executable.

Fuchsia has strict controls over who can map memory as executable.
Refactoring syz-executor to be able to do that involves a non trivial
amount of work: it needs to run as a fuchsia component and replace stdin
for some other mechanism to communicate with syz-fuzzer (probably a fidl
service and a thin client that proxies stdin/stdout to syz-fuzzer via
ssh).
Mapping memory as executable doesn't seem to be used or needed in
syz-executor at all. After talking with Dmitry, he mentioned that it was
used in a deprecated feature: syz_execute_func which would execute
random code. It also allows more scenarios during fuzzing.
For now, I'm removing that option to allow syzkaller continue fuzzing.
This change also refactors all of the error messages adding a string
representation of the zx_status_t in error logs.

Before sending a pull request, please review Contribution Guidelines:
https://github.com/google/syzkaller/blob/master/docs/contributing.md

Please run make generate, we also need the change in pkg/csource/generated.go.

Otherwise looks good.


Merger failed error due to minSdk version 9 in gradle

i just had this gradle sync error in my new project with rn 0.61.2
and needed to change this form 9 to 16.
so i opened this issue for you to maybe consider change it at next version

Thanks Eliran, we'll check that

+1
minSdkVersion - it describes the minimum Android OS version that your app will support. React Native supports all Android versions higher than 4.1 (API 16).
I have a similar problem as well. The app fails to build because of rn-bugfender having lower (9) minSdkVersion than react-native (16).
So it's something important to consider changing in the next release 🙇

I'm glad to inform you that we've just released version 1.1.2 which solves this issue.

@franmontiel
unfortunately, 1.1.2 doesn't fix the above problem.
full error:
> Task :@bugfender_rn-bugfender:processDebugAndroidTestManifest FAILED /Users/pithor/projects/PickNPack/node_modules/@bugfender/rn-bugfender/android/build/intermediates/tmp/manifest/androidTest/debug/manifestMerger3714645792538277542.xml:5:5-73 Error:         uses-sdk:minSdkVersion 9 cannot be smaller than version 16 declared in library [com.facebook.react:react-native:0.59.9] /Users/pithor/.gradle/caches/transforms-2/files-2.1/5bd6db72922f6720fa9afdc7358c87cb/AndroidManifest.xml as the library might be using APIs not available in 9         Suggestion: use a compatible library with a minSdk of at most 9,                 or increase this project's minSdk version to at least 16,                 or use tools:overrideLibrary="com.facebook.react" to force usage (may lead to runtime failures)
So it points to line https://github.com/bugfender/rn-bugfender/blob/master/android/build.gradle#L19

@janowskipio now it should be working fine with the new version 1.1.3.
The previous version only updated Bugfender native dependency that now requires API 16 but didn't update the bridge project minSdkVersion value.

Issue fixed with 1.1.3 version, thanks!


Looking for help modifing registers for GPIO (IDFGH-14010)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report
I had to use the register to change my pin state because of my timing requirement. I have most of it working but I can not get the input to release the state of the pin.
my goal is something like
set to output so I can hold pins high or low
set to input so I can read the start of an external pin.
I got the output working and my input is not, these are my defines.
#define PINPULLUP(p)    asm volatile ("ee.setbitgpioout %0" : : "I"(p) : );
#define PIN_PULLDOWN(p)  __asm __volatile ("ee.clr_bit_gpio_out %0" : : "I"(p) : );
#define PIN_MODE_OUTPUT(p)  do { GPIO.enable_w1ts = (uint32_t)(1 << p); WRITE_PERI_REG((REG_IO_MUX_BASE + ( (p+1) * 4) ), (READ_PERI_REG(REG_IO_MUX_BASE + ( (p+1) * 4))|(1<<9)));  } while (0);
#define PIN_MODE_INPUT(p)   do { GPIO.enable_w1tc = (uint32_t)(1 << p); WRITE_PERI_REG((REG_IO_MUX_BASE + ( (p+1) * 4) ), (READ_PERI_REG(REG_IO_MUX_BASE + ( (p+1) * 4)) & ~(1<<9)));  } while (0);
to write a pin state I do this
PIN_MODE_OUTPUT(1<<1);
then I can use either PIN_PULLDOWN or PIN_PULLUP
This works
to read I do
PIN_MODE_INPUT(1<<1);
but my wires stay low. and my external resister can not pull up. did I miss something?

why was this missing?
/**

@brief Enable input for an IO

@param gpio_num GPIO number

@return

 - ESP_OK Success

 - ESP_ERR_INVALID_ARG GPIO number error

*/
esp_err_t gpio_input_enable(gpio_num_t gpio_num);
esp_err_t gpio_output_disable(gpio_num_t gpio_num);<--------------------
Anyways that works but I'd like to know if there is a simpler way to doable that? Especially since I can not use it on the master repo.

Please check our Technical Reference Manual, IO MUX and GPIO Matrix (GPIO, IO MUX) chapter should have the steps stated clearly.
Take ESP32S3 TRM as an example:

Hi could you post a link to the manual I'm confused where that is.

but just for understanding the "n" I figured was an indication I replace that with a number. but in searching it seems the register name has the letter n in it. i.e GPIO_FUNCn_OUT_SEL_CFG_REG. Also the (x) is confusing still, is index (0x100) what I need for the GPIO? In other words if I want to set pin 1 I do
GPIO_FUNCn_OUT_SEL_CFG_REG(0x100) ;
WRITE_PERI_REG( GPIO_OUT_REG[0], REG_READ(GPIO_OUT_REG[0] |= 0x02) );

S2 TRM link: https://www.espressif.com/sites/default/files/documentation/esp32-s2_technical_reference_manual_en.pdf
ESP-IDF Programming Guide is mainly for those uses our peripheral driver APIs. Since you want to work with registers directly, I would say TRM is your reference.
The 'n' and 'x' both correspond to the gpio number. You should first configure the pin as a simple input, and then also configure it as a simple output, following the guide stated in the TRM.
BTW, you sure you don't want to try our upper GPIO driver APIs, but play around with the registers? :)

"BTW, you sure you don't want to try our upper GPIO driver APIs, but play around with the registers? :)"
-- my only requirement is speed.  I work with many device that require a transition in ttl around 50ns. If you think the API is fast enough and easier to work with I can try.

so I as playing around with a few registers and I found the issue I had was my GPIO bundles. Apparently once you set those up, you can not use the ports as input. Also the register modification are not as precise as the bundle code, nor is it as fast.  I'm wondering if I can set up input bundles?
This is how I set them up
dedic_gpio_bundle_handle_t  createBundle( const int arr[], int size, bool makeBundle)
{
// configure GPIO DEBUG
gpio_config_t io_conf;
for (int i = 0; i <size; i++)
{
    io_conf.intr_type = GPIO_INTR_DISABLE;
    io_conf.mode = GPIO_MODE_INPUT_OUTPUT;
    io_conf.pin_bit_mask = (1ULL<<i);
    io_conf.pull_down_en = GPIO_PULLDOWN_DISABLE;
    io_conf.pull_up_en = GPIO_PULLUP_DISABLE;
    gpio_config(&io_conf);
}

// Create bundleA, output only
dedic_gpio_bundle_handle_t bundleA = NULL;
dedic_gpio_bundle_config_t bundleA_config =
{
    .gpio_array = arr,
    .array_size = size,
    .flags = {
    .out_en = 1,
    .in_en = 1,
    },
};
if (makeBundle)  dedic_gpio_new_bundle(&bundleA_config, &bundleA);
 return bundleA;

}
I thought that was both input and output?

If you want to use Dedicated GPIO module, then it is a different story than using GPIO module to read/write the IOs. For configuring an IO to be used as a dedicated GPIO, you don't need to call gpio_config. Your call to dedic_gpio_new_bundle looks correct, it should be able to make IO1 both readable and writeable. Try reading the states with dedic_gpio_bundle_read_in first, see if you can get desired result.

for a test, I change everything to open drain
io_conf.mode = GPIO_MODE_INPUT_OUTPUT_OD;
and everything works, expect in OD mode my transition for high to low is a max of 696 nS
But in normal GPIO_MODE_INPUT_OUTPUT my transition are much much faster, however I can not find a way to get my input wire conditions? If I do a read, it just shows what I see on the wires. So its working but I need to tell the GPIO to stop pulling high or low on the wires so my device can operate. Externally I use a 1k so that should be strong enough. but in this mode my device is not able to send data over the wire.
to read I can use
asm volatile ( "ee.get_gpio_in %[r]" : [r] "=r" (r));
but I still need a way to disable the external pulling, or at least stop what seems to be preventing my device from using the lines.

@ulao Hi, I think just adjust your external resister to 100~300 ohm and have a try!
1k will work like 3v3/1k=3.3mA which still weak compare to GPIO.
To allow more than one node output on one wire correctly, operate as wire and, you need config pin as OC not Push_Pull,
just like IIS bus, with 4.7k pull up work with OC, can speed up to 400K
You set GPIO_MODE_INPUT_OUTPUT will config pin as Push_Pull, which let your device can't output.

Hi thx, my external pullups are fixed ( they are part of another device ) I can not change them or change the values.
but in my tests bitbaning the pins from the registers works just fine.  I can change back to GPIO_MODE_INPUT_OUTPUT but I still do not know what registers change the input output operations?

@ulao I'm confiused,
what you mean just fine in GPIO_MODE_INPUT_OUTPUT mode, in this mode you can NOT read.
I mean decrase your external resister, so even if now you have a fixed internal pullup in other device, you can also parallio another resister do pullup, and change gpio mode to OD

Sorry for any confusion will try t itemize here.

I can not decrees the external because my other devise will not work properly. But this works for avr and its a 30k.
in  GPIO_MODE_INPUT_OUTPUT I do not know how to change to input. This is my main issue. For AVR its simple and I know its an 8 bit mcu but life is so much simpler there..

output
DDRD |= 0x01;
to set pins
PORTD |= 0x01; //high
PORTD |= 0x01; //low
input
DDRD &= ~0x01;
PORTD |= 0x01; //pull up. 30k
Everything works. I just change from output to input and I can bitbang. But with  the ESP, things are a bit more complicated. I get that the bundle code is needed to group my pairs, that is very understandable. I also now understand GPIO_MODE_INPUT_OUTPUT is the best mode. But what is still unclear, is how to change modes? It woudl seem by default mode is output and I can use
#define PIN_PULLUP(p)    asm volatile ("ee.set_bit_gpio_out %0" : : "I"(p) : );
#define PIN_PULLDOWN(p)  asm volatile ("ee.clr_bit_gpio_out %0" : : "I"(p) : );
I have tested this and it works great.  but I'm not sure how to change from input to output.  I need to swtich relatively fast. So I can not delete my bundle and remake it.  I tried modifying the REG_IO_MUX_BASE  and READ_PERI_REG registers but that didnt work. I'm just very confused how the registers work in the ESP for GPIO. There must be a simple way to change the pin to inputs and use no pullups. I was able to do this on a stm32 platform once before but documentation was a bit more available. If that does not exist is there a way to change to OD mode without rebuilding the bundle?


[tinygltf] Enable usage variants

What does your PR fix?

Enable use with RapidJSON, with Draco or without stb.
(osgearth wants to use it with RapidJSON. This shouldn't  enforce a dependency on nlohmann-json. OTOH osgearth uses a modified version which cannot be replaced easily.)
Update license information.

Which triplets are supported/not supported?

Can all features be used together?

Can all features be used together?

Used in the same unit: no. There is one definition which toggles the JSON library.
Installed at the same time: yes. It is just a header file. I only added checks to ensure that you can't use a transitive dependency without requesting the dependency (i.e. you cannot break an installed depending port, only remove it via the transitive port dependencies.)

@Adela0814 @Cheney-W This is waiting for two weeks now.

2. Don't build an implementation library

This port doesn't build an implementation library.
tinygltf:x64-windows:/include/tiny_gltf.h
tinygltf:x64-windows:/share/tinygltf/copyright
tinygltf:x64-windows:/share/tinygltf/vcpkg.spdx.json
tinygltf:x64-windows:/share/tinygltf/vcpkg_abi_info.txt

@ras0219-msft Waiting for your response.

... not requires:author-response.

don't depend on any of the json libraries, but keep json-includes.patch. Consumers will need to follow the full complex implementation details from https://github.com/syoyo/tinygltf, introducing their own dependency onto the json implementation library they want to use.

Taking this as todo. This may need extra comments in the manifest.

@ras0219 / @ras0219-msft
Based on these responses it looks like this thing is header only, and the injected #cmakedefines are only checking that if you try to consume one of the backends that that matching backend is installed.

Can all features be used together?

Used in the same unit: no. There is one definition which toggles the JSON library.
Installed at the same time: yes. It is just a header file. I only added checks to ensure that you can't use a transitive dependency without requesting the dependency (i.e. you cannot break an installed depending port, only remove it via the transitive port dependencies.)

Don't build an implementation library

This port doesn't build an implementation library.
tinygltf:x64-windows:/include/tiny_gltf.h
tinygltf:x64-windows:/share/tinygltf/copyright
tinygltf:x64-windows:/share/tinygltf/vcpkg.spdx.json
tinygltf:x64-windows:/share/tinygltf/vcpkg_abi_info.txt

It's indeed a problem that 2 consumers of this in our tree that choose different values are going to be link-incompatible but I think this meets the letter, if not the spirt, of our guidelines.

Ping for directions.

Another ping.

Bringing this to discussion on Thursday. This still has potential to cause a diamond conflict in the main catalog which suggests to me that we should go with Robert's first option of picking a "blessed" configuration and sticking with it.

IIUC:

Before this PR
After this PR

vcpkg nlohmann-json
vcpkg nlohmann-json (unchanged)

vendored RapidJSON
vcpkg rapidjson

draco by coincidence
draco feature/dep

stb by coincidence
stb feature/dep

OK @dg0yt you've convinced me at least that the problem we're concerned about is already present. (I'm pretty sure @vicroms was convinced too but don't want to put words in his mouth)
The only other thing I'd ask to consider is: is there any reason to not just pick one of the backends and say "it's that one too bad"?

The only other thing I'd ask to consider is: is there any reason to not just pick one of the backends and say "it's that one too bad"?

User's choice of the backend might actually depend on what else is required in the user's project. I don't really see why it should be appropriate to implement restrictions via port tinygltf.
IIRC this PR was triggered by an unsuccessfull attempt to devendor an embedded copy in another port. Any restriction will just mean more unsuccsessful attempts.

IIRC this PR was triggered by an unsuccessfull attempt to devendor an embedded copy in another port. Any restriction will just mean more unsuccsessful attempts.

The reason vendoring is bad is the same reason we are concerned about creating alternatives: that it results in installed trees that are impossible to safely link (and likely result in silent-bad-codegen at runtime).

If I didn't miss a symbol, all functions which depend on the JSON selection macros are either in anonymous namespace, or declared static. AFAIU this implies "internal linkage", i.e. these symbols should not escape out of single translation unit.
(There is a template function specialization which doesn't repeat the template function's extern, but it only exists for one JSON variant).

Ping

One more month.

If I didn't miss a symbol, all functions which depend on the JSON selection macros are either in anonymous namespace, or declared static.

Looking at the header https://raw.githubusercontent.com/syoyo/tinygltf/6e8a858c4567340919238c21277481f88e14044c/tiny_gltf.h, I see the following chain of symbols:
::tinygltf::TinyGLTF::WriteGltfSceneToFile(); // inline, but with external linkage (class member)
calls
::tinygltf::SerializeGltfModel(); // inline with internal linkage (static inline)
calls
::tinygltf::{anonymous}::JsonReserveArray(); // not inline, internal linkage (anonymous namespace), depends on macro settings

This presents ODR violations if any two projects use the library with different macro settings.

Pinging @dg0yt  for response. Is work still being done for this PR?

@ras0219-msft pointed to a real blocker, and I cannot remove it at the moment.
OTOH I'm afraid that the ODR problem may exist independent of this PR, due to vendored copies which cannot be removed in other ports. Preventing the combination of features while building tinygltf might be a better indication of problems than finding out at runtime.


bug(Material SCSS): [DEPRECATION WARNING] Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Reproduction
Steps to reproduce:

Upgrade angular 11 project to 12
Compile scss or run upgraded angular 12 project via serve command

Expected Behavior
/(divide) warning message should not come in console.
Related links - https://github.com/sass/sass/issues/2565
Actual Behavior
What behavior did you actually see?

Environment

Angular: 12
CDK/Material: "@angular/material": "^12.0.1",
Browser(s): NA (Issue is coming while compiling scss or serving angular 12 project)
Operating System (e.g. Windows, macOS, Ubuntu):  Windows

I have the same issue


Fix NPE - seems like a missing initialization

@jrasell Hey, there was a simple NPE bug 😃  in the most recent release causing NPEs on scale outs
func Test_BadCode(t *testing.T) {
	job := &nomad.Job{}
	deploymentConfig := &levant.DeployConfig{}
	deploymentConfig.Template.Job = job
	deploymentConfig.Deploy.ForceCount = true
}

func Test_GoodCode(t *testing.T) {
	job := &nomad.Job{}
	deploymentConfig := &levant.DeployConfig{}
	deploymentConfig.Template = &structs.TemplateConfig{Job: job}
	deploymentConfig.Deploy = &structs.DeployConfig{ForceCount: true}
}

I think this change should be merged asap. Our deploys crashed in production with:
2018-10-05T14:11:59Z |INFO| levant/scale: task group api-nomad-prod-hostnet will scale-out from 300 to 350 job_id=api-nomad
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xb72245]

goroutine 1 [running]:
github.com/jrasell/levant/scale.TriggerScalingEvent(0xc0001aeae0, 0x4)
    /home/travis/gopath/src/github.com/jrasell/levant/scale/scale.go:35 +0x455
github.com/jrasell/levant/command.(*ScaleOutCommand).Run(0xc0001b33c0, 0xc00001c070, 0x3, 0x3, 0xc0001b3100)
    /home/travis/gopath/src/github.com/jrasell/levant/command/scale_out.go:111 +0x407
github.com/jrasell/levant/vendor/github.com/mitchellh/cli.(*CLI).Run(0xc0001eba40, 0xc0001eba40, 0x7, 0xc0001b3140)
    /home/travis/gopath/src/github.com/jrasell/levant/vendor/github.com/mitchellh/cli/cli.go:255 +0x207
main.RunCustom(0xc00001c060, 0x4, 0x4, 0xc0002a7bf0, 0x0)
    /home/travis/gopath/src/github.com/jrasell/levant/main.go:62 +0x33c
main.Run(0xc00001c060, 0x4, 0x4, 0xc000086058)
    /home/travis/gopath/src/github.com/jrasell/levant/main.go:30 +0x56
main.main()
    /home/travis/gopath/src/github.com/jrasell/levant/main.go:24 +0x15d
Build step 'Execute shell' marked build as failure
Finished: FAILURE

@urjitbhatia thanks and apologies for this; i'll get a 0.2.4 release out this weekend for you!


Add support for unions in arguments and for optional arguments

Fixes #658:

Also adds Clone derives for all types in ast.rs.
Also changes WebGLRenderingContext and WebGL2RenderingContext to use mixins, and fixes support for mixins that are multiple levels deep.

This is awesome, thanks so much for the implementation here @afdw!
The names this is generating are pretty gnarly but I think that's basically fine for now.
I agree with @fitzgen though that it'd be good to have some tests in crates/webidl-tests to test the various behaviors, the code behind all this is getting pretty gnarly

Thanks for suggestions! I think have fixed the issues you listed. I have also tried to make code more readable, and I have added some tests for complex and untested logic.

I have merged latest changes:

I added a test of this kind.


Create Bubble sort Algo

Assigned Issue
#21
Have you read the Contributing Guidelines?
Yes/No
Files Affected ?
name_of_file.extension
Checklist

[ ] I've read the contribution guidelines.
[ ] I've checked the issue list before deciding what to submit.

Invalid File ⚠
Can't merge 🙅🏽


min() is broken (or just confusing)

Description
Nope.string().min(i) and Nope.number().min(i) aren't working as expected.
To Reproduce
Sandbox: https://codesandbox.io/s/intelligent-feistel-2c3wb
Expected behavior
abc should be a valid string().min(3) and 20 should be a valid number().min(20).
Documentation states:

min(length: number, message: string) - Asserts if the entry is smaller than a threshold

It seems that min() currently asserts if the entry is smaller than or equal to a threshold.
Environment
Chrome, nope-validator 0.8.1

I see now from the tests that this is expected behaviour. My humble suggestion would be to change this to avoid confusion. I'd be happy to do it myself and submit a pull request 😄
Otherwise, perhaps change the method name from min() to something like gte() (greater than or equal)?

Hi @xddz9 !
Sorry for the late response. Yes, you are right! This is wrong and should be fixed
If you are willing, I'd love if you would open up a pull request for this! Also, I'd also like to keep the min and max methods but only as aliases for greaterThan and lessThan for backward compatibility

Got it, @bvego, I'll work on a PR!

Awesome, thank you! 😄

Fixed by #46
Thank you @xddz9 ! 🎉
If you have any other suggestions for anything in the project feel free to open up an issue for it!
Closing this up and releasing soon!


Link to this repo on plus.codes is incorrect

Links to gthub_.org_. Should be .com. I don't see that code in this repo, but would be nice if the owner of the demo site could fix that link.

NOT corrected yet. Link in plus.codes Help sidebar is https://plus.codes/github.com/google/open-location-code, goes nowhere. Should be https://github.com/google/open-location-code

Good catch, obviously I fixed .org and broke the link entirely. Should be ok now.


I have found an issue that the button does not respond after adding a scheme.

I have found an issue that the button does not respond after adding a scheme.
When I click the button[Generate SQL], the page does not respond.

@wuliqq provide please all the input data. any errors in the colsole?

Hey @whoiskatrin if you can explain me more about the issue here then I would love to resolve it. Right now it not much of understandable what exactly the issue is.

@wuliqq provide please all the input data. any errors in the console?

But I don't know why. I also tried https://www.sqltranslate.app/ and the same issue occurred.


Azure-less scenario

I am considering running SignService as a part of local organization infrastructure (instead of Azure cloud) with PKCS#11 compatible key store (instead of Azure KeyVault) and LDAP compatible directory (instead of Azure AD). Would you be interested in supporting such scenario?

Hi @jariq,
There are really two issues here, so lets split them out:

Alternate authentication from Azure AD. Certainly possible. The question would be around making the configuration really simple while maintaining security.

Alternate key store. This gets tricky. The service was originally written to use the built-in CNG providers, so if you had a certificate in the local cert store (even if backed by an HSM), it'd work. I removed that in favor of Key Vault as most people don't have custom CNG implementations and the goal here was to make it easy while being secure. If everything you need is available via CNG, then it could be possible to bring back that support, but I hesitate to make it "too easy" for people just to put a code-signing certificate on their web server without a hardware device present.

I'm curious as to the goal here, what is it you're trying to achieve? Even an on-prem server can access Key Vault. A code signing service cannot truly be disconnected from the internet since it must be able to reach timestamp servers as well. Key Vault's HSM is very inexpensive for this use case ($1/mo for a hardware key, and this use pattern won't incur much in the way of per-operation costs).
As soon as you have Key Vault, then you do need AAD in the picture for security. An upcoming feature I'm working on is using the on-behalf-of flow to ensure that the Key Vault is secured to require the incoming user principal + service principal, so that someone operating the service alone cannot access the keys.

I'm curious as to the goal here, what is it you're trying to achieve?

My code signing certificate and private key are both stored on a smartcard and I need to share them with multiple systems and user accounts.
Card comes with minidriver and PKCS#11 library. I've tested it via CSP and PKCS#11 APIs but after reading your answer I'll check whether it can be used via CNG API.

A code signing service cannot truly be disconnected from the internet since it must be able to reach timestamp servers as well. Key Vault's HSM is very inexpensive for this use case...

Internet connectivity and costs do not really pose a problem in this case. Some people/orgs simply prefer to keep their keys within their physical reach.

I'm going to close this for now since the current design is very heavily tied to Azure.
Thanks


[FLINK-17016][runtime] Integrate pipelined region scheduling

What is the purpose of the change
This PR is to integrate pipelined region scheduling with DefaultScheduler.
A new config option "jobmanager.scheduler.scheduling-strategy" is introduced to control whether to use the new "region" scheduling or to use the "legacy" eager/lazy-from-sources scheduling.
This change is based on #13181 and #13321
Brief change log

Change scheduling strategy for ScheduleMode.LAZY_FROM_SOURCES_WITH_BATCH_SLOT_REQUEST
Fix breaking tests due to insufficient slots

Verifying this change

Added integration tests

Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (yes / no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
The serializers: (yes / no / don't know)
The runtime per-record code paths (performance sensitive): (yes / no / don't know)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / no / don't know)
The S3 file system connector: (yes / no / don't know)

Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

The failed e2e test "Elasticsearch (v6.3.1) sink" is a known issue FLINK-19093 which is unrelated to this change.
Re-run the tests.

@flinkbot run azure

The commits to "enabled pipelined region scheduling by default" are dropped.
Will enable pipelined region scheduling by default in a separate task FLINK-19189, after we have verified the new scheduling is working well.

Thanks for reviewing! @azagrebin
Merging.


The "read the docs" link on the wiki is broken

Describe the bug
When opening the wiki and following the read the docs link the server can't be found
To Reproduce
Steps to reproduce the behavior:

Open the wiki
Follow the link check it

Expected behavior
I expected to bask in the glory of wonderful documentation
Environment (please complete the following information):

Mozilla Firefox 90.0.2 (64-bit)

Additional context
The read the docs link references "formality". Is this an older name for Kind?

Indeed we haven't touched the wiki in a while 🙂
That's correct Kind used to be called Formality, which feels too austere, the name changed to make it more friendly. What topics would you like to be better documented?

The README is doing a great job of introducing people to various topics. I just wanted to learn more about Kind in general. So I was poking around to see how things work around here.


readme: update with the new way of building the backend

@unipheas: I integrated some of your suggestions. Feel free to open a PR in this repo if you think something is unclear!
@xvzf: FYI, the backend now uses cmake only

All works on my system starting from scratch!!


Implement Random

Feature for #273.
Still need to add Random.range() and Random.select(), but that will be done fairly quickly.
Dictu tests are also added.
There is also a FIXME in here where I'm unsure how to surpress -Werror for not using a function parameter. I don't see any examples in the already existing code so I'm unsure how to cleanly get around this.

Suppression of the "Unused parameter" error is done via the UNUSED macro. You can see an example here: https://github.com/dictu-lang/Dictu/blob/511f268309d2e770bcefa8dade7c32efbd9f3833/c/optionals/system.c#L4
I can't test it, but simply replacing args = args; with UNUSED(args); should work.

Appreciate you taking the time to do this work @SeanMcLoughlin! A couple of things to note / comment. The implementation you're using here (libc's rand) comparatively speaking is actually quite a slow algorithm, it may be worth (probably in the future) looking at other viable algorithms, such as (Mersenne Twister)[https://en.wikipedia.org/wiki/Mersenne_Twister], or one of the XOrShift family variants.
With all that being said, i'm happy to implement the libc variant for now, and we can swap out the internal algorithm at a later date, as long as we can ensure that the Dictu API stays the same 😄.
Some notes about the PR:

I noticed i don't see a call to srand to seed the PRNG, i think a good place for this would be here
Random.random() returns either 0 or 1, should this return a float between 0 or 1, or only 0 or 1. A design decision i'm open to
We need to add some documentation for the new module and methods before this gets merged in

Outside of these points though, I'm happy you seemed to pickup the internals of the interpreter pretty quickly and was able to add this new builtin module! Thank you!

A note about the above changes: The PRNG is seeded with time(NULL). This doesn't generate a proper distribution but, unless Random is needed for things like cryptography right now, this should hopefully suffice.

That's fine, we shouldn't be using this for cryptography, i've added a note about that in the documentation. Thanks for updating the PR!


Query execution confirmation not shown when running a highlighted part of a query

For production connections (or another connection type that has the "Confirm SQL execution" option enabled), I am not prompted to confirm execution when running a highlighted part of a larger query.
For example, running the following query will prompt for confirmation:
INSERT INTO foo.some_table
SELECT * FROM bar.some_table WHERE uniqid = 123;

But by selecting only the second line with the caret (SELECT * FROM bar.some_table WHERE uniqid = 123;) and executing, that part will be executed immediately without prompting.
The same is true for other queries, e.g.:
SELECT * FROM foo.some_table WHERE uniqid = 123
UNION ALL
SELECT * FROM bar.some_table WHERE uniqid = 123;

Executing the whole text will prompt for confirmation, but highlighting and executing either of the select statements on their own will not.
In both of these examples, the prompt does appear if you highlight the whole text, so it doesn't seem as simple as the confirmation behaviour always being skipped when executing a highlighted statement.

DBeaver shows query confirmation for any non-SELECT query.
All DML, DDL or complex  queries (e.g. with unions) are executed without confirmation. Does this bring any problems?


Where to find Azure AD metadata file?

In the section Configuring Azure AD as SAML Metadata Provider", step 5 tells us to "Upload the downloaded metadata XML file from Azure portal into the Azure AD metadata file".
But where does this downloaded metadata XML file come from? This is not mentioned anywhere else in the tutorial. Is there a step missing?
UPDATE - OK, perhaps obvious, but I found where this xml file can be downloaded from.
In the Azure Portal, Enterprise Apps, Pulse Secure PCS, SAML-based Sign-on, Step 3 - SAML Signing Certificate
There's a link to download the "Federation Metadata XML", this file seems to work.
Thanks,

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

ID: 6b912673-6f7b-881b-cd6a-9435019cef79
Version Independent ID: 6b66e430-db5e-0d3e-a74f-3097af84c4e0
Content: Tutorial: Azure Active Directory single sign-on (SSO) integration with Pulse Secure PCS
Content Source: articles/active-directory/saas-apps/pulse-secure-pcs-tutorial.md
Service: active-directory
Sub-service: saas-app-tutorial
GitHub Login: @jeevansd
Microsoft Alias: jeedes

@Simon999
Thank you for the question and update! I'm glad that you were able to resolve your issue and find the XML file to download. I'll go ahead and close out your issue.
Thank you for your time and patience throughout this issue.


Adding cost types ADD_KEY, CREATE_ACCOUNT and DEPLOY_CONTRACT

Related with #15
ADD_KEY is related with the action "add_full_access_key", CREATE_ACCOUNT with "create_account" and DEPLOY_CONTRACT with "deploy_contract"

Thank you Joaquin


Fix defer with router tests

Sometimes, but not always, localhost can't be resolved by node - I don't know why.
This only happens with a recent version of node (recently changed by this change), and I could only reproduce with the defer with router tests, but not with the other tests which also use localhost from MockServer.url() - but I changed it there too just in case, and to please the nodejs gods.

This is peculiar 🤔 . Does not give any extra reason why localhost does not work? DNS, route, timeout, anything else?
If needed we can re-introduce the old nodejs version.

Yeah it is very odd. I see this in node's logs:
NET 99031: connect: find host localhost
NET 99031: connect: dns options { family: undefined, hints: 1024 }
HTTP 99031: sockets localhost:4002: 1 1
HTTP 99031: write ret = true
HTTP 99031: outgoing message end.
(node:99031) Warning: Setting the NODE_DEBUG environment variable to 'http' can expose sensitive data (such as passwords, tokens and authentication headers) in the resulting log.
(Use `node --trace-warnings ...` to show where the warning was created)
NET 99031: _read
NET 99031: _read wait for connection
NET 99031: afterConnect
NET 99031: destroy
NET 99031: close
NET 99031: close handle
HTTP 99031: SOCKET ERROR: connect ECONNREFUSED ::1:4002 Error: connect ECONNREFUSED ::1:4002
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)

Actually maybe I misinterpreted it, could it be a IPv6 issue instead?

Actually maybe I misinterpreted it, could it be a IPv6 issue instead?

Looks like it. In that case forcing IPv4 is the good fix 👍


32-bit BMP with mask renders blank

Sometimes 32-bit BMP images include a mask.
This mask is currently discarded in favour of the fourth byte in the RGBQuad structure for 32-bit BMP images.
For these images, if the alpha bit is zero, the icon does not render.

Fixed. Now all BMP files have a mask whose size is properly calculated.
Masks are combined with any alpha channels present.
It also seems that Windows ignores entirely transparent alpha channels in 32-bit bitmaps.


Better error messages for DryRunInspector.from_single_response()

First Real Unit Test
@algoidurovic pointed out the following confusing error that he encountered while using graviton for a test (cv. this pyteal commit):

require exactly 1 dry run transaction to create a singleton but had 0 instead

This PR will first check the existence of "error" in the dry-run response, and pass that through when encountered.
 If so, what was the error message?

 If so, what was the error message?

I ran the commit of pyteal referenced above, capturing this dryrun response that I then created the unit test out of.

LGTM


Migrate Consultation Response Forms to Asset Manager

These are the forms added to consultations, for example this response form linked to under "Complete a response form" on this Heathrow expansion consultation.

[x] Change ConsultationResponseFormUploader to use :asset_manager_and_quarantined_file_storage storage engine (send uploads to Asset Manager as well as save on NFS)
[x] Migrate existing consultation response forms under system/uploads/consultation_response_form_data/file to Asset Manager
[ ] Ensure consultation response forms are served on assets.publishing instead of gov.uk
[ ] Redirect consultation response forms from gov.uk to assets.publishing

https://github.com/alphagov/govuk-puppet/pull/6890

[ ] Change nginx to serve requests to these paths from Asset Manager rather than Whitehall
[ ] Change ConsultationResponseFormUploader to use :asset_manager storage engine (stop saving new uploads to NFS)
[ ] Delete existing data from NFS

@emmabeynon ran the rake task asset_manager:migrate_assets[system/uploads/consultation_response_form_data/file/] against production today (2017-11-13T15:38:47.537272). We observed that 732 assets were enqueued in Whitehall on the asset-migration queue. The queue was empty by 15:40.

I've opened https://github.com/alphagov/govuk-puppet/pull/6776 to make the change to nginx to serve these assets from Asset Manager.

I've just been looking at merging but, while doing so, have noticed that consultation response forms appear to be served from gov.uk instead of assets.publishing. I'm going to investigate that further as it might mean we have some other changes to make before we can merge the nginx changes.

I've opened https://github.com/alphagov/govuk-puppet/pull/6890 so that we pass the host (gov.uk or assets.publishing.service.gov.uk) to Whitehall. This will allow us to redirect requests for assets that are made to gov.uk.

@danielroseman has suggested that we should be able to add this redirect (from www.gov.uk to assets.publishing.service.gov.uk) in the router so I'm going to investigate that instead of doing it in Whitehall.
For reference, my unfinished implementation of this in Whitehall is in https://github.com/alphagov/whitehall/tree/redirect-asset-requests-to-asset-host.

I've created issue #348 to capture the work required to redirect assets to the asset host.

I've opened https://github.com/alphagov/whitehall/pull/3634 to use the asset host in the links to consultation response forms that we save to the Content Store.

https://github.com/alphagov/whitehall/pull/3634 has been deployed to production which means that we're now using the asset host when storing links to the consultation response forms in the Content Store.

The redirection of assets to the asset host has now been merged to production (see issue #348 for more info).

I tried to merge https://github.com/alphagov/govuk-puppet/pull/6776 to serve consultation response forms from Asset Manager but ran into a discrepancy in the number of assets on the Whitehall filesystem versus Asset Manager database. I've added a comment to that PR and have created #368 to prompt us to address the discrepancy.


PHP Built In Functions Highlight Bug

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: 1.66.0
OS Version: Windows_NT x64 10.0.19043

Steps to Reproduce:

Add The Color Customization In VSC Configurations:

    "editor.tokenColorCustomizations": {
        "variables": {
            "foreground": "#bf72e6",
        }
    },

Create This Simple Class:

<?php

namespace Project\Src;

class Test
{
    public function test()
    {
        $Int = 0;

        return boolval($Int);
    }
}

The Syntax Highlight In boolval($Int) Will Be Incorrect.
The Dolar Sign ($) Will Be In White

This seems to be specific to the theme you are using. When I try the same in the default theme I see the correct behavior. You can try using Developer: Inspect Editor Tokens and Scopes to see if a different color is being applied to the $.


Ensure that Filesystem.destroy() is always called

libfuse uses the same workaround of calling .destroy() if the kernel
never delivers the DESTROY message
Fixes #153

This is also a breaking API change to destroy, right? Can't you manufacture a Request instead?

This is also a breaking API change to destroy, right? Can't you manufacture a Request instead?

It is yes, but updating should be easy for people. I don't like the idea of manufacturing a request, because there would be no way to tell whether the data in the request was real then

That's fine. Maybe note it in your changelog as well.


Events Table: Allow selecting which columns are visible

Solved by https://github.com/eclipse-cdt-cloud/theia-trace-extension/pull/734


Official stance on comments in appsettings.json

Given that comments work in appsettings.json and it's a pretty common question too, it would be useful to clarify the official stance on this page.
One very helpful possibility would be to instruct how to configure the JSON configuration provider to explicitly support comments.

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

ID: 0eb4d762-3910-2c57-8741-3306c15537b6
Version Independent ID: ba2254a0-ea8e-9b28-e94b-edd0fc58c043
Content: Configuration in ASP.NET Core
Content Source: aspnetcore/fundamentals/configuration/index.md
Product: aspnet-core
Technology: aspnetcore-fundamentals
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Associated WorkItem - 33225

Comments are intentionally allowed in appsettings.json. You can add that to the docs.

What are the rules for use so that the parser doesn't choke?

Must they be on their own line? ... or can they appear at the ends of lines, too?
Is /* ... */ syntax also supported? ... or only //?
Should they avoid JSON delimiters (e.g., {, }, [, ], /)? ... or any other chars?

JSON comments behave like JS (or C#). Both styles are supported.
https://www.w3schools.com/js/js_comments.asp

Comments are intentionally allowed in appsettings.json. You can add that to the docs.

BTW... to get Visual Studio Code to stop complaining, do this: https://stackoverflow.com/questions/47834825/in-vs-code-disable-error-comments-are-not-permitted-in-json/47834826#47834826

Another option is to rename your appsettings.json to appsettings.jsonc (and your environment specific config files as well, so appsettings.Development.json becomes appsettings.Development.jsonc, and so on).
Then add this near the top of Program.cs:
var builder = WebApplication.CreateBuilder(args);
IHostEnvironment env = builder.Environment;

builder.Configuration
    .AddJsonFile("appsettings.jsonc", true, true)
    .AddJsonFile($"appsettings.{env.EnvironmentName}.jsonc", true, true);

Then right click on each appsettings file and make sure to set Copy to output directory to Copy if newer, as otherwise these files no longer automatically get copied if you change the extension.
Now you can add comments to all of your jsonc files, and not have to instruct other developers to change their editor settings to get the file to show up without syntax highlighting errors.


Reduce Cannot decrypt cookie value, create a new fresh session error in terminal

Cannot decrypt cookie value, create a new fresh session is caused by the browser trying to connect the new server, but new server has a new key for encryption.
Please solve it.

fixed

Well, is still happening. already reinstalled the node, delete the login folder and deleted the .secret-key.txt and restarted the service

I guess this happens because the server has been restarted and expecting a new secret key, but the client (the browser) still in the old session, and using the old secret key. If this is true, pressing Ctrl+F5 in browser can stop this issue. Would you like to try?

I guess this happens because the server has been restarted and expecting a new secret key, but the client (the browser) still in the old session, and using the old secret key. If this is true, pressing Ctrl+F5 in browser can stop this issue. Would you like to try?

But I use comfyui in pure server api mode, there is no way to use browser to refresh it...


[Bug]: absl/time tests fail in Bazel when Abseil is an external dep

Describe the issue
If you include Abseil as a dependency in your Bazel WORKSPACE and attempt to run its tests, you will get failures in the following:
@com_google_absl//absl/time:time_test
@com_google_absl//absl/time/internal/cctz:time_zone_format_test
@com_google_absl//absl/time/internal/cctz:time_zone_lookup_test

The root cause is that the build targets for these tests specify,
env = {"TZDIR": "absl/time/internal/cctz/testdata/zoneinfo"}

E.g., see here for time_test. If I remove this line from the BUILD file, the test passes. The problem seems to be that absl/time/internal/cctz/testdata/zoneinfo is a relative path, and only correct if it's interpreted as relative to the abseil repository root.
See also discussion at https://github.com/bazelembedded/rules_cc_toolchain/pull/45#issuecomment-1413028774 and following.
Steps to reproduce the problem
See description.
What version of Abseil are you using?
Abseil LTS 20230125
What operating system and version are you using?
Debian GNU/Linux rodete
What compiler and version are you using?
Debian clang version 14.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/10
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
What build system are you using?
bazel 6.0.0
Additional context
No response

A suggested fix (from https://github.com/bazelembedded/rules_cc_toolchain/pull/45#issuecomment-1414169360) was to set,
env = {"TZDIR": "$(rootpath //absl/time/internal/cctz:zoneinfo)"},

But this doesn't quite work because the filegroup includes many files, and we want the directory containing them all:
ERROR: [snip]/external/com_google_absl/absl/time/BUILD.bazel:74:8: in cc_test rule @com_google_absl//absl/time:time_test: label '@com_google_absl//absl/time/internal/cctz:zoneinfo' in $(location) expression expands to more than one file, please use $(locations @com_google_absl//absl/time/internal/cctz:zoneinfo) instead.  Files (at most 5 shown) are: [external/com_google_absl/absl/time/internal/cctz/testdata/zoneinfo/Africa/Abidjan, external/com_google_absl/absl/time/internal/cctz/testdata/zoneinfo/Africa/Accra, external/com_google_absl/absl/time/internal/cctz/testdata/zoneinfo/Africa/Addis_Ababa, external/com_google_absl/absl/time/internal/cctz/testdata/zoneinfo/Africa/Algiers, external/com_google_absl/absl/time/internal/cctz/testdata/zoneinfo/Africa/Asmara


Added word to pdf functionality

Resolved issue #7
The code here converts word to html and then finally html to pdf. This pdf is then saved to local system on user action.
The HTML and JS files are present under Word-to-Pdf folder.
Walkthrough:

Sample Input Word doc:
Google LLC.docx
Converted Pdf using our website:
myfile (13).pdf

The css file required for word-to-pdf conversion has been separated from html file.

First of all host your website on your github and give the link. So that we can verify weather its working or not. and also make the changes as per the new file structure. And match the theme with the home bage and for any dout contact us on Discord

@Abirpal202049, would surely do that but I asked the project admin, he said to add just the functionality for now. After this pr is accepted, create another issue to update the theme and there work for the theme.

@udith51 Just do one thing put your index.html file outside the Word-to-Pdf folder and link that for any dout feel free to contact

Its working fine, just link nav file and move the functions buttons to centre @udith51

@shivshankar9 , Thanks!
I have linked it to our main page and centered the content. You may check now!

@shivshankar9 , Thanks!
I have linked it to our main page and centered the content. You may check now!

@Abirpal202049, Sorry but I couldn't get you. Like if I put my index.html outside Word-to-Pdf, won't it be a conflict with the file structure because what I initially perceived the idea of our file structure is that for each functionality we have different folder, and we link it with main page(present at /root). Doc-to-Word conversion being a functionality, I added it inside a folder.
I am new to Open Source. So it would be a ton of help if you could guide me here🥲😅

@Abirpal202049, Sorry but I couldn't get you. Like if I put my index.html outside Word-to-Pdf, won't it be a conflict with the file structure because what I initially perceived the idea of our file structure is that for each functionality we have different folder, and we link it with main page(present at /root). Doc-to-Word conversion being a functionality, I added it inside a folder.
I am new to Open Source. So it would be a ton of help if you could guide me here🥲😅

@udith51 Can you provide deployed GitHub page link

@udith51 Can you provide deployed GitHub page link

@Abirpal202049 since you asked for the link, I have hosted it and here it is: https://udith51.github.io/Student-portal/Word-to-Pdf/index.html so that you may verify the functionality.
You may also check it through https://udith51.github.io/Student-portal and then click on Document to Pdf button.
Thanks!

@Abirpal202049 since you asked for the link, I have hosted it and here it is: https://udith51.github.io/Student-portal/Word-to-Pdf/index.html so that you may verify the functionality.
You may also check it through https://udith51.github.io/Student-portal and then click on Document to Pdf button.
Thanks!

@shivshankar9 Here it is: https://udith51.github.io/Student-portal/Word-to-Pdf/index.html

@shivshankar9 Here it is: https://udith51.github.io/Student-portal/Word-to-Pdf/index.html

Ui improvements needed,

Ui improvements needed,

Hey @shivshankar9, after closing this issue we can create another one for Ui to sync with main page theme.
https://github.com/shivshankar9/Student-portal/issues/7#issuecomment-998984694
https://github.com/shivshankar9/Student-portal/issues/7#issuecomment-999438973
What say?

Then let's merge this PR and create another issue for improving thr UI

Yeah, that would be great! @Abirpal202049


Browser compatibility

Hello @AustinGil,
I had the bad surprise to see CSS was updated for most of the components to reduce selector complexity https://github.com/AustinGil/vuetensils/commit/57ecaff46d0f44af884de905e07a9f62f77959d3#diff-d39665efaa43781ea98cfffcba7155f8d8b0a9f93443bcf6ee6ca21b2fc85762
The support of this :where feature (inset: 0 too) is very recent 2021 at most, it breaks in most navigation.
I'm pretty sure I'm not the only one to support browsers older than 1 year ago.
Would it be possible to rollback this feature or enable it based on browserlist for instance, what do you think?

Oh dang. Yeah, I do think browser compatibility is important. I based the decision on caniuse
https://caniuse.com/mdn-css_selectors_where
https://caniuse.com/mdn-css_properties_inset
Do you mind sharing the details of your system so I can double-check it? https://www.whatsmybrowser.org/
For now, you can stick to a previous version until I sort out a good approach forward :)
(Also, curious if you might share what projects you're using Vuetensils on?)

Thanks for the fast reply as always :-)
Here is the browserlist I'm using based on my client requirements:
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not dead",
    "not ie 11",
    "Chrome >= 81",
    "Edge >= 81",
    "ChromeAndroid >= 81",
    "Firefox >= 75",
    "FirefoxAndroid >= 68.7",
    "Safari >= 13.1",
    "iOS >= 13.1",
    "Samsung >= 11.1",
    "Opera >= 68"
  ]

Basically, iOS is often the bottleneck because Safari version is coupled with the OS version. I is not rare to have iOS13 for instance.
The problem is if :where is not available, the whole selector is being ignored and there is in the end no CSS applied on Vuetensils component for browsers < 2021.
I'm unfortunately not allowed to share the work, but I can give you the stack we are using:

Adobe Experience Manager monolith approach, DOM generated by the Backend.
VueJs on the frontend with 1 Vue application per component as components can be added, edited, or removed dynamically from the page by an author.
I'm using VDrawer, VToggle (I had to fork it), VAlert. I'm also considering "Try" which looks really great for async calls.

Yeah, that makes sense. Ugh, too bad because :where makes the specificity of the library so much better to deal with.
Why did you have to fork VToggle? I do try to make them easily forkable, so that's cool. VTry is pretty basic, but you should really checkout VAsync for async stuff. It's one of my favorites :) I'd like to figure out a composable for it as well, but the API is hard to get right.

Mostly at first because the Vue 3 version was not ready yet at the time. Then my project is in Typescript so I had to rework the component, and then I started to tweak it here and there (close on click outside, close on escape key, etc). Eventually, I tweaked too much the component to replace it back with yours when Vue 3 version was released 😅.

Cool. Well if any of it makes sense for to add to Vuetensils, let me know, or feel free to submit a PR.

Cool. Well if any of it makes sense for to add to Vuetensils, let me know, or feel free to submit a PR.

Just published a new version without :where


Docker compose doesn't work with begriffs/postgrest:latest

... but does work with begriffs/postgrest:v<IP_ADDRESS>
To reproduce, clone the repo to the latest master, navigate to /docker/ then run:
$ docker-compose up
Visiting localhost:3000 you'll see:
{
    "details":"could not connect to server: No such file or directory\n\tIs the server running locally and accepting\n\tconnections on Unix domain socket \"/var/run/postgresql/.s.PGSQL.5432\"?\n",
    "code":"","message":"Connection error"
}

By changing the image used in the docker-compose.yml file to begriffs/postgrest:v<IP_ADDRESS> I was able to get it up and running.
Tony

try the second time with 4.0, i bet it will fail

I'm not sure if this is the same issue or not, but the one of the problems I faced was that postgrest would run before postgres had started accepting connections. The solution was to wrap postgrest in a script that checks for postgres being up before running postgrest.

Yes, it's that. And there is a new PR now to fix this :)

Quick fix for this is to just add restart: always to the container

<IP_ADDRESS> will have the fix in it that will retry the connection as needed.

Is there a flag in the docker-compose file I should be using to enable this retry behavior? I've upgraded to using <IP_ADDRESS>, but Postgrest continues to exit after failing to connect after the first try.

The connection retrying functionality is on the master branch but as yet unreleased in a new version.

Yes. Add restart: always in the compose file like here

this auto reconnect feature was implemented and is in 4.2 already i think.


Export permission criteria utilities

Hey, I just made a Pull Request!
Just exporting a few utility functions useful for plugin authors for creating permission filters.

:heavy_check_mark: Checklist

[x] A changeset describing the change and affected packages. (more info)
[x] Added or updated documentation
[ ] Tests for new functionality and regression tests for bug fixes
[ ] Screenshots attached (for UI changes)
[x] All your commits have a Signed-off-by line in the message. (more info)

Sorry if I missed the context - can we include the use case in the PR too? Or is that coming up?

Sorry if I missed the context - can we include the use case in the PR too? Or is that coming up?

the use case is going to be included in the permission docs for plugin authors :)


Issue 1555 - Reporting for files that have split

Make sure you have checked all steps below.
Issue

[x] My PR addresses the following issues and references them in the PR title. For example, "Issue 1234 - My Sleeper
PR"

Resolves https://github.com/gchq/sleeper/issues/1555

Tests

[x] My PR adds the following tests OR does not need testing for this extremely good reason:

FilesStatusReportTest
PartitionStatusReportTest

Documentation

[x] In case of new functionality, my PR adds documentation that describes how to use it, or I have linked to a
separate issue for that below.
[x] If I have added, removed, or updated any external dependencies used in the project, I have updated the
NOTICES file to reflect this.

We can avoid merging this until we're ready to merge the parent issue:

https://github.com/gchq/sleeper/issues/1365

This should have been auto-closed when https://github.com/gchq/sleeper/pull/1588 was merged, as all this PR's commits were included in that merge. Closing.


car docs: better hardware footnotes

@maxime-desroches can you think of a better place for these, or fix the formatting?

Unclear what this issue is for. Seems fine to me.

it's for the inconsistent superscript link, but I agree it's very minor. not worth the additional 40 lines to fix at the moment


feat(dotnet): [JsiiOptional] attribute on properties that are optionals + Roslyn Analyzer

On properties that are optionals, we now add a [JsiiOptional] attribute.
Ex:

[JsiiProperty(name: "optional1", typeJson: "{\"primitive\":\"string\"}", isOptional: true, isOverride: true)]
[System.Obsolete()]
[JsiiOptional]
public string Optional1
{
        get;
        set;
}

Also, This introduces a new package which needs to be pushed to NuGet: Amazon.Jsii.Analyzers.
It includes a Roslyn Analyzer which makes sure that inside nested props object initializations, all required properties are passed by the developer, and are not passed as null (syntax check only).
Example in Rider with a required property not passed:

Whit a required property passed with a null value:

With the required property correctly passed:

The idea here is to check inline initialization of data types within jsii classes.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Made some changes on the analyzer rules following our meeting this morning.
See the Unit tests comments for some background :-)

Travis build is blocked due to a transient issue:
Error downloading packages:
geronimo-jms-1.1.1-19.amzn2.noarch: [Errno 256] No more mirrors to try.

[SuppressMessage("Usage", "JSII001")] is probably not quite what you want. Should we make it "Amazon.JSII" as the category?

It looks correct to me:
https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.codeanalysis.suppressmessageattribute.-ctor?view=netframework-4.8#System_Diagnostics_CodeAnalysis_SuppressMessageAttribute__ctor_System_String_System_String_


runtime(man): UX fixes

Two minor improvements to manpage support that seem to do the right thing for me.
Note that I'm fairly new to Vim{,script}, so please do not kick me too hard if any of these changes are bogus.

Honor placement (vert/hor/tab) cmd modifiers to :Man, if any are present, before g:ft_man_open_mode.
This way, e.g. :vert Man does the expected thing even in presence of a contradicting g:ft_man_open_mode.

Actually add parentheses to iskeyword= so that K on a man page reference considers its section (if present).
The comment suggests that the parentheses were added to the iskeyword set elsewhere, but I could not find it in the code (and, indeed, it did not work in practice).

What manual page issue are you currently having that can be
solved by including (,) in &iskeyword script-wide?
The reason for chucking out parentheses at 8cfe52 was that
having them included or not is immaterial for parsing str:
https://github.com/vim/vim/blob/88bbdb04c2776ba69b8e5da58051fd94f8842b03/runtime/autoload/dist/man.vim#L72-L77

I can reproduce the faulty behaviour (v9.1.0516).
For example, initially read signal(2) and later fail to
read signal(7)with K (when &kp is set to :Man):
MANWIDTH=80 VIMRUNTIME=/path/to/fork/dir/runtime \
vim --clean --not-a-term \
  '+set vif=NONE' \
  '+sil! unmap K' \
  '+doautoall FileType setl ft=man kp=:Man nofen' \
  '+Man 2 signal' \
  '+/signal(7)' \
  '+norm f7BK'

However, finding a page should work whenever the sought page
is locally installed in only one section directory and its
name matches the referenced section number (e.g. full(4)).
It appears that parentheses had exclusively been used for
fetching <cword> ever since vim-6-0k (Oct. 2000) and until
recently, when at f269ea (see #11244) similar changes were
applied, but summarily dismissed at 71badf with a comment
referencing dist#man#PreGetPage().
And you don't get to see signal(7) anyway with the proposed
changes for the above Vim command, because any  parenthesis
now belongs to \k, so K would try looking for signal(7))
(note the extra closing parenthesis).  Also, with K you
can't follow a reference that terminates in a hyphen-minus
or a hyphen; that is, split between two lines.
Anyway, you need to run the changes by the maintainers:
@goweol, @lifecrisis.

I expect the modifiers support would be welcome, but the parentheses bit seems controversial.

Further observations.
The current execution of K (setl kp=:Man) is aligned with
the Man command invocation when the latter does not take any
section number, e.g. :Man signal, either would pick the same
page; and [count]K is aligned with :Man [section] [page],
e.g. 7K and :Man 7 signal.
Indefinitely adding (,) to &isk would break this symmetry
by rendering K more capable than :Man [page], and it would
also neither make K work nor \K nor C-] to boot on some
references that contain a \k character after the closing
parenthesis, e.g. signal(7)) , signal(7).).  If accepted,
this line should also be adapted:
https://github.com/vim/vim/blob/88bbdb04c2776ba69b8e5da58051fd94f8842b03/runtime/autoload/dist/man.vim#L74

thanks. As mentioned by others, can you please drop the iskeyword setting? That seems too controversial. I haven't heard from the maintainers in a long time, so I am fine with including the command modifier changes here.