text:
Foreign keys that don't reference foreign table primary key

Just ran into the following issue with relations which the foreign key does not target the foreign table primary key.
Consider the use case below where schema is the actual knex script to build each model's table:
const LocaleModel = bookshelf.Model.extend({
  tableName: 'Locale',
  translations() {
    return this.hasMany(TranslationModel, 'locale');
  }
}, {
  schema(table) {
    table.uuid('id').primary();
    table.string('isoCode').notNullable().unique();
  }
}

const TranslationModel = bookshelf.Model.extend({
  tableName: 'Translation'
}, {
  schema(table) {
    table.uuid('id').primary();
    table.string('locale').notNullable().references('Locale.isoCode');
  }
}

Running the following fetch call, I expect to get all related translations of the forged locale:
await LocaleModel.forge({ isoCode: 'en' }).fetch({ withRelated: 'translations' });

Since relation methods assume the foreign key is targeting the primary key (idAttribute) of the foreign table, the executed query to fetch related translations is:
select "Translation".* from "Translation" where "Translation"."locale" in ('7c8c8bff-e21e-492c-86a5-ab90d4ada13a')

This query should be using isoCode instead of id as criteria, but hasMany relation method does not know what column the foreign key references, always assuming its id attribute.
So I suggesting adding an extra parameter to most of relation methods, for example foreignKeyTarget or foreignKeyColumnTarget, that when provided will be used as "where" criteria instead of idAttribute. For example:
const LocaleModel = bookshelf.Model.extend({
  tableName: 'Locale',
  translations() {
    return this.hasMany(TranslationModel, 'locale', 'isoCode');
  }
}

The following fetch:
await LocaleModel.forge({ isoCode: 'en' }).fetch({ withRelated: 'translations' });

Would translate into:
select "Translation".* from "Translation" where "Translation"."locale" in ('en')

Adding an extra parameter will not introduce breaking changes since it will be optional, just like foreignKey.
This is not a common use case, but since it's a valid SQL schema I think that Bookshelf should support such scenarios. I volunteer to implement this feature, but i would like to have some feedback on this issue first.

@tgriesser @rhys-vdw @vellotis @ricardograca Any thoughts on this?

+1 I'm having  this issue right now too

authors: TMcLoone ricardogama

repo: tgriesser/bookshelf


text:
Insert not being called

Hi, not really a bug report but I'm stuck trying to figure this out. I have the following code which I posted on StackOverFlow:
return Knex.transaction(function (tx) {
        debug("Inserting new story record");
        return tx.insert({
            'projectId':projectId,
            'title': title,
            'story': text,
            'points': 0,
            'storyNumber': Knex('story').max('storyNumber').where('projectId', projectId)
        }, 'id')
            .into('story')
            .then(function (id) {
                debug("Returning story for %s", id);
                return getStory(id);
            })
    })

The problem is that the 'then()' function is never called.
I've been reading all the knex doco and it appears that I've done everything right. The debug for the command looked like this:
crux:db Inserting new story record +4ms
{ method: 'insert',
  options: {},
  timeout: false,
  cancelOnTimeout: false,
  bindings: [ 0, 2, 'test', 2, 'title' ],
  __knexQueryUid: 'aa5ff1d3-eff0-4687-864b-772c26e1aebd',
  sql: 'insert into `story` (`points`, `projectId`, `story`, `storyNumber`, `title`) values (?, ?, ?, (select max(`storyNumber`) from `story` where `projectId` = ?), ?)' }

So it all looks good to me. Just never executes.
any ideas?

@drekka Are you calling .then on the initial return statement of return Knext.transaction ? If not, that's probably it. If I recall, transactions also require .then being called before it will execute.

@drekka more information is needed... It is probably what @wubzz  said, though other possibility is that insert throws an error and everything is rolled back and .then will be never called.
Try this one which handles some error cases and might help you to find out real reason:
return Knex.transaction(function (tx) {
  debug("Inserting new story record");
  return tx.insert({
    'projectId':projectId,
    'title': title,
    'story': text,
    'points': 0,
    'storyNumber': Knex('story').max('storyNumber').where('projectId', projectId)
  })
  .into('story')
  .then(function (id) {
    debug("Returning story for %s", id);
    return getStory(id);
  })
  .catch(function (err) {
    debug("Insert failed", err);
    throw err;
  })
})
// just to make sure that transaction is triggered (in your code caller is responsible of that)
.then(function (blah) { return blah; });
.catch(function (err) { debug("Huh! Transaction failed!", err); throw err; });

Also in .insert({...}, returning) you seem to use mysql which doesn't support passing returning argument. So I dropped it from my suggestion...

Thanks guys, I realised after some fiddling round that it would not work anyway because MySQL won't allow you to sub query the table you are inserting into. So I've been re-writing it using the raw function because it's doesn't appear that knex caters to a insert into x (...) select from x.
I'll keep you posted.

It would be nice to see what you came up with!

Hi, after some fiddling around I did this:
return Knex.transaction(function (tx) {
        return tx('story').insert(
            Knex.raw(
                '(projectId, storyNumber, title, story, points) select ?, max(storyNumber) + 1, ?, ?, 0 from story where projectId = ?',
                [projectId, title, text, projectId]
            ), 'id')
    })
        .then(getStory);
}

I'm closing this, since the original issue seems to be solved.

source: gharchive/issue

authors: drekka elhigu kamronbatman wubzz

repo: tgriesser/knex

license: MIT

license_type: permissive

license_source: github-api


text:
Rolling back a transaction without an error

I'm using transacting with knex and I want to rollback the transaction during normal execution. But whenever transaction.rollback() is called it throws an unhandled exception. Providing a custom error object and trying to catch it doesn't help since it is inside a callback.
Is there a way to rollback a transaction without throwing an error? Or is there a way to handle that error without littering the output?
Sample code:
// some previous inserts using `trans` done by now
db('actions')
.transacting(trans)
.select()
.where('id', data)
.then(function(rows) {
  // do some stuff with rows
  // we don't need the data anymore and want to roll back the transaction
  trans.rollback();
});

This may not be the correct place for this question as it pertains to bookshelf.  But...should an approach similar to this work for a bookshelf transaction?  I want to set up a transaction in a global beforeEach, then refer to it later in a test.  ClassName.forge(id: 1, description: 'Test1').save(null, { method: 'insert', transacting: global.trans }).  With this I get a "Invalid transaction object provided" error.

Please open a new issue with a more detailed code example

It's actually really hard to get unit tests with rollback working. I expected this to work:
beforeEach(function () {
  this.tx = knex.transaction()
})

afterEach(function () {
  this.tx.rollback()
})

What i actually had to do was ..
Prevent connection pooling
var knex = require("knex")

var config = {
  client: "pg",
  connection: process.env["DATABASE_URL"]
}

var env = process.env["NODE_ENV"]

if (env == "test") {
  config.pool = {
    min: 1,
    max: 1,
  }
}

module.exports = knex(config)

Raw transaction in tests
beforeEach(function () {
  return knex.raw("BEGIN")
})

afterEach(function () {
  return knex.raw("ROLLBACK")
})

it("should do whatever", function () {
  var tx = knex
  return CallAction(tx, { options: true })
  .then(function (result) {
    assert(result)
  })
})

The reason you can't just call tx.rollback() and then catch, is you swallow assert errors. Otherwise you have to do a fancy error handling match on assert errors vs pg errors.
It's not very straight-forward. Hopefully the above helps people who find this.

@aj0strow's suggestion worked for me on mysql using knex 0.14.6.

@rapodaca rolling back changes like that is really limited way to do testing and prevent you from testing many real world use-cases. Of course some specific cases that approach is legit. Just for your information :)

@elhigu, I think you're right.
Not 10 minutes later I discovered that a transaction performed within code under test (a nested transaction) was committed, leaving the database with stray data.
The following avoids that problem:
let db = knex(config);
let tx;

beforeEach(function (done) {
  return db.transaction((t) => {
    tx = t;
    done();
  }).catch((error) => { });
});

afterEach(function () {
  tx.rollback('cleaning up');
});

it('does something', function () {
  return expect(tx.insert({
    foo: 'foo',
    bar: 'bar'
  }).into('foo')).not.to.be.rejected;
});

@rapodaca that way has pretty much all the same limitations. My point was that generally one should not limit test setup to be able to use only single db connection and single transaction.
ps. I've explained that in quite many times during last few years in different places in much greater detail and explained also better ways for resetting test data after each test case. I'll write blog post or something about it to be able to always refer that later on 😅

@elhigu did you manage to write a blog post somewhere where you would give more info / examples on how to better reset test data ? I am curious to see how we can manage this without transactions

authors: aj0strow bendrucker elhigu marshals rapodaca tristangbn trustmaster


text:
table.primary() documentation vs implementation

documentation says to use table.primary(['col1', 'col2']) for a composite key, but this throws errors. If you use table.primary('col1', 'col2'), it succeeds. table.unique on the other hand requires the array syntax. These should be straightened out and made consistent in the documentation and the implementation. Would submit a patch, but unsure which way you want to go with.

I'd like to see this be made consistent as well.
Supporting both should be possible, since there's already a helper function to support that... seems like TableBuilder needs to be updated to use it.

I'm closing this in favor of #1430 where I'm going over this more in-depth cross-dialect.

authors: myndzi whitelynx wubzz


text:
🛑 Hacker News is down

In edade8f, Hacker News (https://news.ycombinator.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Hacker News is back up in 287577e after 27 minutes.

repo: thaaai/upptime


text:
Distribution over pip

Make it possible to distribute tsa over pip.

First cut done.

repo: thalesians/tsa

license_source: bigquery


text:
Update README.md

changed "data" to "person" in "Good" example under "Use searchable names (part 1)"

I was going to create a PR with the same change but then I noticed this here. Why has it not been merged (and all other approved PR-s)?

source: gharchive/pull-request

authors: acsteitz rzmz

repo: thangchung/clean-code-dotnet


text:
Bug: "sum(up) > bool 0" returns sum(up) (expected "1")

I tried to use --query.promql-engine=thanos in Thanos 0.30.2, but encountered with issue:
The query "sum(up) > bool 0" returns sum(up).
Without "--query.promql-engine=thanos" flag the query "sum(up) > bool 0" returns 1 (as expected).

Hi @vsile, thanks for reporting this.
It seems like a bug which we fixed in https://github.com/thanos-community/promql-engine/pull/133, but haven't released yet. I tried running a querier from latest main with the thanos engine and it seems that the issue is not there anymore.
The next release candidate is planned for March 9th, but if you would like to move faster than that you can try running a querier from latest main.

Since the engine already fixed this issue, I will close this one. We just need to upgrade the version in Thanos.

authors: fpetkovski vsile yeya24

repo: thanos-community/promql-engine


text:
Store Fix: Removed dir on loadmeta failure

If loadmeta fails during SyncBlocks, the block directory is left behind,
resulting in subsequent failures to read the meta file since loadmeta just looks for the directory to exist.
FailureToLoadMeta unit test

[x] I added CHANGELOG entry for this change.
[ ] Change is not relevant to the end user.

Changes
Calls os.RemoveAll on the blockdir when returning error from load meta
Verification
Added unit test that checks if a sync against a block that's missing a meta.json gets removed.

@bwplotka you're right, just realized I had an older version of that file, that my IDE was presenting which had this instead of the line checking for the meta file.
if _, err := os.Stat(dir); os.IsNotExist(err) {

Egg on my face. Closing

repo: thanos-io/thanos


text:
AuthenticationManager#checkAuthState() possibly computes AuthenticationState incorrectly for userless app

So this is a bug that was introduced by me in #180. To check whether a token refresh is needed, AuthenticationManager#checkAuthState() gets the time at which the last token was acquired using TokenHandler#readAcquireTimeMillis(String username):
if (reddit.isAuthenticated() && authData != null && tokenHandler.isAcquiredTimeStored(getUsername())) {
    long expirationTimeMillis = tokenHandler.readAcquireTimeMillis(getUsername()) + authData.getExpirationDurationMillis();
    if (expirationTimeMillis > System.currentTimeMillis()) {
        return AuthenticationState.READY;
    }
}

However, getUsername() is always going to return null for a userless app. This still works without crashing anywhere with an NPE because RefreshTokenHandler#getKeyFor() returns refresh_token_null instead of throwing an exception.
One solution that I can think of right offhand will be to use a constant value instead of calling getUsername() in both AuthenticationManager#checkState() and AuthenticationManager#refreshAccessToken().
Thoughts?

That is exactly what I've done for the Kotlin rewrite. AuthManager.USERNAME_USERLESS is used for storing any application-only data.
At this stage in the rewrite I'm not going to be accepting any PR's for the Java codebase unless it's also in issue in the Kotlin code.

Good to know, thanks!

authors: Saketme thatJavaNerd

repo: thatJavaNerd/JRAW

license: mit


text:
Home page route not working on server.

Version information

Laravel: v5.8
Voyager: v#.#.#
PHP: 7.3
Database: [type] [version] (e.g. MySQL 8.0)

Description:
On the local, the home page is working fine and loading with custom template home.blade. But on the server, the home page is not loading with home.blade. It is showing the content for the home page but it is not loading with proper the formatting. You can see here what I mean.
This is not loading with the proper format.
https://unionflooringcompany.theportlandcompany.com/
But
https://unionflooringcompany.theportlandcompany.com/page/home is working fine.
Additional context
Add any other context or screenshots about the feature request here.

This is not a Voyager related problem

authors: emptynick maliknabdul

repo: the-control-group/voyager


text:
Accessibility Dash for Book Dash November 2023

Summary
The Accessibility Working Group is doing a sprint this week (13-17 November)! We established that we want to do the following:

Reviewing material about running inclusive events
Cross-referencing material between Metadocencia and TTW
Landing page for Accessibility Guide landing page

What we've done so far in this group

Accessibility tag on Github: https://github.com/alan-turing-institute/the-turing-way/issues?q=is%3Aopen+is%3Aissue+label%3Aaccessibility
Notes from November 2022 Book Dash: https://pad.sfconservancy.org/p/ttw-accessibility-notes
Presentation from Book Dash

Youtube recording: https://www.youtube.com/watch?v=ARMs7C_wE04&t=1s
Slides from LH: https://lizharedogs.github.io/ttwBookDashNov22accessibility/#1
Slides from AST: https://andreasancheztapia.github.io/BookDash2022/#1

Starting new book around accessibility: https://github.com/alan-turing-institute/the-turing-way/issues/2730
Slack policies: https://the-turing-way.netlify.app/community-handbook/communication-channels/slack-welcome-guide.html
Accessibility policy: https://github.com/the-turing-way/the-turing-way/pull/3146/files
Inclusive Events chapter (multiple PRs)

Meeting notes: https://pad.sfconservancy.org/p/ttw-accessibility-notes
How do folks want to plan their weeks? You can add a plan below!

Monday:

Read through
Finish

Tuesday
Wednesday
Thursday
Friday

Community Share-outs!

Monday:

Catch up on the materials that are available so far.
Review.

Tuesday:

Talk about the landing page.
Starting a draft (?)

Wednesday:

Co-writing maybe (?)

Monday:

Start to review of materials of "Accessible and Inclusive events" chapter
Maybe make some comments/PRs to the chapter?

Tuesday

Continue review of materials of "Accessible and Inclusive events" chapter
PR the chapter with comments and suggestions
Discuss landing page with group??

Wednesday

Co-writing the landing page??

Thursday

Make PRs with comments and suggestions

authors: JFormoso PatriLoto aleesteele


text:
Ensure Responsiveness

Description: Make sure the homepage design is responsive and renders well across various devices and screen sizes, including desktops, tablets, and mobile phones.
Steps to Achieve:
Conduct testing across different devices using responsive design testing tools.
Adjust CSS styles and layout to ensure content adapts gracefully to different screen sizes.
Test and refine responsiveness iteratively until satisfactory results are achieved.

Test

repo: theCapnCoder/homepage


text:
xcode build failed due to dependencies

Hi, thanks for the awesome app.
Here, i'm have a problem while building.
error: The package product 'ZipArchive' requires minimum platform version 15.5 for the iOS platform, but this target supports 13.0 (in target 'SwiftGit2' from project 'SwiftGit2')

How can i settle this problem ?

Are you running an Intel Mac?

Nope, I am running a M1 Monterey Mac

You might have accidentally updated ZipArchive to a newer version. Reset all changes you made to the repo in git and re-download the dependencies.
You can do this by running git reset --hard or simply re-clone the project.
if this doesn't work, go to Xcode file navigator > Packages > SwiftGit2 > Modify platforms: [.iOS(.v13)], to platforms: [.iOS("15.5)],. Do the same for 'iOS Deployment target` in the Code project.

thanks a lot.
I settle this problem by using git reset --hard

authors: bummoblizard wbjsamuel

repo: thebaselab/codeapp


text:
[REL-142] Provide end timestamp to spans and transactions

:scroll: Description
We would like the ability to set the exact time that a span completes, however this is not currently possible. As the
system worked originally when the consumer would call finish on a span or transaction (which would then call the
-[rootSpan finish]) Sentry would pluck out the "current date" and use that as the finish timestamp. Then, if the
transaction were completed the transaction would be "captured" and sent on its way to the server. Thus, for subspans it
was possible to mutate the finish timestamp but not for the transaction which would lead to potentially strange results
if the subspan end timestamps were significantly different from the transaction's end timespan (like if the finishes
are called on another thread).
This can be solved by allowing callers to pass in the finish timestamp if they like. Then if this value is present the
SDK will use that, otherwise it will fall back to the "current date" value that it has always used.
:green_heart: How did you test it?

Existing unit tests
By adding transactions to our app and incrementing their start and end timestamps by 10ms for uniform durations, checking the Sentry site and noting that all spans were multiples of 10ms in duration.

:pencil: Checklist

[ ] I reviewed the submitted code
[ ] I added tests to verify the changes
[ ] I updated the CHANGELOG if needed
[ ] I updated the docs if needed
[ ] Review from the native team if needed
[ ] No breaking changes

I will add tests in a little bit. And also update the CHANGELOG.
Would appreciate feedback on if we should upstream this!

I suspect that upstreaming will be greatly eased if you can share a simple program that finishes something on a background thread but with a blocked main thread, and demonstrate that the reported times in sentry end up being skewed as a result.

Thank you for the comment! This tells me I need to update the PR description. This issue is not specifically that Sentry requires transactions to happen on the main thread but rather that Sentry does not give the caller the ability to provide the finish timestamps before sending data to the server. This is an issue for us because we want to get the timestamp value on the main thread when TCA calls us back but we do not want to execute the Sentry code synchronously if we can avoid it. So we get the timestamp, dispatch async to a serial queue, create or finish a span. Previously the finish timestamp would be based on whenever the serial queue actually called finish but we would like to provide the time ourselves.

repo: thebrowsercompany/sentry-cocoa


text:
Nothing happens on GPIO

Hi,
I was using my Raspberry Pi 3b to control some buttons and switches with Node-RED on the standard RPi OS. It worked fine.
Then I flashed and installed the Home Assistant OS RPi3x64 + HACS + ha-rpi_gpio and nothing happens when I activate any button !
I've put the button on my dashboard to check it, but nothing.
If I install then Node-RED as an add-on, it is unable to receive or control any GPIO.
Logs are empty exept :

2022-08-07 11:16:58.540 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration rpi_gpio which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-08-07 11:16:58.546 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

Here is my configuration.yaml for testing :
# Loads default set of integrations. Do not remove.
default_config:
# Text to speech
tts:

platform: google_translate

# Raspberry Pi GPIO Input
binary_sensor:

platform: rpi_gpio
sensors:

port: 7
name: "Bouton arrosage"

# Raspberry Pi GPIO Output
switch:

platform: rpi_gpio
switches:

port: 37
name: "Vanne arrosage"

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
Here is my System information :

Version
core-2022.8.1

Installation Type
Home Assistant OS

Development
false

Supervisor
true

Docker
true

User
root

Virtual Environment
false

Python Version
3.10.5

Operating System Family
Linux

Operating System Version
5.15.32-v8

CPU Architecture
aarch64

Timezone
Europe/Paris

Configuration Directory
/config

Home Assistant Supervisor

Host Operating System
Home Assistant OS 8.4

Update Channel
stable

Supervisor Version
supervisor-2022.07.0

Agent Version
1.2.1

Docker Version
20.10.14

Disk Total
6.7 GB

Disk Used
3.5 GB

Healthy
true

Supported
true

Board
rpi3-64

Supervisor API
ok

Version API
ok

Installed Add-ons
SSH & Web Terminal (12.0.0), File editor (5.3.3)

Node-Red support for GPIO removed in https://github.com/hassio-addons/addon-node-red/releases/tag/v12.0.2 and is not related to this integration.
This integration use the GPIO pin# and not the header pin number:

For example, header pin 37 is GPIO26.
Your configuration includes reference to GPIO37 which is not available and port 7 which is header pin 26.
Make sure you map them correctly.

This integration use the GPIO pin# and not the header pin number:
Now that you say that, it seems really obvious. I didn't realised that...
Sorry for the inconvenience and thank you for the help. I've been looking for a solution for 3 full days, and it was so simple!
Now it works fine. Home Assistant controls the GPIO and I can use the entities in Node-RED.
Thanks very much!

authors: Elildar thecode


text:
Fix modal overlay handling.

Addresses #162.
These changes wrap the createOverlay and removeOverlay methods with reference counts to ensure that createOverlay/removeOverlay is only called when there are no other modals managing the overlay.
I also removed the bit about removing the "show" class from the overlay in hide since the overlay is going to be removed from the DOM by removeOverlay anyway if the ref-count hits zero.

Interesting find, thanks ;)

Hey the overlay doesn't seem to close at all now.

Ah, thanks for fixing that!

@thednp
Looking at your fix, I'm not sure if the reference counting is working correctly. When ref-counting, the count should update every time either createOverlay or removeOverlay is called. The guard should ensure that the "action" (creating or removing the overlay) only takes place once for a sequence of createOverlay-removeOverlay pairs. Effectively, the ref-count says "there are X number of users of the overlay". When the count transitions from 0-1 the overlay should be shown. When the transitions from 1-0 the overlay should be removed. All other transitions should leave the overlay as-is.
With your changes, the count is incremented after the guard:
createOverlay = function() {
  if ( modalOverlayRefCount > 1 ) { return; }

  modalOverlayRefCount += 1;

  // create the overlay
}

removeOverlay = function() {
  if ( modalOverlayRefCount === 0 ) { return; }

  modalOverlayRefCount -= 1;

  // remove the overlay
}

Consider the following sequence of createOverlay/removeOverlay pairs:
createOverlay - ref count ==0, resulting ref count == 1 (overlay is created)
createOverlay - ref count ==1, resulting ref count == 1 (no op)
removeOverlay - ref count ==1, resulting ref count == 0 (overlay is removed)
removeOverlay - ref count ==0, resulting ref count == 0 (no op)

What I need is this:
createOverlay - ref count ==0, resulting ref count == 1 (overlay is created)
createOverlay - ref count ==1, resulting ref count == 2 (no op)
removeOverlay - ref count ==2, resulting ref count == 1 (no op)
removeOverlay - ref count ==1, resulting ref count == 0 (overlay is removed)

This second sequence removes the overlay only when the last removeOverlay is called. This behavior is achieved by updating the count ahead of the guard:
createOverlay = function() {
  modalOverlayRefCount += 1;

  if ( modalOverlayRefCount !== 1 ) { return; }

  // this is a 0-1 transition

  // create the overlay
}

removeOverlay = function() {
  modalOverlayRefCount -= 1;

  if ( modalOverlayRefCount !== 0 ) { return; }

  // this is a 1-0 transition

  // remove the overlay
}

I don't exactly know what you need, but if you don't come with a good working solution that works reliably I might consider reverting to previous code revision.
I will also not approve future commits without testing myself.

@thednp
I'd like the backdrop to stay up while modals are on the page.
I've created some jsfiddles to demonstrate.
Here is v2.0.15 demonstrating the issue:
https://jsfiddle.net/naonhpbp/8/
Here is the same code but with my fix:
https://jsfiddle.net/fm9nmdzL/2/
Here is the same code but with your fix that is currently in v2.0.17:
https://jsfiddle.net/46hvkraL/4/
Above you said:

... the overlay doesn't seem to close at all after opened second modal

Would you mind putting together a jsFiddle to show me the issue? I can look into it.
Thanks for your time and this project - it's awesome!

Your script example:
firstModalEl.addEventListener('hidden.bs.modal', openSecondModal, false);

This is not required, also you don't have to initialize modals on click, you just initialize button/modal like I wrote in the documentation:

If you initialize a button, it should have proper attributes to target corresponding modal,
If you initialize a modal, it can be opened like this myOtherButton.onclick = function(){ myModalElement.Modal.open(); }

All my examples here work flawless. I don't understand why you need to complicate things.

I think hide event would be better to be used instead of hidden, when the overlay is still present.
firstModalEl.addEventListener('hide.bs.modal', openSecondModal, false);

RE:

I think hide event would be better to be used instead of hidden

The hide event is when the modal is starting to be hidden. The hidden event is after the modal has been hidden.
RE: https://github.com/thednp/bootstrap.native/pull/163#issuecomment-335198175
I am not trying to complicate things. The code in those jsfiddles is not my actual code.
My actual code uses React. The HTML is appended to the page as part of rendering a React component. The use case is that I have some action that pops a modal. If the user is not signed in, an authentication modal is popped first to prompt the user to sign in. After the user signs in on the authentication modal, the original modal is popped. The original modal is popped in the hidden event of the first modal.
The reason this behavior is occurring is explained in #30:

The bug happens because when the first modal closes, it removes the overlay after a short delay, and the second modal uses that same overlay element, which gets removed.

I have not looked at your examples. I will look to see if you have that case. I will also pull together a jsfiddle using normal bootstrap JS to see if it's an issue there. I'll also look at the examples with my changes and see if I can see the issue you pointed above.
If there's a better way to pop a modal after another modal has been hidden, let me know.
Thanks

I will try to recreate your use case with the fiddle you've made, I want to have it fixed for everybody not just me, but the way you do things aren't (at least to my mind) proper JavaScript.
I mean every time you click the button you create a new instance of Modal, over and over, it's gonna blow up somewhere. I have little to no experience with React, but that's what I understand from your example.

RE: https://github.com/thednp/bootstrap.native/pull/163#issuecomment-335230016
I'm not sure what you mean by "proper Javascript". Creating new instances of objects to encapsulate state is not only "proper Javascript", but also good OOP and is exactly what bootstrap is doing:
https://github.com/twbs/bootstrap/blob/bab3246a1d7219e93ee12e09ff7608c5dd6bcbc2/js/src/modal.js#L517
I looked at your examples with my changes. I see that you are using data-toggle on the "Next" button in the first modal, here:
https://github.com/thednp/bootstrap.native/blob/168c77cd574414f2760ca82e173afb46d01c72de/index.html#L500
Clicking this button causes clickHandler to be called with the new modal (here) and dismissHandler to be called with the old modal (here). Here's dismissHandler:
    dismissHandler = function(e) {
      var clickTarget = e[target];
      if ( open && (clickTarget[parentNode][getAttribute](dataDismiss) === component
          || clickTarget[getAttribute](dataDismiss) === component
          || (clickTarget === modal && self[backdrop] !== staticString) ) ) {
        self.hide(); relatedTarget = null;
        e.preventDefault();
      }
    };

self.hide() is not being called for the old modal here. open is true, but one of the other expressions in the if-statement is evaluating to false. This means that removeOverlay is not being called for the old modal. That means that the createOverlay-removeOverlay calls pairing is not actually a pair. This is why my changes to use ref-counting don't work: removeOverlay is only called once, when the last modal is dismissed instead of twice. (once for each created modal).
I'm not sure what the behavior would be for normal bootstrap JS. I'll pull together a jsfiddle for that. On a cursory look at normal bootstrap v4 JS, I do see that the hidden event isn't triggered until after the overlay is hidden: https://github.com/twbs/bootstrap/blob/bab3246a1d7219e93ee12e09ff7608c5dd6bcbc2/js/src/modal.js#L322
This is different than bootstrap.native where, as explained in #30, the hidden event is triggered before the overlay is managed:
https://github.com/thednp/bootstrap.native/blob/2.0.15/lib/V3/modal-native.js#L142-L143
Changing bootstrap.native to match normal bootstrap's behavior to fire the hidden event after the overlay is managed would obviate the need for my fix.

Here's an example using normal bootstrap JS:
https://jsfiddle.net/0sjwoaaa/10/
It works. That is the overlay animates away and back again between the modals and finally away after dismissing the last modal.

Our code is supposed to do better in this case. I don't want to hide the overlay while closing visible modal and opening new one. That's what I had in mind from the start.
The thing is, your modalOverlayRefCount doesn't count between multiple instances of Modal because it's closed within the UMD closure and not in the global scope, so I will think of a better way to handle this case.

modalOverlayRefCount is in the globals.js file which makes it global to the bootstrap.native closure, which is effectively global, barring pulling in more than one instance of bootstrap.native. Is that a use case you want to support?
RE:

Our code is supposed to do better in this case.

Why do different than bootstrap? I thought this library was suppose to match the behavior of standard bootstrap. Is that not the case?

Lastly, the issue here is that the code in dismissHandler is breaking the create/remove pairing. That should be fixed regardless of my changes. If it were fixed, it seems you would accept my changes, no?

Just stumbled upon this:
https://github.com/twbs/bootstrap/pull/23586
I'll likely switch to this as soon as it's available. In the meantime, I'll stick with my fork of this library barring a better fix that is consistent with normal bootstrap behavior.

Why do different than bootstrap? I thought this library was suppose to match the behavior of standard bootstrap. Is that not the case?

In my mind doing things exactly like original plugins was a bit of a tinkering. I always wanted to make it better in some ways, because with plain JavaScript you can, still I think some of our functionality here was later added to the original plugins because it was a better way IMO.

OK I got this thing to work with the events as in your example, it works exactly the same as with jQuery version. But it also works the way I've set the first example.
Be prepared to test in a couple of hours.

@dtognazzini go check the master code.

@thednp Finally getting around to this now. NPM can't find it version 2.0.18. Did you push?

@thednp master is working well. Thanks!

authors: dtognazzini thednp


text:
Add chrono integration

Closes #25

cc @a-rodin

repo: theduke/quickjs-rs


text:
Fix py3k regression in 0.8.3

.items() works in both.  This dictionary won't ever be especially large,
so the performance hit for not using an iterator in py27 is negligible.
If you really want, I can pull in six.iteritems() but I didn't see any other uses of six so I didn't want to introduce a new dependency.

If this is good to go, can we get a 0.8.4 as well?  Thanks.

Looks fine, the tests are passing. If you are interested in python 3 compat you might be interested in #80 because I think we are not running python3 tests... :(

authors: jimbobhickville solarkennedy

repo: thefactory/marathon-python


text:
Mix in a bit of podcast into the blog

Motivation
The blog has captured attention recently, but the new design hasn't touched that part yet. I want to put up some solution as soon as possible.
Approach

"Insights" on the top nav hasn't attracted much attention, according to Hotjar, so I'm changing the label to "Blog".
I hand-picked to podcast entries that I wanted on the first page of the blog and positioned them manually.
On the footer, I added separate links for Blog and Podcast

Further steps

We probably want to query the podcast episodes through Gatsby, but I'd also like to be able to curate the order of appearance.
Styles for the Podcast section are still pending

Hopefully, it's not going to be too frustrating to maintain the manual list.

I think this is temporary, eventually we can have some extra meta tag that help us with it


text:
Add Slug Field to Admin Interface

Part of https://github.com/thegazelle-ad/gazelle-server/issues/303

@emilgoldsmith Was this accidentally moved to In Review?? I don't see a PR for it.

Whoops yes I think I tried moving your refactor PR to in review, my bad

whoops shouldnt close until it's done with review

repo: thegazelle-ad/gazelle-server


text:
render-codeblock-mermaid doesn't work

This bug is hidden when short code version of mermaid is used in the same page.
This is probably because these two share the same flag (.Page.Scratch.mermaid) and short code is evaluated before code blocks.
error message
Error: Error building site: "/tmp/demosite/content/test/test.md:5:1": "/tmp/demosite/layouts/_default/_markup/render-codeblock-mermaid.html:1:30": execute of template failed: template: _default/_markup/render-codeblock-mermaid.html:1:30: executing "_default/_markup/render-codeblock-mermaid.html" at <.Site>: can't evaluate field Site in type *codeblocks.codeBlockContext`

work around
Add '.Page'  before '.Site' in layouts/_default/_markup/render-codeblock-mermaid.html
<script defer src="{{ index (index .Site.Data.assets "mermaid.js") "src" | relURL }}"></script>
=>
<script defer src="{{ index (index .Page.Site.Data.assets "mermaid.js") "src" | relURL }}"></script>

Thanks for reporting!
Refs:

https://github.com/gohugoio/hugo/issues/6668
https://gohugo.io/variables/site/#get-the-site-object-from-a-partial

F.Y.I
hugo-geekdoc/layouts/_default/_markup/render-heading.html uses  '.Page.Site'
{{- $showAnchor := (and (default true .Page.Params.GeekdocAnchor) (default true .Page.Site.Params.GeekdocAnchor)) -}}
I'm not sure the difference between site.XXX and .Page.Site.XXX.

https://github.com/thegeeklab/hugo-geekdoc/pull/541

authors: n-arakawa xoxys

repo: thegeeklab/hugo-geekdoc


text:
[BUG] The green_urls datasets are empty since 2024-04-16

The green_urls datasets are empty starting from 2024-04-16.
Steps to reproduce the behavior:

Go to https://admin.thegreenwebfoundation.org/admin/green-urls
Download green_urls_2024-04-16.db.gz, green_urls_2024-04-17.db.gz, or green_urls_2024-04-18.db.gz.
Check the file size and attempt to unpack the archive.
The result is the empty SQLite database.

Expected behavior
The database should not be empty.
Actual behavior
The database is empty.

? I have absolutely no idea what this is about. I do not know anything about what you sent. This is not me. You got the wrong Br0ken. This is the correct person https://github.com/BR0kEN-
I am br0ken-the-streamer

Thanks @mrchrisadams. Just FYI, this is still the case for the snapshots that appear after green_urls_2024-04-18.db.gz - they're all empty (45 bytes in size).

@mrchrisadams would you please have a look?

hi @BR0kEN- sorry about this, I've looked into it, and I think I see the issue now.
I've pushed a change to the cronjob that was running each morning, and run the job now to generate the snapshots again as intended. There should be snapshot for green_urls_2024-05-27.db.gz accessible now, from me running the export code.
If it helps clarify things, this was the playbook run, to set up the corrected cronjobs on the relevant machine:
https://github.com/thegreenwebfoundation/admin-portal/blob/master/ansible/setup_cronjobs.yml
There should be another one tomorrow, of the expected size, and so on.
However, it's it's a bit of a faff to backfill the other daily snapshots from mid April, and there is some other work on the project that needs to take precedence, so I won't be able to backfill these for a while.
We do store all the day's greenchecks in parquet files, which are optimised for aggregate queries - these lend themselves well to recreating all the green domains for a given day, so it's doable, just not in the next week or so.
I've created #592 to track it, and I'm closing this issue.

repo: thegreenwebfoundation/admin-portal


text:
Android 12 sometimes failing to scan in custom apps

There has been reports of some apps using Herald having permission issues affecting some Android 12 handsets being able to scan for other devices.
This issue is held open to investigate these issues and provide a fix in the sample app.
Note: This is NOT an issue with the core Herald API. This is an application level (not library / Herald level) issue. We're only logging here because we need to verify if the default example permissions in the Demo app has the same problem.

Note: Believed to be a permissions logic issue in an app. TBC.

Need to update one Android device to latest Android to verify this works (S10 lite?). Testing does work on older devices so no regression there at least. As of 2022-10-14-v210beta4 formal tests.

Upgraded Pixel 3XL to Android 12 (API 31) and confirmed the issue with documentation. Aligned our code in the demo app with the requested permissions already in the Herald Library's AndroidManifest.xml file and then tested. Confirmed correct set of permissions required.
Considered making this permissions request internal to the Herald API, but apps will likely want additional permissions so can't really remove this from the app and it's UI flow, so just need to document this thoroughly.
There are some phones that do have issues scanning (See #227) and advertising (See #222), but this issue is for documentation for new apps only to ensure they have the correct permissions.

repo: theheraldproject/herald-for-android


text:
Add Time Axis only when time related chart is opened

Signed-off-by: muddana-satish satish.muddana@ericsson.com

repo: theia-ide/theia-trace-extension


text:
Unbalance FGW full rank marginal normalization issue

xlink https://github.com/theislab/moscot/pull/686

Ok just to update this issue waits for https://github.com/ott-jax/ott/issues/519 to be closed and then we'd need to unskip the test related in
class TestSpatioTemporalProblem:
...
@pytest.mark.skip(reason="unbalanced does not work yet: https://github.com/ott-jax/ott/issues/519")
    def test_solve_unbalanced(self, adata_spatio_temporal: AnnData):

Hi @selmanozleyen ,
What's the current state on this?

@MUCDK  its still the same, it is an error from the ott-jax side and the issue is linked above

authors: MUCDK giovp selmanozleyen

repo: theislab/moscot


text:
Return EI_sim in Moran's I

Also return EI_sim in Moran's I computation (currently it seems that only mi.I, mi.p_z_sim, mi.VI_sim are returned). This is needed to determine how many stds away from mean is the I.
**EDIT:
Sorry, I have just realised that what I want to do is already done in p_z_sim (I thought p_sim was reported as I got unexpectedly small p values, many of which were equal to 0).

btw @Hrovatin we bow have moran's implemented in scanpy, you can just clone the latest master and do
import scanpy as sc
sc.metrics.morans_i(adata)

and the return is the same as gearys' C

Thanks, I did not realise that this PR was finished.

authors: Hrovatin giovp

repo: theislab/squidpy


text:
Dropdown Menus don't work within Table Cells

Describe the bug
When using the table components that are provided, if a button with a dropdown menu is put inside, the dropdown functions but options are cut off by the bounds of the table, and positioning is not respected. However, when testing with HTML Table elements, dropdown menus work fine.
Reproduction
Here's a quick test mockup using Table Elements, Button, and Dropdown
https://stackblitz.com/edit/sveltejs-kit-template-default-4rfsg8?file=src%2Froutes%2F%2Bpage.svelte
Flowbite version and System Info
System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M1 Max
    Memory: 2.34 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
    Yarn: 4.3.0 - ~/.nvm/versions/node/v20.12.2/bin/yarn
    npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
  Browsers:
    Chrome: 126.0.6478.115
    Safari: 17.5
  npmPackages:
    svelte: ^4.2.18 => 4.2.18
    vite: ^5.3.1 => 5.3.1

Button and Dropdown need to be in the same row.
https://stackblitz.com/edit/sveltejs-kit-template-default-4ilvxp?file=src%2Froutes%2F%2Bpage.svelte,package.json

I am having issues with dropdown placement in my table - on ios safari. I thought this was fixed in the dropdown updates that were done but its still acting up.
Video Recording:
https://github.com/themesberg/flowbite-svelte/assets/57114335/a480f554-fb1f-4248-a081-708a97703e80
Code used:
<Table class='min-w-[920px] md:min-w-[1100px]'>
  <TableHead>
    <TableHeadCell class={thClass}>action</TableHeadCell>
  </TableHead>

  <TableBody>
    {#each orders as order, index (order.id)}
    <TableBodyRow>
      <TableBodyCell {tdClass}>
        <Button
          color="none"
          size="xs"
          class="dropdown-actions rounded-none"
          on:click={() => setActiveOrder(order, index)}
          >
          <Icon src={EllipsisVertical} class="w-5" />
        </Button>
      </TableBodyCell>
    </TableBodyRow>
    {/each}
  </TableBody>
</Table>

<Dropdown
  bind:open={dropdownOpen}
  placement="bottom-end"
  triggeredBy={'.dropdown-actions'}
  containerClass="z-10 w-36"
>
<DropdownItem on:click={() => onOpenResend()} class="flex gap-3 items-center">
  <Icon src={ArrowPath} size="15" />
  Resend
</DropdownItem>

<DropdownItem class="flex gap-3 items-center" href={activeOrder?.attributes?.pdf_url} download target="_blank">
  <Icon src={ArrowDownTray} size="15" />
  Download
</DropdownItem>
</Dropdown>

I will close the issue for now. Please feel free to open a new issue.

authors: gregg-cbs shinokada tsekiguchi

repo: themesberg/flowbite-svelte


text:
Carousel componet makes error moving images array

Describe the bug
when "images" arrays are changed, "imageShowingIndex" value must set to zero in Carousel.svelte
examples:
let images1 = [
{
id: 0,
name: "Cosmic timetraveler",
imgurl: "/images/carousel/cosmic-timetraveler-pYyOZ8q7AII-unsplash.webp",
attribution: "cosmic-timetraveler-pYyOZ8q7AII-unsplash.com",
},
{
id: 1,
name: "Cristina Gottardi",
imgurl: "/images/carousel/cristina-gottardi-CSpjU6hYo_0-unsplash.webp",
attribution: "cristina-gottardi-CSpjU6hYo_0-unsplash.com",
},
];
let images2 = [
{
id: 0,
name: "Cosmic timetraveler",
imgurl: "/images/carousel/cosmic-timetraveler-pYyOZ8q7AII-unsplash.webp",
attribution: "cosmic-timetraveler-pYyOZ8q7AII-unsplash.com",
},
];
When applying images1 to the Carousel and then trying to apply images2, a TypeError occurs with the message "Cannot read properties of undefined (reading 'imgurl')".
Reproduction
https://gs.gongsilbox.com/map/one?lat=36.33179&lng=127.40194&zoom=12&r=81ff0759-31c8-4e45-a79b-f0869a50dbd4
Flowbite version and System Info
flowbite-svelte v0.37.5

when "images" arrays are changed, "imageShowingIndex" value must set to zero in Carousel.svelte.
Please solve this simple problem as soon as possible

Please fork this and add your code.

i got it

https://stackblitz.com/edit/sveltejs-kit-template-default-bfygkw?file=src%2Froutes%2F%2Bpage.svelte,src%2Froutes%2F%2Blayout.svelte
i forked it. check it please~

Additionally, even if the number of thumbnail images increases, their size should remain consistent, and I'd like to add previous and next buttons. As the number of images increases, the thumbnails start to look odd.

I close the issue for now since we updated the carousel API.
Thank you for your contribution.
Please feel free to open a new issue.

authors: God-lives shinokada


text:
[Typo]: dark:hover:bg-bray-800 -> dark:hover:bg-gray-800

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Go to Flowbite Forms - File Input
Scroll down to 'Dropzone'
See error

Expected behavior
dark:hover:bg-bray-800 -> dark:hover:bg-gray-800
Screenshots

Fixed this in v2.4.1 - thanks!

authors: kerimovok zoltanszogyenyi

repo: themesberg/flowbite


text:
Timesheet - 24/04/2021 - Kristy Lee

Task 1
Revamping governance page and vote interaction
Proof of Work

https://www.figma.com/file/k7D7Fwbz08hU6ZESPOsyvE/Governance-V2.0?node-id=55%3A10243

Time Spent
5 hours

Total Time Spent
5 hours
Account Number
a2d73cf3b37a62276ade44a96860495510d0e7d7c468950d4e49ac8a62b3d31d

Approved

Approved

authors: kristykjlee manishram tspearing


text:
Added hello world in Hmong

Account number: 6f9a58d18f9c544db46a0bc988aae8bee1ab7d74f04e490f6bafc9a6c8eb4c23

@sai-koumudi It's not listed in the ISO codes. Where did you get the code from?

authors: sai-koumudi thesanjeevsharma

repo: thenewboston-developers/Website


text:
Keep story identifier during story import

In order to keep analytics history

@vsct-jburet Many thanks for this fix !!

authors: msansen-esncf vsct-jburet

repo: theopenconversationkit/tock


text:
Cron tasks of labsync/labcheck are not setup for HA

The cron tasks of labsync and labcheck are not setup
correctly when HA and switching node role.
Closes: theopenlab/openlab#288

recheck

recheck

recheck

recheck

authors: bzhaoopenstack huangtianhua

repo: theopenlab/labkeeper


text:
"Cannot find deploy template"

vagrant@vagrant-ubuntu-trusty-64:~/code/ALEX/sqitch$ sqitch add categories_order_array -n "Adds a categories_order_array field in user_roles table."
Use of uninitialized value $name in concatenation (.) or string at /usr/local/share/perl/5.18.2/App/Sqitch/Command/add.pm line 144.
Use of uninitialized value $name in concatenation (.) or string at /usr/local/share/perl/5.18.2/App/Sqitch/Command/add.pm line 144.
Use of uninitialized value $name in concatenation (.) or string at /usr/local/share/perl/5.18.2/App/Sqitch/Command/add.pm line 144.
Cannot find deploy template
vagrant@vagrant-ubuntu-trusty-64:~/code/ALEX/sqitch$

Any help would be appreciated. Thanks.

What's the output of sqitch engine?

What's the output of sqitch engine?

mysql

I'm not able to replicate that:
> md tmp
> cd tmp/
> sqitch init --engine mysql foo
Created sqitch.conf
Created sqitch.plan
Created deploy/
Created revert/
Created verify/
> sqitch add categories_order_array -n "Adds a categories_order_array field in user_roles table."
Created deploy/categories_order_array.sql
Created revert/categories_order_array.sql
Created verify/categories_order_array.sql
Added "categories_order_array" to sqitch.plan

What version of Sqitch are you using?

vagrant@vagrant-ubuntu-trusty-64:~/code/ALEX/sqitch$ sqitch --version
sqitch (App::Sqitch) 0.9995

I recently encountered this same issue and found the solution, which may be the same in your case.  We're using windows with vagrant VMs as well, but with centos, and I had initialized a project inside vagrant.  I was able to add/deploy/everything just fine, but a co-worker who pulled the newest changes down could not and got the same error here.
Turned out that sqitch is looking for templates by trying to grab the template name from the engine of the target, not finding that, and then not initializing the value of $name and failing.
What took me forever to track down was that when my co-worker had pulled down the project, git was set to checkout files with CRLF line endings, not LF.  This seems to cause the add command to silently fail to read or not read correctly the sqitch.conf file in the project directory, and then fail when it can't find the template name.  Once the line endings were changed to CRLF, the add command worked as expected. I ended up adding the line *.conf eol=lf to our .gitattributes file to prevent that from happening in the future.
So @theory, you should be able to duplicate this by changing the line endings in sqitch.conf to CRLF.

Nice catch, @austinried, thanks!

Replicated the issue, submitted bestpractical/config-gitlike#13 with failing tests demonstrating the issue. Note that #338 dupes this issue. Anyway, will hopefully be fixed when Config::GitLike learns how to better handle foreign line endings.

I am having this exact same issue on sqitch (App::Sqitch) 0.9996

authors: SheriefAlaa austinried jpSimkins theory

repo: theory/sqitch


text:
No Link

I dont find a link to open the website. And I think nobody want to download this website for him self and then open it.
Or?

click on the Get New Url button. It generates a url with your current settings, which you can add as a browser source in your streaming tool.
You can find the button at the bottom of the form:

No I mean in the readme That you can click in And you come to the Page where you can make all settings

repo: theowoo/agbg


text:
add button to update key/credential name

This PR addresses the request in 824 to add a feature to update the key/credential name
I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@TylerNoblett this needs to get rebased on or have main merged in due to the changes for renaming key to credential.

@jrozner should be good to merge now!

authors: TylerNoblett jrozner

repo: theparanoids/ashirt-server


text:
Server error inside CSV file when using Laravel response

Laravel 7
Version   9.6
Question
When using a Laravel download response, I'm receiving an error inside the CSV file. It shows up below the last row in the CSV file. If I don't use the Laravel response and simply echo $reader->output($fileName) then die, it works. So it's definitely related to the download response.
I'm wondering if you have encountered this before and if there is a solution for it. Other downloads I use for TAR files work fine.
Laravel code:
$filePath = Storage::path(config('config.rapid_export_dir') . '/' . $fileName);
$reader = Reader::createFromPath($filePath, 'r');
$reader->setOutputBOM(Reader::BOM_UTF8);

$headers = [
    'Content-Encoding' => 'none',
    'Content-Type' => 'text/csv; charset=UTF-8',
    'Content-Disposition' => 'attachment; filename="'.$fileName.'"',
    'Content-Description' => 'File Transfer',
];

return Response::download($reader->output($fileName), $fileName, $headers);

Error code:

<!DOCTYPE html>
--

<meta charset="utf-8">
<meta name="viewport" content="width=device-width

<title>Server Error</title>

<link rel="dns-prefetch"   href="//fonts.gstatic.com">
<link   href="https://fonts.googleapis.com/css?family=Nunito"   rel="stylesheet">

500

Server Error

@rbruhn thanks for using the library. I believe your question is answered in the library documentation website.

If it does, then I can't find it. I've tried all the various examples. Thanks anyway. I will just switch packages.

Did you read this section https://csv.thephpleague.com/9.0/connections/output/#using-a-response-object-symfony-laravel-psr-7-etc ?

Yes. With and without adding the $reader->setOutputBOM(Reader::BOM_UTF8);
Also tried $reader->getContent() in place of the $reader->output() shown in the code above.
When using getContent(), I got a 500 error when going to the download url. My error log simply said there was an error and spit out the 85K rows of the csv with 4 or 5 letters tagged at the beginning of the error. I don't have that log anymore or I'd show you the start of it. There was no trace for the error. No real message to figure out what went wrong.

from what you describe to me it's clearly an issue with Symfony or Laravel way of constructing the HTTP response rather that one with the library I'm afraid. 😢

Ya, that's what I thought. Which is why I was simply asking if you've ran into the issue or not. Thanks for responding further though.

@rbruhn I think you'll find the solution to your issue by reading the Laravel documentation https://laravel.com/docs/8.x/responses#file-downloads  ... your first snippet is incorrect you should correct it. And as I said this has nothing to do with the library 😉

Tried directly downloading the file. The problem was the file ended up with utf-8 characters scrambled inside the csv no matter what settings I had in the headers. When viewing the file saved on the server, the utf-8 characters are correct. So it's happening during the download. I was trying to use your methods to help with the download to get correct character encoding using BOM.
So, your library works for the file if I just send headers and die. It won't work at all using Laravel download.

Thought I would let you know I figured this out. The main problem was my file name in the url. It didn't like that so I changed it to be encoded. After fixing that, the Laravel download response still didn't give correct utf8 characters. However, using your example from the documentation finally worked. So it was the filename issue in the URL that caused all the issues. Code below works. Thanks.
$filePath = Storage::path(config('config.rapid_export_dir') . '/' . $fileName);
$reader = Reader::createFromPath($filePath, 'r');
$reader->setOutputBOM(Reader::BOM_UTF8);

$headers = [
    'Content-Encoding' => 'none',
    'Content-Type' => 'text/csv; charset=UTF-8',
    'Content-Description' => 'File Transfer',
    'Content-Disposition' => 'attachment; filename="'.$fileName.'"'
];

return response($reader->getContent(), 200, $headers);

authors: nyamsprod rbruhn

repo: thephpleague/csv


text:
Prevent URL slash from being escaped in the response

I'm returning a URL from one of my transformers and it's being encoded in the respect
{
   "url": "http\/\/:example\/...."
}

How can I prevent this in my transformer? I tried to place this url under the key "links" as I saw some examples but same thing happens.
"links" => {
  "uri" => ''http\/\/:example\/....'
}

This is the default behavior of PHP's json_encode() function. You have to pass JSON_UNESCAPED_SLASHES (in PHP 5.4+) to the function to prevent this.

Thanks!

authors: newtonianb opengeek

repo: thephpleague/fractal


text:
Add mailXpert to the list of thirdparty providers

Adding a provider for https://dev.mailxpert.ch

Thank you for contributing! 🎉

authors: ramsey scuben


text:
Handle encrypted card details

From @alexw23 on February 18, 2015 21:56
Building out the eWay's new Rapid 3.1 Direct API. They have functionality to support client side encryption for those who don't want to forgo PCI-DSS compliance.
http://api-portal.anypoint.mulesoft.com/eway/api/eway-rapid-31-api/docs/client-side-encryption
The issue is I can't validate card as it doesn't contain any valid card details. This is what the card details turn up like.
["EWAY_CARDNUMBER"]=> string(353) "eCrypted:LkY4WI6HL/5JHWSLA4KIUnaGZCshOjxxQduNCkb59H3ZJCmKP3XoqsSxPbKak5Wr8VjQjGBV47fSsddLE+ks92gMBkj49QkrfjmMDUUrBl01biwNjNZ45Q7wQwi3UGBjTL19QIT5NLtzjXdwMfDl381ij0iR6Xc00fqG/OGPCg/2jsqDvuctRtQeJ0LhNA5Y1dJLH8BlY/DJL1L1K+cmg8bnM4InTXWUmTg/oTF4g+/kYdwYCBd6E64B+enZcuATFii79Jwz/EGfZcWGiyGjV2gpwCppSoIdXwVSrRu8l6tOnGXbqxxCNJpSvr0XLh9NzNulPr9hCKXP7cYxoyHnAA=="
["EWAY_CARDCVN"]=> string(353) "eCrypted:KuvL5OuwKqfIyXBwMPTRQEw1LQFAAa1QJ5fI1oaj5Gk7Kr9TwjLKPC2tok7P7NfSlfvRMcAY3/lbx+zzKM9BYoDzDKHqezM8KutjR8DJ2NbPxs+ZhDoh9IdrYen7/dxIrQk4v9SmHAPHbGvF25jFEeHAnrg2ydI8NfJEqx83dSkgHzhLbXHxKnVB69LblzL0V+Nt3Qqy+UE7cfkU69ACuBJ1MfLrUXenLPHgdZWCCazGfhHa4kYBONXAgr90bb01N13KKP1KiZQIcGZt7XIB21CSTYDQ3twMXY/VO2H1A7yRFRRw/HpFsC7V6XAUdAc8IWHWFCBg6AbYp58cX/3ayA==" }

Copied from original issue: thephpleague/omnipay-common#32

I think what @alexw23 is after is a way to handle the encrypted card details with the CreditCard object. I'm not sure if any other gateway handles card details like this, which I'd imagine would be needed for a change to the generic omnipay-common library.
Given most of the card data is encrypted, the only test that would work in CreditCard's validate() function is the expiry data tests. While the validate function isn't designed to be called outside the gateway, a possible solution may be to decompose the function into component parts (validateExpiry etc.) - this could also be a means to adding some extra validation checks like for issue number & start date which aren't always required.
I guess it's a question as to how in-scope such changes would be for Omnipay, or if validation should be taken care of elsewhere.

@incarnate I guess it really matters as to whether or not CSE will be a future trend in an effort to bypass PCI compliance.
Maybe the best method would be to have an encryptedCardNumber and encryptedCvc on the CreditCard object. This abstract field can then be used for future implementations of CSE.
In addition we could pass along the first 6 digits and last 4 digits which could later be pulled (when storing payment details to the database). This would also allow for getBrand and other similar functions to be used. As we have the first6/last4 the getNumberMasked function would remain to work (with some minor refactoring).

My feeling is that CSE WILL be a future trend - isn't that what Stripe does? I think Authorize.net offers it too. Maybe Payment Express as well

Does anyone have a fix for this yet? Maybe adding a public function to the CreditCard object called setEncryptedNumber That sets the number parameter but preserves non-numeric characters from being stripped out

No fix as yet.
There is issue thephpleague/omnipay-common#57 to provide a function for this which Graham flagged for version 3. I can see an alpha for v3 was released last week, so a good time to follow up there.

I've added a PR which provides a way forwards on this with a very small amount of code - https://github.com/thephpleague/omnipay-eway/pull/29
It may be that the upstream solution suggests a better change later - but I don't think that should hold this up as it would stay internal to omnipay-eway and be invisible to the calling function

authors: alexw23 eileenmcnaughton garhbod greydnls incarnate

repo: thephpleague/omnipay-eway


text:
Make CommandHandlerPass using the real merged config

Problem
Because container->getExtensionConfig() does not return merged config.
Solution
Use a temporary dic parameter to transport the merged config to the CommandHandlerPass.
Fix #80

Thanks for the fix! I'll tag a 1.1.1 for this after looking at the other PRs.
I do feel this is a weakness in Symfony's setup but as the least bad solution it works. :) (That's no disrespect to you @tyx, you rock for picking this up!)

authors: rosstuck tyx

repo: thephpleague/tactician-bundle


text:
How can I get the extension from the FileUri

I cannot get the extension from the Uri.
use League\Uri\Schemes\File;
use League\Uri\Modifiers\Normalize;
use League\Uri\Modifiers\Relativize;
use League\Uri\Modifiers\AppendSegment;
use League\Uri\Modifiers\Extension;
use League\Uri\Modifiers\Pipeline;

$fileUri = File::createFromString(CACHE_PATH);
$fileUri = (new Pipeline())
	->pipe(new AppendSegment("css"))
	->pipe(new AppendSegment("filename"))
	->pipe(new Extension("css"))
	->pipe(new Normalize())
	->process($path);

echo $fileUri->path->getExtension(), PHP_EOL;

output:
PHP Fatal error:  Uncaught BadMethodCallException: "path" is an undefined or inaccessible property in /var/www/site/www/core/vendor/league/uri-schemes/src/AbstractUri.php:1088

@shtse8 Please read the documentation where it is explained.

@nyamsprod I have fully searched the document and found that the extension only can be got from Path. But not Uri.

no the method is not missing you must use the HierarchicalPath class with the Uri::getPath method

Accessing URI properties¶
All URI objects expose the same methods. You can access the URI string, its individual parts and components using their respective getter methods.
getScheme();    //displays "http"
echo $uri->getUserInfo();  //displays "foo:bar"
echo $uri->getHost();      //displays "www.example.com"
echo $uri->getPort();      //displays 81 as an integer
echo $uri->getAuthority(); //displays "foo:bar@www.example.com:81"
echo $uri->getPath();      //displays "/how/are/you"
echo $uri->getQuery();     //displays "foo=baz"
echo $uri->getFragment();  //displays "title"

But Uri::getPath returns a string instead of HierarchicalPath class. Does it mean I have to create a HierarchicalPath object using the string?

repo: thephpleague/uri


text:
API doesn't have tests

Currently, we're manually testing the API. I plan to make some tests to confirm that its behavior is what's desired. Ideally, we'll use something like Travis CI to automatically run tests and only allow merging to master if they pass.

Got this started in 03a3802. Need to write useful tests now.
Run api/tests/test.sh and it’ll spin up two containers (API server and tester), and then it prints the test output. It also turns red if there are errors and green if everything’s good.
Also, it’s not exactly fast because it creates and destroys the containers on each invocation. I want to eventually have it mount the API and test code in the Docker containers and rerun the tests on changes. Until then, we can do something like ls *.py | entr -cd tests/test.sh while in the api directory.

Travis CI works now too. https://travis-ci.org/thepoly/Pipeline

We may want to move /api/tests up to /tests so that we can keep the tests for the API, real-time editor, and frontend together.

The tests I've written so far send actual HTTP requests to the API server running in a separate container. We should also use (Falcon's testing package)[http://falcon.readthedocs.io/en/stable/api/testing.html] and set up coverage indicators.

repo: thepoly/Pipeline


text:
Not able to access headers within the app when testing

Hi @craig-davis, I'm not able to access the Referer header within the app when testing:
Sample code:

$app->get('/issue', function () use ($app) {
    $referer = $app->request->headers('referer');
    $response = $referer ? $referer : 'Missing referer header';
    $app->response->write($response);
});

Sample test:
public function testWithRefererWithPii()
    {
        $qs = array('');
        $referer = array('Referer' => 'hello');
        $this->client->get('/issue', $qs, $referer);
        $this->assertEquals('hello', $this->client->response->body());
    }

The phpunit results are:
There was 1 failure:

1) FilterPiiTest::testWithRefererWithPii
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'hello'
+'Missing referer header'

/vagrant/tests/FilterPiiTest.php:48
phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:186
phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:138

FAILURES!
Tests: 2, Assertions: 1, Failures: 1.

Any ideas?

I think we need to check the Slim docs or have a peak at the source. I think that the Slim method to fetch the referrer is 'getReferrer()' and follows the two r's spelling rather than the Apache single R.
That said, because you're handing the $referer into the get() as a a header, I'd expect it to be in the $app->request->headers just as you've done. I don't see anything immediately wrong. The testing client is handled over here: https://github.com/there4/slim-test-helpers/blob/master/src/There4/Slim/Test/WebTestClient.php#L28
I'll try to carve some time out later today to look at this. In the meantime, can you repeat the same behavior with other headers?

The code $app->request->headers is running fine on production, it's just failing during the unit tests. I removed the code some time ago, had to use another method (now phpunit spins a webserver and we use guzzle to make "real" http requests). Thanks for your swift answer.

I think it's worth sorting out - something is up if it's not working. I took a quick look at the source of the Slim\Environment::mock and don't see anything amiss. I'll add this test to the project tonight and see if I can replicate the behavior that you're seeing.

I've just added your test to the repo and updated it to work correctly. The key change is in using HTTP_REFERER. I'll admit that I had to go look at the Slim source to extract that bit of knowledge. You'll notice that the Header class extends the Set Helper - and that calls the normalize.

Thanks @craig-davis , nicely done!

Thanks for writing such a great test case and clearly explaining it well. Always great to see people using this little project. Let me know if anything comes up or if you've got ideas to extend it.

authors: craig-davis pedrofaustino


text:
Console Error at Startup with the SWADE system

Hey Ripper, I want to say that this module works well for swade, and does what I need it to do, but this error keeps bugging me and I am trying to resolve it.
Do you have any idea what might be causing this? It only happens at startup from what I can tell, and it seems to be related to SWADE's unique combat tracking code to use cards instead of dice for initiative.
foundry.js:747 TypeError: Error thrown in hooked function '' for hook 'getSwadeCombatTrackerEntryContext'. Cannot read properties of undefined (reading 'CBTurnMarker')
[Detected 2 packages: combatbooster, system:swade]
at Object.fn (main.js:73:24)
at #call (foundry.js:724:20)
at Hooks.call (foundry.js:706:38)
at ContextMenu.create (foundry.js:56005:13)
at SwadeCombatTracker._contextMenu (foundry.js:75329:17)
at SwadeCombatTracker.activateListeners (foundry.js:75121:32)
at SwadeCombatTracker.activateListeners (SwadeCombatTracker.ts:15:11)
at SwadeCombatTracker._render (foundry.js:5138:10)
at async SwadeCombatTracker._render (foundry.js:60343:5)
at async Promise.all (index 3)

fixed


text:
Nextjs app router

The extension is outstanding; however, it encounters issues when integrating Tailwind CSS with a Next.js application during its creation.  If the issue originates from my side, I would appreciate guidance or a resolution to this matter. Thank you.

@Santu-Santra9679809523 What type of issues are you encountering? Are certain features broken or are there exceptions being raised? If there are any errors, they should be logged to the 'Extensions' output window (click the dropdown menu for the Build output window). Also, if you could provide steps to reproduce the issue, that would be greatly appreciated. Thank you!

I'm going to close this issue for now - if you still encounter this issue, feel free to either mention me or re-open this issue.


text:
Create Documentation and Examples.

Create API documentation and example code.

Initial docs generated using JSDoc. Usage examples will be the tests for the moment.


text:
Coping with the new mihoyo's brand name

Article
Presenting the New Brand HoYoverse: Aiming to Provide Global Players With an Immersive Virtual World Experience
Overview
Yesterday, miHoYo introduced its new brand name, 'HoYoverse'. Its endpoints are now extended to use hoyoverse.com.
Providing an alias domain to existing one is quite easy, so mihoyo.com endpoints are still functioning as normal. That being said, it is possible that they may disappear in the distant future.
Replacing endpoint urls
To cope with brand new hoyoverse.com, I changed URLs in genshinstats to alternatively use hoyoverse.com, only if the method using the altered url had passed its test case.
I did not deal with CN endpoints, because no chinese test account was available to me.
Test Results

Summary

search() works only with mihoyo.com endpoint.

takumi mihoyo
takumi hoyoverse

redeem_code() was not functioning with both mihoyo.com and hoyoverse.com  endpoints.

Except these two failing cases, OS endpoints are now of 'hoyoverse.com'.

Looks to me like these are broken too?
404: https://api-os-takumi.hoyoverse.com/community/misc/wapi/langs?gids=2
broken? https://api-os-takumi.hoyoverse.com/community/post/api/forumHotPostFullList

@thesadru
Thanks for your checking. I reviewed my test and as you said get_langs() and get_hot_spots() are broken with hoyoverse.com`.

get_langs() fails with hoyoverse.com. requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api-os-
 takumi.hoyoverse.com/community/misc/wapi/langs?gids=2

get_hot_spots() returns zero length data with hoyoverse.com.Expected :100
Actual   :0
<Click to see difference>

def test_hot_posts():
        hot_posts = gs.get_hot_posts(size=120)
>       assert len(hot_posts) > 100
E       assert 0 > 100
E        +  where 0 = len([])

https://api-os-takumi.mihoyo.com

I used that approach in genshin.py so I'm all for doing it here too. 👍

I'm done with it too :)

authors: binchoo thesadru

repo: thesadru/genshinstats


text:
Missing --listen-addr $masterip under swarm-up.sh

Under swam-up.sh, --listen-addr $masterip:2377 is missing due to which docker swarm doesnt get created. The right command is:
docker swarm init --listen-addr $SWARM_MANAGER_INTERNAL_IP:2377 --secret $SWARM_SECRET

Swarm will default to localhost:2377 if a --listen-addr is not provided. It's working fine for me, I can't reproduce this issue.

authors: ajeetraina thesandlord

repo: thesandlord/google-cloud-swarm


text:
verify_release: add constant 5s HTTP timeout

Add 5 seconds HTTP timeout constant and use it for requests to
GitHub. Setting timeout is recommended by requests docs and flagged
by latest pylint:
W3101: Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (missing-timeout)

prerequisite  for #2087

Pull Request Test Coverage Report for Build 2954206448

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 98.175%

Totals

Change from base Build 2947977924:
0.0%

Covered Lines:
1346

Relevant Lines:
1362

💛  - Coveralls

authors: coveralls lukpueh

repo: theupdateframework/python-tuf


text:
Jakarta

Anyone issues with loading Xplore after Jakarta upgrade? I'm getting a blank page now

I am running it on Jakarta and Kingston, seems to be working OK. What version are you on? I am running 4.4 (latest)

I got it to work after updating to 4.4. Before Jakarta upgrade we were on
4.2
On Mon, Dec 11, 2017 at 2:53 PM, Tim notifications@github.com wrote:

I am running it on Jakarta and Kingston, seems to be working OK. What
version are you on? I am running 4.4 (latest)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/thewhitespace/Xplore/issues/12#issuecomment-350854829,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ASb4wxCAyRMSbT9kPVDEqNfXW6HmYJnvks5s_ZZggaJpZM4Q4uik
.

I can confirm there was an issue with the old version of Xplore working with Jakarta. As with all things, please just make sure you're on the latest version! Thanks! :)

authors: binhftw jneale t1mb0b

repo: thewhitespace/Xplore


text:
Python 2 and 3 compatibility

I want to port your Dagobah and py-dag to Python 3.

Hey I'm sorry, I totally didn't even see this before today. I'll try to take a look this weekend.

If you merge this commit I will prepare Dagobah PR for compatibility with pyhton2 and python3. And thank you for your project.

I'd like to preserve the generator qualities of item iteration in Python 2. Can you try using future.utils.iteritems as suggested here? http://python-future.org/compatible_idioms.html
Please remove the version bump from this PR, we'll do that separately. I will also want to get the Travis build passing in Python 3 before we bump the version and release.
You'll need to rebase and potentially fix any compatibility issues in the new public method I added recently.

Actually you might be able to use this without having to add a dependency, which would be better. https://docs.python.org/2/library/stdtypes.html#dict.viewitems

Done

Please go ahead and do a quick rebase on master so we're only looking at your changes :smile:

authors: chakmidlot thieman

repo: thieman/py-dag


text:
add recipe to use compiled binaries

WIP: Explore the possibility to reduce the complexity to install thin-edge.io during a yocto build by using the official pre-compiled binaries instead of building everything (due to complexities/incompatibilities by cargo-bitbake and meta-rust).

Please, still retain the possibility to compile thin-edge.io locally, without using pre-compiled binaries. This is needed at least for security audit purposes.

Please, still retain the possibility to compile thin-edge.io locally, without using pre-compiled binaries. This is needed at least for security audit purposes.

Yes the plan was to offer the pre-built recipe in addition to the existing recipe (not replace it)

The binary variant of the meta-tedge layer has added to a new repository, https://github.com/thin-edge/meta-tedge-bin

authors: reubenmiller satel-kalletuulos

repo: thin-edge/meta-tedge


text:
[Bug] Incorrect setting in tb-mqtt-transport.yml for AWS microservices configuration

When MQTTS is required, there are sections in the tb-mqtt-transport.yml file that need to be uncommented. One of these is incorrect and causes the service to crash on start-up:
- name: MQTT_SSL_KEY_STORE
  value: "/ssl-config/server.pem"

should be:
- name: MQTT_SSL_PEM_CERT
  value: "/ssl-config/server.pem"

Hello, @greg-mcnamara
Thanks for the note. Fixed.

authors: Ultrazombie greg-mcnamara


text:
3d shape that looks identical to 2D in style?

I was thinking about explaining the 2D and 3D shape to a student. I was wondering if one version of the 3D shape, maybe the default without contours, could use the same colors and styles as the 2D shape. So the connection would be super clear that the 2D is just a slice of the 3D. In general I still find the 2D shape powerful, so helping new users to see the close connection between the two seems valuable.

I tried it in this way:
One more item was added in the 3D Data pop-up menu. If this new item was selected, the 3D shape would be drawn in the 2D plotting style. The following contents are adjusted so that the 3D plotting looks much the same to the 2D shape: 1) scale factor, 2) default view direction, 3) colors of deformed and undeformed shapes, 4) line width, and 5) mesh density.
By default, it looks like this:

If rotated, the 3D shape looks like the following:

repo: thinwalled/cufsm-git


text:
Heizung ändert Temperatur trotz „Fenster auf“

Hallo zusammen,
ich weiß nicht, ob meine gestrige Beobachtung mit #356 (finde in der App gerade keine Möglichkeit zur Verlinkung) zusammenhängt.
Ich hatte in einer Heizgruppe ein Fenster offen. Entsprechend war die Temperatur auf 6° gesetzt. Dann habe ich die Gruppe im Raum über den Status (oberer Bereich) geöffnet. In dem Moment konnte ich noch sehen, wie von 6° auf 22° gestellt wurde. Die HmIP-eTRV haben dann auch "Fenster auf" und 22° angezeigt.
Der Fehler kann m. E. in dem Fall nur aus den HomeKit-Komponenten kommen, da man bei offenen Fenstern ja am Radiator oder in der CCU machen kann, was man will. Das interessiert die Steuerung ja absolut nicht, solange ich über ein Programm nicht die Lüge "Fenster zu" verbreite.
LG,
Marcel

Hmm evtl. könnte es aus einer Änderung des Control Modes kommen.
Also wenn ein Event dazu führt, das von Auto auf Manuell gestellt wird. Das sollte aber nur beim Ändern des HeatingCooling Modes in HomeKit passieren.
Bitte mal testen, ob dieses Verhalten reproduzierbar auftritt wenn:
Thermostat im Automatik Mode
Fenster wird geöffnet
Home aufmachen und Thermostat aufrufen ...
Dann sollte, wenn die Temperatur wieder auf 22 Grad geändert wird der Modus im Thermostat auf Manuell wechseln.

Hallo Thomas,
werde ich testen. Meine Radiatoren waren gestern auf jeden Fall auf manuell. Da ich - im Gegensatz zu den meisten - den Auto-Modus bei Abwesenheit und den Manu-Modus bei Anwesenheit nutze.
LG,
Marcel

Also ich hab es gerade mal im Manuellen Mode probiert. Da tritt das nicht auf.

Manuell 22 Grad via HomeKit

Warten bis der Heizungsregler das hat.

Fenster auf

Temp geht auf 12 Grad am Heizungsregler

Home App wieder auf : Temp steht auf 12 Grad bleibt auch

Fenster zu

Temp springt auf 22 am Regler

Home App auf.  Temp geht da auch auf 22.

Hast du die Home App nur geöffnet oder auch das Thermostat aufgerufen?

Ich habe jedes Mal Home gekillt und das Thermostat mit ForceTouch aufgerufen. Das die Detailview mit dem großen Temperaturselektor angezeigt wird.
Eben eben noch mal im Auto Mode probiert. Da verhält es sich erst mal genau so wie es soll. Die Temp bleibt auf 12 Grad stehen.
🤔

Ok :) werd's möglichst nachher komplett testen... vllt liegt's ja am Status-Icon...

Wenn das reproduzierbar auftritt bitte mal das Debuglog anschalten. Der Thermostat Service ist sehr gesprächig warum was wie berechnet und gesetzt wird.  Das würde mit helfen.

Bin noch unterwegs, aber muss ich das Addon neu starten, nachdem ich Debug einschalte?

nope

Guten Morgen,
anbei die Logs. Ich kann es nur im Manu-Mode reproduzieren. Logs gibt es trotzdem für beide.
LG,
Marcel
auto-mode.txt
manu-mode.txt

OK das einzige Mal wo die Temperatur gesetzt wird ist durch einen Befehl aus Homekit, der den "TargetHeatingCoolingState" setzt. Im Manu Log um 08:24:22 wird der Status auf Heizen gesetzt. Es wird dann die letzte gesetzte Temperatur ermittelt (das waren 22 Grad) und das ans Thermostat geschickt.
Ich sehe aber das Problem: Als zuletzt gesetzte Temperatur merke ich mir nur die Temperatur die aus HomeKit als Soll kommt. Also quasi die letzte Einstellung.  Es kommt vorher ein Event aus der CCU welcher die Soll Temperatur auf 6 Grad setzt. Ich werde den mal nutzen um die dort gesendete Temperatur auch zwischenzuspeichern.
Ob damit was anderes kaputt geht wird sich zeigen 😎

Hallo Thomas,
klingt gut ;)
LG,
Marcel

siehe Nachtrag oben. So einfach ist es nicht.

Es gibt aber im Channel 1 einen Datenpunkt Window State. Den könnte ich quasi als inhibit für HomeKit nutzen.
Wenn der gesetzt ist, gehen keine Events aus HomeKit an die CCU ? ...

Verdammt ;) also für mich ist das auch wirklich kein dringendes Problem... ich verwende HomeKit weiterhin nur zur Sprachsteuerung, alles andere mache ich über die EASY App... mir ist es halt nur aufgefallen... deshalb wollte ich es melden...

Das klingt für mich richtig... die CCU interessiert ja auch keine Eingabe, solange ein TFK offen ist...

ich bekomme das gerade nicht mehr reproduziert, daher closed

authors: blackbasket thkl

repo: thkl/hap-homematic


text:
Batteriespeicher mit SoC und Ladezustand

hallo @thkl ,
bei der Integration eines Varta Batteriespeichers als BatVarAccessory könnte ich eine Mischung aus #77 und #118 benötigen:

Die Batterie ist über eine Variable „Ladestatus“ (State of charge, %) eingebunden. Dieser wird korrekt als Batteriestatus übernommen, auch wenn Apple HomeKit meint, das Gerät nicht zu unterstützen
„Batterie wird geladen“ (Charge) ist fix auf „Nein“. Dabei hätte ich auch eine Variable „Charge“ (W) dafür.

Gibt es da überhaupt eine Möglichkeit?

Btw: Ja HomeKit ist mit den "Batterie Only" Geräten irgendwie unglücklich.  Die Batterie Characteristics sind eher für Geräte gedacht die mit Batterien betrieben werden um deren Zustand in HomeKit anzuzeigen.

Danke fürs Feedback Thomas!
überhaupt keine Eile, wollte es nur einloggen.
Insgesamt läuft mein HAP-Homematic absolut rund, auch mit/nach Upgrade der Apple Architektur

authors: ChrWi thkl


text:
unable to configure

System Health details
Hi!
Thanks for your work. I would really like to try your integration but I am unable to configure it.
There is more data needed than for the regular integration and I didn;t have problems ffinding spotify oauth client id and secret.
But it looks like more data is needed to be able to use spotify connect and I have no clue where to get them from?
What is a spotify connect canonical id and where to get it from?
Is there any documentation regarding configuration?
Checklist

[X] I have enabled SmartInspect debug logging for my installation.
[X] I have filled out the issue template to the best of my ability.
[X] This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
[X] This issue is not a duplicate issue of any previous issues..

Describe the issue
not being able to connect to devices
Reproduction steps
add integration, configurre user, try to play
Debug logs
Failed to perform the action media_player/select_source. SAM1005E - The "SpotifyConnectLoginId" configuration option was not supplied, which is required in order to reactivate a Spotify Connect de...

where to get it from? and where to put it?

Diagnostics dump
that's all

fixed it. this was regular email username and pass

thanks for your work

@lukaszzyla
Based on the "SAM1005E" message, it appears that you didn't have the Spotify LoginId configuration option set. This value is required when the SpotifyPlus integration has to re-activate a Spotify Connect device.
You will need to edit your SpotifyPlus integration configuration options, and ensure that the LoginId (and possibly the Username, and Password) value is set.  That link also talks about how to find the canonical LoginId value.
Note that the LoginId value is required as of SpotifyPlus version 1.0.105 (released on 2024/10/04). This Updated Spotify Connect device processing to only require the userid and password parameters when authenticating to devices that require user and password values. Some devices only require a loginid value (e.g. spotifyd, Spotify Connect AddOn, librespot, Sonos, etc), while others require the userid and password values as well. I would enter all 3 just to be sure.
Glad you got it figured out.
FYI - I also have a SpotifyPlus Card dashboard in beta test right now if you're interested.  More information can be found at this discussion link.  Enjoy!


text:
Graphfeature

Functioning Graph class with helper classes node and adjacency.
Includes tests for the integrity of the created graph.

Pull Request Test Coverage Report for Build 21

56 of 114 (49.12%) changed or added relevant lines in 5 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-50.9%) to 49.123%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/graph.cpp
21
23
91.3%

src/trailstructure.cpp
0
56
0.0%

Totals

Change from base Build 20:
-50.9%

Covered Lines:
56

Relevant Lines:
114

💛  - Coveralls

Thank you very much for your first contribution.
I will review your code as soon as possible.

In the adjacency represantation the length of each array must be the same
number as the order of the graph.
The adjacency matrix is represented as a NxN matrix, so the length of each
array will be the order of the graph.
That does not mean that each node has to have the same degree as the order.
The result of that input would be:
adj_mtrx[0] = { (value: 1, index: 0), (value: 1, index: 1), (value: 3,
index: 0) } : degree: 3 (two edges to node 1, one edge to node 3)
adj_mtrx[1] = { (value: 0, index: 0), (value: 0, index: 1), (value: 2,
index: 0)}  : degree 3 (two edges to node 0, on edge to node 2)
adj_mtrx[2] = { (vallue: 1, index 2), (value: 3, index: 1) : degree 2 (one
edge to node 1, one edge to node 3)
adj_mtrx[3] = { (value: 0, index: 2), (value: 2, index: 1) : degree 2 (one
edge to node 0, one edge to node 2)
I verified that result, and it is what is being created. It is confirmed in
the tests.
2018-03-13 20:20 GMT+01:00 Andrej Sajenko notifications@github.com:

@andrej-sajenko commented on this pull request.
In src/graph.cpp
https://github.com/thm-mni-ii/sea/pull/7#discussion_r174254302:

example:

n         1       2       3

1   *    0   *   1   *   1   *

2   *    1   *   0   *   2   *

3   *    0   *   2   *   1   *

/
+Graph::Graph(unsigned int* adj_matrix, unsigned int _order):order(_order) {
nodes = std::vector<Node*>();

for(unsigned int i = 0; i < order; i ++) {

   auto * n = new Node(adj_matrix[i], order);

Taking the graph that you use in your test and the graph constructor,
adj_mtrx[0] = new unsigned int[order]{0,2,0,1};
adj_mtrx[1] = new unsigned int[order]{2,0,1,0};
adj_mtrx[2] = new unsigned int[order]{0,1,0,1};
adj_mtrx[3] = new unsigned int[order]{1,0,1,0};
all adjacency arrays must have the same length.
How this representation?
adj_mtrx[0] = new unsigned int[2]{1, 2};
adj_mtrx[1] = new unsigned int[2]{0, 2};
adj_mtrx[2] = new unsigned int[3]{1, 3, 0};
adj_mtrx[3] = new unsigned int[1]{2};
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/thm-mni-ii/sea/pull/7#discussion_r174254302, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AQIikLXuIsjbgyqrpto5_xvm98weIDZjks5teBwUgaJpZM4Soh8m
.

I thought so :)

A matrix representation of a graph requires a lot of space, in total θ(n2 log n) bits.
An adjacency representation requires only θ((n + m) log n) bits.

I suggest we use the second representation.

I don't see why we can't have multiple constructors, i just chose this one
first because it's the easiest to implement.
For example a constructor that takes a FILE pointer.
Adjacency representation has the problem that you can't create a
two-dimensional array with both dimensions of variable length.
And since I did not want to tackle that problem before i had a working
graph i chose the easy way first.
I can implement it using vectors for example, but those will also a small
amount of extra size.
Should i add another, more space-efficient constructor before making
another pull request?
2018-03-13 21:31 GMT+01:00 Andrej Sajenko notifications@github.com:

I thought so :)

A matrix representation of a graph requires a lot of space, in total
θ(n2 log n) bits.
An adjacency representation requires only θ((n + m) log n) bits.

I suggest we use the second representation.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/thm-mni-ii/sea/pull/7#issuecomment-372807992, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AQIikAA7U7IWh3bAWUzCqWbBTq2gUCQiks5teCyEgaJpZM4Soh8m
.

Having several options how to create a graph sounds great. We should definitely have such possibilities.
But we should keep it simple and clean.
A graph class should have only one representation.
If we require another one we will create another implementation of a graph that fits our needs.
Having one class that can do everything sounds great, but leads to a bad cohesion.
To realize a file constructor, we could create a class that is responsible for the creation of a graph.
Something like. GraphReader::fromFile(). But this should be another pull request.
You could use vectors, but you don't need them.
As I can see your node class already uses arrays.
Node(const unsigned int _adj[], unsigned int len);

Let your graph constructor take an array of nodes, the total number of nodes, and your done.

I rebased your changes into the commits 1790db466caaea0d1d470a5dee8c34fdd606652c, 72321f8adab155da242a7c98636e0383b2bd688f, and 17844b22247d40cfe7da4be72d6634b949aa3723 and pushed it directly into the master.

authors: 1yay1 andrej-sajenko coveralls

repo: thm-mni-ii/sea


text:
renamed createIncognitoBrowserContext to createBrowserContext in order to support latest puppeteer breaking changes (v22.0.0)

renamed createIncognitoBrowserContext to createBrowserContext in order to support latest puppeteer breaking changes (v22.0.0): https://github.com/puppeteer/puppeteer/pull/11834

Thanks, a new version has been published!

authors: APN-Carmine thomasdondorf

repo: thomasdondorf/puppeteer-cluster


text:
Remove rule name

Description
Remove rule name

Coverage: 93.766%. Remained the same when pulling 6c396cb51d8aea4099c7ef632395b9ff4212af7b on readme-fix-flag-example into 8388d0c62cc74cd174d6d0e4672d119348692692 on main.

authors: coveralls thomaspoignant

repo: thomaspoignant/go-feature-flag


text:
Duplicate happens when uuid does not match data

We found some cases when an Infoton only had system in fields in Cassandra. We must understand why. Nonetheless, This causes the following chain, if I'm not mistaken:

IRW logs "uuid does not match" and return an EmptyBox[Infoton]
IMP understands there is no current version.
Indexer only creates an IndexNewInfoton command for new uuid.
We end up with two "current":true uuids on that path, both with ES version 1.

We were be able to reproduce it in pe as follows:

Ingest an Infoton.
Using cqlsh, remove one of its data fields.
Ingest original Infoton again.
Result: Duplicate.

We can easily distinguish between no uuids at all for a path, and an unreadable uuid. The latter should not return an EmptyBox but a Failure!

repo: thomsonreuters/CM-Well


text:
Add Java EE 8 Security example

Example of secured servlet via Java EE 8 Security annotations.

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

add to whitelist

retest this please

Previously, the Windows jobs failed because they couldn't reach the Sonatype Snapshots repo. I configured the Windows agents to also use our local Nexus, so the Windows jobs should be passing now.

Perfect, thanks for relaying the problems to me :). What about the Windows UberJar one, is there something relevant?

The Windows uberjar failure is unrelated (JSF test).

authors: Ladicek TomasHofman thorntail-ci

repo: thorntail/thorntail-examples


text:
Update copy and styles in footer

Good good! Do it!

authors: Magnus-G brendastorer

repo: thoughtbot/empties


text:
Support of accepting object instead passing symbol of type of object

For example we have
fill_form(:user, user_attributes)

and this is used in one spec file.
Lets image we have two or three registration forms through devise or any other authentication plugins and in our system we have two registrable resources for example admins and users or three admins, users, members.
So then instead writing this line
fill_form(:user/:admin/:member, user/admin/member_attributes)

in each scenario for per resource I want to declare it once on my shared_example(https://www.relishapp.com/rspec/rspec-core/docs/example-groups/shared-examples) file for example
fill_form(resource, resource_attributes)

By standard way for this purposes I need to create
let(:resource_name) { admin/member/user.class.name.downcase.to_sym }

and pass it to this
fill_form(resource_name, resource_attributes)

Is it  possible to add this or it's overhead?

Hi there,
I'm not actually sure what you're asking for here. Scenic doesn't have anything to do with rspec helper methods you're referring to.
It would be clearest in your tests to spell out the resource you're filling. Looking at a line like fill_form(resource_name, resource_attributes) seems to me like it doesn't tell you what's happening, whereas fill_form(:member, attributes_for(:member)) makes it fairly clear what's happening.

But what about DRY? @calebthompson
In case of password reset we have three resources and tests for password reset would be look the same with differences in expectations in the end of spec.
Here some examples:
require "rails_helper"

feature "Password Reset for Admin" do
  let!(:resource) { create :admin }
  let(:resource_name) { resource.class.name.downcase.to_sym }
  let(:attributes_for_resource) { attributes_for :admin }

  background do
    visit sign_in_path
  end

  scenario "Admin resets his password" do
    click_link "Forgot password?"

    fill_form(resource_name, email: resource.email)

    click_button "Send"

    open_email(resource.email)

    visit_in_email("Change my password")

    fill_form(resource_name, :edit, attributes_for_resource.slice(:password, :password_confirmation))

    click_button "Update password"

    expect(current_path).to eq admin_root_path
  end
end

And tests for member/user would be the same except titles and expectations in the end
expect(current_path).to eq admin/member/user_root_path

To eliminate duplication  I've separated test actions into the shared_context and spelled in the each scenarios for member/admin/user resource_name, attributes_for_resource
It's about passing an object instead a symbol.
For example it would be a good style to spell this one fill_form(member, attributes) where member and attributes are variables in the test case.
Thanks!

authors: IlkhamGaysin calebthompson

repo: thoughtbot/formulaic


text:
Fix path

The original change was to add a style property, but it appears to
have gone through a rebase or other conflict and was left using the
wrong path.
History:

https://github.com/thoughtbot/neat/commit/99f9255a55eb5d016042ca6e129572803de0a6a8
https://github.com/thoughtbot/neat/commit/a4820d74180ddaa6b7cd89610f5bf045ff774052
https://github.com/thoughtbot/neat/commit/2666dc829133578f0a629595cb788b8da7fa1cd0
https://github.com/thoughtbot/neat/commit/5f15317c170dbf98a482091d5879cf19564a8298

yep, good fix
bout time to cut a release

👏

authors: tysongach whmii

repo: thoughtbot/neat


text:
PID in initprocess of container is not reflect to the container

information
container_data = {'nics': [{'type': 'default', 'name': 'defaultnic'}], 'flist': 'https://hub.grid.tf/tf-bootable/ubuntu:16.04.flist', 'storage': 'zdb://hub.grid.tf:9900', 'mounts': [], 'initProcesses': [{'name': 'sleep', 'args': ['1000s'], 'id': '3777'}], 'hostNetwprking': False, 'hostname': '5d4ec9b76c3c48fbbccbe0', 'ports': [], 'zerotierNetwork': '', 'privileged': False, 'env': []}

Steps:
1- create container with this data.
Actual Result
The initprocess is created, but the PID is different from PID in data (should be 3777)

err .... NO!
a process in a container lives in the CONTAIER's process table.
the container 1 (the host) sees all processes in his own table, but from his own view.
This is not a bug,but a feature ;-)
plz close this, to be never spoken of again.

@AhmedHanafy725 the id in the init_processes is used for the job id, it doesn't set the process id. The readme of the container service seems to have incorrect info. I'll close the ticket and update the readme.

authors: AhmedHanafy725 delandtj serboctor


text:
harden all string name inputs

All inputs everywhere for names need to be valid python identifiers not just "not empty"

Commit_ID 8ac038121caabd81c0d119e8544132015d045917 , Branch development

authors: Dina-Abd-Elrahman xmonader

repo: threefoldtech/js-sdk


text:
show links for alerts to logs in alerta UI

alert objects is linked to a logitem, let's expose that in the UI

we have admin interface

authors: despiegk xmonader