Failed to execute SQL with error: TypeError: The database connection is not open

I spent my night starting with better-sqlite3, however, I've got stuck with the simple code snippet.
import Database from 'better-sqlite3'
import * as fs from 'fs';
const db = new Database('tax.db', { verbose: console.log });
db.pragma('journal_mode = WAL');

fs.readFile('foobar.sql', 'utf8', function(err, data) {
    if (err) {
        console.error('failed to read tax.sql: ', err)
        throw err;
    }
    console.log('read SQL:', data)
    try {
        db.exec(data)
    } catch (err) {
        console.error('Failed to execute SQL with error:', err)
    }

});

db.close()

The foobar.sql just contains SQL for initially creating two tables:
CREATE TABLE IF NOT EXISTS EMP (
   ID                   INT PRIMARY KEY AUTOINCREMENT,
   FULLNAME             CHAR(50) NOT NULL,
   BIRTHYEAR            INT      NOT NULL,
   POSTPLACE            CHAR(50),
   CREATED              datetime default current_timestamp
);

CREATE TABLE IF NOT EXISTS SAL (
   ID                   INT PRIMARY KEY AUTOINCREMENT,
   INCOME               REAL NOT NULL,
   YEAR                 INT NOT NULL,
   TAXPLACE             CHAR(50),
   UPDATED              datetime default current_timestamp,
   TAXEE_ID             INT NOT NULL REFERENCES EMP
);

My personal experiences of my initial playing with better-sqlite3 in three hours is that it lacks of good enough tutorials/documentations, why not make some code examples for those APIs helping new beginners to start with. When I googled that error message in the title, there are not too many hits. A good documentation will definitely help better-sqlite3 to speed up its popularity over node-sqlite3, IMHO

Failed to execute SQL with error: TypeError: The database connection is not open
at Database.exec (/Users/dupapa/tmp/appiumjs/skatte/node_modules/better-sqlite3/lib/methods/wrappers.js:9:14)
at file:///Users/hallo/myapp/internal/db-init.js:13:12
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3)

The error is precisely correct. You're closing the db immediately after scheduling the fs.readFile.

It might help to go through a tutorial or two on how node schedules callbacks--as this shows, it can be decidedly confusing!

Thanks! It's my bad! it now works well after calling db.close() in the try-finally block.


Fix international tilde character

Alt+N is a tilde character on all tested international keyboard layouts, as well as on UK and US.

This should work well enough for now until https://github.com/zeit/hyperterm/pull/214 lands

It fixes the non working tilde ~.
However the "`" still doesn't work.

Can you send me the debug keycodes for the non-working keys?
On Sat, Aug 6, 2016 at 4:10 PM Ali<EMAIL_ADDRESS>wrote:

It fixes the non working tilde ~.
However the "`" still doesn't work.
[image: image]
https://cloud.githubusercontent.com/assets/7140800/17457398/50526e68-5bf7-11e6-8b04-532be4cf847b.png
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/zeit/hyperterm/pull/584#issuecomment-238027913, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAC5sxSmTsGLY3tNhhS_dyQSIRKZL1ynks5qdKPOgaJpZM4JeSPv
.

--
James Hall
Director
Parallax Agency Ltd
M.<PHONE_NUMBER>0

Haha, I edited my comment this very second :D
The debug-output of \´ is {"key":"Dead","code":"Equal","shiftKey":false,"metaKey":false,"altKey":false}"
The debug-output of ` is {"key":"Dead","code":"Equal","shiftKey":true,"metaKey":false,"altKey":false}"

This has been extended to cover ` and ´

Tilde and backquotes works here with Italian keyboard. Still a small issue that prevents me to do ´ only with bash, but it's related to metakey bash special functions, and seems to affect only me. On nano or vi all that keys works perfectly ;)
So, for me it's ok!

MetaKey bug that prevents me to do ´char is locale related issue. It's related to #441 and will be fixed by #605.

it fixes the ~ key on french keyboard.
But there is still a problem with ` key {"key":"Dead","code":"Backslash","shiftKey":false,"metaKey":false,"altKey":false}
And ^ key {"key":"Dead","code":"BracketLeft","shiftKey":false,"metaKey":false,"altKey":false}
I can make a PR for these keys if needed


Multi-city weather display support

Thanks UT! These suggestions are very helpful and have been implemented.

Implemented changes per request.

All the features look really cool! Is there any way for users to see a few autocomplete options, like a small drop down that shows the top 3 results they could be looking for?

Hi, Zhuoli! Great work! I would suggest to move two buttons underneath the search input. It would look better I would say. Thanks!

How about the clear button appears only when more than 1 location is searched. and not available if only one location is searched.
This causes an issue, a user can clear even if has searched for single location.. then leaving the weather empty.
Also, see if possible to clear the search input too, and make the search form, and buttons to have same height

Please do try to implement this if possible, otherwise resolve the merge conflicts @SandyCreek

@Pheogrammer @beatrixcendana Suggestions have been incorporated in last commit. @tapaswini-kodavanti your suggestion is great but I believe other fellows are working on it. @utk09 there appears to be a merge conflict that I don't seem to have authorization to resolve.


Many Things Don't Need a TypeChecker Part 2

This PR changes AttributeChecker and UnsupportedProtocolVisitor to not store TypeChecker properties, and makes a handful of TypeChecker members static.

@swift-ci please smoke test

@swift-ci please smoke test


Solidify the behavior of adding objects

Aims to solve #395 among other things.

No, this isn't it.


tern fail to load condense generated file for cocos-js game engine?

Hi forks,  I am a game developer woking in the  cocos-js (https://github.com/cocos2d/cocos2d-js), I try to use vim along with tern for the project. I followed the tern document (http://ternjs.net/) and able to generate a condense file for the engine
find cocos2d | grep \.js$ | xargs condense > def-cocos2d.json

But when I try to load the def file by tern, it just throw an exception:
        else throw new Error("Invalid !type spec: " + tp);
                   ^
Error: Invalid !type spec: number
    at passOne (/$TERN_DIR/tern_for_vim/node_modules/tern/lib/def.js:363:20)
    at doLoadEnvironment (/$TERN_DIR/tern_for_vim/node_modules/tern/lib/def.js:443:74)
    at Object.exports.load (/$TERN_DIR/tern_for_vim/node_modules/tern/lib/def.js:463:7)
    at /$TERN_DIR/tern_for_vim/node_modules/tern/lib/infer.js:753:13
    at Object.exports.withContext (/$TERN_DIR/tern_for_vim/node_modules/tern/lib/infer.js:767:18)
    at new exports.Context (/$TERN_DIR/tern_for_vim/node_modules/tern/lib/infer.js:736:13)
    at Object.signal.mixin.reset (/$TERN_DIR/tern_for_vim/node_modules/tern/lib/tern.js:129:17)
    at Object.exports.Server (/$TERN_DIR/tern_for_vim/node_modules/tern/lib/tern.js:111:10)
    at startServer (/$TERN_DIR/tern_for_vim/node_modules/tern/bin/tern:144:16)
    at Object.<anonymous> (/$TERN_DIR/tern_for_vim/node_modules/tern/bin/tern:139:14)

I had to fix another bug (6f67b12) before I could get the json file I generated from cocos2d to work, but after I fixed that, it loaded fine. This is what I got: https://gist.github.com/marijnh/50860043e32ac83bedab

Hi,Could you use cocos-js right?


How to disable Delete actions from Show view?

Hi guys, sorry for all the questions, I'm finishing my first project with ActiveAdmin and I want it to be as polished as possible.
I don't want people to delete some object, so I implemented a before_destroy hook to return false; but, when you open the show action, the delete button appears. How can I hide it? (I've already hidden actions in the index view)

Would love to see this sort of thing documented. I'm finding I'm using the issue tracker to answer documentation questions...

To do with Cancan I am trying this:
  disallowed_actions = []
  disallowed_actions << :index unless proc { can? :read, User }
  disallowed_actions << :show unless proc { can? :read, User }
  disallowed_actions << :new
  disallowed_actions << :create
  disallowed_actions << :update unless proc { can? :update, User }
  disallowed_actions << :destroy unless proc { can? :destroy, User }

  actions :all, :except => disallowed_actions

Then in index I have:
    column "Actions" do |u|
      if can? :read, u
        link_to "View", admin_user_path(u)
      end
    end

I was trying Rails Admin before and Rails Admin does all this out of the box.  It will also ensure this authorization happens on the back end.
I want role based security, so a user can delete certain users but not users with roles higher than himself.  Is this possible with Active Admin?  I am can do it on the front end.

Bump

Any ideas here? The global option isn't sufficient, I want to restrict "editors" from deleting things via CanCan. The documentation doesn't seem to really say and other tickets have mentioned using :if and a proc with actions except that doesn't seem to actually work.

First you can use the   controller.authorize_resource
to have activeadmin ask cancan to authorize resources.
Then you want to restrict showing the link on the index?  Or the delete buttons on the show & edit pages?

Both preferably.
I'm calling controller.authorize_resource. I have a similar disallowed_actions scheme as you outlined above for a resource but it doesn't seem to care about my except array.
    # ability.rb
    user ||= AdminUser.new # guest user (not logged in)
    case user.role
      when "admin"
        can :manage, :all
      when "editor"
        can :manage, Publisher
        cannot [:destroy], Publisher
      end

and
    # admin/publishers
   disallowed = []
   disallowed << :destroy unless proc{ can? :destroy, Publisher }

   actions :all, :except => disallowed

Not sure, that should work, try troubleshooting with a static disallowed array.  Also confirm if it's :destroy or :delete

A static array works as expected. I tried specifying master in my Gemfile hoping maybe fix would come down but no luck

A static arrow for actions or a static array in :except?  If the :except works than it's an issue with how you are calling cancan i guess

Static array in :except. I'm calling cancan as shown above. I have admin and editor roles. Strangely enough:
    # admin/publishers
   disallowed = []
   disallowed << :destroy unless proc{ can? :destroy, Publisher }

   actions :all, :except => disallowed

Shows view, edit and delete in the index for both account types, but doing this:
index
  ...
  if (can? :destroy, Publisher)
    column "Test" do |publisher|
      "hi!"
    end
  end
end

Only shows the "Test" column when I'm logged in as the Admin, and not as the Editor.

So passing the proc is not behaving as expected.  We want it to evaluate each time, but apparently it is not.  Thinking about it, that statement is only evaluated on initialization, so the unless portion is not evaluated each time.  What I posted was an attempt, I don't think there are hooks in place to pass procs like that.
If you don't care about the buttons, just remove the buttons with CSS and use links that you can create via views or procs in the code.


wsl.exe cannot be called by IIS ( Windows Server 2022 )

Windows Version
10.0.20348.1607
WSL Version
<IP_ADDRESS>
Are you using WSL 1 or WSL 2?

[X] WSL 2
[X] WSL 1

Kernel Version
<IP_ADDRESS>
Distro Version
Ubuntu18.04
Other Software
Internet Information Services Version 10.0.20348.1
ASP.NET Core Runtime 6.0.16 (Hosting Bundle)
Repro Steps
I am writing a .NET Core 6 web page that executes WSL parameters using the process.StartInfo.FileName to run PowerShell, and returns the result.

Steps

Enable IIS
Enable WSL
Install ASP.NET Core Runtime 6.0.16 (Hosting Bundle)
Restart Computer
Create a website in IIS
Set up the application pool identity account (Have an account with WSL installed)

Expected Behavior
On Windows Server 2019, it can execute normally and return the execution result of WSL

Actual Behavior
Windows Server 2022 Execution Results (The same happens on Windows 10, 11 22H2)

Return
The system cannot find the path specified.
Use where.exe to query whether the location of wsl.exe exists

execute with absolute path

Return
The system cannot find the path specified.
Diagnostic Logs
No response

/logs

/dupe #9231


dang-841/dropdown and modal bug

JIRA

https://lobsters.atlassian.net/browse/DANG-841

Link to dashboard PR: https://github.com/lob/dashboard-vue/pull/402

Description

The problem: The modals/states were being 'cut off' due to not having the appropriate y overflow.  Scrolling was not possible.

The fix: 1. Changed overflow-x-visible to overflow-y-auto 2. Added a listHeight prop to dropdown so height can be specified if necessary (such as on state dropdown) and dropdown will become scrollable.

This PR is the first part of changes that will also be submitted in Dashboard-Vue.

Reviewer Checklist
This section is to be filled out by reviewers
Testing

[ ] This code was tested by somebody other than the developer. Do not merge until this has been done.

The tooltips look good!
I still see the content flowing outside the modal in the laptop screen - are you addressing this separately?

This has to be merged into dashboard, then the change will be visible

of course, ignore my potato brain! I thought I was looking at the dash pr

Oh, actually, one additional comment to the above - can we make it clear that the height passed in should be Tailwind heights? So a user doesn't end up trying to pass in "300px" and then doesn't know why it's not working. ☺


SetID for having two Manipulate

Hi,
This takes care of issue #101
Instead of working with push/pop it just do SetID.
Tell me what you think about.

I'll test your PR this weekend. Thank you!

Great!!

Testing the PR and I've found some bugs on my side and I'm also trying to improve few bits here and there. This will take a couple days (a week probably) but as far as I tested, your changes work fine.

Thats great, I will be waiting your news!!

Hi
I started with your branch and added a bunch more stuff. Can you please try this branch : https://github.com/CedricGuillemet/ImGuizmo/tree/setID2
And tell me if you find issue. If it's ok, I'll push to master.
Thanks!

One warning
C:\LuaGL\gitsources\anima\LuaJIT-ImGui\extras\ImGuizmo\ImGuizmo.cpp:30: warning: "_malloca" redefined
 #define _malloca(x) alloca(x)

In file included from C:/mingws/i686-8.1.0-release-posix-dwarf-rt_v6-rev0/mingw32/i686-w64-mingw32/include/stdlib.h:741,

                 from C:/mingws/i686-8.1.0-release-posix-dwarf-rt_v6-rev0/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include
/c++/cstdlib:75,
                 from C:/mingws/i686-8.1.0-release-posix-dwarf-rt_v6-rev0/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include
/c++/stdlib.h:36,
                 from C:/mingws/i686-8.1.0-release-posix-dwarf-rt_v6-rev0/mingw32/i686-w64-mingw32/include/assert.h:17,
                 from C:/LuaGL/gitsources/anima/LuaJIT-ImGui/cimgui/imgui/imgui.h:81,
                 from C:\LuaGL\gitsources\anima\LuaJIT-ImGui\extras\ImGuizmo\ImGuizmo.cpp:23:
C:/mingws/i686-8.1.0-release-posix-dwarf-rt_v6-rev0/mingw32/i686-w64-mingw32/include/malloc.h:154: note: this is the loc
ation of the previous definition
 #define _malloca(size) \

Finally merged it in master. Thank you for your patience :)

Thank you for your patience :)

No worries!!
Still left the _malloca warning issue

Hello, new here.
I've had some trouble with rendering ImGuizmo when I have multiple OpenGL contexts utilizing it. My research led me here, so I'm assuming SetID() would solve my issue? Should I use it before Manipulate()? Or Before BeginFrame() ?

Yes, look at the sample, it allows having multiple gizmos. You can control the number with a slider.

Yes, I saw it and it should be used before Manipulate().
Great work, thanks a lot. Just a small thought, SetID needs some comments in ImGuizmo.cpp to explain what it does. I saw it and ignored it while I was investigating, didn't think it was relevant to my problem.
Once again, thank you for your great work.

Sound like a good idea, can you create a PR with a comment that would have helped you?


bios-boot-tutorial: update how accounts are staked and funded

The only question I have is whether the length of time that it might take someone to run this with a high number of users should be documented either in the script or in the documentation associated with the script.


Quick open does not respond to mouse click anymore

In todays insider you cannot click a result anymore.

Possibly from https://github.com/microsoft/vscode/pull/169680 cc @roblourens

See also #170556


fix(IndexedDB): prevent InvalidStateError on failed open() request

Fixes #647.
Related to #70.

@tofumatt please merge this if you are fine with it.

[Here is a codepen using the code from this PR(http://codepen.io/thgreasi/pen/ZLyzqr).
Seems to work on Chrome (+ Private Browsing) and the Error no longer shows up on FF Privare Browsing. Also works in Edge Private and IE11 after replacing the ES6 parts.


Good Idea to add a int16_t uart_get_byte(void)

Hi,
Many thanks for the great samples. Do you have any good idea to add a uart_get_byte? Do you think it is a good idea to add a ringbuffer and then fill this buffer in the usart_rx_check function then I can add a general usart_get_byte() as normal.
thx
mathias

You can use generic ringbuffer and then use ringbuff_read to read next character.
I have one: https://github.com/MaJerle/ringbuff

Hello,
Many thanks. So do you mean that way.
/**
 * \brief Check for new data received with DMA
 */
void usart_rx_check(void)
{
	static size_t old_pos;
	size_t pos;

	/* Calculate current position in buffer */
	pos = ARRAY_LEN(usart_rx_dma_buffer) - LL_DMA_GetDataLength(DMA1, LL_DMA_CHANNEL_5);
	if (pos != old_pos)
	{ /* Check change in received data */
		if (pos > old_pos)
		{ /* Current position is over previous one */
			/* We are in "linear" mode */
			/* Process data directly by subtracting "pointers" */
//			usart_process_data(&usart_rx_dma_buffer[old_pos], pos - old_pos);
			ringbuff_write(&usart_rx_dma_ringbuff, &usart_rx_dma_buffer[old_pos], pos - old_pos);

		}
		else
		{
			/* We are in "overflow" mode */
			/* First process data to the end of buffer */
//			usart_process_data(&usart_rx_dma_buffer[old_pos], ARRAY_LEN(usart_rx_dma_buffer) - old_pos);
			ringbuff_write(&usart_rx_dma_ringbuff, &usart_rx_dma_buffer[old_pos], ARRAY_LEN(usart_rx_dma_buffer) - old_pos);

			/* Check and continue with beginning of buffer */
			if (pos)
			{
				ringbuff_write(&usart_rx_dma_ringbuff, &usart_rx_dma_buffer[0], pos);
//				usart_process_data(&usart_rx_dma_buffer[0], pos);
			}
		}
	}
	old_pos = pos; /* Save current position as old */

	/* Check and manually update if we reached end of buffer */
	if (old_pos == ARRAY_LEN(usart_rx_dma_buffer))
	{
		old_pos = 0;
	}
}

int16_t usart_get_byte(void)
{
	uint32_t old_primask;
	uint8_t ch;
	uint8_t ret;

	/* Check if DMA is active */
	/* Must be set to 0 */
	old_primask = __get_PRIMASK();
	__disable_irq();
	ret = ringbuff_read(&usart_rx_dma_ringbuff, &ch, 1);
	__set_PRIMASK(old_primask);

	if (ret == 0)
	{
		return -1;
	}
	return ch;
}

Do you mean that way?
I works but is not so memory efficient because I have added an other ringbuff an now I copy the data between them.

I meant it this way, correct. However, please be advised that if you write to ring buffer from one entry point (in your case you do, you write only from RX thread) and if you read only from one exit point, then you do not need to use interrupt disable feature. Ring buffer library is designed to sustain this approach.
That is less memory efficient, correct, but I believe the right way to do it.

Okay many thanks.


Problem with progress bar? Or built on purpose?

Bug, feature request, or proposal:
I'm using the Indeterminate progress bar for indicating loading event.
However, when the loading fails and pops an alert, the progress bar act weird until the alert box goes away.
Basically, you can see that progress bar's length is changing but the position is frozen.
What is the expected behavior?
Progress bar should shift through the screen when alert popup is on.
What is the current behavior?
Progress bar's position is frozen, however the length is still changing
What are the steps to reproduce?
Add a indeterminate progress bar, and a button to trigger alert box.
Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: http://plnkr.co/edit/o077B6uEiiIgkC0S06dd
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, browsers are affected?
Is there anything else we should know?

using alert, confirm, and prompt block the UI thread from doing anything until the pop-up is dismissed. There's really nothing we can do to avoid this; it's the nature of the browser.


Add emoji object to bulk import docs

This might now be covered by https://github.com/mattermost/docs/pull/2219


⚠ File access (beta) has degraded performance

In f9378c7, File access (beta) (https://beta.fyle.uk/file/fish) experienced degraded performance:

HTTP code: 200
Response time: 3023 ms

Resolved: File access (beta) performance has improved in d781731.


Update dependencies

Checklist

[x] Used a fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@conda-forge-admin, please rerender

Hi! This is the friendly automated conda-forge-webservice.
I tried to re-render for you but ran into some issues, please ping conda-forge/core for further assistance.

Does not appear to have increased the build number

https://github.com/conda-forge/xrviz-feedstock/pull/2/files#diff-e178b687b10a71a3348107ae3154e44cR15

@conda-forge-admin, please rerender

Hi! This is the friendly automated conda-forge-webservice.
I tried to re-render for you but ran into some issues, please ping conda-forge/core for further assistance.

Well, passes anyway, good enough for me. We'll release a new version son enough.


Unable to create custom routes using middleware

index.js
module.exports = () => {
    return {
        home: getHome()
    }
}

function getHome() {
    const items = []
    for (let i = 0; i < 5; i++) {
        items.push({
            id: i
        })
    }
    return items
}

routes.json
{
    "/home/:id": "/home?id=:id"
}

middleware.js
const JSON_SERVER = require('json-server')
const SERVER = JSON_SERVER.create()
const MIDDLEWARES = JSON_SERVER.defaults()
const ROUTER = JSON_SERVER.router({})

var isAuthenticated = true

SERVER.use(MIDDLEWARES)
SERVER.get('/logout', function(req, res) {
    isAuthenticated = false
})
SERVER.use(JSON_SERVER.bodyParser)
SERVER.use(ROUTER)

module.exports = function(req, res, next) {
    if (isAuthorized(req)) {
        next()
    } else {
        res.status(401).send("Error")
    }
}

function isAuthorized(req) {
    return isAuthenticated
}

Hi,
I made the following configuration and it works pretty fine except for the middleware's /logout custom route. The index.js generates five tiny JSON Objects with only the ID field; the routes.json has custom route that allow me to easily select one of the five JSON Objects using an ID as filter; for last, there is the middleware.js which I use to authenticate the user who makes a request. The command I use to launch the server is the following:
json-server index.js -m middleware.js --routes routes.json --port 3000

The issue I'm experiencing with the middleware's /logout custom route is that when I do a GET request to that endpoint, Json-Server tells me that the route does not exist by returning a 404 status code. Can anybody help me with this?

Hi @peppe130
You are mixing the main two approaches/ways of using json-server library.
json-server should be used either as CLI command or as a nodejs module (not both ways at the same time)
So, let's start analysis/clarify the confusions here:

in middleware.js you have a lot of code that you assumed it works but in reality, it doesn't do anything at all, so the following middleware.js file is an exact equivalent to the one you provide try it.

var isAuthenticated = true;

module.exports = function(req, res, next) {
  if (isAuthorized(req)) {
    next()
  } else {
    res.status(401).send("Error")
  }
}

function isAuthorized(req) {
  return isAuthenticated;
}

Given that, your SERVER.get('/logout') or the whole SERVER logic did NOT even ran, what made json-server works is the command line you use:
json-server index.js -m middleware.js --routes routes.json --port 3000

So, what json-server get from the middleware.js file is only the simple middleware that checks if the isAuthenticated variable is true.
in order to fix this confusion, you could run json-server as module only (not CLI command) as follows:

create db.js -> this is what we call seed file (your current index.js content)
server.js -> this will be your server (main entry)

server.js
const JSON_SERVER = require( 'json-server' );
const SERVER      = JSON_SERVER.create();
const MIDDLEWARES = JSON_SERVER.defaults();

//YOUR SEED FILE
const seed        = require( './db.js' );

// because your seedfile exports a function, you should run it to get the generated json object
const data        = seed();

// pass the `data` json object to `json-server`'s router function to generate the necessary routes
const ROUTER      = JSON_SERVER.router(data);

let isAuthenticated = true;

// it is recommended to use the bodyParser middleware before any other middleware in your application
SERVER.use( JSON_SERVER.bodyParser );

//your Authentication middleware (simplified to check the variable directly
// feel free to go back to the function approach if your authentication checks are more complex
SERVER.use( function ( req, res, next ) {
  if ( isAuthenticated ) {
    next();
  } else {
    res.status( 401 ).send( "Unauthorized!" )
  }
} );

// the logout endpoint
SERVER.get( '/logout', function ( req, res ) {
  isAuthenticated = false;
  res.status(200).send('logged out');
} );

//middlewares required by json-server to run correctly
// this sets up the static serving, Gzip, logger,
// the internal json-server body-parser .. etc
SERVER.use( MIDDLEWARES );

/*
I am not sure why you are rewriting this route like this,
because this subtle rewrite changes how you get/patch a single resource
so instead of getting single resource you made it search for
all resources that has the provided `id`, thus, it returns
an array of resources which in your case will always be an array
with single resource, plus it will prevent patching "modifying"
all `/home/:id` resources.

anyways, I kept it as it is.
if you really know what you are doing here, ignore all the above,
otherwise, try to disable this middleware to know what I mean.
*/
SERVER.use(JSON_SERVER.rewriter({
  '/home/:id': '/home?id=:id'
}));

// this is where `json-server`'s magic happens ;)
SERVER.use( ROUTER );

/*
start the application by listening to port 3000,
Although this won't print the nice starting message you see when
running `json-server` as CLI command, it still runs the app correctly.
*/
SERVER.listen( 3000, function () {
  console.log( 'http://localhost:3000' );
} );

start the server by running (don't use json-server command)
node index.js

I tried to add detailed comments above, additionally, you can fork this repo which could help you in case you still have some confusions:
git clone https://github.com/Nilegfx/json-server-issue-690 && cd json-server-issue-690 && npm install && node server.js

Hi @peppe130
You are mixing the main two approaches/ways of using json-server library.
json-server should be used either as CLI command or as a nodejs module (not both ways at the same time)
So, let's start analysis/clarify the confusions here:

in middleware.js you have a lot of code that you assumed it works but in reality, it doesn't do anything at all, so the following middleware.js file is an exact equivalent to the one you provide try it.

var isAuthenticated = true;

module.exports = function(req, res, next) {
  if (isAuthorized(req)) {
    next()
  } else {
    res.status(401).send("Error")
  }
}

function isAuthorized(req) {
  return isAuthenticated;
}

Given that, your SERVER.get('/logout') or the whole SERVER logic did NOT even ran, what made json-server works is the command line you used:
json-server index.js -m middleware.js --routes routes.json --port 3000

So, what json-server get from the middleware.js file is only the simple middleware that checks if the isAuthenticated variable is true.
in order to fix this confusion, you could run json-server as module only (not CLI command) as follows:

create db.js -> this is what we call seed file (your current index.js content)
server.js -> this will be your server (main entry)

server.js
const JSON_SERVER = require( 'json-server' );
const SERVER      = JSON_SERVER.create();
const MIDDLEWARES = JSON_SERVER.defaults();

//YOUR SEED FILE
const seed        = require( './db.js' );

// because your seedfile exports a function, you should run it to get the generated json object
const data        = seed();

// pass the `data` json object to `json-server`'s router function to generate the necessary routes
const ROUTER      = JSON_SERVER.router(data);

let isAuthenticated = true;

// it is recommended to use the bodyParser middleware before any other middleware in your application
SERVER.use( JSON_SERVER.bodyParser );

//your Authentication middleware (simplified to check the variable directly
// feel free to go back to the function approach if your authentication checks are more complex
SERVER.use( function ( req, res, next ) {
  if ( isAuthenticated ) {
    next();
  } else {
    res.status( 401 ).send( "Unauthorized!" )
  }
} );

// the logout endpoint
SERVER.get( '/logout', function ( req, res ) {
  isAuthenticated = false;
  res.status(200).send('logged out');
} );

//middlewares required by json-server to run correctly
// this sets up the static serving, Gzip, logger,
// the internal json-server body-parser .. etc
SERVER.use( MIDDLEWARES );

/*
I am not sure why you are rewriting this route like this,
because this subtle rewrite changes how you get/patch a single resource
so instead of getting single resource you made it search for
all resources that has the provided `id`, thus, it returns
an array of resources which in your case will always be an array
with single resource, plus it will prevent patching "modifying"
all `/home/:id` resources.

anyways, I kept it as it is.
if you really know what you are doing here, ignore all the above,
otherwise, try to disable this middleware to know what I mean.
*/
SERVER.use(JSON_SERVER.rewriter({
  '/home/:id': '/home?id=:id'
}));

// this is where `json-server`'s magic happens ;)
SERVER.use( ROUTER );

/*
start the application by listening to port 3000,
Although this won't print the nice starting message you see when
running `json-server` as CLI command, it still runs the app correctly.
*/
SERVER.listen( 3000, function () {
  console.log( 'http://localhost:3000' );
} );

start the server by running (don't use json-server command)
node index.js

I tried to add detailed comments above, additionally, you can fork this repo which could help you in case you still have some confusions:
git clone https://github.com/Nilegfx/json-server-issue-690 && cd json-server-issue-690 && npm install && node server.js

Amazing explanation. Thank you so much man!

Very detailed explanation. Great!
I have a question, if I want to watch the router.json and other separate API files, how do I edit them in server.js ?


[FR] Improvement of operating logic

Describe your request
In the process of using it, I can feel that every time the mouse wheel scrolls on the PDF, the plug-in starts working, thus causing the effect of slow page loading, but sometimes we just browse the content of the PDF, not to mark anything.
So I suggest to start working only when we mouse click on the color palette or rectangle area, and also only work on the current page, I don't know if it can be realized.

Hm, I haven't experienced a noticeable slowdown myself. Do you have obvious differences in the loading time between when PDF++ is enabled and when it's not?

It's really not caused by the plugin, after I turn off the plugin, scrolling the PDF is also only a few pages nearby is smoother, and the ones behind it go blank, requiring me to wait for about three seconds before the screen is displayed. May I ask if yours is like this.

It's really not caused by the plugin

Then there is little hope the lag is reduced by any effort made by this plugin, unfortunately.

requiring me to wait for about three seconds before the screen is displayed

Three sec is quite a long time. PDF page loading is "lazy" by nature, meaning each page is loaded when it becomes necessary so there can be some lag, but it should not take that long. I haven't experienced that long loading time.
If I remember correctly, you are on Windows 10, right? It's been about three years since Windows 11 came out, so I guess your machine is not very new. So it might be your computer that is to be blamed.

My system is win11.  The three seconds is a manual estimate on my part, the actual value was not measured. Probably because I have too many plugins installed.May I ask how you manage plugins.

My system is win11.

Oh my bad.

Probably because I have too many plugins installed.May I ask how you manage plugins.

Yeah 50+ plugins is quite a lot, so you might need to turn off some of them when you don't really need them.
But in my experience, turning off all the CSS snippets can sometimes bring much more improvement to the performance.

I've used many of your plugins and you've done a great job with all of them, thank you very much.
Back to the issue of PDF browsing speed, after I turned off the plug-in LaTeX-like Theorem & Equation Referencer for Obsidian speed greatly improved.

after I turned off the plug-in LaTeX-like Theorem & Equation Referencer for Obsidian speed greatly improved.

It's my first plugin and also is very complicated so I'm not surprised it's causing some performance degradation. I will look into it!

Thank you very much!

Yeah I'm aware of the problem, but thanks anyways!


Readme proposal

Thanks, I like your suggestions! Feel free to incorporate them if you want, or I can do it later. See Zulip for the Zulip question.


Add Sabry's presentation to https://coderefinery.org/outreach/

@Sabryr can you please list your presentation from May 12?

Ping: @Sabryr can you please take this and add a link to your talk? Or at the minimum mention it?

ACK

Sabry, do you have a link or title? I can add it to the sources but would like to close this issue.

Bump

Sorry, this presentation is not longer in the "internet". So closing the issue

But do you at least have the title? We can at least list that it happened. This is important for my reporting. Reopening.

Sabry, do you have a title and date? If not, let's give up and close this issue but if you have date+title, we can add that. It helps me in my reporting.

One more ping ...

Earnestly, I do not remember what this presentation was about. I see something like this calendar "CodeRefinery Monday meeting 12/05/2018"

OK. Dropping this.


[NETBEANS-1074] Module review javascript2.jade

Relicensed one file from old NB license to Apache2; added licenses to template/resources. Custom download turned to regular external binary.

This PR needs to be merged after #726, also uses flex and  #726 provides flex license definition.

I rebased the PR on the current master + made necessary fixups

If the merge conflict is resolved, this looks good to be merged. I restarted the travis build - that failed because maven central could not be reached.

Updated & rebased on latest master again


3822: Give users the ability to disable gzip content encoding to increase throughput

Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for context and/or discussion)

Fixed review comments and added an unit test.

Hi,

In what GCP client version is this new option available?
Could you please provide an example of how to use it?
Thanks


Mark @safe ctor, postblit and opAssign for RCAllocator

Since this PR has been merged, this PR also defines RCISharedAllocator as a shared struct

Should this be split in two separate PRs?

(DScanner failure is unrelated. Fix: https://github.com/dlang/phobos/pull/6171)

@wilzbach will force merge


UPN != PrimarySMTPAddress = MyRequests not usable

Hi,
i´m implementing this solution for a customer where the UPN is not equal to his primary SMTPAddress (Yes, I know...). When users navigate to the "My Requests" screen the Collection used to display the Requests screen stays empty.
The Problem is that the Created By Column in SPO reflects the primarySMTP Adress. The PowerApps Function User().EMail seems to use the email address which is the same as the UPN. So there is a missmatch of the used email addresses.
I´ve ended up by adding a new column "CreatedBy_Workaround" to the "Teams Requests" List which is filed with the btnnext_ Actions with the value of User().Email.
Additionaly I adjusted the Filter in the OnVisible Action and the Refresh Button on the Screen to filter the Collection TeamsReqTable by the added column "CreatedBy_Workaround"
It works like expected. But i wonder if there is a more "elegant" way to ship around this issue.

@J-a-k-o-b unfortunately this is a limitation in terms of the Power Apps and what it can retrieve from the User() object. It may be we could make this more elegant by adding a new option to the settings list but this isn't something we are planning on doing at the moment.
I think the solution you have come up with is the most sensible option at the moment.
Thanks

@J-a-k-o-b I'm having the same issue since my company decided that upn!=email way back when.
Any chance you can share screenshots of what you did in both SharePoint and PowerApps? I'd greatly appreciate it.

Hi @jocrabtree,
I will try to summarize it and share it here or via teams/chat with you,

@J-a-k-o-b Thanks so much. Whatever is easier for you works for me.

Hi @jocrabtree,
we´re using the templates section of the app only, so we´re redesigned the App etc a bit. But in general you will find the same names i have listed in the screenshots in the default app, or you can recycle the procedure

Add additional Column to the SPO List "Teams Request". In my Case "CreatedBy_Workaround":

Hi @jocrabtree ,
we´re using the templates section of the app only, so we´re redesigned the App etc a bit. But in general you will find the similar names that were shown in the screenshots in the default app. You can recycle the methods, in the other screens and functions of the app.

SPO:  Add additional Column to the SPO List "Teams Request". In my Case "CreatedBy_Workaround":

PA: Edit the patch SPO List Procedure in the btnNext_TeamInformation Button in the screen scrnUseTemplate:

add the Value:
.{CreatedByWorkaround:User().Email}
to the Patch command. (Don´t forget to refresh the connection to the database before to have the newly created column available)
PA: Edit the btmRefresh_MyRequests in the screen scrnMyRequests:

Adjust the Filter to
('Teams Request',CreatedBy_Workaround=gblUser)
PA: Edit the Onvisible Action for Screen scrnMyRequests:

Edit the ClearCollect Filter to
('Teams Request',CreatedBy_Workaround=gblUser)

We don´t use the clone action in the MyRequests Settings. It might be that you also have to add the Step 2 to further Buttons on the other screens if you use more than the Templates.

@J-a-k-o-b Thanks so much for your help. It's working partially now.
When I create a request, it doesn't display when I hit the 'refresh' button. I have to exit the app and then come back and click on the 'My Requests' tab for any of my requests to show. After I click out of the 'My Requests' tab all of the requests I have disappear again until I leave the app and come back. Kinda weird and was hoping the 'Refresh' button would work better, but I'm def getting closer.
I'm guessing your 'Refresh' button works and you don't have to complete exit the app to see any requests? Anything else you may recommend trying? I appreciate your feedback.

So the scrnMyRequests workd like expected, except the refresh Button?
We don´t experience that issue. Maybe you can compare the ClearCollect function in my Steps 3&4. They are configured the same.

@J-a-k-o-b Thanks again for the help. I checked what I had for Step #3 & #4 that you listed above. Both appear to be identical. I noticed on Step #2 that you have a section above the 'if' statement that begins with 'patch.' I do not have that those two lines of code. Is that something I should add? Here's what I have:

Hi @jocrabtree,
we have this first Patch Method here because we´re skipping the Privacy Site. It shouldn´t be related here.
Do you know the possibility to monitor the app:

You can use this tool to see what happens if you click on the Buttons and so on. Maybe you can find the issue with the help of this.

@J-a-k-o-b - Thanks again. Here's what I'm seeing:
When I initially open the app and click on the 'My Requests' tab it shows all of my requests:

I turned on Monitoring, and I noticed these lines when I clicked on the 'My Requests' tab:

Here's the details on one of those two warning lines:

When I click on the 'Request a Team' tab after the 'My Requests' tab, it opens just fine. However, once I click on the 'My Requests' tab again it shows nothing:

I checked the 'Monitoring' page and see this:

I see there is a line with '0 rows collected' so I'm guessing that's my issue, somehow? Here's the details for the '0 rows collected' line:

@J-a-k-o-b Oh, forgot to mention the 'Refresh' button on the 'My Requests' page too. Here's what I see when I monitor clicking the 'Refresh' button (I clicked it four separate times, btw):

Hi @jocrabtree,
sorry, I dont have a valuable hint here. Maybe you can ask this question in a new topic here, because it not seems to be related to the adjustments we made.

@J-a-k-o-b Will do. Thanks so much for all the help you provided. 💯

Hi All,
I've also just found this exact issue in our enviroment and I think I've got a more elegant solution.
I replaced all occurences in the Power App of:
Set(gblUser,User().Email);
with:
Set(gblUser,Office365Users.MyProfileV2().mail);
This gets the user's primary email address instead of thier UPN
I've just tested this with an affected user and they can now see all the requests in the "My requests section"
I've not found any issues with this so far but can you see any reason why this might be a bad idea?
Thanks

Hi @tomfeather,
that looks much easier than my workaround. I will try out your solution the next time I have to deal with it.

Hi @tomfeather,
that looks much easier than my workaround. I will try out your solution the next time I have to deal with it.


[DO NOT MERGE]: testing macos CI

We've seen some problems with github actions macos agents and bazel install via the mac_ci_setup.sh script. I want to verify that the azure pipeline infra is not having the same problem.

cc @keith I don't think https://github.com/envoyproxy/envoy/pull/11181 solved the issue.


resetValues() breaks scrolling with scroll wheel and arrow keys

On the demo page, if I resize the window, scrolling no longer works with the scroll wheel or arrow keys (it scrolls the entire page instead). Clicking and dragging the scrollbar itself still works. This seems to be due to the call to resetValues().
I'm using Chrome, on Windows 7.

Yes, thanks for this bug. If possible please PR this.


rt: 4.4.0 -> 4.4.2

Semi-automatic update. These checks were performed:

built on NixOS
ran /nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2/bin/rt help got 0 exit code
ran /nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2/bin/.rt-ldapimport-wrapped -h got 0 exit code
ran /nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2/bin/.rt-ldapimport-wrapped --help got 0 exit code
ran /nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2/bin/.rt-ldapimport-wrapped help got 0 exit code
ran /nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2/bin/rt-ldapimport -h got 0 exit code
ran /nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2/bin/rt-ldapimport --help got 0 exit code
ran /nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2/bin/rt-ldapimport help got 0 exit code
ran /nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2/bin/rt-test-dependencies help got 0 exit code
found 4.4.2 with grep in /nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2

Success on x86_64-linux (full log)
Partial log (click to expand)
 'make initialize-database'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2
strip is /nix/store/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2/lib  /nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2/bin  /nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2/sbin
patching script interpreter paths in /nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2
/nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2/etc/upgrade/upgrade-mysql-schema.pl: interpreter directive changed from "/usr/bin/env perl" to "/nix/store/s029gmjpgvm776wfb56naqny9qja9339-perl-5.24.3/bin/perl"
checking for references to /tmp/nix-build-rt-4.4.2.drv-0 in /nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2...
moving /nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2/sbin/* to /nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2/bin
/nix/store/5n51wrhcy36qriag40rrfz0iq8li887q-rt-4.4.2

Failure on x86_64-darwin (full log)
Partial log (click to expand)
Removing empty /nix/store/wsh5dmmmc8krq48l20z8b84mm587dfi1-perl-Starlet-0.28/share/man/ and (possibly) its parents
strip is /nix/store/4sdh09gmvl15cy0zb6i7mbvxh5syz206-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/wsh5dmmmc8krq48l20z8b84mm587dfi1-perl-Starlet-0.28/lib
patching script interpreter paths in /nix/store/wsh5dmmmc8krq48l20z8b84mm587dfi1-perl-Starlet-0.28
gzipping man pages under /nix/store/26x211495gq3azvfkrglv79nhvzw2h6a-perl-Starlet-0.28-devdoc/share/man/
strip is /nix/store/4sdh09gmvl15cy0zb6i7mbvxh5syz206-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/26x211495gq3azvfkrglv79nhvzw2h6a-perl-Starlet-0.28-devdoc
cannot build derivation '/nix/store/465jcmd9phxma9vvldg9b31y3g811rrw-rt-perl-deps.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/ymkvv9fgv8p8bg4ha1gbg3c2gkwb60hw-rt-4.4.2.drv': 1 dependencies couldn't be built
error: build of '/nix/store/ymkvv9fgv8p8bg4ha1gbg3c2gkwb60hw-rt-4.4.2.drv' failed

Success on aarch64-linux (full log)
Partial log (click to expand)
 'make initialize-database'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/cc0nyynsiks7m9ggmkrhmyqvvw9lfgq5-rt-4.4.2
strip is /nix/store/lvx1acn1ig1j2km8jds5x3ggh3f2wa8v-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/cc0nyynsiks7m9ggmkrhmyqvvw9lfgq5-rt-4.4.2/lib  /nix/store/cc0nyynsiks7m9ggmkrhmyqvvw9lfgq5-rt-4.4.2/bin  /nix/store/cc0nyynsiks7m9ggmkrhmyqvvw9lfgq5-rt-4.4.2/sbin
patching script interpreter paths in /nix/store/cc0nyynsiks7m9ggmkrhmyqvvw9lfgq5-rt-4.4.2
/nix/store/cc0nyynsiks7m9ggmkrhmyqvvw9lfgq5-rt-4.4.2/etc/upgrade/upgrade-mysql-schema.pl: interpreter directive changed from "/usr/bin/env perl" to "/nix/store/g1naqig0jxakwmf8688d95xfm8xch4dm-perl-5.24.3/bin/perl"
checking for references to /build in /nix/store/cc0nyynsiks7m9ggmkrhmyqvvw9lfgq5-rt-4.4.2...
moving /nix/store/cc0nyynsiks7m9ggmkrhmyqvvw9lfgq5-rt-4.4.2/sbin/* to /nix/store/cc0nyynsiks7m9ggmkrhmyqvvw9lfgq5-rt-4.4.2/bin
/nix/store/cc0nyynsiks7m9ggmkrhmyqvvw9lfgq5-rt-4.4.2


Angstrom Å symbol in default font(s)

Dear Developers,
would you please add the Angstrom Å symbol to your custom fonts?
Right now I cannot use Å in my source files -- the pdf is rendered with missing symbol (note, in HTML output is everything fine). I know about possibility to use my own fonts, but why would I do this only because of only one symbol.
Thank you!

Not that I really understand the different, but you seem to be using the incorrect (maybe) angstrom. Here's the one supported by the font:
Å

Here's the one you are typing:
Å

Can you explain why you are choosing this one? What language uses that range? Is this a math symbol?

If it's a math symbol, I'm happy to add it. Let's just not miss any related symbols.

Hm, it looks like I am using not the best code for the angstom symbol. I was using Å as suggested in https://www.toptal.com/designers/htmlarrows/symbols/angstrom-sign/
or
https://www.w3schools.com/charsets/ref_utf_letterlike.asp
But as I read now, wikipedia recommends to use the other code Å, which fortunately exists in your custom fonts.
Thus, the problem is solved, thank you for info and sorry for disturbing.

That's great news.
Wikipedia also seems to suggest the Swedish capital A. https://en.wikipedia.org/wiki/Angstrom


Need to copy shoco.c and shoco*.h

In order to compile I needed to copy shoco.c and both headers into my project's directory. Shouldn't this work automatically, like with nre?

You shouldn't need shoco.h really, nothing is using it. shoco.c should compile with shoco.nim, using the compile pragma on line 2.


Bigcommerce Hooks: setting basePath in next.config.js

I am currently testing for using a basePath with vercel commerce.
For example: setting basePath in next.config.js should route localhost:3000/blog to localhost:3000/some-base-path/blog
Setting basePath causes issues with Bigcommerce webhooks or data search to not function properly.
However, basePath is working as expected for each 'next/Link'
I have only tested, "adding a product to cart" and "clicking on a category , and  searching for a product".  I'm sure other webhooks don't function properly as well.
The webhooks in index.tsx work properly, as the products can be viewed on the homepage. And when clicking a product from the homepage, the product appears on product page. And when viewing a product page, clicking on "add to cart" doesn't add product to cart.
Also, from the homepage, clicking on a category or searching for a product, the searching/query webhook doesn't properly retrieve products and causes the search to hang.

To be more precise, the following is a log of the error:
ready - started server on http://localhost:3000
event - compiled successfully
event - build page: /next/dist/pages/_error
wait  - compiling...
event - compiled successfully
Error occurred proxying http://localhost:4000/shop/_next/image?url=https%3A%2F%2Fcdn11.bigcommerce.com%2Fs-nhkhnjet1i%2Fimages%2Fstencil%2Foriginal%2Fproducts%2F133%2F446%2Fmockup-ae9a83b0__49881__78743.1604116316.png&w=3840&q=85 Error: socket hang up
at connResetException (internal/errors.js:609:14)
at Socket.socketCloseListener (_http_client.js:401:25)
at Socket.emit (events.js:326:22)
at TCP. (net.js:675:12) {
code: 'ECONNRESET'
}

To be more precise, the following is a log of the error:
ready - started server on http://localhost:3000
event - compiled successfully
event - build page: /next/dist/pages/_error
wait  - compiling...
event - compiled successfully
Error occurred proxying http://localhost:4000/shop/_next/image?url=https%3A%2F%2Fcdn11.bigcommerce.com%2Fs-nhkhnjet1i%2Fimages%2Fstencil%2Foriginal%2Fproducts%2F133%2F446%2Fmockup-ae9a83b0__49881__78743.1604116316.png&w=3840&q=85 Error: socket hang up
at connResetException (internal/errors.js:609:14)
at Socket.socketCloseListener (_http_client.js:401:25)
at Socket.emit (events.js:326:22)
at TCP. (net.js:675:12) {
code: 'ECONNRESET'
}

Looks like this should be solved already.


401 responses MUST contain WWW-Authenticate header

The server generating a 401 response MUST send
a WWW-Authenticate header field (Section 4.1) containing at least one
challenge applicable to the target resource.

—https://tools.ietf.org/html/rfc7235#section-3.1
The legacy solid-auth-client requires the value to be exactly Bearer scope="openid webid", which is a pain because that's not forward compatible. But we need to set it in any case.
Probably depends on #654.

I think it's mostly independent of #654 (although the interfaces might influence each other).  We might need something similar to the BasicResponseWriter where a bunch of MetadataWriters add metadata, but in this case then based on the error/status code.


Added Contacts Table

Pull Request Considerations
Although some of these things can only be done after merged, please ensure all items have been considered when doing pull requests.

Updated README.md(s) for new functionality or changes.
Did you update .env / create a new environment variable?

Did you update/create an explanation in the appropriate README.md file for it?
Did you make/update an Openshift configmap/secret template for it?

Have you changed any Openshift configurations/templates?

Did you execute the appropriate oc process command on the template to put the configmap/secret in openshift?

Did changes trigger Openshift image rebuilds?

Check Openshift instance of application to ensure your changes are working.

Did you update the changelog CHANGELOG.md.

used to keep track of development changes including (env changes, docker changes, functionality changes)
help developers keep track of new/updating changes in code.

did you update the changelog to note what you changed, and document anything new/that is interesting?


Reduce allocations with TSM queries

This reduces memory allocations a bit when running queries against the TSM engine and may prevent some OOMs in some cases.  The bulk of the allocations are in the query engine, but the KeyCursor was allocating a buffer beforehand that blows the heap up with high numbers of series.  If swap is enabled, the process OS can start swapping causing performance to drastically decrease.  If a host does not have swap, the process would likely OOM on the query.
Below are some test results from before and after this PR.  My laptop has swap and this is a basic count query on 5M series w/ ~15M points on disk.
Before
influxdb:influxdb jason$ time influx -database stress -execute "select count(value) from cpu"
name: cpu
---------
time	count
0	1.5215e+07

real	10m42.106s
user	0m0.005s
sys	0m0.020s

After:
influxdb:influxdb jason$ time influx -database stress -execute "select count(value) from cpu"
name: cpu
---------
time	count
0	1.5215e+07

real	2m29.758s
user	0m0.005s
sys	0m0.015s

+1

also :+1:

Have you tried running a query that's more open-ended with that many
points, something very basic like:
select * from cpu_usage_user limit 10
That causes our app to blow up, panic after OOM even after killing the
query (hard kill from OS).
On Wed, Jan 6, 2016 at 2:25 PM, Paul Dix<EMAIL_ADDRESS>wrote:

+1
—
Reply to this email directly or view it on GitHub
https://github.com/influxdata/influxdb/pull/5289#issuecomment-169451028.

--
Sebastian Borza
PGP: EDC2 BF61 4B91 14F2 AAB4  06C9 3744 7F3F E411 0D3E

Yes. This PR won't fix that unfortunately in all cases. There is work going on in the query engine that will hopefully fix that allocation problem.

@sebito91 what you're describing will likely be fixed by the new query engine. follow #5196 for updates, but it should be merged into master pretty soon.

Thanks for the feedback, we'll keep on the lookout.
On Wednesday, January 6, 2016, Jason Wilder<EMAIL_ADDRESS>wrote:

Yes. This PR won't fix that unfortunately in all cases. There is work
going on in the query engine that will hopefully fix that allocation
problem.
—
Reply to this email directly or view it on GitHub
https://github.com/influxdata/influxdb/pull/5289#issuecomment-169559478.

--
Sebastian Borza
PGP: EDC2 BF61 4B91 14F2 AAB4  06C9 3744 7F3F E411 0D3E


JSX element type 'App' is not a constructor function for JSX elements. Types of property 'setState' are incompatible.

I get this compile error during npm start:
./src/index.tsx
(16,5): error TS2605: JSX element type 'App' is not a constructor function for JSX elements.
  Types of property 'setState' are incompatible.
    Type '{ <K extends never>(f: (prevState: null, props: {}) => Pick<null, K>, callback?: (() => any) | un...' is not assignable to type '{ <K extends never>(f: (prevState: {}, props: any) => Pick<{}, K>, callback?: (() => any) | undef...'.
      Types of parameters 'f' and 'f' are incompatible.
        Type '(prevState: {}, props: any) => Pick<{}, any>' is not assignable to type '(prevState: null, props: {}) => Pick<null, any>'.
          Types of parameters 'prevState' and 'prevState' are incompatible.
            Type 'null' is not assignable to type '{}'.

My code:

class App extends React.Component<{}, null> {
  render() {
    return (
      <div className="App">
        ...
      </div>
    );
  }
}

ReactDOM.render(
  <Provider store={store}>
    <App />
  </Provider>,
  document.getElementById('root') as HTMLElement
);

I am using:
node v6.11.0
npm v5.1.0
typescript v2.4.1
react v15.6.1
redux v3.7.1
react-redux v5.0.5
react-scripts-ts v2.3.2

I found out that removing the generic types <{}, null> following React.Component clears the error. But I'd still love to learn why I was getting the error.

The state type (second generic) cannot be null - that's why you were getting the error.

Thanks!
For future readers, I also asked a SO question here: https://stackoverflow.com/q/45024559/1270459


Set up GitHub Actions to run the generate project pages script every day

Problem Description
We currently use AWS Lambda to run the generate project page script, but it's set up manually and is probably unnecessary. It's also hard to add new dependencies to the environment.
We do want the script run every day so that the projects page is always up to date.
Solution Description
Set up a GitHub Actions workflow in this repo to run the script every day.
Additional context

GitHub Actions documentation
You will need to remove the dependency on boto3 since that's only used on AWS Lambda.
You should probably replace the lambda-git package that's used with something else.
Please include instructions on how to set up the appropriate GitHub token. Your GitHub token will not have permissions to commit to the existing https://github.com/creativecommons/creativecommons.github.io-source repo, so you'll need to test using a fork of the repo on your own account.

I would like to work on this issue.

@ritiktaneja go ahead.

@ritiktaneja are you working on this issue?

Since there's been no activity for a week, I'll reassign to @sp35.

Found Gitpython but using it requires changes where commands from lambda-git  package are being used. Am I in the right direction?

@sp35 that's fine!


Take module deployment sources into account when checking if a project is flex-compat

Fixes #907
Still verifying.

More info:
Now that we can deploy to app engine standard (and flex compat) using maven - since https://github.com/GoogleCloudPlatform/google-cloud-intellij/pull/851 - the flex compat determination logic can no longer assume only artifact deployment sources: maven deployment sources are module deployment sources. This PR takes module deployment sources into account too when checking if a source is flex compat.


ReadCmColor does not create Color with true-color values

The method DwgMergedReader.ReadCmColor does not use the read RGB value.

Hi @mme1950
Colors are not fully implemented for Dwg, this method should be revisited and fixed accordingly.
Opening a branch to refactor the colors and finish the implementation.

This works for us, but I have no idea how to handle colorName and bookName:
	public Color ReadCmColor()
	{
		if (!(_mainReader is DwgStreamReaderAC18))
			return _mainReader.ReadCmColor();

		//To read a color in this version file needs to access to the
		//string data section at the same time.

		//CMC:
		//BS: color index(always 0)
		short colorIndex = ReadBitShort();
		//BL: RGB value
		int rgb = ReadBitLong();

		//RC : Color Byte
		byte id = ReadByte();

		string colorName = string.Empty;
		//RC: Color Byte(&1 => color name follows(TV),
		if ((id & 1) == 1)
			colorName = ReadVariableText();

		string bookName = string.Empty;
		//&2 => book name follows(TV))
		if ((id & 2) == 2)
			bookName = ReadVariableText();

		short i = (short)(rgb & 0xFF);
		if (i >= 0 && i <= 255)
		{
			return new Color(i);
		}

		byte b = (byte)(rgb & 0xFF);
		byte g = (byte)((rgb >> 8) & 0xFF);
		byte r = (byte)((rgb >> 16) & 0xFF);

		return new Color(r, g, b);
	}


Spanish galnet news in EDDI

Hi
First of all congratulations for your great work, I use it every day thanks.
In our website EliteesP www.eliteesp.es/ we translate the news of galnet, with the consent of frontier.
Would it be possible to add the galnet news translated into Spanish to EDDI?
We have a news feed. http://eliteesp.es/category/galnet/feed/
Thanks in advance

@mcdee Is there any news about this topic?
Can you put a box in UI for eddit galnet feed?
Thanks a lot!

@mcdee is no longer actively developing this project, but we've noted your request on our fork (https://github.com/EDCD/EDDI). The news feed at http://eliteesp.es/category/galnet/feed/ appears to be down?


update jwk method for creation missing verification relationships

When DidJwk::create() is called, the appropriate verification relationships are missing.
authentication, assertionMethod, capabilityInvocation and capabilityDelegation are missing and need to be set with one value equal to the verificationMethod[0].id.
closes - https://github.com/TBD54566975/web5-rs/issues/153

@nitro-neal you can run just lint and it'll fix the formatting issue (currently causing CI to fail; the pipeline stuff will soon change with #146)


Webtorrent not requesting pieces from peers when using a private tracker

What version of WebTorrent?
^0.98.3
What operating system and Node.js version?
OS X 10.11.3 with Node v6.4.0
What did you expect to happen?
Expected peers to be found and pieces to be downloaded
What actually happened?
According to the stdout, no peers were added and no pieces were downloaded.
Here is the debug output logged from just running webtorrent download somefile.torrent
https://gist.github.com/tab1293/76f500433623035c4cd16f85e89d7910
The log file looks like peer wire connections are being established and messages are being passed between me and other peers. I can't find any glaring differences between the linked debug log and another log from a public tracker which succeeds in downloading.
On packet inspection, I can tell that my client is becoming interested in other peers and those peers are unchoking me. It seems though that piece requests are never initiated by my client. Here is a look at an interaction with peer I was interested in:

Any idea why no further piece requests are made on the peer wire?

@feross any ideas on what may be causing this to happen?

Is #1054 related?

@zephrax I don't believe that issue is related. I am not attempting to seed the file or download it within a browser.
I am unable to download a torrent from a private tracker while using the webtorrent command line program or the nodejs module. Any other information I can provide besides the debug output that could be useful? Maybe a pcap file or something?


Opening a website/webview

I'd like to launch a website either in a new window or inside my app to allow my users to go through an OAuth flow. Is this possible?

Issue for webviews: https://github.com/andlabs/libui/issues/315
Issue for buttons (or similar) that open a link: https://github.com/andlabs/libui/issues/363
Issue for a link inside a text: https://github.com/andlabs/libui/issues/303

Opn is very good, and will open a browser window. I used that in the CatApi example. Just have that run as a callback from a button press or something like that.

Is it possible now? https://doc.qt.io/qt-5/qtwebview-index.html


CacheFilter: Correctly calculate cached response age

CacheFilter doesn't fully implement the algorithms specified in RFC7234§4.2 to calculate freshness lifetime and age, based on the date, age, and expires response headers, the max-age and s-maxage response cache directives, and the max-age request cache directives. The RFC-specified freshness and age algorithms must be fully implemented. This must be fixed before CacheFilter can be appropriate for production deployment.

In #11727 , LookupRequest::requiresValidation calculates some freshness and age info that might be useful when working on this.


Include post C# 12.0 "primary constructor" implications to the rule

Type of issue
Missing information
Description
A link would be appropriate here to the to the whole primary constructor documentation page, or to the example that demonstrates what looks to be a violation, but it is not, as the emitted code uses the parameter of the constructor directly.
Page URL
https://learn.microsoft.com/en-us/dotnet/csharp/misc/cs0236
Content source URL
https://github.com/dotnet/docs/blob/main/docs/csharp/misc/cs0236.md
Document Version Independent Id
360140ec-e61d-3117-e7a7-92473887f7b6
Article author
@BillWagner
Metadata

ID: 19167a3c-283f-e0c1-d1cb-3b773954779b
Service: dotnet-csharp
Sub-service: errors-warnings

This is a good suggestion @zorgoz
I've added it to our backlog to address when this page is updated or consolidated.


Remove unnecessary validation for CMv2

Hi Yeming,
OK.,.,.. but where are these sepcs that can enable me to remove these lines of codes from the file?: Generated/ConnectionMonitorsOperations.cs
Can you point from where to remove these lines of code?

       if (parameters != null)

       {

           parameters.Validate();

From: Yeming Liu<EMAIL_ADDRESS>Sent: Tuesday, January 7, 2020 10:58 PM
To: Azure/azure-sdk-for-net<EMAIL_ADDRESS>Cc: Hossam Fattah<EMAIL_ADDRESS>Assign<EMAIL_ADDRESS>Subject: Re: [Azure/azure-sdk-for-net] Remove unnecessary validation for CMv2 (#9313)
@isra-fel commented on this pull request.

In sdk/network/Microsoft.Azure.Management.Network/src/Generated/ConnectionMonitorsOperations.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-net%2Fpull%2F9313%23discussion_r364085760&data=02|01|hofattah%40microsoft.com|a3bf4f67de814ec24a4e08d7940828ea|72f988bf86f141af91ab2d7cd011db47|1|0|637140635078874444&sdata=Xz24Pdoj6o6YZ69%2ByBFuPTwdjK5W%2FNi585xYoMc28LE%3D&reserved=0:

@@ -831,10 +831,6 @@ public async Task<AzureOperationResponse> BeginCreateOr

         {

             throw new ValidationException(ValidationRules.CannotBeNull, "parameters");

         }

       if (parameters != null)

       {

           parameters.Validate();

I'm not familiar with your spec but I'm sure it can be configured
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-net%2Fpull%2F9313%3Femail_source%3Dnotifications%26email_token%3DAMDHYAOSNU63SU5OJZZHMV3Q4V2RDA5CNFSM4KCTVZQ2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCQ7QJDI%23discussion_r364085760&data=02|01|hofattah%40microsoft.com|a3bf4f67de814ec24a4e08d7940828ea|72f988bf86f141af91ab2d7cd011db47|1|0|637140635078884450&sdata=ICC36vjXYsoLC40v%2BoMjKsFoQEbd%2Fv61%2BTFSIr8OpZo%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMDHYAMNN4PEICMK2SGQ5VLQ4V2RDANCNFSM4KCTVZQQ&data=02|01|hofattah%40microsoft.com|a3bf4f67de814ec24a4e08d7940828ea|72f988bf86f141af91ab2d7cd011db47|1|0|637140635078894434&sdata=xs0vG9a6wvRI3tEeO1a7JBl%2FpUbWbXLC7TsKsy9pKpg%3D&reserved=0.


replies / slow

how to configure it to show replies in real time and not wait for the end of the generation.
Thanks

Currently the replies are already streamed one word at a time. I wonder if the first word's taking a lot of time for you? In that case, consider running the 7B model (if you aren't already) to see increased performance.

@mayankchhabra I think this is a bug. I am having the same issue

with me he really waits for the generation to be finished to give him the text

@AndreiSva and @WEBELSYS can you please share which model you're trying, and the specs of your hardware (OS, CPU, RAM)?

for a few days at first he was doing word for word. but now he waits for the end. 7b - 13b ryzen 5800x3d 32gb ddr4

I am running on linux on a ryzen 7 3700X, 32 gigabytes of ram.

Everything's also running extremely slow. Here's a screen record of what a simple generation looks like.
Screencast from 2023-08-18 10-31-58.webm
it took almost 3 minutes

About the same or worse with one work at a time, doing 70B on EPYC 7502P, 128 GB RAM , Ubuntu 22.04.

Same for me. I'm using an old laptop (i7 4800 mq and 8gb of ram, ssd) and it's very very slow with the 7B model.
I know the laptop is not powerful, but it should be able to give a simple reply... or not?
Thank you

Speed is fine on my platform, but there are no streaming tokens. Using Ryzen Threadripper 2950X & 32G of RAM on Fedora.

I waited 10 minutes, but nothing happened. Never saw any output, but my CPU spiked at 100 %

If the connection is direct, the response is one word at a time, but if using nginx reverse proxy, it needs to wait until the whole sentence is generated.
By the way, after using CUDA acceleration, the generation speed has been significantly improved.

That's a great observation @Aincvy. For anyone facing this issue, can you please confirm if you're using LlamaGPT behind a reverse proxy, like nginx? If so, would be great if you can paste your proxy config, you might need to make some adjustments to make streaming work.

this is indeed it!
directly linked IP:3000, much faster and streaming

@WEBELSYS @mayankchhabra  can you share the config you used? I am using a basic proxy pass and it is showing the issues stated above:
`
server {
listen 80;
server_name chat.randomprivateurl.com;
    location / {
        proxy_pass http://localhost:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/chat.randomprivateurl.com/fullchain.pem>
    ssl_certificate_key /etc/letsencrypt/live/chat.randomprivateurl.com/privkey.p>
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}

`

I'm using nginx too, even with "server sent event" tweak in nginx config, it still does not work: https://stackoverflow.com/questions/13672743/eventsource-server-sent-events-through-nginx


Autogenerate natspec docs

There are natspec docs generated locally by this command. We should automate this flow via CI.
What should be done:

Create a CI workflow (or add an additional step to the Build and Test workflow) which on every push to the development branch will regenerate natspec docs

/assign

Hello team, I'm new with this DevPool. How can I create the new Wallet/WalletID?

/wallet 0xaa13387810931252811186Ff05a467194E41341C

/wallet 0xaa13387810931252811186Ff05a467194E41341C 0x2b964b4f8d6e31700cf899aedf86eb9cb0e680c8ede707aa9969938380fafb36337e195f15c23a5d77e579984404e6c565c063603ceb70c6b1c1a1d713889e241b

/wallet 0xaa13387810931252811186ff05a467194e41341c 0x2b964b4f8d6e31700cf899aedf86eb9cb0e680c8ede707aa9969938380fafb36337e195f15c23a5d77e579984404e6c565c063603ceb70c6b1c1a1d713889e241b

/help

/wallet 0xaa13387810931252811186Ff05a467194E41341C 0x2b964b4f8d6e31700cf899aedf86eb9cb0e680c8ede707aa9969938380fafb36337e195f15c23a5d77e579984404e6c565c063603ceb70c6b1c1a1d713889e241b

I did provide the SIGNATURE_HASH but not sure why @ubiquity bot keeps asking to do so.

/wallet 0xaa13387810931252811186Ff05a467194E41341C

/wallet 0xaa13387810931252811186Ff05a467194E41341C

/wallet 0xaa13387810931252811186Ff05a467194E41341C 0x288bd4dc82dc188119206e7e4661b96028da91e42527acbad207fb9277411f7379b7c1edb58a0b3e86a379db2cad49c3a8e29926543f05f66a76876660b2451c1b

/wallet 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266

/wallet 0x336C033842FA316d470e820c81b742e62A0765DC 0x6278f129535199f0b529f1da7f4465d8c41fc5343ed3a3f8cbcd0f15b91f714c67f537cbd4ace86ab9e2ef26da4921b04da9b2ebba2d42dacac290f575d711cf1c

@tungbq wallet registration seems to be working, pls try again

/wallet 0xaa13387810931252811186Ff05a467194E41341C 0x288bd4dc82dc188119206e7e4661b96028da91e42527acbad207fb9277411f7379b7c1edb58a0b3e86a379db2cad49c3a8e29926543f05f66a76876660b2451c1b

/wallet 0xaa13387810931252811186Ff05a467194E41341C 0xee969283ecb26e31e64b6ad2bced84ea5c7cd79fbf38406989197c12302102a63e50d3a9042616e7e9ef8874d33e54d03ae8762379e4701e00d2b55a048cd3a01c

Yes, it's working fine now. Thanks @rndquu!

Yes, it's working fine now. Thanks @rndquu!

What was wrong?

I don't know the exact reason. I just did a sign again: https://etherscan.io/verifiedSignatures. Then retry

Yes, it's working fine now. Thanks @rndquu!

What was wrong?

I don't know the exact reason. I just did a sign again: https://etherscan.io/verifiedSignatures. Then retry

It looks like your hashes are different so you must have hashes the wrong string before.
I'm concerned that this flow will be too hostile to new users. Let's continue observing Walker registration attempts.


Import query/tab from curl command

When debugging GraphQL queries from inside Chrome it would be useful to be able to copy the request as curl (via Chrome) and paste it into the playground. This feature would be the complement to the COPY CURL feature we have so far in the playground.
This would import the following data:

Query/Mutation
Variables
HTTP Headers

Hello, Any update on the above?

This should be a must-have!


Describe different overlay styles and introduce general close button

As discussed in https://github.com/tiny-pilot/tinypilot-pro/issues/122, we want to distinguish between “simple” dialogs (e.g. for prompts) and more complex feature overlays.
This PR introduces all necessary styles for that and describes the rules in the style guide.

… clicking outside the dialog closes it.

While this is a common pattern I think it also has the main disadvantage that it’s easier to close the overlay by accident. That can be annoying, e.g. for the error overlay because you’d lose the error information then and you can’t recover; or if you had already entered a new hostname or changed the video settings sliders, then your input is lost.
If we still want to introduce it, we should also support closing via ESC then.

I'm finding it jarring to not have a Close/Cancel button on the bottom, since I feel like I'm so trained to look for it at this point

Do you think that’s due to muscle memory, or does the pattern feel unnatural to you “a priori”?
For me personally it feels viable. I see the benefit that it allows us to design the “feature“ overlays in a more focused way. E.g., if you consider Virtual Media, there is a lot of “competing” functionality in there, so I find that the x icon makes it leaner, whereas a “Close” button at the bottom is very prominent, but actually not all that important.

vs

In the end I think both versions are fine, so we can also keep the “Close” button as it is now. (I still would introduce the x, though, so that the user isn’t forced to scroll on long overlays, e.g. in the debug logs.)

It also feels like if we add a close button in the upper-right of "Overlay with Feature," we may as well add it to every dialog.

I think this is a good idea actually. I have changed & pushed that, so you can try it out in the app. Note, that it also appears in the progress states of the dialogs. (Which I find beneficial, just wanted to point it out.)

Also, a minor note on the styling.

Oh, good catch – this actually happens for all the button variants, not just for the new one… Fixed.

The x styling could also be more subtle:

or

Maybe the first one is a good compromise? We could still remove the “Close” button if we have adopted to the x and feel that it’s redundant?

While this is a common pattern I think it also has the main disadvantage that it’s easier to close the overlay by accident. That can be annoying, e.g. for the error overlay because you’d lose the error information then and you can’t recover; or if you had already entered a new hostname or changed the video settings sliders, then your input is lost.

That's true. You're right. I think it's better to keep the current behavior.

Do you think that’s due to muscle memory, or does the pattern feel unnatural to you “a priori”?

It's hard to say. I think I'm influenced a lot by Windows apps where it's common to have a close button on the upper right but then also a close/cancel button on the bottom right.

I just took a look at Ubiquiti's UI, which I like, and I notice that they just never have a cancel/close button aside from the X in the upper right.

I think that looks pretty good. What do you think of adopting that pattern, even on prompt overlays?

The x styling could also be more subtle:

Oh, I like the current X. I feel like the other ones might be a little too subtle.

What do you think of adopting that pattern, even on prompt overlays?

You mean having the x plus a primary call-to-action, but not a cancel/close button? I wouldn’t do that. For prompts, the “prompt” character is lost then, i.e. that notion of “Do you want this? Yes / No”. I also think it’s an uncommon pattern. For the feature overlays (debug logs, virtual media) we don’t have a call-to-action anyway.
I think the crucial difference about the concept is that in the prompt dialog the user needs to make a decision about something, whereas for the feature dialog there is no main decision to make, but the user rather opens this separate “space” where they can see/do certain things and then closes the panel once they are finished. The controls should reflect these respective ideas.
On Mac for example (which I am used to) you find the following patterns:
Prompts:

“Panels”:

The latter doesn’t have any buttons, because every interaction is carried out right away. That’s similar to how our case, but it’s different to how Windows usually does it, where these windows behave more like a web form with explicit “save”.
Before we get lost here 😆 (reminder, initially we only wanted to solve the buttons at the bottom) I’d propose this:

For now (i.e. this PR) only introduce the blue action button and document the two different overlay patterns in the style guide: a) prompt overlay with primary CTA, and b) feauture overlay with blue buttons and regular “Close” button. So let’s keep the “Close” button as it is now.
Pull out the x pattern into a separate PR, so that we can discuss it separately. I think it’s a good discussion to have and that we generally keep improving the overlay, since it’s our most important UI pattern. But I feel it would be good to take a step back here and not change too much at once.

Parked the x here: https://github.com/mtlynch/tinypilot/pull/700

@mtlynch could you merge into Pro, please, then I can apply this to Virtual Media 🙏

@jotaen - No problem, done!
https://github.com/tiny-pilot/tinypilot-pro/pull/142


Paper Appendix

Very interesting work!
I am very curious about the details on pre-training and fine-tuning. However, I did not find supplementary information. So, where should I get the paper appendix?

Thank you for your interest in our work!
We are almost done revising the manuscript.
We plan to update the arXiv files once we are done with the revision, including the supplementary materials.
Please stay tuned for future arXiv updates for more details!

Thanks for your quick reply. I will follow the updates


How to add a link to a Linux server logged in using pem key

Question

hi there are two way to login with key.

use the private key in webui
generate a key pair under the host or docker where hertzbeat is deployed, and put its public key in the secret authorized_keys authentication of the monitoring target host. cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys


when GenerationType is IDENTITY, test failed

It's not a bug since afterInsert method call commented out in hibernate EntityIdentityInsertAction used for this type of strategy:
https://github.com/hibernate/hibernate-orm/blob/fa952863cf7effa61c8a3b63f72805e7d1be8b79/hibernate-core/src/main/java/org/hibernate/action/internal/EntityIdentityInsertAction.java#L138
Without this method call it's impossible to update cache.


Fix Pages with "workflow" build type

The changes in #122 were not actually applied before this.

thanks!

thanks


Make istioctl analyze integ test output clearer

Improve the clarity of istioctl analyze integ test failures. Previously, a test failure caused by an unexpected validation error wouldn't display any output that indicated what validation failed. Now it does.

test istioctl InvokeOrFail now also logs output when there's an unexpected nonzero return code.
tests specifically for istioctl analyze universally use istioctlSafe to explicitly check both output and return code.

The code looks fine, but it looks like now in analyze_test we're no longer calling InvokeOrFail so it's unclear why these changes are being made and in the same commit. Maybe change the title from "istioctl analyze integ test" to "istioctl integ tests" and link some example output?

We actually aren't calling InvokeOrFail anymore. I was reluctant to remove the function entirely since it seems likely it will be useful in the future, but I did want to augment it so that it produced more useful output. Let me know if you think it makes more sense to do otherwise.

In response to a cherrypick label: new pull request created: #18414


Integrate Sign-In with Google

As a user, I want to sign-in with my Google identity.
I don't want to create a new account for iRacing-week-planner, with another password to remember.
Consider using Sign In with Google for Web: https://developers.google.com/identity/gsi/web/guides/overview?hl=en

Looks like I was able to just drop this in, so it'll go out with the season update tomorrow. Thanks for the feedback


removed user icons from website/hugo.toml

working on #1839, going to check in GitHub discussion how exactly to run the website locally (haven't been able to successfully yet)

Got the project running locally and can confirm that this change retains the icons on the right only.

Thanks, but please sign the commit for DCO
https://github.com/apps/dco
(run git commit -a -s --amend, and make sure that the Signed-off-by: NAME <EMAIL> line with your real name is included in the commit message)

Sorry for the force push but I think this is a better way to just remove the icons from the footer.

Looks good, but please squash commits

did that squash work correctly?

did that squash work correctly?

The squash worked, but the commit message seems broken.
Signed-off-by... has to be a separate line. (See other PRs)

did that squash work correctly?

The squash worked, but the commit message seems broken. Signed-off-by... has to be a separate line. (See other PRs)

ok thanks, I think it should be fine now

Some reason preview not available

Some reason preview not available

I’ve been learning a lot with this simple change. Does the preview need to be available?


rename nonposy -> nonpositive

Fix the rename in matplotlib. This breaks the CI at the moment.

Codecov Report

Merging #517 (84a4bd1) into master (ce8f812) will decrease coverage by 0.06%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           master     #517      +/-   ##
==========================================
- Coverage   70.89%   70.82%   -0.07%
==========================================
  Files         115      115
  Lines       14374    14374
==========================================
- Hits        10190    10181       -9
- Misses       4184     4193       +9


Support React 15 AND 16 ?

In the documents it states that React 15.5 or newer is supported by tags above React-datepicker v.0.40.0 and above.  However, the peer-dependencies is set to strictly react 16+.   Installing 1.x.x gives warnings about incorrect peer-dependencies.
Can we confirm that the datepicker supports 15 AND 16 and if so update peer dependencies to reflect that?

Support for React 15 was dropped in #1047 .
No one is going to stop you from using React 15, but you'll be on your own since we decided not to spend resources supporting outdated versions of React.


Keybase CLI Proof for Web doesn't accept "~" in URL

Pretty straight forward:
% keybase prove web https://devio.us/~gruselbauer/
▶ ERROR Invalid hostname: devio.us/~gruselbauer/

Tested on Linux Mint Debian Edition 2 and CentOS 7.2 just now.

@gruselbauer The error message is bad -- the real problem is that you can only prove a hostname, not a path.

Aye... Probably going to be a problem once you go public on a broad scale and people want to add shared-hosting sites where domains are mapped to paths, right? At least that's a very common thing in German 99cts-a-month-blog-hosting-kinds of deals.
Just thought I'd drop a note. Great project, big fan so far :+1:


[NATS JetStream] Allow dynamically pull AccountID from a secret

Proposal
I propose a change to the Nats JetStream scaler, where the account ID can be specified from an external resource, such as a secret.
Use-Case
I'm running a NATS Cluster with several (dynamically created) tenants, running with a self-designed authentication server (github.com/deinstapel/nats-jwt-operator), where the Account IDs are not known in advance. My Operator dynamically creates NATS tenants and accounts with a kubernetes CRD and writes the account IDs into the .status of the CRD as well as to a secret.
I would like to be able to tell KEDA to scale based on these accounts, so I can include KEDA in my CD pipeline.
Is this a feature you are interested in implementing yourself?
Yes
Anything else?
Example:
Currently existing code:
triggers:
- type: nats-jetstream
  metadata:
    natsServerMonitoringEndpoint: "nats.nats.svc.cluster.local:8222"
    account: "$G"

Possible new implementation:
triggers:
- type: nats-jetstream
  metadata:
    natsServerMonitoringEndpoint: "nats.nats.svc.cluster.local:8222"
    accountRef:
      secretName: "my-accountSecret"
      secretKey: "account-id"

Hi,
This is almost ready 😄
From KEDA pov, this is already implemented through TriggerAuthentication/ClusterTriggerAuthentication. Using one of them, you can read a secret and get the key.
Right now, NATS JetStream scaler doesn't read that value from TriggerAuthentication/ClusterTriggerAuthentication but it can be done changing this code:
	if config.TriggerMetadata["account"] == "" {
		return meta, errors.New("no account name given")
	}
	meta.account = config.TriggerMetadata["account"]

with this:
	account, err := GetFromAuthOrMeta(config, "account")
	if err != nil {
		return meta, err
	}
	meta.account = account

(and obviously adding at least a unit test)
Are you willing to contribute with the fix?

Sounds good, will prepare a PR.


Exception when opening the Cloud Provider tab

@miq-bot add_label providers
@miq-bot add_label bug

Offhand, this might be for @matthewd ...can you review.

This looks like the db migrations were not run...
The only way I can think to test this out is to have an environment from before the namespace, add an amazon provider (that also has at least one auth keypair), then update your local env to the latest master and try this again.  Chances are you will see this error.
Then, run rake db:migrate and you should no longer see this error.
If the error is still there, then a migration was missed.

Oh good idea @blomquisg.  @lgalis If you migrate, does the problem go away?

I did migrate before I opened the issue. ( I also ran a test with changes the {inheritance_column} for the Authentication class and with that the error went away).
Here is the trace:
[----] I, [2015-08-27T11:19:37.030847 #9886:1097990]  INFO -- :   Rendered ems_cloud/show_list.html.haml within layouts/application (314.6ms)
[----] F, [2015-08-27T11:19:37.031223 #9886:1097990] FATAL -- : Error caught: [ActiveRecord::SubclassNotFound] The single-table inheritance mechanism failed to locate the subclass: 'AuthKeyPairAmazon'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Authentication.inheritance_column to use another column for that information.
/home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/inheritance.rb:186:in rescue in find_sti_class' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/inheritance.rb:180:in find_sti_class'
/home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/inheritance.rb:169:in discriminate_class_for_record' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/persistence.rb:67:in instantiate'
/home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/querying.rb:50:in block (2 levels) in find_by_sql' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/result.rb:51:in block in each'
/home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/result.rb:51:in each' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/result.rb:51:in each'
/home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/querying.rb:50:in map' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/querying.rb:50:in block in find_by_sql'
/home/lgalis/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.4/lib/active_support/notifications/instrumenter.rb:20:in instrument' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/querying.rb:49:in find_by_sql'
/home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/statement_cache.rb:107:in execute' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/associations/collection_association.rb:445:in get_records'
/home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/associations/collection_association.rb:449:in find_target' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/associations/collection_association.rb:392:in load_target'
/home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/associations/collection_association.rb:77:in select' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/associations/collection_proxy.rb:111:in select'
/home/lgalis/dev/New/manageiq/app/models/mixins/authentication_mixin.rb:26:in authentication_userid_passwords' /home/lgalis/dev/New/manageiq/app/models/mixins/authentication_mixin.rb:74:in authentication_status'

ping @matthewd , did we miss a data migration?


seed not printed when using --sequence.shuffle

Describe the bug
When using --sequence.shuffle, the default seed's value is not printed to stdout, making it impossible to reproduce a failing run by supplying a value to --sequence.seed
Reproduction
Run vitest with --sequence.shuffle
System Info
System:
    OS: macOS 13.2
    CPU: (10) arm64 Apple M1 Pro
    Memory: 103.78 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.13.0 - ~/.nvm/versions/node/v18.13.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.13.0/bin/yarn
    npm: 8.19.3 - ~/.nvm/versions/node/v18.13.0/bin/npm
  Browsers:
    Chrome: 110.0.5481.100
    Firefox: 110.0
    Safari: 16.3
  npmPackages:
    vitest: ^0.28.3 => 0.28.3

Used Package Manager
pnpm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

Yes, I do think it's a bug. We should print it under the test name pattern, I think.


docs: update usage/caching

Description

updates usage/caching  as part of #3212 work
followup of https://github.com/litestar-org/litestar/pull/3309

Closes

Good to go minus https://github.com/litestar-org/litestar/pull/3309#discussion_r1550874080


Random location(lat/long) within a radius and position

		$r  = 10000 / 111300;
		$y0 = 35.719035;
		$x0 = 51.393068;
		$u  = (float)rand()/(float)getrandmax();
		$v  = (float)rand()/(float)getrandmax();
		$w  = $r * sqrt($u);
		$t  = 2  * pi() * $v;
		$x  = $w * cos($t);
		$y1 = $w * sin($t);
		$x1 = $x / cos($y0);
                return ['lat' => $y0 + $y1, 'long' => $x0 + $x1];

the main functionality will be something like above, I try to add it myself and request a merge request, it's just a enhancement suggestion, I don't know it will be useful or not..

Thanks, nice idea. Feel free to open a PR, no need to ask for permission by opening an issue.


Remove all things restful

What's this PR do?
removes all things restful. because, who needs rest? 👋
How should this be reviewed?
👀 , or build if you like.
Any background context you want to provide?
We use SERVICES!
Relevant tickets
Fixes #6240

Yais! Awesome sauce! Thanks for this code cleanup :) 👍


question about browser compatibility

About docs
What about browser compatibility?
I think you can add a description of browser compatibility to the doc.
Thanks

I actually was just wondering the same thing, I tried accessing the docs on Microsoft Edge which do not seem to work, also tried modal within my app which also does not seem to be supported

Note that I think i have an old version of edge in my virtual machine, I'm going to try to update and try other browsers as well.

@zctocm
Thank you for pointing this out, we do lack a compatibility list now.
@PaulPCIO
Great work 👍 , your message is very helpful to everyone.
For everyone:
We will add a docuemnt to show the compatibility of zeit-ui/react in the future, similar to list of ant-design. But I can't promise a deadline, now I'm dealing with other components.(let me know please if anyone wants to contribute for this)

When I get some time, I will set up a clean env to test all the components one by one 🤕, sadly I can not seem to access the docs with IE else I would have tested it directly from the docs using a browser stack. have to get back to my project, but I will keep you updated of any progress

okay, there seems to be a polyfill error which I suppose to be the reason why the tickbox and model did not work in my first comments.

@PaulPCIO Thank you for your work.
If you want to test the working effect of polyfill, you can fork the project and add plyfill to the document site. (e.g. import something from 'core-js')
Let me know if you need help. (Or you can create a new issue to discuss it.)

@unix https://github.com/zeit-ui/react/pull/228
docs are working 98% in IE 11, next problem I'm not sure how to sort out, I think it's rather something with the babel transpiling of template strings 😅

Transferred  to #229 .


Implement file lazy loading

Ok, so this is not going well... The lazy virtual scroll is kinda working, but we are not really happy with how it turned out (graphical glitch and weird stuff)
We are going to put this feature on hold and focus on a more classical pagination in the first place, and later we will get back to this (and possibly let user choose which mode to use among pagination and infinite scroll)


PowerPoint bridge activation

May I know how to do the "explicit activation"? Thank you.

On the command line? If you implement a custom converter, you can add it to the class path but the server will not activate it unless you include it on the command line by its class name.

Or in code, enable(MicrosoftPowerpointBridge.class) for example:
LocalConverter.builder().enable(MicrosoftPowerpointBridge.class)
	               .baseFolder(tmpDir)
	               .workerPool(20, 25, 2, TimeUnit.SECONDS)
	               .processTimeout(30, TimeUnit.SECONDS)
	               .build();

Thanks @raphw and @plutext .
I had enabled the MicrosoftPowerpointBridge in code and still got the ExecutionException like "Could not complete conversion" or "The conversion finished unsuccessful with exitCode -6".
Finally I fix it by changing the Identity of the DCOM conf for "Microsoft PowerPoint Slide" from "This user" to "The interactive user" or "The launching user".


automatically building BUILD from code

seems pants has a plugin for this:
https://github.com/foursquare/fsqio/tree/master/src/python/fsqio/pants/buildgen
we could possibly pilfer this.

https://github.com/lightbend/scala-sculpt/pull/61
Related PR to build a tool to split big targets automatically.