[BUG] Inconsistent overflow="ignore" behavior on table.Table

Read the docs

[x] Done

Describe the bug
Tables do not seem to respect overflow="ignore"
To Reproduce
This script
import io

from rich import console
from rich import table

con = console.Console(file=io.StringIO(), width=30)
grid = table.Table.grid()
grid.add_column(overflow="ignore", width=50)
grid.add_row("a" * 50)
con.print(grid, crop=False, highlight=False, overflow="ignore")
output = con.file.getvalue()
print(len(output))  # Output: 31 (expceted 51)

Gives an output of 31—meaning it cuts off the remaining characters even though overflow is set to "ignore". I had expected it to output the full 51 characters, as it does when rich.text.Text and a string are printed by rich with overflow="ignore".
This causes issues when trying to insert characters stylized by another process (like in https://github.com/willmcgugan/rich/discussions/384#discussioncomment-987416).
Platform
macOS 11.4
Diagnose

Diagnose
python -m rich.diagnose
╭───────────────────────── <class 'rich.console.Console'> ─────────────────────────╮
│ A high level console interface.                                                  │
│                                                                                │
│ ╭──────────────────────────────────────────────────────────────────────────────╮ │
│ │ <console width=250 ColorSystem.TRUECOLOR>                                    │ │
│ ╰──────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                │
│     color_system = 'truecolor'                                                   │
│         encoding = 'utf-8'                                                       │
│             file = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'> │
│           height = 72                                                            │
│    is_alt_screen = False                                                         │
│ is_dumb_terminal = False                                                         │
│   is_interactive = True                                                          │
│       is_jupyter = False                                                         │
│      is_terminal = True                                                          │
│   legacy_windows = False                                                         │
│         no_color = False                                                         │
│          options = ConsoleOptions(                                               │
│                        size=ConsoleDimensions(width=250, height=72),             │
│                        legacy_windows=False,                                     │
│                        min_width=1,                                              │
│                        max_width=250,                                            │
│                        is_terminal=True,                                         │
│                        encoding='utf-8',                                         │
│                        justify=None,                                             │
│                        overflow=None,                                            │
│                        no_wrap=False,                                            │
│                        highlight=None,                                           │
│                        markup=None,                                              │
│                        height=None                                               │
│                    )                                                             │
│            quiet = False                                                         │
│           record = False                                                         │
│         safe_box = True                                                          │
│             size = ConsoleDimensions(width=250, height=72)                       │
│        soft_wrap = False                                                         │
│           stderr = False                                                         │
│            style = None                                                          │
│         tab_size = 8                                                             │
│            width = 250                                                           │
╰──────────────────────────────────────────────────────────────────────────────────╯

python -m rich._windows
platform="Darwin"
WindowsConsoleFeatures(vt=False, truecolor=False)

pip freeze | grep rich
rich @ file:///Users/pawlu/Library/Caches/pypoetry/artifacts/d8/09/d1/c1e297bde3276fe5289c3fc9cf6804eb531e28372b527f854b1427b012/rich-10.5.0-py3-none-any.whl

overflow="ignore" is only relevant when you print text directly to the console. There's no way to ignore overflow in the context of a table because it would break the alignment.
If you are trying to insert text with color codes it's not going to work in a context where Rich has to measure the length of the text. The invisible control codes will throw off the measurement.
You can convert text with ansi codes in to a Text instance which you will be able to insert in a table. Have a look at the undocumented AnsiDecoder class. If you feed it strings with color codes it will yield Text objects.

Have a look at the undocumented AnsiDecoder class. If you feed it strings with color codes it will yield Text objects.

This is exactly what I was looking to build myself if it wansn't implimented. Thanks for pointing me in the right direction. It works perfectly for my needs here.

overflow="ignore" is only relevant when you print text directly to the console.

Yeah this is what I thought. Thanks for confirming. Does overflow="ignore" have any effect on rich.column.Column?
If not, should we throw and exception/warning when the user inputs "ignore" as an overflow arg?

Yeah this is what I thought. Thanks for confirming. Does overflow="ignore" have any effect on rich.table.Column?

Not as such. The overflow refers to the right hand side of the terminal. Text in a table etc, text will never overflow. The table itself may overflow, if you create a table with width 100 and print it on a terminal with width 80, for example.

If not, should we throw and exception/warning when the user inputs "ignore" as an overflow arg?

I would say not. Consider it a null operation. Like foo += 0. Doesn't change anything, but it's not strictly an error.  Of course, if the docs aren't clear on this, then that should be addressed.


[firebase_messaging] getInitialMessage returns null if the app is terminated on iOS and notifications contains content_available key

Bug report
Describe the bug
On iOS, when sending a notification with the content_available key, the getInitialMessage method is returning null. Adding a delay before calling getInitialMessage seems to solve the problem, but it is not ideal.
Steps to reproduce
Steps to reproduce the behavior:

Get the FCM token from the app
Send a notification using the FCM token using the following payload:

{
   "message":{
      "token": <fcm_token>,
      "notification":{
         "body":"Body of Your Notification",
         "title":"Title of Your Notification"
      },
      "data":{
         "key_1":"Value for key_1",
         "key_2":"Value for key_2"
      },
      "apns":{
         "payload":{
            "aps":{
               "content-available":1
            }
         }
      }
   }
}

With the app in terminated state, tap on the notification

Expected behavior
getInitialMessage should wait and return the notification even when the notification contains the content_available key.
Sample project
Here's a simple project where the issue is reproducible to obtain the FCM token and display the initial message when starting the app.
import 'dart:io';

import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/material.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp();
  runApp(MessagingExampleApp());
}

/// Entry point for the example application.
class MessagingExampleApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Messaging Example App',
      theme: ThemeData.dark(),
      routes: {
        '/': (context) => Application(),
      },
    );
  }
}

/// Renders the example application.
class Application extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => _Application();
}

class _Application extends State<Application> {
  String? initialMessage;
  bool _resolved = false;

  @override
  void initState() {
    super.initState();

    FirebaseMessaging.instance.getInitialMessage().then(
          (value) => setState(
            () {
              _resolved = true;
              initialMessage = value?.data.toString();
            },
          ),
        );
  }

  Future<void> onActionSelected(String value) async {
    switch (value) {
      case 'get_apns_token':
        {
          print('FlutterFire Messaging Example: Getting FCM token...');
          String? token = await FirebaseMessaging.instance.getToken();
          print('FlutterFire Messaging Example: Got FCM token: $token');
        }
        break;
      default:
        break;
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Cloud Messaging'),
        actions: <Widget>[
          PopupMenuButton(
            onSelected: onActionSelected,
            itemBuilder: (BuildContext context) {
              return [
                const PopupMenuItem(
                  value: 'get_apns_token',
                  child: Text('Get APNs token (Apple only)'),
                ),
              ];
            },
          ),
        ],
      ),
      body: SingleChildScrollView(
        child: Column(
          children: [
            MetaCard('Permissions', Permissions()),
            MetaCard(
              'Initial Message',
              Column(
                children: [
                  Text(_resolved ? 'Resolved' : 'Resolving'),
                  Text(initialMessage ?? 'None'),
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}

/// UI Widget for displaying metadata.
class MetaCard extends StatelessWidget {
  final String _title;
  final Widget _children;

  // ignore: public_member_api_docs
  const MetaCard(this._title, this._children, {super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      margin: const EdgeInsets.only(left: 8, right: 8, top: 8),
      child: Card(
        child: Padding(
          padding: const EdgeInsets.all(16),
          child: Column(
            children: [
              Container(
                margin: const EdgeInsets.only(bottom: 16),
                child: Text(_title, style: const TextStyle(fontSize: 18)),
              ),
              _children,
            ],
          ),
        ),
      ),
    );
  }
}

class Permissions extends StatefulWidget {
  const Permissions({super.key});

  @override
  State<StatefulWidget> createState() => _Permissions();
}

class _Permissions extends State<Permissions> {
  bool _requested = false;
  bool _fetching = false;
  late NotificationSettings _settings;

  Future<void> requestPermissions() async {
    setState(() {
      _fetching = true;
    });

    final settings = await FirebaseMessaging.instance.requestPermission(
      announcement: true,
      carPlay: true,
      criticalAlert: true,
    );
    await FirebaseMessaging.instance.subscribeToTopic('fcm_test');

    setState(() {
      _requested = true;
      _fetching = false;
      _settings = settings;
    });
  }

  Future<void> checkPermissions() async {
    setState(() {
      _fetching = true;
    });

    final settings = await FirebaseMessaging.instance.getNotificationSettings();

    setState(() {
      _requested = true;
      _fetching = false;
      _settings = settings;
    });
  }

  Widget row(String title, String value) {
    return Container(
      margin: const EdgeInsets.only(bottom: 8),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          Text('$title:', style: const TextStyle(fontWeight: FontWeight.bold)),
          Text(value),
        ],
      ),
    );
  }

  @override
  Widget build(BuildContext context) {
    if (_fetching) {
      return const CircularProgressIndicator();
    }

    if (!_requested) {
      return ElevatedButton(onPressed: requestPermissions, child: const Text('Request Permissions'));
    }

    return Column(children: [
      row('Authorization Status', statusMap[_settings.authorizationStatus]!),
      if (Platform.isIOS) ...[
        row('Alert', settingsMap[_settings.alert]!),
        row('Announcement', settingsMap[_settings.announcement]!),
        row('Badge', settingsMap[_settings.badge]!),
        row('Car Play', settingsMap[_settings.carPlay]!),
        row('Lock Screen', settingsMap[_settings.lockScreen]!),
        row('Notification Center', settingsMap[_settings.notificationCenter]!),
        row('Show Previews', previewMap[_settings.showPreviews]!),
        row('Sound', settingsMap[_settings.sound]!),
      ],
      ElevatedButton(onPressed: checkPermissions, child: const Text('Reload Permissions')),
    ]);
  }
}

const statusMap = {
  AuthorizationStatus.authorized: 'Authorized',
  AuthorizationStatus.denied: 'Denied',
  AuthorizationStatus.notDetermined: 'Not Determined',
  AuthorizationStatus.provisional: 'Provisional',
};

const settingsMap = {
  AppleNotificationSetting.disabled: 'Disabled',
  AppleNotificationSetting.enabled: 'Enabled',
  AppleNotificationSetting.notSupported: 'Not Supported',
};

const previewMap = {
  AppleShowPreviewSetting.always: 'Always',
  AppleShowPreviewSetting.never: 'Never',
  AppleShowPreviewSetting.notSupported: 'Not Supported',
  AppleShowPreviewSetting.whenAuthenticated: 'Only When Authenticated',
};

Additional context
It looks like the getInitialMessage is not waiting for the notification to be processed when the app starts. If a delay before calling getInitialMessage is added, it returns the notification properly.

Flutter doctor
Run flutter doctor and paste the output below:
Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.10, on macOS 12.6.1 21G217 darwin-arm, locale en-DE)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.75.0)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

• No issues found!

Flutter dependencies
Run flutter pub deps -- --style=compact and paste the output below:
Click To Expand
Dart SDK 2.18.6
Flutter SDK 3.3.10
messaging_test 1.0.0+1

dependencies:
- cupertino_icons 1.0.5
- firebase_core 2.9.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_messaging 14.4.0 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]

dev dependencies:
- flutter_lints 2.0.1 [lints]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph]

transitive dependencies:
- _flutterfire_internals 1.1.0 [collection firebase_core firebase_core_platform_interface flutter meta]
- async 2.9.0 [collection meta]
- boolean_selector 2.1.0 [source_span string_scanner]
- characters 1.2.1
- clock 1.1.1
- collection 1.16.0
- fake_async 1.3.1 [clock collection]
- firebase_core_platform_interface 4.6.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.3.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_messaging_platform_interface 4.3.0 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_web 3.3.0 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math]
- js 0.6.4
- lints 2.0.1
- matcher 0.12.12 [stack_trace]
- material_color_utilities 0.1.5
- meta 1.8.0
- path 1.8.2
- plugin_platform_interface 2.1.4 [meta]
- sky_engine 0.0.99
- source_span 1.9.0 [collection path term_glyph]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- string_scanner 1.1.1 [source_span]
- term_glyph 1.2.1
- test_api 0.4.12 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- vector_math 2.1.2

Thanks for the report @sidnei-polo
Per documentation:
There are a few preconditions which must be met before the application can receive message payloads via FCM:

The application must have opened at least once (to allow for registration with FCM).
On iOS, if the user swipes away the application from the app switcher, it must be manually reopened for background messages to start working again.

So, if your app is terminated, can you manually reopen and then check if you still get it as null ?
Also,
In the plugin example, the keyword is `https://github.com/firebase/flutterfire/blob/f36785770a6d2c3de981d5bd339166a22af617f4/packages/firebase_messaging/firebase_messaging/example/scripts/send-message.js#L32
Whereas, you have it as content-available. Can you try with contentAvailable and see if it helps ?

Thanks for the reply @darshankawar.
I'm using the FCM v1 API to send the notification, and according to the documentation, I have to send the platform-specific payload following the documentation from the platform. In this case content-available. But, it is also reproducible using the legacy API with the "content_available": true key.
I also understand for content-available to work, the app must not be terminated with the user swipe action and if the app is in background it will use the FirebaseMessaging.onBackgroundMessage callback. That is working fine with the "content-available":1. But, if the app is indeed terminated with the user swipe action when the user taps on a notification that opens the app, the getInitialMessage should return that notification, even if the notifications conatins content-available, right?

Thanks for the feedback. Using the code sample provided, seeing the same behavior as reported.
/cc @russellwheatley

@sidnei-polo I used your code sample. I also used the Node.js Firebase admin library to send the requests. I received the initial message 100% of the time after pressing the notification from a terminated state. I tried roughly ten times. Here is the code I used to send:
admin
.messaging()
.sendToDevice(
  [iosToken],
  {
    data: {
      some: 'data',
    },
    notification: {
      title: 'A great title',
      body: 'Great content',
    },
  },
  {
    contentAvailable: true,
    priority: 'high',
  }
)

If it works for me, then I can only presume there is something wrong with the way it is handled using the REST API or perhaps something wrong with the way the shape of the request being sent. Could you try using the Firebase admin SDK and let me know if it works for you?

Hey @russellwheatley, I didn't have the opportunity to use the Node.js SDK yet. But this is also happening when we use Firebase Admin Python SDK, so I guess it is most probably an issue on the app side when handling the income message.
Payload used with python SDK:
{
   "validate_only":false,
   "message":{
      "notification":{
         "title":"title",
         "body":"message"
      },
      "token":"fcm_token",
      "data":{
         "click_action":"FLUTTER_NOTIFICATION_CLICK"
      },
      "apns":{
         "payload":{
            "aps":{
               "content-available":1
            }
         }
      }
   }
}

Any update on this?
Facing similar issue, with Firebase Admin Python SDK.

Payload used with python SDK:

How did you manage to fix the bug?

I find the solution in my case. From official Apple docs.
You should use
{
   "aps" : {
      "content-available" : 1
   },
}

Let me know if that works.

I use this package for send notifications from backend
Like this not working for me
"contentAvailable": true

But like this work perfectly
"content-available" : 1

Closing out, this is not an issue. Please use nodejs admin SDK script to send notifications if you're struggling to receive messages. See example script here


Nick: Watch raypcb.com

Nick requests the watch of the watch_keyword raypcb\.com. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

raypcb\.com has been seen in 3 true positives, 1 false positive, and 0 NAAs.

Approved by Jeff Schaller in Charcoal HQ


Add cc0 license-maven-plugin configuration

Tried running mvn license:update-file-header and got BSD instead of cc0. All the projects should be updated to be cc0

This will require either:

A pull request to the license-maven-plugin adding CC) as a built-in option; or
A custom license server providing that option.

We have done the custom license server in the past, and it has some problems. So I put in effort to switch us fully over to built-in options. It is probably worth pursuing the PR option to keep things that way.

Note that instead of CC0 we could use the Unlicense; the latter is what choosealicense.org recommends for disclaiming copyright. Either way.

You can just provide the license in-repo and reference it via the maven config.. see scifio-tutorials

There is some reason that doing that caused problems, too. Sorry I can't remember the details now... Generally speaking, you want to avoid in-repo file:// references in the POM (see item 6 of the Playing Tradeoffs with Maven article). But in this case maybe it is OK because the license-maven-plugin config is not required for the normal build lifecycle.
Anyway, if we are using CC0 (or Unlicense) in multiple places, I would still favor submitting a PR upstream, even if we use a local license server in the meantime.


how to use local file as project's script, how to use customized mysql result database.

代码中使用了本地的一个python文件，将抓取的结果写入mysql中，把此文件放在\database\mysql文件夹下运行代码时提示导入出错，找不到文件，小问题不知道怎么解决。看过issues中有说导入project当做模块的feature，但是不知道怎么用，请指导。
附带的一个问题是，如果要替换数据库，需要重写on_result(self,result)函数，有没有示例参考下。

If still have problem , feel free to reopen or open a new issue.

To store the result into mysql, i found the #40 talked about it, a file named config.json is needed to change database configuration. Following this help,  a new config.json file was add to folder the same as run.py file, and its content looks like this in my file:
{
"webui": {
"host": "localhost"
},
"fetcher": {
"xmlrpc": false
},
"taskdb": "mysql+taskdb://root:pwd@localhost:3306/pyspider_taskdb",
"projectdb": "mysql+projectdb://root:pwd@localhost:3306/pyspider_projectdb",
"resultdb": "mysql+resultdb://root:pwd@localhost:3306/pyspider_resultdb"
}
After that, a new project was added and this project was set to running. Three new database named pyspider_taskdb, pyspider_projectdb, pyspider_resultdb were created as expect, pyspider_projectdb and pyspider_taskdb had the project infomation and created new tables while the pyspider_resultdb has nothing. However, the result was still stored in sqlite. I hadn't changed the result_worker file as well as other scripts, this problem is still remaining, i have no idea how to override the result_worker to be compatible with mysql.
Another question is that is the ampq string in config.json a must? In my environment, i had install the ampq but had no rabbitmq. My environment is win7/py2.6, all requirement  just like the requirements.txt had installed.

What mode is pyspider running in? ./run.py or ./run.py ?

I run the script with command likes "python run.py" ever before, and run script with "python ./run.py" just now, but got message that task  done and ignore new task

How can i restart the project to execute once more? Other more, in the pic, what's the meaning of logging in postion 1?

Change age lesser than now - last crawled time. It will make scheduler think page is changed and needed recrawl: http://docs.pyspider.org/en/latest/About-Tasks/#schedule
class Handler(BaseHandler):
    crawl_config = {
        "age": 24*60*60,
    }

to make a global config for whole project may make it easier to do this.
log 1 is from webui, means you has made GET request to "/counter".

I changed the age param in handler and it fetch data again, but the result is still in sqlite, and i start the script with "python ./run.py", now i'm puzzled how it comes out like that and how to settle the problem with mysql.

Have found any logs from result_worker? like this:
[I 150106 09:21:42 result_worker:49] result tutorial_imdb:85204388baac7d77041e7d9d52d907e4 http://www.imdb.com/title/tt4132878/ -> {'url': 'http://www.imdb.com/t

Yes, result like this,

How about webui, does the result page have the results from sqlite?
If you change the "resultdb" to a wrong address, did you get error when database connect.
For confirm, which version are you using?

When i run the script using command like this, result now is recorded in mysql, just like #40 had show
./run.py
--taskdb="mysql+taskdb://username:password@host:port/taskdb"
--projectdb="mysql+projectdb://username:password@host:port/projectdb"
--resultdb="mysql+resultdb://username:password@host:port/resultdb"
I run the script with config param, and it works, so the problem before maybe that the the run.py hadn't loaded the json file?
The config.json file should be in which folder if i use the json file instead of command param?
In the positoin 1 like below?

or in the posiitoin 2 like this?

Did you run as python ./run.py not python ./run.py -c config.json

I run the script as "python ./run.py", so the json file is not loaded in fact, and the correct way to run script with json file should be "python ./run.py -c config.json" . Now, i'm clear, thanks a lot for your patience.

I was confused by taskdb, project stored in MySQL, but resultdb not...

Yes,it's really puzzled. In that condition, I remembered that each component was started standalone, maybe the result_worker wasn't started. It seems that quite a few persons met this problem, the best way to help them is to record the steps to store result with MySQL, how can I contribute on GitHub?

No, it is impossible that taskdb, projectdb connected to mysql but resultdb is sqlite.
I think pyspider_taskdb and pyspider_projectdb was created previously. pyspider is always connecting to sqlite.


Add new example, meteor-site, to react-server examples

This is from the talk given at Redfin on 11/9.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Robert Law seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.

@doug-wade I think you might have an older version of Chrome: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find#Browser_compatibility
I just switched it to use lodash's find instead though.
I updated the dependencies to include the react-server-cli.

Got it up and running locally -- it's pretty slick.  Thanks @emecell


Allow pure svg custom-elements

This pull resolves #47 , the error becomes because className in svg elements is a SVGAnimatedString.

Overall, thanks for this PR. I still need to review it carefully (Travis didn't run the tests, so I need to run them manually).

Merged. Thanks for this!


feat(Carousel): Add carousel component

Adding carousel component.
Dots can shrink in size when there are many slides present.  Not shown on the demo page.
Slides allow for custom interior content.
Following w3 recommendations for accessibility.  Inspiration came from here & here.
Left & right buttons are working in this demo.  Dots will change color to match the active slide but are not clickable in the demo.

Closes #374.  Dots are based off this provided code.

Unsure of what we call this component.  Currently I have it in /carousel/ but I don't know.

One issue I am aware of is the tabindex.  If I use the tab key the focus will go to slide 2 before it goes down to the left / dots / right navigation area.  Unsure if this is something that can be fixed with JS or not.

I am also unsure how to make the left / right arrows work, I'm thinking it will require JS.

Also noticing that some of the tests are failing because it's lacking the puppeteer change in #166.

However, some are failing because of whatever this little stripe is.  I think this might be fixed if I adjust the threshold.

Added padding to the <section> so tests can see the offset outline during :focus.


[Stencil] How to get count of filtered array.

Looking for getting the filtered count. Any ideas? I've been searching for an hour and couldn't find how this syntax is.
I know this is not a strictly sourcery issue but a little help would be appreciated!
Usecase:
I want to know the number of method's parameters that are not closures
BTW:
Filtering for for loops works great
{% for param in method.parameters where not param.typeName.isClosure %} {% endfor%}

Example:
// sourcery: Example
protocol Foo {
    func talk(a: Int, b: (Int) -> Void)
    func walk(a: Int, b: Int)
    func eat(a: () -> ())
}

Given the above protocol function:
talk --> 1
walk --> 2
eat --> 0
Thank you in advance! ❤

@krzysztofzablocki
Hmm, thanks for the sourceryPro looks good 🚀 .
My goal is to write a stencil if statement that will evaluate to true only if there is at least 1 non-closure parameter.
I hope i could write something like this (but still haven't found how to do it):
{% if method.parameters|!isClosure|count > 0 %}....{% endif %}

I guess I have to create my own filter? Since I have tried many combinations from your jazzy docs. Is there any documentation for that?
Thank you for prompt response. 😸

Can't you just do {% if method.parameters|!isClosure|count %} since that will execute if it's not zero ? given how bool are evaluated

{% if method.parameters|!isClosure|count %}

Will produce error when running Sourcery. It must be a syntactic error.
So what are you suggesting? Still haven't found an answer to my question 😞

    {% if type.allMethods|private|count %}
    {{ type.name }} has private methods
    {% else %}
    {{ type.name }} doesn't have private methods
    {% endif %}

works just fine, are you trying to use filter that doesn't exist ? I don't see isClosure filter in the codebase

@krzysztofzablocki
Yes I'm trying to find a filter that maybe doesn't exist. I want to know if a method has at least 1 argument that is not a non-escaping closure. Is there a way to make my own filter?
When doing a for loop I use isClosure and works fine but for what I want I don't find something...

@Nikoloutsos you can submit PR, I'm ok with accepting additional filters, you can see how they are done here and it should just follow this setup


Separate Web-View from UI Package

Please review it, I am not sure the adding CocoaPods/Regular Framework dependency is because of WebView or not, If it's true, the documents should be change too.
Because of JavaFX usage in WebView module, and adding JavaFX and coroutines only because of WebView, I separated WebView to another package:
api("com.mohamedrejeb.calf:calf-web-view:0.3.0")
com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @82702de'
Exception in thread "JavaFX Application Thread @coroutine#1" java.lang.IllegalArgumentException: Not on Main thread, current thread is: Thread[#24,JavaFX Application Thread @coroutine#1,5,system]

If you agree for next release:
Breaking Changes:
WebView removed from UI:
// For Adaptive WebView components
api("com.mohamedrejeb.calf:calf-web-view:0.3.0")

Change Imports:
// TODO: REMOVE imports --
import com.mohamedrejeb.calf.ui.web.WebView
import com.mohamedrejeb.calf.ui.web.rememberWebViewState

// TODO: ADD imports ++
import com.mohamedrejeb.calf.web.WebView
import com.mohamedrejeb.calf.web.rememberWebViewState

If you agree for next release:
Breaking Changes:
WebView removed from UI:
// For Adaptive WebView components
api("com.mohamedrejeb.calf:calf-ui-webview:0.3.0")

Thanks for your contribution.
Sorry for taking too much to accept this.


[Tests] Do not ignore swiftsourceinfo by default in lit tests

This was added as a default in b103997c293a55e9d42cd659b840dfc1fdf51070,
with the reasoning that users do not have .swiftsourceinfo for the
stdlib. A later change (51d6243d2451dfb0a05996f902e6766834f1cad7) then
avoids emitting .swiftsourceinfo for the stdlib at all, so this is no
longer an issue.

@swift-ci please test

@beccadax are you okay with this one?


nginx config validation fails when using hostname in proxypass or upstreams

diff --git a/nixos/tests/nginx.nix b/nixos/tests/nginx.nix
index 73f1133bd6c..b1010ac1f7d 100644
--- a/nixos/tests/nginx.nix
+++ b/nixos/tests/nginx.nix
@@ -30,6 +30,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
         extraConfig = ''
           access_log syslog:server=unix:/dev/log,facility=user,tag=mytag,severity=info ceeformat;
           location /favicon.ico { allow all; access_log off; log_not_found off; }
+          location / { proxy_pass https://foo.bar.com:443; }
         '';
       };

nginx config validation failed.
config was /nix/store/mkhs81aygpwhhc44q6iispfy9lvsdswa-nginx.conf.
in case of false positive, set `services.nginx.validateConfig` to false.
nginx output:
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory)
2022/12/22 22:07:17 [emerg] 7#7: host not found in upstream "foo.bar.com" in /build/conf:44
nginx: configuration file /build/conf test failed

I've disabled the config validation for my machine config for now, but I don't have a strong opinion on how important this regression is -- the module maintainers might.
Originally posted by @delroth in https://github.com/NixOS/nixpkgs/issues/205561#issuecomment-1363391943

I'm deploying my config via deploy-rs. I also have configured a proxy_pass with a hostname. On some deployments it fails with the same reason: host not found in upstream "example.com" in /etc/nginx/nginx.conf:190 (I have services.nginx.enableReload configured, this is why it's pointing to /etc/nginx/nginx.conf).
The reason is that nginx checks the hostname during the startup phase. Sometimes on deployment some services which are required to resolve the hostname are stopped while nginx config is checked.
I found the reason and a workaround described in this article: https://sandro-keil.de/blog/let-nginx-start-if-upstream-host-is-unavailable-or-down/
But the root cause is still related to the way how nix restarts the services.
It's only happening when some other services than nginx are restarted. Here's the (shortened) list of services which are stopped which cause a deployment failure:
stopping the following units: acme-fixperms.service, acme-lockfiles.service, audit.service, kmod-static-nodes.service, [...] network-local-commands.service, nscd.service, [...] systemd-modules-load.service, systemd-networkd-wait-online.service, systemd-networkd.service, systemd-networkd.socket, systemd-oomd.service, systemd-oomd.socket, systemd-resolved.service, systemd-sysctl.service, systemd-timedated.service, systemd-timesyncd.service, systemd-tmpfiles-resetup.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd.service, systemd-vconsole-setup.service
Probably it's related to one of those: systemd-networkd-wait-online.service, systemd-networkd.service, systemd-networkd.socket, systemd-resolved.service.
So the solution would be a multi-phase restart. First, services related to networking should be fully restarted, then the services depending on them (nginx in my case).
Maybe we can add another service dependency in the systemd service. As there already is a dependency on network.target (https://github.com/NixOS/nixpkgs/blob/ed0aa37a40e19db930ca2b7841106fdc81138b0e/nixos/modules/services/web-servers/nginx/default.nix#L1247) maybe we also need to also add network-online.target or something related to systemd-resolved by default. Or maybe the dependency must be set with requires instead of after but I'm not experienced enough with systemd configuration to make an educated suggestion.
Of course this should be configurable because maybe there is a use case where nginx should run without a network/dns-resolver available.
But I think the new dependency should be configured by default as I now had more than one outage caused by this.


panic: meta: transport error

Describe the bug
thread 'risingwave-main' panicked at 'called `Result::unwrap()` on an `Err` value: Internal(grpc request error: status: Unknown, message: "transport error", details: [], metadata: MetadataMap { headers: {} }

   0: rust_begin_unwind
             at /rustc/9067d5277d10f0f32a49ec9c125a33828e26a32b/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/9067d5277d10f0f32a49ec9c125a33828e26a32b/library/core/src/panicking.rs:142:14
   2: core::result::unwrap_failed
             at /rustc/9067d5277d10f0f32a49ec9c125a33828e26a32b/library/core/src/result.rs:1814:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/9067d5277d10f0f32a49ec9c125a33828e26a32b/library/core/src/result.rs:1107:23
   4: risingwave_meta::barrier::GlobalBarrierManager<S>::run::{{closure}}
             at ./src/meta/src/barrier/mod.rs:679:13
   5: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/9067d5277d10f0f32a49ec9c125a33828e26a32b/library/core/src/future/mod.rs:91:19
   6: risingwave_meta::barrier::GlobalBarrierManager<S>::start::{{closure}}::{{closure}}
             at ./src/meta/src/barrier/mod.rs:591:45

Full logs: risingwave-logs.zip
To Reproduce
See https://github.com/risingwavelabs/risingwave/issues/5157#issue-1364002749
Expected behavior
No response
Additional context
No response

@xxhZs Please take a look. Feel free to reassign it to others

The same as #4919. I think we still use unwrap here as the timeout should already be handled by the retry client. Is there something wrong with the connection to the etcd server?

Yes, perhaps. My EC2 instance went into some weird state after running benchmark for a while - it even does not respond to my SSH login. I'll investigate it today.

Duplicated #4919


EINVAL error inside Docker container

I'm trying to run the basic protractor test from inside a Docker container (base = dockerfile/nodejs), and getting:
Error: EINVAL connect EINVAL
  at ClientRequest.<anonymous> (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:136:16)

changes to conf.js:
seleniumAddress: '<IP_ADDRESS>:4444/wd/hub',

// Capabilities to be passed to the webdriver instance.
capabilities: {
    'browserName': 'firefox'
 },

This selenium address works from a behat container.
nodejs version v0.10.28.
Any advice would be much appreciated.

for those who will face this error like me: http:// is required in seleniumAddress: 'http://selenium:4444/wd/hub' to resolve this problem

@PLEEROCK Thanks - helped me :-)


The combine_lookups function

This issue is rather a question. The JoltInstruction trait contains a function called combine_lookups (here). I understand this is meant to represent the polynomial g from the Lasso and Jolt preprints (e.g. Jolt preprint, definition 2.6) and it receives the lookups T_i(r_j) of suitable chunks in suitable subtables.

Am I correct in thinking that, even though this function can contain any Rust code, it should strictly perform a polynomial evaluation on its input? Although this is perhaps not meant to be an extensible library at the moment, it would seem natural to enforce this on the code level.
In particular, combine_lookups should not e.g. use the instruction's input data, such as self.0 (in the implementors that have such a field) directly, correct?
I understand the degree function of in the JoltInstruction trait should return the degree of the polynomial g computed by combine_lookups. But is this degree variable-wise, or monomial-wise? In other words, should g(x_1, x_2) = x_1 * x_2 return 1 or 2? I'm guessing the latter, since the Jolt paper estipulates g should be a multilinear polynomial and hence have variable-wise degree <= 1.

Thank you for sharing this excellent library!

Yes, correct on all fronts :)

Correct, combine_lookups should always be a polynomial evaluation on the input, as it is typically part of a sumcheck summand
Yes, also correct. The reason you see self as an argument to combine_lookups is a somewhat annoying artifact of using enum_dispatch on the JoltInstruction trait
Yes, it's monomial-wise

I see, this is very useful! Thank you very much again.
The issue can be safely closed


input_ids are not moved to GPU

I'm running this locally with downloaded h2oai_pipeline:
`import torch
from h2oai_pipeline import H2OTextGenerationPipeline
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("h2oai/h2ogpt-oig-oasst1-256-20b", padding_side="left")
model = AutoModelForCausalLM.from_pretrained("h2oai/h2ogpt-oig-oasst1-256-20b", torch_dtype=torch.bfloat16, device_map="auto")
generate_text = H2OTextGenerationPipeline(model=model, tokenizer=tokenizer)
res = generate_text("Why is drinking water so healthy?", return_full_text=True, max_new_tokens=100)
print(res[0]["generated_text"])`
And while the generation works, I get this Warning:
Setting pad_token_idtoeos_token_id:0 for open-end generation. /opt/conda/lib/python3.10/site-packages/transformers/generation/utils.py:1359: UserWarning: You are calling .generate() with the input_idsbeing on a device type different than your model's device.input_idsis on cpu, whereas the model is on cuda. You may experience unexpected behaviors or slower generation. Please make sure that you have putinput_idsto the correct device by calling for example input_ids = input_ids.to('cuda') before running.generate().   warnings.warn(
Question 1: How do I make your custom pipeline move the input_ids to GPU?
Question 2: How do I make your custom pipeline set the pad_token_id to suppress the info log?
Question 3: The response from your custom pipeline is just plain text, no history. How do I build a conversation?
Thanks!

Hi, try this updated example and note the memory limits:
https://github.com/h2oai/h2ogpt/blob/main/pipeline_example.py

Understood, no problem.  If you had a bit enough GPU, you don't need 8bit.  The main issue I think you had was device_map='auto', which will spread out the model/generation to multiple devices (GPU/CPU) and torch/transformers don't really do it perfectly.
But if you have a 24GB board, 16-bit won't work for 12B model, you'd need to use even 6B.  20B would also require 48GB, and would be at edge of OOM allowing only short generations (short new tokens and short inputs).
So GPU memory is tight constraint.

I am running a dual 3090 setup, which is why I expected it to work. But as you state, there clearly is something going wrong under the hood where the inputs are not moved to GPU for whatever reason. That's why I asked if I can manually move input_ids to GPU with your pipeline.

Yes, a 24GB board should work with 6B and if set load_in_8bit=False to avoid need for bitsandbytes.  However, a 12B model will not fit on 24GB with load_in_8bit=False.

FYI, I just performed an update of transformers (for entirely unrelated reasons), installing 4.29.0.dev0 directly from github because PyPi was behind.
Running oig-oasst1-256-20b, I am no longer getting the message about input_ids being on the wrong device, and during inference nvidia-smi shows both GPUs being under load.
For reference, this is the code I'm running:
import torch
from h2oai_pipeline import H2OTextGenerationPipeline
from transformers import AutoModelForCausalLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("h2oai/h2ogpt-oig-oasst1-256-20b", padding_side="left")
model = AutoModelForCausalLM.from_pretrained("h2oai/h2ogpt-oig-oasst1-256-20b", torch_dtype=torch.bfloat16, device_map="auto")

generate_text = H2OTextGenerationPipeline(model=model, tokenizer=tokenizer, temperature=0.8)

res = generate_text("Why is drinking water so healthy?", return_full_text=True, max_new_tokens=100)
print(res[0]["generated_text"])

Some unrelated notes/feedback:

The model's German language text generation seems more coherent than e.g. Dolly 2.0, although it still tends to be factually incorrect.
Providing a temperature parameter to the pipeline is accepted without error, but does not seem to have any effect. I may be misunderstanding the huggingface TextGenerationPipeline API here by assuming that the pipeline calls model.generate() with the provided temperature at some point down the stack.
Independent of this, completions seem to be deterministic, as running the same prompt ("drinking water") several times results in  the exact same response.
Completions remain deterministic even when increasing max_new_tokens. I assume the model just tends to produce EOS within the default 100 tokens.
This is also suggested by the behaviour when forcing longer completions by asking for a specific word count:

res = generate_text("Explain to me the difference between nuclear fission and fusion in 300 words.", return_full_text=True, max_new_tokens=200)
print(res[0]["generated_text"])

results in
Nuclear fission and fusion are two different types of nuclear reactions that occur in the nucleus of an atom. Nuclear fission is the splitting of the nucleus of an atom into two smaller nuclei, while nuclear fusion is the joining of two nuclei to form a single larger nucleus.

Fission is a process that occurs naturally in the environment, and is the process by which a large nucleus splits into two smaller nuclei. Fusion is a process that occurs in the laboratory, and is the process by which two smaller nuclei are joined to form a single larger nucleus.

Fission is a process that occurs naturally in the environment, and is the process by which a large nucleus splits into two smaller nuclei. Fusion is a process that occurs in the laboratory, and is the process by which two smaller nuclei are joined to form a single larger nucleus.

Fission is a process that occurs naturally in the environment, and is the process by which a large nucleus splits into two smaller nuclei. Fusion is a process that

You're probably well aware of the limitations, but I thought I'd post my observations nonetheless.

Hi, thanks for the excellent feedback.  Really appreciate it.
Here's some help with those options.  One needs to set do_sample=True for any of those logits modifications to be applied, else just greedy generation is performed:
https://github.com/huggingface/transformers/issues/22405#issuecomment-1485527953
In case you are curious, check out:
https://huggingface.co/blog/how-to-generate
So, if you'd like more variance (due to top_p or top_k) or you'd like more creative expression, you need to set do_sample=True.  Otherwise all those options are ignored.  I'll try to make that clearer in the gradio UI.


snap add gas estimation

replace hard coded gas parameters with a gas estimation that happens within the snap, and takes the alternate fee currency into consideration
look into adding code that intelligently selects the user's feeCurrency based on their balance

I'd close this one after the implementation is ready and leave this issue to track that.


Age Groups

closes #1138
Prerequisites:

[x] Unless it is a hotfix it should be merged against the dev branch
[x] Branch is up-to-date with the branch to be merged with, i.e. dev
[x] Build is successful
[x] Code is cleaned up and formatted

Summary

similar to the representation of how other regions (neighboring, state, ...) are shown.

Thanks for getting started on this! Really cool to finally get to see these signals and play with them on the dashboard.
As per the design itself. Could you try implementing what I mocked up in #1138? The reason I  suggested that (and that I like that idea) is that it separates out the way we show multiple curves across locations (bottom legend) from multiple curves across age groups (right legend).
Also, the way it is now, there is just a lot of space taken up below the plot by the age group legend.

I agree with Ryan that we want to visually distinguish between regional and age group stratification, but I also agree with Sam that this should display at the bottom so that we avoid screwing with the margin flow. I know mobile aren't our first priority users but I'd rather not destroy their experience if it's easily avoidable. We're also losing the orderedness by splitting into two columns.
We can stay in the same family of visual styles while highlighting the region-agegroup hierarchy and maintaining orderedness using something like

what about:

I think it looks great!!

I think it looks great!!

is there then anything missing for this PR to be approved?

I didn't realize you had already implemented it --- I assumed that was just a graphic or screenshot of work in progress.
Thanks Sam. I approved it.


Feat: Clear dropdown feature added

Hello, how are you , can you tell me how you are clearing the value programmatically, I am not getting way here, thanks

Hi, sorry i could not understand what do you mean.

Hi, thanks for the reply, I mean like a simple textfield we have the option to clear its value when we use it like this _controller.text = "" , i cannot find that for this drop down, like i have many fields including this drop down, and what I need is when the user finish a process then the value should be automatically(programmatically) cleared, not by pressing the cross button , you got my point?


When run from cypress-open, receive file names like -actual (1).png

First of all - great tool, much appreciated!
Have only tried it recently and usage from cypress run seems to be working ok and all is clear. However when I run cypress open as usual for TDD, I started to see that each run of test produces a new image with number at the end of the name ( apparently to not override existing one ). Is this somehow could be avoided? Maybe there is config option? This was not happening before adding the plugin.
It does not seem to be a big issue, but I do not want disk drive of our team to be stuck with lots of images..
I am using Ubuntu 20.04 and Cypress 7.5.0
Thanks for the help!

For me even 'cypress run' doesn't work and just keeps adding new screenshot files. Tried with 7.6.0 and 8.3.0 cypress versions, same thing

Which commands are you using?
Typical workflow is to take the base images and then compare them:
$ ./node_modules/.bin/cypress run --env type=base --config
$ ./node_modules/.bin/cypress run --env type=actual

Seems that I'm incapable of reading the documentation, the run command works with proper commands.


Crashes on Samsung Devices

Hi there,
I'm getting the following crash on numerous Samsung devices running Android 12 and 13 in our production app
Caused by java.lang.IllegalStateException
Reply already submitted
io.flutter.embedding.engine.dart.DartMessenger$Reply.reply (DartMessenger.java:430)
io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error (MethodChannel.java:272)
com.flutterbeacon.FlutterBeaconPlugin.onActivityResult (FlutterBeaconPlugin.java:436)

This seems to happen when calling initializeAndCheckScanning.
This crash appears to be a different than the bug mentioned in #109 as the line in question for this crash is FlutterBeaconPlugin.java:436 vs FlutterBeaconPlugin.java:65 in #109
Has anyone seen this before? @alann-maulana Any suggestions for how to debug this?
Thank you

I suspect your crash is the same bug as in #109, you just haven't enabled code shrinking / obfuscation, which would change the code line numbers.


Fixes #338

Codecov Report

Merging #347 into master will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #347      +/-   ##
==========================================
+ Coverage    98.1%   98.13%   +0.02%
==========================================
  Files         124      124
  Lines       14185    13865     -320
==========================================
- Hits        13916    13606     -310
+ Misses        269      259      -10

Impacted Files
Coverage Δ

stix2/v21/sdo.py
94.53% <ø> (ø)
:arrow_up:

stix2/test/v21/test_course_of_action.py
100% <ø> (ø)
:arrow_up:

stix2/datastore/filesystem.py
92.88% <0%> (-0.12%)
:arrow_down:

stix2/patterns.py
98% <0%> (-0.02%)
:arrow_down:

stix2/test/v21/test_datastore_filesystem.py
99.17% <0%> (-0.02%)
:arrow_down:

stix2/test/v20/test_datastore_filesystem.py
99.19% <0%> (-0.02%)
:arrow_down:

stix2/test/v21/test_relationship.py
100% <0%> (ø)
:arrow_up:

stix2/test/v20/test_campaign.py
100% <0%> (ø)
:arrow_up:

stix2/test/v21/test_core.py
100% <0%> (ø)
:arrow_up:

stix2/test/v21/test_attack_pattern.py
100% <0%> (ø)
:arrow_up:

... and 63 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8aca39a...3d447fa. Read the comment docs.

Rebased and merged in; thanks @khdesai!


DSA <IP_ADDRESS> Arrays: Range Queries (for searching an element)

Description
Given an array of size N and Q queries in the form of L R X. For each query give the output Yes or No if X present in between the indices L and R.
Domain
DSA
Type of Contribution
Documentation
Code of Conduct

[X] I follow Contributing Guidelines & Code of conduct of this project.

@nimisha-yadav ma'am can i work on this issue

@nimisha-yadav ma'am can I work on this issue?

Yes, now it's okay, go ahead

Is the issue still on?

/assign

Is the issue still on?

For audio and video format, yes. @Divya-2001


belongsToMany field should not list all of the related items

Instead of listing all of the related items in the show view, we can list 3 of them and then give the total related item count.

Laravel pagination is already solving this issue, the queried relation data should be paginated


Mono repo take three

This is my third and final push on getting this mono-repo. I've imported express-server in with full git history.

Three things left to do:

Tests must pass on Travis
Update readme's
Update package.json
Create release scripts

We also need to put pouchdb-server package into packages/node_modules.
The basic idea is that the top-level package.json is a dummy package that never gets published. It just holds the dependencies so that Greenkeeper can update them. Then at publish time we scan for dependencies using find-requires and then inject those into the sub-package.jsons.
If I have time I'll work on this but it looks like a 1-2 full days effort at least (judging based on the time I put into the pouchdb monorepo).

I made some nice progress on this and am almost done. Tests are all passing. I've updated readme's and package.json. Pouchdb-server was actually added to the file structure on my machine as a subpackage but for some reason it wasn't added to the repo.
At this stage I think the only thing that needs to be done is add the release functionality. I'm hoping @nolanlawson can help me with that otherwise I will take a look next week. Once we have done that i would like to merge this and then move the issues and PR's from express.
Also cc @yaronyg and @gr2m to let them know about this since they have both expressed interest in this before.

OK, I have cleaned up the structure a little bit, implemented a release script, and tested it on Sinopia to make sure everything is working correctly. Release instructions are now in CONTRIBUTING.md.
Once this is green, I will merge and release 2.3.0 for both packages so we can get this in fast. (Note that we don't need to release 3.0.0 because there are no breaking changes here.)

Awesome. Thanks for taking it over the finish line.
All misspelling thanks to my iPhone.
On Sat, Feb 18, 2017 at 6:32 PM +0200, "Nolan Lawson"<EMAIL_ADDRESS>wrote:
OK, I have cleaned up the structure a little bit, implemented a release script, and tested it on Sinopia to make sure everything is working correctly. Release instructions are now in CONTRIBUTING.md.
Once this is green, I will merge and release 2.3.0 for both packages so we can get this in fast. (Note that we don't need to release 3.0.0 because there are no breaking changes here.)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

No prob. Last bit is just getting the README cleaned up. I'll do that before publishing.

Done. 2.3.0 are published for both express-pouchdb and pouchdb-server. Thanks everyone!

great work @garrensmith @nolanlawson 🎉

Had a few publishing snafus, but 2.3.3 should be good now. Fourth time's the charm. 😅

Woohoo. Thanks Nolan
All misspelling thanks to my iPhone.
On Sat, Feb 18, 2017 at 9:52 PM +0200, "Nolan Lawson"<EMAIL_ADDRESS>wrote:
Had a few publishing snafus, but 2.3.3 should be good now. Fourth time's the charm. 😅
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.


Error running sketch rnn jupyter notebook

I'm trying to run the sketch rnn documented on the python notebook. When running:
[train_set, valid_set, test_set, hps_model, eval_hps_model, sample_hps_model] = load_env(data_dir, model_dir)
I get the following error:

.../anaconda2/envs/magenta/lib/python2.7/site-packages/magenta/models/sketch_rnn/sketch_rnn_train.pyc in load_env(data_dir, model_dir)
74   with tf.gfile.Open(os.path.join(model_dir, 'model_config.json'), 'r') as f:
75     model_config = json.load(f)
---> 76     model_params.update(model_config)
77   return load_dataset(data_dir, model_params, inference_mode=True)
78 `
AttributeError: 'HParams' object has no attribute 'update'

Any help will be greatly appreciated.

will take a look

Hi @pcuellar
In sketch_rnn_train.py, in line 75, I see something different than what you are seeing:
https://github.com/tensorflow/magenta/blob/master/magenta/models/sketch_rnn/sketch_rnn_train.py#L75
Recently, the Params object has been updated to use tf's HParams and update has been changed to parse_json a week or two ago. Maybe you need to run the latest version.
If the latest packaged version doesn't include the latest code, we will need to release and update the packages so that they do.
Thanks


Fully operational README and a convenience method.

Added a ton of code examples. Hopefully these won't get out of sync with the codebase. I figure most people would want some kind of a quick demo of what's required and where to look, so added it all in the README.
Doing this made me sick of typing new OntologyClass.Builder(id).setLabel(label).build() so wrapped that in a new method on Ontology class OntologyClass.of(id, label). It's not a safe thing to do from the type or change perspective, but it's way more convenient for coding things. Maybe I should have added a  OntologyClass.of(id) method too?

All looks great


vs code issue

Description
whenver i open vs code after some time i just got some error like,

Steps To Reproduce
you can go to that image link check error view .
afterward you can proceed that according to you.
Expected behavior
it might not show any error.
Files Version
vs code 1.66.2
Windows Version
windows 11
Relevant Assets/Logs

This is not a files issue. Please report this to the VS team


[ConstraintSystem] Tweak disjunction selection (again) to avoid inadvertently increasing the branching factor

Only consider the number of resolved arguments during binding selection if the number of active choices are equal for both disjunctions. Otherwise, fall back to comparing the number of active choices so the solver doesn't inadvertently increase the branching factor.
Resolves: rdar://73985630

@swift-ci please smoke test

@swift-ci please test source compatibility

@swift-ci please smoke test compiler performance

Summary for main smoketest
Unexpected test results, excluded stats for Kingfisher, SwiftyTextTable, SourceKittenFramework, Commandant, Yams, ReactiveMapKit, swiftlint, SWXMLHash, Result, ReactiveSwift, Alamofire, ReactiveCocoa, SwiftLintFramework
No regressions above thresholds

Debug

debug brief
debug detailed

Release

release brief
release detailed

Debug

debug brief

Regressed (0)

name
old
new
delta
delta_pct

Improved (0)

name
old
new
delta
delta_pct

Unchanged (delta < 1.0% or delta < 100.0ms) (1)

name
old
new
delta
delta_pct

time.swift-driver.wall
261.3s
260.2s
-1.1s
-0.42%

debug detailed

Regressed (0)

name
old
new
delta
delta_pct

Improved (0)

name
old
new
delta
delta_pct

Unchanged (delta < 1.0% or delta < 100.0ms) (4)

name
old
new
delta
delta_pct

file-search.NumFrameworkLookups
12,870
12,881
11
0.09%

file-search.NumIncluded
61,374
61,543
169
0.28%

file-search.NumMultiIncludeFileOptzn
231
231
0
0.0%

file-search.NumSubFrameworkLookups
10,310
10,310
0
0.0%

Release

release brief

Regressed (0)

name
old
new
delta
delta_pct

Improved (0)

name
old
new
delta
delta_pct

Unchanged (delta < 1.0% or delta < 100.0ms) (1)

name
old
new
delta
delta_pct

time.swift-driver.wall
327.8s
326.2s
-1.6s
-0.5%

release detailed

Regressed (0)

name
old
new
delta
delta_pct

Improved (0)

name
old
new
delta
delta_pct

Unchanged (delta < 1.0% or delta < 100.0ms) (4)

name
old
new
delta
delta_pct

file-search.NumFrameworkLookups
12,870
12,870
0
0.0%

file-search.NumIncluded
61,374
61,374
0
0.0%

file-search.NumMultiIncludeFileOptzn
231
231
0
0.0%

file-search.NumSubFrameworkLookups
10,310
10,310
0
0.0%


HOTT-1474 Correct spelling on latest news API Docs

https://transformuk.atlassian.net/browse/HOTT-1474
Correcting spelling on Latest news API docs

Fixed by me :cry:


Fix tests runner

The old script was missing set -e, so its return code was taken from rm packager.log which usually gives 0.

cc @sahrens @spicyj

lgtm


Workitem description field is subject to script injection

To recreate - In a workitem's Detail panel, add this text into the description field

If the (broken) image is then clicked on in the saved Description field - an alert dialog is opened.

Can you please review to reproduce this?

To recreate:

Create a new workitem
Add this text into the description field:
<img src=x onerror=alert(123) />
Save the workitem
Display the workitem
The description field will show a broken image - click on the broken image and the alert dialog will open.


Use nvm as lightweight local node install

I want to install nvm for the current user, but avoid exporting the nvm source script to bashrc, is there a way to do this? aka, I don't want to write to  ~/.bashrc.

you can source nvm.sh in the current shell session; it’s only the install script that writes to bashrc.

yeah i am looking to install it without writing to bashrc

You can git clone the repo, or you can run PROFILE=/dev/null curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash.

thanks, i forgot to ask, is there a way to change the install location of nvm?

You can define $NVM_DIR before running the install script, but it's not recommended.

yeah i probably change the $NVM_DIR, i get it.
however this didn't work on ubuntu:
  (PROFILE=/dev/null curl -o- 'https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh' | bash) &> /dev/null

aka I still get this added to ~/.bashrc
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

can't you just add an env variable flag to prevent the writing to bashrc? should be a simple new flag right?

I could, see #1620.


Just some error, not gamecrashing

https://bytebin.lucko.me/AWSXPSAOZv

It causes me to be unable to load the world...

@InsaanNotFound Do you have a log? Usually latest.log?

I've managed to solve this, for me it was badly loaded datapack modifying tags (including rice) with KubeJS. Got it to work back again


Add proposer for batch-submitter

Codecov Report

Merging #71 (531c5aa) into develop (b3886da) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop      #71   +/-   ##
========================================
  Coverage    82.26%   82.26%
========================================
  Files           49       49
  Lines         1900     1900
  Branches       303      303
========================================
  Hits          1563     1563
  Misses         337      337

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b3886da...531c5aa. Read the comment docs.


[test-utils-recorder] Update runtime dependency "nise"

@HarshaNalluru: Do you know how changes to test-utils-recorder should be verified?

Do you know how changes to test-utils-recorder should be verified?

Though the important scenarios are covered in the tests under the test-utils-recorder, I would suggest a manual test run for the browser tests in record mode followed by the playback mode for a package like storage-blob since this is a major version change.
For the CI checks, we can run the unit-tests pipeline (not live tests) for storage-blob and keyvault-certificates to make sure the playback is fine with the update.

/azp run js - storage - ci

Unit tests for storage - https://dev.azure.com/azure-sdk/public/_build/results?buildId=410390&view=logs&j=b4c89150-f546-50b3-2f97-930dd6567162

Storage unit-tests are green, I can do the manual check tomorrow as I've mentioned before.


PG Syntax Highlighting - String IDs

String IDs are not properly highlighted.

101 :label_01 name:101
abc :label_02 name:abc      # No color for string IDs
G2G :label_03 has_name:true # Partially colored
102 :label_04 invalid_item  # White color for invalid items?
abc -> G2G :label_05        # Same in edges

It seems inline comments are problematic now. It used to work fine.
I :person name:"your name" # Comment

Also, node/edge IDs in double-byte characters are not highlighted:
I :person English:"your name"
私 :人 日本語:私の名前
ผม :คน ไทย:ผมชื่อ
I -> 私 :same_as
I -> ผม :same_as


nodebuilder/node: Init should also generate and save node ID and JWT secret

Init initialises the node directory, but is still missing some components:

Node ID
JWT secret

Users should be able to run celestia <node_type> init and for all keys to be present such that they can use their node before it's running on a network.
cc @cmwaters

Or we should remove init altogther in favor of lazy init from start


⚠ Samsung has degraded performance

In d252153, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2595 ms

Resolved: Samsung performance has improved in 239341e.


Get Previous Message by ID

I have a bot that needs to be able to respond to a previous message when mentioned in a reply.  For example:
Joe (message A):  I need help with .
Moderator, replying to message A: @HelpBot
HelpBot, replying to message A:  @Joe, You can find help for  at .....
Right now, I'm using discordMessage and capturing history of messages by ID, so if the bot sees another message come into the flow that mentions it's name, it will find the original, get the original request, and respond to it.  But this can be memory intensive.
Is there a better way to get older messages by id than keeping a bunch of them in memory?

You can utilize the discordMessageManager. When you receive a message from discordMessage any message it is replying to is captured within the object, use this to get the previous message. E.g. in your case the message received for the moderator replying to the message, in the object there will be a reply parameter which contains the message id.
Using the discordMessageManager you can then obtain this message, if you set the msg.message parameter to the message id, and msg.action to 'info'. This will retrieve the previous message.


next() and previous() are confusing the purpose of PageRequest

Covers some of the issues behind #672 by removing next() and previous() from PageRequest. Those methods are causing confusion about the purpose of PageRequest.  PageRequest is already a builder that collects the configuration for requesting a next page.  It is out of place for it to have operations on it that relate to navigation.  It is not even capable of performing those operations correctly as evidenced by its own JavaDoc which states those operations fail and don't work with cursor-based pagination. They aren't even safe for offset-based pagination because they will keep telling you there are more and more next pages to request with ever increasing page numbers even when no such pages exist.  The next() method is highly likely to lead some users to write code with an infinite loop.  The correct way to perform page traversal is with Page.hasNext()/hasPrevious() and Page.nextPageRequest() and previousPageRequest(). These methods properly account for both types of pagination and are built to inform the user when there cannot be a next or previous page, and, if the user neglects to check if there can be a next/previous page, to fail instead of looping infinitely.

I like this approach, but it only solves some of the issues.

That's a fair point. I updated the description to state that it addresses some of the issues from 672 rather than claiming to fix it entirely.

I'm fine with removing this method, but I think we need to sit down and rethink this from first principles.

I'm fine with removing these methods, but I think we need to sit down and rethink this from first principles.

I like this approach.
Thus, can we move this PR forward?

I'm thinking, for example, that we could remove all (copy-on-write) mutating methods from PageRequest, and instead expose constructors for a PageRequestRecord or whatever as part of an SPI package.
But that leaves disagreement over whether a PageRequest must be constructed in a consistent state, with a page number that agrees with the cursor. If Nathan insists that this is unacceptable, then we will need two different kinds of PageRequest, one with only a page number (an OffsetBasedPageRequest), and one with a cursor (a CursoredPageRequest) but no page number.

The specialization is what I do have in my mind.

Can we move the discussion back to 672? This current PR is only mean to address the portion with next()/previous() which I was hoping to make progress on first because it will be helpful to have those out of the way when solving the rest of the problem.

I agree, @gavinking can we merge this one and return back this discussion to 672?

I guess I would:

remove next(), previous(), page(long), size(int), afterKey/Cursor() ,beforeKey/Cursor() as instance methods,
introduce a different way to construct a PageRequest at a given Cursor/Key value (either static method or constructors), preferably in an SPI package, and
mandate that callers who construct a PageRequest based on a Cursor or Key supply a meaningful/consistent page number.

But if 3 is unacceptable, then I would go with Otavio's suggestion.

remove next(), previous()

Well, actually, no, on second thoughts, these operations are actually fine. They do return instances in perfectly consistent states.

I agree, @gavinking can we merge this one and return back this discussion to 672?

Well the thing is that it depends how we ultimately decide to resolve this. We don't necessarily need to remove next() and previous(). If we assume that page numbers are always meaningful, even when curser-based pagination is in use, then these operations are OK. It's page(long) that's the really broken one.
We only need to remove them if we want to do the split as you suggest.

remove next(), previous()

Well, actually, no, on second thoughts, these operations are actually fine. They do return instances in perfectly consistent states.

I agree, @gavinking can we merge this one and return back this discussion to 672?

Well the thing is that it depends how we ultimately decide to resolve this. We don't necessarily need to remove next() and previous(). If we assume that page numbers are always meaningful, even when curser-based pagination is in use, then these operations are OK. It's page(long) that's the really broken one.
We only need to remove them if we want to do the split as you suggest.

Hum, I got your point.
I will create a PR using this one as a base.

remove next(), previous()

Well, actually, no, on second thoughts, these operations are actually fine. They do return instances in perfectly consistent states.

No, they don't return instances when cursor-based pagination is requested,

* @throws UnsupportedOperationException if this {@code PageRequest}
*         has a {@link PageRequest.Cursor Cursor}.
*/

PageRequest next();

And while they do return real instances when offset pagination is requested, those instances are misleading and bad programming practices. You'll notice that in this PR we don't have a single example in the spec recommending their use, nor does the TCK use them at all. The JavaDoc doesn't have a single example using them either, and has only a single reference that mentioned them in relation to a pattern with unexpected behavior.  This is a case where the validity of thing doesn't automatically make it a good idea or something that is useful.  These methods are at best a distraction and at worse will mislead users into writing bad code.

No, they don't return instances when cursor-based pagination is requested

They return perfectly consistent offset-based PageRequests. They're not cursor-based, that's true, but they're nonbroken.

But OK, fine, I'm not going to stand in the way of removing them, I'm just saying it doesn't really get us any closer to solving the issues I actually care about here.

But OK, fine, I'm not going to stand in the way of removing them, I'm just saying it doesn't really get us any closer to solving the issues I actually care about here.

We agree with that:
I created this work here:
https://github.com/jakartaee/data/pull/675

I believe that this can be closed, since these changes were rolled into #679.


Add try* variants of traits for controllers that support non-blocking…

… operation

The goal is to implement these for nrf-sdc, so that one can take advantage of non-async send if available.
Perhaps the read/write part of the controller should be split, as I don't have the use case for a non-blocking read.

@alexmoon I've found that I can live without the blocking commands, so I've changed this PR to only add try + blocking variants of the Controller trait.

@alexmoon I've found that I can live without the blocking commands, so I've changed this PR to only add try + blocking variants of the Controller trait.

Great! That simplifies things considerably.
I suspect if we were to want to implement "blocking" commands, it should probably drop back to the normal HCI way of doing things where you do a blocking send of the command, but the CommandComplete or CommandStatus result comes back through a read at some other time. Otherwise you're requiring at least two threads of execution and a Sync implementation of the controller in order to receive and match up the command result to the blocking command execution.


Empty black screen for GPU_UpdateImageBytes

Hi!
I am trying to make this test file works https://github.com/grimfang4/sdl-gpu/blob/48fbeaad0d676ee9a5ebb604c1d11a6173742d8f/tests/image-formats/main.c. I am able to get those bmp image examples rendering on the screen, but for things like image_bgr, all I see is a black screen.
There are no obvious errors. I am running Linux.

I am also seeing GPU_GetTarget: DATA ERROR - Framebuffer incomplete with status: 0x8cd6.  Format 0x80e1 for framebuffers might not be supported on this hardware., could it be related to this ?

Yeah, that would mean that the BGR extension is not supported by your graphics driver.


Create database for employees, departments and roles

Create database for employees, departments and roles

Successfully created database: employee_db and tables for employees, departments and roles.


Failed making ephemeral virtual machine, missing permissions

Hi, I'm getting this error when starting the VM's.
Failed making ephemeral virtual machine as resources could not be created: “.Trashes” couldn’t be copied because you don’t have permission to access “runner-1”.

Unsure what needs permission to perform the copy action?
System
Mac mini, M1 2020
macOS Sonoma 14.3.1

I deleted Application Support/dk.shape.Tartelet and added the files manually. Now the VM starts (until I close the desktop app). However it seems like the VM can't find /Volumes/My Shared Files/Resources and it will start boot looping.

I got it to work by manually creating a Resources folder in Virtual Machine Resources, then while VM booted I copied the generated code to runner-1/Resources/start.command along with the generated files.
To me it seems like there are two issues, the script expects a Resources folder but there is none, and the macOS app doesn't have permission to copy/create certain folders.
Any ideas on where to start on a fix to this?

I got it to work by manually creating a Resources folder in Virtual Machine Resources, then while VM booted I copied the generated code to runner-1/Resources/start.command along with the generated files.
To me it seems like there are two issues, the script expects a Resources folder but there is none, and the macOS app doesn't have permission to copy/create certain folders.
Any ideas on where to start on a fix to this?

I managed to solve the first issue that resources couldn't be copied.
This error went away after I emptied the bin 🤦
Still having an issue that files in runner-1 are copied to the root directory and not runner-1/Resources.
Closing this issue and opening a new one.

@antonnyman I'm having the same issues! Did you find a solution for the other issue?


Create support for multiple firmatas

Include support to define a particular type of firmata that needs to be installed. This is the case in things like the mbot and simplebot repos where you need to have them configured to do different things (eg baud rate at times etc).

Fixed in 013ec7db2f3facd8641fb989e2021cd7e65edc2c


Add configuration file

To be able to more easily use it, we should have a configuration file that users can use to run the simulation. We have decided to try a .toml file first.

This is done now.


Google Scholar

Any chance to access google scholar with outline? I always get the
We're sorry...
... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.
thanks

@jandornig Thanks for using Outline and for the suggestion. As far as I'm aware, this is not related to Google Scholar: any Google property may show this message when it thinks you are using a VPN (and many other reasons). Just to be sure, though, can you please test with Google Search and report if you see the same error?

Hi @trevj and thank you for the fast response.
All the other Google products work perfectly. Have been using outline for a while now.
I have seen that kind of barrier pop up once in a while on other vpns before, but unfortunately it seems like Google scholar is very persistent in blocking any connection.
I realize it might be not in your power to do something about it... But if you can, maybe with the help of google even, that would be great.

I also want to add to this discussion.
I used have a DigitalOcean server in SFO, and I experienced the same issue (no be able to visit Google Scholar). I destroyed it and created another server for other reasons, and surprisingly, Google Scholar then became available. Both these servers are from DigitalOcean SFO, just different IPs.
Anyway, this piece of info may be helpful a little bit...

hi @trevj anything else i can help you with? let me know. Not sure what other info i can provide.


Routing based on ACCEPT header

Is there a plugin or simple feature which lets me route to different upstreams based on the ACCEPT header in the request?
"if XML go to this URL, else if JSON go to this URL"

Yeah, recently we also have this requirement,  route by the specific header inside request.

We appreciate you took the time to open an issue for this. However, kong github issues are for bug reports only. I'd like to ask you to post this on the Kong Nation forum
No header based routing is currently available, other than writing a custom plugin.
I'll close this issue now. If you think this was closed in error, then please reopen.

I would also need this, what did you end up doing @FBryant87 @devenfan?

Any update on this? How to make custom plugin with routing based on the headers?

Routing by header has been supported since Kong 1.3 - please check out https://docs.konghq.com/1.4.x/proxy/#routes-and-matching-capabilities.

@gszr Thank you so much. It is really helpful.


Building TF with custom GCC requires hardcoded ld,nm and as

Hi! I am using Fedora 23 to build TensorFlow with GPU support.
GPU support requires a specific GCC version, 4.9 for successful compilation. Since this version is not available from the Fedora Package repositories, it has to be compiled from source. Unfortunately, there are a few obstacles using this version with bazel.
One of those is the following:
After configuring TensorFlow with the self-compiled GCC, and running bazel, the compilation stops with the following message:
gcc: error trying to exec 'as': execvp: No such file or directory
or
gcc: error trying to exec 'nm': execvp: No such file or directory
or
gcc: error trying to exec 'ld': execvp: No such file or directory
To work around this, one can compile GCC by hardcoding the paths to those tools, by adding this to the configuration line of GCC:
--with-ld=/bin/ld --with-nm=/bin/nm --with-as=/usr/bin/as
This does seem rather strange, however, because those programs are on the path, and the custom GCC without bazel is capable of producing working binaries just fine. I feel that in a well-working build system, this kind of hacks should not be necessary.
This is probably a bazel bug, but since I am compiling TensorFlow with it and I cannot be sure that it's not a TF issue, I am creating this here.
Please ping bazel devs as required.

@davidzchen
It seems that you have taken to fixing TF builds with a custom compiler? If so, than you might also be interested in this oddity. Thanks for your work!

I believe this is indeed a bazel problem. I wouldn't know what we can do inside TensorFlow to address this. I would file an issue for bazel.

I created Issue https://github.com/bazelbuild/bazel/issues/1713 in bazel for this.

I have got the same problem gcc: error trying to exec 'as': execvp: No such file or directory.
and I solved it by copy and paste the /usr/bin/as to the same folder as gcc 5.3(/usr/local/bin/gcc)


TaskCanceled exception after 100 seconds

I've a method which links a lot of vertices. now always after 100 seconds i got a Taskcanceled exception.
There are about 60.000 Source and  300 Target Vertices
Even I set the MacExecutioneTime to 20 Minutes. The exceptions always raises after about 100seconds (+/-10) when I use less data so it finishes faster it work.s
It occurs with the normal and the async method.
the stack is

at Neo4jClient.GraphClient.Neo4jClient.IRawGraphClient.ExecuteCypher(CypherQuery query) in D:\temp\f6198f8\Neo4jClient\GraphClient.cs:line 1072
at Neo4jClient.Cypher.CypherFluentQuery.ExecuteWithoutResults() in D:\temp\f6198f8\Neo4jClient\Cypher\CypherFluentQuery.cs:line 392
at Graph.Neo4JGateway.d__3`2.MoveNext() in

There the method :
public async Task LinkVertices<TSource, TTarget>(Expression<Func<TSource, TTarget, bool>> join, string relationName)
{
        string sourceName = typeof(TSource).Name;
        string targetName = typeof(TTarget).Name;

        var span = (int)TimeSpan.FromMinutes(20).TotalMilliseconds;
        try
        {
            await client.Cypher
                .Match(string.Format("({0}:{0})", sourceName), string.Format("({0}:{0})", targetName))
                .Where(join)
                .Create(string.Format("{0}-[:{2}]->{1}", sourceName, targetName, relationName))
                .MaxExecutionTime(span)
                .ExecuteWithoutResultsAsync();

    }
}

PS: I Also posted here: http://stackoverflow.com/questions/36793353/neo4j-a-task-has-been-canceled

Hi, I've answered your Stack Overflow, so I'm going to close this so there is only one thread!
Cheers


remove unused code

What type of PR is this?
/kind cleanup
What this PR does / why we need it:
remove unused code
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?

vendor is read only, can you explain why it was changed here?

Maybe you should submit this cleanup upstream.

I am sure this file is used, it's used to do node provision for pending pods.

cc @jxs1211 If there are no further comments, we will close this pr

cc @jxs1211 If there are no further comments, we will close this pr
I'm talking about the code unused, not the file, current me if I'm wrong.


Prevent spam on #announce stream.

We might want to try a lightweight experiment where it's harder to post to the "announce" stream, perhaps by just using a modal confirmation.
Long term, we might want to make announce a read-only stream (we have a ticket for read-only streams somewhere) or make it so that only admins can post there, or something.
Folks who work on this should discuss options on chat before implementing anything here.

I think making a stream read-only is an option that a lot of orgs will probably be glad to use for an "announce"-type stream.
For a large, open org like chat.zulip.org, it'd be a little sad to limit it that much. I like the idea of something like "your account must be at least N days old", where N might be set to something like 7 (or even 1 would probably suffice). That'd solve the problem of new users showing up and posting there because they haven't yet gotten their bearings.

How about having a stream option where posting to that stream always requires confirmation (something similar to the warning slack has for example when you want to @ a lot of people).

We have an existing "waiting period for stream creation" feature, that I think could reasonably be extended to be a "waiting period for posting to #announce" as well.
We might also want the confirmation feature.

The confirmation modal sounds likely to work.
It'd be a useful thing for @all, too -- I don't think we've needed it on chat.zulip.org, but in a big realm where the least polite 5% of users are less polite than on that realm, it could really help for setting a norm that you don't do it gratuitously. (I think the corresponding Slack feature helped a lot at Dropbox.)

We actually do have a confirmation modal for @all already, which is used if there are something like 10+ users subscribed to where you're posting with it.

Oh, cool. Is it documented anywhere @timabbott

Not sure, but the code's in validate_stream_message_mentions.

@zulipbot label "GCI task"

@zulipbot claim

I made a thread on chat to discuss possible solutions.

After talking with @tommyip, here is my Pull Request: https://github.com/zulip/zulip/pull/7828. It simply adds a check for the stream being announce in validate_stream_mention_messages. Please let me know if there is anything I should change or fix!

I would much appreciate some option to completely block users from posting to certain streams.  IMO, there's really no reason for users to be allowed to post to the announcement stream at all in most use cases.


Upgrade devDependencies

Before submitting, please confirm you've

[x] read and understood our Contributing Guidelines
[x] completed Mattermost Contributor Agreement
[x] executed npm run lint:js for proper code formatting

Please provide the following information:
Summary
Upgrade devDependencies.
This includes a new dependency which is derived from webapp, eslint-plugin-header. As well as https://github.com/mattermost/mattermost-webapp/pull/1140, header comments are added to JS files.
Issue link
#805
Test Cases
Execute tests in CI.
Additional Notes
https://circleci.com/gh/yuya-oc/desktop/898

Thanks @yuya-oc! Propose we get @esethna's help coordinate testing

Thanks @jasonblais, however I think this PR makes no changes for application behavior because only misc dev tools were upgraded. So I want to get review about license header here.


Fix: Build MyBinder cache properly

@adrien-berchet , do you want to merge that?

Not yet, it does not work properly :-/


padding props

hi, currently padding prop is fixed to number by prototype. So if I use string like e.g.: '0 22px 0 0' it gives:
"index.js:1437 Warning: Failed prop type: Invalid prop padding of type number supplied to Tooltip, expected string."
Tooltip with valid CSS string for padding props (like e.g. '0 22px 0 0') works fine. The only issue is the warning mentioned above. Would it be possible to change padding prototype in further releases so it accepts string as well?

Hi @pkodzis the string you posted does not create a prop types warning for me, which makes sense since the propType is set as string, but passing just a number does.  Support for numbers on the padding prop is added with: v1.11.2.


pull request for e2e test at 12/28/2016 19:45:06

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


RhinoApp.RunScript() return false with Rhino.Inside .Net

Ref. this thread it seems that there's an issue with running the RunScript method with Rhino.Inside.
Multiple attempts are tried in the forum thread.
https://discourse.mcneel.com/t/rhinoapp-runscript-return-false-with-rhino-inside/168589

Tried to pass arguments to RhinoCore like we can with regular Rhino. Didn't work. More info in the forum thread linked in the initial post.


Notify weatherspot.us when a Series has not recieved any data for 30 minutes

Idea is a bash script running as a cronjob every hour, checks the latest data point in a given series and if it is greater than 30 minutes old, send an email to<EMAIL_ADDRESS>Running: ./notifyNoDataInSeries Downtown

Looks like this will require me to install mailutils unless anyone objects.

Mailutils is very vulnerable from what I remember - plus we will get lots of spam. Check out a service such as zoho mail
Sent from my iPhone

On Jul 23, 2015, at 5:46 PM, Peter L<EMAIL_ADDRESS>wrote:
Looks like this will require me to install mailutils unless anyone objects.
—
Reply to this email directly or view it on GitHub.

OK I didn't install mailutils because it really is overkill. We can figure out what manner of notifications we want to receive later.
Here is a bash script that tells us how long it has been since a series has been updated.
Whatever mechanism we choose to trigger when a series is not receiving updates can use this script. This script can be found in ~/scripts on our webserver.


Some way to keep URL and DOI bibliography fields after all?

Summary
I am using this to make a PDF I don't intend to print, so it would be nice to render these fields after all.
(Even if I was printing an actual book, I suppose I would rather include QR codes than drop URLs entirely.)
Details
I see the unconditional \clearfield calls in kaobiblio.styas of2a82b3a8a3556d646d47bd719829d6d65e34895b`:
https://github.com/fmarotta/kaobook/blob/2a82b3a8a3556d646d47bd719829d6d65e34895b/kaobiblio.sty#L69-L70
https://github.com/fmarotta/kaobook/blob/2a82b3a8a3556d646d47bd719829d6d65e34895b/kaobiblio.sty#L415-L420
Additional context
In my current build, it always puts the margin on the right side, which is good for a PDF --- no complaints about that. Maybe that same way of detecting "oh, not actually making a real book" can be used for this?

We can add an option for this. The way to detect that we are making a real book, I guess, is the twoside class option, but I'd keep it separate from the option to show urls and dois. Somebody might want a twoside pdf with urls, for instance.


videojs-contrib-ads has not seen a loadstart event 5 seconds.

videojs-contrib-ads has not seen a loadstart event 5 seconds after being initialized, but a source is present. This indicates that videojs-contrib-ads was initialized too late. It must be initialized immediately after video.js in the same tick. As a result, some ads will not play and some media events will be incorrect. For more information, see https://github.com/videojs/videojs-contrib-ads#important-note-about-initialization
I am getting this error on following browser:
Google Chrome
Version 61.0.3163.79 (Official Build) (64-bit)

Implementation:
app.controller('VideoPlayer', function ($scope, $rootScope) {
// hide Audio Player
stopAudioPlayer();
$rootScope.showAudioPlayer = false;
// init Video Player
$scope.video = null;
$scope.player = null;
$scope.playerControls = null;
$scope.options = {
    autoplay: true,
    controls: true
};

$scope.events = [
    google.ima.AdEvent.Type.ALL_ADS_COMPLETED,
    google.ima.AdEvent.Type.CLICK,
    google.ima.AdEvent.Type.COMPLETE,
    google.ima.AdEvent.Type.FIRST_QUARTILE,
    google.ima.AdEvent.Type.LOADED,
    google.ima.AdEvent.Type.MIDPOINT,
    google.ima.AdEvent.Type.PAUSED,
    google.ima.AdEvent.Type.STARTED,
    google.ima.AdEvent.Type.THIRD_QUARTILE,
    google.ima.AdErrorEvent.Type.AD_ERROR
];

$scope.init = function (video) {
    $scope.video = video;
};

//listen for when the vjs-media object changes
$scope.$on('vjsVideoMediaChanged', function (e, data) {
    console.log('vjsVideoMediaChanged event was fired');
});

$scope.$on('vjsVideoReady', function (e, data) {
    //data contains `id`, `vid`, `player` and `controlBar`
    //NOTE: vid is deprecated, use player instead
    console.log('video id: ' + data.id);
    console.log('video.js player instance: ' + data.player);
    $scope.player = data.player;
    console.log('video.js controlBar instance: ' + data.controlBar);
    $scope.playerControls = data.controlBar;

    var adTagUrl = 'https://an.facebook.com/v1/instream/vast.xml?placementid=229499500518933_1048464968622378&pageurl=' + encodeURIComponent($scope.video.shareUrl);
    //var adTagUrl = 'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480|336x280|300x250&iu=/136009255/Taazi_Sample_Player_Multiple_Sizes&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url=[referrer_url]&description_url=[description_url]&correlator=[timestamp]'
    //var adTagUrl = 'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=970x70&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator='

    console.log(adTagUrl);

    var options = {
        debug: true,
        timeout: 10000,
        prerollTimeout: 500,
        id: 'video_player',
        adTagUrl: adTagUrl,
        forceNonLinearFullSlot: true
    };

    // This must be called before player.play() below.
    $scope.player.ima(options, bind(this, adsManagerLoadedCallback));

    $scope.player.on('adserror', function () {
        incrementContentCount('video', $scope.video.id);
    });

    // Remove controls from the player on iPad to stop native controls from stealing
    // our click
    var contentPlayer = document.getElementById('video_player_html5_api');
    if ((navigator.userAgent.match(/iPad/i) ||
        navigator.userAgent.match(/Android/i)) &&
        contentPlayer.hasAttribute('controls')) {
        contentPlayer.removeAttribute('controls');
    }

    $scope.player.one('ready', function () {
        $scope.player.ima.initializeAdDisplayContainer();
        $scope.player.ima.requestAds();
    });

    // Start ads when the video player is clicked, but only the first time it's
    // clicked.
    /*var startEvent = 'click';
     if (navigator.userAgent.match(/iPhone/i) ||
     navigator.userAgent.match(/iPad/i) ||
     navigator.userAgent.match(/Android/i)) {
     startEvent = 'touchend';
     }

     $scope.player.one(startEvent, function () {
     $scope.player.ima.initializeAdDisplayContainer();
     $scope.player.ima.requestAds();
     $scope.player.play();
     });*/

    $scope.player.on(['loadstart', 'play', 'playing', 'firstplay', 'pause', 'ended', 'adplay', 'adplaying', 'adfirstplay', 'adpause', 'adended', 'contentplay', 'contentplaying', 'contentfirstplay', 'contentpause', 'contentended'], function (e) {
        //console.info('VIDEOJS player event: ', e.type);
    });
});

function adsManagerLoadedCallback() {
    for (var index = 0; index < $scope.events.length; index++) {
        $scope.player.ima.addEventListener(
            $scope.events[index],
            bind(this, onAdEvent));
    }
    $scope.player.ima.startFromReadyCallback();
}

function onAdEvent(event) {
    //console.log(event.type);
    if (event.type == google.ima.AdEvent.Type.ALL_ADS_COMPLETED || event.type == google.ima.AdErrorEvent.Type.AD_ERROR) {
        incrementContentCount('video', $scope.video.id);
    }
}

function bind(thisObj, fn) {
    return function () {
        fn.apply(thisObj, arguments);
    };
}

});
someone please help me out in understanding the problem and how can solve it.

I think the problem is that you're waiting for vjsVideoReady to call  $scope.player.ima(options, bind(this, adsManagerLoadedCallback)). Does your code work if you move that line to soon after you create your video.js player instance? You can see in our sample that we call that almost immediately after initializing the player, and that's what initializes the ads plugin.

I was having this issue also, and moving the ima function call to right after the video.js player instance is created fixed it for me, thanks 🤠

Hi guys thanks for your help. i figure out the issue in the angular js directive written by https://github.com/LonnyGomes/vjs-video. I want help from you guys is this i want to inform this person about the issue and the fix i made in his SDK. What i have to do ?