photo and it crashed on iPhone6 plus.

the delegate method return a capturedImage,and it's size 2448 * 2448 on iPhone6 plus device,cause memory waring then crash.Colud you help me or something advice?

(void)cameraController:(id)cameraController didFinishCapturingImage:(FastttCapturedImage *)capturedImage

Hi there! News on this issue?
Did you resolve the memory warning / crash?

Remove the fullimage normalize worked. Code on the FastttCapturedImage+Process line63

Hi, thanks for letting us know! This seems to be working fine for us on iPhone 6 Plus, but if the normalize is problematic, you can always set normalizesImageOrientations = NO on your FastttCamera instance to disable this feature.
I'll also go through and see if we can optimize the memory usage of the code a bit more and see if we can improve performance here. Is it in the demo where you're seeing the problem, or in your own app?

The example project memory of take photo

Here is  the code to resolve the memory warning / crash in my project. Hope it will help other people has the same problem.

(void)cameraController:(id)cameraController didFinishCapturingImage:(FastttCapturedImage *)capturedImage {
UIImage *scaledImage = [self imageByScalingToMaxSize:image];
}

(UIImage *)imageByScalingToMaxSize:(UIImage *)sourceImage {
if (sourceImage.size.width < ORIGINAL_MAX_WIDTH) return sourceImage;
CGFloat btWidth = 0.0f;
CGFloat btHeight = 0.0f;
if (sourceImage.size.width > sourceImage.size.height) {
btHeight = ORIGINAL_MAX_WIDTH;
btWidth = sourceImage.size.width * (ORIGINAL_MAX_WIDTH / sourceImage.size.height);
} else {
btWidth = ORIGINAL_MAX_WIDTH;
btHeight = sourceImage.size.height * (ORIGINAL_MAX_WIDTH / sourceImage.size.width);
}
CGSize targetSize = CGSizeMake(btWidth, btHeight);
return [self imageByScalingAndCroppingForSourceImage:sourceImage targetSize:targetSize];
}

(UIImage *)imageByScalingAndCroppingForSourceImage:(UIImage *)sourceImage targetSize:(CGSize)targetSize {
UIImage *newImage = nil;
CGSize imageSize = sourceImage.size;
CGFloat width = imageSize.width;
CGFloat height = imageSize.height;
CGFloat targetWidth = targetSize.width;
CGFloat targetHeight = targetSize.height;
CGFloat scaleFactor = 0.0;
CGFloat scaledWidth = targetWidth;
CGFloat scaledHeight = targetHeight;
CGPoint thumbnailPoint = CGPointMake(0.0,0.0);
if (CGSizeEqualToSize(imageSize, targetSize) == NO)
{
CGFloat widthFactor = targetWidth / width;
CGFloat heightFactor = targetHeight / height;
  if (widthFactor > heightFactor)
      scaleFactor = widthFactor; // scale to fit height
  else
      scaleFactor = heightFactor; // scale to fit width
  scaledWidth  = width * scaleFactor;
  scaledHeight = height * scaleFactor;

  // center the image
  if (widthFactor > heightFactor)
  {
      thumbnailPoint.y = (targetHeight - scaledHeight) * 0.5;
  }
  else
      if (widthFactor < heightFactor)
      {
          thumbnailPoint.x = (targetWidth - scaledWidth) * 0.5;
      }

}
UIGraphicsBeginImageContext(targetSize); // this will crop
CGRect thumbnailRect = CGRectZero;
thumbnailRect.origin = thumbnailPoint;
thumbnailRect.size.width  = scaledWidth;
thumbnailRect.size.height = scaledHeight;
[sourceImage drawInRect:thumbnailRect];
newImage = UIGraphicsGetImageFromCurrentImageContext();
if(newImage == nil) NSLog(@"could not scale image");
//pop the context to get back to the default
UIGraphicsEndImageContext();
return newImage;
}

I'm also having this issue. Using this in my own app and it works on every device except the 6+.

This is a known issue- the 6+ is tricky because the size of the images the camera returns really push the device to its memory limits. I'll try to find some time to look into resolving this and minimizing the memory footprint as much as we can here.

Any update on this?


[🐛] Submitting deluxe-membership payment form without selecting payment method crashes app

juice-shop_dockerHubLog.txt

:bug: Bug report
Description

This is probably a low priority bug.
When on the deluxe-membership payment form, I removed the "disable" attribute from the submit button and clicked the button. That cased the whole app to crash.
Is this a regression?

Unknown
:microscope: Minimal Reproduction

Note: I'm doing this on the docker version of the app... i don't know if that makes a different or not

login with your own account
navigate to http://localhost:3000/#/deluxe-membership
click "Become a member"
"inspect" continue button
manually remove disabled="true" attribute
Click continue button
See application crash

:fire: Exception or Error
See attached file for the full run log copied from Docker Desktop. The most relevant error is at the very bottom.

:deciduous_tree: Your Environment
I'm just using the provided docker container as is. What follows are the values shown in the "inspect" tab of Docker Hub for this container

Environment
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

NODE_VERSION
16.13.2

YARN_VERSION
1.22.15

Port
3000/tcp
<IP_ADDRESS>:3000

Additional Information

Good catch! I'll leave this one open (e.g. as a low-entry-barrier task for future GSoC students) as it has probably a straightforward root cause and should be fixable without disturbing any actual hacking challenges. If it doesn't get picked up before going stale, I'll fix it myself.

Just tested with Node.js 14.x and there it only throws an error but doesn't crash, but since Node.js 16 promise error are known to be less forgiving. Will make sure this one is caugth and sent to the error handler instead.

Our of curiosity, what is a “GSoC” student?
Thanks,
Jackson Pfeffer
White Box Pen Testing – Citi Global InfoSec
BS in Computer Science at UNT, UT Austin, and CCCC
BA in Music Performance (partial) at UNT and UT Austin
Eagle Scout
From: Björn Kimminich
Sent: Wednesday, April 6, 2022 16:39
To: juice-shop/juice-shop
Cc: CrazyKidJack; Author
Subject: Re: [juice-shop/juice-shop] [🐛] Submitting deluxe-membership payment form without selecting payment method crashes app (Issue #1786)
Good catch! I'll leave this one open (e.g. as a low-entry-barrier task for future GSoC students) as it has probably a straightforward root cause and should be fixable without disturbing any actual hacking challenges. If it doesn't get picked up before going stale, I'll fix it myself.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

GSoC = Google Summer of Code


GodotClass not implemented for SpireCoroutine

Honestly probably a skill issue on my part. Get this error
error[E0277]: Only classes registered with Godot are allowed in this context
  --> src\lib.rs:46:35
   |
46 |     fn test_routine(&mut self) -> Gd<SpireCoroutine> {
   |                                   ^^^^^^^^^^^^^^^^^^ the trait `godot::prelude::GodotClass` is not implemented for `SpireCoroutine`
   |
   = note: you can use `#[derive(GodotClass)]` to register your own structs with Godot

Cargo.toml
[package]
name = "rust_example"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib"]

[dependencies]
godot = { git = "https://github.com/godot-rust/gdext", branch = "master" , features = ["experimental-threads"]}
gdext_coroutines = { version = "0.4.3", features = ["async"] }
mr_starter = {git = "https://gitlab.com/admincrystal/poc_monorepo.git", branch = "main", features = []}
sqlx = {version = "0.8.2", features = ["sqlite"]}
smol = { version = "2.0.2" }
async-compat = "0.2.4"

Code (I took it from integration tests, also tried with my own and no luck)
#![feature(coroutines)]
#![feature(coroutine_trait)]
#![feature(stmt_expr_attributes)]
#![feature(unboxed_closures)]

use std::cell::OnceCell;
use std::rc::Rc;
use std::sync::{Arc, OnceLock};
use gdext_coroutines::prelude::SpireCoroutine;
use godot::prelude::*;
use godot::classes::{Label, Node2D};
use godot::classes::INode2D;
use smol::{Executor, future, LocalExecutor};
use sqlx::{migrate, Pool, Sqlite, SqliteConnection, SqlitePool, Transaction};
use sqlx::Connection;
use mr_starter::anyhow::Result;

use std::time::Duration;
use gdext_coroutines::prelude::*;
use godot::classes::node::ProcessMode;
use godot::obj::WithBaseField;
use godot::prelude::*;

use async_compat::Compat;
use gdext_coroutines::prelude::*;
use godot::prelude::*;
use mr_starter::chrono::Local;
use smol::net::resolve;

#[derive(GodotClass)]
#[class(init, base = Node)]
struct TestClass {
    base: Base<Node>,
}

#[godot_api]
impl TestClass {
    #[func]
    fn test_routine(&mut self) -> Gd<SpireCoroutine> {
        self.start_async_task(Compat::new(
            async {
                godot_print!("Using compat layer!");
                smol::Timer::after(Duration::from_secs(2)).await;
                godot_print!("Awaited 2 seconds, returning 5");
                5_i32
            }))
    }

    #[func]
    fn test_from_other_node(node: Gd<Node>) -> Gd<SpireCoroutine> {
        node.start_async_task(Compat::new(
            async {
                godot_print!("Async task from other node!");
                smol::Timer::after(Duration::from_secs(2)).await;
                godot_print!("Awaited 2 seconds, returning `finished task`");
                "finished task"
            }))
    }
}

#[godot_api]
impl INode for TestClass {
    fn ready(&mut self) {
        let base = self.base().to_godot();
        test_1(base);
    }
}

@AdminCrystal
gdext_coroutines version 4.3 uses godot-1.3 as a dependency, which is hosted on crates.io.
These lines in your "Cargo.toml" indicate that your project uses the latest version of gdext from github (not crates.io):
[dependencies]
godot = { git = "https://github.com/godot-rust/gdext", branch = "master" , features = ["experimental-threads"]}

What's happening here is that the version of gdext_coroutines you're using implements traits from godot-1.3 (the crate on crates.io), not the github version.
You can fix this by using the github version of gdext_coroutines, which also points to the github version of godot:
[dependencies]
gdext_coroutines = { package = "gdext_coroutines", git = "https://github.com/Houtamelo/gdext_coroutines", features = ["async"] }

That should fix your issue.

That did fix my issue, thanks so much!


Notify keeps reopening Spotify

I added notify to the login items and i noticed that whenever i try to quit spotify, notify keeps reopening it. This happens as long as notify keeps running.

Thank you! I'll take a look!

Any updates? Also I want to thank you for making Notify! Great work

@rares-nandra
should be fixed in https://github.com/nahive/spotify-notify/releases/tag/0.5.1


Extra newline in git output

When running git commands through the Git proxy there's an extra newline in the output.
$ git branch
  CJ-25007
  issue/PLAT-16767-error-msgs
  issue/quill-static-analysis-bug
  master
  pr/56970
* upgrade/devbox-script
  upgrade/scala-2.12.11
  upgrade/sjsonnet

It seems that print without a newline in python is a big thing .. :)

fixed by https://github.com/databricks/devbox/pull/10


2.13 metaconfig sbt 1.0

Looks like the build in metaconfig was upgraded to sbt 1.0 today:
https://github.com/olafurpg/metaconfig/pull/63
Community build complains about Coursier for some reason:
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	::          UNRESOLVED DEPENDENCIES         ::
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	:: io.get-coursier#sbt-coursier;1.1.0-M8: not found
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] 	Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn] 		io.get-coursier:sbt-coursier:1.1.0-M8 (scalaVersion=2.10, sbtVersion=0.13)
[warn]
[warn] 	Note: Unresolved dependencies path:
[warn] 		io.get-coursier:sbt-coursier:1.1.0-M8 (scalaVersion=2.10, sbtVersion=0.13) (project/project/plugins.sbt#L1-2)
[warn] 		  +- default:root-35d2dcf905e3bdbf54877eb7cebab1317d823033-build-build:0.1-SNAPSHOT (scalaVersion=2.10, sbtVersion=0.13)
sbt.ResolveException: unresolved dependency: io.get-coursier#sbt-coursier;1.1.0-M8: not found

https://scala-ci.typesafe.com/job/scala-2.13.x-integrate-community-build/1606/
May be related to the dropping of 2.10 support in sbt-coursier?

c2eb9713b6fd70e254a8b82a733e0cbc0ea670f7

(I'll probably have to backport this to 2.12.x after unfreezing after 2.12.8)


Upgrade to TypeScript 2.3.2

Support for "compiler.typeRoots", "compiler.baseUrl", "compiler.paths",
"compiler.allowSyntheticDefaultImports";
Matching bracker preference at the right place.
Upgrade Tycho 0.26.0
JDK 1.8

Oops, build machine is on JDK 7. Oh well...


Add character: Tai/Greymon

Hero Description
Digimon anime characters.
Concept Art

Gameplay
Tai will always be next to greymon, participating together in battles. The idea is that each evolution opens up a new skill. Agumon for example at the beginning will have only one ability.
The criteria for evolving will be the same as for existing Pokémon in the game
Moves
Idle

[STICK] Walk

[LEFT] Fire ball (AGUMON)
Shoots a fireball, it can cause burns. It goes a long way

Effect:

Agumon will only have fireball
Reference:

[RIGTH] Charge (GREYMON)
Advance with speed by headbutting and throwing opponents in the air.
Agumon will not use this ability

Greymon will only have the Charge and Fireball skills
[MIDDLE]Trident arm
Shoots the claw out of his mechanical arm and uses it to pass through the opponent's body or to trap him. Deals great damage and paralyzes the opponent for 0,5 seconds. Average projectile speed

[SPACE] Ultimate: Giga shot (METAL GREYMON)
Shoot two missiles from your chest. Getting it right causes slowness. Area damage

Reference:

Metal greymon will have fireball, charge, Giga shot, Trident arm
Reference:

[E] TAUNT

Reference:

### OPTIONAL
[Q]
Tasks

[x] Idle
[ ] Walk
[ ] Hurt
[ ] [LEFT] add skill name
[ ] [MIDDLE] add skill name
[ ] [RIGHT] add skill name
[ ] [SPACE] add skill name

I would like you to take a look at this ISSUE, and if you have any questions or suggestions.
@MaiaVictor @MaisaMilena

Approved to start working only on Metal Greymon. We will review the skills of the other character later.

 Lacks only animation of transformations

4:40h

Evotion

2h


Deriving a fixed-timestep version of the Rosenbrock scheme

We opted for the ForwardEuler scheme for its robustness (fixed timestepping) but it is rather slow as it uses a fine temporal grid (10,000 points).
An alternative would be to derive a fixed-timestepping version of the Rosenbrock scheme to benefit from both speed and robustness.

There are two solutions to your problem of needing to do so many steps for calculating a single track. One is to have a timestep that changes simply based on age and not any other criterion. In older rotation models that I ran, I would have the timestep increase at 10, 100, and 1000 Myr. The other option would be to use RKF or Rosenbrock without a dynamic timestep. These are not mutually exclusive either.
The way RKF and Rosenbrock calculate the timestep is by taking a desired error (difference between real value at the end of the step and achieved value at the end of the step) as a parameter and modifying the timestep to try to achieve that accuracy, making the timestep longer if a step is too accurate and repeating the step with a shorter timestep if it was not accurate enough. The reason this cannot be done in forward Euler and RK4 is that there is no good way to approximate the error since one does not know the real value at the end of the step. RKF and Rosenbrock do it by doing the timestep twice with more and less accurate versions of the method and using the difference as an approximation to the error. The more accurate method is then used to do the actual update.
What you can do is just take the more accurate method and use that with a fixed timestep. It would still have the desirable property that it can handle larger timesteps since it is anyway the method being used normally to do the numerical integration and all the other stuff is just about tuning the timestep.

Thanks @ColinPhilipJohnstone for the input!
I think I got the idea, but how would you fix the time grid such that it has much less point than the FE scheme? Would you use a constant increasing factor ('dAgeFactor = 1.5') with a capping to 'dAgeMax' or a fixed time step that you increase by a factor of 10 (?) at 10, 100, and 1000 Myr?

Either way is good I think. Just do some convergence testing to make sure your timestep is small enough that making it smaller does not change the result.

OK, sounds doable. I will make some tests to check accuracy and robustness. Thanks you for the tips!

Nice idea to do it this way. I assume the desired error parameter is anyway very low so overestimating the timestep shouldn't be a problem.


Proper hexstring support

There can be improved support internally for hexstrings to differentiate between endianness, resolve the 0x sign and support for typing of different hexstrings.

This issue is primarily for neo3 but it is also a consideration for porting to neo2. However, I would consider it low priority given the potential work and mess.

I have proposed a PR and want to have discussion with you on below questions:

Where should we put these types, and what's the relation between these types and old type-converting apis.
Suggestion: We put these types into module u, and stop exporting old type-conversion apis like str2hextring and include them into these types, to avoid confusions.

-Like interfaces
The -Like interfaces (e.g. CosignerLike) mostly use string as type, and they will be used to type param for constructors. So shall change the -Like interfaces to use new types.
Currently I create a new interface -Config to act as the param for constructor.

Yes the u module would be the correct place for these. I would bring in the existing methods and unify them under the common namespace.

The -Like interfaces have been used to represent the json counterpart that we are exporting. It acts as the gateway between the outside world and the neon objects. The constructor must be able to take in a json object and transform it into an neon object. Please continue using the -Like interface.

I think one of the biggest advantages using strong types is that user can use these types when writing codes to avoid confusion. And constructors are used a lot in neon-js. If only string is used to initiate some class, the generated instances would probably be invalid or we need to add redundant logic to throw error (e.g. a scripthash param would expect a 30-length string, user may input a "" to be a scripthash, or not even a hex).
Suggestion:
So I think it's better to type the params for constructors.
Add a static function like fromJson to accept the -Like param.

For this to happen, all neon-js classes will have to migrate to the new pattern. Let us see how the Hexstring class works out first before committing.


Review GLOG initialization and shutdown

TiGL initialzes GLOG in CTiglLogging
https://github.com/DLR-SC/tigl/blob/84836e6b24ac91d92c8e85594609e2c50005dfa6/src/logging/CTiglLogging.cpp#L98
and shuts in down in its destructor in
https://github.com/DLR-SC/tigl/blob/84836e6b24ac91d92c8e85594609e2c50005dfa6/src/logging/CTiglLogging.cpp#L63
If an application that uses TiGL itself also uses GLOG, this will cause problems. Hence, these routines must be called outside of TiGL.
This brings me to 2 questions:

How can we make sure, that the logger is correctly initialized when used by TiGL?
Should we simply remove GLOG logging? We don't build it anymore, so it is dead code right now.

we have exactly this issue in Descartes (internal software based on TiGL). Our current workaround is to comment out the respective lines in TiGL and call them ourselves in our main function.

I suppose we could make this a cmake option? cmake .. -DTIGL_DISABLE_GLOG=ON


LUCENE-10627: Using CompositeByteBuf to Reduce Memory Copy

JIRA: https://issues.apache.org/jira/browse/LUCENE-10627
I see When Lucene Do flush and merge store fields, need many memory copies:
Lucene Merge Thread #25940]" #906546 daemon prio=5 os_prio=0 cpu=20503.95ms elapsed=68.76s tid=0x00007ee990002c50 nid=0x3aac54 runnable  [0x00007f17718db000]
   java.lang.Thread.State: RUNNABLE
	at org.apache.lucene.store.ByteBuffersDataOutput.toArrayCopy(ByteBuffersDataOutput.java:271)
	at org.apache.lucene.codecs.compressing.CompressingStoredFieldsWriter.flush(CompressingStoredFieldsWriter.java:239)
	at org.apache.lucene.codecs.compressing.CompressingStoredFieldsWriter.finishDocument(CompressingStoredFieldsWriter.java:169)
	at org.apache.lucene.codecs.compressing.CompressingStoredFieldsWriter.merge(CompressingStoredFieldsWriter.java:654)
	at org.apache.lucene.index.SegmentMerger.mergeFields(SegmentMerger.java:228)
	at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:105)
	at org.apache.lucene.index.IndexWriter.mergeMiddle(IndexWriter.java:4760)
	at org.apache.lucene.index.IndexWriter.merge(IndexWriter.java:4364)
	at org.apache.lucene.index.IndexWriter$IndexWriterMergeSource.merge(IndexWriter.java:5923)
	at org.apache.lucene.index.ConcurrentMergeScheduler.doMerge(ConcurrentMergeScheduler.java:624)
	at org.elasticsearch.index.engine.ElasticsearchConcurrentMergeScheduler.doMerge(ElasticsearchConcurrentMergeScheduler.java:100)
	at org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:682)

When Lucene CompressingStoredFieldsWriter do flush documents, it needs many memory copies:

With Lucene90 using LZ4WithPresetDictCompressionMode:

bufferedDocs.toArrayCopy copy blocks into one continue content for chunk compress
compressor copy dict and data into one block buffer
do compress
copy compressed data out

With Lucene90 using DeflateWithPresetDictCompressionMode:

bufferedDocs.toArrayCopy copy blocks into one continue content for chunk compress
do compress
copy compressed data out

I think we can use CompositeByteBuf to reduce temp memory copies :

we do not have to bufferedDocs.toArrayCopy when just need continues content for chunk compress

I write a simple mini benchamrk in test code (link):
LZ4WithPresetDict run Capacity:41943040(bytes) , iter 10times:
Origin elapse:5391ms , New elapse:5297ms
DeflateWithPresetDict run Capacity:41943040(bytes), iter 10times:
Origin elapse:115ms, New elapse:12ms

And I run runStoredFieldsBenchmark with doc_limit=-1:
shows:

Msec to index
BEST_SPEED
BEST_COMPRESSION

Baseline
318877.00
606288.00

Candidate
314442.00
604719.00

Would it be possible to remove all CompressionMode#compress variants that take a byte[] now that you introduced a new method that takes a ByteBuffersDataInput?
Also maybe we should keep old codecs unmodified and only make this change to Lucene90Codec where it makes most sense?

Hi @jpountz Thanks for reviewing this code.
I prefer keeping old codecs unmodified, because CompressionMode#compress is a public abstract method, if we change it with variants ByteBuffersDataInput we need to backport in many codecs, like commits.
And if we only using compress method with variants ByteBuffersDataInput in LUCENE90, we can not using abstract method Compressor.compress, when we want to use other compression mode.
Would it be possible to add a new method in Compressor, like following? it can keep the old codecs unmodified, and method with variants ByteBuffersDataInput only can be called in Lucene90Codec.
public abstract void compress(byte[] bytes, int off, int len, DataOutput out) throws IOException;

public void compress(CompositeByteBuf compositeByteBuf, DataOutput out) throws IOException;

if we only using compress method with variants ByteBuffersDataInput in LUCENE90, we can not using abstract method Compressor.compress, when we want to use other compression mode.

I think that this downside is fine? We prefer codecs to evolve independently so when we start needing changes for a new codec, we prefer to fork the code so that old codecs still rely on the unchanged code (which should move to lucene/backward-codecs) while the new codecs only use the new code without carrying over legacy code.

Thanks for the iteration, the high-level idea looks good to me, I left some suggestions.

@jpountz Thanks for your nice suggestions. at latest commits ebcbdd

change statement byteBuffers in Lucene90CompressingStoredFieldsWriter
move sliceOne logic into ByteBuffersDataInput level and it would determine whether use internal buffers or create a new buffer
delete DeflateWithPresetDictCompressionMode#doCompress method which param is byte[]
delete copyOneDoc-> readBytes which instance ByteArrayDataInput optimize. and i would create a new issue to reduce memory copy in copyOneDoc

Also I wonder if the readNBytes trick actually helps in practice, or if we end up crossing ByteBuffer boundaries most of the time in practice

@jpountz  I have the same question that when crossing ByteBuffer would happened. So, i do a simple test:
As the result, i think have a shared byte[] is LGTM, i try to update it.
i rewrite the method with readNBytesWithoutCopy and readNBytesWithCopy as follows.
then i try to use arthas monitor with commands monitor -c 10 org.apache.lucene.store.ByteBuffersDataInput readNBytesWith* AND the running task is runStoredFieldsBenchmark with BEST_COMPRESSION:
it shows:
#readNBytesWithoutCopy : #readNBytesWithCopy = 1 : 10 every 10 seconds

codes:
  public ByteBuffer readNBytes(int length) throws EOFException {
    .....
    if (block.remaining() >= length) {
      this.pos += length;
      return readNBytesWithoutCopy(block, blockOffset, length);
    } else {
      return readNBytesWithCopy(length);
    }
  }

  private ByteBuffer readNBytesWithoutCopy(ByteBuffer block, int blockOffset, int length) {
    return block.slice(blockOffset, length);
  }

  private ByteBuffer readNBytesWithCopy(int length) throws EOFException {
    ByteBuffer copyBuffer = ByteBuffer.allocate(length);
    readBytes(copyBuffer, length);
    return copyBuffer.rewind().order(ByteOrder.LITTLE_ENDIAN);
  }

Thanks for running these tests, let's remove readNBytes and switch to a shared byte[] that we call DataInput#readBytes on instead.

Thanks for running these tests, let's remove readNBytes and switch to a shared byte[] that we call DataInput#readBytes on instead.

@jpountz Thanks a lot for you reviewing for the code. at https://github.com/apache/lucene/pull/987/commits/c0d31d3134653bf6009b798925fa2350e5f7ec9c i removed readNBytes and using shared byte[] buffer in DeflateWithPresetDictCompressionMode.
I try to do more test about why readNBytes with a lot of memory copy, i think this is relevant to the:

DeflateWithPresetCompressingCodec chunk size: 1 << 18
LZ4WithPresetDictCompressionMode NUM_SUB_BLOCKS: 10
ByteBuffersDataOutput BITS_PER_BLOCK

The chunk size is larger than block size which made ByteBuffersDataInput fragment always copy datas


Possible typo

Is cancel a typo for stop on line 66? The cancel variable isn't used anywhere and I don't know where the stop variable would come from.

Indeed, that's a typo. Thank you!


Different output shape with padding="same" in Conv2DTranspose

Hello,
I use Conv2DTranspose in my model.
But when converted it to onnx model,  the output of onnx model seems to differ from that of keras model.
Maybe there is something wrong with padding... when padding="valid", the problem of output shape does not occur.
Here is an example.
from tensorflow.keras.layers import Input, Conv2DTranspose, BatchNormalization, ReLU, Conv2D, Lambda, MaxPooling2D, Dropout,Lambda
from tensorflow.keras.layers import ZeroPadding2D
from tensorflow.keras.models import Model
from tensorflow.keras.regularizers import l2

def test_model(size=None,padding="same"):
    input_img = Input((size,size,3))
    x = Conv2DTranspose(256, (4, 4), strides=2, use_bias=False, padding=padding,
                        kernel_initializer='he_normal',
                        kernel_regularizer=l2(5e-4))(input_img)
    x = BatchNormalization()(x)
    y = ReLU()(x)
    return Model(inputs=input_img,outputs=y)

test = test_model(size=512)
print(test.input,test.output)

import keras2onnx
import numpy as np
import onnxruntime
test = test_model()
output_model_path = "weights/test.onnx"
onnx_model = keras2onnx.convert_keras(test, test.name)
keras2onnx.save_model(onnx_model, output_model_path)

x = np.zeros((512,512,3))
inputs = np.expand_dims(x,axis=0)
sess = onnxruntime.InferenceSession(output_model_path)
data = [inputs.astype(np.float32)]
input_names = sess.get_inputs()
feed = zip(sorted(i_.name for i_ in input_names), data)

actual = sess.run(None, dict(feed))

for k in actual:
    print(k.shape)

tf executing eager_mode: True
tf.keras model eager_mode: False
The ONNX operator number change on the optimization: 12 -> 5
Tensor("input_5:0", shape=(None, 512, 512, 3), dtype=float32) Tensor("re_lu_4/Identity:0", shape=(None, 1024, 1024, 256), dtype=float32)
(1, 1026, 1026, 256)

thank you!

I just tried this model and it works fine, the output shape is (1, 1024, 1024, 256).

Thanks for reply!!
I pulled latest keras2onnx(1.7.1,right?), but I got same odd shape...
I refererd to this notebook, and I have installed like below ;
pip install --upgrade tensorflow==2.1.0
pip install onnxruntime
pip install git+https://github.com/microsoft/onnxconverter-common
pip install git+https://github.com/onnx/keras-onnx

We just added a unit test for your model. I tested your original model and it works fine (on our several configuration test). As a unit test, I made some simplification which does not affect your original problem.

Sorry for the late replay.
I checked UT test, and tried again, but got odd shape...
please would you tell your environment ?
my environment :
Anaconda on Windows10
python : 3.7.2
tensorflow : 2.1.0
onnxruntime : 1.3.0
keras2onnx : 1.7.1

Check our azure pipelines, each pipeline runs this test with several different environments. The build result can be seen here

Thanks, I'll check it !!

I found my problems in my code...
when set size=None, the output shape is odd, but when set size=Constant(ex.128,256), the output shape is reasonable.
Thanks for your replies and comments!!!


chore: update 02-feature-request.yml template

Fix incorrect link to search pull requests.
PR Checklist

Closes #
What is the new behavior?
Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information
Noticed the link for PR's was set to Issues.
[optional] What gif best describes this PR or how it makes you feel?

Thanks! @allcontributors add @bbodine1 for doc


Coverage tool for scalatest

Hi everyone,
we're using scalatest in one of our major projects and we really enjoy it's capabilities. Thanks for the good work! Anyway we're missing support of any coverage report tool we know for scalatest. I spend some time googling around to find some but without success.
Do you know if there is any tool outside that is able to generate coverage reports based on the scalatest results? Preferably with gradle support.
Thanks in advance for your help!
Best,
Johannes

Hi @johanneshiry ,
Your question caught my eye because I recently spent some time playing with coverage tools in a project where we use ScalaTest. My understanding is that a testing tool like ScalaTest and code coverage tools are in fact two very different things. While the testing framework lets you write and run your tests, the code coverage tool simply records the parts of you production code that have been hit by your tests runs ultimately to produce coverage reports. So basically what I am saying is that they are independent and you usually "glue" them together using a build tool like gradle to be able to run your tests, records the coverage and produce the coverage reports with a single command.
I assume that you are looking for a code coverage tool for Scala code given you are using ScalaTest (although the framework supports Scala, Scala.js (JavaScript), and Java code according to the documentation). If that's the case then you should have a look at http://scoverage.org/. I have used it with sbt but it seems to have gradle support as well via this plugin. Otherwise you can also have a look at Jacoco. It is not Scala specific but ultimately because it's bytecode-based it also works for Scala. I personally tried both and I found scoverage coverage reports a bit more accurate simply because it has been designed specifically for Scala. As I mentioned above I tried both using sbt and ScalaTest but I am pretty sure the same can be achieved using gradle.
I hope it helps.
Antoine

Hi @antoine-mulet,
thanks for your reply and the extensive explanation on test suits and coverage tools.
I've a little bit of experience in this field, as I'm responsible for several CI/CD pipelines in which make use of different test suits (JUnit, ScalaTest, Spock) combined with different coverage tools for analysis (mainly Jacoco which is passed to sonarqube instances).
Considering your proposal of using scoverage (which I really, really like), I have to say that I tried "glueing" together gradle-scoverage with ScalaTest, but gave up at same point.
The first issue has been a lacking support of scala 2.13 (see my issue 109) and then some issues with multi-project builds (issue 98), while the multi-project issue is in fact not a gradle-scoverage problem but it seems to be a general gradle problem.
After giving up on gradle-scoverage I tried using Jacoco with ScalaTest (because we have it running on several other java projects) but it also seems to have issues with ScalaTest, because the resulting test data has not been analyzed by Jacoco. Maybe I was missing something there, but we couldn't managed to get it working ScalaTest.
tl;dr:

We gave up on gradle-scoverage due to the 2 issues mentioned above and the comment of one of the gradle-scoverage devs "it uses ScalaTest instead of JUnit, which I'm not sure is compatible with this plugin. (this plugin == gradle scoverage"
We couldn't manage to setup a working combination of ScalaTest and Jacoco.
If you have a working setup with ScalaTest and Jacoco OR scoverage I would be glad if you could share this.

Thanks again for your help. Looking forward on your comments on this.
Johannes

Hi @johanneshiry,
It seems that you actually know way more than I do on this topic :) I thought you were seeking guidance about how to get started to set up code coverage with a fairly new/simple project but it's clearly not the case.
I have only little experience with gradle so I am afraid I cannot help you more on this front. However regarding scoverage potentially not being "compatible"with ScalaTest, I don't really get it conceptually. My basic understanding is that the two things are independent like I said in my first response. Once the code has been compiled scoverage instrumentation turned on, I don't understand how the testing framework used to write and run your tests could matter. Again I am very much not an expert on this topic so I may be wrong and would be happy to be corrected by someone more knowledgeable.
The only thing I could propose would be to share with you a simple Scala 2.13 sbt based example of scoverage working with ScalaTest. I understand that gradle seems to be a fairly strong requirement in your case so it may not be of much interest. Plus I have to admit that I didn't do anything magical to make it all work, I just followed the ScalaTest with sbt and sbt-scoverage documentations + a few tricks to make it suit my use case where I need some test suites to run in parallel (not in a multi-project setup though).
Good luck with your difficult but worthy quest of getting your code covered!
Antoine

Hi @antoine-mulet,
thanks for your reply. I think we have roughly the same understanding of testing framework and coverage frameworks. However, as this caused non-detected coverage in the past and based on the comment of one of the developers of gradle-scoverage I was assuming that there might be circumstances where "communication" between testing and coverage might fail for some reasons.
As I already stated in my previous post edit, I finally managed to get it working with the latest version of gradle-scoverage released a few days ago. Thanks for your offer for the sample project anyway!
Wish a good start into the week.
Johannes


Monorepo Releases Not getting the latest tag/release

I'm using homebrew-releaser in a monorepo with multiple projects.
When creating a release called "xxx-xxx-", homebrew-releaser is run and does not find the latest release, but a different release for a different project in the repo. Is there a way to send the specific wanted release name to homebrew-releaser?

Homebrew Releaser currently does not support monorepos, though that's an interesting feature request. There would need to be a decent amount of rework to make it function in this way. If you could provide some additional details on how this would get used or what the config might look like I'd consider adding it.

Basically today I run my workflows as so:
on:
  push:
    tags:
      - '<project>-cli-*'
jobs:
  create-release:
    name: Create Git Release
    steps:
    ..... # Create a github release
  releases-matrix:
    needs: [create-release]
    name: Create Go Binaries
    strategy:
      matrix:
        os: [darwin-amd64,darwin-arm64,windows-amd64,linux-amd64]
    steps:
       ....... # Generate release binaries
  homebrew-releaser:
    needs: [releases-matrix]
    name: homebrew-releaser
    steps:
      - name: Release my project to my Homebrew tap
        uses: Justintime50/homebrew-releaser@v1
        with:
           ......
          target_darwin_amd64: true
          target_darwin_arm64: true
          target_linux_amd64: true

My repo has 2 types of releases.

A CLI release that has multiple binaries that I want to run homebrew-releaser on.
A Helm chart release that does not create binaries.

The action works up until the part where it gets the latest tag. The tag it gets from the API is incorrect, and then it proceeds to try to get the binaries from the release of the tag, and fails. This is because the tag is not the current tag that the pipeline is running on, but a different tag for a release that does not include binaries.
For a tag/release named kubetunnel-cli-, the log looks like this:
2022-11-02 08:52:56,547 - INFO - Starting Homebrew Releaser...
2022-11-02 08:52:56,547 - DEBUG - All required environment variables are present.
2022-11-02 08:52:56,547 - INFO - Setting up git environment...
Cloning into 'homebrew-tap'...
2022-11-02 08:52:56,8[18](https://github.com/we-dcode/kubetunnel/actions/runs/3376077493/jobs/5603432325#step:3:19) - DEBUG - Git environment setup successfully.
2022-11-02 08:52:56,818 - INFO - Collecting data about kubetunnel...
2022-11-02 08:52:56,933 - DEBUG - HTTP GET request made successfully to https://api.github.com/repos/we-dcode/kubetunnel.
2022-11-02 08:52:57,043 - DEBUG - HTTP GET request made successfully to https://api.github.com/repos/we-dcode/kubetunnel/tags.
2022-11-02 08:52:57,043 - INFO - Latest release (kubetunnel-operator-0.0.16) successfully identified! <----*WRONG RELEASE*
2022-11-02 08:52:57,043 - INFO - Generating tar archive checksum(s)...
2022-11-02 08:52:57,356 - DEBUG - HTTP GET request made successfully to https://github.com/we-dcode/kubetunnel/archive/kubetunnel-operator-0.0.16.tar.gz.
2022-11-02 08:52:58,485 - DEBUG - kubetunnel-operator-0.0.16.tar.gz written successfully.
2022-11-02 08:52:58,566 - DEBUG - Checksum for kubetunnel-operator-0.0.16.tar.gz generated successfully: 860c3be37664bcf9bc46c32697[19](https://github.com/we-dcode/kubetunnel/actions/runs/3376077493/jobs/5603432325#step:3:20)3a02a29135be5b4271ae15fbe825a60dbe8a
[20](https://github.com/we-dcode/kubetunnel/actions/runs/3376077493/jobs/5603432325#step:3:21)[22](https://github.com/we-dcode/kubetunnel/actions/runs/3376077493/jobs/5603432325#step:3:23)-11-02 08:52:58,567 - DEBUG - checksum.txt written successfully.
2022-11-02 08:52:58,778 - DEBUG - HTTP GET request made successfully to https://github.com/we-dcode/kubetunnel/archive/kubetunnel-operator-0.0.16.zip.
2022-11-02 08:53:00,095 - DEBUG - kubetunnel-operator-0.0.16.zip written successfully.
2022-11-02 08:53:00,176 - DEBUG - Checksum for kubetunnel-operator-0.0.16.zip generated successfully: b2dac04[31](https://github.com/we-dcode/kubetunnel/actions/runs/3376077493/jobs/5603432325#step:3:32)dad1d6c975f541c4e3d361caa5f9ee7f7a619cc1bddc88b07661688
2022-11-02 08:53:00,176 - DEBUG - checksum.txt written successfully.
404 Client Error: Not Found for url: https://github.com/we-dcode/kubetunnel/releases/download/kubetunnel-operator-0.0.16/kubetunnel-kubetunnel-operator-0.0.16-darwin-amd64.tar.gz

My suggested solution is to add the tag/version as a parameter to the action and the API will request binaries from this specific tag. That parameter would be used here

Interesting. This is something we could maybe support in the future, though I have no immediate plans to add support by the end of the year.
The suggested feature set would require a decent amount of refactoring how the action works. I'll keep thinking about this over the holidays.

After looking into supporting monorepos, I've determined it's not something I want to pursue at this time. It would require a complete re-architecture of how this action works. Possible alternatives would be to split your monorepo up and use this action for each individual repo, find another action that supports monorepos, or build a custom solution to release monorepo formulas.
I have clarified in the README that this project is not compatible with monorepos. If you are interested in putting up a proof of concept PR on how we can get this action working with monorepos, I may reconsider; however, due to the changes needed to make that work, I won't be able to pursue it at this time.


Installed on void, getting Unknown error when trying to log in

Hi! I recently installed LY on my clean void installation. I installed void from the base image (without XFCE) and installed and configured the Xserver totally from scratch. When I run my system, without LY, I get to the default shell login and after logging in, I can start my i3 with startx command without any problems.
Before my main issue, I had a lot of problems for getting the LY to even run on startup! The issue was that in /etc/sv/ly, scripts of LY service were not executable! And I had to chmod +x run finish config them on my own. It was hard to figure this out, please mention this in the README!
My main issue is when I reach to the LY and input my password, it waits a second, then splashes, and now I see the LY but with this message: an unknown error occured. I cannot figure this out because my .xinitrc is executable and starts with shebang, and startx command works like a charm! Any ideas for debugging? I don't know if the LY has a log or something, and where is it stored....

how did you install on void? i get an error compiling

first error because zig on void repos is on 0.10
then after downloading 0.14 from zig downloads, i get another error that goes

/yang/tmp/ly/build.zig:32:33: error: no field named 'path' in union 'Build.LazyPath'
        .root_source_file = .{ .path = "src/main.zig" },
                                ^~~~
/yang/tmp/zig-linux-x86_64-0.14.0-dev.15+d4bc64038/zig-linux-x86_64-0.14.0-dev.15+d4bc64038/lib/std/Build.zig:2171:22: note: union declared here
pub const LazyPath = union(enum) {
                     ^~~~~
referenced by:
    runBuild__anon_8808: /yang/tmp/zig-linux-x86_64-0.14.0-dev.15+d4bc64038/zig-linux-x86_64-0.14.0-dev.15+d4bc64038/lib/std/Build.zig:2116:27
    main: /yang/tmp/zig-linux-x86_64-0.14.0-dev.15+d4bc64038/zig-linux-x86_64-0.14.0-dev.15+d4bc64038/lib/compiler/build_runner.zig:301:29
    remaining reference traces hidden; use '-freference-trace' to see all reference traces

@jabuxas
Just use ZIG v0.12.0 as mentioned in requirements. Newer or older versions fail to compile.

Weirdly enough, I get this issue too. No problem when running off v0.6.0 but the Zig one doesn't start up right on the tty (I have to switch to a different one and come back) and it always claims unknown error. I'm on Debian 12.

scripts of LY service were not executable! And I had to chmod +x run finish config them on my own. It was hard to figure this out, please mention this in the README!

This is now fixed in master and has been backported to v1.0.1. I'll try to investigate the unknown error very soon.

@ehsanghorbani190 I'm able to reproduce your issue when the dbus service isn't enabled. Can you check if that's the case on your system, and if so, does enabling it fix the issue?


Makes Dvara correctly rewrite passive hosts

Currently Dvara does not proxy passive hosts. A passive host is one that has a priority of 0. This happens when new hosts are added to a replica set for example.
Certain mongo drivers look at the list of passive hosts to generate its lists of hosts to connect to, and if Dvara does not proxy these hosts correctly it can result in strange state being returned to the driver and causing issues.
The ruby driver for example: https://github.com/mongodb/mongo-ruby-driver/blob/1.12.3/lib/mongo/connection/node.rb#L140
A big thanks to @bbaja42 for all his help with this.
Below is an explanation of what I did along with some output.
I created a 3 host mongo replica set on my local machine, and set one of the hosts to have a priority of 0.
rs1:SECONDARY> rs.config()
{
        "_id" : "rs1",
        "version" : 6,
        "members" : [
                {
                        "_id" : 0,
                        "host" : "localhost:27018"
                },
                {
                        "_id" : 1,
                        "host" : "localhost:27019",
                        "priority" : 0
                },
                {
                        "_id" : 2,
                        "host" : "localhost:27020"
                }
        ]
}

This results in db.isMaster() listing a passive host.
rs1:SECONDARY> db.isMaster()
{
        "setName" : "rs1",
        "setVersion" : 6,
        "ismaster" : false,
        "secondary" : true,
        "hosts" : [
                "localhost:27020",
                "localhost:27018"
        ],
        "passives" : [
                "localhost:27019"
        ],
        "primary" : "localhost:27018",
        "passive" : true,
        "me" : "localhost:27019",
        "maxBsonObjectSize" : 16777216,
        "maxMessageSizeBytes" : 48000000,
        "maxWriteBatchSize" : 1000,
        "localTime" : ISODate("2016-01-27T11:12:33.200Z"),
        "maxWireVersion" : 2,
        "minWireVersion" : 0,
        "ok" : 1
}

When I compile dvara from your current master HEAD: 87df58bc999ca6ea91edaac3aa03634057dc39be and connect to my replica set through it I get the following:
rs1:PRIMARY> db.isMaster()
{
        "setName" : "rs1",
        "setVersion" : 6,
        "ismaster" : true,
        "passives" : [
                "localhost:27019"
        ],
        "maxBsonObjectSize" : 16777216,
        "maxWriteBatchSize" : 1000,
        "minWireVersion" : 0,
        "secondary" : false,
        "maxMessageSizeBytes" : 48000000,
        "localTime" : ISODate("2016-01-27T11:16:51.131Z"),
        "maxWireVersion" : 2,
        "ok" : 1,
        "hosts" : [
                "<IP_ADDRESS>:6000",
                "<IP_ADDRESS>:6002"
        ],
        "primary" : "<IP_ADDRESS>:6000",
        "me" : "<IP_ADDRESS>:6000"
}

As you can see the passive host is not rewritten.
With the change submitted in this PR this case is handled as you can see below:
rs1:PRIMARY> db.isMaster()
{
        "maxBsonObjectSize" : 16777216,
        "maxWriteBatchSize" : 1000,
        "minWireVersion" : 0,
        "setName" : "rs1",
        "setVersion" : 6,
        "ismaster" : true,
        "secondary" : false,
        "passives" : [
                "<IP_ADDRESS>:6001"
        ],
        "maxMessageSizeBytes" : 48000000,
        "localTime" : ISODate("2016-01-27T11:17:50.284Z"),
        "maxWireVersion" : 2,
        "ok" : 1,
        "hosts" : [
                "<IP_ADDRESS>:6000",
                "<IP_ADDRESS>:6002"
        ],
        "primary" : "<IP_ADDRESS>:6000",
        "me" : "<IP_ADDRESS>:6000"
}

Could you sign this?: https://code.facebook.com/cla

dvara is no longer in use and we are not accepting pull requests for it anymore. Fork away and use it if it works for you! Thanks for your contributions.


Minimum cost to construct temple

💥 Proposal
All the people living in our imaginary world Bitworld are very religious.
There are N cities in Bitworld numbered from 1 to N.
Due to a storm, every road in Bitworld was destroyed and now no temples are left.
There are 2 types of operations :
You can construct a temple by giving away A dollars in ith city.
You can repair an already existing road by giving away B dollars.
Your goal is to make temples such that people of every city have access to some temple.
People of the ith city can visit the temple only if :
A temple exists in that city.
OR
There is a path from that city to a city which contains a temple.
You have to minimize the total cost such that people in every city can go to a temple and output this minimum cost.
Have you read the Contributing Guidelines on Pull Requests?
Yes
I want to work in C++

/assign


RP support for compute isolation

Which issue this PR addresses:

Fixes 8423813
What this PR does / why we need it:

This adds compute instances types for compute isolation that dedicates hardware for single customers.

[x] Add Compute isolation VM Types to 20210131preview package
[x] Move regex validation out of pkg/validate to reduce layering/import cyclic errors
[x] Made VMSizeIsValid and DiskSizeIsValida function of each api pkg to validate itself (consistency)
[x] Add latest api for quota validation that will cover all VM Types for all apis

Test plan for issue:

Existing tests.  Testing will come from subsequent work found on this story
Is there any documentation that needs to be updated for this PR?

Documentation will exist after successful testing to be done after testing is completed.

@troy0820 did msft confirmed they added the right meters for this?

@mjudeikis  I have not confirmed this yet.  I'll reach out to MSFT before we merge this.

What happens in the scenario when a customer creates a cluster with a new API version, but later another user attempts to get and update the cluster document using older version which doesn't support new VM sizes?

I not sold on using "latest" api validation everywhere. We will have quite a change when new api comes over again... So better to see if we can decouple now.

This takes all those functions out of the dynamic validator.  If we want to keep some of those functions in there and only use the functions like ValidateQuota as not part of the dynamic validator so each api can perform that function with it's own vms and api, we will run into the issue where we are validating quota with the latest.  Each api is iterating on the other with the vm types and we will run into the same problem next api version or when the lifecycle changes on the vm types.

@troy @jewzaam I might misunderstood what we discussed yesterday (all my fault as my mind was somewhere else).
This PR still splits validation into API specific validations so each api has its own list of VM types.
I was under impression we want just add new VM types into api/validate/vm.go and leave it. So old API will use new types too.
Considering situations:

Im using New api and created a cluster, but my colleague has old AZ cli and update fails now as it uses old API.
my CI uses api and I use az. Again, clash.

We would have edge case where if somebody managed to "pass in new type as VM type into old API" it will pass. As limitation is more on SDK and ARM swagger side. But I don't see any issues in this is somebody managed to do so. SDK is based on swagger so neither CLI or Portal will allow this. This is just edge case in pure api consumption.
So as part of this PR I expected to see:

Add new types into api/validate/vm/go
Extend quota validation with new types

This should make regexp changes not needed, and limit PR size to minimal. Or is there usecase/edge case Im missing here?
/cc @m1kola

I was under impression we want just add new VM types into api/validate/vm.go and leave it. So old API will use new types too.

@mjudeikis
Initially, Jim said that it can't go in the current api and advised to go in the preview api.  🤷🏽♂

This PR still splits validation into API specific validations so each api has its own list of VM types.

My understanding is that we would append the newer VM types to the preview api to leave the VM types api bound and use the latest validation to cover all the API VM types within quota (because it's not targeting a specific api version when doing the quota checking).  This was done for consistency (adding a vm.go to each api version) when doing the VMSIzeIsValid/DiskSizeIsValid for each VM type in the API version.
My thought is that going to self-service that @jewzaam proposed would eliminate a lot of this.

This should make regexp changes not needed, and limit PR size to minimal.

I can revert that change
I can create the change to add the VM types to the current api and admin and extend the quota validation for the new types.  That will decouple the validation at an API-specific level.

@m1kola any final words before merging?
This looks ok now. Adds types to new api only, extends validation. should be good.

/azp run E2E


Use "puppeteer-core" instead of "puppeteer"

Is it possible to use "puppeteer-core" instead of "puppeteer" for the sake of not having to specify the environment variable to exclude a chrome download?  I have to manually remove the chrome package from my distribution.

Currently, that is not possible, but I will add it in one of the next versions.

I don't know if this is related, but could you also please put into consideration to also allow another "puppeteer" package such as https://github.com/berstend/puppeteer-extra ?

Thanks for the idea. I will most likely add an option to pass a custom object which will be used as "puppeteer" object. So this will work then.

This is implemented in version 0.12. You can pass a custom object to be used like shown in this example. Give it a try :)


Merged streams make it unable to access streams

I'm not sure if this is intended or not, but enabling captureCombined will make getBuffers return CapturingBufferWriter for both stdout and stderr instead of PipedBuffer. The problem is that when calling the constructor of CommandChild, it checks against instances of PipedBuffer only, making it pass undefined to both buffers and making any call to CommandChild.{stdout,stderr}() fail in the assertion function.
I was expecting to be able to access the streams even when I wanted a combined buffer too.

Sorry, can you say on a higher level what the issue is when using the API (not about what's going on internally because it's changing a lot) and maybe provide an example of some code erroring?


up_squared: tests/kernel/timer/timer_api failed.

To Reproduce
Steps to reproduce the behavior:

west build -b up_squared -p auto tests/kernel/timer/timer_api
west flash ~/up_squared.sh
see error

Logs and console output
Booting Zephyr OS build zephyr-v2.5.0-487-g0ba94379381f
Running test suite timer_api
START - test_time_conversions
PASS - test_time_conversions
START - test_timer_duration_period
PASS - test_timer_duration_period
START - test_timer_restart
PASS - test_timer_restart
START - test_timer_period_0
PASS - test_timer_period_0
START - test_timer_expirefn_null
PASS - test_timer_expirefn_null
......
START - test_timer_user_data
PASS - test_timer_user_data
START - test_timer_remaining
PASS - test_timer_remaining
START - test_timeout_abs
Assertion failed at WEST_TOPDIR/zephyr/tests/kernel/timer/timer_api/src/main.c:725: test_timeout_abs: (cap_ticks + rem_ticks + 1 == exp_ticks) || (rem_ticks + cap2_ticks + 1 == exp_ticks) || (INEXACT_MS_CONVERT && (cap_ticks + rem_ticks == exp_ticks)) || (INEXACT_MS_CONVERT && (rem_ticks + cap2_ticks == exp_ticks)) is false
FAIL - test_timeout_abs
START - test_sleep_abs
PASS - test_sleep_abs
Test suite timer_api failed.
PROJECT EXECUTION FAILED
Environment (please complete the following information):

OS: Linux
Toolchain: zephyr-sdk-0.12.2
Commit ID: 0ba94379381f

duplicate of #32697


Spring Cloud Contract with Spring Cloud Stream

Is it possible to create SpringCloudContract for (SpringCloudStream) Processor project(SpringCloudStream) as producer and consumer?
Processor has both INPUT and OUTPUT to be tested. I have created a contract for Source (producer) and Processor(consumer). It works fine.
Now I want to make contract between Processor as producer  and Sink as consumer.
I implemented producer contract on Processor project (along with consumer contract)it failed with NullPointerException unbale to resolve destination "verifications" (jar version:spring-cloud-contract-verifier-1.0.4.RELEASE.jar). This value "verifications "is set in contract groovy file(sentTo  'verifications'). I have also set the application.properties with "spring.cloud.stream.bindings.output.destination = verifications.
I also tried changing name of the destination in groovy and properties file.
Kindly provide a sample link if available.
Thanks,
Kind Regards.

A stacktrace would be valuable cause I can only guess what the reasons for the error can be.
Check this sample - https://github.com/spring-cloud-samples/spring-cloud-contract-samples/tree/master/producer . It's working fine so ensure that you have all the necessary dependencies in your project.
Also here you have an example of a processor - https://cloud.spring.io/spring-cloud-contract/spring-cloud-contract.html#_scenario_2_output_triggered_by_input . But most likely you can change it to 2 separate contracts as described here https://github.com/spring-cloud/spring-cloud-contract/issues/321

Please find attached log file.
log.txt

I think that you're missing @EnableBinding or proper channel name. Without a sample it's impossible to help you. Also please first analyze the provided samples.

Thanks,
I used the "spring-cloud-contract-verifier" and "spring-cloud-starter-contract-verifier" with version "1.2.0.BUILD-SNAPSHOT", it worked fine but affects the consumer contract for stub runner.
In my approach as mentioned earlier I have A(source) where is have implemented producer contract (Pa).
B(processor), so B input is consumer of contract (Pa). I have C(sink), so B output is producer contract (Pb)and C input is consumer of contract(Pb).  A --> B --> C.  I have run the contract independently it works fine. But when it try to create producer and consumer in B, I have problem.
I get the error given below please attached log file.
I have observed that "spring-cloud-starter-contract-stub-runner" refers to "spring-cloud-contract-verifier" and "spring-cloud-starter-contract-verifier" version 1.0.4 hence I get the error:

Caused by: java.lang.NoSuchMethodError: org.springframework.cloud.contract.verifier.util.ContractVerifierDslConverter.convert(Ljava/io/File;)Lorg/springframework/cloud/contract/spec/Contract;
at org.springframework.cloud.contract.stubrunner.StubRepository$2.visitFile(StubRepository.java:134) ~[spring-cloud-contract-stub-runner-1.0.4.RELEASE.jar:1.0.4.RELEASE]
at org.springframework.cloud.contract.stubrunner.StubRepository$2.visitFile(StubRepository.java:127) ~[spring-cloud-contract-stub-runner-1.0.4.RELEASE.jar:1.0.4.RELEASE]
at java.nio.file.Files.walkFileTree(Files.java:2670) ~[na:1.8.0_121]
at java.nio.file.Files.walkFileTree(Files.java:2742) ~[na:1.8.0_121]
at org.springframework.cloud.contract.stubrunner.StubRepository.collectContractDescriptors(StubRepository.java:126) ~[spring-cloud-contract-stub-runner-1.0.4.RELEASE.jar:1.0.4.RELEASE]
at org.springframework.cloud.contract.stubrunner.StubRepository.contractDescriptors(StubRepository.java:119) ~[spring-cloud-contract-stub-runner-1.0.4.RELEASE.jar:1.0.4.RELEASE]
at org.springframework.cloud.contract.stubrunner.StubRepository.contracts(StubRepository.java:75) ~[spring-cloud-contract-stub-runner-1.0.4.RELEASE.jar:1.0.4.RELEASE]
at org.springframework.cloud.contract.stubrunner.StubRepository.(StubRepository.java:55) ~[spring-cloud-contract-stub-runner-1.0.4.RELEASE.jar:1.0.4.RELEASE]
log.txt

Following is the pom.xml
pom.txt
	`

Thanks!
My issue resolved.


withSolrUrl support

Do we have any way to use spark-solr with an HTTP URL? Sometimes I  can't know the ZK HOST.
I know there is a cache inside for HttpSolrClient and its key is based on zk host and shard url.  So I guess there is no way so far but let me confirm.
I mean I want to build a HttpSolrClient like following:
new CloudSolrClient.Builder().withSolrUrl("http://localhost:8983/solr").build();

We only support SolrCloud which always has a zkhost connect string. Http support is not present


WIP: pdk et al

This PR is a work in progress still.
Things done here:

pdk convert
remove EoL puppet version
remove EoL OS's
add current OS's to supported list (new Windows, new Debian, etc.)
adjust tests to rely on rspec puppet facts / facterdb
support Puppet 5 & 6
remove top scope'ed things and legacy facts
type all parameters

@thespain I would love your help testing / validating this once I finish making code changes


Adds ignore-paths to test workflow

As per #72 adding ignore-paths to the tests workflow to ignore runs when the change was made to a .md file or the static assets in the media and resources directories.
Closes #72

Wonderful!


python-markdown.js works in the browser but not in nbcovert output

I have installed python-markdown.js for IPython2 (my version is 2.4.0). I configured the custom.js file as described by the documentation. When I work with the notebook, everything works as expected. However, when I try to nbconvert the notebook, the resulting HTML file shows only the raw code, not the formatted output, despite the fact that everything runs without any errors:
my-dir$ ipython2 nbconvert --to=html Untitled0.ipynb
[NbConvertApp] Using existing profile dir: u'/Users/be/.ipython/profile_default'
[NbConvertApp] Converting notebook Untitled0.ipynb to html
[NbConvertApp] Support files will be in Untitled0_files/
[NbConvertApp] Loaded template full.tpl
[NbConvertApp] Writing 185954 bytes to Untitled0.html

I was trying the markdown today and I also noticed it: it only print the variable not its content. I hope they have a fix for this, it would be perfect.

You need to tell nbconvert to use the preprocessor from pymdpreprocessor.py. This will replace the code with the evaluated contents.
I'm busy right now so can't help you much nore for now.

Did you get nbconvert working with python-markdown ?

Closing.


Regex validation & custom onChange

Hey Dude,
Nice simple library, however the regex test fails while checking for hexadecimal characters
reg:/[0-9a-f]+/i, //Optional.[Bool].Default: "" Custom regex.
I tried every combination of expression here: https://stackoverflow.com/questions/9221362/regular-expression-for-a-hexadecimal-number
It works if you type a single non hexadecimal character into the box, but if you mix them up with hex chars it doesn't work for some reason (a 64 char bitcoin key for example:  7BBC52B8945AA22779E37937D909CCA744E92310A89DD9A531D06ABD8E3A0B97).
Also, I am trying to trim the entered values of whitespace and am wondering if the Textbox's bounded onChange function could be overridden somehow?
Like the following
onChange={this.handleChangeRecipientsPublicKey}
Thanks,
Freddie

Hi, thanks for your feedback.

I've tried reg:/[0-9a-f]+/i  with 7BBC52B8945AA22779E37937D909CCA744E92310A89DD9A531D06ABD8E3A0B97
and it works.
2.Cannot be overridden. I guess you need to manipulate the e.target? I could give you that, then you can do like this  onChange={(res, e) => {this.handleChangeRecipientsPublicKey(res, e)}}

as a workaround, sometimes you can do this
class Index extends Component {
  constructor(props) {
    this.state = {
      address: '',
      hasAddressError: true,
      addressErrorMessage: ''
    }
    this.handleAddressChange = this.handleAddressChange.bind(this)
  }
  handleAddressChange(address) {
    let hasAddressError = true;
    let addressErrorMessage = '';
    //ETH ADDRESS VALIDATING
    if (/^0x[a-fA-F0-9]{40}$/.test(address)) {
       hasAddressError = false;
       addressErrorMessage = 'Invalid ETH Address'
    }
    this._setState({ address, hasAddressError, addressErrorMessage });
  }
  render(){
      return (

           <Textbox
                  tabIndex="1"
                  id="address"
                  value={this.state.address}
                  type={`text`}
                  placeholder={`0x1234567890`}
                  onChange={this.handleAddressChange}
                  onBlur={() => {}}
                  validationOption={{
                    check: false
                  }}
                />
         {this.state.hasAddressError && this.state.addressErrorMessage != '' ?
{this.state.addressErrorMessage}
 : ''}

     )
  }
}

updated to 1.0.2 now, you might get 'e' now

Perfect, thanks!
I'm new to react but that's exactly what I was looking for.
Cheers


Schema type represents one schema

Issue

current schema type definition is strange as schema names which should replace the item in schema are in list under key children

Changes

with this implementation schema type represents only one schema name

BEFORE
{
    ...
    {
        "type": "schema",
        "children": [
            "schema_1",
            "schema_2"
        ]
    }
    ...
}

NOW
{
    ...
    {
        "type": "schema",
        "name": "schema_1"
    }, {
        "type": "schema",
        "name": "schema_2"
    }
    ...
}

Yeah I found it a bit strage before as well, this seems better.


Unexpected Characters with Update to Vim 9.1

environment

vim: 9.1 (2024 Jan 02, includes patches 1-110)
vim-airline: up-to-date with commit 20a49bd494a87a40b815289693c8b7505f0074c0
OS: CentOS 7
Have you reproduced with a minimal vimrc: yes
What is your airline configuration: default from installation
if you are using terminal:
terminal: GNOME
$TERM variable: xterm-256color
terminal columns size: 45
terminal line size: 127
color configuration (:set t_Co?):

if you are using Neovim:

does it happen in Vim: N/A

actual behavior
After closing Vim with minimal .vimrc, a control/unicode (unsure) character is at the top left of the display preceding the command prompt, which is shown as ">[<4;m", with the first greater-than sign being underlined.  When vim-obsidian (https://github.com/abra/vim-obsidian) is installed and that color scheme is specified in the .vimrc file, the above characters also show in the Vim session.
expected behavior
The above-mentioned characters are absent from the Vim session and from preceding the command line prompt after closing Vim.  This behavior was not observed, with all other things being equal, with Vim 8.2 installed.
screen shot (if possible)

That is a bug of your terminal, pretending to be xterm compatible when it isn't. It is not a vim-airline bugAm 16.02.2024 um 17:15 schrieb Tim Watson @.***>:
environment
vim: 9.1 (2024 Jan 02, includes patches 1-110)
vim-airline: up-to-date with commit 20a49bd
OS: CentOS 7
Have you reproduced with a minimal vimrc: yes
What is your airline configuration: default from installation
if you are using terminal:
terminal: GNOME
$TERM variable: xterm-256color
terminal columns size: 45
terminal line size: 127
color configuration (:set t_Co?):
if you are using Neovim:
does it happen in Vim: N/A
actual behavior
After closing Vim with minimal .vimrc, a control/unicode (unsure) character is at the top left of the display preceding the command prompt, which is shown as ">[<4;m", with the first greater-than sign being underlined.  When vim-obsidian (https://github.com/abra/vim-obsidian) is installed and that color scheme is specified in the .vimrc file, the above characters also show in the Vim session.
expected behavior
The above-mentioned characters are absent from the Vim session and from preceding the command line prompt after closing Vim.  This behavior was not observed, with all other things being equal, with Vim 8.2 installed.
screen shot (if possible)
Screenshot.from.2024-02-16.11-13-57.png (view on web)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>


Added an option to create a pry console in the gem with a custom prompt

Though it is similar to bundle console with the pry option set, this feature allows for a customizable script and pry prompt. Having a custom prompt and shell in a gem is handy way to show collaborators that they are in the proper context. There could be many other uses for it as well. I found this method in the rugged gem and I thought it was more intuitive to have a shell script ship with the gem. Also you could speed up development by renaming console to c so you can just call ./bin/c to hit the pry console.
This feature allows users to call:
bundle gem coolgem --console
./bin/console

Now they are in a pry console with the following prompt:
[coolgem] main >

I explain the process in my blog: http://lowbrowcoder.me/2015/01/01/how-to-add-a-pry-console-in-your-ruby-gem-for-testing/
Please let me know if there are things you'd like me to add or change to make the merge.

IMHO I don't think Bundler should favor a particular console. You can apparently already set the console called when running bundle console https://github.com/bundler/bundler/pull/2620. Does this help somehow?

Thanks for the response! My team is a big fan of using distributed scripts like this as opposed to using stock bundle config and more importantly .consolerc. The reason for this is that in gems that use extensions or need other kinds initialization or compilation, code can be in a visible shell script as opposed to a hidden rc file. This gives everyone who uses/tests the gem a similar experience. Though I agree that the method in place is very handy, I think there could be a use for this simple option that creates a shell script that encapsulates the console as well.
That being said, if this is something that you'd like to include in Bundler, I would be more than happy to add options for irb and Ripl just like #2620. Please let me know what you think.

I guess we've independently come up with the idea of adding a bin/console. :) We're we're definitely going to do that, just not as part of this pull request (so that we can avoid a hard pry dependency). Thanks for this pull request proving the concept!

@indirect Glad to know! Let me know if you would like any help developing that feature :+1:

It's already inplemented! You can try it out with gem install bundler --pre


ValueError: Could not parse following text as code edit:

Expected Behavior
Improve the code
Current Behavior
Error gets thrown
Failure Information
Traceback (most recent call last):
File "/home/riccardo/.local/bin/gpt-engineer", line 8, in
sys.exit(app())
File "/home/riccardo/.local/lib/python3.10/site-packages/gpt_engineer/cli/main.py", line 169, in main
messages = step(ai, dbs)
File "/home/riccardo/.local/lib/python3.10/site-packages/gpt_engineer/core/steps.py", line 588, in improve_existing_code
overwrite_files_with_edits(messages[-1].content.strip(), dbs)
File "/home/riccardo/.local/lib/python3.10/site-packages/gpt_engineer/core/chat_to_files.py", line 219, in overwrite_files_with_edits
edits = parse_edits(chat)
File "/home/riccardo/.local/lib/python3.10/site-packages/gpt_engineer/core/chat_to_files.py", line 268, in parse_edits
return parse_all_edits(llm_response)
File "/home/riccardo/.local/lib/python3.10/site-packages/gpt_engineer/core/chat_to_files.py", line 255, in parse_all_edits
edits.append(parse_one_edit(current_edit))
File "/home/riccardo/.local/lib/python3.10/site-packages/gpt_engineer/core/chat_to_files.py", line 240, in parse_one_edit
raise ValueError(f"Could not parse following text as code edit: \n{text}")
Steps to Reproduce
I'm using this prompt:

Improve Code for Readability and Reusability:

Refactor complex functions into smaller, more manageable pieces.
Use meaningful variable and function names that clearly indicate their purpose.
Follow a consistent coding style and adhere to best practices outlined in the project's style guide.
Implement design patterns where applicable to promote code reusability.
Implement TODOs Where Appropriate:
Review the codebase for any // TODO: comments and prioritize their completion based on the project's goals.
Assess the impact of each TODO on the current codebase and potential future developments.
Document the reasoning behind the resolution of TODOs for future reference.
Add Comments Where Appropriate:
Provide clear and concise comments for complex code blocks to explain the logic and its purpose.
Update or remove outdated comments that no longer reflect the current state of the code.
Use comments to outline the steps of complex algorithms or workflows within the code.
Optimize Performance:
Identify bottlenecks and optimize critical sections of the code for better performance.
Consider the time and space complexity of algorithms and refactor if more efficient solutions exist.
Utilize profiling tools to measure performance improvements.
Enhance Security:
Review the code for potential security vulnerabilities and apply best practices to mitigate risks.
Ensure that all sensitive data is properly encrypted and that secure coding principles are followed.
Stay updated with the latest security advisories and apply patches or updates as necessary.
Implement Unit Tests and Integration Tests:
Write unit tests for new features and bug fixes to validate individual components.
Create integration tests to ensure that different parts of the application work together as expected.
Strive for a high level of test coverage to catch potential issues early.

Also, I got charged :'(

Very bad the the error occurs after getting charged for the request

I believe this could be loosely related to #814 in that the diff head sections of the diffs are not completely clean.

I do get the same error :
raise ValueError(f"Could not parse following text as code edit: \n{text}")

@ATheorell any up?

@RiccardoRomagnoli
I'm looking at implementing https://github.com/gpt-engineer-org/gpt-engineer/issues/869 together with @similato87 to improve on this front. If you are interested in joining this effort, you are more than welcome.

I get the same error, basically unable to use the improvement as it errors out in the middle :
ValueError: Could not parse following text as code edit

Hello @RiccardoRomagnoli, @LRpz, @Chemformalixer, I'm thrilled to share that we've developed a solid approach to addressing these challenges. @ATheorell and I have rigorously tested it across a range of parsing tasks, and the results with the GPT-engineer are promising. Moreover, for tasks that surpass the capabilities of existing LLMs, our project will ensure accurate change instructions, providing an opportunity for you to optimize your token usage. No waste token anymore :) @RiccardoRomagnoli.

Great! This is very exciting news. Do you know when you'd like to release the update?

It is already released in the main branch. Release on pip will follow in a few days to allow for potential feedback @LRpz


Added DynDep tests to Helix

@jefgen it's a start but clearly incomplete. Suggestions on what's missing? Feel free to update the branch with the missing bits since it's probably easier to show than tell :P

Closing PRs that appear to have been abandoned.


Set envvars naming to KUBERNETES_AC_{something} pattern

Addresses #91

This change is

Reviewed 4 of 4 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


Multi-touch interference

When I use the Demo,
I hold the left hand with my left hand and click on the rectangle with my right hand,
then the center point will stop.
summary:
If there is a click event in the rectangle while moving, the center point will stop.

I Fixed that, please check it

Hey, I really appreciate your contributions! I have been out of town for last few days and will become available again on Friday.


fix: get_from_param_or_env import with old namespace

Description
This PR address a small but critical error of python package importing when using Azure OpenAI.
The end of the stack trace and the error itself:
python-1   |     from llama_index.llms.azure_openai.base import (
python-1   |   File "/usr/local/lib/python3.11/site-packages/llama_index/llms/azure_openai/base.py", line 7, in <module>
python-1   |     from llama_index.core.base.llms.generic_utils import get_from_param_or_env
python-1   | ModuleNotFoundError: No module named 'llama_index.core.base.llms.generic_utils'

Fixes # (issue)
Type of Change
Please delete options that are not relevant.

[X] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

[X] I stared at the code and made sure it makes sense

I think static analysis and strong typing are the way to go here?
Suggested Checklist:

[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] I have added Google Colab support for the newly added notebooks.
[X] My changes generate no new warnings
[X] I have added tests that prove my fix is effective or that my feature works
[X] New and existing unit tests pass locally with my changes
[X] I ran make format; make lint to appease the lint gods

@gabfr this should be  fixed if you update
pip install -U llama-index-core llama-index-llms-azure-openai

@gabfr this should be fixed if you update
pip install -U llama-index-core llama-index-llms-azure-openai

Hey, I just updated as you just said, hence the log:
root@7aa5b5404024:/app# poetry update llama-index-core llama-index-llms-azure-openai
Skipping virtualenv creation, as specified in config file.
Updating dependencies
Resolving dependencies... (5.4s)

Package operations: 0 installs, 1 update, 0 removals

  • Updating llama-index-core (0.10.6.post1 -> 0.10.8.post1)

Writing lock file

And I can confirm it resolved. Great! Thanks!
Now I'm having similar error, but in another point of the library:
python-1   |   File "/usr/local/lib/python3.11/site-packages/llama_index/embeddings/openai/base.py", line 10, in <module>
python-1   |     from llama_index.embeddings.openai.utils import (
python-1   |   File "/usr/local/lib/python3.11/site-packages/llama_index/embeddings/openai/utils.py", line 5, in <module>
python-1   |     from llama_index.core.llms.generic_utils import get_from_param_or_env
python-1   | ModuleNotFoundError: No module named 'llama_index.core.llms.generic_utils'

Should I try updating the openai integration package as well?

@gabfr update the embeddings as well (and tbh, just update any llama-index-* package you have installed lol)

@gabfr update the embeddings as well (and tbh, just update any llama-index-* package you have installed lol)

Yeah, that did the trick. Thanks!


illuminate/routing example

Thanks for this! I just merged #16  which was also routing, but this includes controllers and grouping and namespacing, which I think is helpful.
Would you be interested in re-working this PR against the code I already merged? If not, I'll do it, but if you do it, you'll get the author credit on git blame. Let me know which you'd prefer. :)

Oh, I apologize for I didn't take a look at the existing PRs. I will check it out and add the examples with controllers and grouping there :)


Upon "auto-apply" and "text-input" the value reverts to a previous state

Describe the bug
If you have auto-apply and text-input set to true there can be an inconsistent state, where the typed and selected date can return to the previously entered one.
To Reproduce
Steps to reproduce the behavior:

Set both auto-apply and text-input to true
Click into the input field, so the calendar opens up
Type a date into the input field (ex. 2022-02-22)
Do not close and reopen the calendar
Select another date from the calendar, that is still open (ex. 2022-02-23)
Upon date selection calendar will close, but the input is still in focus with the selected date
Blur the input (ex. click somewhere)
The input will be set to the typed date again (2022-02-22 in my example)

Expected behavior
The calendar date selection should override the typed value.
Possible reason
My suspicion would be in DatepickerInput.vue it sets it's own parsedDate.value, that is not overridden upon selecting a value from the calendar, so upon calling the handleBlur function, the stored parsedDate.value from the text input will be reassigned again.

Playground example: https://stackblitz.com/edit/vuepic-vue-datepicker-bkkz9i?file=src%2Fcomponents%2FPlayground.vue


[GSSoC'23] Fifteen Game ✔

Title - Fifteen Game
Issue Number - 695
Closes #695

@Shreyaar12 @admindebu @panwar8279 please review this pr. I have re-created the pr


Dev environment: Delphi XE3 licenses

As the developer, I need a Delphi  XE3 license in order to made the modifications to CPRS.

Mike received two licenses for the team and will have them installed today for the developers.

Delphi XE3 is installed on Windows 2012 R2 Server. However CRPS components need to be install in XE3. Sent request to Tony and BC for CPRS V31 Source files to be copied to GitHub.

Can close this because we have access to the licenses. We have not installed it for Kevin yet, since he is working on the back-end at the moment. Mike will help him set it up when he's ready for it.


Neon error when importing mediapipe python on raspberry pi 3

Help,
After building and installing mediapipe on a virtual env, i get this error
Traceback (most recent call last):
  File "hands.py", line 2, in <module>
    import mediapipe as mp*
  File "/home/pi/python8/mp_env/lib/python3.8/site-packages/mediapipe/__init__.py", line 16, in <module>
    from mediapipe.python import *
  File "/home/pi/python8/mp_env/lib/python3.8/site-packages/mediapipe/python/__init__.py", line 17, in <module>
    from mediapipe.python._framework_bindings import resource_util
ImportError: /home/pi/python8/mp_env/lib/python3.8/site-packages/mediapipe/python/_framework_bindings.cpython-38-arm-linux-gnueabihf.so: undefined symbol: _ZN3ruy14Kernel8bitNeonERKNS_16KernelParams8bitILi4ELi2EEE

I installed open-cv with both options 1, and options 2.
I'm running this on a raspberry pi 3 B, with swappartion.

The official documentation points to https://github.com/jiuqiant/mediapipe_python_aarch64 for aarch64 Linux  users.
Please read https://github.com/jiuqiant/mediapipe_python_aarch64/blob/main/README.md or try https://github.com/jiuqiant/mediapipe_python_aarch64/blob/main/manylinux_aarch64/mediapipe-0.8.1-cp38-cp38-manylinux2014_aarch64.whl on Raspberry Pi 3B.

Thanks for the quick reply
Yeah, i'm pretty sure i followed that document, and everything built without errors but a lot of info messages,
when i ran python3 -m pip install mediapipe/dist/mediapipe-0.8-cp38-cp38-linux_aarch64.whl
after setup.py bdist_wheel the error i get was
undefined symbol: __atomic_load_8 or something like that,
then when i run
setup.py install --link-opencv
i get the above error with Neon
i was also getting some gcc7.1 info messages pop up whilst building but im not sure if it means anything.
and also when trying
pip install dist/mediapipe-0.8.1-cp38-cp38-manylinux2014_aarch64.whl  i get a not supported on this platform error.

For "undefined symbol: __atomic_load_8", can you add -latomic into https://github.com/google/mediapipe/blob/39309bedba255aee2a4f31b29b65609857698ada/third_party/BUILD#L144 and rerun python3 setup.py gen_protos && python3 setup.py bdist_wheel to see if it helps? Here is a similar issue for your reference: https://forum.juce.com/t/juce-in-raspberry-pi-4b-solved/41895.
I think we need to build opencv rather than linking the existing library to avoid missing Neon symbol issue

okay i'll try right now and get back to you

update, so i added -libatomic to third_party/BUILD and ran bdist_wheel and then pip installed, but i still get
Python 3.8.7 (default, Feb  7 2021, 12:36:27)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mediapipe
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pi/python8/mp_env/lib/python3.8/site-packages/mediapipe/__init__.py", line 16, in <module>
    from mediapipe.python import *
  File "/home/pi/python8/mp_env/lib/python3.8/site-packages/mediapipe/python/__init__.py", line 17, in <module>
    from mediapipe.python._framework_bindings import resource_util
ImportError: /home/pi/python8/mp_env/lib/python3.8/site-packages/mediapipe/python/_framework_bindings.cpython-38-arm-linux-gnueabihf.so: undefined symbol: _ZN3ruy14Kernel8bitNeonERKNS_16KernelParams8bitILi4ELi2EEE

i installed open cv via both
sudo apt-get install libopencv-core-dev libopencv-highgui-dev \
                       libopencv-calib3d-dev libopencv-features2d-dev \
                       libopencv-imgproc-dev libopencv-video-dev

and then setup_opencv.sh when i got similar errors as above.
but i feel like something is wrong because i have ffmpeg only under usr/local/lib.. but opencv under both usr/local/include and usr/include

Can you paste the content of your third_party/BUILD here?

ok
# Copyright 2019 The MediaPipe Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

licenses(["notice"])  # Apache License 2.0

exports_files(["LICENSE"])

package(default_visibility = ["//visibility:public"])

cc_library(
    name = "glog",
    visibility = ["//visibility:public"],
    deps = select({
        "//mediapipe:android_x86": [
            "@com_github_glog_glog_no_gflags//:glog",
        ],
        "//mediapipe:android_x86_64": [
            "@com_github_glog_glog_no_gflags//:glog",
        ],
        "//mediapipe:android_armeabi": [
            "@com_github_glog_glog_no_gflags//:glog",
        ],
        "//mediapipe:android_arm": [
            "@com_github_glog_glog_no_gflags//:glog",
        ],
        "//mediapipe:android_arm64": [
            "@com_github_glog_glog_no_gflags//:glog",
        ],
        "//mediapipe:ios": [
            "@com_github_glog_glog_no_gflags//:glog",
        ],
        "//mediapipe:macos": [
            "@com_github_glog_glog//:glog",
        ],
        "//mediapipe:windows": [
            "@com_github_glog_glog//:glog",
        ],
        "//conditions:default": [
            "@com_github_glog_glog//:glog",
        ],
    }),
)

config_setting(
    name = "opencv_source_build",
    define_values = {
        "OPENCV": "source",
    },
    visibility = ["//visibility:public"],
)

alias(
    name = "opencv",
    actual = select({
        ":opencv_source_build": ":opencv_cmake",
        "//conditions:default": ":opencv_binary",
    }),
    visibility = ["//visibility:public"],
)

load("@rules_foreign_cc//tools/build_defs:cmake.bzl", "cmake_external")

# Note: this determines the order in which the libraries are passed to the
# linker, so if library A depends on library B, library B must come _after_.
# Hence core is at the bottom.
OPENCV_MODULES = [
    "imgproc",
    "core",
]

# Note: passing both BUILD_SHARED_LIBS=ON and BUILD_STATIC_LIBS=ON to cmake
# still only builds the shared libraries, so we have to choose one or the
# other. We build shared libraries by default, but this variable can be used
# to switch to static libraries.
OPENCV_SHARED_LIBS = False

OPENCV_SO_VERSION = "3.4"

cmake_external(
    name = "opencv_cmake",
    # Values to be passed as -Dkey=value on the CMake command line;
    # here are serving to provide some CMake script configuration options
    cache_entries = {
        "CMAKE_BUILD_TYPE": "Release",
        # The module list is always sorted alphabetically so that we do not
        # cause a rebuild when changing the link order.
        "BUILD_LIST": ",".join(sorted(OPENCV_MODULES)),
        "BUILD_TESTS": "OFF",
        "BUILD_PERF_TESTS": "OFF",
        "BUILD_EXAMPLES": "OFF",
        "BUILD_SHARED_LIBS": "ON" if OPENCV_SHARED_LIBS else "OFF",
        "WITH_ITT": "OFF",
        "WITH_JASPER": "OFF",
        "WITH_WEBP": "OFF",
        # When building tests, by default Bazel builds them in dynamic mode.
        # See https://docs.bazel.build/versions/master/be/c-cpp.html#cc_binary.linkstatic
        # For example, when building //mediapipe/calculators/video:opencv_video_encoder_calculator_test,
        # the dependency //mediapipe/framework/formats:image_frame_opencv will
        # be built as a shared library, which depends on a cv::Mat constructor,
        # and expects it to be provided by the main exacutable. The main
        # executable depends on libimage_frame_opencv.so and links in
        # libopencv_core.a, which contains cv::Mat. However, if
        # libopencv_core.a marks its symbols as hidden, then cv::Mat is in
        # opencv_video_encoder_calculator_test but it is not exported, so
        # libimage_frame_opencv.so fails to find it.
        "OPENCV_SKIP_VISIBILITY_HIDDEN": "ON" if not OPENCV_SHARED_LIBS else "OFF",
        # The COPY actions in modules/python/python_loader.cmake have issues with symlinks.
        # In any case, we don't use this.
        "OPENCV_SKIP_PYTHON_LOADER": "ON",
        # Need to set this too, for the same reason.
        "BUILD_opencv_python": "OFF",
        # Ccache causes issues in some of our CI setups. It's not clear that
        # ccache would be able to work across sandboxed Bazel builds, either.
        # In any case, Bazel does its own caching of the rule's outputs.
        "ENABLE_CCACHE": "OFF",
        "WITH_TENGINE": "OFF",
        "ENABLE_NEON": "OFF",
    },
    lib_source = "@opencv//:all",
    linkopts = [] if OPENCV_SHARED_LIBS else [
        # When using static libraries, the binary that eventually depends on the
        # libraries also needs to link in their dependencies, which therefore
        # have to be listed here.
        # This list depends on which dependencies CMake finds when it configures
        # the build, and so depends on what is installed on the local system.
        # After building, the linkopts for the current setup can be extracted
        # from lib/pkgconfig/opencv.pc in bazel-out
        "-lz",
        "-ldl",
        "-lm",
        "-lpthread",
        "-latomic",
    ],
    shared_libraries = select({
        "@bazel_tools//src/conditions:darwin": ["libopencv_%s.%s.dylib" % (module, OPENCV_SO_VERSION) for module in OPENCV_MODULES],
        # Only the shared objects listed here will be linked in the directory
        # that Bazel adds to the RUNPATH of dependent executables. You cannot
        # list both the versioned and unversioned name of the .so, and the
        # versioned name is the one that the executables actually reference.
        "//conditions:default": ["libopencv_%s.so.%s" % (module, OPENCV_SO_VERSION) for module in OPENCV_MODULES],
    }) if OPENCV_SHARED_LIBS else None,
    static_libraries = [
        "libopencv_%s.a" % module
        for module in OPENCV_MODULES
    ] if not OPENCV_SHARED_LIBS else None,
)

alias(
    name = "opencv_binary",
    actual = select({
        "//mediapipe:android_x86": "@android_opencv//:libopencv_x86",
        "//mediapipe:android_x86_64": "@android_opencv//:libopencv_x86_64",
        "//mediapipe:android_armeabi": "@android_opencv//:libopencv_armeabi-v7a",
        "//mediapipe:android_arm": "@android_opencv//:libopencv_armeabi-v7a",
        "//mediapipe:android_arm64": "@android_opencv//:libopencv_arm64-v8a",
        "//mediapipe:ios": "@ios_opencv//:opencv",
        "//mediapipe:macos": "@macos_opencv//:opencv",
        "//mediapipe:windows": "@windows_opencv//:opencv",
        "//conditions:default": "@linux_opencv//:opencv",
    }),
)

cc_library(
    name = "libffmpeg",
    visibility = ["//visibility:public"],
    deps = select({
        "//mediapipe:android_x86": [],
        "//mediapipe:android_x86_64": [],
        "//mediapipe:android_armeabi": [],
        "//mediapipe:android_arm": [],
        "//mediapipe:android_arm64": [],
        "//mediapipe:ios": [],
        "//mediapipe:macos": [
            "@macos_ffmpeg//:libffmpeg",
        ],
        "//conditions:default": [
            "@linux_ffmpeg//:libffmpeg",
        ],
    }),
)

android_library(
    name = "androidx_annotation",
    exports = [
        "@maven//:androidx_annotation_annotation",
    ],
)

android_library(
    name = "androidx_appcompat",
    exports = [
        "@maven//:androidx_appcompat_appcompat",
    ],
)

android_library(
    name = "androidx_constraint_layout",
    exports = [
        "@maven//:androidx_constraintlayout_constraintlayout",
    ],
)

android_library(
    name = "androidx_core",
    exports = [
        "@maven//:androidx_core_core",
    ],
)

android_library(
    name = "androidx_legacy_support_v4",
    exports = [
        "@maven//:androidx_legacy_legacy_support_v4",
    ],
)

android_library(
    name = "androidx_material",
    exports = [
        "@maven//:com_google_android_material_material",
    ],
)

android_library(
    name = "androidx_recyclerview",
    exports = [
        "@maven//:androidx_recyclerview_recyclerview",
    ],
)

android_library(
    name = "camerax_camera2",
    exports = [
        "@maven//:androidx_camera_camera_camera2",
    ],
)

android_library(
    name = "camerax_core",
    exports = [
        "@maven//:androidx_camera_camera_core",
    ],
)

android_library(
    name = "camerax_lifecycle",
    exports = [
        "@maven//:androidx_camera_camera_lifecycle",
    ],
)

am I missing anything ? @jiuqiant or could it be I have a bad installation of opencv

Had this exact problem recently. I am using raspberrypi-4b with Raspbian GNU/Linux 10 (armv7l not aarch64).
The issue is that bazel does not compile with flags to enable neon. You need to add these to bazel_command in
setup.py.
        '--copt=-march=armv7-a',
        '--copt=-mfpu=neon-vfpv4',

We are closing this issue for now due to lack of activity.

Had this exact problem recently. I am using raspberrypi-4b with Raspbian GNU/Linux 10 (armv7l not aarch64).
The issue is that bazel does not compile with flags to enable neon. You need to add these to bazel_command in
setup.py.
        '--copt=-march=armv7-a',
        '--copt=-mfpu=neon-vfpv4',

Thanks for posting your solution.
Closing this issue now.


Getting just a count(*) from a belongsToMany method?

Say I have a model with a "belongsToMany through" relation like this:
module.exports = bookshelf.Model.extend({
  followedPosts: function () {
    return this.belongsToMany(Post).through(Follow)
  }
})

This works great for getting the actual records across the relation. But in my application I  sometimes just need to get the count of records, and don't want to have to pull down all the data from the DB when all I need is the count.
With a hasMany, this is easy -- I can append .query(q => q.count()). But with a belongsToMany, it puts columns from the pivot table into select, and I can't figure out how to remove them:
> user.followedPosts().query(q => q.count()).fetch()
log: select count(*), "follower"."id" as "_pivot_id", "follower"."user_id" as "_pivot_user_id", "follower"."post_id" as "_pivot_post_id"
log: from "post" inner join "follower" on "follower"."post_id" = "post"."id"
log: where "follower"."user_id" = 42
Promise rejected: error: column "follower.id" must appear in the GROUP BY clause or be used in an aggregate function

I guess it's safe to assume this isn't possible?

No idea, but if you haven't been able to figure it out in all this time it probably isn't. I'll mark it as a feature request.


Implement home

It should be possible for a pod to know what its homepage is. Specifically, this will be useful for build and automation tools to provide users with a link to preview a site once a build is complete.
Here's the syntax I'm thinking:
# In podspec.yaml:

home: /content/pages/home.yaml

The value of "home" isn't actually a URL path, but rather a path to a content document. This is important to follow the "don't repeat yourself" philosophy. The homepage URL is thus derived from the corresponding document's $path.

LMK if you have any thoughts @meizon. Thanks! :)

Implemented with 3c5d37e. We are also able to provide a direct clickable link when the server starts to the site's homepage – especially useful for sites that aren't rooted at "/".

This is implemented, will be out with the next release, which is imminent since it will include a few fixes needed for a project.