cppflow(1) output.get_data();

I am trying to run predictions and I am trying to convert the output Tensor type to float. but it doesn't work.
why?
float Net::predict(string fen) {
        Tensor input{ model, "input" };
	Tensor output{ model, "output" };
	list<list<float>> d = make(fen);
	vector<list<list<float>>> result(d.size());
	copy(d.begin(), d.end(), result.begin());
	input.set_data(result);
	model.run(input, output);
	return output.get_data<float>();
}

Note that it converts this to vector<float, allocator> instead of float. do I need to just convert it to float then?
and also tried to convert to double but from this vector but with no luck.

Hi @OfekShochat ,
Can you add a minimum example that we could be able to run? What error are you getting?
If output contains just a scalar, then I guess you just need to take the first value of the returned vector:
return output.get_data<float>()[0]

sure, that makes an error: "binary '=' no operator found wich takes a right-hand ...".
*.h:
#pragma once
#include "neural/tensorflow/Model.h"
#include "neural/tensorflow/Tensor.h"
#include <iostream>
#include <list>
#include <string>

using namespace std;

class Net {
public:
	Net(string path);

	float predict(string fen);
private:
	Model model;

	list<list<float>> make(string fen);
};

*.cpp:
#include "neural/tensorflow/use.h"
#include "neural/tensorflow/Tensor.h"
#include "neural/tensorflow/Model.h"
#include "chess/thc.h"
#include <iostream>
#include <list>
#include <string>
#include <vector>

using namespace std;

Net::Net(string path) : model(path) {
	model.init();
}

list<list<float>> Net::make(string fen) {
	list<list<float>> b;
	list<float> tb;
	const char* c = fen.c_str();
	thc::ChessRules cr;
	cr.Forsyth(c);
	string s = cr.ToDebugStr();

	for (auto piece = s.cbegin(); piece != s.cend(); ++piece) {
		switch (*piece) {
		case 'R' :
			tb.push_back(5.0);
			break;
		case 'N' :
			tb.push_back(3.2);
			break;
		case 'B' :
			tb.push_back(3.4);
			break;
		case 'Q' :
			tb.push_back(9.0);
			break;
		case 'K' :
			tb.push_back(200.0);
			break;

		case 'r' :
			tb.push_back(-5.0);
			break;
		case 'n' :
			tb.push_back(-3.2);
			break;
		case 'b' :
			tb.push_back(-3.4);
			break;
		case 'q' :
			tb.push_back(-9.0);
			break;
		case 'k' :
			tb.push_back(-200.0);
			break;
		case '\n':
			b.push_back(tb);
			tb.clear();
			break;
		}
	}
}

float Net::predict(string fen) {
	Tensor input{ model, "input" };
	Tensor output{ model, "output" };
	list<list<float>> d = make(fen);
	vector<list<list<float>>> result(d.size());
	copy(d.begin(), d.end(), result.begin());
	input.set_data(result);
	model.run(input, output);

	return output.get_data<float>()[0];
}

@OfekShochat
So, even accessing the vector with `return output.get_data()[0];``you get the same error? Can you write the full output of the error? In which line exactly does it fail?

yes. the error is this:
C2679	binary '=': no operator found which takes a right-hand operand of type 'std::list<float,std::allocator>' (or there Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xutility	line 4142

@OfekShochat
But I guess that's not the full error trace. The full error trace should show more information about the location and the calling stack of the error.
Also, set_data(std::vector<T> new_data) is expecting T to be a primitive type, like float, ìnt... you are passing it a vector<list<list<float>>> and therefore T is list<list<float>>. You should flat your data before passing it to to set_data(). That is, result should be a vector<float>.

I used keras conv2d net. so do I need to flatten it?

@OfekShochat
Yes, the data should be flattened before setting it. That doesn't mean that the tensor should be flat, but to read the data from c++, it should receive a flat std::vector. If the tensor is not flat (like an image for your conv2d), you have to pass it as a flat vector, and specify the shape. For instance, you can see the coco example:
    // Put image in Tensor
    std::vector<uint8_t > img_data; // This is a flat vector
    img_data.assign(inp.data, inp.data + inp.total() * inp.channels()); // Fill the flat std::vector with data
    inpName.set_data(img_data, {1, 300, 300, 3}); // Assign the data to the tensor, and specify the shape

what is inp.data?

@OfekShochat
Is a opencv matrix. It is not relevant. In that line we are only filling the img_data vector.

just what is the input? the output from the make() function?

@OfekShochat
There is an image stored in inp.
I think that in your case the image is in d, and you should traverse that list of lists and write its data into the flat version of result.

im sorry for my ignorance, but total is just the size? that's not true I know. but what is the total?

@OfekShochat
inp is a matrix (h x w x c), inp.data() points to the raw data, inp.total()' is number of elements (h x w) and inp.channels() is number of channels (c). But, if you are not using opencv, you don't need to care about this, you just need to fill your vector with your data, with a for loop, or the way you prefer.

so should I just make the make function make 1D arrays and then let the lib slice it with the shape?

@OfekShochat
Yes, you can make a 1D vector, and specify the shape on set_data.

sorry for the wait, I was sleeping. now it is linking problems. probably something in my code do you have a guess?

@OfekShochat
Without posting the linking errors is difficult that I can have a guess

sorry about that.
errors (2).txt

@OfekShochat
Looks like is not linking correctly the TF C API. Did you install the TF C API in your system? Have you tried to compile and run a small program to check if the installation was successful?

I downloaded the tf zip from https://www.tensorflow.org/install/lang_c and put it on the directory of the c_api and changed the include from <> to the dir of the files. so should I run your example and see?

@OfekShochat
Yes, running one of the examples is a nice way of checking it. Did you place it in a folder named libtensorflow in your $HOME directory? If not, you should place it there, or install it system wide, or specify where is it in your CMakeLists.txt. You can check this guide to install it, although is for cppflow2, it also works for cppflow1.
Btw, how are you compiling your code? Are you using one of the provided CMakeLists.txt? If not, perhaps you are not even linking it.

I specified the dir of the dll to vs

@OfekShochat
I am not used to vs, so I am not sure, but you should try to compile one of the smaller example programs.

the load_model project outputs the same error.

@OfekShochat
For the load model example did you use the provided CMakeLists.txt or did you link it with vs?

vs

@OfekShochat
Then probably you are linking something wrong. Try to mimic the CMakeLists.txt behavior.

I do the same thing. I include the dll dir in the link phase, I include the tensorflow, so what could go wrong?

@OfekShochat
I run out of idea. But I encourage you to use the CMakeLists.txt

it was the dll file.


BUG: adaptive stepsize doesn't reinitialise

When NewtonNonlinearSolver doesn't converge, the function u needs to be reinitialized otherwise the error will propagate to the next step.
This is done by creating a dummy Function which stores u. At each iteration u fetches this new function.

Fixed in #128


restricting project tabs to pending projects and eligible system administrators

closes #1137

coverage: 83.382%. remained the same
when pulling 42c3a070bd86852f103b71c4e99a36a40a98a0f5 on 1137-restrict-project-nav
into ef751822a780f2e5be14cbdcf4ce993787c2978d on main.

https://github.com/user-attachments/assets/c296f6f6-2202-41af-b01b-0d912dd11942

@matthewjchandler I re-enabled sysadmins to be able to navigate to the approve page through the tabs. Should we get rid of the approve button at the bottom of the details page? I would do the same for the create script, but that would be a bit more involved; requiring us to make a new route/page for the information

Old approve button is removed, and navigation via the Approve Settings tab is enabled


rename xml_to_annotations with read_pascal_voc with documentation

Hi @bw4sz
Can you please review ?

closes #699

Thanks @Mu-Magdy


Create Tekton Dashboard logo

https://github.com/cdfoundation/foundation/issues/147 is awesome and it would be great to have a logo in the same style for our Tekton Dashboard!
I've added a few ideas at https://github.com/tektoncd/dashboard/issues/1012 - more always welcome.
I think it's especially useful for presentations - nobody wants to have the words "Tekton Dashboard"  and I'd like to continue the theme of having the Tekton cat doing something fun that's easily recognisable and associated with this.
Lemme know if you're looking for anything to help make this happen please, thanks!

I've added this to agenda for TOC meeting tomorrow, under 'pending project requests'
https://docs.google.com/document/d/1uBHar55fTInWF9Li4t0lyG3tTC8BRLU0FfBfsgk_Jrs/edit?ts=5c9580be#
We just need to know what design ideas to move forward with and any deadlines to be aware off so let's discuss tomorrow then get the ball rolling on this. Please do join the meeting if you can.

 The view of the PipelineRun would be a stylised one of the ones we render currently.
Example visualisation, taken straight from our readme:
.
We'd want it to be general/stylised enough so that we don't need to keep updating it.
I did think about having a notebook nearby with "Awesome Tekton plan" on it, or having some very obviously "for reading" glasses on the cat, but let's start with something simple for now I think - and we wouldn't want too much detail in there just incase it's going to be a tiny picture somewhere on a chart.

🎉 @tracymiranda thanks for adding this to the agenda. Unfortunately I won't be able to attend. There's no particular deadline, but it would be great to have some artwork for the Dashboard since Tekton Pipelines, Triggers, CLI, and Chains already have their own.
@a-roberts There's too much detail to capture something like that and I feel it wouldn't translate very well at small sizes, not sure it'd be recognisable as any kind of dashboard. Maybe something simpler / more abstract would work?
Existing project icons for reference:

I do like the idea of the cat inspecting something with a magnifying glass. Perhaps a screen displaying a simple pipeline graph to represent the Dashboard?

🎉 @tracymiranda thanks for adding this to the agenda. Unfortunately I won't be able to attend. There's no particular deadline, but it would be great to have some artwork for the Dashboard since Tekton Pipelines, Triggers, CLI, and Chains already have their own.
@a-roberts There's too much detail to capture something like that and I feel it wouldn't translate very well at small sizes, not sure it'd be recognisable as any kind of dashboard. Maybe something simpler / more abstract would work?
Existing project icons for reference:

I do like the idea of the cat inspecting something with a magnifying glass. Perhaps a screen displaying a simple pipeline graph to represent the Dashboard?

Exactly my thoughts, I imagine we'd want something that'd work even if it was just a 128x128 png - so my magnifying glass suggestion is what I'm leaning towards - looking at your simple chart yep (so that's good because it's abstract and not tied to our UI implementation)
My schedule's very packed today as well but will be checking here for updates and happy to pitch in/provide feedback for anything.

Hi team - ticket submitted to LF creative services to get work started on this logo.

(Internal reference: https://jira.linuxfoundation.org/browse/LP-6892)

tekton_dashboard_logoconcept_V1.pdf
Hi team - creative services has put together the attached draft for your review. Please let me know your feedback.
-G

tekton_dashboard_logoconcept_V1.pdf
Hi team - creative services has put together the attached draft for your review. Please let me know your feedback.
-G

Yay! This looks super cool, better than looking at a monitor 😆
I like the overall circular shape of the feature - would easily be at home and fit well on a document like when presenting at a conference. It's easily croppable and not something awkward.
I think that's the cat's body just between the paws, it does look a little strange (so it looks like the cat is in a reclined pose) - but maybe that's intended or something we could exaggerate? I like the idea of the cat just relaxing somewhere, in a reclined position, observing as things happen inside Tekton. Things seem a little slanted at the moment with it - like it's off to one side.
For the actual circles, I wonder if it's clear enough what they currently (or will) represent? Any ideas for what we could put in here @AlanGreene? I realise we probably don't want text, I love the style of this in general as is.
Thank you all for working on this and sharing 😄

Thanks! I'll share this feedback with creative services and we'll go from there.

Sorry I didn't see the notifications before. I agree with Adam's comments, love the concept 👍 😸
With the graph arcing over the cat's head it looks like this won't be as neat/compact as some of the other logos. Is that a concern? I wonder if that part could (should?) be simplified, using fewer circles maybe.

Hi team - quick update, I am still waiting on feedback from creative services. I will keep you posted with updates.

@a-roberts @AlanGreene - do you have any feedback on this version of the logo? are we good to move forward with this one? Thank you!

@a-roberts @AlanGreene - do you have any feedback on this version of the logo? are we good to move forward with this one? Thank you!

Hey there! I like it 😄 colouring is on-point, as is the font, I am wondering how we can explain what's going on with the shapes around the cat - like, how can we map them to what actually happens in the Tekton Dashboard?
It would be cool if, let's say you're at a conference, someone asks sooo what do those circles represent, and what about the larger one at the top? I've been thinking about a possible explanation and the best I've got is...optional Tasks in a Pipeline. If I can get that sorted, I'll be happy to say yep let's go with this!
@AlanGreene when you get a chance please

@dlorenc @AlanGreene @a-roberts - are there any final changes you would like made to the logo? thanks!

@dlorenc @AlanGreene @a-roberts - are there any final changes you would like made to the logo? thanks!

@dlorenc @AlanGreene @a-roberts - are there any final changes you would like made to the logo? thanks!

Not from me! 👍

@dlorenc @AlanGreene @a-roberts - are there any final changes you would like made to the logo? thanks!

Not from me! 👍

Thanks everyone for the feedback! I will let the creative team know that this logo is approved, and close out this issue.
@jsalinas29 the new Tekton dashboard logo is finalized if you would like to add it to our assets.
Thanks all!!

Thanks everyone for the feedback! I will let the creative team know that this logo is approved, and close out this issue.
@jsalinas29 the new Tekton dashboard logo is finalized if you would like to add it to our assets.
Thanks all!!

@galemccommons @jsalinas29 where should we be sourcing the final logo assets from? I don't see the Dashboard logo (this issue) or the Hub logo in https://github.com/cdfoundation/artwork/tree/main/tekton

/cc @danlopez00

@galemccommons and @jsalinas29 would be the right ones to answer this. I'll ping them on slack.

@vdemeester @dlorenc the logos are uploaded in the additional artwork repo here: https://github.com/cdfoundation/artwork/tree/main/tekton/additional-artwork/tekton_dashboard


[macOS] Keyboard Shortcut isn't working in --release mode

Describe the bug
The keyboard shortcut isn't working in --release mode.
But the debug version is working fine.
Steps To Reproduce

Clone latest dev branch
Run following

RUSTFLAGS="-l framework=WebKit" cargo build --example menu --release

Open the app/executable (target/release/examples/menu)
Try CMD+Q
It will not work

Expected behavior

The app should close

Platform and Versions (please complete the following information):
OS: macOS 13.0 (22A380)
Rustc: rustc 1.65.0 (897e37553 2022-11-02)
Would you assign yourself to resolve this bug?

[ ] Yes
[x] No

Additional context
The keyboard shortcut is working in debug mode.
Please note that: All of other MenuItem -> native_item (s) aren't working either.

I cannot reproduce this. I have tried RUSTFLAGS="-l framework=WebKit" cargo build --example menu --release and cargo run --example menu --release.
They both can work by pressing CMD+Q.

I cannot reproduce this. I have tried RUSTFLAGS="-l framework=WebKit" cargo build --example menu --release and cargo run --example menu --release. They both can work by pressing CMD+Q.

How can I send some sort of more debug info?

I cannot reproduce this. I have tried RUSTFLAGS="-l framework=WebKit" cargo build --example menu --release and cargo run --example menu --release. They both can work by pressing CMD+Q.

Update:

My m1 machine is working fine.
Intel based isn't working.

@hamza72x Did you really tes wry's menu example rather than just tested on your project?
I just resolved similar issue in https://github.com/tauri-apps/tauri/issues/5669.
It might because of misoptimization.

@wusyong  I tested the menu example, and also did again right now:
https://user-images.githubusercontent.com/48919542/204963645-98ecdd32-8233-4462-8cab-8d723cc92d0e.mp4

@hamza72x Thanks for confirmation again!
Is it normal in wry 0.21 and before? I feel like we should just roll back at this rate. WinitView/TaoView has too many custom behavior we probably should just add with native NSView.

@wusyong Yeah, wry v0.21 worked.
Please note: latest wry is working in m1 machine. Only my intel version is making this problem.
https://user-images.githubusercontent.com/48919542/204985250-0de3d801-2895-4945-816d-5dae6744d21c.mp4


[android_alarm_manager_plus] MissingPluginException for path_provider

System info
Platform the Issue occurs on: Android
Plugin name: android_alarm_manager_plus
Plugin version: 2.0.5
Steps to Reproduce
I could not reproduce the issue. It appears seemingly at random. It has not appeared in debug, I only got it twice through a print statement while debugging another app.
MissingPluginException(No implementation found for method getApplicationDocumentsDirectory on channel [plugins.flutter.io/path_provider](http://plugins.flutter.io/path_provider))
How can I manually register plugins, in order to avoid this no matter what ?

I also faced same issue...

Same!

i found a solution for it .
due to  https://github.com/flutter/flutter/issues/99155#issuecomment-1052023743 .
Add dependencies on path_provider_android and path_provider_ios.
and your callback method should be like this :
  // The callback for our alarm
  static Future<void> callback() async {

    if (Platform.isAndroid) PathProviderAndroid.registerWith();
    if (Platform.isIOS) PathProviderIOS.registerWith();

    ObjectBox objectbox = await ObjectBox.create();

    log("WORKS");

  }

Yep, that's what I did, only difference being I'm using workmanager instead of android_alarm_manager_plus.


Simply print a warning when server unavailable during sous build

          1 Error

:no_entry_sign:
Please include a CHANGELOG entry.

  Generated by :no_entry_sign: Danger


Cleanup /searchjson/ endpoint

Optimize by removing stale content
Add validation and handling for dirty values
Consider caching

searchjson is no longer used by Discover

Neal can close this and add to the master list for tracking the Discover 2020 project


Move to official org?

Hello!
I'm the creator of Dracula color scheme. I was searching for themes created by the community and I found yours. Good job by the way!
I was wondering if you are interested in transferring this repository to the official organization (https://github.com/dracula). You'll continue maintaining this project, the only difference is that we can make it more visible and include it on the site (https://draculatheme.com).
What do you think?

Hello!
Yes, I am interested in transferring the repository to the official
organization.
On Sun, Jan 17, 2021 at 8:51 AM Zeno Rocha<EMAIL_ADDRESS>wrote:

Hello!
I'm the creator of Dracula color scheme. I was searching for themes
created by the community and I found yours. Good job by the way!
I was wondering if you are interested in transferring this repository to
the official organization (https://github.com/dracula). You'll continue
maintaining this project, the only difference is that we can make it more
visible and include it on the site (https://draculatheme.com).
What do you think?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/OmarElebiary/terminator-dracula/issues/1, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ADACATQO3REXWW4TIMFX7R3S2KJH5ANCNFSM4WF47PWQ
.

Hello!
Yes, I am interested in transferring the repository to the official
organization.
On Sun, Jan 17, 2021 at 8:51 AM Zeno Rocha<EMAIL_ADDRESS>wrote:

Hello!
I'm the creator of Dracula color scheme. I was searching for themes
created by the community and I found yours. Good job by the way!
I was wondering if you are interested in transferring this repository to
the official organization (https://github.com/dracula). You'll continue
maintaining this project, the only difference is that we can make it more
visible and include it on the site (https://draculatheme.com).
What do you think?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/OmarElebiary/terminator-dracula/issues/1, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ADACATQO3REXWW4TIMFX7R3S2KJH5ANCNFSM4WF47PWQ
.

Great! I just sent you an invite to join the organization.
Once you accept it, you'll be able to transfer the repo and I'll take care of adding it to the site.
Thanks for building this! 🎉

Great! I just sent you an invite to join the organization.
Once you accept it, you'll be able to transfer the repo and I'll take care of adding it to the site.
Thanks for building this! 🎉

It's live! https://draculatheme.com/terminator 🎉

It's live! https://draculatheme.com/terminator 🎉


Fullscreen Window

Is it possible to show window in fullscreen mode (extend into taskbar).
I tried the following without succes.
       ExtendViewIntoTitleBar="True"
        ui:ThemeManager.IsThemeAware="True"
        AcrylicWindowStyle="None"
        WindowStyle="None"
        ResizeMode="NoResize"
        WindowState="Maximized"

How about version 0.10.3 ?


Cupertino text selection controls's GestureDetection is incorrect

Cupertino text selection controls's Handle is upside down if TextSelectionHandleType.left, However its GestureDetection is not upside down.
https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/cupertino/text_selection.dart

I did a deep dive on making sure that the handles are always interactive when they should be in https://github.com/flutter/flutter/pull/31852.  This seems to be fixed with that PR.  Let me know if anyone still runs into this though.  The fix should be in v1.7.0 and above.


<EMAIL_ADDRESS>hash check failed

😄
App: extras/shutup10
URL: https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe
First bytes: 4D 5A 90 00 03 00 00 00
Expected: 84fd6fbf38b27d9aaa09129b68ba5e2e6a7829a79c8f95ce541aa93316f1ab14
Actual: 78b3d2f7ac52ba1bdac7328f524444869a42e9666160cad15b317deee7414900

Sorry, didn't check for duplicates #2829 #2830. Closing issue.


can't post images anymore

I can still post images?

Try on the heroku account then... I couldn't get any to work
On Mar 22, 2016 11:18 AM, "Sarah Van Belleghem"<EMAIL_ADDRESS>wrote:

I can still post images?
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/CMPUT404Group/CMPUT404-project-socialdistribution/issues/23#issuecomment-199914220


Keyboard getting opened On slider touch

import { StyleSheet, Text, View, TextInput } from 'react-native'
import React from 'react'
import { useSharedValue } from 'react-native-reanimated';
import { Slider } from 'react-native-awesome-slider';

const AnimatedSlider = () => {
  const progress = useSharedValue(30);
  const min = useSharedValue(0);
  const max = useSharedValue(100);
  return (
    <>
      <Slider
        style={styles.container}
        progress={progress}
        minimumValue={min}
        maximumValue={max}
        cache={true}
        heartbeat={true}
        hapticMode='step'
      />
    </>
  );
}

export default AnimatedSlider

const styles = StyleSheet.create({
  container: {
    flex: 1,
    minWidth: 300,
    backgroundColor: "skyblue"
  }
})

On opening the screen containing this slider, it automatically opens a keyboard, there is not text inputs present in entire screen.
I tried to look into the package code I guess TextInput from packages's BubbleComponent is getting focused.
Here's a code from your module.
<Animated.View
          style={{
            ...BUBBLE_STYLE,
            backgroundColor: color,
            maxWidth: bubbleMaxWidth,
          }}
        >
          <TextInput
            ref={textRef}
            textAlign="center"
            style={[styles.textStyle, { color: textColor }, textStyle]}
            defaultValue=""
            caretHidden
          />
        </Animated.View>

Hey, have you checked if it's related to enabling autoFocus on TextInput somewhere?
Did you enable any default keyboard behavior somewhere? I assume that's it because this library does not rely on any keyboard events.

You can try to patch the package and just add editable={false} prop. It should work perfect then.

fixed in v2.6.3.


Experimenter full name from SWR

This is currently pulling the Requestor as the Experimenter full name - it should be the surgeon. NSB does not track the surgeon name so we can either make it "NSB" or use a surgeon ID, if that is a field available.

In an offline conversation, we settled on "NSB - ", where  is a number.


Implement "actual fun ActualDialog" and "actual fun ActualPopup"

We can move already implemented Dialog/Popup from desktop to ui module
from:
support\compose\desktop\desktop\src\jvmMain\kotlin\androidx\compose\ui\window\AppDialog.kt
to:
support\compose\ui\ui\src\desktopMain\kotlin\androidx\compose\ui\window\DesktopDialog.kt
from:
support\compose\desktop\desktop\src\jvmMain\kotlin\androidx\compose\ui\window\Popup.kt
to:
support\compose\ui\ui\src\desktopMain\kotlin\androidx\compose\ui\window\DesktopPopup.kt
(DesktopPopup is in ui module, so we can't use Box, we have to use Layout (as in support\compose\ui\ui\src\androidMain\kotlin\androidx\compose\ui\window\AndroidPopup.kt)

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.


How to write a JS module

In Python and JS to write some reusable functions you would put them in a separate file and just import that. How does this work in Flexx? How do I make a simple JS module? :)

Coming up! It will soon be something like:

app.assets.add_shared_asset(
    name='mystuff.js',
    sources=[pyscript, compatible, elements, 'and', 'raw', 'JS'],
    deps=[],
    exports=[]  # names of PyScript-stuff automatically get exported.
)

And you can then make this module a depency of other modules. Alternatively, you can add these sources directly to the module where they're needed.

So how would you go about making use of such a JS module in a Widget's JS subclass?

The Widget that needs functionality from mystuff.js would add it as a dependency:
classes = app.assets.get_module_classes('my.module')  # get list of Model classes defined in my.module

app.assets.add_shared_asset(
    name='my-module.js',
    sources=classes + [...],
    deps=['mystuff.js as mystuff'],
    exports=[]
)

And inside your Widget you can use mystuff.foo. Or, you could do ... sources=classes + ['var foo = mystuff.foo;'] to make it easier accessible.
I am playing with the idea whether the import syntax can be useful here. E.g. from mystuff import foo. But that would be more like syntactic sugar.

Ideas on how to improve the writing up of the binding are welcome.

Ha! Now (#271) there is no more need to write a JS module. Though you can still make a module be transpiled as a whole by defining __pyscript__ = True. Than just import that module where you need it and use it!


Design Proposal: Leverage side-effects: false in package.json for tree-shaking friendly modules

Before You Start
I think this design proposal aligns with TypeScript Design Goals and helps TypeScript authors to write more efficient packages (and help the JavaScript ecosystem in general this way).
The are very similar existing suggestions, but it looks like none of them leverages side-effects: false in package.json directly.
E.g. there is

https://github.com/Microsoft/TypeScript/issues/17181: Flags parts of your code as pure.

Defining a Scenario
As a lib author I'd like to create packages which are easy to consume by tools and allow features like efficient tree shaking. I'd like to re-use existing conventions to flag my package with a certain feature (in this case side-effects: false in package.json). I'd like TypeScript to assist me in writing packages which fulfil this constraint.
So basically:

When I write a TypeScript-based package...
...and set side-effects: false in package.json...
...I want the TypeScript compiler to throw errors, when I invalidate this constraint.

Language Feature Checklist
This change should be able to be introduced without a breaking change and should keep backwards compatibility with the JS language.
Side effects free packages
See here for an example.

cc @thelarkinn

While there might be micro-libraries that can enforce that constraint, a lot of common code is side-effecty and a lot of side-effecty code isn't determinable at compile time, though CFA has advanced itself quite a lot over the past little while, I doubt it is capable of tracking that fully reliably at the moment.

What is CFA? :)
Maybe the side effect must not be perfect in the beginning and can just become better in multiple steps (like our type system becomes more feature-rich as well over time). I think there can be multiple quick wins (e.g. keep globals and deps as read-only from outside of exported functions and so on).

Why can not this be done today by a tslint rule/additional tool ?

@donaldpipowitch I am strongly in favor of writing code that is free of side effects but I don't see what this practice has to do with metadata in a package.json manifest. Even if it is of use to tools that perform tree shaking optimizations I don't think that is the primary purpose of writing such code as it often trades performance for maintainability. Basically, if I was going to look for purity, I wouldn't think to look in a manifest, that just seems strange.
CFA stands for control flow analysis (definitely an acronym that needs to be looked up the first time but very useful when talking about it :smiley:)

Basically, if I was going to look for purity, I wouldn't think to look in a manifest, that just seems strange.

Yes, and people like to throw definitions around liberally of what it means.  Pure specifically means a) no side effects and b) no hidden state.  People largely forget the second one, and the second one has no impact on if code is elidable or not, though it has a huge impact on testability.
I agree with Mohamed, in that if this were something that was closely aligned to the type system, then it might make sense for TypeScript, but it is ultimately an approach to structuring code which can lead to optimized code that is easier to maintain and easier to test, but it isn't the only approach.  The ability to annotate such code is important, but the ability to enforce that pattern at a project level seems like a higher order concern for a linting or other tool.  TypeScript only over imposes itself when it can identify a static error.  Side effecty code is not an error, it is at worst an anti-pattern for some.

@kitsonk indeed, and pure was a poor choice of words on my part, and to be fair it wasn't used in the original post.
Considering there is currently not a way to convey the absence of side effects to the typechecker this seems out of scope.

Why can not this be done today by a tslint rule/additional tool ?

You're right, that would work. Maybe I'm biased here, because I personally would like to see a tighter integration between linter like this and TypeScript (see https://github.com/Microsoft/TypeScript/issues/15589 for this topic).

I don't see what this practice has to do with metadata in a package.json manifest.

I maintain a lot of build and tooling configurations and I really love it when multiple tools agree on a common way for certain settings so other tools can build upon that as well. (A nice example is browserslist which was used to configure a CSS prefixer and now also powers babel-preset-env. You basically specificy in your package.json which runtimes/browsers you officially support. E.g. I could imagine TypeScript to use this as well to maybe auto-configure things like --lib.)
I didn't want to say tree shaking optimizations are the primary reasons to write side effects free code, I just wanted to point out that webpack tries to establish a convention to flag packages a side effects free :)

CFA stands for control flow analysis

Ah! Thanks. Didn't think about control flow analysis here :)

We still think of immutability as a general concept, see https://github.com/Microsoft/TypeScript/issues/19169 for more details. I think this request is rather specific and is achievable today without changing the compiler or the language. This issue is outside the scope of the project for the time being.

Okay, Thank you. I guess it is better to close the issue for now.


Attempted to extract file modpack-KlahKi-Craft-1.0.zip, but it did not exist

SOMEONE PLEASE HELP IDK WHATS GOING ON I GET THIS MESSAGE PLZZZ HELLP!!!!!
Error unzipping a file for the following pack: KlahKi Craft
Atempting to extract file klahki-craft-1.0.zip, but it did not exist.
Please consult the modpack author
PLZZZ HELP

Making multiple issues for the same problem isn't going to get you help any faster. It would probably just annoy people.
That being said, would you happen to have the logs for the launcher?

thats me and
i didnt know how to get to the other one so i made this one

Would you happen to have the technic launcher logs?

i wish i knew what that was can u tell me plzz ?
:)

Look in the technic launcher folder? I haven't been using it for a long time, but there are log files detailing what happened in that folder.

like i barely made this mod pack but ill try

this is complicated

u have like skype or something? steam?

solder is meant for advanced users.  Which it's obvious you are not.  Go back to the other non solder method (complete zip & hosted) to distribute your modpack
This application is intended for experienced system administrators
@GenPage please close.  Reason: Failed to read initial paragraph on docs.solder.io

idk what u mean can u just like skype me or something plzzz lol

@klahssik can you understand whats onlined on the solder documentation website here ( http://docs.solder.io/ ) ?
If no - don't use solder and close your multiple open issues

no :(

im so irritated lol

Then close your multiple open issues @klahssik and follow https://technicpack.zendesk.com/hc/en-us/articles/204879815-How-To-Distribute-a-Modpack-Easy-Guide-for-Dummies

ok

same error didnt help at all nope same thing i even watched it twice

help! lol

@klahssik please stop spamming. Some people get a notification with your every post :/

As said previously, you're not an advanced user. I don't want to be rude but you should try creating modpacks the old way.
Please close your opened issues, as @bochen415 said we get notifications with all your spam.


Add debugging to build pipeline to test if storage tests are running …

…correctly

/azp run net - storage - tests

/azp run net - storage - tests

I figured out why the configuration wasn't getting set now so closing this PR.


CPLEX missing in Java wrapper

Hi,
We have tried using or-tools with java and CPLEX, but CPLEX does not show up in the java ENUM. Looking at the code at: https://github.com/google/or-tools/blob/master/ortools/linear_solver/java/linear_solver.i
It seems like it is missing in the java-thingy file. Simply adding CPLEX_[...] doesn't fix it. :dancing_women:
Although on a mailing list discussion (I assume) @lperron mentioned that he had already implemented the missing parts: https://groups.google.com/forum/#!msg/or-tools-discuss/DEM7ABXKrog/k-ibCdIpTmwJ
Is there any update on that?
Thanks in advance!
Stefan Hesse

This was pushed to github a few days ago.
Now, as I cannot deliver Cplex binaries, you need to build from sources.
Normally, (I have not done it for some times), install cplex somewhere, fill in the right variables in Makefile.local, make clean, make third_party should do the trick.

Hi,
thanks for taking the time!
I have checkout out the master and tried to compile, but I am receiving this error:
./ortools/linear_solver/cplex_interface.cc: In static member function 'static void operations_research::CplexInterface::MakeRhs(double, double, double&, char&, double&)':
./ortools/linear_solver/cplex_interface.cc:397:25: error: 'fabs' was not declared in this scope
                 (fabs(ub) == CPX_INFBOUND && fabs(lb) > CPX_INFBOUND) )
                         ^
In file included from ./ortools/base/logging.h:23:0,
                 from ./ortools/linear_solver/cplex_interface.cc:20:
/opt/or-tools/dependencies/install/include/glog/logging.h: In instantiation of 'std::__cxx11::string* google::Check_NEImpl(const T1&, const T2&, const char*) [with T1 = int; T2 = cpxenv*; std::__cxx11::string = std::__cxx11::basic_string<char>]':
./ortools/linear_solver/cplex_interface.cc:232:7:   required from here
/opt/or-tools/dependencies/install/include/glog/logging.h:718:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
 DEFINE_CHECK_OP_IMPL(Check_NE, !=)  // Use CHECK(x == NULL) instead.
                                ^
/opt/or-tools/dependencies/install/include/glog/logging.h:148:53: note: in definition of macro 'GOOGLE_PREDICT_TRUE'
 #define GOOGLE_PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
                                                     ^
/opt/or-tools/dependencies/install/include/glog/logging.h:718:1: note: in expansion of macro 'DEFINE_CHECK_OP_IMPL'
 DEFINE_CHECK_OP_IMPL(Check_NE, !=)  // Use CHECK(x == NULL) instead.
 ^
/opt/or-tools/dependencies/install/include/glog/logging.h: In instantiation of 'std::__cxx11::string* google::Check_NEImpl(const T1&, const T2&, const char*) [with T1 = int; T2 = cpxlp*; std::__cxx11::string = std::__cxx11::basic_string<char>]':
./ortools/linear_solver/cplex_interface.cc:237:7:   required from here
/opt/or-tools/dependencies/install/include/glog/logging.h:718:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
 DEFINE_CHECK_OP_IMPL(Check_NE, !=)  // Use CHECK(x == NULL) instead.
                                ^
/opt/or-tools/dependencies/install/include/glog/logging.h:148:53: note: in definition of macro 'GOOGLE_PREDICT_TRUE'
 #define GOOGLE_PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
                                                     ^
/opt/or-tools/dependencies/install/include/glog/logging.h:718:1: note: in expansion of macro 'DEFINE_CHECK_OP_IMPL'
 DEFINE_CHECK_OP_IMPL(Check_NE, !=)  // Use CHECK(x == NULL) instead.
 ^
g++ -fPIC -std=c++0x -fwrapv -O4 -DNDEBUG -I. -Iexamples -Iortools/gen -I/opt/or-tools/dependencies/install/include -DARCH_K8 -Wno-deprecated -I/opt/or-tools/dependencies/install/include -I/opt/or-tools/dependencies/install/include -I/opt/or-tools/dependencies/install/include/coin -DUSE_CBC -I/include -I/opt/or-tools/dependencies/install/include/coin -DUSE_CLP   -I/opt/gurobi//linux64/include -DUSE_GUROBI -I/cplex//cplex/include -DUSE_CPLEX -DUSE_GLOP -DUSE_BOP -I/opt/or-tools/dependencies/install/include -c ./ortools/linear_solver/linear_solver.cc -o objs/linear_solver/linear_solver.o
g++ -fPIC -std=c++0x -fwrapv -O4 -DNDEBUG -I. -Iexamples -Iortools/gen -I/opt/or-tools/dependencies/install/include -DARCH_K8 -Wno-deprecated -I/opt/or-tools/dependencies/install/include -I/opt/or-tools/dependencies/install/include -I/opt/or-tools/dependencies/install/include/coin -DUSE_CBC -I/include -I/opt/or-tools/dependencies/install/include/coin -DUSE_CLP   -I/opt/gurobi//linux64/include -DUSE_GUROBI -I/cplex//cplex/include -DUSE_CPLEX -DUSE_GLOP -DUSE_BOP -I/opt/or-tools/dependencies/install/include -c ./ortools/linear_solver/model_exporter.cc -o objs/linear_solver/model_exporter.o
makefiles/Makefile.gen.mk:2458: recipe for target 'objs/linear_solver/cplex_interface.o' failed
make: *** [objs/linear_solver/cplex_interface.o] Error 1
make: *** Waiting for unfinished jobs....
 ---> c916dbc077ce
Removing intermediate container cbace3d9de9e
Step 27/28 : RUN cd /opt/or-tools/ && make all
 ---> Running in 7b5a4caceb71
g++ -fPIC -std=c++0x -fwrapv -O4 -DNDEBUG -I. -Iexamples -Iortools/gen -I/opt/or-tools/dependencies/install/include -DARCH_K8 -Wno-deprecated -I/opt/or-tools/dependencies/install/include -I/opt/or-tools/dependencies/install/include -I/opt/or-tools/dependencies/install/include/coin -DUSE_CBC -I/include -I/opt/or-tools/dependencies/install/include/coin -DUSE_CLP   -I/opt/gurobi//linux64/include -DUSE_GUROBI -I/cplex//cplex/include -DUSE_CPLEX -DUSE_GLOP -DUSE_BOP -I/opt/or-tools/dependencies/install/include -c ./ortools/linear_solver/cplex_interface.cc -o objs/linear_solver/cplex_interface.o
./ortools/linear_solver/cplex_interface.cc: In static member function 'static void operations_research::CplexInterface::MakeRhs(double, double, double&, char&, double&)':
./ortools/linear_solver/cplex_interface.cc:397:25: error: 'fabs' was not declared in this scope
                 (fabs(ub) == CPX_INFBOUND && fabs(lb) > CPX_INFBOUND) )
                         ^
In file included from ./ortools/base/logging.h:23:0,
                 from ./ortools/linear_solver/cplex_interface.cc:20:
/opt/or-tools/dependencies/install/include/glog/logging.h: In instantiation of 'std::__cxx11::string* google::Check_NEImpl(const T1&, const T2&, const char*) [with T1 = int; T2 = cpxenv*; std::__cxx11::string = std::__cxx11::basic_string<char>]':
./ortools/linear_solver/cplex_interface.cc:232:7:   required from here
/opt/or-tools/dependencies/install/include/glog/logging.h:718:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
 DEFINE_CHECK_OP_IMPL(Check_NE, !=)  // Use CHECK(x == NULL) instead.
                                ^
/opt/or-tools/dependencies/install/include/glog/logging.h:148:53: note: in definition of macro 'GOOGLE_PREDICT_TRUE'
 #define GOOGLE_PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
                                                     ^
/opt/or-tools/dependencies/install/include/glog/logging.h:718:1: note: in expansion of macro 'DEFINE_CHECK_OP_IMPL'
 DEFINE_CHECK_OP_IMPL(Check_NE, !=)  // Use CHECK(x == NULL) instead.
 ^
/opt/or-tools/dependencies/install/include/glog/logging.h: In instantiation of 'std::__cxx11::string* google::Check_NEImpl(const T1&, const T2&, const char*) [with T1 = int; T2 = cpxlp*; std::__cxx11::string = std::__cxx11::basic_string<char>]':
./ortools/linear_solver/cplex_interface.cc:237:7:   required from here
/opt/or-tools/dependencies/install/include/glog/logging.h:718:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
 DEFINE_CHECK_OP_IMPL(Check_NE, !=)  // Use CHECK(x == NULL) instead.
                                ^
/opt/or-tools/dependencies/install/include/glog/logging.h:148:53: note: in definition of macro 'GOOGLE_PREDICT_TRUE'
 #define GOOGLE_PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
                                                     ^
/opt/or-tools/dependencies/install/include/glog/logging.h:718:1: note: in expansion of macro 'DEFINE_CHECK_OP_IMPL'
 DEFINE_CHECK_OP_IMPL(Check_NE, !=)  // Use CHECK(x == NULL) instead.
 ^
make: *** [objs/linear_solver/cplex_interface.o] Error 1
makefiles/Makefile.gen.mk:2458: recipe for target 'objs/linear_solver/cplex_interface.o' failed
The command '/bin/sh -c cd /opt/or-tools/ && make all' returned a non-zero code: 2
ERROR: Job failed: exit code 2

I have create a docker file to compile, which works for version 6.0:
FROM ***:5000/octave4withjava:v01
MAINTAINER Stefan Hesse

ENV GUROBI_INSTALL /opt/gurobi
ENV GUROBI_HOME $GUROBI_INSTALL/linux64
ENV PATH $PATH:$GUROBI_HOME/bin
ENV LD_LIBRARY_PATH $GUROBI_HOME/lib

ARG GUROBI_MAJOR_VERSION=7.0
ARG GUROBI_LIB_VERSION=70
ARG GUROBI_VERSION=7.0.2
ARG user=gurobi
ARG group=gurobi
ARG uid=1000
ARG gid=1000

RUN apt-get update && apt-get -y upgrade
RUN apt-get -y install make git bison python-setuptools python-dev flex autoconf libtool zlib1g-dev texinfo help2man gawk g++ curl texlive cmake subversion swig

RUN addgroup --gid ${gid} ${group}                                           && \
    adduser -h /home/gurobi -u ${uid} -G ${group} -s /bin/bash -D ${user}
    # Install latest glibc
    #export GLIBC_VERSION=2.23-r3

# Install gurobi

RUN    mkdir -p ${GUROBI_INSTALL}                                                                                && \
    wget -P /home/gurobi/ http://packages.gurobi.com/${GUROBI_MAJOR_VERSION}/gurobi${GUROBI_VERSION}_linux64.tar.gz && \
    tar xvfz /home/gurobi/gurobi${GUROBI_VERSION}_linux64.tar.gz

RUN    mv /gurobi702/linux64/ ${GUROBI_INSTALL}                                                                        && \
    # Clean up
    rm -rf ${GUROBI_HOME}/docs                             && \
    rm -rf ${GUROBI_HOME}/examples                         && \
    rm -rf ${GUROBI_HOME}/src                              && \
    rm -rf /var/cache/apk/*                                && \
    rm -rf /tmp/*                                          && \
    rm -rf /var/log/*                                      && \
    rm -rf /gurobi${GUROBI_LIB_VERSION}                                      && \
    rm /home/gurobi/gurobi${GUROBI_VERSION}_linux64.tar.gz

RUN mkdir /cplex
COPY ./cplex /cplex

#RUN mkdir /opt/or-tools && cd /opt/or-tools
# COPY v6.0-MASTER.tar.gz /opt/or-tools
#RUN cd /opt/or-tools && tar -xvzf v6.0-MASTER.tar.gz

# Pull master from github
RUN cd /opt/ && git clone https://github.com/google/or-tools.git

#COMPILE OR TOOLS
RUN cd /opt/or-tools && make -j 9 third_party
RUN echo "UNIX_GUROBI_DIR = /opt/gurobi/" >> /opt/or-tools/Makefile.local
RUN echo "UNIX_CPLEX_DIR = /cplex/" >> /opt/or-tools/Makefile.local
RUN echo "GUROBI_LIB_VERSION = ${GUROBI_LIB_VERSION}" >> /opt/or-tools/Makefile.local
RUN cd /opt/or-tools/ && make -j 9 all; exit 0
RUN cd /opt/or-tools/ && make all
RUN cd /opt/or-tools/ && make java test_java
#RUN mv /opt/or-tools/lib/libortools.so /

Are there any mistakes on my end, maybe something wrong with adding CPLEX?
If you want to try it yourself, it should work if you pull from FROM ubuntu:16.04, the original base image just installs other stuff.
The cplex-dir contains the following on the first level:
drwxrwxr-x 10 stefan stefan 4096 Jul 12 12:23 .
drwxrwxr-x  5 stefan stefan 4096 Jul 19 12:36 ..
drwxrwxr-x  4 stefan stefan 4096 Jul 12 12:23 concert
drwxrwxr-x  8 stefan stefan 4096 Jul 12 12:23 cplex
drwxrwxr-x  6 stefan stefan 4096 Jul 12 12:23 cpoptimizer
drwxrwxr-x  3 stefan stefan 4096 Jul 12 12:23 doc
drwxrwxr-x  2 stefan stefan 4096 Jul 12 12:23 license
drwxrwxr-x  8 stefan stefan 4096 Jul 12 12:23 opl
drwxrwxr-x  3 stefan stefan 4096 Jul 12 12:23 properties
-rwxrwxr-x  1 stefan stefan 9551 Jul 12 12:23 README.html
drwxrwxr-x  3 stefan stefan 4096 Jul 12 12:23 Uninstall

I have checked  building with cplex recently and it worked. This I will close this issue.


Is it possible to add built-in policy definition into custom initiative?

Hello,
I'm a little confused since there is no example (or at least I did not find one) showing how to add built-in policy definition into custom initiative definition. Example is below of what I would like to be inside custom policy definition.
 {
      "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/564feb30-bf6a-4854-b4bb-0d2d2d1e6c66",
      "parameters": {
        "effect": {
          "value": "Deny"
        }
      },
      "policyDefinitionReferenceId": "Enforce use of WAF on application gateways",
      "groupNames": []
    }

Yes, that is allowed

I created a new issue to track improving the documentation. I'm closing this issue.

You can use one of the following two approaches:

policyDefinitionId - this is the preferred way for built-ins - Do NOT use for custom - Completely remove policyDefinitionName
policyDefinitionName this works for built-ins  and is the only way for custom


feat: Update XION requirements for v50

Heighliner struggles to build v50 cosmos projects because it is missing ld, this prebuild step adds it

Closing this one in luei of
https://github.com/strangelove-ventures/heighliner/pull/295


Initialization of the db

I tried launching the repository with the new configuration file.
Initially I got an error message stating that the currently open DB (called cis) could not be dropped. So I connected to the postgres server and deleted the DB manually. Then I re-launched the command and now I get this message:
><EMAIL_ADDRESS>dev
> nodemon dist/server.js --config

[nodemon] 3.0.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node dist/server.js`
/Users/ftomassetti/repos/lionweb-repository/node_modules/pg-protocol/dist/parser.js:283
        const message = name === 'notice' ? new messages_1.NoticeMessage(length, messageValue) : new messages_1.DatabaseError(messageValue, length, name);
                                                                                ^

error: database "cis" does not exist
    at Parser.parseErrorMessage (/Users/ftomassetti/repos/lionweb-repository/node_modules/pg-protocol/dist/parser.js:283:98)
    at Parser.handlePacket (/Users/ftomassetti/repos/lionweb-repository/node_modules/pg-protocol/dist/parser.js:122:29)
    at Parser.parse (/Users/ftomassetti/repos/lionweb-repository/node_modules/pg-protocol/dist/parser.js:35:38)
    at Socket.<anonymous> (/Users/ftomassetti/repos/lionweb-repository/node_modules/pg-protocol/dist/index.js:11:42)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Readable.push (node:internal/streams/readable:234:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
  length: 89,
  severity: 'FATAL',
  code: '3D000',
  detail: undefined,
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'postinit.c',
  line: '1019',
  routine: 'InitPostgres'
}

Node.js v18.14.0
[nodemon] app crashed - waiting for file changes before starting...

Maybe this is expected, and we should create the DB before starting the server. In #61 it was proposed to add the flag --create-database, but I think it is not yet there.
Maybe I should call POST /createRepository, but I cannot as the server fails at starting time

Maybe we should use a differently configured connection to run the create database statement

There is a config option in the server-config.json file to create the database, did you try this?

Yes, and the part creating the DB seems to be causing this issue

I am doing some experiments, and I seem to get a different error if I change a couple of things:
export const CREATE_CONFIG: PostgresConfig = {
   host: ServerConfig.getInstance().pgHost(),
   port: ServerConfig.getInstance().pgPort(),
   user: ServerConfig.getInstance().pgUser(),
   password: ServerConfig.getInstance().pgPassword(),
   database: "postgres", // added this
   ssl: pgSSLConf // and this: null in this case, but it could be potentially useful
}
``

Changed:

async queryWithoutRepository(query: string) {
    return await this.dbConnection.query(query)
}

Into:

async queryWithoutRepository(query: string) {
    return await this.postgresConnection.query(query)
}

Ok, If I do these changes I can then get the database created (it then crash later):
CREATE DATABASE ${ServerConfig.getInstance().pgDb()}
    WITH
    OWNER = '${ServerConfig.getInstance().pgUser()}'
    ENCODING = 'UTF8'
    LC_COLLATE = 'en_US.utf8' // change it to en_US.UTF-8
    LC_CTYPE = 'en_US.utf8' // change it to en_US.UTF-8
    LOCALE_PROVIDER = 'libc'
    TABLESPACE = pg_default // I remove this line, so that it defaults to pg_default anyway but with this it fails. See: https://dba.stackexchange.com/questions/204807/why-do-i-get-a-postgresql-permission-error-when-specifying-a-tablespace-in-the
    CONNECTION LIMIT = -1
    IS_TEMPLATE = False;

Maybe we should use a differently configured connection to run the create database statement

That is actually done using the postgressConnection in DbAdminApiWorker.ts

Could you send your original config file that went wrong? Would like to double-check whether that is ok

I can reproduce the issue also with the newest version.
There is a small issue with passing the config parameter (I will send a PR for that). Once that is out of the way, I can still see the query for creating the DB fail.
The configuration (redacted) is:
{
  "server": {
    "serverPort": 3005,
    "expectedToken": "YYYYYYYY",
    "bodyLimit": "500mb"
  },
  "startup": {
    "createDatabase": true,
    "createRepositories": [
      {
        "name": "default",
        "history": false
      }    ]
  },
  "logging": {
    "request": "info",
    "database": "silent",
    "express": "silent"
  },
  "postgres": {
    "database": {
      "host": "localhost",
      "user": "cis",
      "db": "cis",
      "password": "XXXXXXXX",
      "port": "5432"
    },
    "certificates": {
      "rootcert": null,
      "rootcertcontent": null
    }
  }
}

When starting the server, it attempts creating the database but that fail:
/home/cis/repos/lionweb-repository/node_modules/pg-protocol/dist/parser.js:283                                                          │
        const message = name === 'notice' ? new messages_1.NoticeMessage(length, messageValue) : new messages_1.DatabaseError(messageVal│
ue, length, name);                                                                                │
                                                                                ^                                      │
                                                                                │
error: database "cis" does not exist                                                                                │
    at Parser.parseErrorMessage (/home/cis/repos/lionweb-repository/node_modules/pg-protocol/dist/parser.js:283:98)                     │
    at Parser.handlePacket (/home/cis/repos/lionweb-repository/node_modules/pg-protocol/dist/parser.js:122:29)                          │
    at Parser.parse (/home/cis/repos/lionweb-repository/node_modules/pg-protocol/dist/parser.js:35:38)                                  │
    at Socket.<anonymous> (/home/cis/repos/lionweb-repository/node_modules/pg-protocol/dist/index.js:11:42)                             │
    at Socket.emit (node:events:517:28)                                                                                │
    at addChunk (node:internal/streams/readable:368:12)                                                                                │
    at readableAddChunk (node:internal/streams/readable:341:9)                                                                          │
    at Readable.push (node:internal/streams/readable:278:10)                                                                            │
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {                                                                    │
  length: 89,                                                                                │
  severity: 'FATAL',                                                                                │
  code: '3D000',                                                                                │
  detail: undefined,                                                                                │
  hint: undefined,                                                                                │
  position: undefined,                                                                                │
  internalPosition: undefined,                                                                                │
  internalQuery: undefined,                                                                                │
  where: undefined,                                                                                │
  schema: undefined,                                                                                │
  table: undefined,                                                                                │
  column: undefined,                                                                                │
  dataType: undefined,                                                                                │
  constraint: undefined,                                                                                │
  file: 'postinit.c',                                                                                │
  line: '1019',                                                                                │
  routine: 'InitPostgres'                                                                                │
}

(sorry for the extra pipe characters, I am copying the text from a console splitted in half).
If I change the CREATE_CONFIG to specify the postgres database, I get a different error about LC_COLLATE, but I think I get over this one:
export const CREATE_CONFIG: PostgresConfig = {
    host: ServerConfig.getInstance().pgHost(),
    port: ServerConfig.getInstance().pgPort(),
    user: ServerConfig.getInstance().pgUser(),
    password: ServerConfig.getInstance().pgPassword(),
    database: "postgres" // ADDED
}

My understanding of the issue is that creating a database means operating on the maintenance database. If we do not specify a database, we connect by default to the database named after the user (cis in this case). However, in this case we should connect to the maintenance database (postgres) in order to create the database. So I think that CREATE_CONFIG would work only when the username is the same as the maintenance database. That is typically the case for the user postgres.
So I think we may need to add an extra parameter to the configuration, called maintenanceDb, which would default to postgres. We should then use that value in CREATE_CONFIG.

If I then do the change specified above I get the following error:
error: new collation (en_US.utf8) is incompatible with the collation of the template database (en_US.UTF-8)                             │
    at Parser.parseErrorMessage (/home/cis/repos/lionweb-repository/node_modules/pg-protocol/dist/parser.js:283:98)                     │
    at Parser.handlePacket (/home/cis/repos/lionweb-repository/node_modules/pg-protocol/dist/parser.js:122:29)                          │
    at Parser.parse (/home/cis/repos/lionweb-repository/node_modules/pg-protocol/dist/parser.js:35:38)                                  │
    at Socket.<anonymous> (/home/cis/repos/lionweb-repository/node_modules/pg-protocol/dist/index.js:11:42)                             │
    at Socket.emit (node:events:517:28)                                                                                │
    at addChunk (node:internal/streams/readable:368:12)                                                                                │
    at readableAddChunk (node:internal/streams/readable:341:9)                                                                          │
    at Readable.push (node:internal/streams/readable:278:10)                                                                            │
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {                                                                    │
  length: 241,                                                                                │
  severity: 'ERROR',                                                                                │
  code: '22023',                                                                                │
  detail: undefined,                                                                                │
  hint: 'Use the same collation as in the template database, or use template0 as template.',                                            │
  position: undefined,                                                                                │
  internalPosition: undefined,                                                                                │
  internalQuery: undefined,                                                                                │
  where: undefined,                                                                                │
  schema: undefined,                                                                                │
  table: undefined,                                                                                │
  column: undefined,                                                                                │
  dataType: undefined,                                                                                │
  constraint: undefined,                                                                                │
  file: 'dbcommands.c',                                                                                │
  line: '1134',                                                                                │
  routine: 'createdb',                                                                                │
  query: '\n' +                                                                                │
    'CREATE DATABASE cis\n' +                                                                                │
    '    WITH\n' +                                                                                │
    "    OWNER = 'cis'\n" +                                                                                │
    "    ENCODING = 'UTF8'\n" +                                                                                │
    "    LC_COLLATE = 'en_US.utf8'\n" +                                                                                │
    "    LC_CTYPE = 'en_US.utf8'\n" +                                                                                │
    "    LOCALE_PROVIDER = 'libc'\n" +                                                                                │
    '    TABLESPACE = pg_default\n' +                                                                                │
    '    CONNECTION LIMIT = -1\n' +                                                                                │
    '    IS_TEMPLATE = False',                                                                                │
  params: undefined                                                                                │
}

This issue disappears if I change these two lines:
    LC_COLLATE = 'en_US.UTF-8' // was en_US.utf8
    LC_CTYPE = 'en_US.UTF-8' // was en_US.utf8

And this leads to get a different problem... :D

The next problem is now about tablespace:
error: permission denied for tablespace pg_default                                                                                │
    at Parser.parseErrorMessage (/home/cis/repos/lionweb-repository/node_modules/pg-protocol/dist/parser.js:283:98)                     │
    at Parser.handlePacket (/home/cis/repos/lionweb-repository/node_modules/pg-protocol/dist/parser.js:122:29)                          │
    at Parser.parse (/home/cis/repos/lionweb-repository/node_modules/pg-protocol/dist/parser.js:35:38)                                  │
    at Socket.<anonymous> (/home/cis/repos/lionweb-repository/node_modules/pg-protocol/dist/index.js:11:42)                             │
    at Socket.emit (node:events:517:28)                                                                                │
    at addChunk (node:internal/streams/readable:368:12)                                                                                │
    at readableAddChunk (node:internal/streams/readable:341:9)                                                                          │
    at Readable.push (node:internal/streams/readable:278:10)                                                                            │
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {                                                                    │
  length: 103,                                                                                │
  severity: 'ERROR',                                                                                │
  code: '42501',                                                                                │
  detail: undefined,                                                                                │
  hint: undefined,                                                                                │
  position: undefined,                                                                                │
  internalPosition: undefined,                                                                                │
  internalQuery: undefined,                                                                                │
  where: undefined,                                                                                │
  schema: undefined,                                                                                │
  table: undefined,                                                                                │
  column: undefined,                                                                                │
  dataType: undefined,                                                                                │
  constraint: undefined,                                                                                │
  file: 'aclchk.c',                                                                                │
  line: '2807',                                                                                │
  routine: 'aclcheck_error',                                                                                │
  query: '\n' +                                                                                │
    'CREATE DATABASE cis\n' +                                                                                │
    '    WITH\n' +                                                                                │
    "    OWNER = 'cis'\n" +                                                                                │
    "    ENCODING = 'UTF8'\n" +                                                                                │
    "    LC_COLLATE = 'en_US.UTF-8'\n" +                                                                                │
    "    LC_CTYPE = 'en_US.UTF-8'\n" +                                                                                │
    "    LOCALE_PROVIDER = 'libc'\n" +                                                                                │
    '    TABLESPACE = pg_default\n' +                                                                                │
    '    CONNECTION LIMIT = -1\n' +                                                                                │
    '    IS_TEMPLATE = False',                                                                                │
  params: undefined                                                                                │
}

Wow!

The reason for not having a database in the CREATE_CONFIG is that it is used to create a database, therefore it doesn't need a database connection but a postgres connection without database.
The [database cis](error: database "cis" does not exist) is most probably because of one of

the DROP DATABASE IF EXISTS cis WITH (FORCE); query. Don't understand why it is sometimes a problem (in your postgres setup) and sometimes not (my postgres setup) , or
creating the repository specified in the config file in the 'cis' database. In this case I would have expected that the database creating has failed and would give an error.

You could try the original setup with an empty createRepositories (case 2 won't happen) to see whether the database creation query is the one failing.

the DROP DATABASE IF EXISTS cis WITH (FORCE); query. Don't understand why it is sometimes a problem (in your postgres setup) and sometimes not (my postgres setup) , or

If there was an issue due to drop database requiring the database to be present (basically ignoring the IF EXISTS part), then I would expect it to fail, even when I specify postgres as the connection database for this query

creating the repository specified in the config file in the 'cis' database. In this case I would have expected that the database creating has failed and would give an error.

I am not sure I understand this point. I think the database creation fails, so we do not arrive to the point where we try to create the repository within the database

The reason for not having a database in the CREATE_CONFIG is that it is used to create a database, therefore it doesn't need a database connection but a postgres connection without database.

I found this resource stating:

You have to connect to a database. Which database you could use for a "maintenance database" depends on the installation and the subsequent administration.

Another answer states:

As the manual of pg_connect says the dbname parameter in the connection string defaults to the value of the user parameter.

I tried looking up the manual of pgPromise but I did not find a definitive answer there.
I also verified that if I run from the CLI:
// Here I do not specify the database
psql -d postgresql://cis:<my password>@localhost:5432 -c "DROP DATABASE IF EXISTS cis WITH (FORCE)"
psql: error: connection to server at "localhost" (::1), port 5432 failed: FATAL:  database "cis" does not exist

// Here I specify the postgres database
psql -d postgresql://cis:<my password>@localhost:5432/postgres -c "DROP DATABASE IF EXISTS cis WITH (FORCE)"
DROP DATABASE

It succeeds specifying the database and fails without

Ok, looks like we need to specify the admin database indeed.

I also tried this:
// at this time database cis exists
psql -d postgresql://cis:<password>@localhost:5432 -c "DROP DATABASE IF EXISTS foo WITH (FORCE)"
NOTICE:  database "foo" does not exist, skipping
DROP DATABASE

But if I delete the cis database and try again:
psql -d postgresql://cis:<password>@localhost:5432 -c "DROP DATABASE IF EXISTS foo WITH (FORCE)"
psql: error: connection to server at "localhost" (::1), port 5432 failed: FATAL:  database "cis" does not exist

Even if I am trying to delete foo it is complaining about cis not existing

Trying to run this branch locally. Interstuingly you get
error: new collation (en_US.utf8) is incompatible with the collation of the template database (en_US.UTF-8)                            while I get
error: new collation (en_US.UTF-8) is incompatible with the collation of the template database (en_US.utf8)│
Exactly the opposite :-). It seems that this is something that is set when creating the postgres instance.

I also tried this:
// at this time database cis exists
psql -d postgresql://cis:<password>@localhost:5432 -c "DROP DATABASE IF EXISTS foo WITH (FORCE)"
NOTICE:  database "foo" does not exist, skipping
DROP DATABASE

But if I delete the cis database and try again:
psql -d postgresql://cis:<password>@localhost:5432 -c "DROP DATABASE IF EXISTS foo WITH (FORCE)"
psql: error: connection to server at "localhost" (::1), port 5432 failed: FATAL:  database "cis" does not exist

Even if I am trying to delete foo it is complaining about cis not existing
This might be because the connection string uses cis in postgresql://cis:<password>@localhost:5432

Adding TEMPLATE = template0 in create-database-sql.ts solves the collation error.

@ftomassetti There is so much information above, are there still open problems, or has everything been resolved?


revamp webOS command system

fix #6
Screencast from 2024-12-24 15-07-58.webm
Screencast from 2024-12-22 22-54-21.webm

@AbhigyaKrishna
raised a new pr, this doesn't have any conflict.
It should work well.
Please review


Go to definition error on /COPY (with comments)

When there is comments after the /COPY command, the "Go to definition" command dosn't work.

See the PR #260


Corrected backside length in dark mode

Related Issue
Fixes:  #2686
Description
I shortened the back-side of the card in dark mode.

#2686
Type of PR

[x] Bug fix
[ ] Feature enhancement
[ ] Documentation update
[ ] Other (specify): _______________

Screenshots / videos (if applicable)

Checklist:

[x] I have made this change from my own.
[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] I have made corresponding changes to the documentation.
[x] My changes generate no new warnings.
[x] I have tested the changes thoroughly before submitting this pull request.
[x] I have provided relevant issue numbers and screenshots after making the changes.

@huamanraj please check.

the change is soo insignificant for a level!


Flutter macOS support

:bulb: Motivation and Context
Relates to https://github.com/PostHog/posthog-flutter/issues/51
:green_heart: How did you test it?
Running the example on macOS
:pencil: Checklist

[x] I reviewed the submitted code.
[ ] I added tests to verify the changes.
[ ] I updated the docs if needed.
[x] No breaking change or entry added to the changelog.

Waiting https://cocoapods.org/pods/PostHog shows the RC.1 version before merging


[enhancement] Globally activate/deactivate communication with AC

Use case:
A global variable to activate/deactivate the communication of all tapir components with archicad would be nice, just to avoid time taking updates when tweaking some parameter in GH.
Implementation proposal:

Controlled by an input only component.

The component should implement a "singleton pattern", so only one copy of the component can exist on the GH canvas.

For global accessibility, the boolean "activateCommunication" flag should be stored at sticky

All communication triggering commands should be preceded by  "communicate" flag state check . The checking method will be stored at the module file.

Good idea!

This is possible using the Handshake Component.


Sc.

Describe the bug

Expected behaviour

Related discussion

Additional notes

Describe the bug

Expected behaviour

Related discussion

Additional notes

Dc.  F


Leetcode Question No. 79: Word Search Time Limit Exceeded

Question No. 79: Word Search, which can be found in the backtracking category, has a solution that exceeds the time limit. I checked by copying the code directly too, and it still threw the error.

In which language? Java code is getting accepted in leetcode without issues.

This issue is with the Python solution.

Can you please retest it to see if it's giving Time Limit Exceeded? On my end, the provided solution has a runtime of 7,000-8,500ms and the maximum runtime allowed is 10,000ms.

As it can be seen below, these tests were done in Python and Python3.

Here is the screenshot of the Leetcode page using the solution.


项目不能运行

按照步骤操作怎么不能运行呢

Closing and there has been no activity for a while, if this is still the case, please feel free to reopen


Add missing keys to EventModifierFlag

Completes it with shift, function, help, numpad keys
https://developer.apple.com/documentation/appkit/nseventmodifierflags?language=objc

Merged. Thanks!


Lost DFI   BSC->Defichain Wallet

Hello,
after several tries since yesterday evening to save it by myself I need to ask for some help.
I sent 196.8 bridged DFI from Metamask via Defichain Bridge to my Defichain wallet, the procedure got stuck whilst having the 5 confirmations screen.
I've waited for an hour but I finally refreshed the site and the ongoing transaction was gone.
So I tried the recovery funtion a few times.
First result was "network error failed to fetch" or similiar,
Later it only was "failed to fetch",
And today I got "Broadcasted raw tx:<PHONE_NUMBER>2d5cdf2d47f422ea8d9399084096aeb77b1fddd7e64adf86f388b6750a811a88010000006b483045022100cd7d86888fb724af170d23879c5390075b17ffeee0d1c0d9185ec38f2319f90b022035fbbc04130a27ead33023215bf10e473fb71b05cbe6811909124897b1b23d930121035cb44763cf4128c598bba5999c65b89bfd4cfe9a602f04c4b099e34f539cff10ffffffff0290c0339504000000160014358f3095dc6492d443381203d607efba89d625846eb860b7320000001976a914277dd7751c8ca374148b1e1751daf03f7d9bea2c88ac00000000"
All errors were both on Firefox and Brave, just in case it matters.
sending from Metamask: https://bscscan.com/address/0x563da6d351958bd657d25bbd371d996047a35d9b
TxHash: 0x36388f2024f200b7e5a057af1504b7432f793e62909740400de633f68274bd88
receiving Defichain Wallet: https://defiscan.live/address/df1qxk8np9wuvjfdgseczgpavpl0h2yavfvy7xdllg
Kind regards Kevin

Thank you for helping me out :)


[JN-1202] create enforceportalenrolleeperm

DESCRIPTION (include screenshots, and mobile screenshots for participant UX)
Based on feedback from a PR last week - creates a new permission that also loads an enrollee and tries it out on the ProfileExtService
TO TEST:  (simple manual steps for confirming core behavior -- used for pre-release checks)

Nothing to test, just observe tests

You need to add a test that the enforcement code actually works, in addition to the annotation-detecting test

Is there a particular place we test these, other than (in this case) on ProfileExtService? I couldn't find a place, if there is one, so I added tests to ProfileExtServiceTests


Writing tags to the cloud

Is your feature request related to a problem? Please describe.
As a platform operator I would like to write tags to the cloud from Collie so I can fix any incompliances, e.g. some tenants are missing a cost center tag.
Reach of the feature request
Platform operators using tags or those that forgot to standardize some tags.
Impact of the feature request
We currently offer the analyze-tags command which is helpful to identify gaps, but if I want to fix the issue, I still have to hop into the actual cloud platforms.
How would a solution look like?
collie tags set-missing --tags cost_center would go into a mode where it ask per tenant that misses that tag:
What should the value be of cost_center? The user can type in the value and Collie will submit the result to the cloud platform.
(optional) Implementation Hints
Any hints that could help implementation?
Make sure to write the result to the cache.
Make sure to rename collie tenant analyze-tags to collie tags analyze-missing.
Try to catch exceptions for incompliant tags ,e.g. GCP has a lot of requirements.

Just to check the state of this, collie tag --help currently lists that command as a possibility
 Usage:   collie tag
  Version: 0.9.1

  Description:

    Work with cloud tenants (AWS Accounts, Azure Subscriptions, GCP Projects) and list all of them, or see tags, costs, and more. Run "collie
    tenant -h" to see what is possible.

  Options:

    -h, --help               - Show this help.
    -o, --output  [output]   - Defines the output format.                        (Default: "table")
    --debug       [boolean]  - Display debug logs                                (Default: false)
    --verbose     [boolean]  - Display underlying individual cloud CLI commands  (Default: false)

  Commands:

    analyze-missing            - Analyzes all available tags on tenants and returns the percentage of tenants
                                 that make use of this tag.
    set-missing      <tagKey>  - Fix all tenants missing the given tag. Collie will ask you per tenant what the
                                 value should be and writes the change to the cloud platform(s).

And btw. the description looks like a copy paste from collie tenant command

Closed due to lack of community interest - feel free to revive discussion at https://github.com/meshcloud/collie-cli/discussions


chore(CI): add automatic release

@eslint-community/eslint-tsc In order to make the automatic release work, we should add the NPM_TOKEN secret in the Action secret settings.
I think it's best to set a PAT for the eslint-community-bot npm user btw.

This branch depends on #313
Closes #301

This PR is inspired by what I did for @mysticatea/eslint-plugin in https://github.com/eslint-community/mysticatea__eslint-plugin/pull/8

I added an npm automation token as NPM_TOKEN at the organization level. To be safe it’s not enabled for any repos. You can enable it just for the repos that need it.

@MichaelDeBoey how will the automatic releases work? When will they happen? And what if we want to do a single release with multiple changes?

I added an npm automation token as NPM_TOKEN at the organization level.

@nzakas Thanks! 🙏

how will the automatic releases work? When will they happen?

@bmish semantic-release will take care of the release on every commit that's done to the main/next/alpha/beta branch
It will look at the commit message  & release a patch version for fix, a minor version for feat & a major version for every commit that has a BREAKING CHANGE in their body
More info on how they work, can be found at https://github.com/semantic-release/semantic-release#how-does-it-work

what if we want to do a single release with multiple changes?

You can create pre-releases when pushing to the alpha/beta branch. Each commit will still be released, but not for people who install the package normally, only for people who use the -alpha.X/-beta.X suffix or alpha/beta token (like npm install eslint-plugin-eslint-plugin@alpha).
Have a look at how this is working for testing-library-eslint-config:

https://github.com/testing-library/eslint-plugin-testing-library/releases
https://www.npmjs.com/package/eslint-plugin-testing-library?activeTab=versions

Is this compatible with the conventional commits we currently use? https://github.com/eslint-community/eslint-plugin-eslint-plugin/pull/221

Should we add the github badge so people know things will be released automatically?

Was going to cleanup the badges in a separate PR

Should we get rid of release-it at this point to avoid having multiple systems in place for releasing?

Indeed a good idea to remove it

Is this compatible with the conventional commits we currently use?

Yes it very much is!
The docs I referenced are even mentioning commitizen & commitlint

Tools such as commitizen or commitlint can be used to help contributors and enforce valid commit messages.


Please invite me to the GitHub Community Organization

Name
Sri Subathra Devi B
Discord Username (if applicable)
Subathra#9802
Additional Context
No response

Welcome to this community @Subathra19 😀Happy to have you here at EddieHub 🎉🎉

Welcome to the amazing EddieHub community, @Subathra19! We're glad you've joined us! 😄👍🎉


Go with blocking I/O

While this is not regular Go program, it's interesting.

I wasn't aware that file operations behaved differently from network operations in this way..?
Do you have a link to the documentation or something where this is explained?
Also, I'd like this to be in a separate directory inside servers/; each directory should contain only one implementation. If you could make the PR use a directory gobio (for "Go blocking I/O") instead, that would be great.

You can easily confirm with strace.
On Linux, file I/O doesn't support blocking I/O.  Many event-driven framework use threadpool for file operation.  In golang, monitor thread detects blocked system call and assign new thread to waiting goroutines.
Here is source code of net's Read():
https://github.com/golang/go/blob/master/src/net/fd_unix.go#L228-L234
As you can see, try (non-blocking) read, and if EAGAIN, pd.WaitRead(). It's epoll on Linux.
Here is file's Read():
https://github.com/golang/go/blob/master/src/os/file_unix.go#L211
It just calls (blocking) read syscall once.

Benchmarking this would certainly be interesting. If you move it into its own directory, I'll merge and benchmark.

And here is how TCPConn.File() works:
https://github.com/golang/go/blob/master/src/net/net.go#L239-L240
https://github.com/golang/go/blob/master/src/net/fd_unix.go#L534-L549
It dup() fd and set blocking mode.

Almost there. go/Makefile still contains rm blocking.

fixed.

+1
want to see this benchmark

Thank you @methane!
I'll post benchmark results as soon as I have them.

Benchmark results are now up. Performance is much better, though I'm also seeing quite a lot of variance in the results for go-blocking -- not entirely sure why that is.


DRILL-5669: Add a configurable option for minimum memory allocation t…

…o buffered ops
Added the option "planner.memory.min_memory_per_buffered_op" to enforce a minimum memory allocation to all buffered ops instances (i.e., External Sort or Hash Agg (either phase)).
Default value setting is 40 MB (to cover cases of a large incoming batch, while the query's memory divided among all buffered ops results in a small share per each).
There is a small risk of total allocation by default (i.e. 40MB * num-ops) may exceed the query's total memory; but this happens anyway with "uncontrolled" ops like hash join.

Did we want to increase the default max memory per query from 2 GB to 4 GB as Aman suggested?

Increasing 2gb --> 4gb may have some visible impact on existing installations, so would need some more testing. This could add a delay to the 1.11 schedule ...

Increasing the minimum means each sort uses more memory than before. This means that the query uses more memory than the 2 GB the user has allotted. Drill cannot create new memory, so that memory is coming from somewhere. So, you are right that increasing memory has impact, but we've already incurred that impact by increasing the minimum (that's why we did it.)
So, I'm asking if we should increase the aggregate maximum to reflect that memory use is no longer constrained by the per-query maximum.


Comment Thread API: Newly created comment threads no longer auto-focus

Version: 1.90.0 (Universal)
Commit: 89de5a8d4d6205e5b11647eb6a74844ca23d2573
Date: 2024-06-04T19:34:44.157Z
Electron: 29.4.0
ElectronBuildId: 9593362
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Darwin arm64 22.1.0
Description
Our VSCode extension relies on the comment thread API (createCommentThread via a CommentController) to create an input box that can receive user input. On VS Code versions 1.89.1 and before, the comment threads created via this API would be auto-focused and in an expanded state:

However, starting on version 1.90.0, the comment thread is created in a closed state:

This is undesirable, since it takes an additional click to start entering text into the comment thread.
Is this something that we can configure on our side? If it's a helpful reference, there seem to be a couple of changes on the VS Code side relating to the focus / reveal of comment threads:

https://github.com/microsoft/vscode/pull/212153
https://github.com/microsoft/vscode/pull/213910

Yes, I have this too, very annoying.

I can't reproduce this. Can you share a code snippet?

Hi @alexr00, I'm a Codium user and I can reproduce it by adding the Codeium extension and pressing Cmd + I to open a refactor panel. Not sure about snippet because I'm not a Codeium developer.

I can't reproduce this. Can you share a code snippet?

@alexr00 Thanks for the reply! I believe the following is a minimal example, let me know if it works for you:

Create a comment controller

this.commentController = vscode.comments.createCommentController(
      "codeium-command",
      "CodeiumCommand"
);

Create a comment thread with any doc and range

const commentThread = this.commentController.createCommentThread(
      docUri,
      range,
      []
);
commentThread.label = "Codeium Command";
commentThread.collapsibleState =
      vscode.CommentThreadCollapsibleState.Expanded;

Expected behavior: opens the comment thread where the input is auto-focused
Actual behavior: open the comment thread but the input is closed

Hmm. I'm doing basically the same thing, but I can't repro. I've pushed my test command to the comment sample. You can see the change here: https://github.com/microsoft/vscode-extension-samples/compare/alexr00/createEditableThread?expand=1, and you can clone that repo and check out the alexr00/createEditableThread branch to try it out.

I tested out the change and it seems like it opens the comment box with an existing comment box in edit mode. While this does open the input to be focused, it also adds a "Reply" at the bottom of the comment box which is undesirable.
const thread = commentController.createCommentThread(vscode.window.activeTextEditor.document.uri, new vscode.Range(line, 0, line, 0), [new NoteComment('', vscode.CommentMode.Editing, { name: 'vscode' })]);

If I remove the comment and start with an empty thread, we're back at the original issue which is that the comment box is not open
const thread = commentController.createCommentThread(vscode.window.activeTextEditor.document.uri, new vscode.Range(line, 0, line, 0), []);

@alexr00 Is there a way for us to:

Open the comment box with the input focused
No existing comments / reply at the bottom
Thank you!

Thanks for finding the difference between our samples!

@alexr00 thqnk you for the swift fix!

@alexr00 Thank you!! Is there a rough estimate on when this might make it to the next VS Code release?

We aren't planning on having another recovery release, so you can see our next approximate release time in the iteration plan.

This bug has been fixed in the latest release of VS Code Insiders!
@1matthewli, you can help us out by commenting /verified if things are now working as expected.
If things still don't seem right, please ensure you're on version 4580ba51fe1914ca29916f829adb35930089b013 of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.
Happy Coding!

My change for this is causing a bad experience for several extensions: https://github.com/microsoft/vscode/issues/223842
It's a common pattern for extensions to call createCommentThread and pass in [] for the comments. Because of my change, this now results in the comment reply editor always being expanded for threads created like this.
https://github.com/microsoft/vscode/pull/223924 reverts this change, and also makes a new change that will ensure that the input editor is focused when you create a comment thread like this:
const thread = commentController.createCommentThread(vscode.window.activeTextEditor!.document.uri, vscode.window.activeTextEditor!.selection, [new NoteComment('', vscode.CommentMode.Editing, { name: 'vscode' })]);
			thread.label = 'Test label';
			thread.canReply = false;
			thread.collapsibleState = vscode.CommentThreadCollapsibleState.Expanded;

From https://github.com/microsoft/vscode/issues/214661#issuecomment-2179303180:

@alexr00 Is there a way for us to:

Open the comment box with the input focused
No existing comments / reply at the bottom

The above snippet should do the trick.

Thanks for trying it out and noticing this! I've improved the way the comments view handles these empty comments here: https://github.com/microsoft/vscode/pull/224379
We're about to release 1.92, and https://github.com/microsoft/vscode/pull/224379 doesn't meet the bar to go into this release or a recovery release. It will be part of the 1.93 release.


Banner ad issues on iOS via programmatic method

I have a view with react-navigation/bottom-tabs.
I am using AppLovinMAX.createBannerWithOffsets(kBannerAdUnit, AppLovinMAX.AdViewPosition.BOTTOM_CENTER, 0, -this.adHeight) to create the banner.
When i receive the banner the y offset is adjusted via AppLovinMAX.updateBannerOffsets(kBannerAdUnit, 0, this.tabBarHeight)
This code works fine on Android but for iOS the banner height seems to be more than 50 (iphone simulator) specifically it seems to
be this.tabBarHeight + this.adHeight and this hides the bottom tab bar.
I have also set AppLovinMAX.setBannerExtraParameter(kBannerAdUnit, 'adaptive_banner', 'false')

Hi - do you mind sending a screenshot of the exact issue or reproducing it in a fork with the demo app? That way we can efficiently investigate a solution for you.

Hi,
I have attached the screenshot.
Tab bar is visible if I disable the ads.
Issue is only with iOS; on Android its working as intended.
[cid:5C8D8925-81BA-4C95-B644-7D22EAD45113]
Regards,
Balaram Singh,
Project Manager,
RJS Tech Solutions LLP
On 22-Mar-2022, at 12:39 PM, Thomas So<EMAIL_ADDRESS>wrote:
Hi - do you mind sending a screenshot of the exact issue or reproducing it in a fork with the demo app? That way we can efficiently investigate a solution for you.
—
Reply to this email directly, view it on GitHubhttps://github.com/AppLovin/AppLovin-MAX-React-Native/issues/59#issuecomment-1074810342, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACPW724333ERJNTNUU6ZQMTVBFWYZANCNFSM5RJ26SDA.
You are receiving this because you authored the thread.Message ID: @.***>

We just pushed v3.0.1 - do you mind checking that version?

v3.0.1 working correctly for tabbars on ios

Glad to hear.


Typing Return of Function is not checking returned variable types properly

Bug Report
Return types of function seems not checking the returned variable if it match the explicit return type.
🕗 Version & Regression Information
Tested the code below on http://www.typescriptlang.org/play/?ts=Nightly and the problem still occurs.
⏯ Playground Link
https://www.typescriptlang.org/play?ts=5.0.0-dev.20230216#code/JYOwLgpgTgZghgYwgAgKoGdrIN4ChkHICumUAXMumFKAOYDc+hUA9gDYQVU0gO4C+uXAhYgqxUgHVgYABYAFOOnTIAvDiYES0CgHJZcA7oA0m5Kw57ZEaybMAHJegDuLKABM9AWxY-dAoQB6QOQAcQB5cIARClDgADcUABUAZWRoVihkJXSAD3sIBEh3YVFxBGsEAGsIdwwsdQAKAEoKeqzVAD4NQnMIMCIoEB7e5nZOZH0INhY7UcJtckmDI1N5gkdlVw9vOC84f17BQVxg5AAhAEEY5ABJMGR3Fgh0EF0H2gSUORQMt1KxA8iCAKoUanVSGpkC02pCuiMCFB+oNhotpHJFMoAgDxCAIM52gBGKGg6q1dotXB4gmkQkAOkWVPxRLpFggQhEgOQ1PaACYocDSeCKc0mTToLyGaQxXzWeMZaRJZsXG53EA
💻 Code
interface User {
    user: string;
    role: string;
}

const userWithPass = {
    user: 'haha',
    role: 'hehe',
    password: 'momo'
}

// GOOD: Give TS error as expected
const checkedUser = (): User => {
    return {
        role: 'helo',
        user: 'haha',
        password: 'mama'
    }
}

// BAD: It doesn't give the error
const uncheckedUser = (): User => {
    return userWithPass
}

🙁 Actual behavior
On uncheckedUser, no error defined despite it has extra password on the object.
🙂 Expected behavior
uncheckedUser should show the same typing error with checkedUser which is:
Type '{ role: string; user: string; password: string; }' is not assignable to type 'User'.
  Object literal may only specify known properties, and 'password' does not exist in type 'User'.

Object literal may only specify known properties, and 'password' does not exist in type 'User'.

Emphasis mine.  This check is only done for fresh object literals assigned directly to a type; otherwise, the type with extra properties is considered a valid subtype.  To prevent that, you would need exact types, which TS doesn't support.
See https://github.com/microsoft/TypeScript/issues/12936.

To TypeScript team: Can we have a FAQ entry explaining that EPC is not a normal part of type checking?  This gets reported often enough that it should probably be mentioned under https://github.com/microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

const userWithPass = {
user: 'haha',
role: 'hehe',
password: 'momo'
} as const;