[BUG]

Execute the command and paste the result below.
Command: uname -a && php -v && composer info | grep hyperf && php --ri swoole
# Paste the result here.

Linux c558b677781d 5.4.0-77-generic #86~18.04.1-Ubuntu SMP Fri Jun 18 01:23:22 UTC 2021 x86_64 Linux
PHP 7.4.19 (cli) (built: May 23 2021 06:27:45) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.19, Copyright (c), by Zend Technologies
hyperf/amqp                          v2.0.22     A amqplib for hyperf.
hyperf/cache                         v2.0.9      A cache component for hyperf.
hyperf/command                       v2.0.23     Command for hyperf
hyperf/config                        v2.0.9      An independent component that provides configuration container.
hyperf/constants                     v2.0.9      A constants component for hyperf.
hyperf/contract                      v2.0.13     The contracts of Hyperf.
hyperf/crontab                       v2.0.13     A crontab component for Hyperf.
hyperf/database                      v2.0.26     A flexible database library.
hyperf/db-connection                 v2.0.20     A hyperf db connection handler for hyperf/database.
hyperf/devtool                       v2.0.21     A Devtool for Hyperf.
hyperf/di                            v2.0.26     A DI for Hyperf.
hyperf/dispatcher                    v2.0.19     A HTTP Server for Hyperf.
hyperf/elasticsearch                 v2.0.10     Elasticsearch client for hyperf
hyperf/event                         v2.0.10     an event manager that implements PSR-14.
hyperf/exception-handler             v2.0.13     Exception handler for hyperf
hyperf/framework                     v2.0.11     A coroutine framework that focuses on hyperspeed and flexible, specifically use for build microservices and middlewares.
hyperf/grpc                          v2.0.12     A GRPC basic library for Hyperf.
hyperf/grpc-client                   v2.0.16     A GRPC Client for Hyperf.
hyperf/grpc-server                   v2.0.11     A GRPC Server for Hyperf.
hyperf/guzzle                        v2.0.21     Swoole coroutine handler for guzzle
hyperf/http-message                  v2.0.24     microservice framework base on swoole
hyperf/http-server                   v2.0.24     A HTTP Server for Hyperf.
hyperf/logger                        v2.0.11     A logger component for hyperf.
hyperf/memory                        v2.0.12     An independent component that use to operate and manage memory.
hyperf/model-cache                   v2.0.23     A model cache component for hyperf.
hyperf/model-listener                v2.0.12     A model listener for Hyperf.
hyperf/paginator                     v2.0.17     A paginator component for hyperf.
hyperf/pool                          v2.0.12     An independent universal connection pool component.
hyperf/process                       v2.0.13     A process component for hyperf.
hyperf/redis                         v2.0.18     A redis component for hyperf.
hyperf/server                        v2.0.24     A base server library for Hyperf.
hyperf/session                       v2.0.20     A session library
hyperf/snowflake                     v2.0.24     A snowflake library
hyperf/task                          v2.0.18     A task library for Hyperf.
hyperf/testing                       v2.0.14     Testing for hyperf
hyperf/tracer                        v2.0.25     A open tracing system implemented for Hyperf or other coroutine framework
hyperf/translation                   v2.0.18     An independent translation component, forked by illuminate/translation.
hyperf/utils                         v2.0.25     A tools package that could help developer solved the problem quickly.
hyperf/validation                    v2.0.24     hyperf validation
hyperf/watcher                       v2.0.22
hyperf/websocket-client              v2.0.13     A websocket client library for Hyperf.
swoole
Swoole => enabled
Author => Swoole Team<EMAIL_ADDRESS>Version => 4.5.7
Built => Jun  4 2021 05:01:16
coroutine => enabled
epoll => enabled
eventfd => enabled
signalfd => enabled
spinlock => enabled
rwlock => enabled
openssl => OpenSSL 1.1.1k  25 Mar 2021
http2 => enabled
json => enabled
pcre => enabled
zlib => 1.2.11
mutex_timedlock => enabled
pthread_barrier => enabled
async_redis => enabled
Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => Off => Off
swoole.unixsock_buffer_size => 8388608 => 8388608
Description:
我用注解定义了一个定时任务。
每27分钟执行一次，运行结果是不断执行。
期望，每27分钟执行一次。
@Crontab(name="VPNTjTask", rule="* */27 * * * *", singleton=true, callback="execute")
[INFO] Crontab task [MechanDeviceCountTask] executed successfully at 2021-07-13 00:50:46.
[INFO] Crontab task [MechanDeviceCountTask] executed successfully at 2021-07-13 00:50:47.
[INFO] Crontab task [MechanDeviceCountTask] executed successfully at 2021-07-13 00:50:48.
[INFO] Crontab task [MechanDeviceCountTask] executed successfully at 2021-07-13 00:50:49.
[INFO] Crontab task [MechanDeviceCountTask] executed successfully at 2021-07-13 00:50:50.
[INFO] Crontab task [MechanDeviceCountTask] executed successfully at 2021-07-13 00:50:51.
[INFO] Crontab task [MechanDeviceCountTask] executed successfully at 2021-07-13 00:50:52.
[INFO] Crontab task [MechanDeviceCountTask] executed successfully at 2021-07-13 00:50:53.
[INFO] Crontab task [MechanDeviceCountTask] executed successfully at 2021-07-13 00:50:54.
Steps To Reproduce:

handle();
        } catch (Throwable $e) {
            $this->logService->setGroup('vpn')->setFlow('统计')->error($e->getMessage());
        }
    }

    public function handle()
    {
        Vpn::query()->orderByDesc('id')->chunk(50,function (&$vpns){
            try{
                /***@var $vpn VPN* */
                foreach ($vpns as $vpn) {
                    $num = Device::query()->where('vpn_id', $vpn->id)->count();
                    $vpn->allocated_num = $num;
                    $vpn->save();
                    usleep(5);
                }
            }catch (Throwable $e){
                Db::rollBack();
                $this->logService->setGroup('vpn')->setFlow('统计')->error($e->getMessage());
            }
        });
    }
}

`<?php
namespace App\Task;
use App\Help\Log\LogService;
use App\Model\Device;
use App\Model\Vpn;
use Hyperf\Crontab\Annotation\Crontab;
use Hyperf\Di\Annotation\Inject;
use Hyperf\DbConnection\Db;
use Throwable;
/**

@Crontab(name="VPNTjTask", rule="* */27 * * * ", singleton=true, callback="execute")
/
class VPNTjTask
{
/

@Inject
@var LogService
*/
protected LogService $logService;

public function execute()
{
try {
$this->handle();
} catch (Throwable $e) {
$this->logService->setGroup('vpn')->setFlow('统计')->error($e->getMessage());
}
}
public function handle()
{
Vpn::query()->orderByDesc('id')->chunk(50,function (&$vpns){
try{
/**@var $vpn VPN */
foreach ($vpns as $vpn) {
$num = Device::query()->where('vpn_id', $vpn->id)->count();
$vpn->allocated_num = $num;
$vpn->save();
usleep(5);
}
}catch (Throwable $e){
Db::rollBack();
$this->logService->setGroup('vpn')->setFlow('统计')->error($e->getMessage());
}
});
}
}`

*/27 * * * *


Build on Jenkins in combination with match fails

I'm running a fastlane job on Jenkins with match and gym.
I've read the guide at https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Jenkins.md and it tells me to use the Keychains and Provisioning Profiles Plugin but that seems a bit outdated since I'm using match. I don't see how this plugin works in combination with match since it asks me to specify codesigning identities at configuration time.
I finally got match working after runnig into many problems (I'm using now MATCH_PASSWORD and FASTLANE_PASSWORD env variables to avoid some of the errors).
The result of match:
[15:15:18]: Cloning remote git repo...
[15:15:20]: 🔓  Successfully decrypted certificates repo
[15:15:20]: Verifying that the certificate and profile are still valid on the Dev Portal...
[15:15:23]: Installing certificate...
[15:15:24]: Installing provisioning profile...
Unfortunately, once it starts building with gym, it fail with the following error:
[31m❌  Code Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) were found.
How is this possible if it just installed it with match?

Hi @lammertw Thanks for reaching out. Can you let me know what happens if you set the codesigning_identity parameter of gym? Thanks!

Hey @lammertw, I've been struggling with this problem too the last couple of days. What worked for me was a cleanup of my certificates in ITC (it was a mess). Then installed and set all the certificates on the jenkins build server (in the xcode project) so that Xcode doesn't give any warnings/errors regarding the provision profiles. It might nog be perfect but it works for me. This way I didn't have to use match at all.

I found a solution and it seemed to be releated to the keychain. When I configure the job to first run the folllowing it works:
security unlock-keychain -p ****

Does that make sense or should things also work without running that command. I'm using a jenkins user on a virtualbox instance.

@lammertw Awesome! Really glad you got up and running. Hope you have a wonderful day!
@lenkaiser Thanks for stepping in! 💯

Actually I found that the solution I mentioned is not the right one. So for those reading this later on, the right solution is to use the setup_jenkins action of fastlane and set a keychain_path option or KEYCHAIN_PATH environment variable.
I could only find this by looking in the setup_jenkins action source code. Is there any documentation on this that describes this or anyway to run a --help command on this action?


False positives on mentions.

I keep getting the mention highlight when I am not being mentioned. This also make the safari notifications trigger all the time when I really am not being mentioned.

Can you give us an example on when you get mentioned and also what your handle (nick) is?

my nick is [Lucas] (brackets part of the the nick)

interesting note: Last night I signed into demo.convos.by and added the same channel to see if it did the same thing on there. I did not but my nick is ludagoo on there. I am starting to wander if it has to do with the brackets. When I /nick [Lucas] convos always complains saying it is not a legit nick but then goes ahead and uses it.

Wow fast fix. Good job. Thank you for the fast fix! I'm really liking this convos.
Not same bug but related...

Yeah, the regex for matching valid nicks is a bit too naive as well. I've
replaced it with a better one now.
Marcus
On Wed, Apr 29, 2015 at 4:59 PM Lucas Goossen<EMAIL_ADDRESS>wrote:

Wow fast fix. Good job. Thank you for the fast fix! I'm really liking this
convos.
Not same bug but related...
[image: screen shot 2015-04-29 at 9 56 10 am]
https://cloud.githubusercontent.com/assets/898064/7393976/6f943ff0-ee56-11e4-9a01-587d525ae81c.png
—
Reply to this email directly or view it on GitHub
https://github.com/Nordaaker/convos/issues/243#issuecomment-97457207.

Nice!

I have put off saying anything because this seems like such an insignificant bug but you'll fixed it so fast before I might as well mention it.
Now mentions don't work at all with the nick [Lucas]


Logrus package change fix

The purpose of this change is to address recent logrus package name changes.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Coverage remained the same at 80.903% when pulling 317eeee52917ae4008cc87507848102b1fafc257 on whosthatknocking:logrus into 7a6f6147da201fd682cd8f22dc07e9289c939e5c on uber:master.


[DUBBO-2850]: Fix consumer stub bug in multi registries

What is the purpose of the change
fix #2850
Brief changelog
XXXXX
Verifying this change
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Make sure there is a GITHUB_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[ ] Format the pull request title like [Dubbo-XXX] Fix UnknownException when host config not exist #XXX. Each commit in the pull request should have a meaningful subject line and body.
[ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
[ ] Run mvn clean install -DskipTests & mvn clean test-compile failsafe:integration-test to make sure unit-test and integration-test pass.
[ ] If this contribution is large, please follow the Software Donation Guide.

Codecov Report

Merging #2887 into master will decrease coverage by 0.08%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2887      +/-   ##
==========================================
- Coverage   63.75%   63.67%   -0.09%
==========================================
  Files         577      577
  Lines       25926    25930       +4
  Branches     4539     4540       +1
==========================================
- Hits        16529    16510      -19
- Misses       7242     7263      +21
- Partials     2155     2157       +2

Impacted Files
Coverage Δ

...dubbo/rpc/cluster/directory/AbstractDirectory.java
85.1% <100%> (+1.38%)
:arrow_up:

.../remoting/transport/netty4/NettyClientHandler.java
75% <0%> (-11.12%)
:arrow_down:

...org/apache/dubbo/rpc/filter/ActiveLimitFilter.java
77.77% <0%> (-11.12%)
:arrow_down:

.../apache/dubbo/remoting/transport/AbstractPeer.java
58.69% <0%> (-8.7%)
:arrow_down:

...onfig/spring/extension/SpringExtensionFactory.java
78.94% <0%> (-5.27%)
:arrow_down:

.../dubbo/remoting/transport/netty4/NettyChannel.java
61.17% <0%> (-4.71%)
:arrow_down:

...ubbo/rpc/protocol/dubbo/ChannelWrappedInvoker.java
45.83% <0%> (-4.17%)
:arrow_down:

...ing/exchange/support/header/AbstractTimerTask.java
66.66% <0%> (-4.17%)
:arrow_down:

...org/apache/dubbo/rpc/protocol/AbstractInvoker.java
59.67% <0%> (-3.23%)
:arrow_down:

...a/org/apache/dubbo/monitor/dubbo/DubboMonitor.java
87.85% <0%> (-1.87%)
:arrow_down:

... and 5 more

Continue to review full report at Codecov.

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

I think it's ok to change directory url from zookeeper://...?refer=xxx to dubbo://xxx.
But I don't understand why this will stop Stub from working properly,  I think the underlying invoker url will finally decide whether to enable Stub or not.

I will give the feedback after tried locally.

All questions cleared up.


Consolidate TagPack-level properties

Two issues with TagPack-level properties; to be discussed with @mdragaschnig

[ ] The schema defined creator and owner. It turned out that in practice this mostly the same; we should consolidate this and eliminate the owner field
[ ] the source property is a tag-level field, but the db schema defines it as tagpack-level field; maybe remove it as well.

@myrho is the tagpack source property used in the REST interface?

yes

sorry, no, tagpack.source is not used


Added new cloudflare resources and data

I added the new cloudflare resources and data.

Just to know -- The fail in the travis is not because my PR.

I fixed the issue (https://travis-ci.org/mjuenema/python-terrascript/builds/426822364). After my PR be merged, you would merge with master and update your PR.

Any idea when this PR will be merged??

Sorry, I am flat out at work and have little time for other projects at the moment. I'll try to merge this PR and also create a new release as soon as as possible. You are not forgotten...

Codecov Report

Merging #54 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@           Coverage Diff            @@
##           master    #54      +/-   ##
========================================
+ Coverage      99%    99%   +<.01%
========================================
  Files         138    138
  Lines        2602   2620      +18
========================================
+ Hits         2576   2594      +18
  Misses         26     26

Impacted Files
Coverage Δ

terrascript/cloudflare/r.py
100% <100%> (ø)
:arrow_up:

terrascript/cloudflare/d.py
100% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


Include Maybe/Option types in the statically typed version

Nullability should be explicit.
type T? = niente | some(x: T)

This should be moved under sonic-weave and reference https://github.com/xenharmonic-devs/sonic-weave/issues/2 .


Are we approaching dependency hell?

While doing aiidalab maintenance I discovered a very frustrating thing that potentially can lead to a considerable amount of problems in the future.
In our dependency stack we have aiida-vasp plugin. Aiida-vasp, in turn, depends on pymatgen that failed to build.
The frustrating thing is: I am not developer/maintainer of any of those packages, but I have to "manually" fix the dependency.
As the number of plugins will grow, the problem will get more and more pronounced.
Another frustrating thing is that aiidalab-metapkg tests could not catch the problem. The problem appeared during the build of aiidalab Docker file. I assume that pip does not have a fixed order of how to install dependencies of dependencies:

In the first case the aiidalab-metapkg test could pass because another package depends on a specific version of pymatgen that was built before aiida-vasp dependencies.
In the second case aiida-vasp dependencies were built earlier. Aiida-vasp plugin does not specify the exact version of pymatgen, so the latest was taken and this caused the build to fail.

For the moment I can't propose any solution, I should think a bit more on how to approach that.
@giovannipizzi, @ltalirz, @CasperWA any ideas/thoughts? Maybe it was already solved somewhere else? :)

@yakutovicha Part of the problem, namely the one of creating reproducible builds, is solved by a tool called pipenv.
The basic idea is: instead of a requirements.txt file with fixed dependencies (which, in the end are still not perfectly fixed because of dependencies of dependencies), you create a Pipenv file, where you specify the dependency ranges you are interested in (typically you fix MAJOR.MINOR and allow changes in PATH versions).

It's used by invenio and I started looking into this for aiidalab a few weeks ago but stopped exactly because of the dependency conflicts that exist.
Of course, pipenv can not resolve explicit dependency conflicts that exist between aiida plugins.
I propose our policy should be: if an aiida plugin wants to be present on the AiiDA lab, it must not present any version conflicts with the existing software stack.
I will create a branch with a basic Pipfile and, for the moment, exclude any plugins that present dependency conflicts.

I started working on this in the pipenv branch. Here I'm using pipenv simply to generate a complete requirements.txt from the Pipfile (instructions added to README).
It turns out that, miraculously, all dependency conflicts can be resolved (e.g. pymatgen automatically gets resolved to 2018.12.12).
There is one issue with aiida-fleur that I opened already more than a month ago and that prevents aiida-fleur from being added.
Once this is fixed, aiida-fleur can be added back to the mix as well.

I think pipenv is a great tool. Thanks for looking into that.
Also, I think we should use it while testing aiida plugins. For example it would be nice to create an automated script that installs aiida with all the latest versions of plugins to check incompatibility.
Of course for the moment it is just a wish, nothing concrete. But I think the issue should be solved ASAP, otherwise some users simply won't be able to use aiida because of similar problems.

Jens just updated aiida-fleur - all packages are now available again (PR #8 updated & ready for review)

it would be nice to create an automated script that installs aiida with all the latest versions of plugins to check incompatibilities.

We should define what exactly we want to test here.
As you mention, with pip the result might depend on the order of installation.
We could start with a more basic check using pipenv and integrate it into the CI of the aiida plugin registry. I.e. for every new pull request. pipenv would try to concretize the dependencies for installing all plugins together (all that provide a pip package name).

the original issue seems resolved.
discussion about testing continues in https://github.com/aiidateam/aiida-registry/issues/67


Script failed to scan birthdays.

The issue is solved in https://github.com/zagushka/birthday-calendar-extractor/pull/94


[TACHYON-771] Standardize FileUtils functionality

https://tachyon.atlassian.net/browse/TACHYON-771
Through reviewing the codebase, it appears that 'path' appears more frequently than 'Files' as input parameters of 'FileUtils' 's util methods. Hence we will take the former for standardization.

+1 LGTM! Thanks for this patch --- actually I was about to create a JIRA exactly on this :)

Thanks for the PR! I just had a few minor comments.

@gpang  @apc999 Thanks for your review! I have fix them :)

LGTM

+1 LGTM


Conversation memory example - previous messages not remembered

System Info
LangChain version 0.0.330
Chroma version 0.4.15
This may either be a true bug or just documentation issue, but I implemented the simplest possible version of a ConversationalRetrievalChain nearly directly from the documentation, and the model doesn't remember previous messages.
from langchain.llms import OpenAI
from langchain.chains import ConversationalRetrievalChain
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.vectorstores import Chroma

embeddings = OpenAIEmbeddings()
vectorstore = Chroma(embedding_function=embeddings)

from langchain.memory import ConversationBufferMemory
memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)

qa = ConversationalRetrievalChain.from_llm(OpenAI(temperature=0,model_name="gpt-4-32k"), vectorstore.as_retriever(), memory=memory)

query = "My name's Bob. How are you?"
result = qa({"question": query})

print(result)

query = "What's my name?"
result = qa({"question": query})

print("NEW MESSAGE:",result)

The output shows that the model has no memory:
{'question': "My name's bob. How are you?", 'chat_history': [HumanMessage(content="My name's bob. How are you?", additional_kwargs={}, example=False), AIMessage(content="I'm doing well, thank you. How can I assist you today, Bob?", additional_kwargs={}, example=False)], 'answer': "I'm doing well, thank you. How can I assist you today, Bob?"}
NEW MESSAGE: {'question': "What's my name?", 'chat_history': [HumanMessage(content="My name's bob. How are you?", additional_kwargs={}, example=False), AIMessage(content="I'm doing well, thank you. How can I assist you today, Bob?", additional_kwargs={}, example=False), HumanMessage(content="What's my name?", additional_kwargs={}, example=False), AIMessage(content='The text does not provide the name of the person who is speaking.', additional_kwargs={}, example=False)], 'answer': 'The text does not provide the name of the person who is speaking.'}

Apologies if I missed something dumb but it seemed pretty cut and dry so felt like I at least had to post for posterity's sake.
Who can help?
No response
Information

[ ] The official example notebooks/scripts
[X] My own modified scripts

Related Components

[X] LLMs/Chat Models
[ ] Embedding Models
[ ] Prompts / Prompt Templates / Prompt Selectors
[ ] Output Parsers
[ ] Document Loaders
[X] Vector Stores / Retrievers
[X] Memory
[ ] Agents / Agent Executors
[ ] Tools / Toolkits
[X] Chains
[ ] Callbacks/Tracing
[ ] Async

Reproduction

run this code:

from langchain.llms import OpenAI
from langchain.chains import ConversationalRetrievalChain
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.vectorstores import Chroma

embeddings = OpenAIEmbeddings()
vectorstore = Chroma(embedding_function=embeddings)

from langchain.memory import ConversationBufferMemory
memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)

qa = ConversationalRetrievalChain.from_llm(OpenAI(temperature=0,model_name="gpt-4-32k"), vectorstore.as_retriever(), memory=memory)

query = "My name's Bob. How are you?"
result = qa({"question": query})

print(result)

query = "What's my name?"
result = qa({"question": query})

print("NEW MESSAGE:",result)

Expected behavior
I'd expect the model to remember "my name".

@dosu-bot Based on the docs, I shouldn't need to pass the conversation history in explicitly. See the below copy/paste of the docs; the first example implements memory without passing it in explicitly, and the second example implements it with it. Both should be possible.
Remembering chat history
The ConversationalRetrievalQA chain builds on RetrievalQAChain to provide a chat history component.
It first combines the chat history (either explicitly passed in or retrieved from the provided memory) and the question into a standalone question, then looks up relevant documents from the retriever, and finally passes those documents and the question to a question-answering chain to return a response.
To create one, you will need a retriever. In the below example, we will create one from a vector store, which can be created from embeddings.
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.vectorstores import Chroma
from langchain.text_splitter import CharacterTextSplitter
from langchain.llms import OpenAI
from langchain.chains import ConversationalRetrievalChain
Load in documents. You can replace this with a loader for whatever type of data you want
from langchain.document_loaders import TextLoader
loader = TextLoader("../../state_of_the_union.txt")
documents = loader.load()
If you had multiple loaders that you wanted to combine, you do something like:
loaders = [....]
docs = []
for loader in loaders:
docs.extend(loader.load())
We now split the documents, create embeddings for them, and put them in a vectorstore. This allows us to do semantic search over them.
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
documents = text_splitter.split_documents(documents)
embeddings = OpenAIEmbeddings()
vectorstore = Chroma.from_documents(documents, embeddings)
Using embedded DuckDB without persistence: data will be transient

We can now create a memory object, which is necessary to track the inputs/outputs and hold a conversation.
from langchain.memory import ConversationBufferMemory
memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
We now initialize the ConversationalRetrievalChain
qa = ConversationalRetrievalChain.from_llm(OpenAI(temperature=0), vectorstore.as_retriever(), memory=memory)
query = "What did the president say about Ketanji Brown Jackson"
result = qa({"question": query})
result["answer"]
" The president said that Ketanji Brown Jackson is one of the nation's top legal minds, a former top litigator in private practice, a former federal public defender, and from a family of public school educators and police officers. He also said that she is a consensus builder and has received a broad range of support from the Fraternal Order of Police to former judges appointed by Democrats and Republicans."

query = "Did he mention who she succeeded"
result = qa({"question": query})
result['answer']
' Ketanji Brown Jackson succeeded Justice Stephen Breyer on the United States Supreme Court.'

Pass in chat history
In the above example, we used a Memory object to track chat history. We can also just pass it in explicitly. In order to do this, we need to initialize a chain without any memory object.
qa = ConversationalRetrievalChain.from_llm(OpenAI(temperature=0), vectorstore.as_retriever())
Here's an example of asking a question with no chat history
chat_history = []
query = "What did the president say about Ketanji Brown Jackson"
result = qa({"question": query, "chat_history": chat_history})
result["answer"]
" The president said that Ketanji Brown Jackson is one of the nation's top legal minds, a former top litigator in private practice, a former federal public defender, and from a family of public school educators and police officers. He also said that she is a consensus builder and has received a broad range of support from the Fraternal Order of Police to former judges appointed by Democrats and Republicans."

Here's an example of asking a question with some chat history
chat_history = [(query, result["answer"])]
query = "Did he mention who she succeeded"
result = qa({"question": query, "chat_history": chat_history})
result['answer']
' Ketanji Brown Jackson succeeded Justice Stephen Breyer on the United States Supreme Court.'

memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True, output_key="answer")


Fix - Make only_cols optional in LiveMetric model

Fix - back to hourly date range if daily only has an incomplete day
Fixes #8816 and fixes #8822
MiqReport::Generator._generate_table() included only_cols to choose the columns to be part of the performance reports. In a recent commit, this parameter is optional in _generate_table(). LiveMetrics used that parameter to optimize the metrics to fetch from the provider.
I can read in the code of MiqReport::Generator that only_cols will be added in a next iteration, so I move only_cols as an optional in LiveMetrics too, if present it will fetch only cols defined, but if not, it will fetch all metrics defined in the resource_type.metrics_available.

@lucasponce how does this fix #8816?

@abonas wrong # . Fixed and sync-ed.

@lucasponce I still see #8816 in the description and the commit message, refreshed the page several times.

@abonas it should be shown now.
Thx for checking it.

@lucasponce I still see it here: https://github.com/ManageIQ/manageiq/pull/8860#issue-156016530
although in the commit msg itself it is ok now :)

@miq-bot assign @chessbyte

This is severely needed for LiveMetrics to work in master. I just checked it and it works for me.

@chessbyte @Fryguy ( @martinpovolny ) Can we please get a quick resolution on this one ? It's blocking some other PR and work but also adds additional rebase work.

@lucasponce I found one very minor thing, but you can change in a separate PR if you want.  So, merging.


release asset size error

I'm seeing an issue where vendir throws an error when checking the release asset file size: Checking asset 'file.txt' size: Expected file size to be 74, but was 9. I checked the api response for release assets, it shows the asset size is 74 bytes. When I manually download the file, it is 74 bytes. Any idea what would cause this?
Some details from the API response (some parts are omitted or renamed):
[
  {
    "name": "file.txt",
    "label": "",
    "content_type": "application/text",
    "state": "uploaded",
    "size": 74,
    "download_count": 5,
    "created_at": "2020-08-04T19:58:28Z",
    "updated_at": "2020-08-04T19:58:29Z",
    "browser_download_url": "https://github.com/org/repo/releases/download/v3/file.txt"
  }
]

hmm, interesting. here is the code: https://github.com/k14s/vendir/blob/7e9c900d438eac21867e24be007411e7ba1fc156/pkg/vendir/directory/github_release_sync.go#L74-L82
it downloads and then checks size. i wonder if there is some http error being returned because downloadFile isnt checking for 200 status. you might be hitting github rate limit error: https://github.com/k14s/vendir/blob/develop/docs/github-release.md#github-api-rate-limiting ?

I am using a personal access token since this repo is private, so I think it would be pretty unlikely that I hit a rate limit. I also haven't seen any issues at all when requesting the file directly via browser.

I added a conditional in there to throw an error if the response is non-200 and it looks like I'm getting a 404 for the asset download. Have you confirmed that this works for private repos? I wish I could share more info with you to help troubleshoot...

I used this handy script for sanity checking https://gist.github.com/metral/464b179b584ccc0887de580f97e56ae1

hmm, looks like github asset download url didnt work for private repos. switching to asset resource url + header does seem to work. fixed in https://github.com/k14s/vendir/commit/47d346d0536988ab569e7411203a4c97f7c71000. will cut release right after CI passes.

shipped in https://github.com/k14s/vendir/releases/tag/v0.9.0

Thanks so much for the quick fix! This is working for me now.


XChange 4.0.0 Wishlist

Check that no implementations are leaking exchange-specific Exceptions
Create builders for all generic DTOs
Figure out metadata and init() solution
Remove deprecated code
Look at TODOs

How about changing cancelOrder return type to void?

What's the timeframe for releasing 4.0.0? I'd like to contribute some things that I'd like to see improved, but need to set some time aside to do it.

I don't have a time frame in mind. Definitely not in the next month or two. Some time afterwards hopefully though.

make all exchange parameters configurable via exchangeSpecificParameters. It would be nice to be able to override the defaults for host, ssl uri, plain text uri, uri streaming. Also not sure if those names are as specific/descriptive as they could be. Perhaps we can have some default keys in the map which provide rest host, streaming hostname etc.

I think the main interfaces PollingTradeService and PollingMarketDataService are unnecessarily restricted to polling connectivity.
The PollingTradeService methods can actually easily be satisfied using websockets (or FIX) [apart from asynchronous return values], and frequently I would like to provide a MarketDataService and TradeService for a websockets based XChange.

Connectivity methods are becoming more varied between exchanges and sometimes it would be nice to implement an exchange using a combination of various methods, e.g. websocket for market data, execution through market data but poll open orders or similar.

Another one: I was also thinking about renaming the timestamp variable to serverTimestamp to make it more obvious. Also add a note about it in the README file.

@jheusser I'm not sure if I understand your issue with the polling interfaces. We can use exchange's request/response or publish/subscribe interfaces, each style has dedicated set of xchange interfaces - polling or streaming. Am I missing something? Are you talking about emulating one with another?

How about FIX API support for okcoin & huobi market & trades

Exchange simulator and or mocking to test offline

Generic instrument support. Currently things are assumed to be currency pairs. More derivatives and comming into the exchanges with additional params. Maybe we should have a generic instrument class that has a type of say currency,future,swap etc, and a given type has a defined set of fields,and each exchange can be passed the type of instrument.

Generic protocol support-current majority of exchanges are json based,some have fix. Over time I expect things like binary protocols to minimise the marshalling,such as blaze or fast over fix. May be we should have a standard connection interface and different connection implementations can be written as they come on line. For now we have fix and json.

@douggie , there is a request to an Exchange simulator which is under development, see #747

@timmolter about timestamp vs serverTimestamp: you want to break compatibility just to add some information. Why not just add or update javadocs?

@rafalkrupinski That's definitely a valid argument, and I see where you're coming from. With a major version change there will be some API breaking changes anyway. Variable names should be named as descriptively as possible.

Ad 4 Remove deprecated code
what is it?
PollingTradeService.getTradeHistory(Object...) ?
BasePollingService.getExchangeSymbols() ?
Anything else?

@rafalkrupinski I don't understand what you're asking. Please clarify.

hitbtc streaming api

getTopAsks & xchange getTopBids

Is 4.0 intended to be the next release? Have there been enough features added to warrant a 3.2 release while the 4.0 features are sorted out?

I suggest a 3.x final release. Can we do this?
It's been a while since the last final release and I'd feel a bit better if I could use a fixed final version of the code when I need to use some of the features added in the last 8 months.

OK, I'll put some work into it thgis weekend. I might just release 4.0.0, as I think most of the features are implemented and if not hopefully I can do them quickly enough.

I agree with @jheusser, We need to probably re work the service interfaces so they are as generic as possible and independent of the underlying implementation, be it Poling, WebSocket or what ever my be available on some more advanced exchanges.  So for example in the Exchange interface instead of getPolingTradeService, we want to have something like getExchagneServiceInstance(ExchangeSpecifications)  in the beginning most exchanges would just be returning something that wraps and extends the PolingService implementations but in future when its supported you might get a websocket implementation back or what ever

@abelgo see also e.g. #1101 .  I spent some time planning precisely out how to generalize xchange so as to allow all exchanges to use the same interface and enumerate available functionality, flexible enough to allow adapters between polling and streaming interfaces allowing services to be used in either way.  I think I left this work at https://github.com/baffo32/XChange/tree/refactor .  I'm afraid I am not available to work on this further at this time, although I would love to finish it for pay.  Generalizing these things would allow very powerful bots to be written that would really help stabilize the bitcoin market, and the profit created from the activity to be spread much more widely.


Charging options

Adds charge options to turn on/off Off-Peak / Solar / Scheduled Charging.
Also adds a number entity for the minimum current for solar charging.
These seem to work ok with my setup. I could turn the charge modes off/on and change the minimum charge limit and that was reflected in the EO Smart Home App.
There is probably one caveat around having a time schedule defined for the things being turned on already via the app. Ideally I would have liked to have added entities to cover the start/stop times for the three different charge types. But I think it would be best to do this with a time entity and looking at the PR that added that, it looks like that may be coming later in 2023.6

Looking forward to the changes you mentioned. Note the tests failed in that version too. Probably some fragile dependency on the interface copied into the tests.

So I think the charge options dictionary should be updated by the response from the server, not our code, so we know that the value was validated and actioned by EO, not a hangover of making a request (which might have been rejected or something by the server.) Also the tests are failing, but I'm keen on merging this soon, sorry for pushing back on your contribution - I hope we can merge soon!

So I think the charge options dictionary should be updated by the response from the server, not our code, so we know that the value was validated and actioned by EO, not a hangover of making a request (which might have been rejected or something by the server.)

I think you are going to need to give me some code examples/snippets of what you want here as I don't understand what you are trying to say I'm afraid. I can then try them with my changes and see how I get on, but we do need to send the whole dictionary I think, as from my testing when I didn't things got disabled.

Also the tests are failing,

I don't believe this is down to my changes, or at least I can't see anything that would cause the issue - it seems like the issue raised here - https://github.com/MatthewFlamm/pytest-homeassistant-custom-component/issues/158 - which it looks like you commented on already

but I'm keen on merging this soon, sorry for pushing back on your contribution - I hope we can merge soon!

No worries :) I'm not going to be able to do more on this for a couple of weeks, but will pick it up when I'm back again

I'm going to close this. I think it needs further work and the time entities to work together so that they are all set and only pushed at once to the EO API, when another "write" switch is set. Unexpected things happen if the different modes are turned on without times being set, and the times seem to be unset when the modes are turned off. I don't have the time to work on this any more though


Remove the outdated yarn.lock file

The package-lock.json file is uptodate, so it looks like this package is intended to be worked on using npm rather than yarn.
WebStorm would use Yarn when a yarn.lock file is there, so removing it means WebStorm users would get messages about the right tool.

Thanks @stof.


Youtube tip button gets injected multiple times

Describe the bug

To Reproduce
Steps to reproduce the behavior:

Install superhero firefox extension
Go to youtube
Watch videos until you encounter this bug

Expected behavior
The Superhero tip button is displayed only once
Software:

OS: ArchLinux
Browser: Firefox 81.0.2
Superhero 5d91965 / v.0.3.3

Not reproducible on the current product branch, can be closed.


Undetected runtime error when a tuple containing an array is used inside a generic

TypeScript Version:  3.8.3, Nightly, and all other 3.x versions available in TypeScript playground

Search Terms:
generic tuple
tuple runtime error
generic runtime error
tuple subtype
Code
Apologies that this is long, I've spent an hour and a half trying to simplify this but the behavior changes if I don't use all three of (union types, generic tuples, arrays). For context, this is a simplified version of some code I wrote while writing a parser combinator library.
// Set up some types. The union type inside Parser seems to be necessary to reproduce the issue.
class ParseError { }
class ParseResult<T, U> {
  parsed: T;
  remnants: U;
  constructor(parsed: T, remnants: U) {
    this.parsed = parsed;
    this.remnants = remnants;
  }
}
type Parser<T, U> = (input: U) => ParseError | ParseResult<T, U>;

// This function is incorrect, but TS doesn't realize it.
function runParser<T>(
  parse: Parser<T, string>
): Parser<[T, Array<string>], Array<string>> {

  // Parse returns ParseError | ParseResult<T, string>
  // This nested function should return ParseError | ParseResult<[T, Array<string>], string]
  // Somehow the first one is being allowed in place of the second one
  return (arr: Array<string>) => {
    const found = arr[0];

    return parse(found);
  };
}

// Demonstrating the issue
const foo = runParser(x => new ParseResult(1, x));
const bar = foo(["x", "y"]);

if (bar instanceof ParseError) throw new Error();
const { parsed, remnants } = bar;

// This line will throw a runtime error; remnants is a string, not an array
console.log(remnants.map(x => x));

Expected behavior:
I believe that a type error should occur inside runParser. Specifically, a value of type ParseError | ParseResult<T, string> should not be allowed where a value of type ParseError | ParseResult<[T, Array<string>], string] is expected.
Actual behavior:
No type error occurs, a runtime error occurs instead.
Playground Link:
Playground Link
Related Issues:
I could not find any similar issues.

The problem here is that ParseError is empty, so your runParser function returns something that is structurally a valid ParseError (because anything is), then later TS believes that you don't have any structural-only-matching things when you check for instanceof ParseError. In general, making empty classes is a very bad idea and will lead to subtle issues like this; using a signalling primitive instead is much preferable.

I see. I'm coming from Flow and did not know that this empty class behavior is different. Thank you!


Header modifications not parsed

I am running into a strange problem that I can reproduce with the blinky example.
Header/include modifications are not taken in account in the next build.
if I only modify BlinkTask.h as such:
#ifndef BlinkTask_H
#define BlinkTask_H
sfsdfsdfsf
void BlinkTask(void);
#endif

This changes are not detected by ceedling and naturally does not recompile BlinkTask.c.
The only work around I found was to cleanup the build folder with rake clobber and then relaunch the building process.
This issue can be pretty annoying!
I am running Linux but I can also reproduce in a  Windows system.

In ceedling, the pre-processing stage is performed once.
I added support to make different compilation options for different test files.
It is already merged and you should see the expected behaviour.
For setting this kind of pre-processing tests do the following steps:
:defines:
  :commmon: &common_defines
      - DEFINE_A
      - DEFINE_B
  :test: &test_defines
      - *common_defines
      - TEST
    :test_preprocess:
      - *common_defines
      - TEST
    :test_<specific_test>:
      - *test_defines
      - BlinkTask_H

The defines on :common_defines: should be in all the defines, as the definition of the tests "inherit" the defines on group common_defines
For the specific test where we are going to have the common_defines, the test_defines and the BlinkTask_H file.
I hope this is useful for you.

I think it is somehow related to my issue #369.
@INTNEP2 Did you solve this problem? Can you check if fixes on my branch can help to solve your problem?

Did you enabled the enable the pre-processor on the project.yml?
:project:
  :use_test_preprocessor: TRUE

Setting use_deep_dependencies: TRUE solved the problem for me!


Taking screenshot fails if name of the test contains "/" character (using pytest-bdd)

Hello,
I'm using:
platform linux2 -- Python 2.7.6, pytest-2.9.2, py-1.4.31, pluggy-0.3.1
plugins: bdd-2.16.1, splinter-1.7.3

My .feature file contains:
Scenario Outline: Application login page renders with proper title
  Given I'm visiting Application site
  When I go to the <page> page
  Then The page title should contain <title>

  Examples:
  | page        | title |
  | home/login  | login |
  | a           | b     |

I'm creating test cases with pytest_bdd:
scenarios('../features')

When test fails, it fails to take a screenshot, because generated test name contains / character:
WSPL504 None Could not save screenshot: [Errno 2] No such file or directory: '/home/kliput/Application/selenium-experiments/python/scenarios.test_lol/test_application_login_page_renders_with_proper_title[home/login-login]-browser.html'

The workaround is to use other chars and replace them with / inside tests, but it will be nice to escape / when creating path for screenshot file :)

nice finding!

1.7.5 is out, please check

@bubenkoff It works - thank you! :)


Add hook to vscode_pytest to determine number xdist workers to use based on count of selected tests

fixes https://github.com/microsoft/vscode-python-debugger/issues/336

@DetachHead Thanks for the fix. It looks like this is causing test failures. Let me know if you are able to address these.

@karthiknadig would you be able to point me to some documentation for how to set up this project for local development? i tried using the devcontainer but i can't get docker to work on my PC unfortunately, so i wasn't able to debug the tests

Hi @DetachHead, here are the steps to getting started, these are how I set up my dev environment so hopefully that will work for you too! To debug those tests you should be able to use the testing panel to run / debug the tests, let me know if it isn't working or is confusing and I can provide some extra direction. Thanks!!

i got the tests passing, but i have no idea what's up with the formatter. i tried formatting it with ruff and it made a bunch of changes to code i didn't touch. (i also tried black because the wiki said so before i realized that the CI uses ruff, does that need to be updated to say ruff instead?)
ideally ruff should be a dev dependency of this project, and there would be committed vscode config to make it format on save to match what the CI would do.

@DetachHead sorry about that. i will fix the formatting. We have a debt item to update both linting and formatting to ruff with config added to repo. We are mid transition.

so i just realized that this will crash if the user runs pytest with -p no:xdist. as far as i know there doesn't seem to be a good way to conditionally define this hook. i raised an issue for it here: https://github.com/pytest-dev/pytest-xdist/issues/1102
any ideas on how to work around this? if not, i'm happy to close this PR and re-open it once that issue is resolved.

nevermind, i think i got it! will push a fix soon

nvm, i got it working


bump kerlescan version to pick up fix for empty tag values

Codecov Report

:exclamation: No coverage uploaded for pull request base (stable@fc00ba3). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             stable     #105   +/-   ##
=========================================
  Coverage          ?   71.07%
=========================================
  Files             ?       13
  Lines             ?      408
  Branches          ?        0
=========================================
  Hits              ?      290
  Misses            ?      118
  Partials          ?        0

Continue to review full report at Codecov.

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


Contxtful RTD Provider - Updated Documentation

🏷 Type of documentation

[ x ] new feature
[ x ] new examples

📋 Checklist

[ x ] Related pull requests in prebid.js or server are linked

Contxtful Provider Related PR

was in 8.51


Add Canonical as member

Description of change
Add Canonical as an Enterprise member.
Samir gave sign-off approval of logo usage and link.
Checklist

[x] npm test passes
[x] documentation is changed or added (if applicable)
[x] permission has been obtained to add new logo (if applicable)
[x] contribution guidelines followed here

Looks great, if we can locate an SVG version then let’s swap it out at some point but glad to see the logo on the website!


Update plan-deployment.md

Changed the wording in the configuration section to make it less ambiguous

@KimForss
Can you review the proposed changes?
Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

#sign-off


Transform

Can you add support to modify what data get's put into Elasticsearch, like in  Elasticquent.

I'm not sure I understand. Can you elaborate?

Currently in your package, when you put the data into Elasticsearch you call $this->toArray(), i was wondering if you could add an overwritable function that gets the function, so i can change what array gets stored.
Elasticquent has it:
https://github.com/adamfairholm/Elasticquent/#document-data

Just push a commit. Give it a try and let me know.

I'll let you know

Yes this works exactly as wanted, thanks!

Yes, this works exactly as expected. Thank you :+1:


Upgrade to OMNeT++6

OMNeT++6 released https://omnetpp.org/software/2022/04/13/omnet-6-released.html
So this PR fixes QuISP to be adapted to OMNeT++6.
main changes

change .ned notation

specify parent
declare @mutable if the parameter is changed during simulation

call registerComponent before callInitialize

This change is

@Chibikuri could you check the PR on OMNeT++6?


can't process code block surrounded with ```

can't process code block surrounded with ```
such as
code

Did you enable the fenced codeblock extension?
misaka.html(text, extensions=('fenced-code',))

Or:
misaka.Markdown(renderer, extensions=('fenced-code',))

@FSX Can I set the default extensions value of this method to 'fenced-code'?
Because I want to use:
md = misaka.html
md(text)

But don't want to change the md(text) part.

You mean this?
renderer = misaka.HtmlRenderer()
md = misaka.Markdown(renderer, extensions=('fenced-code',))

md(text)

Please read the documentation: http://misaka.61924.nl/

@FSX I think yes.Thanks very much for your reply. I will try it later.
The documentation is not accessed easily in China for the net reason, and the domain is so strange.

I see, you can also build the documentation yourself.
Go into the docs folder and run make html. A _build folder is created containing the HTML files.

@FSX  It occured a EROOR:
 File "/data1/www/htdocs/462/codelog/1/handlers/content_handler.py", line 5, in <module>
    md = misaka.Markdown(renderer, extensions=('fenced-code',))
  File "misaka.pyx", line 194, in misaka.Markdown.__cinit__ (src/misaka.c:1481)
TypeError: an integer is required

I'm using misaka 1.0.2

I had fix this using the misaka.EXT_FENCED_CODE.
But another problem appeared...
In version 1.0.2, must use render() function. ^_^
from misaka import Markdown, HtmlRenderer

rndr = HtmlRenderer()
md = Markdown(rndr)

print md.render('some text')

Yes, I've changed it in version 2.

@FSX You can visit my demo blog site http://codelog.sinaapp.com/


Icon for Azure Bot is using the wrong blue

Background of Azure bot Icon is wrong blue
Please fix to be the following Azure blue :  HEX 0078D4

(Already filed months ago in ADO but not yet fixed)

HI @mareekuh. Again, this is not the right place for this bug.  Please follow up with the ADO issue and chase that issue. You should be able to follow up with one of the service PMs to get a status and push this along - I am happy to help if you get no joy there. However, raising this issue here just means it will likely get lost and doesn't get the attention of the right folks so I am closing it here as it is not Composer related.

https://fuselabs.visualstudio.com/BotFramework/_search?text=icon mariekei&type=workitem&lp=workitems-Project&filters=Projects{BotFramework}&pageSize=25
Please leave open until the above in ADO is resolved.


Exact error messages when lab deployment fails

When a lab deployment fails due to some step(s) mentioned in the scripts provided by the lab developer, ADS does not give the exact error messages output by those steps.
ADS just says, lab script execution step returned non-zero exit status. This error message is not really helpful for the lab developer/integrator to debug their scripts.
Fix ADS to capture the output/exact error messages from those steps/scripts, so that it can be helpful for lab developers/integrators.

execute_commad executes the command and logs the error. Apparently the error i sproperly displayed.
Also, ose error not defined in LabActionScript.

I tested  with the sample python code and also integrated the same code in =execute_commands.py= file in ADS.
I noticed that =subprocess.check_output()= function is not returning any specific error message, but it simply returns the exit status code either "0" (if it is sucess) or "non-zero" value (if it fails).
when I ran the sample python code by passing wrong command i.e instead of =ssh @<IP_ADDRESS>=
I have given =sssh @<IP_ADDRESS>= then it has return non-exit status 127 which is command not found but it does not show this message as =sssh= command not found. It was simply displaying "executing sssh command failed returned non-exit status 127'.
I thought I can modify this message by reading the status code and displaying the proper messages for each error code and catch all the exceptions because there were only 8 possible error codes are available for shell commands or otherwise I can change the command itself instead of =subprocess.check_output()= I can use   pipes or call functions also to capture the error messages. The same thing I discussed with anon and thirumal, about the two possible solutions I have, anon said that if I read the error code, I need to do universally for all the commands.
Then thirmal suggested me to implement this functionality with =python fabric=.
Now, I am exploring =python fabric=. It may take two days.

This issue is resolved and code was checked into =fix-error-msg= branch of ovpl

Thanks. Once tested, we will close this issue.
On Thu, May 28, 2015 at 2:40 PM, madhavipuliraju<EMAIL_ADDRESS>wrote:

This issue is resolved and code was checked into =fix-error-msg= branch of
ovpl
—
Reply to this email directly or view it on GitHub
https://github.com/vlead/ovpl/issues/49#issuecomment-106242889.


But this code,don't work,I got a trophy,but hook don't work.
Can you help me,debug this code.
Thank you.

Ask #vitasdk on freenode irc for help. This is not the right place.


[BUG] Weird Ubuntu logo

The Ubuntu logo looks rly weird, the neofetch one is way better.

idk if it's that the neofetch one is not updated, but the fastfetch one still seems weird...

It's current design of Ubuntu logo (the white parts)

but the fastfetch one still seems weird

That's because you are familiar with neofetch. If you prefer the old one, you can use fastfetch -l ubuntu_old

I also prefer the "old" one (and honestly feel that should be the default). I came here thinking something was broken as well, just like @tiagorangel2011 did.


app.css/app.js Failed to load resource: the server responded with a status of 404 ()

Package
filament/filament
Package Version
v2.16.57
Laravel Version
v9.4.0
Livewire Version
v2.10.7
PHP Version
PHP 8.1
Problem description
Hello everyone!
I worked already with filament and never faced a similar issue like this. I often worked on a shared hosting and everything worked perfectly. Now I set up a VPS and installed CloudPanel (https://www.cloudpanel.io/). In cloud panel I can define if it is a PHP-application (with laravel) - and I guess, this has an impact on the nginx settings at the end.
After I set up my laravel application, installed livewire and filament, I navigate to /admin. The page shows up and I can login. But the page looks bad (how a page looks when a CSS-file cannot be found) and the console tells me, that the resource files cannot be found:
app.css - Failed to load resource: the server responded with a status of 404 ()
app.js - Failed to load resource: the server responded with a status of 404 ()
As I've seen, I am not the first person with that error (However, according to the number of results on google - it is nothing that happens quite often I think :) ) - so I tried these solutions:
Adapting the nginx config file:
Explained here: https://kodekativ.co/s/nginx-configuration-for-laravel-filament-5fBR
This changes the error 404 in the console to "Refused to execute script because strict MIME type..." - which I guess occurs because of the sames problem...
A similar explanation I found, didn't work either: https://stackoverflow.com/questions/74196740/digital-ocean-app-platform-laravel-filament
Checking if accessible over http (insted https):
I removed the 301 redirect and tried to access via http - same problem.
Extending AppProvider:
I also added the following in the "boot()":
if (app()->isProduction()) {       \URL::forceScheme('https');       \URL::forceRootUrl(config('app.url')); }
Doesn't help... I see the effect, when I disable the 301 redirect in nginx config. But it doesn't solve the problem.
Try another server:
I moved the project to another server (in this case with plesk installed) - everything works.
So, I guess the problem is in the nginx config. So, it is actually not a filament problem :) But maybe you can help me a lot, by quickly looking over my nginx config. The rest of the laravel application is working perfectly.
nginxconfig.txt
Thanks in advance!
Expected behavior
If I navigate to /admin, it should show a proper login page. As well as a proper dashboard when I log in.
Steps to reproduce
As it worked when I moved the project to another server, the only way (that I see) to reproduce it, is to use my attached nginx configuration.
Reproduction repository
https://github.com/adrianschenker/ngfm12341234/
Relevant log output
No response

I fixed it by copying from the vendor folder. I will close the issue - thanks!

I would advise against copying because the assets will become out of date. Check https://github.com/livewire/livewire/issues/242#issuecomment-948054946

Thanks for your reply @danharrin !
Meanwhile I went through the books about nginx settings again. I managed to make it work like it should :)
Really awesome solution!! Thanks a lot for your great work!

Can someone please tell me what the fix is here? I just installed Filament and the app.css and app.js resources are both throwing 404s. The article linked at by @danharrin refers to a Livewire resource load issue ... so what should I do to get Filament working?
NB: I tried the nginx directive change suggested in that article but that didn't work.
Basically these links are 404'ing and thus Filament is unusable:-
<domain>/filament/assets/app.css
<domain>/filament/assets/app.js

Thanks!

There isnt a solution I can write up that fits everyone, because everyone has their own unique server configurations. It's always people who are not following the Laravel recommended Nginx configuration or not using Forge/Vapor who have issues. I really dont know how to help with that, nor do I have time to be honest.

I'd like to add - I've never heard of anyone who has flat out been unable to get Filament working in the end. They always work it out. It takes some debugging and tweaking, and often checking against the Laravel recommended Nginx configuration, but it's definitely not impossible.

@danharrin - thanks for your response. I've fixed it by changing the nginx config as per the following tricks page:- https://filamentphp.com/tricks/fix-filament-assets-nginx
Sorry for the noise.

not working, instead, it is showing the main website of the index.php

@danharrin - thanks for your response. I've fixed it by changing the nginx config as per the following tricks page:- https://filamentphp.com/tricks/fix-filament-assets-nginx
Sorry for the noise.

not working, instead, it is showing the main website of the index.php


Swiper rendering last item fisrt

OS : Android and iOS
Version
Which versions are you using:

react-native-swiper v : 1.5.14
react-native v : 0.57.5

Expected behaviour
Swiper should show first item from the array
Actual behaviour
The active dot is at the first position but the image shown is from the last item of the array. On next swipe the first image gets rendered and active dot remains at the first position. On further swiping it works correct
Steps to reproduce: Set the height of the Swiper container,  when height is not given in style, it works correct but takes a random height

Hello, can you solve it?

same issue .

same here, when the loop={true}

same issue in Android

I guess it show because of  that ViewPagerAndroid setPage is asynchronous

I solved the issue isolating the Swiper in a class component and sending children via props and used a shouldComponentUpdate with this condition:
shouldComponentUpdate = nextProps => {
    if (btoa(nextProps) !== btoa(this.props)) {
      return true
    } else {
      return false
    }
  }

ps.: If the props are too long it will always return true, so I converted it to base64 to compare the returned strings.

I find this repo https://github.com/f111fei/react-native-banner-carousel works which save my life


add 'punt' to triggers

Might need to punt on this PR, given what transpired at that meeting

Thanks for the PR @gmkohler!
Published as v1.5.3


Home page header image: Upon opening app for first time, the header image for home page doesn't load

Description of issue
The header image for the home page doesn't load the first time you open the app. You have to go to the Events page and refresh to get it to appear.
Expected behaviour
The home page header image loads immediately when the app is opened for the first time.
Steps to reproduce
I've had trouble reproducing this - it happened both times I installed the alpha for #271 on separate physical iPhones (6 & 7+), but not when installing the apps on BrowserStack devices.
Also when I uninstalled then re-installed the build it didn't happen again.
OS / Browser / Device model
iPhone 6
iPhone 7+

This also occurred when I updated the app through the Google Play store on Android and TestFlight on iOS

This happened to me the first time I used the TestFlight version. At the
time I thought it was caused by a bad connection.
On 14 May 2018 at 17:02, declanslevin<EMAIL_ADDRESS>wrote:

This also occurred when I updated the app through the Google Play store on
Android and TestFlight on iOS
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/redbadger/pride-london-app/issues/281#issuecomment-388870823,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABrreR36KW6kHzLbhC5CI0BrT7Q6irFYks5tyaqygaJpZM4T7rjZ
.

--
Mark Holland
Software Engineer
+44 (0)7835 360 402
red-badger.com
@redbadgerteam https://twitter.com/redbadgerteam
Registered in England No. 7242017
Registered Office: 4th Floor, 2 Old Street Yard, London EC1Y 8AF UK

It also happened to me after updating the iOS app on Testflight


Bug in generated SQL when attribute name is same that a SQL keyword

When a specify an entity like:

User

UID : String
Name : String

Generated Oracle SQL:
CREATE TABLE TMP_DB.USER(
    UID VARCHAR2(36) NULL,
    NAME VARCHAR2(255) NULL
)

It must be:
CREATE TABLE TMP_DB.USER(
    "UID" VARCHAR2(36) NULL,
    NAME VARCHAR2(255) NULL
)

I don't think it's a bug. After all, it's how oracle works.


How to Prevent Screen Recording and Screen shoot?

How to Prevent Screen Recording and Screen shoot?
"I using this https://developer.android.com/reference/android/view/Display.html#FLAG_SECURE
But it worked some latest mobile only.
Not worked Chinese mobile like Xiaomi y1 lite, Redmi note 4, Cool Pad etc screen recording inbuilt functionality.
I developed Educational Video courses App.
So I want someone not copy my video.
I want prevent screen recording in all mobile device.
It’s possible on Android. But I developed in Flutter. Please help."
My Code :
package www.example.com;

import android.os.Bundle;
import io.flutter.app.FlutterActivity;
import io.flutter.plugin.common.StringCodec;
import io.flutter.plugins.GeneratedPluginRegistrant;

import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
import io.flutter.plugin.common.MethodChannel.Result;

import android.content.Context;
import android.app.KeyguardManager;
import android.view.WindowManager.LayoutParams;

public class MainActivity extends FlutterActivity {
  private static final String CHANNEL = "www.example.com/info";

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    GeneratedPluginRegistrant.registerWith(this);
    getWindow().addFlags(LayoutParams.FLAG_SECURE);

    new MethodChannel(getFlutterView(), CHANNEL).setMethodCallHandler(new MethodCallHandler() {
      @Override
      public void onMethodCall(MethodCall call, MethodChannel.Result result) {
        if (call.method.equals("getDeviceStatus")) {
          KeyguardManager keyGuardManager = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE);
          result.success(keyGuardManager.inKeyguardRestrictedInputMode());
        }
      }
    });
  }
}

@Alpesh-web if you don't mind, I would close the issue as mentioned it in a more recent similar one.

i face same issue .can anyone help me regarding this problem?

@mohit-natu , @skaran921 I think since we can prevent screen recording in android and IOS so, you can use MethodChannel in Flutter to call the native code the help to prevent screen recording.

thanks for your reply.
On Sat, 22 Feb 2020 at 19:43, cheikh sadbouh<EMAIL_ADDRESS>wrote:

@mohit-natu https://github.com/mohit-natu , @skaran921
https://github.com/skaran921 I think since we can prevent screen
recording in android and IOS so, you can use MethodChannel in Flutter to
call the native code the help to prevent screen recording.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/flutter/flutter/issues/36626?email_source=notifications&email_token=AIGRR2LSW743OZSDVMXDJVDREEXHPA5CNFSM4IFQYVG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMVBGPI#issuecomment-589959997,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIGRR2OMGZJTHN2AR6P4LR3REEXHPANCNFSM4IFQYVGQ
.

i am facing same issue,
flag secure prevent screenshot capture but not work for video capture

I found a solution for this,
add these lines into your MainActivity.kt or java
`import android.os.Bundle
import android.util.Log
import android.view.SurfaceView
import android.view.View
import android.view.ViewGroup
import android.view.WindowManager
import androidx.annotation.NonNull
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant
class MainActivity: FlutterActivity() {
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
    GeneratedPluginRegistrant.registerWith(flutterEngine);
}

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    if (!setSecureSurfaceView()) {
        Log.e("MainActivity", "Could not secure the MainActivity!")
        // React as appropriate.
    }
}

private fun setSecureSurfaceView(): Boolean {
    val content = findViewById<ViewGroup>(android.R.id.content)
    if (!isNonEmptyContainer(content)) {
        return false
    }
    val splashView = content.getChildAt(0)
    if (!isNonEmptyContainer(splashView)) {
        return false
    }
    val flutterView = (splashView as ViewGroup).getChildAt(0)
    if (!isNonEmptyContainer(flutterView)) {
        return false
    }
    val surfaceView = (flutterView as ViewGroup).getChildAt(0)
    if (surfaceView !is SurfaceView) {
        return false
    }
    surfaceView.setSecure(true)
    this.window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
    return true
}

private fun isNonEmptyContainer(view: View): Boolean {
    if (view !is ViewGroup) {
        return false
    }
    if (view.childCount < 1) {
        return false
    }
    return true
}

}
Do not forget to flutter clean and clean install.`

I found a solution to prevent video recording.
Add the below code into your MainActivity.kt or hava file
`import android.os.Bundle
import android.util.Log
import android.view.SurfaceView
import android.view.View
import android.view.ViewGroup
import android.view.WindowManager
import androidx.annotation.NonNull
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant
class MainActivity: FlutterActivity() {
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
    GeneratedPluginRegistrant.registerWith(flutterEngine);
}

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    if (!setSecureSurfaceView()) {
        Log.e("MainActivity", "Could not secure the MainActivity!")
        // React as appropriate.
    }
}

private fun setSecureSurfaceView(): Boolean {
    val content = findViewById<ViewGroup>(android.R.id.content)
    if (!isNonEmptyContainer(content)) {
        return false
    }
    val splashView = content.getChildAt(0)
    if (!isNonEmptyContainer(splashView)) {
        return false
    }
    val flutterView = (splashView as ViewGroup).getChildAt(0)
    if (!isNonEmptyContainer(flutterView)) {
        return false
    }
    val surfaceView = (flutterView as ViewGroup).getChildAt(0)
    if (surfaceView !is SurfaceView) {
        return false
    }
    surfaceView.setSecure(true)
    this.window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
    return true
}

private fun isNonEmptyContainer(view: View): Boolean {
    if (view !is ViewGroup) {
        return false
    }
    if (view.childCount < 1) {
        return false
    }
    return true
}

}
`
Do not forget to

Flutter clean

Fresh install

I found a solution to prevent video recording.
Add the below code into your MainActivity.kt or java file
import android.os.Bundle
import android.util.Log
import android.view.SurfaceView
import android.view.View
import android.view.ViewGroup
import android.view.WindowManager
import androidx.annotation.NonNull
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant

class MainActivity: FlutterActivity() {

    override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
        GeneratedPluginRegistrant.registerWith(flutterEngine);
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        if (!setSecureSurfaceView()) {
            Log.e("MainActivity", "Could not secure the MainActivity!")
            // React as appropriate.
        }
    }

    private fun setSecureSurfaceView(): Boolean {
        val content = findViewById<ViewGroup>(android.R.id.content)
        if (!isNonEmptyContainer(content)) {
            return false
        }
        val splashView = content.getChildAt(0)
        if (!isNonEmptyContainer(splashView)) {
            return false
        }
        val flutterView = (splashView as ViewGroup).getChildAt(0)
        if (!isNonEmptyContainer(flutterView)) {
            return false
        }
        val surfaceView = (flutterView as ViewGroup).getChildAt(0)
        if (surfaceView !is SurfaceView) {
            return false
        }
        surfaceView.setSecure(true)
        this.window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
        return true
    }

    private fun isNonEmptyContainer(view: View): Boolean {
        if (view !is ViewGroup) {
            return false
        }
        if (view.childCount < 1) {
            return false
        }
        return true
    }
}

Do not forget to

Flutter clean

Fresh install

Thanks to @atishpaul
I just converted to Kotlin code to java just below and it work for me
`import android.os.Bundle;
import android.util.Log;
import android.view.SurfaceView;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import androidx.annotation.Nullable;
import io.flutter.embedding.android.FlutterActivity;
public class MainActivity extends FlutterActivity {
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (!this.setSecureSurfaceView()) {
Log.e("MainActivity", "Could not secure the MainActivity!");
}
}

private boolean setSecureSurfaceView() {
    ViewGroup content = (ViewGroup)this.findViewById(android.R.id.content);
    if (!this.isNonEmptyContainer((View)content)) {
        return false;
    } else {
        View splashView = content.getChildAt(0);
        if (!this.isNonEmptyContainer(splashView)) {
            return false;
        } else {
            View flutterView = ((ViewGroup)splashView).getChildAt(0);
            if (!this.isNonEmptyContainer(flutterView)) {
                return false;
            } else {
                View surfaceView = ((ViewGroup)flutterView).getChildAt(0);
                if (!(surfaceView instanceof SurfaceView)) {
                    return false;
                } else {
                    ((SurfaceView)surfaceView).setSecure(true);
                    this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
                    return true;
                }
            }
        }
    }
}

private boolean isNonEmptyContainer(View view) {
    if (!(view instanceof ViewGroup)) {
        return false;
    } else {
        return ((ViewGroup)view).getChildCount() >= 1;
    }
}

}
`

Thanks to @atishpaul
I just converted to Kotlin code to java just below and it work for me
`import android.os.Bundle;
import android.util.Log;
import android.view.SurfaceView;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import androidx.annotation.Nullable;
import io.flutter.embedding.android.FlutterActivity;
public class MainActivity extends FlutterActivity {
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (!this.setSecureSurfaceView()) {
Log.e("MainActivity", "Could not secure the MainActivity!");
}
}

private boolean setSecureSurfaceView() {
    ViewGroup content = (ViewGroup)this.findViewById(android.R.id.content);
    if (!this.isNonEmptyContainer((View)content)) {
        return false;
    } else {
        View splashView = content.getChildAt(0);
        if (!this.isNonEmptyContainer(splashView)) {
            return false;
        } else {
            View flutterView = ((ViewGroup)splashView).getChildAt(0);
            if (!this.isNonEmptyContainer(flutterView)) {
                return false;
            } else {
                View surfaceView = ((ViewGroup)flutterView).getChildAt(0);
                if (!(surfaceView instanceof SurfaceView)) {
                    return false;
                } else {
                    ((SurfaceView)surfaceView).setSecure(true);
                    this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
                    return true;
                }
            }
        }
    }
}

private boolean isNonEmptyContainer(View view) {
    if (!(view instanceof ViewGroup)) {
        return false;
    } else {
        return ((ViewGroup)view).getChildCount() >= 1;
    }
}

}
`

Thanks to @atishpaul
I just converted to Kotlin code to java just below and it work for me
import android.os.Bundle;
import android.util.Log;
import android.view.SurfaceView;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;

import androidx.annotation.Nullable;

import io.flutter.embedding.android.FlutterActivity;

public class MainActivity extends FlutterActivity {
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (!this.setSecureSurfaceView()) {
            Log.e("MainActivity", "Could not secure the MainActivity!");
        }

    }

    private boolean setSecureSurfaceView() {
        ViewGroup content = (ViewGroup)this.findViewById(android.R.id.content);
        if (!this.isNonEmptyContainer((View)content)) {
            return false;
        } else {
            View splashView = content.getChildAt(0);
            if (!this.isNonEmptyContainer(splashView)) {
                return false;
            } else {
                View flutterView = ((ViewGroup)splashView).getChildAt(0);
                if (!this.isNonEmptyContainer(flutterView)) {
                    return false;
                } else {
                    View surfaceView = ((ViewGroup)flutterView).getChildAt(0);
                    if (!(surfaceView instanceof SurfaceView)) {
                        return false;
                    } else {
                        ((SurfaceView)surfaceView).setSecure(true);
                        this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
                        return true;
                    }
                }
            }
        }
    }

    private boolean isNonEmptyContainer(View view) {
        if (!(view instanceof ViewGroup)) {
            return false;
        } else {
            return ((ViewGroup)view).getChildCount() >= 1;
        }
    }
}

Thanks to @atishpaul
I just converted to Kotlin code to java just below and it work for me
import android.os.Bundle;
import android.util.Log;
import android.view.SurfaceView;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;

import androidx.annotation.Nullable;

import io.flutter.embedding.android.FlutterActivity;

public class MainActivity extends FlutterActivity {
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (!this.setSecureSurfaceView()) {
            Log.e("MainActivity", "Could not secure the MainActivity!");
        }

    }

    private boolean setSecureSurfaceView() {
        ViewGroup content = (ViewGroup)this.findViewById(android.R.id.content);
        if (!this.isNonEmptyContainer((View)content)) {
            return false;
        } else {
            View splashView = content.getChildAt(0);
            if (!this.isNonEmptyContainer(splashView)) {
                return false;
            } else {
                View flutterView = ((ViewGroup)splashView).getChildAt(0);
                if (!this.isNonEmptyContainer(flutterView)) {
                    return false;
                } else {
                    View surfaceView = ((ViewGroup)flutterView).getChildAt(0);
                    if (!(surfaceView instanceof SurfaceView)) {
                        return false;
                    } else {
                        ((SurfaceView)surfaceView).setSecure(true);
                        this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
                        return true;
                    }
                }
            }
        }
    }

    private boolean isNonEmptyContainer(View view) {
        if (!(view instanceof ViewGroup)) {
            return false;
        } else {
            return ((ViewGroup)view).getChildCount() >= 1;
        }
    }
}

Thanks alot @atishpaul, but I have tried(copy and paste)

your code a thousand times and its not still working; I can't screenshot but can screen record.
I'm testing in a Infinix Hot 5 by the way. Probably there is something I'm missing

Thanks alot @atishpaul, but I have tried(copy and paste) your code a thousand times and its not still working; I can't screenshot though but I can still screen record, meaning that only the screenshot functionality was disabled, the screen recording functionality wasn't.
I'm testing in a Infinix Hot 5 by the way. Probably there is something I'm missing

Hi @Princewil ,
As you said Screenshot blocking is working for you,that means you have implemented successfully. I have again copied my own code from above and tried in my current project,and it is working fine. Both,Screenshot and video recording blocked. (Video will be recorded,but it will be completely blacked out,like in the screenshots.
Maybe it is device to device problem.But
Alternatively You can try this package. https://pub.dev/packages/flutter_windowmanager
Have not tested personally.
Import this in your landing page of your app.
import 'package:flutter_windowmanager/flutter_windowmanager.dart';
add below code inside of your StatefulWidget.
Future<void> secureScreen() async {     await FlutterWindowManager.addFlags(FlutterWindowManager.FLAG_SECURE);   }
call secureScreen() function in initState() . Thats it! uninstall your app,flutter clean.reinstall and check.
If it works then great! but if it is not,then read below.
Could you please show me your path where you have pasted ?
If your project has kotlin support than go to,
app\src\main\kotlin\com.example.test_curves\MainActivity.kt
and if your project has java support than go to,
app\src\main\java  (Go inside and find MainActivity.java, After pasting of my code,you can see a suggestion from android studio,just press convert and it will convert all of my kotlin code into Java code.Or you can copy @Thuymm code. ).
Trust me,there is nothing much going on,You just have to paste it in MainActivity.kt or MainActivity.java.
Go to temporary folder (Go to start menu and type %temp% and SHIFT+DEL everything.) in windows os.
And make sure you have done flutter clean and it is necessary to uninstall your app from your device and then re-install it..
I have tested in four physical devices :

Redmi Note 7
Poco X3
K20 PRO
POCO M2 Pro
(Sadly all are  XIAOMI devices 😶).

My Current tested version of Flutter (Channel stable, 1.22.5, on Microsoft Windows [Version 10.0.19041.746], locale en-IN).

Thanks a lot...I Really appreciate... I will give another trial
On Thu, 4 Feb 2021, 15:19 Atish Paul<EMAIL_ADDRESS>wrote:

Thanks alot @atishpaul https://github.com/atishpaul, but I have
tried(copy and paste) your code a thousand times and its not still working;
I can't screenshot though but I can still screen record, meaning that only
the screenshot functionality was disabled, the screen recording
functionality wasn't.
I'm testing in a Infinix Hot 5 by the way. Probably there is something I'm
missing
[image: prevent 1]
https://user-images.githubusercontent.com/40724883/106830152-c830df00-668d-11eb-9c13-6e86bd9e37d6.png
[image: prevent 3 real]
https://user-images.githubusercontent.com/40724883/106830186-daab1880-668d-11eb-8d64-20c9e7bf0ae8.png
Hi @Princewil https://github.com/Princewil ,
As you said Screenshot blocking is working for you,that means you have
implemented successfully. I have again copied my own code from above and
tried in my current project,and it is working fine. Both,Screenshot and
video recording blocked. (Video will be recorded,but it will be completely
blacked out,like in the screenshots.
Maybe it is device to device problem.But
Alternatively You can try this package.
https://pub.dev/packages/flutter_windowmanager http://url
Have not tested personally.
Import this in your landing page of your app.
import 'package:flutter_windowmanager/flutter_windowmanager.dart';
add below code inside of your StatefulWidget.
Future secureScreen() async { await
FlutterWindowManager.addFlags(FlutterWindowManager.FLAG_SECURE); }
call secureScreen() function in initState() . Thats it! uninstall your
app,flutter clean.reinstall and check.
If it works then great! but if it is not,then read below.
Could you please show me your path where you have pasted ?
If your project has kotlin support than go to,
app\src\main\kotlin\com.example.test_curves\MainActivity.kt
and if your project has java support than go to,
app\src\main\java (Go inside and find MainActivity.java, After pasting of
my code,you can see a suggestion from android studio,just press convert and
it will convert all of my kotlin code into Java code.Or you can copy
@Thuymm https://github.com/Thuymm code. ).
Trust me,there is nothing much going on,You just have to paste it in
MainActivity.kt or MainActivity.java.
Go to temporary folder (Go to start menu and type %temp% and SHIFT+DEL
everything.) in windows os.
And make sure you have done flutter clean and it is necessary to
uninstall your app from your device and then re-install it..
I have tested in four physical devices :

Redmi Note 7
Poco X3
K20 PRO
POCO M2 Pro
(Sadly all are XIAOMI devices 😶).

My Current tested version of Flutter (Channel stable, 1.22.5, on Microsoft
Windows [Version 10.0.19041.746], locale en-IN).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/flutter/flutter/issues/36626#issuecomment-773341029,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJWWTE7GD5TMXNUEGWOXNFLS5KUHTANCNFSM4IFQYVGQ
.

I found a solution to prevent video recording.
Add the below code into your MainActivity.kt or java file
import android.os.Bundle
import android.util.Log
import android.view.SurfaceView
import android.view.View
import android.view.ViewGroup
import android.view.WindowManager
import androidx.annotation.NonNull
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant

class MainActivity: FlutterActivity() {

    override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
        GeneratedPluginRegistrant.registerWith(flutterEngine);
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        if (!setSecureSurfaceView()) {
            Log.e("MainActivity", "Could not secure the MainActivity!")
            // React as appropriate.
        }
    }

    private fun setSecureSurfaceView(): Boolean {
        val content = findViewById<ViewGroup>(android.R.id.content)
        if (!isNonEmptyContainer(content)) {
            return false
        }
        val splashView = content.getChildAt(0)
        if (!isNonEmptyContainer(splashView)) {
            return false
        }
        val flutterView = (splashView as ViewGroup).getChildAt(0)
        if (!isNonEmptyContainer(flutterView)) {
            return false
        }
        val surfaceView = (flutterView as ViewGroup).getChildAt(0)
        if (surfaceView !is SurfaceView) {
            return false
        }
        surfaceView.setSecure(true)
        this.window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
        return true
    }

    private fun isNonEmptyContainer(view: View): Boolean {
        if (view !is ViewGroup) {
            return false
        }
        if (view.childCount < 1) {
            return false
        }
        return true
    }
}

Do not forget to

Flutter clean

Fresh install

Perfect..... Thanks


weights have wrong names

I was trying to load weights into the model without the head. Since layers mismatch, I had to use model.load_weights(filename, by_name=True, skip_mismatch=True).
This worked fine for the 's' version of the model, but for the 'm' model I noticed the loss was exploding during training. I then investigated and found that the weights are not loaded if the by_name option is used. I looked into the keys of the h5 files and found that names don't start like:
activation, activation_1, activation_2
but rather like:
activation_191, activation_192, activation_193
I guess during the conversion you first converted the 's' model, then loaded the 'm' model. During this the names probably just kept increasing.
My current workaround is to load the weights without using by_name, then saving them again, and then using them with by_name.
So I suggest that you replace the weights with fixed ones.

Yes, you are right! Just I have to create multi models during conversion. I have converted them all again through colab, and made sure all of their input layer are input_1.


Figure reference/label doesn't work when I label my figure methods

Something odd I ran into the other day was that if I label my figure with \label{methods}, the figure references fail to populate in the output. Switching to \label{methods1}, then the figure appears. Not sure if its a reserved word that gets parsed, but it was odd.
Concrete example:

Label figure as such:

![**\label{methods}Figure \ref{methods}. Overview of methods.](path/to/fig.pdf){fullwidth=t}

Observe output:

Switch to:

![**\label{methods1}Figure \ref{methods1}. Overview of methods.](path/to/fig.pdf){fullwidth=t}

Observe output:

I have run into this before, with another common word like 'method'. I don't have an explanation. It's got to be something clashing somewhere, either in pandoc or latex, with some reserved word.


How did I export the data to xls or csv

This Lib is very strong for Json data and Ajax,but i have a export requirement now,so how can i do with this lib?

I know this is a very late response, but this version of columns does NOT export the data. It may be possible to add an extension to do that. However, this version of the Columns is no longer maintained.


Spinners show up on all group tree items when expanding a single group

Can't find the PR, but pretty sure that this is fixed now.


More than one file was found with OS independent path 'META-INF/main.kotlin_module'

Hi, after upgrading to Kodein 5 I encounter
More than one file was found with OS independent path 'META-INF/main.kotlin_module'
error.
It seems that the file is both packages:

I can add it to ignore, but it also seems it propagates the error through my library to the end-developer app and that's not good.

so what the problem to exclude?
packagingOptions {
exclude 'META-INF/main.kotlin_module'
}

Looks like
packagingOptions {
exclude 'META-INF/main.kotlin_module'
}

is the right answer.
I'll add that to the documentation

@SalomonBrys I know this but I do not think this is a correct solution.
a) It's quite unnecessary fixing some packaging bug on consumer's (=developer's) end
b) It sadly propagates, so if my library uses internally Kodein, it propagates the error and also I have to document this "fix" for users of my library (an sdk).
Please, I think it is possible to fix it in Kodein directly.
I've read that this module should be named as the final artifact, e.g. group name and the artifact id.
Also, Kotlin's docs provides some info & guide: https://kotlinlang.org/docs/reference/using-gradle.html#module-names

I didn't know this option existed ^^.
This will be done in the next version of Kodein :)

@SalomonBrys Hi, would you mind take a look at PR? :)

@hrach I don't think it is needed.
When I clean and regenrate, those file do not exist.
I think they come from some test main function that I made, and that I forgot to clean.
I'll investigate more.

@SalomonBrys Thanks a lot :)

Kodein DI 5.3.0 has been released :)


Correction of implementing mistake concerning emission value #1759

Summary of the discussion
This PR fixes the implementing mistakes concerning emission value. #1759
Remove

emission value (there accidentally existed two of them)

Workflow checklist
Automation
Closes #1759
PR-Assignee

[ ] 🐙 Follow the Pull Request Workflow
[ ] 📝 Update the CHANGELOG.md
[ ] 📙 Add #'s to term tracker item

Reviewer

[ ] 🐙 Follow the Reviewer Guide
[ ] 🐙 Provided feedback and show sufficient appreciation for the work done

I noticed, that for some reason emission factor value (OEO:00340063) has a German instead of an English language tag:
rdfs:label "emission factor value"@de

Therefore not shown properly in Protégé:

You might fix that bug in this PR, too.


Update proxyv2 distroless image to reduce surface

This builds on static+libc rather than base which is bloated for our
use case
Tested in https://github.com/istio/istio/pull/35354
Please provide a description of this PR:

@howardjohn: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

integ-cni-k8s-tests_istio
afe409ce73c93a367030f5379c60295aea85d308
link
true
/test integ-cni-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest


Can I change default value of all the parameters?

I want to use same type of TapTargerView in my app. Currently if I don't set any optional parameter it is showing white TapTargetView. So how can I change default value of parameters?

All options you can specify are in the readme. For the target circle color, use targetCircleColor. If you want to use the same type, then create a function that applies the same options to a given TapTarget


Upgrade API I/O functions to consistently use s/size_t.

These functions were returning -1 on error, but in an unsigned type.
Internally, ints were being used inconsistently. This cleans it up.
Coverity 1390800
Coverity 1390807

This is technically an API change. I think you should probably send an email to the mailing list.
https://cwiki.apache.org/confluence/display/TS/API+Review+Process

cc @shinrich and @reveller because you guys approved the previous PR.

Agreed, an email to the mailing list is in order, and don't forget to update the "Upgrading to 8.0.0" wiki page.

This is ready to go I think, right?

Yes, this is good to go. There was no opposition on the list and this is an exceedingly straightforward change.


CSS styling

How do we want to write CSS?
Right now we only have a style tag in our index.html.
I would suggest for the time being to just use a styles.css file which is served by the back-end. I am fine with using something that enables nesting like less but shy at the extra complexity introduced by the needed transpiler.
@w0rm @stuartnelson3 What do you think?

@mxinden I think we should check https://github.com/rtfeldman/elm-css which is a type safe way to write css.

@w0rm Definitely something I want to look into. Both inline and generating css files could be applicable for us.
I am a little afraid of the dependency though. So I would prefer a Spike before fully integrating it into the project. Do you have experience with the library?

I haven't used this library before, but I have heard many good things about it!

I'm hoping that we can get 95% of our styling done wiht bootstrap, and then just a few simple things in a styles.css? I'm hoping we write a small enough amount of css that we don't need to consider less.

So far I would agree with @stuartnelson3 as it introduces the least amount of complexity. I would reconsider the choice if the amount of CSS we write gets out of hand.
So suggested next steps:
Move style tag to separate CSS file.

Closing here as we don't have any custom css right now (See comment). Feel free to reopen.


Re-implement divide

When a divide is used it creates a curly bracket under the cover. This is an issue because then the whole list becomes a single curly bracket element and is therefore entirely evaluated as a single element when inside a curly bracket.

To fix this change the :apply_divs method to account for when the list is already one level inside a curly bracket.