Carthage support?

Would be cool if you could support carthage.

What's your issue with carthage? It works fine for me in my Swift 2 project:
github "MengTo/Spring" "swift2"

@mbuchetics thanks. Worked for me. It will be better if mention in READ ME instruction

I get the build properly using  carthage and github "MengTo/Spring" "swift2" in my cartfile, But when i try to get it working in interface builder, The Inspector shows the Class ex. SpringImageView, but nothing for the module? Nor do I get any options in the attributes inspector.

I get the build properly using carthage and github "MengTo/Spring" "swift2" in my cartfile, But when i try to get it working in interface builder, The Inspector shows the Class ex. SpringImageView, but nothing for the module? Nor do I get any options in the attributes inspector.

Exactly my problem! I think the generated framework does now contain all files

The files are there, more than like;y if you set up the project correctly, with you build settings, run script and that you added the correct carthage build to the linked libraries and frameworks. That being said i got it working by selecting the failing/missing components in the storyboard. select the button, i.e.,
gotothe identity inspector, Under Custom View, you should see ie. SpringButton, but xocde has added a field under Class, called Module. You must enter the framework name there i.e.. Spring


Armitage not starting and showing a blank message

What steps will reproduce the problem?
1. Install Metasploit and update it
2. Type "armitage" in console and go through the first windows
3. Wait for the connection to establish

What is the expected output? What do you see instead?
Armitage should start instead I see a blank message (it's an empty window) and
the process just stucks there forever saying that the connection is established.

What version of Metasploit are you using? 4.1.4
On which operating system? OpenSUSE 12.1 x65

Which database are you using? None? (dunno, just followed the guide)

Thanks for helping,
Alessio

Please provide any additional information below.

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 15 Dec 2011 at 11:26
Attachments:

armitage-bug.png

hello, this question is in no way related to this this thread but i'd thought i's drop it in anyway. when I run the ./armitage (not .jar) file, it comes up with the error: 'The Parallel GC can not be combined with -XX:ParallelGCThreads=0' any advice?


How to restore .mat formatted data to the original .avi or .mp4 video files？

Thank you very much for providing the dataset. How can I restore .mat formatted data to the original .avi or .mp4 video files?

If you already downloaded MMPD dataset with agreement, you can easily read it by the following code:
import scipy.io as sio
f = sio.loadmat('p1_0.mat')
print(f.keys())

Then you can get the video (shape:  [t, w, h, c]) and write it as avi or mp4 file. Please note that incorrect encode method may damage the quality of the dataset if you want to change it back to video.

If you already downloaded MMPD dataset with agreement, you can easily read it by the following code:
import scipy.io as sio
f = sio.loadmat('p1_0.mat')
print(f.keys())

Then you can get the video (shape: [t, w, h, c]) and write it as avi or mp4 file. Please note that incorrect encode method may damage the quality of the dataset if you want to change it back to video.

What encoding should I use for the MMPD dataset to ensure no loss?

Could you share your motivation to get the mp4/avi so that we could offer better suggestions?

If you already downloaded MMPD dataset with agreement, you can easily read it by the following code:
import scipy.io as sio
f = sio.loadmat('p1_0.mat')
print(f.keys())

Then you can get the video (shape: [t, w, h, c]) and write it as avi or mp4 file. Please note that incorrect encode method may damage the quality of the dataset if you want to change it back to video.

What encoding should I use for the MMPD dataset to ensure no loss?

If no more questions or replies, I will close this issue due to the time limit.


kubectl proxy --reject-methods flag is non-functional

The flag is registered, but the specified value is never read or used
This means all http methods are allowed by default (despite the help saying PUT/POST/PATCH being disallowed), and users have no way to control which methods are accepted

@liggitt Thanks for reporting this, I will fix this today.

@adohe Any updates?


Tuesdaylab

Thank you for the feedback Chris! I was looking at Steve's code, he used
semantic tags when i was about to start my code, so i was going to do it
that way, but Julie showed me her code and she just had divs so i figured
that was a better way. I will try to be more semantic in the future.
On Tue, Sep 10, 2019, 3:56 PM Chris L Chapman<EMAIL_ADDRESS>wrote:

@SeattleChris commented on this pull request.
Try using more semantic tags. It is best if you can limit your use of div
tags unless nothing semantic will work for a situation. Look up the tags
like header, main, footer, aside, section, article, nav, and etc.
Likewise, it is best if you can limit your use of class and id attributes.
While there certainly will be times that these are the best choice, this
approach should not be overused. If your HTML is using better semantic tags
this will give you better options for selecting elements appropriately.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/Alejandroid101/lab-01/pull/1?email_source=notifications&email_token=AMV2AQMXVRQ6QC4AOMHQSJ3QJAQZRA5CNFSM4IVLN75KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCEJVARA#pullrequestreview-286478404,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMV2AQM4NUVXMEAQTZSXPDDQJAQZRANCNFSM4IVLN75A
.


cilium-operator: only watch cilium-managed HTTPRoutes

Please ensure your pull request adheres to the following guidelines:

[x] For first time contributors, read Submitting a pull request
[ ] All code is covered by unit and/or runtime tests where feasible.
[x] All commits contain a well written commit description including a title,
description and a Fixes: #XXX line if the commit addresses a particular
GitHub issue.
[x] If your commit description contains a Fixes: <commit-id> tag, then
please add the commit author[s] as reviewer[s] to this issue.
[x] All commits are signed off. See the section Developer’s Certificate of Origin
[x] Provide a title or release-note blurb suitable for the release notes.
[x] Are you a user of Cilium? Please add yourself to the Users doc
[x] Thanks for contributing!

Fixes: #34754
operator: don't watch HTTPRoutes associated with non-Cilium Gateways

originally wrote this against the v1.16.1 branch and did a copy/paste; need to write this against main

I discovered that my original approach prevented Routes from being watched, but it didn't prevent them from actually being reconciled, so I moved the logic into the actual reconciler funcs.
This feels like it violates DRY, but I couldn't find a good place to unify this logic that didn't create an import cycle. Open to thoughts here.


Defining updating theme causes lot of rebuilds

If you define textButtonTheme with TextButton.styleFrom in the MaterialApp's theme property, there will be a lot of unnecessary (?) rebuilds.
Also Theme.of(context) must be used to reproduce this bug.
You can see on the attached pictures that adding  TextButton.styleFrom(primary: Colors.red), will cause 12 times more rebuilds than with the code without it.
If I remove Theme.of(context) from the Scaffold then it only gets rebuilt once.
note: I forced a rebuild with cmd+s (hot reload). In the actual application, I'm using a BlocBuilder and this causes the initial rebuild.
I know that flutter can call rebuild whenever it wants and I should calculate with it but rebuilding it 12 times is obviously noticeable (there is a little flickering in the elements in my actual app)
Steps to Reproduce

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        theme: ThemeData(
            textButtonTheme: TextButtonThemeData(
          style: TextButton.styleFrom(),
        )),
        debugShowCheckedModeBanner: false,
        home: Home());
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    print('Home build');
    return Scaffold(
      backgroundColor: Theme.of(context).primaryColor,
    );
  }
}

channel: stable
version: 2.2.3
macOS 11.5.2
simulator: iPhone 8 (iOS 14.5)
Expected results:

Actual results:

Logs

info • Avoid `print` calls in production code • example/lib/main.dart:21:5 • avoid_print

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.5.2 20G95 darwin-x64, locale en-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.59.1)
[✓] Connected device (2 available)

• No issues found!

Hi @hbali, thanks for filing the issue.
Using hot-reload to force rebuild the app I was able to confirm your results, however, I wanted to know if this had anything to do with state rebuilds so I modified your sample code a little but after the modification I'm unable to reproduce it.
Perhaps this could be a different issue?
Kindly try out my example to confirm for yourself.

 updated code sample
import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        textButtonTheme: TextButtonThemeData(
          style: TextButton.styleFrom(primary: Colors.red),
        ),
      ),
      debugShowCheckedModeBanner: false,
      home: Home(),
    );
  }
}

class Home extends StatefulWidget {
  @override
  _HomeState createState() => _HomeState();
}

class _HomeState extends State<Home> {
  @override
  initState() {
    super.initState();
    SchedulerBinding.instance?.addPostFrameCallback((_) {
      Timer.periodic(const Duration(seconds: 5), (timer) {
        setState(() {
          print('${timer.tick}');
        });
      });
    });
  }

  @override
  Widget build(BuildContext context) {
    print('Home build');
    return Scaffold(
      backgroundColor: Theme.of(context).primaryColor,
    );
  }
}

logs(timer was running in the background)
`Notice the home build prints only once after each ticker print`

@danagbemava-nc
Thank you for your response!
I copied your code and the result is the same as yours, build only happens once per setState.
I modified the code a bit and moved the rebuild outside the Home widget (so the MaterialApp also gets rebuilt). This is closer to my actual app implementation since the issue occurs when I change the color theme of the app → thus I need to rebuild the whole MaterialApp
This way, the problem occurs again.
import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    SchedulerBinding.instance?.addPostFrameCallback((_) {
      Timer.periodic(const Duration(seconds: 5), (timer) {
        setState(() {
          print('${timer.tick}');
        });
      });
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        theme: ThemeData(
            primaryColor: Colors.red,
            textButtonTheme: TextButtonThemeData(
              style: TextButton.styleFrom(primary: Colors.red),
            )),
        debugShowCheckedModeBanner: false,
        home: Home());
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    print('Home rebuild');
    return Scaffold(
      backgroundColor: Theme.of(context).primaryColor,
    );
  }
}

After some more investigation:
the same problem occurs if I define cupertinoOverrideTheme in the ThemeData. I wanted to change the default purple color of the CupertinoActionSheet text (why is it purple, why isn't it systemBlue?) and numerous rebuilds happened as soon as I defined the property.
Probably there are more properties in ThemeData that causes these mysterious rebuilds

I can reproduce this issue on master and stable with the source in this comment.

flutter doctor -v
[✓] Flutter (Channel master, 2.6.0-1.0.pre.111, on macOS 11.5.1 20G80
    darwin-arm, locale en-GB)
    • Flutter version 2.6.0-1.0.pre.111 at /Users/nexus/dev/sdks/flutters
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 965bd1ff40 (11 hours ago), 2021-08-29 23:41:02 -0400
    • Engine revision f4a380f3e5
    • Dart version 2.15.0 (build 2.15.0-65.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.5.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.10.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.59.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.25.0

[✓] Connected device (5 available)
    • M2007J20CG (mobile)    • 5dd3be00                             •
      android-arm64  • Android 11 (API 30)
    • Nexus’ IPhone (mobile) • 00008020-001875E83A38002E            • ios
      • iOS 14.6 18F72
    • iPhone 12 (mobile)     • F2592D43-5FE3-46BB-8A2B-A38BA468DCE9 • ios
      • com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)        • macos                                •
      darwin-arm64   • macOS 11.5.1 20G80 darwin-arm
    • Chrome (web)           • chrome                               •
      web-javascript • Google Chrome 92.0.4515.159

• No issues found!

[✓] Flutter (Channel stable, 2.2.3, on macOS 11.5.1 20G80 darwin-arm, locale
    en-GB)
    • Flutter version 2.2.3 at /Users/nexus/dev/sdks/flutter
    • Framework revision f4abaa0735 (9 weeks ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5.1, Build version 12E507
    • CocoaPods version 1.10.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.59.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.25.0

[✓] Connected device (5 available)
    • M2007J20CG (mobile)    • 5dd3be00                             •
      android-arm64  • Android 11 (API 30)
    • Nexus’ IPhone (mobile) • 00008020-001875E83A38002E            • ios
      • iOS 14.6
    • iPhone 12 (mobile)     • F2592D43-5FE3-46BB-8A2B-A38BA468DCE9 • ios
      • com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)        • macos                                •
      darwin-arm64   • macOS 11.5.1 20G80 darwin-arm
    • Chrome (web)           • chrome                               •
      web-javascript • Google Chrome 92.0.4515.159

• No issues found!

log.txt

This is not just TextButtonTheme but any theme updates causes lot of rebuilds.

minimal code sample

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        theme: ThemeData(
          toggleButtonsTheme: ToggleButtonsThemeData(
            color: Colors.red,
          )
          //   textButtonTheme: TextButtonThemeData(
          // style: ButtonStyle(
          //   foregroundColor: MaterialStateProperty.all<Color>(Colors.red),
          // ),
          // style: TextButton.styleFrom(primary: Colors.red),
        ),
        debugShowCheckedModeBanner: false,
        home: Home());
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    print('Home build');
    return Scaffold(
      backgroundColor: Theme.of(context).primaryColor,
    );
  }
}

Results
7
flutter: Home build
Reloaded 1 of 584 libraries in 236ms.
11
flutter: Home build

Same Issue when I used Some thing like this
Theme.of(context).textTheme.subtitle1!.copyWith(fontSize: 12, color: AppColors.brandColor),

Same issue when I switch brightness above and have a:
Text(
   style: Theme.of(context).textTheme.displayMedium,
   'Text',
),

The minimum code to reproduce the problem could be this:
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    print('#build $MyApp');

    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        textButtonTheme: TextButtonThemeData(
          style: TextButton.styleFrom(elevation: 1),
        ),
      ),
      home: Builder(
        builder: (context) {
          print("#build Builder");

          Theme.of(context);

          return const SizedBox();
        },
      ),
    );
  }
}

This does not work correctly if we specify style: TextButton.styleFrom(elevation: 1), (you can specify any field. TextButton.styleFrom() will not work) and after all that use Theme.of(context);. Playable on Flutter Channel stable, 3.7.0

Same Issue when I used Something like this
Theme.of(context).extension();

Did anyone find the solution? I have the same issue when I change the theme, it rebuilds child widget many times.

I think the reason behind this is lerp methods which makes the theme changing animations

smoother

@raghavendra-k-j yes it is a correct observation that all values in ThemeData are changed via a lerp animation. So if you observe the rebuild of widgets that are affected by any changed property value in ThemeData, you will see a lot of rebuilds of those widgets as the Theme linearly animates through those values to the new target value. This is normal and expected behavior.
However, the problem is that as soon as you use any component theme that contains a MaterialStateProperty (now in master WidgetStateProperty) that is not null, ie defined to some custom theme value, the Theme will lerp animate and rebuild all widgets, even if there is no value change on ThemeData.
This happens because using MaterialStateProperty breaks object equality, so the same ThemeData is no longer equal and everything is animated and rebuilt anyway, even if nothing was changed and nothing should have been rebuilt.
This is imo a real and severe issue with ThemeData and the used MaterialStateProperty solution.
Another sample to demo the issue
Consider this "a bit" more involved sample:
import 'package:flutter/material.dart';

void main() {
  final ThemeController themeController = ThemeController();
  runApp(MyApp(themeController: themeController));
}

class MyApp extends StatelessWidget {
  const MyApp({super.key, required this.themeController});
  final ThemeController themeController;

  @override
  Widget build(BuildContext context) {
    debugPrint('#build MyApp');
    return ListenableBuilder(
        listenable: themeController,
        builder: (BuildContext context, Widget? child) {
          debugPrint('#build MaterialApp');
          return MaterialApp(
            title: 'Flutter Demo',
            theme:
                appLightTheme(appBarElevation: themeController.appBarElevation),
            home: Builder(
              builder: (BuildContext context) {
                debugPrint("#build Scaffold");
                return Scaffold(
                  appBar: AppBar(
                    title: const Text('Flutter Demo'),
                  ),
                  backgroundColor: Theme.of(context).canvasColor,
                  body: BodyContent(themeController: themeController),
                );
              },
            ),
          );
        });
  }
}

class BodyContent extends StatelessWidget {
  const BodyContent({super.key, required this.themeController});
  final ThemeController themeController;

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        const SizedBox(height: 20),
        SwitchListTile(
          title: const Text('Elevate AppBar'),
          onChanged: (bool value) {
            if (value) {
              themeController.setAppBarElevation(4);
            } else {
              themeController.setAppBarElevation(0);
            }
          },
          value: themeController.appBarElevation > 0,
        ),
        TextButton(
            onPressed: () {
              themeController.triggerRebuild();
            },
            child: const Text('Trigger Rebuild')),
      ],
    );
  }
}

class ThemeController with ChangeNotifier {
  ThemeController();
  double _appBarElevation = 0;

  get appBarElevation => _appBarElevation;
  void setAppBarElevation(double elevation) {
    _appBarElevation = elevation;
    notifyListeners();
  }

  void triggerRebuild() {
    notifyListeners();
  }
}

ThemeData appLightTheme({double appBarElevation = 0}) => ThemeData(
      appBarTheme: AppBarTheme(
        elevation: appBarElevation,
        shadowColor: Colors.black,
        // Adding this will make the elevation tint color change animate too.
        shape: const RoundedRectangleBorder(),
      ),
      textButtonTheme: TextButtonThemeData(
        style: TextButton.styleFrom(elevation: 1),
      ),
    );

On first build we see this:

We see the 3 builds that the framework triggers (I wish that was just once too, but there are bunch of wrappers that triggers it 3 times).
Then many Scaffold rebuilds as the theme change was animated. But was there really something to lerp animate? Let's look at it in more detail.
Elevate AppBar
Let's start by elevating the AppBar:
https://github.com/flutter/flutter/assets/39990307/f6563369-6758-4770-a834-4725bef4318b
The MaterialApp rebuilds once, and Scaffold many times as the AppBar elevates and changes style via an animation. The elevation tint color is animated, as is the appearance of the shadow under it. This is all expected and as it should be

[!NOTE]
In the AppBarTheme the shape: const RoundedRectangleBorder() is needed to make the change in elevation tint color animate as it should. That this is needed is due to a performance optimization that is made on Material widget. See issue https://github.com/flutter/flutter/issues/131042 for more info.

Trigger rebuild - Take 1
Next let us just push the button to trigger a rebuild, notifying listeners that the theme controller has changed and thus also the theme:
https://github.com/flutter/flutter/assets/39990307/9213f0e0-40f7-4e17-8a47-781bb8a52e86
We get the same expected rebuild once of MaterialApp, but Scaffold was built many times, even if nothing in it changed. This is bad, but why did it happen?
It happened because ThemeData object value equality is broken, because we are using a MaterialStateProperty that contain callback functions.
In our ThemeData the styleFrom will define a custom MaterialStateProperty for our AppBarTheme in ThemeData and this kills value equality of ThemeData.
      textButtonTheme: TextButtonThemeData(
        style: TextButton.styleFrom(elevation: 1),
      ),

So the equality checks for rebuilding ThemeData no longer works correctly, due to the callback functions in it.
Trigger rebuild - Take 2
To demo what happens when we do not have any custom MaterialStateProperty defined anywhere in our ThemeData, just remove or comment the textButtonTheme lines in the example theme:
ThemeData appLightTheme({double appBarElevation = 0}) => ThemeData(
      appBarTheme: AppBarTheme(
        elevation: appBarElevation,
        shadowColor: Colors.black,
        // Adding this will make the elevation tint color change animate too.
        shape: const RoundedRectangleBorder(),
      ),
      // textButtonTheme: TextButtonThemeData(
      //   style: TextButton.styleFrom(elevation: 1),
      // ),
    );

Again, let's start with a fresh build, we see that it has the 3 builds by the SDK as before, plus once for our theme change, but now also only once for the Scaffold, no animation rebuild!! This is already better and what we would have expected for the start of the above examples too.
Now again just trigger the rebuild:
https://github.com/flutter/flutter/assets/39990307/089ae042-0ce4-45e8-a211-3b64abed406b
And now we get the expected behavior, the MaterialApp rebuild is as ordered triggered once, but also the Scaffold was only rebuilt once, as it should have been, since there was nothing changed in it that needed to be animated. The value of the new ThemeData was identical to the previous one, so nothing to animate. However, as shown above earlier, as soon as we have an use any component theme that defines any MaterialStatePorperty the object equality is broken and we get all these extra rebuilds. Feel free to try with any other MaterialStatePorperty in any component sub theme in ThemeData and you will observer the same extra rebuild behavior.
This is imo a VERY bad thing when you are using custom component themes that contain MaterialStatePorperty, and any serious custom theme will need a lot of them.
This is caused by the current SDK design. I don't know of any workaround or fix to this rebuild issue.

In my case, I use GoRouter redirect, also I have a text field and one of my widget in the screen is using MediaQuery to get the screen size. Every time I touch the text field, my material app is rebuilt. It causes the flicker on the screen, the only way to fix it is removing my material app theme data (it also uses MediaQuery to check the platform).

When setting themeMode: ThemeMode.system, on iOS, entering and exiting the app background will also lead to rebuilding, causing screen flickering issues.
void main() async {
  print("main ");
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    print("myapp ");
    return MaterialApp(
      title: "Application",
      themeMode:ThemeMode.system,
      // theme: AppTheme.lightTheme,
      // darkTheme: AppTheme.darkTheme,
        theme: ThemeData.light(),
        darkTheme: ThemeData.dark(),
      home: HomeView()
    );
  }
}

class HomeView extends StatelessWidget {
  const HomeView({Key? key}) : super(key: key);

  Widget test1(context){

    // var data = Theme.of(context).brightness;
    print("-------test1 has been called------");
    // print("Theme.of(context).brightness ${ data}");
    return Container(
      color: Theme.of(context)
          .primaryColor,
      height: 200,
      width: 200,
      child: Text("123"),
    );
  }

  @override
  Widget build(BuildContext context) {
    print("home build");
    return Scaffold(
      resizeToAvoidBottomInset: false,
      body: ListView(
        children: [
          TextField(),
          test1(context),

        ],
      ),
    );
  }
}

Console Output Results：

flutter: home build
flutter: -------test1 has been called------
flutter: home build
flutter: -------test1 has been called------
flutter: home build
flutter: -------test1 has been called------
flutter: home build
flutter: -------test1 has been called------

When the app enters the background, it will print once
When the app enters the foreground from the background, it will print once.
This is the question I asked before
https://github.com/flutter/flutter/issues/142890

I just discovered WidgetStateProperty.fromMap, which was recently added in https://github.com/flutter/flutter/pull/146043. Any idea if that works around this performance problem? I guess @nate-thegrate probably wasn't thinking of this performance problem when he wrote it, but even if it doesn't fix the problem out of the box, I think we could theoretically do it by adding a deep equality check to WidgetStateProperties created with fromMap.

It's been very exciting to finally land the WidgetState mapping PR and talk about it here and in the recent design doc :)
Parsing the map in that constructor is something that hadn't even crossed my mind, but I bet it would prevent a lot of rebuilding (though the operators could make that process a bit more convoluted).
It would be a huge challenge, but maybe the most effective way to optimize rebuilds would be transitioning the Theme widget to use an InheritedModel.
MediaQuery uses a private enum type for its dependencies, but Theme could use an API that stores information for making high-precision queries (similar to what provider/riverpod/bloc already have), so we only trigger a rebuild when the query output changes.
I currently have a half-finished design doc for this; hopefully I can put together a complete proposal within the next week!


Prevent notify both failure and success

onSuccess was called right after onFailure when you don't have an internet connection, or the downloading task was failed.
it also fixe_s #72

So true. Didn't notice I already had the same code that you provide in the PR included in my codebase. Haven't released it yet.
Will upload a version ASAP with this patch. Thanks for opening the issue :)


Command-a in Menubar/Help doesn't highlight search input.

To reproduce:

Press commandshift/ to trigger Menubar / Help search input.
Type anything to populate the search input.
Press commanda.

Expected behavior (convention for Mac OS native and major third-party apps): Typed search input should highlight entirely.
Observed behavior: Keyboard focus is lost from the search input, and the file's contents are highlighted entirely instead.

Mac OS 10.11.6
Atom 1.9.9

Duplicate of #10735

Closing in favor of previously reported https://github.com/atom/atom/issues/10735.


integrate visualfsharp master

Integrates the latest fixes from visualfsharp master

Note that after this change there is basically zero code divergence between these repositories, so future integrations should be easier


Fix build race

This will fix the intermittent failures related to the ReportTypesX header. We're now generating that, if required, at cmake time, rather than during the build, because I can't see how to make the dependencies work out right without making it a target of its own, which seems like overkill.

@JeroMiya I'm assuming this was OK to merge, right?


Move select TableSelectCell to right

Is there a way to move TableSelectCell to right. I tried publishing a new npm library with these changes that worked, but I think it's an overkill, Is there any other way to do it?
Thanks in Advance

There is no option to position the select column on the right. I'd be open to a PR for this, however, it may be a little tricky with the column resize and column dragging features.
One method of accomplishing this would be to simply have a column of checkboxes as a normal column and externally control them, rather than using the table's internal selectableRows feature.

It exists in mui option - align.
We can decide whether to add Option or not.

It exists in mui option - align.
We can decide whether to add Option or not.
I look forward to hearing from other feedback. @patorjk

The align property aligns content within a cell. It's currently accessable through the setCellProps option.
They're talking about positioning the Select Column on the right of the table. It may be possible to do this by setting a styling of "fixed:sticky;right:0" to the cells in this column, or it may require allowing the column to be on the right of the table, but I'm not sure.

I created a new variable in options where we can define left or right and tested I was testing for column resizing. Once I am done I can create a new PR.

Ah... they want TableSelectCell to go Tablebody right.
thanks! I understand

I created a new variable in options where we can define left or right and tested I was testing for column resizing. Once I am done I can create a new PR.

How is that going?
I'm little confused but can I align right only specific columns currently? Like in MUI <TableCell align="right"> works fine but how can I access specific table cells like that here in mui-datatables?
Thank you!


How to register python operator to be used in C++ calling

Is it possible to load a customized python operator in c++ while using the cpp classification example? I tried to save the net into json, but when loading in C++, it says cannot find custom operator.

i think it should not, c++ cannot call python code, you need to write it in the c++ side.

It doesn't work that way. You can only register python op from python


EegModuleMixin extension

Adding input_shape, get_output_shape, to_dense_prediction_model
Deprecating get_output_shape and to_dense_prediction_model, will be removed in version 1.0.
When we have a proper way of removing logsoftmax we may replace functions with methods everywhere.
Solve #432 with raising error suggesting that input size may be too small.

Responding to @tgnassou comment:

function get_output_shape only works for class which heritates from nn.Sequential. I would like to use it to replace the function _len_last_layer of SleepStagerChambon (https://github.com/braindecode/braindecode/blob/57280a6f870aa8cf1a1740bcbaa87f9253b39c24/braindecode/models/sleep_stager_chambon_2018.py#L120).

Actually the problem is in trying to use get_output_shape in nn.Module in a moment when part of a model that is used in forward does not exist. I don't see an easy fix. Maybe creating a method that performs forward until last fc layer can be possible and have a kind of convention how this method should be named.
@tgnassou what kind of error do you receive? maybe it would be easier to think of solution

and yes, for partially initialized models it will work only for nn.Sequential because nn.Sequential forward can be called even when all the modules are not yet added to the model.
In case of nn.Module it will be problematic to do that because parts of model do not exist and are used directly in the forward. We may think of try-exception clause in case some modules are not defined yet? but I don't think it;s worth implementing

Responding to @tgnassou comment:

function get_output_shape only works for class which heritates from nn.Sequential. I would like to use it to replace the function _len_last_layer of SleepStagerChambon (https://github.com/braindecode/braindecode/blob/57280a6f870aa8cf1a1740bcbaa87f9253b39c24/braindecode/models/sleep_stager_chambon_2018.py#L120
).

Actually the problem is in trying to use get_output_shape in nn.Module in a moment when part of a model that is used in forward does not exist. I don't see an easy fix. Maybe creating a method that performs forward until last fc layer can be possible and have a kind of convention how this method should be named.
@tgnassou what kind of error do you receive? maybe it would be easier to think of solution

@sliwy, @tgnassou, once @brunaafl will be finished with #520, the next step will be to make methods swap_final_layer and drop_final_layer that we allow to easily replace the final layer with a placeholder identity function. This way we will be able to also compute the output shape for the nn.Module!

@PierreGtch It's the convention I thought of, if we have a specific name of the last layer then it's possible


Absolute_time alignment error

Describe the bug
Absolute time in the dataframe was supposed to be aligned to go cue of first trial, but is now aligned to the start of the first trial.
To Reproduce
Steps to reproduce the behavior:
Please check this line:
https://github.com/AllenNeuralDynamics/aind-dynamic-foraging-data-utils/blob/main/src/aind_dynamic_foraging_data_utils/nwb_utils.py#L332
Expected behavior
Time is aligned to first go cue.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: codeocean, ubuntu
Browser: chrome
Version [e.g. 22]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

Oof! good catch. This is probably my fault. Lets double check to make sure we are aligning everything to the start of the first go cue, and not the start of the first trial (FIP, events, trials table)

I've tracked the line that got messed up:
    t0 = df_ses_trials.start_time[0]
    absolute_time = df_ses_trials['goCue_start_time'] - t0

closed with https://github.com/AllenNeuralDynamics/aind-dynamic-foraging-data-utils/pull/50


Move to asdf-community

Is your feature request related to a problem? Please describe.
Currently, asdf-dotnet is not as discoverable as it could be.
Describe the solution you'd like
Consider adding the plugin to asdf-community.

Just created a pull request here
https://github.com/asdf-community/infrastructure/pull/181


Shadowkin

TODO

[x] Sprites
[x] Species
[x] Name list (single word)
[x] Layers
[x] Markings

[x] No suffocation
[x] Damage modifiers
[x] Slight tint to vision (based on eye color)

[x] DarkSwap
[x] DarkSwap shader
[x] "Mar" Language (empathic chat)
[x] Teleport ability
[x] Can't interact with things unless they are Darkened
[x] Can't see non-Darkened entities while Darkened
[x] Dim nearby light

[x] Passive, slow regeneration of power
[x] Rest ability, sleep and double energy gain
[x] If power reaches zero power, blackeye
[x] Blackeye event
[x] - Remove powers
[x] - Set health just barely out of critical
[x] - Put in a stamina critical state
[x] Negative trait to instantly trigger blackeye event
[x] Visual indicator of power level

[x] Random chance to force rest when low power
[x] Accumulator with random max time to force DarkSwap if at max power too long
[x] Sounds
[x] TintIntensity based on PowerLevel

[x] PR Media

Changelog
:cl: DEATHB4DEFEAT

add: Added Shadowkin, a new playable species with several unique abilities!
tweak: Renamed "Dragonite" ears to "Shadowkin"
tweak: Slimepeople can no longer use the Shadowkin ears

Media

Videos

General demonstration

Video too big to embed
Old

Blackeye trait demonstration

Optionally view on youtube
https://user-images.githubusercontent.com/77995199/222951105-72178ab9-986d-46dc-b4d0-31d10ec336f2.mp4

Screenshots

Appearance

Markings

woops

test

me when 1/3 files get reviewed

for half of the reviews, GitHub won't let me resolve them because "You can't perform that action at this time",

funky rebasing

I love having the ability to reverse time

note to self: revert the masking things

I got no place here, but this looks cool as fuck.

That was horrible, yet thankfully super easy to clean up.


Upgrade bindgen

This crate is currently using an old version of bindgen. The API and behavior has changed significantly since then, so it'll be a bit of work to upgrade.

I would like to give this a try. Since Builder::remove_prefix was removed, are you ok with using names with the "mbedtls_" prefix, except when we reexport values?

Oh I forgot about this issue. See https://github.com/rust-lang-nursery/rust-bindgen/issues/428 . I'd really like to automate this since I'm not a big fan of having to use the prefixes everywhere.

I worked on this issue in the last few days, here is a status update on my progress so far. I would like to discuss potential approaches to deal with issues I encountered. You can find my work branch at https://github.com/ekse/rust-mbedtls/tree/bindgen-upgrade.
First, a quick note on why I want to upgrade. The current master branch does not compile on my computers, it fails with the error Bindgen ERROR: unsupported type CXTypeKind(119). Upgrading bindgen fixes this issue. I get this build error on libclang 3.9, 4.0 and 6.0.
"mbedtls_" prefix
To deal with the "mbedtls_" prefix, I tried the approach suggested by the bindgen maintainer to rename the imports with use x as y statements. To reduce the amount of boilerplate,  I experimented with creating a procedural macro "mbedtls_use" https://github.com/ekse/rust-mbedtls/tree/bindgen-upgrade/mbedtls-use. An example use of this macro looks like this: (https://github.com/ekse/rust-mbedtls/blob/bindgen-upgrade/mbedtls/src/cipher/raw/serde.rs#L24)
#[mbedtls_use]
use {
    mbedtls_aes_context, mbedtls_cipher_context_t, mbedtls_cipher_id_t, mbedtls_cipher_mode_t,
    mbedtls_des3_context, mbedtls_des_context, MBEDTLS_CIPHER_ID_3DES, MBEDTLS_CIPHER_ID_AES,
    MBEDTLS_CIPHER_ID_DES, MBEDTLS_MODE_CBC, MBEDTLS_MODE_CFB, MBEDTLS_MODE_CTR,
};

There are a couple downsides to this approach. Procedural macros were just stabilized in Rust 1.30, that would make it a hard requirement. Also, the use statements are not in scope when using macros like define!, so I used the full type names (see https://github.com/ekse/rust-mbedtls/blob/bindgen-upgrade/mbedtls/src/pk/ec.rs#L19).
Alternatively, we could remove the proc_macro and write the complete use x as y statements, at the cost of longer use statements.
unsigned constants
The second issue I encountered is with constants. Bindgen defines constants such as MBEDTLS_SSL_IS_CLIENT as u32. This fails to compile for define! statements that map to c_int as it maps to i32. I assume the older version of bindgen defined those constants as i32.
error[E0308]: match arms have incompatible types
  --> mbedtls/src/wrapper_macros.rs:75:5
   |
75 |                   match self {
   |  _________________^
76 | |                     $($n::$rust => ::mbedtls_sys::$c,)*
   | |                                    ----------------- match arm with an incompatible type
77 | |                 }
   | |_________________^ expected i32, found u32
   |
  ::: mbedtls/src/ssl/config.rs:62:1
   |
62 | / define!(enum UseSessionTickets -> c_int {
63 | |     Enabled => MBEDTLS_SSL_SESSION_TICKETS_ENABLED,
64 | |     Disabled => MBEDTLS_SSL_SESSION_TICKETS_DISABLED,
65 | | });
   | |___- in this macro invocation

Also, some getters and setters fail to compile because enums do not implement From conversions for i32 (because values in u32 could be outside the range of i32).
setter!(set_session_tickets(u: UseSessionTickets) = mbedtls_ssl_conf_session_tickets)

error[E0277]: the trait bound `i32: std::convert::From<ssl::config::UseSessionTickets>` is not satisfied
   --> mbedtls/src/wrapper_macros.rs:192:50
    |
192 |             unsafe{::mbedtls_sys::$cfn(&mut self.inner,$n.into())}
    |                                                           ^^^^ the trait `std::convert::From<ssl::config::UseSessionTickets>` is not implemented for `i32`

I temporarily worked around this by manually defining the constants as i32, and the crate successfully compiles at that point. To could be an approach to deal with this issue, I'm not sure what the best way to do that with bindgen would be.

Sorry for the long message, it seems upgrading the bindgen dependency will require a good amount of effort. I suggest we decide on a way to deal with the mbedtls_ prefix issue and move on from there.
Thanks,
Sébastien

prefix
If you take a look at the latest comments at https://github.com/rust-lang-nursery/rust-bindgen/issues/428 it seems to me that reimplementing remove_prefix shouldn't be too hard. That would have my preference over procedural macros.
constants
I think it should be pretty easy to replace the current macro_int_types configuration with an appropriate ParseCallbacks::int_macro implementation.

Thanks for the reply, I had not seen the reply on the bindgen issue. I implemented an item_name` callback and it is now merged in the master branch of bindgen.
I pushed a new branch with your suggested approaches, the changeset is now much much smaller.
https://github.com/fortanix/rust-mbedtls/compare/master...ekse:bindgen-upgrade-v2
client_server_testis failing with X509CertVerifyFailed on the client. I will try to figure out why.

Haha I found it: The certificate is expired, the expiration date is '16 Aug 2016'.

@ekse any progress? Do you need help figuring anything out?

I opened a pull request (#13) to replace the expired certificate in the tests.
For the bindgen upgrade, I was waiting for a new release of bindgen. I asked the maintainers today if they could make a new release. My branch currently compiles and all the tests are passing, it depends on the git repository of bindgen at the moment, so once the bindgen crate is updated it will be ready for a pull request.
https://github.com/fortanix/rust-mbedtls/compare/master...ekse:bindgen-upgrade-v2

This is also necessary for the docs to show up properly on docs.rs

With recent nightly, the version of syntex-syntax pulled in by bindgen 0.19 fails to compile.
In some months, that nightly behavior will become stable at which point mbedtls crate will be broken :(
@jethrogb it seems like #14 is stalled on unresolved bindgen bugs. It is possible we can move to some intermediate version of bindgen to avoid the compilation problem but without hitting the bugs in more recent bindgen?

No, we are on the latest possible bindgen. It works if you patch syntex_syntax to 0.40 and disable deny(warnings)

Hello, I was trying to use this library but had trouble compiling it. Using the changes in #102 I everything compiled and it works fine. What is the reason that issues has been idle for so long? Are there problems with the fixes in #102. In that case I would be glad to help to resolve them.

Hi folks. I also tried to use this library on windows, have been able to use it thanks to #102. As @nouwaarom, I also would be glad to help if anything is required to merge this fix.

Hi folks. I also tried to use this library on windows, have been able to use it thanks to #102. As @nouwaarom, I also would be glad to help if anything is required to merge this fix.

I echo the previous requests. This is too much of a problem to be left unfixed (I came here because this breaks fortanix sgx sdk tls example, so you can imagine).
Let me know if there is help required with this.

Final PR: #152


Make proper link in notification

Hi,
when clicking on "Open app" in a kresus notification ("x operations imported"), it would be nice to directly go to the given account if possible.

That's a good idea. It needs full routing of the client app first, which is a kinda big task.

Reopening, that wasn't the issue that was actually fixed by your PR.

Indeed


Remote integrity check

Is it possible for a renter to ask hosts to check file integrity? I realize I can download the file and check myself, but it is costly in traffic.

The host can tell you that the file is fine, but you'd just have to take their word for it.
The only way to verify integrity is to download some data and run the checksum. Right now, the best you can do is download a single sector (4 MB) and calculate its Merkle root. The protocol supports this, but it's not integrated into the Sia client yet. We have plans to eventually run such checks regularly and penalize hosts who fail the check.

I think client can provide a key, ask a host for hmac(key, file) and compare the result?
Downloading the single sector is a nice idea!

I think that is true; however, it means that the client would have to store the HMAC in advance. As such, you would only be able to check each sector once (or rather, once per uniquely-keyed HMAC for that sector), since after the first check the host could store the HMAC and throw away the data.
I'll talk to @DavidVorick about this though, since it could be a good way to implement integrity checks without having to transfer the full 4MB.

Recommendation to devs: "Feature Request"


Upgrade warning about cachekey behavior

Fixed the "receives".

[approve ci]

[approve ci autest]


"dubbo.service.shutdown.wait" does not be loaded to override the default value

[ ] I have searched the issues of this repository and believe that this is not a duplicate.
[ ] I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.7.8
Operating System version: macos
Java version: 1.8

Steps to reproduce this issue

use the "dubbo-samples-zookeeper" project
add "dubbo.properties" in the spring directory

add dubbo.service.shutdown.wait in the dubbo.properties

4、kill -15 the project's process
5、the log print "Waiting 10000ms for registry to notify all consumers before unexport"。
always use the default value

是我提问方式不对么，怎么没人答复额

The path of dubbo.properties is wrong. The default path is under the resource path. The dubbo.properties in spring will not be automatically scanned by the system, and SPI needs to be customized

org.apache.dubbo.common.utils.ConfigUtils#getProperties

ok thanks


Lacking APKs in releases

For the versions up to 1.13.1 the releases page contains three APKs including the phone and watch apps. For 1.14.0 and 1.15 alpha, however, there is only the settings app

Play market also shows the 1.13.1

I've added the apks for v1.14.
v1.15 will be added once its fully released


NIFI-13352 Adjust Shutdown handling in ListenOTLP and Test Class

Summary
NIFI-13352 Adjusts shutdown handling in the ListenOTLP Processor and associated test class to mitigate intermittent test failures related to socket connections.
Changes include shortening the shutdown quiet period for the ListenOTLP HttpServerFactory to avoiding waiting 2 seconds before closing the listening socket, instead waiting 100 ms. Changes to the test class include calling TestRunner.stop() in an AfterEach method to proactively close listening sockets.
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking

[X] Apache NiFi Jira issue created

Pull Request Tracking

[X] Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
[X] Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

[X] Pull Request based on current revision of the main branch
[X] Pull Request refers to a feature branch with one commit containing changes

Verification
Please indicate the verification steps performed prior to pull request creation.
Build

[ ] Build completed using mvn clean install -P contrib-check

[ ] JDK 21

UI Contributions

[ ] NiFi is modernizing its UI. Any contributions that update the current UI also need to be implemented in the new UI.

Licensing

[ ] New dependencies are compatible with the Apache License 2.0 according to the License Policy
[ ] New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

[ ] Documentation formatting appears as expected in rendered files

+1 pending build results.

ShutdownQuietPeriod.QUICK.getDuration() changes from the default of 2 secs to much faster which is better in test and related environments like this.  Nice!


ColdFusion (CFML) - Last Line Comment Getting Removed

Description
The results of beautification are not what I expect. It removes the final end comment tag (Which for CFML is a '--->' string). If the file does not end in a comment it does not cause issues, but when it pulls this out it results in a 500 error for the whole page. @prettydiff as I see you are pretty active here and this package is using your code for CFML. Thanks!
Input Before Beautification
This is what the code looked like before:
...
</cfoutput>
</table> --->

Expected Output
The beautified code should have looked like this:
...
</cfoutput>
</table> --->

OR

...
</cfoutput>
</table>
--->

Actual Output
The beautified code actually looked like this:
...
</cfoutput>
</table>

Steps to Reproduce

Add code to Atom editor
Run command Atom Beautify: Beautify Editor
This beautified code does not look right!

Checklist
I have:

[x] Tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
[x] Reloaded (or restarted) Atom to ensure it is not a caching issue
[x] Searched through existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues
so I know this is not a duplicate issue
[x] Filled out the Input, Expected, and Actual sections above or have edited/removed them in a way that fully describes the issue.
https://gist.github.com/Jaredra/e7de28a489bb60189914e7fcc92e7a18

Please submit the required debug.md file to a gist before we can assist you.

https://gist.github.com/Jaredra/e7de28a489bb60189914e7fcc92e7a18
Sorry about that, first time using git and wasn't aware of the protocol. I assume this is acceptable for both issues?

I am having trouble reproducing this issue at all.  Would you be able to provide a small code sample that demonstrates this problem?

Yep, just narrowed it down to nested comments. Running Beautify on this code will remove the last ending comment tag:
`<!---

--->`

I can reproduce the defect in the older version of Pretty Diff that is currently in Atom Beautify, but not in the latest version.  At some point I must have fixed this.... probably by accident.
Really, though, nested comments shouldn't work in practice.  So, I would recommend adjusting your code.  The parsing rules for markup stipulate that once a code comment is opened it runs until either the comment closes or the end of file is reached.  In this case the first line opens a comment and the third line closes it.  The second line is merely contents of the one comment and the fourth line is just text in HTML and a well-formedness violation in XML.

I see what you are saying and that definitely makes sense. The only pragmatic argument I can provide against that is when you are coding something, including semantic comments along the way, and then need to debug/comment out a block for whatever reason. But I can work around this one now that I'm aware of it.
Thanks again for looking into this, you sir are a godsend.

Thank you for contributing (and the kind words).


Add validation check for find command input

Fixes #155
Add regex validation for Age and Gender criteria in find command input.
Todo: Find command does not handle invalid input. Refer to #157.

LGTM


Gitea Solution Package

Child of https://github.com/threefoldtech/home/issues/409
flist: https://hub.grid.tf/nashaatp/gitea.flist.md
models
@url = tfgridsolutions.gitea.instance.1
@acl = false
name** = ""
description = ""
state = "INIT, OK, ERROR"

Note: I think we should add deployment info as well on the model
actor (gitea)

getall: lists all the deployed instances of igtea
chatbot_install_url_get: get solution deployment chatbot url
wiki_solution_doc_url_get: solution wiki url
chatbot_recovery_url_get: TBD
delete: deletes a certain instance
monitor_up: check if the solution is up & running (specific to the application)

Chatflows
Ask user for the following:

Instance title: str
Admin username: str
Admin userpassword: password
Admin email: str

later Ask for postgres instance to use (let's use local postgres bundled with the flist for now)

After successful reservation we should have a container IP or/and create a domain for the instance to use as the ROOT_URL

Launch the flist flist url with

environment variables

POSTGRES_DB: gitea
DB_TYPE: postgres
DB_HOST: localhost:5432
DB_USER: postgres
DB_PASSWORD: postgres
APP_NAME: Instance title from chatflow
ADMIN_USER: Admin username from chatflow
ADMIN_PASSWORD: Admin password from chatflow
ADMIN_EMAIL: Admin email from chatflow
ROOT_URL: IP or domain

@despiegk Do you have any comments regarding gitea solution?

Fixed some issues in the loading of the gitea chatflow package and added initial user input in the chatflow.
https://github.com/threefoldtech/jumpscaleX_threebot/commit/0b5da2e15c351c89a9bff3650111b06f38753fc0

duplicate of https://github.com/threefoldtech/home/issues/544

duplicated of https://github.com/threefoldtech/home/issues/544


house keeping fyi - error: /Users/philprice95/Documents/iOS/phixer/XMP/convert.sh: No such file or directory (in target 'phixer' from project 'phixer')

the XMP folder is hard coded to your user path.
also you can use this commit
pod 'ChameleonFramework/Swift', :git => 'https://github.com/wowansm/Chameleon.git', :commit => "96d52c36a45847fff60bcff7a58fec1e4bd7390b"
to get swift 5 version.
Hi Peter -  Did you ever have any interest in creating some code to do  stuff like snapchat filters / lenses?
The facebook / insta / snap are all closed off from importing into app.
Your repo seems like the closest attempt to getting something going.
Did you see AR Spark?
https://sparkar.facebook.com/ar-studio?utm_source=Google&utm_medium=PaidSearch&utm_campaign=**LP+-+TM+-+Spark+AR+-+HV+-+AU&utm_adgroup=AR+Spark&utm_keyword=ar spark&utm_offering=AR&utm_Product=ARStudio&gclid=EAIaIQobChMIjdb6yZLI5QIVGCQrCh2o-AW5EAAYASAAEgIN8vD_BwE
This is some config file for snapchat lense pear_face
https://github.com/DeltaTheWolf/app-update-tracker/blob/cd6f0ed5cafa8cffaa148fe0fc5d16cfdec54a15/Snapchat/assets/looksery/lenses/content/pear_face/config.json
Quite a good talk on facebook filters.

https://docs.google.com/presentation/d/1nZoVRFs75v4cv6AICxZEiqDXMNGoVLDzWnRcJAcKT_k/edit#slide=id.g5dd68e1a3c_5_59

Folder reference has been changed and I'm using the 'swift5' branch of Chameleon.
Note that I intend to remove Chameleon and just use the built in light/dark theme colours (which are now exposed).
I haven't looked at snapchat or facebook. There are several presets based on Instagram already there (see collection Instatastic) and VSCO (see VSCO-like). Once I clear my current backlog, I'll take a look.

you've done an amazing job.
checkout ios app - https://apps.apple.com/au/app/vue-video-camera-and-editor/id1458609369
Your presets > 500 makes that app look silly.


experimental 4player Counter / Co-Operative

4 player pvp missions

known issues

coop + anti is still janky
dark rooms + NVG or x-ray vision may be a flashing light hazard

goals
Want to play 4player coop / anti with a mix of coop / anti team characters
No recompiling of ailists. Should "just work" with vanilla levels and well-formed mods.
Load mp profile for coop / anti characters for controller / hud settings / "leveling"
non-goals

Custom characters as coop characters (for now)
Fixing non-breaking n64 bugs beyond what is required
adding coop / anti support for levels not built for it
adding anti support to mp ailists commands that don't use it in retail until modders who actually make levels also weigh in on how they should work

background
In Vanilla PD,  'coopness' or 'antiness' of a PD session is controlled by setting g_Vars.coopplayernum and g_Vars.antiplayernum This is used to determine if coop or anti is running, and what player index to use. Also, coop / anti logic is mutually exclusive.
approach
Porting PD to 4 player local coop/anti requires is set via g_MissionConfig.isteam that allows players to join a solo mission as a team of coop or anti characters.
g_MissionConfig.isteam is set to true when the mission is a team mission.
g_Vars.playerroles is used to track player role constants against player slots. This is used by playermgrAllocatePlayersFromRoles to initialize the player slots and various control variables.
g_Vars.currentplayer is the current player struct.
g_Vars.players : player structs for all players.
g_Vars.currentplayernum is the current player number
g_Vars.coopplayers : player structs for coop players. The bond slot is set to 0 as well as the anti players.
g_Vars.currentcoopnum is the current coop player number. On each frame the coop player is set to the next coop player struct that exists.
g_Vars.coop: current coop player struct
g_Vars.currentantinum is the current anti player number. On each frame the anti player is set to the next anti player struct that exists
g_Vars.antiplayers : player structs for anti players. The anti index is set to 0 as well as the coop players.
g_Vars.anti: current anti player struct
In order to gaurentee that ailist commands that are intending to reference CHR_ANTI, CHR_COOP, and CHR_P1P2/CHR_P1P2OAIlist commands referencing CHR_COOP or CHR_P1P2 will be treated as any or all coop / ally chaaracters.
limitations

scripts targeting CHR_COOP or CHR_P1P2 will need to be treated as any or all ally characters.
This means that mission-related hud messages intended for one coop character will be sent to them all.

acknowledgements

borrowed fixes from @iamgreaser's 4player anti effort: merging the tiktok mode hud settings into 4p, correctly spawning 4 players into a mission
@fgsfdsfgs  / Ryan Dwyer for the pc port / decomp but specifically reviewing the scheduling logic and talking me down from attempting any kind of live ailist reinterpretation.

I'm having a look at the ailists for a hopefully cleaner solution and it's starting to look a lot more feasible than I thought it would.
Having said that, having a list of all anti and coop players is a nice idea. Not sure how tempted I am to borrow that idea, but I do intend to have something working to the point where you'd have co-op and counter-op stuff happening in the same game mode.
Something you'll want to consider is the CHR_P1P2 reference and the chr_toggle_p1p2(CHR_SELF) command. If you cycle through all protagonist players then I suspect that would tackle the most general cases. But there will definitely be plenty of pain especially pertaining to objectives being failed in situations where they should not be, and also stuff appearing and disappearing while visible to some of the extra co-op players.

Cycling  the "current coop" player and basing the p1p2 toggle calculation based on MAX_PLAYERS and the current coop number number does make most things work. Like @fgsfdsfgs suggested CHR_COOP / CHR_P1P2_OPPOSITE references in the if_chr_.*(chr,[... ,] label) should check for all the other coop characters (when p1p2_opposite isn't bond) so the ailist can make the appropriate jump. Right now non-bond characters need to tap the use button repeatedly for some ailist scripted objects like lifts and objective items because of the coop cycling. Also the surveillance cameras take a long time to notice non-bond players.

I have no clue who came up with 'Build Your Perfect Team", but I love it so much. This is not only extremely cool on a technical level, but on a creative one as well.

Happened while fiddling with the menu options, going back and forth, then crashed :P

Happened while fiddling with the menu options, going back and forth, then crashed :P

Pretty sure I've seen this while trying to get controllers setup.

Happened while fiddling with the menu options, going back and forth, then crashed :P

https://github.com/fgsfdsfgs/perfect_dark/pull/389/commits/cf75ba31b05d9dbfc45b082f80f0af448b4d585b should fix it if it's the same issue I encountered.

[ ] BUG: vanilla allocation flow disabled and this breaks vanilla campaign flows

I am unable to build this for some reason :(
I do admit I have no fuggin clue what I'm doing. But still, I was so excited to try this out.

I am unable to build this for some reason :(
I do admit I have no fuggin clue what I'm doing. But still, I was so excited to try this out.

 I'll take a look when I'm on my computer next.

I'm closing this PR and taking it private until it's in a more stable state.

Thanks for having a look at it. I wish I had any sort of knowledge to help. I'm trying to learn.


Add shift-add and shift-delete commands and make commands case-insensitive

Resolves #10
Resolves #12
Resolves #15
Test cases will be added in future commits

Codecov Report

Merging #42 into master will decrease coverage by 1.49%.
The diff coverage is 0.00%.

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 71a0809...fd40fe7. Read the comment docs.

Currently, the shift-add and shift-edit commands do not support role requirements that uses spaces (e.g. Fry Cook) #44


Add CONTRIBUTING.md

Click on the link here to see an example.
Ground rules:

Whoever claims the Issue first, should send a Pull Request within 24 hours else it'll be assigned to another claimant and further Pull Requests regarding that issue will not be entertained.
Pull Requests sent without claiming and referencing the Issue will not be entertained.
Make sure your Pull Requests have just one commit in them. Squash multiple commits into one if you have to.

I claim this

i claim

Go ahead! Send a Pull Request.


medicationuse and medicationadministration both have 'agreed indicator' can we use same extension?

medicationuse and medicationadministration both have 'agreed indicator' can we use same extension?
note: initially the 'agreed indicator' in medicationadministration was named 'deviating administration' but since that really meant the same thing but with a reversed boolean, it has been decided to create unity over these two building blocks.
note: the current extension has a specific name for medicationUse, which should be generalised if this change request is accepted.

Same extension is used in mp-profiles.


Thank You Thank You Thank You a Question; Perhaps an issue; Perhaps not

Hi,

thank you.  I nearly wept when I saw this.  Its already made my life easier.
I'm dealing with a new app using action cable and the level of cruft that action cable introduces into logs makes me want to weep.
My thinking was that per controller log files would give me the ability to deal with action cable or not but I don't see a clear way to implement that using rails_semantic_logger.  I've looked into appenders but dropping one at the start of a controller(SemanticLogger.add_appender(file_name: 'api_controller.log')  just creates a file; it doesn't put anything there.  Do I need to work at the Rack level if I wanted the output of semantic logger to end up at its own log file?  I don't yet know how closely you work with rack (or not).

Thanks again.
Scott

I need to research this more before I bother you.  Sorry.

Rails semantic logger is a global logging system where all logging goes to a central logger.
A great way to reduce noise is to add a filter to the file logger appender that excludes any controllers of your choice, or a combination of controller and/or message.
Raising the log level on a per controller/class basis is another way to quiet down a noisy module.
If you have an example of the log output you want to reduce after adding rails semantic logger, add it here and re-open this issue. Then we can work together to remove the noise.
Keep in mind that if it annoys you, it very likely annoys a lot of other people too.

Quick question, how do I add a filter in rails_semantic_logger? - I found http://rocketjob.github.io/semantic_logger/filtering.html - but what do I put in my production.rb file exactly?
Something like this? <
config.rails_semantic_logger.filter = Proc.new {|log| log.message !~ /\A\*\*\* Checking/ }

The above example is a great idea. Added a commit to master to add this exact feature, so if you can point to github master it should work with your example above.
For now this only affects the File output appender. Most production implementations run with the --quiet switch so that stdout logging is disabled in production.
I.e. The above change will not affect the stdout logger, there are other ways to modify the additional stdout logger. Maybe there is a way to make the stdout logger configurable: https://github.com/rocketjob/rails_semantic_logger/blob/master/lib/rails_semantic_logger/extensions/rails/server.rb#L8
Without using the latest code from master, this temporary workaround can be used to set the filter in a rails initializer. For example: config/initializers/semantic_logger.rb:
Rails.application.config.after_initialize do
  if Rails.env.production?
    SemanticLogger.appenders.first.filter = Proc.new {|log| log.message !~ /\A\*\*\* Checking/ }
  end
end

Wow, that's fantastic, thank you for implementing this so quickly :)


are there tags / branches planned for versioning?

It would be useful to have tags with alpha/beta releases of LightGBM, so that projects that clone this repository can easily choose which version to checkout.
Right now I am using commit hashes, which is a bit cumbersome. Are there plans for the next release, and tagging it with a meaningful tag?

@cbecker good suggestion. I will try to make it.


Notification even the app is killed

I'm currently making a TODO app and i save the date that the user has to do a thing. Lets say that he saves the date 28-7-2016 to do something, i make another collumn tobenotified and i take the date minus it by 1 and save it, so the user should be notified the previous day that tomorrow has a thing to do.
But what if the user has closed the app(killed it), how is the proper way to send a notification from realm database when the date tobenotified is equal with NSDate() the current date ???

I saw your question over on StackOverflow and answered over there. That was already the right location to ask. :+1: Closing this issue here.


cloud shell

To Reproduce
Commands you ran

Observed Behavior
Include error output here

Expected behavior
A clear description of what you expected to happen instead.
Is this specific to Cloud Shell?
Please verify if the same issue can be reproduced by running the same tool outside Cloud Shell - for example,
by installing it on your own computer. If so, it is likely to be a bug in that tool or in the Azure service it communicates with,
not in Cloud Shell. Please file the issue with the appropriate project.
Interface information
How are you accessing Cloud Shell - https://shell.azure.com, https://portal.azure.com, via Windows Terminal, or some other method?
If a browser, which Operating System and browser are you using? (ex. Edge on Windows 10)
Additional context
Add any other context about the problem here.

@mnoo4577 you haven't actually explained what the problem is. You need to fill in the form, not just submit it as-is.


wrappers: body factorisation to reduce bundled code size

This patch reduce the overhead of module import. Very usefull when the bundle require a lots of small files.

Merged circumventing the fname problem entirely.


fix OPTIONS endpoint with the xml formatter

OPTIONS should return no body, thus we need to skip the error handling for that method.

This seems iffy to me. I looked at the JSON formatter and it will never throw anything. If you don't have a body to return it shouldn't try to format it IMO, maybe that's a better fix?

None of the other formatters raise an error.. I'm not sure why the XML formatter does.

This issue has been aggravating me for a while as OPTIONS requests raise 500 errors because the formatter tries to format an empty string.    This raising of an exception was originally added in commit 11576c8b
My fix, allows the behavior created in that commit to remain while allowing OPTIONS requests to properly work.

I don't think this is the right fix, more like a hack, so I can't merge it. We need definite behavior for empty strings and the XML formatter, it needs to be understood and unambiguous.
With JSON it's clear: you can return an empty string and you can return a nil object.
1.9.3-p551 :002 > ''.to_json
 => "\"\""
1.9.3-p551 :003 > nil.to_json
 => "null"

What should it be in XML?

The OPTIONS request should have no body.. So what you define for the XML formatter for GET/POST/PUT/,etc..   need not apply to the OPTIONS request.   the only reason this issue is happening is that browsers (testing Firefox) will sent a standard accept header which included xml but not JSON, so grape jumps to XML as the response type.

I agree with you, but it's beyond the point. Are you still saying this is the proposed fix?

This fixes the issue by leaving the XML handling alone for non-OPTIONS requests. and fixes the OPTIONS now, which shouldn't have any body.
I've adjusted my fix slightly so that it only applies the fix if there is no body for OPTIONS.  That way if someone overrides the OPTIONS request and returns a body (reserved for future use according to the RFC) then it'll work correctly.

Sorry, but a fix that checks the verb used in the request in a formatter is definitely not something I can take into Grape. I understand it fixes your particular scenario, but it's not the right solution. There's at least another scenario where the same problem surfaces in a totally different way.
I am going to close this without merging. Lets move this into https://github.com/ruby-grape/grape/issues/1162 and discuss what the right solution would be? I am here to help.

Closed via https://github.com/ruby-grape/grape/pull/1190


Question: how to increase speed in a rather complicated situation

I tried to find an answer to my problem for so many hours that I had to seek help from you :) My situation is a little bit complicated, but I will try to explain it as best as I can.
I have a Laravel 7 application which implements the package yajra/laravel-datatables 9.
What I am trying to achieve, and where I am now:
I have 3 tables: users, users_info and user_merges. I try to retrieve in a DataTable all the users from the database along with some data about them that is found in the other two tables. What I've done at first was an Eloquent query finished with get(), I've done the necessary actions on the result (like adding the rows from the other tables, these can get complicated, I don't think they are doable as queries) and then I return everything with DataTables::of($result)->make(true).
This works well, but as you can probably imagine, every time I do any action on the table like sort, change page, search etc. all the data is retrieved, not only the data I need for the respective page, then the actions are done, then the package returns only the data for that page. This means that when I have a lot of data (about 100.000 records), and I want for example to change the page, it takes a lot of time...
What I want to achieve is to speed up this process by a lot, because right now with a large number of data, it is unusable. What I've found is that it is better to give the package the query, and not use get(). And here come the multiple problems.
$users = $project->users()
                                ->whereIn('id', $users_teams)
                                ->whereNotIn('id', $users_merges)
                                ->select('id', 'name')
                                ->with(['mergedUsers' => function ($query) use($project) {
                                    $query->where('project_id', $project->id)->select('project_id', 'user_id', 'primary_id');
                                }]);

            $dataTable = DataTables::of($users)->make(true);
            $response = $dataTable->getData(true);

            $response['data'] = collect($response['data'])->map(function ($d, $d_key) {
                //stuff that has to do with data like: if column "name" in users_info table is null, then take the column "name" in users table, if it is empty there, then use the email from table users and so on... the resulting value will be called "final_name"
                return $d;
            });

            //Here I do my customized filters.
            if(!empty((array)$advanced_filters)) {
                $response['data'] = $this->applyFilters($response['data']->toArray(), $advanced_filters);
            }

            return $response;

The problems are the following:

with this query I can not sort/search on the new "final_name" field, because it is not in the query
because the pagination and all DataTables variables are set at first, after I apply my custom filters, they work, but the results are shown across multiple pages, even though they would fit on one page

For the first problem, I've tried using accessors (but I can't use them without get() to order and search on query, so it defeats the purpose), I've tried making a join on users with users_info but it did not work (I suppose because it was already on a join/relationship).
For the second problem, I've tried to somehow do a DataTables::of($response['data'])->make('true'); after I apply the filters, but it doesn't seem to work. (in filters logic I just remove the ones that don't respect de filters)
Any idea what I can do? Or how can I optimize the speed of this? The query route has made me lost a lot of nights...
I hope I've explained this well enough. Thank you so much in advance!

with this query I can not sort/search on the new "final_name" field, because it is not in the query

The only way for this to work is have a custom query that will handle this field. You  can use filterColumn or any laravel way to query a field.

because the pagination and all DataTables variables are set at first, after I apply my custom filters, they work, but the results are shown across multiple pages, even though they would fit on one page

Are you using query or collection? I think you're mixing things up since you parsed the dataTable response. I suggest you let the package to handle to column transformation via addColumn, editColumn, etc.
$users = $project->users()
    ->whereIn('id', $users_teams)
    ->whereNotIn('id', $users_merges)
    ->select('id', 'name')
    ->with(['mergedUsers' => function ($query) use($project) {
        $query->where('project_id', $project->id)->select('project_id', 'user_id', 'primary_id');
    }]);

return DataTables::of($users)
  ->editColumn('name', function($user) {
    return $user->info->name ?? $user->name;
  })
  ->toJson();

The only way for this to work is have a custom query that will handle this field. You can use filterColumn or any laravel way to query a field.

Sadly I have some actions that would require a really complex query, but I could try to make something out of it.

Are you using query or collection? I think you're mixing things up since you parsed the dataTable response. I suggest you let the package handle the column transformation via addColumn, editColumn, etc.

What I was trying to achieve was a combination of them. I needed to use query because I heard it was faster. And I wanted all columns to be searchable/sortable. If I'm not wrong, with the editColumn the values do indeed change and the sorting and searching work, but they are made on the initial value, not on the edited value resulted from editColumn, which is not something that I would want.
I even tried to do DataTables::of(query) then I do something with the result then DataTables::of($result) but it doesn't seem to work either. Maybe it makes sense that it doesn't work this way.
Thank you for your time, really appreciate it.

One other question I have is: is filterColumn safe with SQL injection. Let's say I write something like in the example from the docs, if the keyword is something harmful, is the data safe?

is filterColumn safe with SQL injection?

Yes, if you will follow the correct way of binding the values. It will depend on your implementation.


I want to ask a question!!!!

What is the estimated gas fee for 100 times on the mainnet?

I did it on the testnet just now: https://goerli.etherscan.io/tx/0x4d6104f265348f9a160d1204f1fd9dd07c061a063bf562b5565991bc0851bbf8
it costs 9690299 gas.
As for mainnet, you can use “cost = gas*gasPrice” to calculate or look up to this address as a reference: 0x7191a185b43e4d55c53cec0f32670e3b2590bfbd

What is the estimated gas fee for 100 times on the mainnet?

I did it on the testnet just now: https://goerli.etherscan.io/tx/0x4d6104f265348f9a160d1204f1fd9dd07c061a063bf562b5565991bc0851bbf8
it costs 9690299 gas.
As for mainnet, you can use “cost = gas*gasPrice” to calculate or look up to this address as a reference: 0x7191a185b43e4d55c53cec0f32670e3b2590bfbd

Do I need to set the gaslimit manually?

Do I need to set the gaslimit manually?

you can set it mannally or use estimateGas rpc endpoint.


PGP SIGNED MESSAGE content gets flagged

Description
My service accepts PGP SIGNED MESSAGE text files to be uploaded via HTTP POST. Looks like the \r\n required by PGP ascii armored file specification gets flagged. The digital signature part also seems to get flagged somehow.
Audit Logs / Triggered Rule Numbers
[Fri Sep 04 05:06:51.532088 2020] [:error] [pid 21278] [client IP:PORT] [client IP] ModSecurity: Warning. Pattern match "[\\\\n\\\\r]" at ARGS_NAMES:-----BEGIN PGP SIGNED MESSAGE-----\\r\\nHash: SHA512\\r\\n\\r\\nProduct: FileBot\\r\\nNAME: adam\\r\\nEmail: EMAIL\\r\\nOrder: P17245884\\r\\nIssue-Date: 2020-08-26\\r\\nValid-Until: 2021-09-02\\r\\n-----BEGIN PGP SIGNATURE-----\\r\\n\\r\\niQEzBAEBCgAdFiEEc1MV/TP2QOyyCr5UyhKNCCTOINkFAl9GZeEACgkQyhKNCCTO\\r\\nINl eAf/bRZ8hwNds8tPaPOWTWXdYS1PrEnGCvuDWlb07NV14JlhuqL7JQaDJ9KH\\r\\nFeiUzDG/JbncmBIRRFVG rGdMBmt8OCnj1yW8QardcHvBz/5A4NOIUZweijFejvb\\r\\n8NDXZ4NxU4BrbGGROG7OLW/R26ELLpgBuLZbG5/NDD6R/QEJmBnvNtUfMOBEn64I\\r\\n6nNqO4WH3cVq4qSv/ApVU/Iek8vXbXHE/nC/A8lcX8pphyLV9nCEST3XeqgjR0HP\\r\\n696Po qyH3XPzDrDRZ1JdqsxF5HDFSHlmcDY0OCl7e8 ekXuTg1wA3m975Adyqis\\r\\n3LPWsdKTuBdbuK LwJmZHbIt01WbKg. [file "/dh/apache2/template/etc/mod_sec3_CRS/REQUEST-921-PROTOCOL-ATTACK.conf"] [line "171"] [id "921150"] [msg "HTTP Header Injection Attack via payload (CR/LF detected)"] [data "Matched Data: \\x0d found within ARGS_NAMES:-----BEGIN PGP SIGNED MESSAGE-----\\x5cr\\x5cnHash: SHA512\\x5cr\\x5cn\\x5cr\\x5cnProduct [hostNAME "HOST"] [uri "/verify/P17245884"] [unique_id "X1It2@kyOZuAIv3a6OjZ0gAAAAs"]
[Fri Sep 04 05:06:51.533329 2020] [:error] [pid 21278] [client IP:PORT] [client IP] ModSecurity: Warning. Pattern match "(?i)(?:;|\\\\{|\\\\||\\\\|\\\\||&|&&|\\\\n|\\\\r|`)\\\\s*[\\\\(,@\\\\'\\"\\\\s]*(?:[\\\\w'\\"\\\\./]+/|[\\\\\\\\'\\"\\\\^]*\\\\w[\\\\\\\\'\\"\\\\^]*:.*\\\\\\\\|[\\\\^\\\\.\\\\w '\\"/\\\\\\\\]*\\\\\\\\)?[\\"\\\\^]*(?:m[\\"\\\\^]*(?:y[\\"\\\\^]*s[\\"\\\\^]*q[\\"\\\\^]*l(?:[\\"\\\\^]*(?:d[\\"\\\\^]*u[\\"\\\\^]*m[\\"\\\\^]*p(?:[\\"\\\\^]*s[\\"\\\\^ ..." at ARGS_NAMES:-----BEGIN PGP SIGNED MESSAGE-----\\r\\nHash: SHA512\\r\\n\\r\\nProduct: FileBot\\r\\nNAME: adam\\r\\nEmail: EMAIL\\r\\nOrder: P17245884\\r\\nIssue-Date: 2020-08-26\\r\\nValid-Until: 2021-09-02\\r\\n-----BEGIN PGP SIGNATURE-----\\r\\n\\r\\niQEzBAEBCgAdFiEEc1MV/TP2QOyyCr5UyhKNCCTOINkFAl9GZeEACgkQyhKNCCTO\\r\\nINl eAf/bRZ8hwNds8tPaPOWTWXdYS1PrEnGCvuDWlb07NV14JlhuqL7JQaDJ9KH\\r\\nFeiUzDG/JbncmBIRRFVG rGdMBmt8OCnj1yW8QardcHvBz/5A4NOIUZweijFejvb\\r\\n8NDXZ4NxU4BrbGGROG7OLW/R26ELLpgBuLZbG5/NDD6R/QEJmBnvNtUfMOBEn64I\\r\\n6nNqO4WH3cVq4qSv/ApVU/Iek8vXbXHE/nC/A8lcX8pphyLV9nCEST3XeqgjR0HP\\r\\n696Po qyH3XPzDrDRZ1JdqsxF5HDFSHlmcDY0OCl7e8 ekXuTg1wA3m975Adyqis\\r\\n3LPWsdKTuBdbuK LwJmZHbIt01WbKg. [file "/dh/apache2/template/etc/mod_sec3_CRS/REQUEST-932-A [hostNAME "HOST"] [uri "/verify/P17245884"] [unique_id "X1It2@kyOZuAIv3a6OjZ0gAAAAs"]
[Fri Sep 04 05:06:51.538980 2020] [:error] [pid 21278] [client IP:PORT] [client IP] ModSecurity: Access denied with code 418 (phase 2). Operator GE matched 7 at TX:anomaly_score. [file "/dh/apache2/template/etc/mod_sec3_CRS/REQUEST-949-BLOCKING-EVALUATION.conf"] [line "91"] [id "949110"] [msg "Inbound Anomaly Score Exceeded (Total Score: 10)"] [severity "CRITICAL"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-generic"] [hostNAME "HOST"] [uri "/verify/P17245884"] [unique_id "X1It2@kyOZuAIv3a6OjZ0gAAAAs"]
[Fri Sep 04 05:06:51.544745 2020] [:error] [pid 21278] [client IP:PORT] [client IP] ModSecurity: Warning. Operator GE matched 7 at TX:inbound_anomaly_score. [file "/dh/apache2/template/etc/mod_sec3_CRS/RESPONSE-980-CORRELATION.conf"] [line "86"] [id "980130"] [msg "Inbound Anomaly Score Exceeded (Total Inbound Score: 10 - SQLI=0,XSS=0,RFI=0,LFI=0,RCE=5,PHPI=0,HTTP=5,SESS=0): individual paranoia level scores: 10, 0, 0, 0"] [tag "event-correlation"] [hostNAME "HOST"] [uri "/verify/P17245884"] [unique_id "X1It2@kyOZuAIv3a6OjZ0gAAAAs"]

Your Environment
Shared hosting environment via Dreamhost.
Confirmation
[X] I have removed any personal data (email addresses, IP addresses,
passwords, domain names) from any logs posted.

I am perhaps flogging a dead horse here, but I just stumbled upon the same issue today:
[Wed May 05 20:25:47.244247 2021] [:error] [pid 27595] [client <IP_ADDRESS>:5444] [client <IP_ADDRESS>] ModSecurity: Warning. detected SQLi using libinjection with fingerprint 'Tnnof' [file "/usr/share/modsecurity-crs/rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf"] [line "65"] [id "942100"] [msg "SQL Injection Attack Detected via libinjection"] [data "Matched Data: Tnnof found within ARGS:_pgpmime: -----BEGIN PGP MESSAGE-----\\x0d\\x0aVersion: Mailvelope v4.4.0\\x0d\\x0aComment: https://www.mailvelope.com\\x0d\\x0a\\x0d\\x0awcFMAxs0FKK/urYEARAAonF/6j223xLoV1M8Z19wDIjZi4U8pzN+fu1Ptiwj\\x0d\\x0aKZBkprlBefI1NCuNxzSIqBex0o3ELfKDdcrEuu/arxIDDNi0A3ENqnGX6o7f\\x0d\\x0a3oenPN0+NkHJMpPliwqG9FLSUBHhqXR8fBGChABlIgvZMj3ual10J38IIV/C\\x0d\\x0aO9wnluGcmB8JCVLEt1zMNsMrd1jnJYMjbpxECA4xVuCls31y+UdZ+eR9AQv8\\x0d\\x0aTBdAYb+ov/sHyr0oKzSnimvXogtrGPxued2wjm5W2TYXvz3Ce37YEu2+PzgM\\x0d\\x0aM..."] [severity "CRITICAL"] [ver "OWASP_CRS/3.3.0"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-sqli"] [tag "paranoia-level/1"] [tag "OWASP_CRS"] [tag "capec/1000/152/248/66"] [tag "PCI/6.5.2"] [hostname "my.server.name"] [uri "/"] [unique_id "YJLxO9f-0ksOQjfsPT2IUgAAAA0"], referer: https://my.server.name/
[Wed May 05 20:25:47.253710 2021] [:error] [pid 27595] [client <IP_ADDRESS>:5444] [client <IP_ADDRESS>] ModSecurity: Warning. detected SQLi using libinjection with fingerprint 'Tnnof' [file "/usr/share/modsecurity-crs/rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf"] [line "65"] [id "942100"] [msg "SQL Injection Attack Detected via libinjection"] [data "Matched Data: Tnnof found within ARGS:_pgpmime: -----BEGIN PGP MESSAGE-----\\x0d\\x0aVersion: Mailvelope v4.4.0\\x0d\\x0aComment: https://www.mailvelope.com\\x0d\\x0a\\x0d\\x0awcFMAxs0FKK/urYEARAAonF/6j223xLoV1M8Z19wDIjZi4U8pzN fu1Ptiwj\\x0d\\x0aKZBkprlBefI1NCuNxzSIqBex0o3ELfKDdcrEuu/arxIDDNi0A3ENqnGX6o7f\\x0d\\x0a3oenPN0 NkHJMpPliwqG9FLSUBHhqXR8fBGChABlIgvZMj3ual10J38IIV/C\\x0d\\x0aO9wnluGcmB8JCVLEt1zMNsMrd1jnJYMjbpxECA4xVuCls31y UdZ eR9AQv8\\x0d\\x0aTBdAYb ov/sHyr0oKzSnimvXogtrGPxued2wjm5W2TYXvz3Ce37YEu2 PzgM\\x0d\\x0aM..."] [severity "CRITICAL"] [ver "OWASP_CRS/3.3.0"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-sqli"] [tag "paranoia-level/1"] [tag "OWASP_CRS"] [tag "capec/1000/152/248/66"] [tag "PCI/6.5.2"] [hostname "my.server.name"] [uri "/"] [unique_id "YJLxO9f-0ksOQjfsPT2IUgAAAA0"], referer: https://my.server.name/
[Wed May 05 20:25:47.263256 2021] [:error] [pid 27595] [client <IP_ADDRESS>:5444] [client <IP_ADDRESS>] ModSecurity: Access denied with code 403 (phase 2). Operator GE matched 5 at TX:anomaly_score. [file "/usr/share/modsecurity-crs/rules/REQUEST-949-BLOCKING-EVALUATION.conf"] [line "93"] [id "949110"] [msg "Inbound Anomaly Score Exceeded (Total Score: 10)"] [severity "CRITICAL"] [ver "OWASP_CRS/3.3.0"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-generic"] [hostname "my.server.name"] [uri "/"] [unique_id "YJLxO9f-0ksOQjfsPT2IUgAAAA0"], referer: https://my.server.name/
[Wed May 05 20:25:47.267285 2021] [:error] [pid 27595] [client <IP_ADDRESS>:5444] [client <IP_ADDRESS>] ModSecurity: Warning. Operator GE matched 5 at TX:inbound_anomaly_score. [file "/usr/share/modsecurity-crs/rules/RESPONSE-980-CORRELATION.conf"] [line "91"] [id "980130"] [msg "Inbound Anomaly Score Exceeded (Total Inbound Score: 10 - SQLI=10,XSS=0,RFI=0,LFI=0,RCE=0,PHPI=0,HTTP=0,SESS=0): individual paranoia level scores: 10, 0, 0, 0"] [ver "OWASP_CRS/3.3.0"] [tag "event-correlation"] [hostname "my.server.name"] [uri "/"] [unique_id "YJLxO9f-0ksOQjfsPT2IUgAAAA0"], referer: https://my.server.name/

Server is running Debian 10.9 (buster) with with mod-security 2.9.3-1, using CRS 3.3.0-1~bpo10+1.
I was trying to make RoundCube and Mailvelope to play along nicely, if that is of interest to anyone.

Thank you for reporting @fancsali, even if it looks like a dead horse.
In fact having the bot close issues nobody cares about is very sad, yet the situation (and the number of open issues) improved since this has been closed. So let's breath some life into this issue and call on the dev-on-duty @franbuehler to take a first look.

About a half year ago I have started to work on an exclusion package for Roundcube. I had to hang up the work, but I hope I can pick it up in the near future, so I'm going to assign this issue for myself.

I have few rules for Roundcube, i can help with it.

Any update here @airween?

Not yet. I hope I can focus to that in this month.

Thank you.

Hi @rednoah,
can you help me to reproduce this issue?
I reviewed your attached logs, but this part of the first line is a bit strange:
ARGS_NAMES:-----BEGIN PGP SIGNED MESSAGE---...

Looks like you send a request where the name of an argument is the file?
A curl example would be fine.
If I understand you correctly, there is no any connection between RoundCube webmail and this request, right?

It's been a long time, but I'm pretty sure it was something simple like this:
curl --data-binary<EMAIL_ADDRESS>https://server/endpoint

Just posting a text file directly, not form-encoded.
The signed message text would have been generated with gpg --clearsign but as I remember it wasn't always blocked, presumably because the random digital signature part just sometimes matched something that pushed the score over the limit.
https://www.gnupg.org/gph/en/manual/x135.html

Thanks @rednoah,
okay, I got it. Now I can take a look this issue.

Hi @rednoah,
thanks again for the quick curl tip, I could reproduce your issue.
I think these are not false positives, the engine with the rule set does what it has to do.
You didn't mention what CRS version you are using, so in my dev environment I checked your request against v3.4/dev. This is just relevant because the links below have generated based on this version's URL's. This is a small script what I used (it helps to find the rule as quickly). (If you want to test it, don't forget to replace the BASEH variable at the top of the code.)
I'm using CRS in that environment on PL4, with SecRuleEngine DetectOnly. This means the given curl command triggered all available rules, because the request will not blocked after the first match. With this setting, I discovered these rules in my log:
920272 Invalid character in request (outside of printable chars below ascii 127)
920273 Invalid character in request (outside of very strict set)
920360 Argument name too long
921150 HTTP Header Injection Attack via payload (CR/LF detected)
942430 Restricted SQL Character Anomaly Detection (args): # of special characters exceeded (12)
942431 Restricted SQL Character Anomaly Detection (args): # of special characters exceeded (6)
942432 Restricted SQL Character Anomaly Detection (args): # of special characters exceeded (2)
942440 SQL Comment Sequence Detected
942460 Meta-Character Anomaly Detection Alert - Repetitive Non-Word Characters
949110 Inbound Anomaly Score Exceeded (Total Score: 68)
980130 Inbound Anomaly Score Exceeded (Total Inbound Score: 68 - SQLI=28,XSS=0,RFI=0,LFI=0,RCE=0,PHPI=0,HTTP=5,SESS=0): individual paranoia level scores: 10, 13, 24, 21
I think the solution in your case should be to make an exclusion. After I checked the matched variables in these rules above, I've created this exclusion:
SecRule REQUEST_URI "@beginsWith /verify/P17245884" \
    "id:1001,\
    phase:1,\
    pass,\
    t:none,\
    log,\
    msg:'Exclusion activated',\
    ctl:ruleRemoveTargetById=920272;ARGS,\
    ctl:ruleRemoveTargetById=920272;ARGS_NAMES,\
    ctl:ruleRemoveTargetById=920272;REQUEST_BODY,\
    ctl:ruleRemoveTargetById=920273;ARGS,\
    ctl:ruleRemoveTargetById=920273;ARGS_NAMES,\
    ctl:ruleRemoveTargetById=920273;REQUEST_BODY,\
    ctl:ruleRemoveById=920360,\
    ctl:ruleRemoveTargetById=921150;ARGS_NAMES,\
    ctl:ruleRemoveTargetById=942430;ARGS_NAMES,\
    ctl:ruleRemoveTargetById=942431;ARGS,\
    ctl:ruleRemoveTargetById=942431;ARGS_NAMES,\
    ctl:ruleRemoveTargetById=942432;ARGS,\
    ctl:ruleRemoveTargetById=942432;ARGS_NAMES,\
    ctl:ruleRemoveTargetById=942440;ARGS,\
    ctl:ruleRemoveTargetById=942440;ARGS_NAMES,\
    ctl:ruleRemoveTargetById=942460;ARGS,\
    ctl:ruleRemoveTargetById=942460;ARGS_NAMES"

This solved the problem, and the request didn't trigger any rule.
Put this rule into your /dh/apache2/template/etc/mod_sec3_CRS/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf, and check again.

Hi @rednoah,
did this solve your problem? If yes, pleas close this issue.

We have not heard from @rednoah anymore. Closing this issue.


[BUG]Pipeline Parallelism Training: AttributeError: 'list' object has no attribute 'dtype'

deepspeed==0.14.1+dc3554f8
PipelineEngine
bf16
  File "/mnt/e/nlp/deepspeed/deepspeed/runtime/pipe/engine.py", line 373, in train_batch
    self._exec_schedule(sched)
  File "/mnt/e/nlp/deepspeed/deepspeed/runtime/pipe/engine.py", line 1373, in _exec_schedule
    self._exec_instr(**cmd.kwargs)
  File "/mnt/e/nlp/deepspeed/deepspeed/runtime/pipe/engine.py", line 281, in _exec_reduce_grads
    self._bf16_reduce_grads()
  File "/mnt/e/nlp/deepspeed/deepspeed/runtime/pipe/engine.py", line 289, in _bf16_reduce_grads
    self.buffered_allreduce_fallback(grads=self.optimizer.get_grads_for_reduction(),
  File "/mnt/e/nlp/deepspeed/deepspeed/runtime/engine.py", line 2463, in buffered_allreduce_fallback
    self._reduce_non_expert_gradients(non_expert_grads, elements_per_buffer)
  File "/mnt/e/nlp/deepspeed/deepspeed/runtime/engine.py", line 2413, in _reduce_non_expert_gradients
    split_sparse_tensor_buckets, split_dense_tensor_buckets = split_half_float_double_sparse(grads)
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/e/nlp/deepspeed/deepspeed/runtime/engine.py", line 127, in split_half_float_double_sparse
    assert t.dtype in supported_types, f"attempting to reduce an unsupported grad type: {t.dtype}"
           ^^^^^^^
AttributeError: 'list' object has no attribute 'dtype'

Hi, have you solved this problem?

you can add tensors = tensors[0] to the first line of split_half_float_double_sparse function.

I'm not sure if it will cause other problems

you can add tensors = tensors[0] to the first line of split_half_float_double_sparse function.

I'm not sure if it will cause other problems

It seems alright for me.

Can you provide more details such as how your model constructed when use pipeline training? From my perspective, it seems your problem related to how you load your model, how your model send and receive hidden states.

Can you provide more details such as how your model constructed when use pipeline training? From my perspective, it seems your problem related to how you load your model, how your model send and receive hidden states.

Now，It works well


Access to PHP $GLOBALS superglobal array

Is it possible to organize access to the superglobal $GLOBALS array, as to $ _POST, $ _GET, and others?

What you mean? From latest zephir it's organized - if you try access non existing super global then fatal error is thrown.

Really? I've got parser exception Zephir\Parser\ParseException: Syntax error in D:\php\zephir\myext\app.zep on line 4 when i try to compile this:
namespace Foo;
class App {
	public static function test(var val) {
		let GLOBALS["key"] = val;
	}
}

I think this is another error.

It should be _GLOBALS

The same error - parser

@wisegoodvin Yes, there is no _GLOBALS support: https://github.com/phalcon/php-zephir-parser/blob/development/parser/scanner.re#L599-L637. Do we really need this in Zephir?

Ok, I probably did not wrote correctly:
What about acces to Zend global symtable? Where PHP store whem  "global" variables.
Example:
index.php (main web server page)

But now in zephir i can't do this.
Later I will try to publish a snippet of the php extension code that it does.
Если опять не понятно выразился - могу на русском написат.

You can try another approach
<?php
$foo = "bar";
$test = MyExt::vartest($GLOBALS); // $GLOBALS['foo'] = xx; return $test;
// and create new var, called $test with some val
echo $foo . $test; // and access to it
?>

I want to close this issue because I don't want a bunch of these lying around. I'd like to add support for anything/everything at some point, but keeping the issue open doesn't help that. :) If anyone wants to get started, I'd love that.

I was able to access $GLOBALS as described below, but I noticed that some variables created in Zephir using GLOBALS are not being reflected in PHP
Versions: Zephir 0.12.20 and Zephir Parser 1.3.6
File: zephir.patch
diff --git a/Library/Variable/Globals.php b/Library/Variable/Globals.php
index b31c5bf1..511971ac 100644
--- a/Library/Variable/Globals.php
+++ b/Library/Variable/Globals.php
@@ -22,6 +22,11 @@ class Globals
      * The variables passed to the current script via the URL parameters.
      */
     const GET = '_GET';
+
+    /**
+     * References all variables available in global scope
+     */
+    const GLOBALS = 'GLOBALS';

     /**
      * The variables passed to the current script via the HTTP POST method.
@@ -73,6 +78,7 @@ class Globals
         self::SESSION => 1,
         self::REQUEST => 1,
         self::FILES => 1,
+        self::GLOBALS => 1,
     ];

     /**

File: php-zephir-parser.patch
diff --git a/parser/scanner.re b/parser/scanner.re
index bc8125f..9e8d193 100644
--- a/parser/scanner.re
+++ b/parser/scanner.re
@@ -608,7 +608,12 @@ int xx_get_token(xx_scanner_state *s, xx_scanner_token *token) {
 				token->len = YYCURSOR - start;
 				s->active_char += (YYCURSOR - start);
 			}
-
+
+			if (!strcmp(token->value, "GLOBALS")) {
+				token->opcode = XX_T_IDENTIFIER;
+				return 0;
+			}
+
 			if (token->len > 3 && token->value[0] == '_') {

 				if (!strcmp(token->value, "_GET")) {


WIP: scope more registries

@bot-gradle test this

I've triggered the following builds for you. Click here to see all build failures.

PullRequestFeedback build