text:
Bash for nondeveloper

Add a bash for non-developer, who just wants to generate a .po file for a new language in order to start translation immediately and doesn't want to set up the environment.
This bash script automatically installs only what's necessary to generate a .po file from message.pot for a new language, and subsequently runs the msginit command to generate that file.

Inspire by @MathiasTELITSINE. He asked me if there is a way to only generate the .po file without all those programmers' stuff.

Hi @glihm can you review this PR? This bash is based on your translations.sh.

Thanks for this initiative @cryptonerdcn!
Here are my comments:

I think installing stuff is not "developer" related only. Because if we want your script being very generic, we must then install cargo too as we need to install the mdbook-cairo backend. Without it, even if you download mdbook, it is not running. In this case it will not only be related to translations, and it's a script like rustup that we need for the cairo-book (which can be great).

If we take apart this instalation stuff (or if we do a cairobookup script), it could be interesting that you add a command like translation.sh new xx instead of a new script, to abstract the msginit. What do you think?

If we are going your way with "on-the-fly" install of mdbook, I suggest to put this executable in the .gitignore to not confuse the user at the moment of the commit.

About the URLs you use for mdbook, you can refactor a having a MDBOOK_URL at the top, easier to maintain if the version has to change.

This is my take on the technical aspect, let's see @enitrat, @fricoben and/or others opinion on that.
But as you mentioned, it's definitely a good approach to add some abstraction for translators, but in my opinion the cursor may be adjusted and concerns well separated. :+1:

Thanks for this initiative @cryptonerdcn!
Here are my comments:

I think installing stuff is not "developer" related only. Because if we want your script being very generic, we must then install cargo too as we need to install the mdbook-cairo backend. Without it, even if you download mdbook, it is not running. In this case it will not only be related to translations, and it's a script like rustup that we need for the cairo-book (which can be great).
Thank you @glihm !  You are right I forgot cargo .

If we take apart this instalation stuff (or if we do a cairobookup script), it could be interesting that you add a command like translation.sh new xx instead of a new script, to abstract the msginit. What do you think?

Yes, it is a better way.  I just want to avoid modifying 'translations.sh' before but now you say we can change it so :p.

About the URLs you use for mdbook, you can refactor a having a MDBOOK_URL at the top, easier to maintain if the version has to change.
Agree.

This is my take on the technical aspect, let's see @enitrat, @fricoben and/or others opinion on that.
But as you mentioned, it's definitely a good approach to add some abstraction for translators, but in my opinion the cursor may be adjusted and concerns well separated. 👍

Yeah, let us discuss and then find a good way to accomplish this task.

Here's my take on this:
While it's great to have non-developer that can contribute to this book by translating content, I think that at least some familiarity with Cairo is required - that way, we're sure that the translator fully understands what he's translating.
In that case, I expect translators to have a minimum of experience in using the CLI, setting up environments, installing dependencies, etc.
I think it's a great idea to have this script available to make onboarding easier, however developing something like cairobookup seems a bit overkill. It's probably easier to just create an issue and ask to generate a translation file - but if the script helps and works, let's include it!

@glihm @enitrat I finished it, can you review my new update? Thanks!

@glihm  Thanks for your review! I fixed them.

@glihm Thanks for your review! I fixed them.

@cryptonerdcn don't hesitate to mark the review items as "resolved". :)
@enitrat look good to me.

authors: cryptonerdcn enitrat glihm


text:
Phinx does not store last migration to phinxlog table

Hi, I have two initial migrations for the project. As I run phinx migrate -e development  command it runs both migrations correctly, everything is ok, no error in console. BUT as I see the phinx log table contains only the first of two migrations. Second one is not in the table. All queries in second migrations are done BUT it is not logged in phinx table. If I run phinx migrate -e development again it  throws me an axception about duplicate inserts. Here a the screenshots from database and console.

Is it a bug or am I doing something wrong?

What version of phinx are you using and what are the two migrations you're running?

Hi,
vendor\bin\phinx --version displays Phinx by CakePHP - https://phinx.org
composer.json contains "robmorgan/phinx": "^0.11.4"
migration 1:
<?php

use Phinx\Migration\AbstractMigration;
use Phinx\Db\Adapter\MysqlAdapter;

class InitMigration extends AbstractMigration
{
	/**
	* Migrate Up.
	*/
	public function up()
	{
		$this->query('SET FOREIGN_KEY_CHECKS=0');
		$this->query('SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"');
		$this->query('SET AUTOCOMMIT = 0');
		$this->query('START TRANSACTION');
		$this->query('SET time_zone = "+00:00"');

		$this->query('
			CREATE TABLE IF NOT EXISTS `datagrids` (
				`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
				`text1` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_slovak_ci NOT NULL,
				`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
				PRIMARY KEY (`id`)
			) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_slovak_ci;

			INSERT INTO `datagrids` (`id`, `text1`, `created_at`) VALUES
				(1, \'aaaaaaaaaaaaaaaaa\', \'2020-03-12 09:04:19\'),
				(2, \'bbbbbbbbbbbbbbbbbbbbbbbbbb\', \'2020-03-12 09:04:19\'),
				(3, \'ccccccccccccccccccccc\', \'2020-03-12 09:04:19\'),
				(4, \'ddddddddddddddddddddddd\', \'2020-03-12 09:04:19\'),
				(5, \'eeeeeeeeeeeeeee\', \'2020-03-12 09:04:19\'),
				(6, \'fffffffffffffffffff\', \'2020-03-12 09:04:19\'),
				(7, \'hhhhhhhhhhhhhhhhh\', \'2020-03-12 09:04:19\'),
				(8, \'iiiiiiiiiiiiiiii\', \'2020-03-12 09:04:19\'),
				(9, \'jjjjjjjjjjjjjjjjj\', \'2020-03-12 09:04:19\'),
				(10, \'kkkkkkkkkkkkkkkkkkk\', \'2020-03-12 09:04:19\'),
				(11, \'lllllllllllllllllll\', \'2020-03-12 09:04:19\'),
				(12, \'mmmmmmmmmmmmmmmmmmmmmmm\', \'2020-03-12 09:04:19\'),
				(13, \'nnnnnnnnnnnnnnnnnnn\', \'2020-03-12 09:04:19\'),
				(14, \'oooooooooooooooooooo\', \'2020-03-12 09:04:19\'),
				(15, \'pppppppppppppppppppppp\', \'2020-03-12 09:04:19\'),
				(16, \'rrrrrrrrrrrrrrrr\', \'2020-03-12 09:04:19\'),
				(17, \'sssssssssssssssssssssss\', \'2020-03-12 09:04:19\'),
				(18, \'ttttttttttttttttttttt\', \'2020-03-12 09:04:19\'),
				(19, \'uuuuuuuuuuuuuuuuu\', \'2020-03-12 09:04:19\'),
				(20, \'vvvvvvvvvvvvvvvvvvvvvv\', \'2020-03-12 09:04:19\'),
				(21, \'xxxxxxxxxxxxxxxxxxxxxxxx\', \'2020-03-12 09:04:19\'),
				(22, \'zzzzzzzzzzzzzzzzzzzzzzzz\', \'2020-03-12 09:04:19\'),
				(23, \'yyyyyyyyyyyyyyyyyyyyyy\', \'2020-03-12 09:04:19\'),
				(24, \'qqqqqqqqqqqqqqqqqqqqq\', \'2020-03-12 09:04:19\'),
				(25, \'wwwwwwwwwwwwwwwwwwwwww\', \'2020-03-12 09:04:19\'),
				(26, \'1111111111111111111\', \'2020-03-12 09:04:19\'),
				(27, \'22222222222222\', \'2020-03-12 09:04:19\'),
				(28, \'333333333333333333333\', \'2020-03-12 09:04:19\'),
				(29, \'444444444444444444\', \'2020-03-12 09:04:19\'),
				(30, \'55555555555555555555\', \'2020-03-12 09:04:19\'),
				(31, \'666666666666666666666666\', \'2020-03-12 09:04:19\'),
				(32, \'77777777777777777777\', \'2020-03-12 09:04:19\'),
				(33, \'888888888888888888\', \'2020-03-12 09:04:19\'),
				(34, \'99999999999999999999999\', \'2020-03-12 09:04:19\'),
				(35, \'11111111111111111111111111111111111111111\', \'2020-03-12 09:04:19\'),
				(36, \'aaaaaaaaaaaaaaaaa\', \'2020-03-12 09:05:21\'),
				(37, \'bbbbbbbbbbbbbbbbbbbbbbbbbb\', \'2020-03-12 09:05:21\'),
				(38, \'ccccccccccccccccccccc\', \'2020-03-12 09:05:21\'),
				(39, \'ddddddddddddddddddddddd\', \'2020-03-12 09:05:21\'),
				(40, \'eeeeeeeeeeeeeee\', \'2020-03-12 09:05:21\'),
				(41, \'fffffffffffffffffff\', \'2020-03-12 09:05:21\'),
				(42, \'hhhhhhhhhhhhhhhhh\', \'2020-03-12 09:05:21\'),
				(43, \'iiiiiiiiiiiiiiii\', \'2020-03-12 09:05:21\'),
				(44, \'jjjjjjjjjjjjjjjjj\', \'2020-03-12 09:05:21\'),
				(45, \'kkkkkkkkkkkkkkkkkkk\', \'2020-03-12 09:05:21\'),
				(46, \'lllllllllllllllllll\', \'2020-03-12 09:05:21\'),
				(47, \'mmmmmmmmmmmmmmmmmmmmmmm\', \'2020-03-12 09:05:21\'),
				(48, \'nnnnnnnnnnnnnnnnnnn\', \'2020-03-12 09:05:21\'),
				(49, \'oooooooooooooooooooo\', \'2020-03-12 09:05:21\'),
				(50, \'pppppppppppppppppppppp\', \'2020-03-12 09:05:21\'),
				(51, \'rrrrrrrrrrrrrrrr\', \'2020-03-12 09:05:21\'),
				(52, \'sssssssssssssssssssssss\', \'2020-03-12 09:05:21\'),
				(53, \'ttttttttttttttttttttt\', \'2020-03-12 09:05:21\'),
				(54, \'uuuuuuuuuuuuuuuuu\', \'2020-03-12 09:05:21\'),
				(55, \'vvvvvvvvvvvvvvvvvvvvvv\', \'2020-03-12 09:05:21\'),
				(56, \'xxxxxxxxxxxxxxxxxxxxxxxx\', \'2020-03-12 09:05:21\'),
				(57, \'zzzzzzzzzzzzzzzzzzzzzzzz\', \'2020-03-12 09:05:21\'),
				(58, \'yyyyyyyyyyyyyyyyyyyyyy\', \'2020-03-12 09:05:21\'),
				(59, \'qqqqqqqqqqqqqqqqqqqqq\', \'2020-03-12 09:05:21\'),
				(60, \'wwwwwwwwwwwwwwwwwwwwww\', \'2020-03-12 09:05:21\'),
				(61, \'1111111111111111111\', \'2020-03-12 09:05:21\'),
				(62, \'22222222222222\', \'2020-03-12 09:05:21\'),
				(63, \'333333333333333333333\', \'2020-03-12 09:05:21\'),
				(64, \'444444444444444444\', \'2020-03-12 09:05:21\'),
				(65, \'55555555555555555555\', \'2020-03-12 09:05:21\'),
				(66, \'666666666666666666666666\', \'2020-03-12 09:05:21\'),
				(67, \'77777777777777777777\', \'2020-03-12 09:05:21\'),
				(68, \'888888888888888888\', \'2020-03-12 09:05:21\'),
				(69, \'99999999999999999999999\', \'2020-03-12 09:05:21\'),
				(70, \'11111111111111111111111111111111111111111\', \'2020-03-12 09:05:21\')
		');

		$this->query('
			CREATE TABLE IF NOT EXISTS `roles` (
			`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
			`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_slovak_ci NOT NULL,
			PRIMARY KEY (`id`)
			) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_slovak_ci
		');

		$this->query(
			'INSERT INTO `roles` (`id`, `name`) VALUES
			(10, \'admin\'),
			(11, \'editor\'),
			(12, \'registered\')'
		);

		$this->query('
			CREATE TABLE IF NOT EXISTS `users` (
				`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
				`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_slovak_ci NOT NULL,
				`email` varchar(50) CHARACTER SET utf8 COLLATE utf8_slovak_ci NOT NULL,
				`password` varchar(250) CHARACTER SET utf8 COLLATE utf8_slovak_ci DEFAULT NULL,
				`active` tinyint(3) UNSIGNED NOT NULL DEFAULT \'0\',
				`confirmation_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_slovak_ci DEFAULT NULL,
				`social_network_params` varchar(250) CHARACTER SET utf8 COLLATE utf8_slovak_ci DEFAULT NULL,
				`resource` varchar(50) CHARACTER SET utf8 COLLATE utf8_slovak_ci NOT NULL DEFAULT \'App\',
				`created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
				PRIMARY KEY (`id`),
				UNIQUE KEY `users_name_uk` (`name`),
				UNIQUE KEY `users_email_uk` (`email`)
			) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_slovak_ci
		');

		$this->query('
			INSERT INTO `users` (`id`, `name`, `email`, `password`, `active`, `confirmation_code`, `social_network_params`, `resource`, `created`) VALUES
			(1, \'Čamo\', \'vladimir.camaj@gmail.com\', \'$2y$10$HVq0g2G77hJX6JjvOIdk7OQGBCh3wOf7NTDecXz6n7hFeL5JaFK2W\', 1, NULL, NULL, \'App\', \'2020-03-12 16:19:07\');
		');

		$this->query('
			CREATE TABLE IF NOT EXISTS `users_x_roles` (
				`user_id` int(10) UNSIGNED NOT NULL,
				`role_id` int(10) UNSIGNED NOT NULL,
				PRIMARY KEY (`user_id`,`role_id`),
				KEY `users_x_roles_user_id_k` (`user_id`),
				KEY `users_x_roles_role_id_k` (`role_id`)
			) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_slovak_ci
		');

		$this->query('INSERT INTO `users_x_roles` (`user_id`, `role_id`) VALUES (1, 10)');
		$this->query('SET FOREIGN_KEY_CHECKS=1');
		$this->query('COMMIT');
	}

	/**
	* Migrate Down.
	*/
	public function down()
	{

	}

}

migration 2:
<?php

use Phinx\Migration\AbstractMigration;
use Phinx\Db\Adapter\MysqlAdapter;

class UsersRolesForeignKeysMigration extends AbstractMigration
{
	/**
	* Migrate Up.
	*/
	public function up()
	{
		$this->query('
			ALTER TABLE `users_x_roles` ADD CONSTRAINT `users_x_roles_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
			ALTER TABLE `users_x_roles` ADD CONSTRAINT `users_x_roles_role_id_fk` FOREIGN KEY (`role_id`) REFERENCES `roles`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
		');

	}

	/**
	* Migrate Down.
	*/
	public function down()
	{

	}

}

The up()/down() already runs inside transaction, so $this->query('SET AUTOCOMMIT = 0'); $this->query('START TRANSACTION'); $this->query('COMMIT'); are unnecessary.
It might be issue with inner transaction handling, as MySQL DDL statements cannot be performed within another transaction.
Try to remove transaction queries in up() method.

As I removed the transaction it works. Thanks a lot.

Also, watch out for multiple statements in a single query.
Phinx uses PDO. If you have an error in your query, Phinx does not (unless it now does) iterate the result sets looking to see if there is an error.
You may end up with false positive situations.

Thnaks @rquadling

source: gharchive/issue

authors: MasterOdin camohub garas rquadling

repo: cakephp/phinx

license: MIT

license_type: permissive

license_source: github-api


text:
Result, Box, and ReactiveCocoa not upgraded to Swift 2?

I'm using SimpleAuth to authenticate with LinkedIn. Ever since upgrading to Xcode 7, I've gotten issues with SimpleAuth's dependencies Result, Box, and ReactiveCocoa because they're seemingly not updated to Swift 2 yet. I'm not very well versed with podspecs, but when I look at the SimpleAuth's, none of these are listed as dependencies for SimpleAuth/LinkedIn. The SimpleAuth line in my Podfile is this: pod 'SimpleAuth/LinkedInWeb'.
Is there something else I need in my Podfile to specify that I don't need these dependencies? Or is there a different issue I'm not seeing?

Add this to podfile
pod 'Box', :head
pod 'Result', :head

That did the trick. I had experimented with the :head tag before. Don't know why it didn't work then. Thanks!

authors: MaximKeegan lukenewman

repo: calebd/SimpleAuth

license: mit

license_source: bigquery


text:
Read QR codes from Photos

Hello,
Thank you for building this App! One thing I miss is the ability to read the QR codes from images already stored in the Phone, or, the ability for other Apps to send images to Tofu.
Thank you.

Hey @TCB13, that sounds like a cool idea!
A pull request for this would be very welcome. I'll also consider working on this when I get some time to do so in the future.

@calleerlandsson I'll check it when I get some time, however the last time I did something iOS was about 5 years now so ... no promisses.

This was added in #36.

repo: calleerlandsson/Tofu

license: isc


text:
Controlled tabs with sub-routing inside the content

Hi! Was trying version 0.11.0 and I noticed this on Tabs.js https://github.com/callemall/material-ui/blob/master/src/tabs/tabs.jsx#L168:
if ((valueLink.value && valueLink.value !== value) ||

That means that controlled tabs won't fire requestChange if the tab we click is already the tab we are. However, I have this situation. Each of my tab is a route, inside one tab I have a menu and each item is a route too. Something like:
.../tab_a
.../tab_b
.../tab_b/section_a
.../tab_b/section_b
.../tab_c

When I am in section_a or section_b, I would expect that clicking into the tab_b fires requestChange so I can request a route change (transitionTo from react-router).
My workaround has been to use onActive in tab_b like follows:
onActive(tab) {
  //Sub-route of the Guide and user re-clicks the tab (handleTabsChange won't be fired)
  if(this.context.router.getCurrentParams().section !== undefined){
    this.context.router.transitionTo(tab.props.route);
  }
}

What do you think guys of this?
I also have to say now tabs work as expected (thank you!) with routes (including back and forward button). If you wanna see it in action the website of this code is here: https://audioprofiles.herokuapp.com/
My whole tabs component here: https://github.com/ferrannp/audioprofiles/blob/master/js/components/Tabs.js

nice!
here is a more elegant way of accessing your router:
when router is created:
    var router = Router.create({routes});
    RouterContainer.set(router);

to access your router:
      onTabChange(value, e, tab){
      RouterContainer.get().transitionTo("/"+e.props.value);
     }

inside RouterContainr:
    var _router = null;
    export default {
      set: (router) => _router = router,
      get: () => _router
    }

@ferrannp - does your app use Material UI, or just the website?

authors: ferrannp mbrookes raptoria

repo: callemall/material-ui


text:
Need a calendar component

Basically It is just a calendar component with look and feel similar with the date picker. It's a calendar without "popup". Any way to make it?

That's the internal Calendar component https://github.com/callemall/material-ui/blob/master/src/date-picker/calendar.jsx. You can use it directly but we plan do change the folder organization. That may break in the future.

Thanks!

@oliviertassinari The link you specified no longer works

@jaredmahan Link fixed.

Trying to use the calendar directly, but all days appear on one line. Any other way to show the calendar persistently
`export default class DateSelector extends React.Component {
render() {
return (
    <Calendar></Calendar>

);

}
}
`

@mokargas look right here: https://github.com/callemall/material-ui/issues/5037

Thanks @FelipeSP  !

To capture day click events for
<Calendar firstDayOfWeek={1} onTouchTapDay={(event, date) => { console.log(date)}} ></Calendar>

For some reason the onTouchTapDay doesn't work for me, did it work for you @qalqi ?

Nevermind, it was changed to onClickDay

Hey does anyone still know if this is still possible? It looks like the folder organization was changed so the Calendar now lives under /views/Calendar, but when I try to render it, it now requires props I'm not sure what to do with. Here is what I've tried:
import React, { useState } from 'react';
import { MaterialUiPickersDate } from '@material-ui/pickers';
import { Calendar } from '@material-ui/pickers/views/Calendar/Calendar';
import { makeStyles } from '@material-ui/styles';
import { Theme, createStyles, useTheme } from '@material-ui/core';

const useStyles = makeStyles((theme: Theme) => createStyles({}));

interface ScheduleViewProps {
  example?: string;
}

export default function ScheduleView(props: ScheduleViewProps) {
  const { example } = props;
  const theme: Theme = useTheme();
  const [selectedDate, setSelectedDate] = useState<Date | null>(new Date());

  const handleDateChange = (date: MaterialUiPickersDate) => {
    setSelectedDate(date);
  };

  return (
    <div>
      <Calendar
        firstDayOfWeek={1}
        date={selectedDate}
        onChange={(date, isFinish) => {}}
        classes={{}}
        utils={{}}
        theme={theme}
      />
    </div>
  );
}

Left with the Typescript errors:
Prop classes:

Type '{}' is missing the following properties from type 'Record<"transitionContainer" | "progressContainer" | "week", string>': transitionContainer, progressContainer, week

Prop utils:

Type '{}' is missing the following properties from type 'IUtils<Date | null>': yearFormat, yearMonthFormat, dateTime12hFormat, dateTime24hFormat, and 50 more.

@MattRCherry Do you think that you could move the concern to https://github.com/mui-org/material-ui-pickers? Thanks :)

Will do! My mistake should have noticed this was no longer the right repo!

authors: FelipeSP MattRCherry geohuz jaredmahan mokargas nataze oliviertassinari


text:
Inline Datepicker not displaying correctly

Hi guys,
Problem Description
Inline Datepicker displays like the following image:

<DatePicker hintText="Fecha" value={document.issueDate} onChange={(event, date) => dateChanged(event, date, document)} container="inline"/>
Versions

Material-UI: material-ui@0.15.0-alpha.1
React: react@0.14.7
Browser: Chrome 48.0.2564.116

Hey @tomascharad , please include the template with your bug report. It includes prompts such as browser and mui versioning.

Thanks @nathanmarks, I already updated the issue to match the required template.

@tomascharad

Inline Datepicker displays like the following image:

No it doesn't:

(Unless there's something you're not telling us.)
From the template:
"Please include steps to reproduce the problem, code sample, screenshots as appropriate"
There's a reason we ask for this. We genuinely don't have time to triage half-baked issue reports, and it takes time away from more productive work.

Hi @mbrookes,
Your tone is somewhat derogatory, I would appreciate a more emphatic style as I'm only trying to help.
I already changed my datepicker to my previous html5 implementation so I no longer have a problem with this issue.
Anyway, If you go to: http://www.material-ui.com/#/components/date-picker and shrink you browser in width at tops, you will get the exact same effect.
Thank you very much for your time.

authors: mbrookes nathanmarks tomascharad


text:
[Core] Remove default theme handling from components

After some investigation prompted by a question from @nathanmarks about themes, it seems there is a huge amount of boilerplate associated with ensuring a theme is available when none has been defined already on context. (#1662).
Having every component check for the existence of muiTheme on context, and adding it if not found, results in significant added complexity to the code. This reduces code clarity and maintainability, and in some cases introduced state solely for the purpose of moving muiTheme through the pipeline.
By removing this code we significantly simplify the components. In addition several components are now stateless as a result.
A developer using MUI will need to pass a theme on context once in their app, (for example with MuIThemeProvider), so the tradeoff is 2 lines of code for the user, vs nearly 2000 in MUI.
TL;DR: This PR removes the code from components that adds a theme if not already on context.

I think this is a good idea... esp considering the idea of context to begin with. There is a crazy amount of boilerplate involved to support an edge case. Not only that, but we're currently forcing internal state (and soon a constructor method) for the sole purpose of putting the theme from context into state as well.
Having users use MuiThemeProvider somewhere nearer the root of their tree is perfectly acceptable IMO, esp since default themes are configured on a global basis. This is what you have to do anyways if you want to customize anything so a good portion of users are already familiar with it too.
This change would cut some unnecessary LoC, increase clarity in the codebase and make the components less daunting to new contributors! (The theme stuff is kinda scary... admit it!)

Separate note: It seems like this PR removes cases where there are two successive empty lines? Should we just change this rule if that's what we want to enforce? http://eslint.org/docs/rules/no-multiple-empty-lines

I haven't reviewed the code that thoroughly or tested anything, just reviewed the lines changes. I never liked or fully understood the use of state for muiTheme and was looking forward to when we could remove it. Based on what I know of React and material-ui, this change shouldn't cause any problems, but I haven't really investigated.
@oliviertassinari You have any time to comment on the implications of this change or the historical rationales for why it was done like this?

It seems like this PR removes cases where there are two successive empty lines?

Ah, one of my changes introduced a blank line, so I blindly replaced all doubles assuming they were mine. Not sure how to put any existing ones back if there's a preference to keep them!

@newoga - thanks for the review. I've applied your changes (bar one - see comment), and added a few more!

@newoga - thanks for the review. I've applied your changes (bar one - see comment), and added a few more!

Thanks @mbrookes! I know a lot of these issues weren't your fault, but I think addressing them now while they are loosely related may help avoid some of the "why is it written like this" questions later!

BTW, while you were away (I think) github added the ability to more easily review changes by commit, or in a specific file:

You probably knew already, but just in case!

Thanks for splitting up the commits @mbrookes. That was simple to review.

You probably knew already, but just in case!

And thanks for the tip. I think I read that on their blog but didn't need it this time!
I think after that one last change we should be good to go. I'd still like to here @oliviertassinari's thoughts on this before merging. But I'm happy. I think we've made a lot of great strides so far in 0.15.0 to making our components easier to read and contribute too.

@oliviertassinari You have any time to comment on the implications of this change or the historical rationales for why it was done like this?

Why was the theme passed from the context to the state? That's a very good question, but I don't have any answer for you. I can't help thinking that, in #1662, we have move this logic into the render method and save us from using the state.
muiTheme: this.context.muiTheme ? this.context.muiTheme : ThemeManager.getMuiTheme(DefaultRawTheme),

@newoga @509baa27424c3e5096d4edef7266d3a640617d65
@oliviertassinari @9018ab0ef55bcf7e06f80ab7e62e42e0090afa27
Also rebased.

@newoga @e14d12c
@oliviertassinari @660ce61
Also rebased, and fixed linting errors rebasing introduced.

@mbrookes wanna make all the single key destructuring statements single lined?

@mbrookes there's a typo in "miuTheme" in commit d404406

@nathanmarks bah, I fixed a typo with a typo! lol

:laughing:

@mbrookes  #4021 is locked (why?) so I'll post this related question here: is it really your intention now that any component we want to test must include the following boilerplate:
import getMuiTheme from 'material-ui/styles/getMuiTheme';

// in component...
childContextTypes:{
  muiTheme: React.PropTypes.object.isRequired,
},
getChildContext() {
  return {muiTheme: getMuiTheme()};
},

whenever there is a mui component somewhere down in that component's render hierarchy? Essentially, that means that every component with more than trivial functionality will need to add these lines just to be tested, so 100 components means somewhere between 300 and 700 extra lines of boilerplate.
You mentioned that you were able to cut 2,000 extra lines from this package, but isn't this simply shifting the extra code from material-ui to me (albeit with simpler boilerplate than the more complex code on your end)? For hundreds or thousands of people with a similar issue, that's potentially millions of lines of boilerplate added to cut 2,000 from material-ui. Maybe I'm misunderstanding the intent or your approach to testing in the new version, so please correct me if I'm wrong, but I feel like there must be a way to make this library test-friendly with necessitating thousands of lines of boilerplate (neither in the library nor in the end-user's code).
Thanks!

Millions of lines of boilerplate?

All you need to do is provide the context somewhere in your rendering tree for fully rendered component trees. And you don't need it at all for shallow unit testing your own components.

Here's how we pass context to our shallow rendered components (needed because ours use the theme as they are the components being shallow rendered).
  const shallowWithContext = (node, context = {}) => {
    return shallow(node, {
      context: {muiTheme, ...context},
    });
  };

We use enzyme for our test utility, but you can do the same thing with the vanilla test utilities by creating a simple wrapper.
import stubContext from '../react-stub-context';
import getMuiTheme from 'styles/getMuiTheme';

function injectTheme(Component, theme) {
  const injectedTheme = theme || getMuiTheme();
  return stubContext(Component, {muiTheme: injectedTheme});
}

module.exports = injectTheme;

provide the context somewhere in your rendering tree

Right, which means that during testing, where we are testing components individually, we need to provide that context for every component that has tests. For an app that makes heavy use of material design, that means providing the context explicitly in essentially every component. Or at least, every component which directly includes any mui component in its render method.
7 extra lines could easily add up to a million given the number of users of this project, and the number of components that include any mui component in a typical material design project.

Ok, the wrapper idea might work, I'll give it a shot. There should probably be docs on this at some point :)
Thanks again for the fast reply.

@anyong np, let me know if you have any continued problems with this issue.

I'm trying to make material-ui work at all in the react-slingshot environment.  I've already spent 2 days trying to get the context thing to work.  It works in the webpack example under your code, but in the react-slingshot example I cannot ever get that context to not be null.
This deeply sucks.  I have no idea what sets what.  I try to set a break point in the constructor but that context variable throws for being undefined before I even seem to get control.  None of this makes any sense and god knows what transpilingingifyifyifybableifywtfify is going on.    I'm supposed to add things to my component but just dropping the stuff into the component doesn't even compile.
I'm beyond frustrated.  I'm sure I'm doing some simple noob thing wrong but all I want is a hello world with a couple of material-ui components showing up in the react-slingshot boiler plate.
I'd love to have working unit tests.  Right now I can't even get a button to render in a browser because I've spent literally an entire day trying to understand a Theme system that I really wish I didn't have to care about.

@jason-henriksen You don't need to understand it, just use MuiThemeProvider.

I'm certain that if I knew how to use it, I'd be quite happy to do so.

Clearly, I'm very new to the whole eco system.   I was quite happy in C# land.  I'm doing all of this:

import React, { PropTypes } from 'react';
import { Link, IndexLink } from 'react-router';
import AppBar from 'material-ui/AppBar';
import IconButton from 'material-ui/IconButton';
import IconMenu from 'material-ui/IconMenu';
import MenuItem from 'material-ui/MenuItem';
import MoreVertIcon from 'material-ui/svg-icons/navigation/more-vert';
import ActionHome from 'material-ui/svg-icons/action/home';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import injectTapEventPlugin from 'react-tap-event-plugin';
// Needed for onTouchTap
// Check this repo:
// https://github.com/zilverline/react-tap-event-plugin
injectTapEventPlugin();
const muiTheme = getMuiTheme();
class App extends React.Component{
render() {
return (

    <MuiThemeProvider muiTheme={muiTheme}>
      <AppBar
        title="Laru TPP-RAM"
        iconElementLeft={<IconButton><ActionHome /></IconButton>}
        iconElementRight={
        <IconMenu
          iconButtonElement={<IconButton><MoreVertIcon /></IconButton>}
          targetOrigin={{horizontal: 'right', vertical: 'top'}}
          anchorOrigin={{horizontal: 'right', vertical: 'top'}}
        >
          <Link to="/fuel-savings"><MenuItem primaryText="Fuel Savings Demo"></MenuItem></Link>
          <Link to="/about"><MenuItem primaryText="Help"></MenuItem></Link>
          <IndexLink to="/"><MenuItem primaryText="Sign out" ></MenuItem></IndexLink>
        </IconMenu>
      }
      />
    </MuiThemeProvider>

    {this.props.children}

);

}
}
App.childContextTypes = {
muiTheme: React.PropTypes.object
};
App.propTypes = {
children: PropTypes.element
};
export default App;

And receiving nothing but this:
TextField.js?ba5b:330
Uncaught TypeError: Cannot read property 'prepareStyles' of undefined
Any ideas?

Ah!  And that code links to another object called HomePage that looks like this:

import React from 'react';
//import {Link} from 'react-router';
import TextField from 'material-ui/TextField';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
const muiTheme = getMuiTheme();
class HomePage extends React.Component {
constructor(props, context) {
super(props, context);  // never gets here
// this.handleRequestClose = this.handleRequestClose.bind(this);
// this.handleTouchTap = this.handleTouchTap.bind(this);
}
render() {
return (

    <MuiThemeProvider muiTheme={muiTheme}>

    Test

    Sample Login Page -- these fail for lack of a context theme.  I honestly could not care less about themes!
    <TextField
      hintText="E-Mail"
      floatingLabelText="Login E-Mail"
      floatingLabelFixed={true}
    />

    <TextField
      hintText="Password Field"
      floatingLabelText="Password"
      type="password"
    />

    </MuiThemeProvider>

);

};
};
export default HomePage;

Homepage must be the problem since it's the only thing that contains a TextField.  I can guess that react-link is trying to bring it in somehow, but it seems like I'm doing the same thing in this component as the other.   So I'm still stuck with no idea what I'm supposed to do.

@jason-henriksen
For future reference, it's a good idea to look and see if open source projects has a contribution guide for where to put these types of questions. We have one here: https://github.com/callemall/material-ui/blob/master/CONTRIBUTING.md
Your issue is in your App component, the <MuitThemeProvider /> needs to wrap everything that uses material-ui (including {this.props.children}.

Excellent.   Thank you.  I had through from all of the other comments that I needed a MuiThemeProvider tag for each component I built.  From that I (wrongly) thought the the props children should be outside of that.
For reference, I had to move the closing tag of  down around the {this.props.childeren} tag.  Then it complained that MuiThemeProvide cannot take a list, so withing  I wrapped everything into another div.   At that point it worked!
I am definitely exposing my uncouth lack of integration into polite society here.   To make up for it, I'd be happy to extend the example if you're interested to show an example with more sub-components.   Alternately, I could just remove these questions, move them to stack overflow and then answer them myself if you prefer.
Thank you again for the help!

@jason-henriksen No worries, thanks for offering and caring to help! 👍  The best way to start helping is learning material-ui, joining the community (we're on Github for project management, and StackOverflow and Gitter for general questions), and pitching in and helping point others that are having issues in the right direction. If we all lead by example then the burden doesn't have to fall on anyone.
For the record, our core team is made up of volunteers who use their free time to make this framework great. That's the main reason why we try to enforce that questions are asked and answered in the right channels and encourage community involvement (so no one has to get burnt out 😄)

This PR was supposed to handle #4021 I guess.
But in my jest snapshot testing of a Component, I get the same issue in <Avatar/> Component.
  TypeError: Cannot read property 'prepareStyles' of undefined

       at Avatar.render (node_modules/material-ui/Avatar/Avatar.js:99:48)
       at node_modules/react-test-renderer/lib/ReactCompositeComponent.js:796:21
       at measureLifeCyclePerf (node_modules/react-test-renderer/lib/ReactCompositeComponent.js:75:12)

Am I still required to inject muiTheme in some possible way during standalone component testing?
"material-ui": "^0.18.1"

Am I still required to inject muiTheme in some possible way during standalone component testing?

Yes you are. That's making the implementation much simpler.
We could revert that on the next branch if we end up using a Higher-order component to inject the style. Then it would be simple to implement a default theme.

source: gharchive/pull-request

authors: anyong jason-henriksen krnaveen14 mbrookes nathanmarks newoga oliviertassinari


text:
Fix: rapid tabbing caused issues

Fixes #527
I'm new to this repo, so please let me know if I missed something.
Still, I believe that this PR fixes the issue.

Thanks @pomerantsev !

authors: hai-cea pomerantsev


text:
Menu calculate new height on _renderVisibility

When I load "menuItens" asynchronously new itens can be added after "componentDidMount" and call "_renderVisibility" again.
I do a hotfix to calculate new height on render visibility.
Thank you.

@pettom I'm sorry I didn't get to merge this before 0.8. Would you like to resubmit the PR?

@hai-cea no problem, but can I submit other branch ?

@hai-cea Sorry for my confused pull request. I have updated again and I think it cleaner now.

Thanks @pettom !

authors: hai-cea pettom


text:
Time out requesting http://localhost:8081/onchange on iOS

Environment
System:
    OS: macOS 10.15.4
    CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
    Memory: 781.97 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.16.3 - /usr/local/opt/node@12/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - /usr/local/opt/node@12/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 26, 27, 28, 29
      Build Tools: 28.0.3, 29.0.3
      System Images: android-28 | Google APIs Intel x86 Atom
      Android NDK: 20.0.5594570
  IDEs:
    Android Studio: 3.6 AI-192.7142.36.36.6392135
    Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
  npmPackages:
    @haul-bundler/cli: 0.19.0 => 0.19.0
    react-native: 0.60.6 => 0.60.6
  npmGlobalPackages:
    react-native-cli: 2.0.1

Description
If you leave Haul open for a while without doing anything, you'll get a bunch of The request timed out. errors because it keeps trying to fetch http://localhost:8081/onchange. The terminal will be filled with /onchange:
...
info ► GET /onchange
info ► GET /onchange
info ► GET /onchange
info ► GET /onchange

And in Xcode, you'll see many lines like below:
2020-05-25 22:53:57.020315+0200 ReactTestApp[90320:10851273] Task <0D3B9BB0-F2B1-4C7D-804A-16E2B0D83494>.<20> finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSUnderlyingError=0x600002038300 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, NSErrorFailingURLStringKey=http://localhost:8081/onchange, NSErrorFailingURLKey=http://localhost:8081/onchange, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=The request timed out.}
FWIW, I don't think that anything's broken. It's more of an annoyance.
Reproduction Steps

Start Haul in watch mode
Start any RN app and enable "Live Reload"
Wait…

cc @zamotany

repo: callstack/haul


text:
SetPage not working on IOS on v7.0.0 next

Environment
React native pager view v7.0.0 next
React native tab view v3.5.2
React native 0.69.9
React 18.2
Description
SetPage method of pager view is called but it does not change the page when used in conjunction with react native tab view. React native tab views pages contain pager view and on clicking a tab it should change the page but it does not happen. Only on IOS this happens and on android it works fine. Also i noticed that this happens on next version and on other versions the swiping part is disabled for tab view

SetPageWithoutAnimation works only if I use setTimeout with value of 0

Same here, setPage not work but setPageWithoutAnimation works.

Closing as we are moving away from next experimental implementation.

authors: CarlosSLoureiro MrRefactor samiullah452

repo: callstack/react-native-pager-view


text:
feat: implement one quantifier

Summary
This PR implements the simplest quantifier one.
Test plan
CI Green

BTW @okwasniewski you can merge approved PRs at will.

authors: mdjastrzebski okwasniewski

repo: callstack/ts-regex


text:
Co-maintain with Callstack?

Hey!
Really nice work with reason bindings for Paper. What do you think about moving the repo to the callstack org and co-maintain it with us? It'll ensure that it stays updated as new versions of Paper are released.

Hey, that's a really good idea @satya164. Let's do it

Awesome!

Hey, first of all sorry for not responding for so long, we had quite busy time working on paper v2.0. Are you still ok with that initiative of moving repo to callstack org and co-maintaining it with us?
Btw, i saw that you started updating bindings to v2.0. What is the progress? Maybe i could help you with that?

Yeah for sure. Let's do it.
@medson10 can you lead that?

Sure

@Trancever for now we are updating as we need, adding new props and some other minor changes, and testing them in a real project, do you guys did some big change what can break the usage of some component?

@medson10 You can find all the breaking changes in (Migration guide)[https://github.com/callstack/react-native-paper/wiki/Migration-guide-for-2.0]. In 2.0 many components are exposed as a static property of other component e.g. Dialog.Content, Dialog.Title so i am pretty sure old bindings will not work properly.

Got it, so we can use this as a roadmap to upgrade the bindings, @Trancever can you give me permission on callstackincubator organization so I can transfer the ownership and we continue this on there?

Yeah, I'll ask someone who has permissions to do it, it might take up to few hours.

@medson10 You should have permissions right now. Let me know if you need something else from our side.

@Trancever just transferred, thank you, now I just need the npm user of someone to give permission to publish the module

@medson10 Cool! I can be that person. https://www.npmjs.com/~trensik


text:
Added zpool compatibility

All options work through:
var zfs-filesystem = require('zfs');
for zfs command:
zfs-filesystem.zfs.get ...
(The old commands are still available without the zfs middle command: zfs-filesystem.get)
for zpool command:
zfs-filesystem.zpool.get ...
Everything roughly tested, but everything seems to work.
Best regards!
Hans

Thanks! Some comments; the compact and findCmd functions might be better in a common until.js or so instead of being duplicated? Can we capitalize ZPOOL as ZPool?

All remarks resolved!
Greetings!

Looks reasonable apart from the above nit and not being auto-mergeable; can you rebase onto current master?

Calmh,
The name indeed didn't made sense anymore. I created this function with a more advanced set of options in mind: The end user picks a poolType like raid, mirror, ...: and this function puts everything in the correct order for the zpool command. So the opts param would look like:
opts.devices = "['/dev/sda/', '/dev/sdb/']"
opts.poolType = "mirror"
Then the vdev analyze function would create this output:
mirror /dev/sda mirror /dev/sdb
But anyway it's not in for the moment, so I renamed the function. When I've some more time in the future I'll finish it. ;-)
I'm looking into rebasing, but it can take some time before a create a new pull request. It's the first time I'm active on a github project, so I've a lot to learn :-). I'm looking for some good rebasing tutorials right now.
Anyway thanks for the advice and the opportunity to make contributions!
Best regards!
H

I think rebasing worked

sorry, one exports got lost during rebasing. Now the tests pass successfully.
Thanks for your patience!

No problem. Looks good apart from the stray debug prints; remove those, and squash to a single commit, and I think we're home. :)

Everything updated as you asked. Also added some guidance to every function and README is updated as well.
Sorry for the delay, it's been a very busy week.

No worries. It's still 18 commits though, which is a bit excessive. Squash please?

authors: calmh hacor

repo: calmh/node-zfs


text:
Update MAINTAINERS.MD

Signing up for this project. Adding my name in MAINTAINERS:MD

Would like to participate as a contributor, not a maintainer, for the time being.

repo: camaraproject/DeviceLocation


text:
feat: enable image modality for ChatAgent

Description
Enable image modality for ChatAgent. Notice that only tested with single step chat agent, which means that the assistant agent just perform one step given some images etc.
Motivation and Context
Part of #454

[x] I have raised an issue to propose this change (required for new features and bug fixes)

Types of changes
What types of changes does your code introduce? Put an x in all the boxes that apply:

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds core functionality)
[x] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Documentation (update in the documentation)
[x] Example (update in the folder of example)

Implemented Tasks

Enable image modality in BaseMessage
Create a new ChatGPTVisionConfig as the vision model config is different from the text one
Update token counting for images
Create object recognition task type and example

Checklist
Go over all the following points, and put an x in all the boxes that apply.
If you are unsure about any of these, don't hesitate to ask. We are here to help!

[x] I have read the CONTRIBUTION guide. (required)
[ ] My change requires a change to the documentation.
[x] I have updated the tests accordingly. (required for a bug fix or a new feature)
[ ] I have updated the documentation accordingly.

@Wendong-Fan I create a mock test instead as it costs relatively a lot for using the vision model.

Thank @zechengz for the amazing implementation!!
Some questions to discuss:

Is ChatGPTVisionConfig needed? Could we use ChatGPTConfig instead?
Could we also merge FunctionCallingConfig with ChatGPTConfig also well? There may be some extra or not supported keys when we call the API endpoint for different models. But I guess we can filter the ones that are different from the default values when we revert them to dict. By doing this, we can hugely simplify the abstraction.
Since now gpt-4-turbo supports vision and function calling, should we just remove ModelType.GPT_4_TURBO_VISION and use ModelType.GPT_4_TURBO instead?

gpt-4-vision-preview	GPT-4 model with the ability to understand images, in addition to all other GPT-4 Turbo capabilities. This is a preview model, we recommend developers to now use gpt-4-turbo which includes vision capabilities. Currently points to gpt-4-1106-vision-preview.

Thank @zechengz for the amazing implementation!!
Some questions to discuss:

Is ChatGPTVisionConfig needed? Could we use ChatGPTConfig instead?
Could we also merge FunctionCallingConfig with ChatGPTConfig also well? There may be some extra or not supported keys when we call the API endpoint for different models. But I guess we can filter the ones that are different from the default values when we revert them to dict. By doing this, we can hugely simplify the abstraction.
Since now gpt-4-turbo supports vision and function calling, should we just remove ModelType.GPT_4_TURBO_VISION and use ModelType.GPT_4_TURBO instead?

gpt-4-vision-preview	GPT-4 model with the ability to understand images, in addition to all other GPT-4 Turbo capabilities. This is a preview model, we recommend developers to now use gpt-4-turbo which includes vision capabilities. Currently points to gpt-4-1106-vision-preview.

c.c. @Wendong-Fan @dandansamax @ocss884

Hey @lightaime , I agree with you, we can remove ModelType.GPT_4_TURBO_VISION since currently we can get ride of gpt-4-1106-preview and gpt-4-vision-preview by using gpt-4-turbo. Further, it would be great to remove ChatGPTVisionConfig , merge FunctionCallingConfig  into ChatGPTConfig  to make the abstraction tidy.
One more suggestion after I read the latest OpenAI doc, we can also add parameter detail to give user better flexibility. @zechengz

By controlling the detail parameter, which has three options, low, high, or auto, you have control over how the model processes the image and generates its textual understanding. By default, the model will use the auto setting which will look at the image input size and decide if it should use the low or high setting.
low will enable the "low res" mode. The model will receive a low-res 512px x 512px version of the image, and represent the image with a budget of 65 tokens. This allows the API to return faster responses and consume fewer input tokens for use cases that do not require high detail.
high will enable "high res" mode, which first allows the model to see the low res image and then creates detailed crops of input images as 512px squares based on the input image size. Each of the detailed crops uses twice the token budget (65 tokens) for a total of 129 tokens.

@lightaime @Wendong-Fan SGTM, will create another PR for these.

Hey @zechengz , I create a new issue, let's work on this together with @ocss884  to refactor it
https://github.com/camel-ai/camel/issues/526
cc @lightaime

authors: Wendong-Fan lightaime zechengz

repo: camel-ai/camel


text:
not work in idea 2017.1.2

I can see the camel icon but no popup when I write my endpoint, but it did check if any syntax wrong like unknown option.
Event log only said : Camel IDEA plugin is using camel-catalog version 2.19.0
IDEA : 2017.1.2
camel plugin : 0.4.0
camel : 2.19.0

Can you maybe try other Camel examples or projects. For example the camel-example-console or camel-example-spring-boot from the Apache Camel release or the source code at: https://github.com/apache/camel/tree/master/examples
And is this the first time you use the plugin, or have you used previously where it worked for you.

nope, same problem.
And no, this it first time I use this plugin.
Is there anything I need do to popup the hint? or it's default behavior?

Take a look at the front page here with that animated picture that shows how it should work. Maybe try a similar project like that
https://github.com/camel-idea-plugin/camel-idea-plugin

ya, I know that gif, but it just didn't pop up anything when I typing. I also try to press ctrl + space too.

I dont know what is wrong on your end. Here is works, downloaded Camel 2.19 and unzip/untar it, and go into its examples directory and loaded the camel-example-spring-boot. Added a ? in the 'stream:outendpoint and pressedctrl + space`, see below

ok, hope someone can figure out what happen.

Closing as cannot reproduce

authors: abccbaandy davsclaus

repo: camel-idea-plugin/camel-idea-plugin


text:
i hope there is tagcomplete

ERROR:    Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/starlette/responses.py", line 331, in call
stat_result = await anyio.to_thread.run_sync(os.stat, self.path)
File "/usr/local/lib/python3.8/dist-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
FileNotFoundError: [Errno 2] No such file or directory: '/content/stable-diffusion-webui/tmp/tagAutocompletePath.txt'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/uvicorn/protocols/http/h11_impl.py", line 407, in run_asgi
result = await app(  # type: ignore[func-returns-value]
File "/usr/local/lib/python3.8/dist-packages/uvicorn/middleware/proxy_headers.py", line 78, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/fastapi/applications.py", line 270, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/applications.py", line 124, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 184, in call
raise exc
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 162, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/gzip.py", line 24, in call
await responder(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/gzip.py", line 44, in call
await self.app(scope, receive, self.send_with_gzip)
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.8/dist-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
raise e
File "/usr/local/lib/python3.8/dist-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 706, in call
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 69, in app
await response(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/responses.py", line 334, in call
raise RuntimeError(f"File at path {self.path} does not exist.")
RuntimeError: File at path /content/stable-diffusion-webui/tmp/tagAutocompletePath.txt does not exist.
since your model was able to do that before now it will give this error so i hope it will come back

The newest commits of the autotag complete looks for the models/Lora folder in the webui which does not exist in the "version" of the webui in this repo.
The "stable" commit that is compatible is 7fdad1, which you can do:
!git clone -b 1.16.2 https://github.com/DominikDoom/a1111-sd-webui-tagcomplete

instead.

thank bro

wow cool finding 🥳 we have stable version of the https://github.com/kohya-ss/sd-webui-additional-networks and has LoRA folder we should make all folders same name thanks @NUROISEA ❤

authors: NUROISEA camenduru tranthai2k2

repo: camenduru/stable-diffusion-webui-colab

license: Unlicense


text:
Make Operate resources configurable

Resources are included in the default values but have not actually been used in the deployment.

Thanks @falko :bow:

authors: Zelldon falko


text:
Text annotation resizing glitches

Describe the bug
https://user-images.githubusercontent.com/28307541/217777679-09132e2c-05a9-45db-b720-efa30535a5b2.mov
Steps to reproduce

do this
do that
now this happens

Expected behavior
The vertical part should resize according to the text size as it does when I change text (mostly).
Environment

OS: [e.g. MacOS 10.2, Windows 10]
Camunda Modeler Version: 5.8.0-rc.0
Execution Platform: [e.g. Camunda Platform, Camunda Cloud]
Installed plug-ins: [...]

Additional context
No response

Please verify if I understand correctly: If you shrink a text area horizontally using the resize handles then you'd expect automatic vertical resizing to happen?
I honestly think this is an edge case. As a user I am in full control to resize in both directions at the same time. I get visual feedback as well and can use the diagonal resize handles to help me out.

Yes, or I shouldn't be able to resize so that text doesn't fit the annotation anymore -> see SubProcess case.
Feel free to close it if it's an edge case.

Let's close this and see if it pops up again in user feedback.

authors: barmac nikku

repo: camunda/camunda-modeler


text:
Use twemoji instead of raw characters

preview of what it would look like
columns:

existing emoji character (status quo)
twemoji image
twemoji image with dark drop-shadow (to fix blue/grey ones)
twemoji image with dark bg and light drop-shadow (to fix dark ones in notice message)

I like them. Although I was hoping for animated JoxPixel emojis (😁 ).
The drop shadows do a great job keeping them clear on blue, white (high contrast), or black backgrounds.

Okay, I'll work on finalizing this PR. We can go with these ones (free and easy) and then look into joypixels later.

updated screen:

@canadianveggie ready for you review now

authors: canadianveggie wachunga

repo: canadianveggie/spellie


text:
🛑 POT API [Production] is down

In 229deb8, POT API [Production] (http://pot.paxitalia.com:8443/api/public/auth/signin) was down:

HTTP code: 0
Response time: 0 ms

Resolved: POT API [Production] is back up in bf29d70 after 38 minutes.

repo: cannavit/upptime


text:
Build snap as a confined

Currently this snap cannot be built in a confined way. It's because it uses subprocess to communicate with juju: LP#1941918
It needs to be modified so the snap could be published in a --strict to a snapcraft store.

Imported from Launchpad using lp2gh.

date created: 2021-08-27T19:40:24Z

owner: smigiel-dariusz

assignee: zzehring

the launchpad url

(by zzehring)
The tool now is built as a confined snap. See: https://code.launchpad.net/~zzehring/juju-backup-all/+git/juju-backup-all/+merge/409691

repo: canonical/juju-backup-all


text:
PostgreSQL does not work with "legacy" proxy settings in juju

Steps to reproduce

Juju deploy bundle with landscape and postgres 14/stable in proxy environment (https://pastebin.canonical.com/p/6JnDN22Wz9/)
Wait for postgres to fail on install hook

I cannot use snap-proxy settings in juju model config, I have to use legacy proxy settings. Proxy is correctly configured because latest/stable works perfectly fine.
Expected behavior
Postgres is installed properly
Actual behavior

postgresql/1*          error        idle        8        172.29.151.31                   hook failed: "install"
Versions

Operating system: Ubuntu 22.04.3 LTS

Juju CLI: 3.1.7-genericlinux-amd64

Juju agent: 3.1.7

Charm channel: 14/stable
Charm revision: 363

LXD: 5.0.3
Log output

Juju debug log extract:
unit-postgresql-0: 12:28:01 ERROR unit.postgresql/0.juju-log Uncaught exception while in charm code:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-postgresql-0/charm/./src/charm.py", line 1497, in <module>
    main(PostgresqlOperatorCharm)
  File "/var/lib/juju/agents/unit-postgresql-0/charm/venv/ops/main.py", line 436, in main
    _emit_charm_event(charm, dispatcher.event_name)
  File "/var/lib/juju/agents/unit-postgresql-0/charm/venv/ops/main.py", line 144, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-postgresql-0/charm/venv/ops/framework.py", line 351, in emit
    framework._emit(event)
  File "/var/lib/juju/agents/unit-postgresql-0/charm/venv/ops/framework.py", line 853, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-postgresql-0/charm/venv/ops/framework.py", line 942, in _reemit
    custom_handler(event)
  File "/var/lib/juju/agents/unit-postgresql-0/charm/./src/charm.py", line 765, in _on_install
    self._install_snap_packages(packages=SNAP_PACKAGES)
  File "/var/lib/juju/agents/unit-postgresql-0/charm/./src/charm.py", line 1274, in _install_snap_packages
    snap_package = snap_cache[snap_name]
  File "/var/lib/juju/agents/unit-postgresql-0/charm/lib/charms/operator_libs_linux/v2/snap.py", line 829, in __getitem__
    self._snap_map[snap_name] = self._load_info(snap_name)
  File "/var/lib/juju/agents/unit-postgresql-0/charm/lib/charms/operator_libs_linux/v2/snap.py", line 877, in _load_info
    info = self._snap_client.get_snap_information(name)
  File "/var/lib/juju/agents/unit-postgresql-0/charm/lib/charms/operator_libs_linux/v2/snap.py", line 785, in get_snap_information
    return self._request("GET", "find", {"name": name})[0]
  File "/var/lib/juju/agents/unit-postgresql-0/charm/lib/charms/operator_libs_linux/v2/snap.py", line 742, in _request
    response = self._request_raw(method, path, query, headers, data)
  File "/var/lib/juju/agents/unit-postgresql-0/charm/lib/charms/operator_libs_linux/v2/snap.py", line 763, in _request_raw
    response = self.opener.open(request, timeout=self.timeout)
  File "/usr/lib/python3.10/urllib/request.py", line 519, in open
    response = self._open(req, data)
  File "/usr/lib/python3.10/urllib/request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/var/lib/juju/agents/unit-postgresql-0/charm/lib/charms/operator_libs_linux/v2/snap.py", line 679, in http_open
    return self.do_open(_UnixSocketConnection, req, socket_path=self.socket_path)
  File "/usr/lib/python3.10/urllib/request.py", line 1352, in do_open
    r = h.getresponse()
  File "/usr/lib/python3.10/http/client.py", line 1375, in getresponse
    response.begin()
  File "/usr/lib/python3.10/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.10/http/client.py", line 279, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.10/socket.py", line 705, in readinto
    return self._sock.recv_into(b)
TimeoutError: timed out
unit-postgresql-0: 12:28:01 ERROR juju.worker.uniter.operation hook "install" (via hook dispatching script: dispatch) failed: exit status 1
unit-postgresql-0: 12:28:01 INFO juju.worker.uniter awaiting error resolution for "install" hook

Full log: https://pastebin.canonical.com/p/7KwFQh5JXK/

Additional context

Hi, @Barteus, I don't think the legacy charm uses snaps. The traceback indicates that the snap charm library cannot connect to the local snapd API. Can you try to do it manually from within the unit with something like curl --unix-socket /run/snapd.socket http://localhost/v2/find?name=charmed-postgresql? Is the snap CLI functional in the unit?

I had to add the legacy juju proxy settings and snap-http-proxy and snap-https-proxy. It works this way.

I had to add the legacy juju proxy settings and snap-http-proxy and snap-https-proxy. It works this way.

Hi @Barteus , can you share the precise details to document to simplify the path for the followers here. Which options, which values, how ... (you can drop them here and we will move to the documentation). Tnx!

authors: Barteus dragomirp taurus-forever

repo: canonical/postgresql-operator


text:
test-branch/execute-job/wrong-comment-on-pr/ce85e197-db00-428e-bc97-85a460685c71

PR for testing 9460d1f19acb8cfc3f42b60c169b196c1591b944

comment 1

repo: canonical/repo-policy-compliance-tests


text:
test-branch/execute-job/wrong-comment-on-pr/3952669e-362c-4b70-b3de-f8631273b78e

PR for testing 6a49b599e9fbd7c460878a9c7127858922ccc4e9

comment 1


text:
Adds methods to fetch certificates issued

Description
Allows getting the issued certificates from the databags. Either by getting all certificates for all relations or getting certificates by relation ID.
The goal is to allow the provider charms to implement actions that list the issued certificates, addressing this issue.
Checklist

[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[ ] I have made corresponding changes to the documentation.
[x] I have added tests that validate the behaviour of the software.
[x] I validated that new and existing unit tests pass locally with my changes.
[x] Any dependent changes have been merged and published in downstream modules.
[x] I have bumped the version of any required library.

A general comment is that we might want to provide certificates in a dict mapping them back to CSR, because a single app can request multiple different certificates, and the way they are tracked is by the matching CSR.
It would mean that for each relation, we would probably want to receive a dict instead of a list.
{
  "app1": {
            "csr1": "cert1",
            "csr2": "cert2"
          },
  "app2": {"csr3": "cert3"}
}

I agree, this would give more info, however I followed the description of

A general comment is that we might want to provide certificates in a dict mapping them back to CSR, because a single app can request multiple different certificates, and the way they are tracked is by the matching CSR.
It would mean that for each relation, we would probably want to receive a dict instead of a list.
{
  "app1": {
            "csr1": "cert1",
            "csr2": "cert2"
          },
  "app2": {"csr3": "cert3"}
}

Done.

repo: canonical/tls-certificates-interface


text:
🛑 Ubuntu Security API - Notices is down

In faeaf76, Ubuntu Security API - Notices (https://ubuntu.com/security/notices.json) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Ubuntu Security API - Notices is back up in ab5158e.

repo: canonical/upptime


text:
feat: enable dead server pruning

Description
This PR introduces a change that configures the raft backend when the charm is being authorized. These configuration options do not have a relevant field in the vault.hcl config file, so they have to be executed (relatively) manually.
Vault only allows a minimum of 3 for the minimum quorum for automatic dead server pruning. This means that dead server 2 and 3 will never be cleaned. On top of that, we already do our best to update the vault config file and remove the peers that are not planned to be there, so this is really a plan C thing.
Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have made corresponding changes to the documentation
[x] I have added tests that validate the behaviour of the software
[x] I validated that new and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules

Blocked by #429

Blocked by #429

Looks like its working now


text:
Occasional integration test failure: InvalidPath: no handler for route "charm-pki/ca/pem". route entry not found., on get https://10.112.13.214:8200/v1/charm-pki/ca/pem

Bug Description
This tends to happen on the following test for me when running locally:
FAILED tests/integration/test_integration.py::test_given_vault_pki_relation_and_unmatching_common_name_when_integrate_then_cert_not_provided - hvac.exceptions.InvalidPath: no handler for route "charm-pki/ca/pem". route entry not found., on get https://10.112.13.214:8200/v1/charm-pki/ca/pem

I don't know what causes it, but I presume it has something to do with me running on a slower machine, and some race condition.
To Reproduce
Unknown, happens occasionally when running the integration tests locally.
Environment
snaps:
lxd 5.19
juju 3.4.4
Running the integration tests locally with:
tox -e integration -- --model=dev --charm_path="vault_ubuntu-22.04-amd64.charm" --kv_requirer_charm_path="tests/integration/vault_kv_requirer_operator/vault-kv-requirer_ubuntu-22.04-amd64.charm"

Relevant log output
See attached logs

Additional context
debuglog.log

This did get worse for me, but went away when I completed https://github.com/canonical/vault-operator/pull/271
I haven't seen it since, so I believe this can be closed as it appears to be addressed by the above change.

repo: canonical/vault-operator


text:
Distributed Eventbus Event handling exception

ERROR com.hazelcast.client.spi.ClientListenerService - hz.client_0_xyz.event-7 caught an exception while processing task:com.hazelcast.client.spi.impl.listener.ClientListenerServiceImpl$ClientEventProcessor@10b9f532
java.lang.RuntimeException: Internal Error! No session id defined for event bus listener!
at com.canoo.dp.impl.server.event.AbstractEventBus.triggerEventHandling(AbstractEventBus.java:150)
at com.canoo.dp.impl.server.event.DistributedEventBus$3.onMessage(DistributedEventBus.java:108)
at com.hazelcast.client.proxy.ClientTopicProxy$TopicItemHandler.handle(ClientTopicProxy.java:85)
at com.hazelcast.client.impl.protocol.codec.TopicAddMessageListenerCodec$AbstractEventHandler.handle(TopicAddMessageListenerCodec.java:126)
at com.hazelcast.client.proxy.ClientTopicProxy$TopicItemHandler.handle(ClientTopicProxy.java:70)
at com.hazelcast.client.spi.impl.listener.ClientListenerServiceImpl$ClientEventProcessor.run(ClientListenerServiceImpl.java:112)
at com.hazelcast.util.executor.StripedExecutor$Worker.process(StripedExecutor.java:187)
at com.hazelcast.util.executor.StripedExecutor$Worker.run(StripedExecutor.java:171)
This exception appears in our logs several times in a row.

Do we really have this issue? I have created 2 projects recently using distributed event bus(hazelcast) but never get this exception.

yes. But this is an edge case that can happen based on a missing concurrent lock in our event bus implementation.

This happens if an event is send in the same moment as a session that holds an listener for that event is destroyed. In that case the listener will be removed automatically. removing all listeners for a session and iterating over all listeners for handling an event is not synchronised. Therefore a listener that is removed in the same moment (and therefore do not have a session anymore) can be triggered. This ends in the given exception

authors: blackdrag hendrikebbers kunsingh

repo: canoo/dolphin-platform


text:
Add default signal initialization function to C sources generator

Hello.
Could it be useful to generate C initialization function for every message,
which can set all fields(signals) to initial values from .dbc file?
For example, in case of generating sources from example "vehicle.dbc" database we have:
int vehicle_rt_imu06_accel_init(struct vehicle_rt_imu06_accel_t *msg_p)
{
    if (msg_p == NULL) return -1;
    memset(msg_p, 0, sizeof(msg_p));

    uint8_t tmp_validity_accel_lateral = 1;
    memcpy((void*)(&msg_p->validity_accel_lateral), (void*)&tmp_validity_accel_lateral, 1);

    uint8_t tmp_validity_accel_vertical = 0;
    memcpy((void*)(&msg_p->validity_accel_vertical), (void*)&tmp_validity_accel_vertical, 1);

    uint8_t tmp_accuracy_accel = 127;
    memcpy((void*)(&msg_p->accuracy_accel), (void*)&tmp_accuracy_accel, 1);

    int16_t tmp_accel_longitudinal = 32767;
    memcpy((void*)(&msg_p->accel_longitudinal), (void*)&tmp_accel_longitudinal, 2);

    int16_t tmp_accel_lateral = -30000;
    memcpy((void*)(&msg_p->accel_lateral), (void*)&tmp_accel_lateral, 2);

    int16_t tmp_accel_vertical = 16120;
    memcpy((void*)(&msg_p->accel_vertical), (void*)&tmp_accel_vertical, 2);

    return 0;
}

And in case of absence of initial values we have:
int vehicle_rt_sb_speed_init(struct vehicle_rt_sb_speed_t *msg_p)
{
    if (msg_p == NULL) return -1;
    memset(msg_p, 0, sizeof(msg_p));

    return 0;
}

In both cases there is a check for nullptr and filling all fields with zeroes by default.
So we can use it like this:
struct vehicle_rt_imu06_accel_t vehicle_rt_imu06_accel;
int result = vehicle_rt_imu06_accel_init(&vehicle_rt_imu06_accel);
...

In this case you can be sure that your object is initialized correctly by default

Pull Request Test Coverage Report for Build 4907756914

10 of 10 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.007%) to 93.995%

Totals

Change from base Build 4765180165:
0.007%

Covered Lines:
7075

Relevant Lines:
7527

💛  - Coveralls

ok, looks all good now, IMO. let's merge. Thanks for your persistence!

@andlaus, thank you for your patience and readiness to conversation

authors: ArseniSoitu andlaus coveralls

repo: cantools/cantools


text:
js内用java对象与字符串进行拼接操作后结果异常

let javaobj= ...  //调用java返回java对象
console.log(javaobj)
console.log("fff"+javaobj)

输出结果：
{x:92,y:229,width:133,height:73}
fffundefined

请问有没有workaround

这是chrome的结果，如果不能直接显示javaobj的toString方法，能显示这样也行。至少不是undefined这么迷惑的结果。

I think that is a feature not implemented yet.

It has been implemented by this commit and will be included in the next release.

authors: caoccao goldenduo

repo: caoccao/Javet


text:
How to use with sockets?

This is question as opposed to an issue, I didn't see a mailing list, if there is a better place to post this, please let me know.
I am looking for a way to deal with socket streams, to control many connections with different parallelism per server, and to handle cases where requests need to be retried.  Below is some coffeescript code that describes what I am looking for (client and server run in same process for testing).  comments above "client" describe what I'm trying to do.  Is highland the correct library to use for this task?  If someone could convert the "client" side to the "highland way" It would really help with my understanding.
h = require "highland"
net = require "net"

HOST = "127.0.0.1"
createServer = (port) ->
  net.createServer((sock) ->
    #sock.write("welcome!  on port #{port}\r\n")
    #console.log("CONNECTED: #{sock.remoteAddress}:#{sock.remotePort}")
    if port == 7001 # this is the work queue, what ports to send to...
      setInterval (-> sock.write("700#{(Math.random() * 3 | 0) + 2}\r\n")), 0
      return
    sock.on "data", (data) ->
      if (Math.random() * 3 | 0) + 1 == 3 # every 3rd
        sock.write "wait 10 seconds and retry\n"
      else
        sock.write "#{data*2}\n"
      sock.close

    #sock.on "close", (data) ->
      #console.log("CLOSED: #{sock.remoteAddress}:#{sock.remotePort}")
    #  return
    return
  ).listen port, HOST
  console.log "server listening on #{port}"
  return

# create servers
for p in [7001..7004] # port 7001 is our work generator
  createServer(p)

# CLIENT
# read from port 7001 to get a list of work to do.
# It sends out port numbers of where to send
# work.  workers answer 1 question and then
# close socket.
#
# if worker sends back: "wait $x seconds", then
# wait that many seconds and retry with the work.
#
# would like to allow for 5 simultaneous connections to
# port 7002, 3 simultaneous connections to port 7003
# and 1 simultaneous connection to port 7004
#
# workers multiply number sent by 2.  would like to
# keep a running total for each port and if total is
# mod 10000==0 then print it out with the port#
# keep a running total of answers per worker and
# print out number of answers every 1K (per port)

# here is code to connect to 7001 to get
# work and farm out to worker ports and track counts.
#
# how would I use highland to accomplish
# the things described above?
# this code is so messy...
# also this is somehow not closing sockets
# as after 20K per port I get:
# events.js:72
#        throw er; // Unhandled 'error' event
#              ^
#Error: connect EMFILE

g = net.createConnection(7001, HOST)
tots = {7002: 0, 7003: 0, 7004: 0 }
portcnt = {7002: 0, 7003: 0, 7004: 0 }

g.on "data", (data) ->
  port = parseInt(data)
  if isNaN(port) then return
  w = net.createConnection(port, "127.0.0.1")
  w.theport = port
  w.write("50\n")
  w.on "data", (d) ->
    p = w.theport
    ans = parseInt(d.toString())
    if isNaN(ans)
       w.end()
       return
    tots[p] += ans
    portcnt[p] += 1
    if (tots[p]%%10000)==0 then console.log "tots #{p}: #{tots[p]}"
    if (portcnt[p]%%1000)==0 then console.log "portcnt #{p}: #{portcnt[p]}"
    w.end()
    return
  return

I would love to see some thoughts on this as well!

I know that it will not answer your question right away, but could you convert your question to javascript in a gist ?
I think that it would make it easier for people to try and see how highland could be used in your use case. I don't think it has been tried before but I think it could be interesting example to push the limits of highland.

Here it is in Javascript.

Thanks @quarterto. I created a new revision of the file using highland in parts of the algo : https://gist.github.com/jeromew/994f6619fb295338b16c
note: this is far from a finished implementation but it can give some ideas.
@jots, @hydrotik  is that what you are looking for ?

authors: hydrotik jeromew jots quarterto

repo: caolan/highland


text:
Adding a Stream.splitByWithTimeout

The current splitBy method will leave the buffer unsent indefinetly if the separator is not detected.
For quick moving streams, this doesn't cause a problem but for some cases, with slower streams,
we want the buffer contents to be sent after a specific amount of time. Otherwise we are eternally one
step behind.

Can you provide a motivating example use case? Even with a slow source, I can't imagine wanting to split anywhere but on the delimiter.
Assuming the delimiter separates our elements to process, I don't see the benefit of getting an incomplete element a little sooner and the rest of it later (and then ostensibly needing to stitch them back together) as opposed to just waiting a little longer for the element to be all there.
If it's just a memory usage problem, there might be other ways around it.

@LewisJEllis one use case is parsing a text stream for log messages. Let's say we want to merge lines not starting with a date up to the previous line. In this case if we don't get another log event for a period of time, the previous message won't be sent (e.g. If we are getting low traffic). In this case we don't want the message to sit indefinitely waiting.

We've got a Node app that tails log files from a Java app and forwards it to LogStash. The Node app receives the stream of log data line by line but we need to split the log data up by

This seems way too narrow to put into the main repo. Is highland really not pluggable enough to keep this as a separate library?

I'm inclined to agree, but will leave this open if anyone else has more thoughts. This seems like a specific enough use case to either write a custom .consume handler or to package it separately and use .through.
In HL3.0 you'll be able to get a tighter integration with .use, but for now, if you don't want to write a custom .consume or use .through, you can probably achieve something similar through some crafty use of .batchWithTimeOrCount.

@realrunner and @cphoover I think you can accomplish the same thing by placing a custom transform before the splitBy that injects the delimiter upon a timeout. It should be trivial to write, and you won't have to replicate the splitBy logic. You'll end up with some empty lines, but that's also easy to filter out if it's a problem.
This transform seems to only make sense when you know that the delimiter will always be at the start of your strings, so I'll agree with @LewisJEllis and @mpj  that it probably doesn't belong in the main repo.
I'm going to close this so that it doesn't remain open forever. If anyone has more thoughts, they can always make a comment or reopen.

authors: LewisJEllis cphoover mpj realrunner vqvu


text:
[ML-Kit] Fix Android permission handling

There are some issues with the current permission handling, the easiest way would be to copy the permission system from @capacitor/camera which resolved all the issues already.

I walked into this as well. The dialog for asking permissions didn't show up.
Instead of using the default
await BarcodeScanner.checkPermission();
I used
await BarcodeScanner.requestPermissions();
which was working and the dialog for asking permissions was shown.

@Jopie01 yes, this is by design ;) I already started the implementation and this is the behaviour @capacitor/camera has, IMHO it makes sense to differentiate between checking and requesting the permission in this case. It will need to be documented of course :)
But there should be a fallback that will request the permission every time if you want to start a scan and the permission is not asked yet I think. This way you have the option to implement your own checks, but they will be enforced if not asked. This is the default behaviour on iOS as well as far as I know.

This should work, maybe it is not fully tested in each use case, but in general it works :)

repo: capacitor-community/barcode-scanner


text:
Create symlinks atomically (The current "rm && ln -s" is NOT atomic)

I see this pattern in several places, e.g.
run "rm -f #{current_path} && ln -s #{latest_release} #{current_path}"

this could be replaced with a single command:
run "ln -fs #{latest_release} #{current_path}"

or even better, it could use "ln -s && mv" for a truly atomic operation:
run "ln -s #{latest_release} #{current_path}.tmp && mv -f #{current_path}.tmp #{current_path}"

Has this been suggested before? I could not find any issues mentioning this. I'd be happy to create a pull-request if people agree that this is an improvement.

02 The compiled services file has been removed.
✔ 02 ftpmbs102841@80.74.149.6 2.642s
01:41 deploy:set_permissions:acl
01 setfacl -Rn -m u:www-data:rwX -m u:ftpmbs102841:rwX /test-deploy/releases/20180717131046/bootstrap/cache /test-deploy/releases/20180717131046/storage /test-deploy/shared/storage/app /test-deploy/releases/2…
  01 /usr/bin/env: setfacl
  01 : No such file or directory

#<Thread:0x00000000068edf40@C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sshkit-1.17.0/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sshkit-1.17.0/lib/sshkit/runners/parallel.rb:11:in block (2 levels) in execute' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sshkit-1.17.0/lib/sshkit/runners/parallel.rb:15:in rescue in block (2 levels) in execute': Exception while executing as ftpmbs102841@80.74.149.6: setfacl exit status: 127 (SSH
Kit::Runner::ExecuteError)
setfacl stdout: Nothing written
setfacl stderr: /usr/bin/env: setfacl: No such file or directory
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as ftpmbs102841@80.74.149.6: setfacl exit status: 127
setfacl stdout: Nothing written
setfacl stderr: /usr/bin/env: setfacl: No such file or directory
Caused by:
SSHKit::Command::Failed: setfacl exit status: 127
setfacl stdout: Nothing written
setfacl stderr: /usr/bin/env: setfacl: No such file or directory
Tasks: TOP => deploy:updated => deploy:set_permissions:acl
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as ftpmbs102841@80.74.149.6: setfacl exit status: 127
setfacl stdout: Nothing written
setfacl stderr: /usr/bin/env: setfacl: No such file or directory
** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:

authors: eivindhagen frankboris

repo: capistrano/capistrano


text:
Freeze load:defaults task after invoking it so further enhancements fail

This causes a warning to be printed if a capistrano plugin is loaded in deploy.rb instead of the proper Capfile location. Output in this scenario looks like this:
$ cap production deploy:check
WARNING: load:defaults has already been invoked and can no longer be modified. C
heck that you haven't loaded a Capistrano plugin in deploy.rb by mistake. Plugin
s must be loaded in the Capfile to initialize properly.
(Backtrace restricted to imported tasks)
cap aborted!
can't modify frozen #<Class:#<Rake::Task:0x007fc1ef472d28>>

Tasks: TOP => production
(See full trace by running task with --trace)

Addresses #1451.
@leehambley This PR is incomplete, because I still have to figure out how to write an appropriate test. In the meantime, does my approach look good to you so far?

Hey @mattbrictson that looks super clean, I would have wondered if there was something other than Rake::Task#extend() that we needed to hook into, but it doesn't look like it.

@leehambley Thanks for checking this out. I've now added tests, a CHANGELOG entry, and rebased this PR down to one commit. Ready to merge?

authors: leehambley mattbrictson


text:
Centralized entreprise certificate management + addition in Bitbucket collector

This PR provides the following feature:

one centralized directory where one can put their entreprise certs
declaration of a volume in docker-compose.yml that can be used in docker-compose.override
readme file
git ignore to make sure nobody uploads their certs to the public repo

One can attach the certs volume to any collector to make the crt available to the collector. Then, reuse the script block in Bitbucket's properties-builder.sh to add all the certs to the image's keystore.

Hi @matthewbeasley, can you take a look at this when you have the time?
I've used this successfully on my poc instance, and believe it would help enterprise adoption, because there's a good chance that companies have internal certs to secure access to their tools.

Hi @matthewbeasley any news about this?

repo: capitalone/Hygieia


text:
maid_offhours not functioning

I have an EC2 instance running within Capital One's internal AWS environment. I used to have a maid_offhours tag with value off=(M-F,20);on=(M-F,8) and it worked well for scheduling the start/stop of my instance. However this function has stopped working since late October. Has this function been decommissioned? Is there another option available now?

@alittlefishy if you look at the Lambda function for the custodian offhours policy, click on the button to view the CloudWatch logs for it.  Are there errors in the log?

?  This resolved then?

repo: capitalone/cloud-custodian


text:
azure - event grid to storage queue function

This PR replaces:
azure event webhook subscription -> azure function
with:
azure event storage queue subscription -> storage queue <- azure function
This removes the necessity for the azure function webhook url, which compromises security and aligns with the ability to deploy the function to an ILB ASE.
The storage queue bindings require dotnet binaries. Instead of requiring consumers of custodian to install dotnet, the decision was made to checkin the binaries that will need to be packaged with the function in order for the function to be able to poll the queue.

Rather than checking all of the binaries individually, do you think it would be possible to have a zip that we date and just combine two zips together?

Rather than checking all of the binaries individually, do you think it would be possible to have a zip that we date and just combine two zips together?

From about 15 minutes of searching through zipfile docs and stack overflow it does not look like that is possible without extracting the files from the package. If you happen to know how to do it I'd be happy to add that.

authors: aluong erwelch


text:
Document experimental component life cycle & process

Need a process to triage experimental components
Life cycle of experimental components

Enter experimental (based on reuse)
Once a year, set reminder to look at it again
Triage based on criteria --> if good, promote to core; if not good, deprecate

To Do

create a boxnote and add to team operation folder
maybe wiki if public is ok

Started. To be improved:
https://github.com/carbon-design-system/carbon-for-ibm-dotcom/wiki/Experimental-component-life-cycle-[WIP]


text:
feat(tutorial): complete step 5

Closes #
{{short description}}
https://carbon-tutorial-nikhil-isaac.eu-gb.cf.appdomain.cloud/
Unfortunately the app that was deployed in IBM cloud was stopped automatically after certain days of inactivity.
Changelog
New

{{new thing}}

Changed

{{change thing}}

Removed

{{removed thing}}

@alisonjoseph: Please review again. Thanks

repo: carbon-design-system/carbon-tutorial


text:
React step 3

Closes #
finished tutorial step 3
Changelog
New

{{new thing}}

Changed

{{change thing}}

Removed

{{removed thing}}

Pull request

authors: TridipMandal catdragon


text:
Perform the Design & Tech Assessment for the Checkout Configurator Platform (CCP)

hahnrob created the following on Jun 13:
As the IBM DDS architect, I need to perform a technical assessment of the CCP so that I can understand what they need to properly implement IDL in a timely fashion.
Additional information

CCP Box Note
CCP Questionnaire

Acceptance criteria

[x] Information necessary for an accurate assessment of components by the adopter is collected
[x] Technical information is used to schedule the adoption
[x] Identify the next step tasks and the prioritization based on input from the adopter

Original issue: https://github.ibm.com/webstandards/digital-design/issues/1016

On Jul 16, hahnrob commented:
Questionnaire review and site overview meeting scheduled July 22.

On Jul 26, hahnrob commented:
Scheduled monthly status meetings beginning Sept 10.

repo: carbon-design-system/ibm-dotcom-library


text:
fix(Leadspace): spacing above buttongroup fix

Related Ticket(s)
https://github.com/carbon-design-system/ibm-dotcom-library/issues/1567
Description
The buttongroup had an extra 16px top padding which didn't match the specs

@andysherman2121 I'm merging a bunch of PRs, can you resolve the conflicts here?

@andysherman2121 I'm merging a bunch of PRs, can you resolve the conflicts here?

resolved


text:
fix: no data empty state title

Contributes to #3731
missed applying a title in the no data illustration

@matthewgallo thanks for pointing that out. should be fixed now.

repo: carbon-design-system/ibm-products


text:
fix: editinplace replace outline with border

Closes #5779
fixes an issue where EditInPlace inside of a td was having experiencing a visual bug when focused. replacing outline with border allows the cell to appropriately size the component.

@ariellalgilmore when you have a chance to look 👍


text:
Latest cardIO libs

This repository has not been updated with the latest CardIO code for a very long time. If this hasn't been abandoned, let's get it updated!

Whoops. First PR.


text:
General Markdown Fixes on Mint Page

Quickfix
I noticed there were some markdown syntax issues on the docs/minting page.

@katomm were formatted that way on purpose? It just looked like more syntax errors. I can revert if that was intentional

The note boxes? Yes. Please see https://developers.cardano.org/docs/portal-style-guide#admonitions for details.

Gotcha. Ill see what i can do because that's definitely not rendering as the documentation is showing

@katomm @rdlrt I reverted my changes. Any idea why its not rendering as show in reference?

Ok found more bash syntax issues, but i see why i thought things were not rendering correctly. my apologies. everything should be good now

but i see why i thought things were not rendering correctly.

I am curious what the problem was @nothingalike.

@katomm  It was the additional code syntax issues i found.

authors: katomm nothingalike

repo: cardano-foundation/developer-portal


text:
Review Alba naive algorithm

This issue aims at ensuring that the implemented algorithm has been implemented correctly.
The task consists in:

reviewing the code
fixing any bug, comments
writing down todos for future optimizations and refactorization

We will only provide the bounded case.

repo: cardano-scaling/alba


text:
Why Waymo disqualified your result from the 2022 Waymo Open Dataset Challenge?

Our Shanghai AI Lab is considered as a company by the Waymo organizers and they only allow a company to participate in one track (they considered submissions in camera-only 3D detection as legal since it was submitted the earliest). Other teams are disqualified for a similar reason in the 3D seg challenge. Our results are admitted by Waymo and we will release these powerful models as well as training details soon.

authors: IrohXu cardwing

repo: cardwing/Codes-for-PVKD


text:
Cannot set variables from rhai hooks

I'm trying to set a variable features which I can use in my Cargo.toml with {{ features }}, but when I run cargo generate, the {{ features }} variable seems to be an empty string and unset.
I have setup a pre hook with pre = ["pre-script.rhai"], and set the variable in there:
variable::set("features", "hello");

This usecase is literally covered in the example. Unfortunately the example had another error in that it refused to use the newest cargo generate

I understand that it is in the example, but is the old version of cargo generate the reason why the variables wouldn't be working?

I understand that it is in the example, but is the old version of cargo generate the reason why the variables wouldn't be working?

No idea, but very likely - it's been working since forever, but 1 little hickup; the timing of the hooks and what could/could not be done. That's why I added the hooks section to the book at some point. Around that time, there were some issues with variables not working proberly. The reason at the time is technical and caused by the Liquid API (It will silently fail assigning variables if using non-mut references). I believe it was only 1 version that was affected though.

authors: taurr tqwewe

repo: cargo-generate/cargo-generate


text:
Update benchmarking example

I installed the package as recommend using
pip install carla-recourse
The version installed is carla-recourse==0.0.5 but I am not able to reproduce the benchmarking example. The error happen when importing evaluation module:

I installed the package as recommend using pip install carla-recourse The version installed is carla-recourse==0.0.5 but I am not able to reproduce the benchmarking example. The error happen when importing evaluation module:

I also meet this BUG. The solution is easy. First, delete these codes (if you don't need the specific results):
import carla.evaluation.catalog as evaluation_catalog
evaluation_measures = [
    evaluation_catalog.YNN(benchmark.mlmodel, {"y": 5, "cf_label": 1}),
    evaluation_catalog.Distance(benchmark.mlmodel),
    evaluation_catalog.SuccessRate(),
    evaluation_catalog.Redundancy(benchmark.mlmodel, {"cf_label": 1}),
    evaluation_catalog.ConstraintViolation(benchmark.mlmodel),
    evaluation_catalog.AvgTime({"time": benchmark.timer}),
]

Second, change results = benchmark.run_benchmark(evaluation_measures) to:
results = benchmark.run_benchmark()
Then you can get all the metrics, such as:

authors: jscanass xueyagaga

repo: carla-recourse/CARLA


text:
Global Shader Cache File 'GlobalShaderCache-PCD3D_SM5.bin' is missing

Carla version: 0.9.15
OS: Windows 11, AMD Radeon graphics OR Nvidia GeForce (I have access to both systems)
Problem: When executing launch script 'CarlaUE4.exe' to run Carla in standalone mode, I get the error saying that 'GlobalShaderCache-PCD3D_SM5.bin' is missing, and that no COOKED content was found. The file is not in the directory that was listed in the error message. I have read all the other similar posts regarding this issue and have not been able to figure out a solution. All graphics drivers are up to date.
Expected results: Carla runs in standalone mode with keyboard inputs.
Steps to reproduce: Run \CarlaUE4.exe script
Other information: One solution suggested to use the executable located in \carla\Unreal\CarlaUE4\Saved\StagedBuilds\WindowsNoEditor, however the StagedBuilds directory does not exist in my case. Carla and unreal were built from source following the exact steps to do so as per the documentation.
Additional request: If anyone has experience with using the SUMO/Carla co-simulation tools to run with a vehicle using keyboard inputs, with other vehicles generated by SUMO, any information or examples would be much appreciated. Ultimately the end goal is to have a traffic co-simulation running while being able to control one ego vehicle among the other vehicles in the simulation.

Currently attempting to build/rebuild CarlaUE4.sln as per recommendation from: https://github.com/carla-simulator/carla/issues/4590. Will update on progress.

repo: carla-simulator/carla


text:
How to save some data from ScenarioRunner runtime scenarios?

How can I save the data from ScenarioRunner runtime scenarios?  Parameters such as speed, collsion etc.

Thanks in advance! @glopezdiest

There isn't really an exact way to do it, as it heavily depends on the output format you are expecting. You can output the criteria results by using the --file, --junit or --json arguments to output the data in specific formats. For routes (as that is what you are showignin the image), here are the criteria we use.
You can also use the metrics module to create your own metrics, which will be outputted in your own custom format.

So you can't use the metrics manager with the data recorded by a route? It just gives you a client timeout. This might be because of the amount of data, yeah. Try to increase the timeout of the client to more than 5 seconds

Thanks for the reply, I tried setting the client timeout  for longer than 5 seconds, but it doesn't seem to work. Still getting RuntimeError:time-out of 5000ms

Hey @GeneralMak, so sorry for the delay, it completely slipped my mind. Did you manage to make it work for your use-case?
This might not be relevant anymore but routes are just more complex scenarios with subscenarios inside it, so yes, you can use the metrics manager at routes.

Thanks for the reply, I tried setting the client timeout for longer than 5 seconds, but it doesn't seem to work. Still getting RuntimeError:time-out of 5000ms Can you use metrics_manager to measure route scenarios?

Have you save some data from ScenarioRunner runtime scenarios successfully?I want to know how to make it ,thank you

authors: GeneralMak glopezdiest olyii


text:
🛑 Questionário Socioeconômico is down

In 4bdd4ca, Questionário Socioeconômico (https://qse.ifms.edu.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Questionário Socioeconômico is back up in 34822c6 after 19 minutes.

repo: carlitos-ifms/uptime


text:
unix awakener writes silly string

See: https://github.com/carllerche/mio/blob/56f8663510196fdca04bdf7c5f4d60b24297826f/src/sys/unix/awakener.rs#L31
As far as I'm aware mio is trying to write a single byte to a pipe as a cross-thread wakeup token (can't we use eventfd or such here, on Linux at least?), but actually seems to write the four-byte string "0x01". The contents don't seem important and as far as I'm aware there's no reason to send more than one byte to elicit a wakeup.
If I'm mistaken, it would be worth documenting what's going on here. Otherwise, it should be a trivial fix.

Ah good catch! It only need to write one byte, and I think that's actually intended to be b"\x01" rather that b"0x01" to write a "1" byte into there. Want to send a PR for this?

Can this issue be closed?

Indeed!

Thanks for pointing this out.
@sp3d  eventfd can't be used by default because it isn't available on all platforms that mio wants to support (Linux 2.6.18 and up). The work to be able to conditionally detect features has not been implemented.

authors: PlasmaPower alexcrichton carllerche sp3d

repo: carllerche/mio