Spring boot - add autoconfiguration

Hi there,
I am trying to somehow replace the H2 with Mariadb4j for tests in spring boot apps, but i'm having problems with that.
The H2 db startsup very nice out of the box if only available on classpath. It would be a great boost for popularity of this project, if it was prepared for spring boot. A lot of people are complaining about H2 incompatibility.

Hello @tomaszglinski thanks for your interest in this project.
I believe what you are asking for is already possible:
Have you seen the note on the README re. the MariaDB4jSpringService, which you can very easily use in a Spring Boot application, as illustrated in the MariaDB4jApplication or the MariaDB4jSpringServiceTestSpringConfiguration?
If you need an even tighter automated integration with an autoconfiguration, then you're more than welcome to propose something via a pull request to this open source project ... ;-)
If there are replies, I'll close this issue in 1 month from today.

Hi, true, I didn't found the examples before. Unfortunately it is still not working. In debug mode I see that, propertyPlaceholderConfigurer method is called during Spring context startup, but the mariaDB4jSpringService method not. Test run ends with
Caused by: java.net.ConnectException: Connection refused: connect 	at java.net.DualStackPlainSocketImpl.connect0(Native Method) 	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) 	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) 	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) 	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) 	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) 	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) 	at java.net.Socket.connect(Socket.java:589) 	at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:211) 	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:300) 	... 77 common frames omitted 16:08:14.862 [main] WARN org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 0, SQLState: 08S01 16:08:14.862 [main] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - Communications link failure
I suppose there is wrong order of initialization, mariaDb4j should start before entity manager starts its initialization (including connection pool init).
Just to mention, my app uses also flyway for db schema initialization/update, that is done also just at the startup.
No idea now how to fix that, must think over the weekend....

@tomaszglinski You may be able to force the correct order of initialization by making whatever you have that requires MariaDB4j have an Inject / AutoWired dependency on a DB instance, and writing a Provider thus making it explicit that you require it and that it thus must be started before? Beyond that, I'm afraid I can't offer you any further support with integration of MariaDB4j into your app; I'm sure you understand. Best of luck!

@tomaszglinski to achieve the correct initialization order, use Spring's named beans and @DependsOn annotation. The DataSource initialization have to wait until MariaDB is ready to receive connections.  This gist shows a minimal example.
Although I did not checked if this exact code is running correctly, but it's stripped out from our "integration test suite" we use daily.

Tkanks a lot for gist, will check it on monday!
1 kwi 2017 20:02 "zaenk"<EMAIL_ADDRESS>napisał(a):

@tomaszglinski https://github.com/tomaszglinski to achieve the correct
initialization order, use Spring's named beans and @DependsOn annotation.
The DataSource initialization have to wait until MariaDB is ready to
receive connections. This gist shows a minimal example
https://gist.github.com/zaenk/71e2e1ee5340fa19a4fcd3b67b003a59.
Although I did not checked if this exact code is running correctly, but
it's stripped out from our "integration test suite" we use daily.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/vorburger/MariaDB4j/issues/64#issuecomment-290936765,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AISmDxEsQWedUpqDXY4riI5s9NlKFkUkks5rrpFOgaJpZM4MvpDf
.

@zaenk thank you for contributing this! FYI I've worked this into https://github.com/vorburger/MariaDB4j/commit/562b1a7c4d565551434903d10627fba67eb6ee2e so others can find your tip & gist more easily.. Do feel free to send Pull Requests to further clarify the README better, or even contribute a full running example!

@vorburger I also have this problem of the order of initialization, I fixed it by this code:
@Configuration
@Profile("test")
class TestDataSourceConfiguration {

    @Bean
    MariaDB4jSpringService mariaDB4jSpringService() {
        new MariaDB4jSpringService()
    }

    @Bean
    @DependsOn("mariaDB4jSpringService")
    DataSource dataSource(DataSourceProperties dataSourceProperties) {
        DataSourceBuilder.create()
                .username(dataSourceProperties.username)
                .password(dataSourceProperties.password)
                .url(dataSourceProperties.url)
                .driverClassName(dataSourceProperties.driverClassName)
                .build() as DataSource
    }
}

But I hold that it is not a good code, cause I don't want to overwrite the implement of the bean dataSource,  the only thing I wanna do is make sure dataSource will be initialized after the initialization of mariaDB4jSpringService finished.
I found that Spring can auto config H2, HSQL and Derby when add them into classpath. So I am thinking about is that possible to use MariaDB4j like these embedded databases? Or it's possible the   only thing I need to do is add mariaDB4jSpringService as a bean? Do you have any plan to implement one of them?

@kbyyd24 I don't have plans to implement this, but I welcome Pull Requests from you / anyone.

@vorburger I have tried to add the code in previous comment into the mariaDB4j-core module, and make this configuration to auto-configure when spring boot is in classpath.
But it broken the module mariaDB4j-app cause there is already a bean of MariaDB4jSpringSerivce.  Then I commented the code of the bean, but I got failed, the message is:
java.lang.IllegalStateException: Failed to load ApplicationContext

	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:125)
	at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:108)
	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)
	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)
	at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:246)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dataSource' defined in class path resource [ch/vorburger/mariadb4j/springframework/DataSourceAutoConfiguration.class]: Unsatisfied dependency expressed through method 'dataSource' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.boot.autoconfigure.jdbc.DataSourceProperties' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:732)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:474)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1247)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1096)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:535)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:398)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:330)
	at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:139)
	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99)
	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:117)
	... 24 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.boot.autoconfigure.jdbc.DataSourceProperties' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1506)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1101)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:818)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:724)
	... 42 more

You can see the commit in my fork of the repo.
I don't know how to fix the error, maybe I need another project to implement auto-configure mariaDB4j.

Actually, I am not really understand what is mariaDB4j-app doing. Could you explain some?

@kbyyd24 See the README, "Note the use of the special mariaDB4j-app*.jar for this use-case, its a fat/shaded/über-JAR, based on a Spring Boot launcher." - it's more of an example. Perhaps what you are trying to do here should not go into mariaDB4j-core but a new mariaDB4j-springboot - I'm not sure, try.
Unfortunately personally I cannot help you to debug your Spring Boot related problem - but I'm happy to code review any working PR. But any other MariaDB4j community users who have an interest in and want to jump on helping you with this are very vey welcome to comment here - that would be very cool.

"Perhaps what you are trying to do here should not go into mariaDB4j-core but a new mariaDB4j-springboot"
This is a good idea, and I implemented it in PR (https://github.com/vorburger/MariaDB4j/pull/153). By this way, I don't need to change module mariaDB4j-app.
Thanks for your help.

That's an old topic, but just asking as I wanted to use it... has anyone used it actually? Because it doesn't work...

@jordanms As in #153, you would need to open a new PR with suggested changes, or a new issue describing a problem, or suggesting an enhancement. Comments on a 4 year old closed issue are ignored.


Dependency without a license

Hi, I have noticed that one of your dependancies<EMAIL_ADDRESS>https://github.com/ElmerZhang/ezcrypto does not have a license attached to it.
I have created and issue on their repo asking to add a license file: https://github.com/ElmerZhang/ezcrypto/issues/4
Your code has an MIT license which is great, but unfortunately if you depend on code with no license it can not really be MIT code (say ezcrypto claims their code is GPLv3 tomorrow). That code is technically proprietary (by default). See: https://stackoverflow.com/questions/1190628/what-license-is-public-code-under-if-no-license-is-specified
Please help me in reaching out to ElmerZhang or consider picking a permissive licensed alternative.

@vogievetsky Vadim, Thank you for bringing this to my attention and opening an issue in ElmerZhang's repo. Just now, Elmer added a license to his repo and marked it as MIT licensed, so we're clear to continue using it as a dependency. Thanks for taking the action!

@markbao thank you for looking into this so quickly. Closing the issue.


Refactor into separate files, additional features, addition of missing typing

This PR, other that separating adafruit_httpserver into multiple files #8  adds following functionality:

Access to additional attributes of HTTPRequest:

http_version extracted from Start line, e.g. "HTTP/1.1"
query_params extracted from path, e.g. /path?foo=bar is parsed to {"foo": "bar"}
headers as a dict, e.g. {'User-Agent': '...', 'Host': 'esp32-s2-tft.local', 'Connection': 'close'}
body as bytes, so both text content and images can be processed #16

Added new parameter to HTTPResponse which allows to set it's headers #24

Other than that, this PR also includes:

Refactor or addition of "enums" like HTTPMethod and MIMEType
Removed blocking socket Implemented socket_timeout property, which fixes #21
Changed the way server receives data, which fixes #2
Smaller refactor here and there
More typing in functions/classes etc. #6

Despite major refactor, the usage of library stays nearly unchanged, so it won't be neccessary to rewrite existing projects from scratch, only minor changes might be required.
It surely is not perfect, but I belive it is a step in the right direction.
(Probably) Closes #2
Closes #6
Closes #8
Closes #16
Closes #17
Closes #21
Closes #24

Take a look at using pre-commit if you want to test the black and pylint errors locally: https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/check-your-code

I'm not able to get the examples/httpserver_simplepolling.py to work from a browser. I put some debug prints in and it looks like the socket is accepted, but the received_data is sometimes empty, but even when it looks complete the server just hangs and never returns the response. The desktop browser just keeps waiting, I think browsers tend to have infinite timeout. I'll keep at it.

After more testing, it seems to me that the most reliable way of solving the socket blocking problem is making it possible only to set it to positive number, no 0 and None, this way eliminates infinitely blocked socket and enables request exceeding 2880 bytes.
I know it is not perfect and has an impact on loading speed, but I don't see any other way around it. Even if library api enabled setting socket_timeout to 0 or None, then it would simple hang on forever on first request. Preventing that from happening I believe is more user friendly.
Maybe there is other solution that I am missing, I do not completely understand all the quirks of TCP sockets and blocking behaviour. But from testing this way seems most reasonable to me and the impact itself is not that noticeable.

What is different about the way HTTPServer is operating compared to, say, the simple CPython HTTP server, or Apache, nginx, etc. Do we need to fix something underlying?

As I mentioned above, I am not very familiar with TCP communication on low-level, but I found that a client should send a shutdown(SHUT_WR) to socket.recv() (which is not implemented yet in CircuitPython) to indicate the end of message [Detect client is done with sending (shutdown)].
Also when analysing CPython and going deeper in call stack i found similar condition. [CPython/Lib/socketserver.py:216]
Maybe that is the problem, but it is hard for me to say, as it is very low-level.

The issue with any timeout, aside from just the dead time, is that it can trip up async by extending the minimum overall async loop time.
Someone do please correct me if I'm wrong, but my understanding is that HTTP/1.1 adds some protocol assumptions over simple TCP: a request will either have a transfer-encoding (e.g., chunked) OR a content-lengthheader, or (to maintain compatibility with HTTP/1.0 clients) will handle if the client sends neither header but closes the socket - but that's strongly discouraged in HTTP/1.1. Does that not trigger aECONNRESET? If not we can still have a timeout applied on top of handling content-length, and return NotImplementedfor for now fortransfer-encoding`?

Finally I was able to get the expected result. As @anecdata suggested I used Content-Length to determine when there is no more data expected. Now timeout is not the only thing that can end the connection and it works with curl, browsers, adafruit_requests and other clients I tested, and is is fast, much faster than before.
I adjusted default socket_timeout and prevented from setting it to None or 0.
I also changed how HTTPRequest.headers are parsed, as they, unlike query params, are case-insensitive. I used the same approach as implemented in adafruit_wsgi/request.py:103, which means that the are all lower case.
Right now there is no support for Transfer-Encoding, but I believe it is better to make it a separate PR later.
To be honest I am quite happy with current state of this PR, and I don't really see much that can be changed now.

Thank you! 😊


Simple fix to support multi-monitor systems

Removed coordinate truncation for mouse move to support multi-monitor systems
Current truncation assumes maximum coordinates are x == y == 0, and relies on
size() to get maximum screen coordinates. Both assumptions are violated on
multi-screen systems. The simplest solution (implemented here) is just to drop
truncation. A more complete solution would require a better description of the
screen coordinate system (e.g. [left, top, width, height], or a screen limits
polygon).

Had the same issue under windows, Needs support for negative coords, the type of point need to change from ulong to long, as reported by windows natively. #240

This is super stale. Closing.


Fix setting temperature in Celsius on radiotherm CT50

Description:
There seem to be a bug in Radiotherm CT50 thermostat, when setting temperature that is not an integer or ending ".5", it does not do anything (and still return success). CT50 API always expects temperature in Fahrenheit. If home assistant is set to use metric units (and Celsius degrees), it converts temperature before sending to the thermostat. But resulting temperature in Fahrenheit might not be an integer or ending ".5". As a result, only certain Celsius temperatures can be set, such as 20C (=68F) or 25C (=77F), but not 22C (=71.6F) for example. The proposed fix rounds temperature to the nearest 0.5 before sending to CT50, so it works for any Celsius temperature.
Related issue (if applicable): fixes #
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for configuration.yaml (if applicable):

Checklist:
If user exposed functionality or configuration variables are added/changed:

[ ] Documentation added/updated in home-assistant.github.io

If the code communicates with devices, web services, or third-party tools:

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] New dependencies have been added to the REQUIREMENTS variable (example).
[ ] New dependencies are only imported inside functions that use them (example).
[ ] New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[ ] New files were added to .coveragerc.

If the code does not interact with devices:

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] Tests have been added to verify that the new code works.

Thanks! 🐬 🌮


api: Reduce allocations in get_user_list

This change cleans up some references vs. ownership usage to reduce the amount of unneeded allocation done in the query building.

N.B.: taking an impl IntoIterator<Item = &str> instead of Vec<String> for fields may be a better API surface for users who may not always have ownership and/or want to clone. Especially since we don't really need a String or the Vec itself

N.B.: taking an impl IntoIterator<Item = &str> instead of Vec<String> for fields may be a better API surface for users who may not always have ownership and/or want to clone. Especially since we don't really need a String or the Vec itself

I agree with this. Since everything in /models and /api  is generated from openapi spec, the code is pretty mediocre.


Adding tests for sparse exploit codegen

This PR adds some tests and makes some minor changes to the sparsity exploit lowering pass src/compiler/lowering/SparsityExploitationPass.cpp and is complementary to #919. For clarification, the currently fixed operations for the SparsityExploitationPass implement a cross-entropy computation of a sparse CSRMatrix and a DenseMatrix
Changes:

added script level and filecheck tests
replaced Operation * type with cast to specific Operation (auto op = parentOp.getDefiningOp<daphne::OpName>())

allows to make use of specific get functions for better readability (e.g. .getLhs(), .getTransa())

replaced notifyMatchFailure with ErrorHandler::compilerError

Complementing the original PR's description:
The lower-sparse-exploit pass is part of the mlir-codegen pipeline. It is a proof of concept with the aim to fuse operators that have a sparse operand that enables optimizations in the computation of its intermediates. For example, in an expression like sparse * (dense @ dense) the full dense result of the right matrix multiplication is not needed. It suffices to compute only the entries where the lhs sparse matrix is not zero. Using this information, a fused operator can avoid needless computations as well as materializing potentially very large dense intermediates.
Right now, the pass does this for a hard-coded pattern sum(CSRMat * ln(denseLhs @ t(denseRhs))) (transpose on both sides are optional), which could be generalized to something like IntersectOp(CSRMat, OuterBinary(DenseMat, DenseMat)). It runs a canonicalizer pass directly after lowering this pattern to avoid the lowering/execution of any redundant operations that are part of the pattern (see test/codegen/sparseExploit.mlir). These are handled in this separate pass as their results could still be relevant for other computations and are not generally trivially dead.
Here is an example script to test the pass (--explain mlir_codegen is optional):
// RUN: ./bin/daphne --select-matrix-repr --mlir-codegen --explain mlir_codegen ./sparseExploit.daphne

seed = 1;
sparsity = 0.05;
sparseRows = 10_000;
sparseCols = 1_000;
hiddenDim = 200;

startGeneratingMatrices = now();
sparseLhs = rand(sparseRows, sparseCols, 0.0, 1.0, sparsity, seed);

DenseU = rand(sparseRows, hiddenDim, 0.0, 1.0, 1.0, seed + 1); // sparsity: 1.0
DenseV = rand(sparseCols, hiddenDim, 0.0, 1.0, 1.0, seed + 2); // sparsity: 1.0
endGeneratingMatrices = now();

startCalc = now();
res = sum(sparseLhs * ln(DenseU @ t(DenseV)));
endCalc = now();

print(res);
print("sparse dim: " + sparseRows + "x" + sparseCols + " (sparsity: " + sparsity + "), dense dim: " + sparseRows + "x" + hiddenDim + "@" + hiddenDim + "x" + sparseCols + "->" + sparseRows + "x" + sparseCols);
print("time to generate matrices: " + as.f64(endGeneratingMatrices - startGeneratingMatrices) * 1e-9 + ", comp. time: " + as.f64(endCalc - startCalc) * 1e-9);

which shows a significant speedup on my machine from 0.17 seconds to 0.09 seconds to compute the result.
Currently, the pass lowers to an affine ParallelOp for the outer loop, but in theory all three loops can be parallelized. Note that this is not yet lowered to an actual multi-threaded implementation in MLIR (which requires additional lowering and linking of the respective libraries) and still runs single-threaded.

Looks good, thanks @AlexRTer !


Error C3646 when building Flutter app for Windows，D:\Windows Kits\10\Include\10.0.22621.0\um\shellapi.h(524,20): error C3646: “lpStartupInfo”: 未知重写说明符

Steps to reproduce
Run flutter create demo
Navigate to the project directory: cd demo
Attempt to build for Windows: flutter build windows
Expected results
run ok
Actual results
D:\Windows Kits\10\Include\10.0.22621.0\um\shellapi.h(524,20): error C3646: “lpStartupInfo”: 未知重写说明符 [D:\demo\flutter_demo\build\windows\flutter\flutter_wrapper_app.vcxproj]

Code sample
Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration
[Upload media here]

Logs
Logs
[Paste your logs here]

Flutter Doctor output
Doctor output
[Paste your output here]

Operating System: Windows 10
Flutter Version: 3.19.0
Steps to Reproduce

Could you provide the entire output of flutter run -v?  (Please provide the output log in text format instead of a screenshot for better readability and investigation, see avoid posting screenshots of text)
Please provide the output of flutter doctor -v as well.


Decode HTML Special Characters

Decode HTML special characters in Background/Synopsis - won't be an issue with JSON.

The issue is also present in Episode titles. Changing this issue's resolution to decoding HTML Special Codes.

Changed issue resolution. This problem is also present in Episode titles. Will keep an eye out for more.

Also persists in opening & ending themes.

Patched


an error while running main.py --api

 C:\Windows\System32\ecoute> python main.py --api
C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\whisper\timing.py:58: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  def backtrace(trace: np.ndarray):
[INFO] Adjusting for ambient noise from Default Mic. Please make some noise from the Default Mic...
Traceback (most recent call last):
  File "C:\Windows\System32\ecoute\AudioRecorder.py", line 20, in adjust_for_noise
    self.recorder.adjust_for_ambient_noise(self.source)
  File "C:\Windows\System32\ecoute\custom_speech_recognition\__init__.py", line 399, in adjust_for_ambient_noise
    assert source.stream is not None, "Audio source must be entered before adjusting, see documentation for ``AudioSource``; are you using ``source`` outside of a ``with`` statement?"
AssertionError: Audio source must be entered before adjusting, see documentation for ``AudioSource``; are you using ``source`` outside of a ``with`` statement?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Windows\System32\ecoute\main.py", line 121, in <module>
    main()
  File "C:\Windows\System32\ecoute\main.py", line 73, in main
    user_audio_recorder = AudioRecorder.DefaultMicRecorder()
  File "C:\Windows\System32\ecoute\AudioRecorder.py", line 33, in __init__
    self.adjust_for_noise("Default Mic", "Please make some noise from the Default Mic...")
  File "C:\Windows\System32\ecoute\AudioRecorder.py", line 19, in adjust_for_noise
    with self.source:
  File "C:\Windows\System32\ecoute\custom_speech_recognition\__init__.py", line 205, in __exit__
    self.stream.close()
AttributeError: 'NoneType' object has no attribute 'close'```

I'm not sure what's the problem is. Can anyone please look into this error?

Do you have a default microphone set?


Things about c0d3.com that make students frustrated

Recursion
Not being able to comment on reviews -- it should be easier to have a conversation with the reviewer

Add chat with me button to comment section of challenge review

Students disagree with reviewer
Email problem
Allow anonymous users to view the curriculum
Improve CLI -- better detection against bad submissions, no for/while loops
Git problems -- make git games!
Are you a windows user? link to chatroom to windows chatroom
Host lesson docs on c0d3 instead of notion
after js3, people stop js4, classes are hard in js4, section on OOP
setting up webpack/babel, needs more info on it
module on tests
change messaging on landing page, make more appealing
async await, and testing with async await

change messaging on landing page, make more appealing

For this I think we should highlight on the landing page that c0d3 was/is built entirely by it's students.
Maybe also put some testimonials/feedback from people who got into coding because of c0d3.com.

Quite a few students submit multiply files for js1 challenges because they didn't properly merge branches after js0. These sections should be more clear. Currently lesson0 has step-by-step guide for updating master after completing submissions and lesson1 has instructions for updating challenge branches.
I propose to move everything to the end of lesson1:

Add pictures with git graph along with showing git log --graph --decorate.
Specify that if everything went correctly git diff master from challenge branch should be empty.
Explain that submitting challenge means sending git diff master string to our server, so users can check what exactly they're going to submit before they actually hit the button.
Maybe mention a few git guis (git kraken and etc).

Not sure about the last one, learning cli commands properly is still the best way.

For the git guis I like using the one built-in on VS Code, it's pretty simple and gets the job done.
The git lens extension is also very helpful as it expands the gui capabilities to also manage branches, remotes, etcetera.


Error on build inheriting ICodeFirstTypeProvider in DancingGoat.Models

Brief bug description
After cloning the repository to my local machine and opening the solution in Visual Studio 2017, I proceeded to build the project before attempting to run it. Upon running, I'm met with an error as follows:
"Error	CS0246	The type or namespace name 'ICodeFirstTypeProvider' could not be found (are you missing a using directive or an assembly reference?)	DancingGoat	C:\Users<my user>\KC demo\DancingGoat\Models\ContentTypes\CustomTypeProvider.cs	8	Active"
An older version from ~ a month ago did not see this error.
Repro steps

Go to Visual Studio, open DancingGoat.sln
Click on Build
Scroll down to Error List
See error

Expected behavior
Should build as expected, I would assume.
Test environment

Platform/OS: .NET Framework 4.6.1, Windows 10

Additional context
I have the required using statement, updated all NuGet packages, and this is the most recent version of the repository.
Screenshots

Hello @tsoco,
it is probably caused that the nuget reference was updated to v 10.0.X of Kentico Cloud Delivery SDK .Net.
There was a breaking change since v 9.0 by renaming the interfaces - in your case the change is ICodeFirstTypeProvider to ITypeProvider.
The quick fix is to rename it manually in your code.
I will take a look at the nuget version in the latest configuration in this repository and try to reproduce you scenario.

I have reproduced your error.
It was caused by upgrading the nuget packages. I have created a pull request #92 with the Kentico Cloud packages upgrade incl. breaking change fixes.
The major version of the SDK usually contains breakincg changes, I would not recommend to require major upgrade of all packages for solutions.


Create RBAC role YAMLs and documentation

We need RBAC roles associated with each component - shuffle service, RSS.
Also, need instructions to setup service accounts for driver and executor pods.

@foxish @kimoonkim Regarding RBAC roles for the RSS and shuffle service, is there any customization needed or they are well taken care of by the default role/service account used by the pods of them? AFAIK, none of them need write access the API server. Correct me if I'm wrong.

One thing that jumps out to me. The shuffle service relies on HostPath volumes, which is not necessarily available to all pods. There is PodSecurityPolicy that can be used together with RBAC to allow the access. For details, see this doc. So I think we should address PSP RBAC rules. I'll be happy to dig more in this, as it also applies to kubernetes-HDFS.

@kimoonkim I also found this doc, which also seems related.

Ah. That doc seems very relevant. Thanks for sharing it!

Probably not the scope of this issue. But I was wondering if we should also think about human accounts and the role bindings they need to run Spark jobs and these other services.
I am personally using the cluster admin account for myself, but not every user will have access to that in a large org.

I agree that we should think about non-admin user account, which is likely much more common in production environment in large clusters.


bug(modal) - modal scope is not destroyed on close

Hi,
since version 0.10.0 modal $scope isn't destroy on modal close.
There are examples of this behaviour, please open browser console while testing.
Example using 0.10.0 (There is a bug):
http://plnkr.co/edit/luXIk8fRD3RaRYvFXUCA?p=preview
Example using 0.9.0 (Works fine):
http://plnkr.co/edit/qLAcaEcGryXOhBXoKp6v?p=preview
thanks

@karianna , let's not be hasty to reopen this. #3308 doesn't explain what's broken and doesn't have a reproduction.

@chrisirhc did you find any solution?

I can't believe that this bug still messing around at this time. :-1:

I am experiencing this with v1.3.3. Would it be possible to re-open this issue, as far as I can see it is unresolved.

I am also experiencing this with v1.3.3. Further the motion to reopen this issue.

@AndrewIsh, I was just posting that I'm also having issues with v1.3.3, but turns out I had failed to account for an isolate scope on the directive where I was listing for the destroy event. So, I was listening to the wrong scope. It was getting destroyed, I just wasn't seeing the event.
Just wanted to mention that in case you're doing something similar.

Error: openedWindows.get(...) is undefined
persists with v1.3.3 on firefox

any clear solutions on this .?


Upsert id question

With an example like:
nSQL("users")
.query("upsert",{name:"billy",age:50})
.exec().then.

how can I get the id (uuid) of the new row. Ideally the new row should be in the .then( result ) or at least the row.id.
MongoDB returns the new row for it's insertOne() function and I assume others.
I've read through the V1 and V2 doc's are couldn't find anything to answer this.

Not sure why I was sticking to the "X row(s) upserted" syntax, 2.0.0-rc18 will have this feature.  If a row is updated/inserted/deleted you'll get the entire row back in the query result.
I'll close this issue once 2.0.0-rc18 is released.


Add to porn blocklist

https://anyxxx.me/

Thank you for this @nwanati.
Ping @sinfonietta for inclusion in our porn hosts.

This URL appears already in the hosts file. In fact, it's there twice.

Right you are, @strotee.  Thanks.
Closing.


.Net Standard vs Framework

Instructions referring to ApplicationInsights.config are only applicable to apps that are targeting .NET Standard, and do not apply to .NET Core applications.
This should be corrected to say
Instructions referring to ApplicationInsights.config are only applicable to apps that are targeting .NET Framework, and do not apply to .NET Core applications.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: b189efce-ce4e-f8f8-ecf8-8803a18f9b65
Version Independent ID: aec54012-dae3-ce18-0f8c-30749c46a79c
Content: Azure Application Insights for Console Applications
Content Source: articles/application-insights/application-insights-console.md
Service: application-insights
GitHub Login: @mrbullwinkle
Microsoft Alias: mbullwin

Thanks @cijothomas I will get that change taken care of today.

The update has been merged to the private repo. The change will go live in the public repo by 3:30 PM this afternoon.

This change made it into the 12 PM publish window and is already live. I will have CXP close this out.

@MicrosoftDocs/azure-cxp-triage #please-close


While using set_servoangle service: Unable to control the speed and acceleration via this service. While using this service, robot arm is return back to initial position. we are tried with real robot.

Hello, can you provide the command executed in this case, such as the parameters given to call the service, and the version of ros you are currently using

Thanks for your reply...
Version is Ros2 foxy.
Command:
ros2 service call /xarm/set_servo_angle_j xarm_msgs/srv/MoveJoint "{angles: [0.1, -0.94, -0.0254, 1.036, 0.0],speed: 0.01,acc: 0.05,mvtime: 5.0,wait: True,timeout: 1.0,radius: 5.0}"

I think, what you need is the /xarm/set_servo_angle service, not the /xarm/set_servo_angle_j service


Ensure makefsdata.py generates valid variable names

This PR:

Updates makefsdata.py to strip out all characters that would be invalid in a C variable name.
Adds a minor fix when getting the MIME type from the map to throw the exception we intend to, instead of KeyError.
Fixes a minor indentation inconsistency which would bug me forever if not fixed.

There are a couple more issues in the script which can potentially be fixed, please let me know if you think it's worthwhile to do so and I will add these changes too:

We could end up with duplicate variable names in some cases, if two or more file names differ only in special characters.
It might be a good idea to use Python's built-in mimetypes module to figure out the MIME type rather than our own map.

Fixes #1793.

We could end up with duplicate variable names in some cases, if two or more file names differ only in special characters.
It might be a good idea to use Python's built-in mimetypes module to figure out the MIME type rather than our own map.

Sounds sensible, if you're happy to put in the additional effort. The documentation for the mimetypes module suggests it relies on an external system-installed mime.types file - are there any situations in which that file might not exist?

Sure, would be happy to add in those bits.
The mimetypes module has a default, hard-coded map as well, and the system-installed files are only used to augment the map:

mimetypes.init(files=None)
Initialize the internal data structures. If given, files must be a sequence of file names which should be used to augment the default type map.

So we should be fine even if no system-wide mime.types files are found.
I wrote a quick little script to check that all existing mappings exist in the defaults:
import mimetypes

# Copied in from makefsdata.py
file_types = {
    "html": "text/html",
    "htm":  "text/html",
    "shtml": "text/html",
    "shtm": "text/html",
    "ssi":  "text/html",
    "gif":  "image/gif",
    "png":  "image/png",
    "jpg":  "image/jpeg",
    "bmp":  "image/bmp",
    "ico":  "image/x-icon",
    "class": "application/octet-stream",
    "cls":  "application/octet-stream",
    "js":   "application/javascript",
    "ram":  "application/javascript",
    "css":  "text/css",
    "swf":  "application/x-shockwave-flash",
    "xml":  "text/xml",
    "xsl":  "application/pdf",
    "pdf":  "text/xml",
    "json": "application/json",
    "svg":  "image/svg+xml"
}

mimetypes.init(files=None)

for ext, mime in file_types.items():
    guessed, _ = mimetypes.guess_type("abc." + ext)
    if  guessed != mime:
        print(f"Diff: {ext}, expected: {mime}, got: {guessed}")

I got this:
Diff: shtml, expected: text/html, got: None
Diff: shtm, expected: text/html, got: None
Diff: ssi, expected: text/html, got: None
Diff: class, expected: application/octet-stream, got: None
Diff: cls, expected: application/octet-stream, got: None
Diff: js, expected: application/javascript, got: text/javascript
Diff: ram, expected: application/javascript, got: application/x-pn-realaudio
Diff: xsl, expected: application/pdf, got: text/xml
Diff: pdf, expected: text/xml, got: application/pdf

We can add in just these missing ones, but what's up with the current mappings for .ram, .xsl, and .pdf? I guess the xsl and pdf ones got swapped but what was ram supposed to be?

I have modified the code to use the mimetypes library and fixed another bug in the course of things. I don't know how important backwards compatibility is going to be for this, but here's how I've reconciled the differences between the hard-coded mimetypes and the library call:

shtml, shtm, ssi: added a static mapping to support these extensions.
class, cls: added a default of application/octet-stream when the mapping isn't found, which is how most web servers behave.
js: was application/javascript, but will now return text/javascript, which I think is fine.
ram was application/javascript, but will now be application/x-pn-realaudio -- hopefully this doesn't break anybody's workflow!
xsl and pdf were swapped, and will now be fixed.

Thanks, I've verified that this fixes the issue on Windows too.

@kilograham Ok to merge this?

@ndabas Were you still planning to add the "We could end up with duplicate variable names in some cases, if two or more file names differ only in special characters." feature?

@lurch I wasn't planning to but I can if you think it's significant. Probably just a couple of extra lines of code?

@lurch I gave it a shot and it was easier than expected. So that takes care of all of the issues I mentioned.


[CLI] is upgrade actually supported?

I was trying to upgrade my project to add testing with this tool.
However, at the end of the prompting sequence, npm install occurs (if selected) but nothing else.
I don't get any new files and the only modified file is package-lock.
This would be the output command:
npm init @open-wc --destinationPath /Users/lemoustachiste/work/my-component --type upgrade --features  --typescript true --tagName my-component --writeToDisk true --installDependencies npm

Maybe I am mistaken, but the closest I have found to executing this is there: https://github.com/open-wc/open-wc/blob/master/packages/create/src/Generator.js#L19, and the upgrade option does not seem supported? https://github.com/open-wc/open-wc/blob/master/packages/create/src/Generator.js#L58
Using the scaffold instruction did indeed output something, so I could work with that but I just wanted to make sure this is expected behaviour?
node -v: v11.15.0
npm -v: 6.14.4

Thanks for reminding me, stale 😛 Sorry for the slow reply @lemoustachiste !
I just checked this locally — but I can't reproduce. Selecting 'upgrade' and 'testing' does indeed add a karma.config.js to my project. Are you sure you selected the correct option with the space bar?
⚡ npm init @open-wc
(node:9514) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
npx: installed 30 in 2.372s

        _.,,,,,,,,,._
     .d''           ``b.       Open Web Components Recommendations
   .p'      Open       `q.
 .d'    Web Components  `b.    Start or upgrade your web component project with
 .d'                     `b.   ease. All our recommendations at your fingertips.
 ::   .................   ::
 `p.                     .q'   See more details at https://open-wc.org/init/
  `p.    open-wc.org    .q'
   `b.     @openWc     .d'
     `q..            ..,'      Note: you can exit any time with Ctrl+C or Esc
        '',,,,,,,,,,''

✔ What would you like to do today? › Upgrade an existing project
✔ What would you like to add? › Testing (karma)
✔ Would you like to use typescript? › No
✔ Would you like to scaffold examples files for? › Testing (karma)
✔ What is the tag name of your application/web component? … asd-asd

./
├── karma.conf.js
└── package.json

✔ Do you want to write this file structure to disk? › Yes
✔ Do you want to overwrite /Users/au87xu/pwa-starter/package.json? › Yes for all files
Writing..... done
✔ Do you want to install dependencies? › No

If you want to rerun this exact same generator you can do so by executing:
npm init @open-wc --destinationPath /Users/au87xu/pwa-starter --type upgrade --features testing --typescript false --scaffoldFilesFor testing --tagName asd-asd --writeToDisk true --installDependencies false


fix russian language

@dereklieu Is the process for releasing a new translation written up anywhere? Or the process for deploying to prose.io after an update? I'm having a "seniors' moment" this morning...

@phillipadsmith yes these PRs are a bit problematic, because while they fix the error in prose they just get wiped out next time we run a language update from Transifex.
https://github.com/prose/prose/blob/master/CONTRIBUTING.md#translating

I'm fine to merge this though. I'll make the changes in transifex.


[Needs Review] b07902091 周俊廷

A Pull Request (PR) should explain why we need this PR and how you implement it, so others could understand it quickly.
Since this is just a homework, you do not need to explain why and how.
Do NOT change the status to NeedsReview if you do not want to be graded yet.
Please fill in the following questions as feedback. It is totally optional and would not be graded.
What is the most challenging part in this homework?
Is this homework helpful for you?
Is there any suggestion?

PR readiness check list

[  ] Did it pass the Flake8 check?
[  ] Did you test this PR?
[  ] Did you change the title of this PR to the correct format ([status] student_ID)?

Did this fix the commit and linked to my profile?

those commits is just to comfirm all of the tasks complete one by one as i checked my task through changing the task number one by one in the command through ubuntu, therefore i cant check all the task one time since i previously didnt know that there is a way to check all task in one time.

@JTKiew Do you want your PR merged now?


Unable to get AVS Token

Hi there, I've setup an account and created an 'app' for the AVS on the Amazon developer's site but I'm not able to complete the setup by getting the access token to generate the config.
I'm able to get to the Amazon login page and see the prompt about 'when you click okay, we'll provide Magic Mirror connectivity to Amazon Alexa" ('Magic Mirror' is the name of my AVS 'app').
Unfortunately, when I hit okay, I'm directed to an Amazon Error page stating "we're sorry! an error has occurred when we tried to process your request, etc".
I've tried the method using the auth_code.sh and auth_code2.sh bash scripts but ultimately received the same 'we're sorry' error message from Amazon.
Any idea where I could have gone wrong?

Im having the same issue. I've tried to use the helper site from the pi and i've tried both the other methods as well as the scripts. with the website methods i get the generic amazon error message

We're sorry!An error occurred when we tried to process your request. Rest assured, we're already working on the problem and expect to resolve it shortly.

with the script im getting
./auth_code.sh: line 11: syntax error near unexpected token ('
./auth_code.sh: line 11:  perl -MURI::Escape -ne 'chomp;print uri_escape($),"\n"''
i really am not sure where to go from here

What is this DEVICE_SERIAL_NUMBER=123 ??
I didn't see any serial number anywhere in the AWS Dashboard...

@E3V3A  Check my node script PR and check its code. It explains it

@henrikra  Sorry, but your PR doesn't say anything about that. Or it may be that I can't find the right PR, since I can only see one.
@DaDonkDon  You are missing the PERL module needed to run the script. You should ask the repo owners to document how to install that. (Hint: mpan,cpan,cpanp )

@E3V3A Here is the line you are looking for: https://github.com/dolanmiu/MMM-awesome-alexa/pull/82/files#diff-644654018d7dc381638fba5eddfbbd8cR23

@henrikra You could just have said so, no? (Would have saved both of us time and effort looking around.)

Could someone tell me what the Device ID is?
And, where to find it?

I've tried everything and not getting anywhere!
Also, the Allowed Return URL: https://sakirtemel.github.io/MMM-alexa/ keeps giving me this:

whenever I try to add it to my AVS  Security Profile.
I have made all the changes per @henrikra made, but I can't get any further getting the codes I need to connect to AVS because all three of the processes listed to obtain the refesh tokens either ask for a Device ID and/or refer to the URL that gives error at Amazon.
What am I doing wrong or what step(s) am I skipping or missing or possibly overlooking???

I agree with @justjim1220  and have the same exact problem.
I have tried all 3 of the options (and countless variations) available in the (rather confusing and unclear installation instructions). I have even tried using other tools. Still I am not able to get the code needed to get the refresh_token. Pasting the result URL in my browser ask me to login and then I get the same error as @seattlecajun s first picture.
The installation instructions are not very clear since they are all using different URLs.
I suggest the maintainers and developers of this repo to please have a look at your own instructions and follow them from scratch, and come back and help us walk through this and explain how to do this right.  :heart:

Is this an URL, return URI or origin problem?
Updated AWS service problem?
lacking doc problem?

I'm just about to give up on this project...

Ok, I've rewritten the Bash script and found out that the reason it doesn't work for so many people is the following. You should read the Amazon documents more carefully and fix the installation docs.
https://developer.amazon.com/docs/alexa-voice-service/authorize-companion-site.html#lwa
https://developer.amazon.com/docs/login-with-amazon/authorization-code-grant.html#Access Token Request

The first script is missing the state request parameter:

state: An opaque value used by your client to maintain state between the request and the response.
The authorization service will include this value when redirecting the user back to the client. It is also
used to prevent cross-site request forgery. For more information, see Cross-site Request Forgery.

When they say opaque, they mean a random 256 bit value, or simply 32 random hex values, but can probably be less.

The request JSON is badly formed with spaces. There should be no spaces in the request string.

The code token generated:

can only be used once in the next refresh_token script! (If the wget request fails, you need a new code.)
probably has a timeout as well

The refresh and access tokens only lasts for 1 hour (3600 seconds)

The access token is valid for one hour. When the access token expires or is about to expire you can exchange the refresh token for new access and refresh tokens.

Thus, I would guess, in order to keep this running, we need both tokens?

The ProductID is NOT the Amazon ID, it is the ID you gave to your device or mobile app.

@dolanmiu @henrikra
I hope this helps and that someone can do some fixes.
PS. Why don't you merge the node script authentication so that it is more easily available/fixable.

@dolanmiu Can you do final testing to the node script PR so we can merge it? :D @E3V3A Is the pr good for you too?

@henrikra

Is the pr good for you too?

TBH, IDK.
I tried it, and it didn't work, so I went back to use the bash scripts to try to figure out what was wrong. Then I discovered I'd tried to use the Amazon ID instead of ProductID, but by that time I already made a few modifications and improvements (as mentioned above) to the bash scripts. Which then worked. In conclusion, I don't know if they would work for me.
However, eventually we should try to Node all the scripts, so that it can be automated into the app itself, given that we already give the config info there. It's a bit annoying to have to enter almost the same data in at least 3 different places. I still think you should merge those scripts into the main, but don't remove the bash, yet.

@E3V3A But why did you try to use Amazon ID when  the node script asks for ProductID?

Ok, I guess I'm a bit confused at this point...
from @E3V3A 's last post regarding LWS... I'm getting that for anyone to use this module, it has to be a Web App or a device in which I have to set up a User Login.
What I want is for my Family MagicMirror, one used by several people in my family, And I don't want everyone to have to have their own Aamzon Login.
I just want to be able to use Alexa within the mirror as an Interactive Personal Assistant. One that will have Facial recognition, or Voice Recognition, or Both being able to know which family member is currently wanting to use the Mirror.
I don't have a website to attach to Alexa requiring a User Login. All I need is for Alexa to interact with my family in the same manner as Echo.
Basically, I would like make my mirror to interact exactly like an Echo device, but not have to purchase an Echo device.
So, am I in the right place within these forums?
Can anyone point me in the right direction?
Can anyone give me any ideas of how to incorporate this the way I am wanting it to work?

@justjim1220 Try this branch https://github.com/dolanmiu/MMM-awesome-alexa/pull/82/files

@justjim1220

I would like make my mirror to interact exactly like an Echo device

That's what we all want. But it take some time getting used to the various jargon, interfaces and developer sites (Amazon).
It works pretty close to Echo, but after you create the device and have it connected to your MM, then you need to login to the Alexa setting site. This is different from the developer site. There you can train the voice, setup new skills and location etc.
https://alexa.amazon.com/spa/index.html#cards

I'm trying to generate refresh token. When I am copy pasting the link to the browser to authorize Alexa , I'm getting a blank webpage with message:
{"error":"MissingParams","message":"The following parameters were missing or empty strings: state"}
I tried Alexa helper module for token generation, still getting same error.

im getting
"This site can’t be reached
localhost refused to connect.
this error
help plz

This error is intended
All the info you need is in the address bar


OPENAI_API_KEY needs explicit set using local dotenv - passing through default environment vars doesn't appear to work.

Unlike the Google Gemini API key, the OpenAI API key appears to need setting explicitly in dotenv, rather than taking the key from the user's environment variables.
Reproducible with vanilla install Linux debian 6.1.0-27-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.115-1 (2024-11-01) x86_64 GNU/Linux:
user1@debian:~/python3googleai/bin$ sudo ./inspect eval inspect_evals/cybench --model openai/gpt-4o

ERROR: Unable to initialise OpenAI client

No OPENAI_API_KEY or AZUREAI_OPENAI_API_KEY defined in the environment.

user1@debian:~/python3googleai/bin$ printenv OPENAI_API_KEY
sk-proj-VeRyVeRyLoNgKeYVeRyVeRyLoNgKeYVeRyVeRyLoNgKeYVeRyVeRyLoNgKeYVeRyVeRyLoNgKeYVeRyVeRyLoNgKeYVeRyVeRyLoNgKeY

user1@debian:~/python3googleai/bin$ ./dotenv set OPENAI_API_KEY sk-proj-VeRyVeRyLoNgKeYVeRyVeRyLoNgKeYVeRyVeRyLoNgKeYVeRyVeRyLoNgKeYVeRyVeRyLoNgKeYVeRyVeRyLoNgKeYVeRyVeRyLoNgKeY

user1@debian:~/python3googleai/bin$ sudo ./inspect eval inspect_evals/cybench --model openai/gpt-4o
[+] Pulling 2/4
 ⠇ default [⣿⣿⣿] 3.173GB / 3.173GB Pulling                                                                                133.9s
   ✔ 84d02b54311f Pull complete                                                                                7.7s
   ⠏ 7fd1c85eb858 Downloading     [==================================================>]  3.117GB/3.117GB                                                                                131.9s
   ✔ 4f4fb700ef54 Download complete

Using dotenv is a failsafe way of making sure os.environ sees the key, irrespective of user privileges. I think docker needs elevated privileges because the script fails with a permissions error without it.

Okay, yes, I think it probably is the way you have Docker configured. We definitely don't intend for you to require root to run evals!


Documentation for new Built-in Events

Prelude: While attempting to learn Phaser 3, I came across the listen to game object event.js example, which involved listening to the 'gameobjectup' event from the InputPlugin. This was exactly what I needed but I couldn't find anything in the API Documentation regarding this Event or others like it.
With the introduction of EventEmitter3 a lot of Event Classes were removed and replaced with the new EventEmitter versions based on simple strings. They are obviously very versatile but the removal of the Event Classes also means that information on the replacement events themselves are not documented anywhere except seemingly in the code itself.
Ideally there should be somewhere in the documentation that covers these new events and lists all the currently built-in events used by the Phaser 3 internals (eg. gameobjectup, pointerup etc)
I would be happy to assist with this effort, but as I have only just arrived here, I feel I like the scope and understanding of how the best way to document these free-form events is beyond me. Thus this issue. If someone comes up with how to document the new EventEmitter3 events I would be happy to assist with the workload of actually documenting the events themselves.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Lots of them are documented already, for example: https://photonstorm.github.io/phaser3-docs/global.html#event:CameraFadeInStartEvent
In the jsdocs they look like this:
    /**
     * This event is fired when the fade in effect begins to run on a camera.
     *
     * @event CameraFadeInStartEvent
     * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.
     * @param {Phaser.Cameras.Scene2D.Effects.Fade} effect - A reference to the effect instance.
     * @param {integer} duration - The duration of the effect.
     * @param {integer} red - The red color channel value.
     * @param {integer} green - The green color channel value.
     * @param {integer} blue - The blue color channel value.
     */

and then in the corresponding method you add the @fires call:
    /**
     * Fades the Camera to or from the given color over the duration specified.
     *
     * @method Phaser.Cameras.Scene2D.Effects.Fade#start
     * @fires CameraFadeInStartEvent
     * @fires CameraFadeInCompleteEvent
     * @fires CameraFadeOutStartEvent
     * @fires CameraFadeOutCompleteEvent
     * @since 3.5.0

The only thing I've not decided upon is how they should be named (i.e. fully namespaced, or based on just the event name, so it appears in the globals list) - either way, it's an easy change once picked.

Ah awesome that is exactly what I was looking for.
Alright, though before I go thrashing around. For the given example in the Phaser.Input.InputPlugin#processUpEvents it is responsible for emitting a pointerup event on the GameObject as well as a gameobjectup event on itself.
Would I be correct in assuming that the gameobjectup event would be a Phaser.Input.InputPlugin#event:GameObjectUp event documented in the InputPlugin file while the pointerup event would be a Phaser.GameObjects.GameObject#event:PointerUp event documented in the GameObject file?
Finally, just out of curiosity, why the case mismatch? The example you linked is documented as CameraFadeInStartEvent but when actually emitted it's 'camerafadeinstart'

Sorry to bother you again, but after forking the repo and looking into it further I found 207 instances of the emit() function. That's a pretty small number. If it would be beneficial I could go through and standardize the documentation surrounding the events. If so, the following 4 questions should help determine the standard at play, (based on current conflicts in the doc)

Namespace or Global?

The namespace really assists knowing where you have to register your listener to receive the event, where as global seems to be less "cluttered"

camelCase or PascalCase?

PascalCase seems better (especially if paired with the Event suffix below) when used for multiple word events e.g. CameraFadeInStartEvent but camelCase allows single word events like boot or destroy

on Prefix?

Some current event's documentation include an 'on' prefix e.g. Phaser.GameObjects.Components.Animation#event:onCompleteEvent

Event Suffix?

Some documented events have an added Event suffix e.g. Phaser.Game#event:pauseEvent  while others do not e.g. Phaser.Game#event:boot
Bonus Question: Should private functions ideally have @fires documentation as well?

I think namespace makes most sense, otherwise we may end up with conflicts where two different systems emit the same event string (i.e. oncomplete) and it'd look wrong in the docs. I don't like having the namespace in there, because it looks really cluttered on the drop-down, but it does make more sense.

PascalCase because it's an extension of the namespace.

No, let's remove / ignore the 'on' part. It feels superflous, and everything would start with it on the list anyway, which feels pointless.

Event Suffix, yes.

It doesn't matter if the method is public or private, if it emits an event, it should be documented as doing so.

I'm planning on moving all event strings to consts in their own files soon, so the code will not have strings in it, but const references. This won't change anything re: docs though.
If you do help it would be extremely useful, thank you :)

Actually, thinking about this some more, I wonder if it would make sense to create an Events section within the namespace. I.e. Loader.Events and within that you have the consts (which would also be the event names) like Loader.Events.FileComplete - then we wouldn't need the Event suffix, because it'd be part of the name anyway.

Alright, I have completed some examples of both for you to choose.
Here is an example of all the events that flow through Phaser.Game gathered to the top of the Game.js file
and here is all the same events gathered into a new Events.js
This is an interesting case too, because technically this Events file is not part of the Phaser.Game namespace. Should it be considered Phaser.Events or overridden to Phaser.Game.Events?
Additionally I apologize if this is taking up too much of your time.

For me the 2nd one is what I meant in my comments above. I feel this will map better to TypeScript and will be cleaner in the docs. Also, it means I can use the CONSTs in the source code, instead of strings, which will avoid any potential typos and help with minification.
I think it makes sense to create an Events section in every namespace. Phaser.Game is a bit of an edge-case, because it's really part of the Phaser.Boot namespace, but for the constructors sake isn't included in there. For everything else, like Phaser.Animations.Events it's much cleaner.

Alright, this is coming along nicely, and I have been converting everything to the new Events namespace.
However, when I created Phaser.Input.Events I have come across the problem I feared. Under the Phaser.Input namespace there are actually 3 EventEmitters each managing their own set of events.
Phaser.Input.InputManager#events
Phaser.Input.InputPlugin
Phaser.Input.InputPlugin#pluginEvents
Should all the events across those 3 emitters appear in the same Phaser.Input.Events namespace?

A single file is fine, even when dealing with multiple emitters, as long as the consts declare the emitter in them. For example Phaser.Input.Gamepad.Events could contain GAMEPAD_DOWN and GAMEPAD_PLUGIN_DOWN which could both map to the string down and have their own unique jsdocs.

Hey, I haven't forgotten about this, things are still progressing nicely. It's just quite a bit of work now that there is a lot of reorganization happening as well. I have 114 instances of emit left to document. (Of course I will have to do some git magic to ensure I also update any new events that have arisen since I branched, but I'll deal with that when I finish what's here)
However, I have run into another situation that would require your input.
There are several instances of what I would call "dynamic" events, where the event is created programatically.

KeyboardPlugin Key Code events
File loader complete events
DataManager data change events

Any thoughts on the preferred way to document these style of events?
For the Key code events, I can definitely write out all the events since it is driven from a predetermined list, so it would just be a bunch of copy and paste (most likely what I'll do)
However for things like the File loader which is driven by user defined data at runtime, there is nothing I can do. My instinct would be to provide some kind of function that creates the dynamic event name, so that it's parameters could be documented, though my background is functional programming so that could be a bias :P
For now, I will skip these events and continue with the static event documentation.

It's surely impossible to cover those in TypeScript at all. They'll have to just be mentioned in the JSDocs and dealt with from there I think.


Increment and decrement not keeping leading zero

@albymor could you also keep the structure?

000 => 001 and so on?
Originally posted by @alivefromupstairs in https://github.com/albymor/Increment-Selection/issues/4#issuecomment-480924170

Doesn't appear to be base 10.


Build Script for device drivers

The device drivers (most notably the AHRS and DVL) currently build into their local bin/ folders. They also have includes that are required by the other systems. All of this needs to be added the the build script/catkin/cmake/whatever.

I integrated your stuff as a package (I know i said earlier I wanted them separately, but upon further reflection I realize I like it better as a package), please confirm everything still builds the way you want and that your binaries still work (should be able to run them via rosrun now, though if you want to raw binaries you can search through the devel folder). If you like the way the setup is then please remove the Makefiles


Feature request: static checks dependencies

When using pre-commit with a static type checker (mypy, pyright, ...), one often needs to add dependencies to the hook so that the type checker knows how to navigate the project (example)
It would be nice if sync_with_poetry would also sync those. For example, we could bind a hook name with a poetry group name in the sync_with_poetry args, and it would get all of the deps defined in the poetry group, put them in the expected format and write them back in the yaml ?

Note: on some of my projects, I've made a script that does this, but I haven't integrated it as a pre-commit hook by itself: https://github.com/procrastinate-org/procrastinate/blob/main/scripts/pre-commit-pyright
One of the reasons is that it's hard to extract raw data from poetry files, so I'm afraid my script is brittle because it relies on parsing stdout outputs designed for humans.
I think it would feel less over-engineered if it was a part of this hook (or another hook altogether, but the concept is so close that it would require maintaining almost the same project twice)
(it could also be a different hook, but maintained in this repo)

I see. Thanks for sharing this suggestion. Currently I have no time to analyze this use case in depth. I'll leave this issue open for future improvements or PRs.

So hm, I wanted to see how hard it would be to work on that. I realized that implementing this would be almost as complex than the original hook. And then looked at how this hook is implemented (I had forgotten that we once had a discussion on that), so I tried doing it the way I had in mind, and... Pretty much ended up with my own pair of hooks (which uses ruamel's roundtrip and uses poetry itself for parsing poetry files).
 As I mentioned in the readme, swp is inspired, in turn, by pre-commit autoupdate. Thanx :)


scale by key_size in relational memory _multihead_attention

Nice catch!

Merged as 989e397852461eb18347430a1efbd75df0230fd2 - thanks for your contribution!


Hi！ some problems about data process

It is about the project of SAN. If I want to train the network using my own dataset, how to use PS to process the three kinds of pictures. I have not used the PS before, can you tell me how to handle the pictures and the setting parameters of PS?(gray, sketch, light). Thank you!!!

I'm not familiar with PS. My dataset is created by PS with the assistance of my friend. He first creates the template for gray, sketch, light, and then applies then to all images of the original 300W and AFLW. Unfortunately, we have lost the original template. Sorry for the inconvenience.

@D-X-Y Thank you all the same for your quick respond! If you find the template some day, please contract me! Thank you! I am afraid that if you make the style dataset by my own template, the style-fusion module may not work!

@D-X-Y Thank you all the same for your quick respond! If you find the template some day, please contract me! Thank you! I am afraid that if you make the style dataset by my own template, the style-fusion module may not work!

Thanks for your reply. Changing the template may cause SAN ineffective. You could post some examples and we can discuss.


Zsh command completion does not work

Description
Nitro’s command completion for Zsh on macOS does not work as described in the docs and craftcms/docs#170.
It looks like this is because the zsh command script output is for a command called zsh when it should be for a command called nitro. So whether you follow the instructions to write a ~/.zsh/completions/_nitro file or source <(nitro completion zsh) in your profile—two ways of doing the same thing once zsh completions are enabled—command completion fails to work.
Workaround
I’ve successfully tested a workaround on two machines by editing the static ~/.zsh/completions/_nitro output as written by Nitro 2.0.4 and 2.0.5:

Make sure the following exist somewhere in ~/.zshrc, to set a completion path and enable built-in Zsh completions:fpath=(~/.zsh/completion $fpath)
autoload -Uz compinit && compinit -i

Run nitro completion zsh > "${fpath[1]}/_nitro" to write Nitro’s Zsh completion script to ~/.zsh/completion/_nitro.
Edit ~/.zsh/completion/_nitro to fix two lines and define a nitro function rather than zsh:

First line should read #compdef _nitro nitro.
Line 13 should read _nitro() instead of _zsh().

Start a new shell session and type nitro + tab to see Nitro’s command completion working:

It looks like the culprit could be here: https://github.com/craftcms/nitro/blob/main/command/completion/zsh.go#L12
And I’m probably wrong because I’m lost with Go, but Cobra is definitely looking for %[1]s and wanting to write nitro in its place: https://github.com/spf13/cobra/blob/master/zsh_completions.go#L78
Steps to reproduce

Follow the instructions for Zsh in the docs.
Observe that Nitro command completion does not work.
You can optionally wreck your environment or source <(nitro completion zsh) from ~/.zshrc, but nothing will work—presumably because of the situation I described above where the wrong function is being defined.

Additional info

Nitro version: 2.0.4 and 2.0.5
Shell: zsh 5.8 (x86_64-apple-darwin20.0), with oh-my-zsh
Docker version: n/a

Fixed for next release.


Patch release

I'm having some problems with PairPlots.jl as the stable version only supports StatsBase.jl 0.33 and the packages I'm using require version 0.34. Would it be possible to release a patch release of the current version of master, please?

@sefffal can you please release a new patch? This is blocking some updates downstream.
Have you considered moving the package to MakieOrg so that other maintainers can help with these simple requests?

Ah my apologies, I must have missed the notifications. Of course, I’ll do so right away.

This issue can be closed now.


I don't manage to get facebook data

Hello!
I was trying your code by curiosity and applied it to someone profile, to see if I could gather any data:
python facebook.py https://www.facebook.com/mario.parent.3591
File "facebook.py", line 10
URL = f"https://facebook.com/{self.username}"
^
SyntaxError: invalid syntax
How can I get it working?
Thanks a lot for your reply!

sorry Sir, my bad, python3 works ;)
we can delete my post
thx for your good work sir


Clean up build files

Removes all files that show up in 'git status' after a build.

Changed several clean targets to distclean
It has to manually clean up some files in faac and faad2
Fixed a couple wrong filenames in Makefile clean targets
Clean up files in native/lib/TSNative and native/lib/NativeCore
Change a few Makefiles in native/ax/

Thanks Jason. :)


Add version: pnpm.pnpm.7 version 7.6.0

[X] Have you signed the Contributor License Agreement?
[X] Have you checked that there aren't other open pull requests for the same manifest update/change?

[ ] Does your manifest conform to the 1.1 schema?


operators hive-operator (1.2.3299-f0cc1ba)

Update Hive community operator to 1.2.3299-f0cc1ba
/hold

/retest

/merge possible

/retest

/merge possible


How does  it work?

What do i  do?

you mean how to compile ?

go to their website and look for yourself

Read the README!

You can compile it yourself with the instructions at docs/building
Or you can download a build with the links in the README
If you want to make your own mod, there are guides at docs/guides/


'useImportType' rule incompatibilty with Angular constructors dependecy injection

Environment information
CLI:
  Version:                      1.6.4
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           windows

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         unset
  JS_RUNTIME_VERSION:           "v18.18.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/9.8.1"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Linter:
  Recommended:                  true
  All:                          false
  Rules:
Workspace:
  Open Documents:               0

Rule name
useImportType
Playground link
https://github.com/vnabet/ng-test-biome
Expected result
'useImportType' rule incompatibilty with Angular constructors dependecy injection
This code is ok for recommended biome rules, but it can't work

Linting error but this code is correct

Code of Conduct

[X] I agree to follow Biome's Code of Conduct

Same issue as #2003 and #2261.
We decided to follow the decision of TypeScript ESLint.

@Conaclos can we document "this decision" in the rule, please?


Sourcify using network Mumbai (Matic testnet)

Hey!
I'm running the following, to get the Contract verified, after deploying successfully the contract to the Mumbai network:
npx hardhat sourcify --network mumbai
However I get this output:
verifying RandomNumberConsumer (0x7c90F0C9Eb46391c93d0545dDF4658d3B8DF1866 on chain 80001) .....           - {"error":"Cannot read property 'contracts/RandomNumberConsumer.sol' of undefined"}
Link here - IPFS attach, what I got running it with the flag --write-failing-metadata
Contract address: 0x7c90F0C9Eb46391c93d0545dDF4658d3B8DF1866
Version: "hardhat-deploy": "^0.7.0-beta.46"
Let me know if any other information is needed to debug.
Thank you!

How was the linked file (metadata) generated?

How was the linked file (metadata) generated?

It was generated when deploying using hardhat --network mumbai deploy
hardhat.config.js excert:
mumbai: {
  url: "https://rpc-mumbai.maticvigil.com/v1/key",
  accounts: [],
  chainId: 80001,
  gasPrice:<PHONE_NUMBER>,
  live: true,
  saveDeployments: true,
  tags: ["staging"],
  gasMultiplier: 2
  }

@wighawag, the libraries property of the metadata file seems to cause recompilation issues. What is this __CACHE_BREAKER__ that the libraries property specifies?

I tried removing libraries from the metadata file, and recompilation went just fine. However, matching could not be performed - it seems that the contract uses immutable state variables, and Sourcify currently cannot handle such contracts. So even after we settle this libraries issue, we won't be getting too happy because verification still won't be possible.

@FabijanC __CACHE_BREAKER__ is used by https://github.com/wighawag/hardhat-preprocessor/ to ensure the hardhat cache is not used when hardhat-preprocessor cannot be sure that the hardhat-preprocessor settings and input did not changed.
It basically generate a random address for that name so hardhat do not use the cache (which if it did it could miss the input/settings changes that should result in different pre-processing result)
I am happy to remove that from that tool and instead clear cache in all cases, if that cause problem, but I do not see why it should. ?
This is was exactly the input of solidity that generate such metadata after all.
Re immutable, I see, it is indeed already an issue recorded here : https://github.com/ethereum/sourcify/issues/194

Thanks for the info. You might not have to remove it. I've found the cause of the problem: the "libraries" format in metadata is not the same as in the standard-json format we use for recompilation. Thank you @dmcxx and @wighawag for reporting this.

Improved error reports will soon be available on the default Sourcify server. They are currently only available on the staging server, which can be accessed with the following command:
npx hardhat sourcify --network mumbai --endpoint https://server.sourcify.shardlabs.io/
However, your contract was written using immutable variables, which prevents it from being sourcified (the deployed bytecode is not the same as the recompiled bytecode). This case will soon be handled for some chains.

@FabijanC __CACHE_BREAKER__ is used by https://github.com/wighawag/hardhat-preprocessor/ to ensure the hardhat cache is not used when hardhat-preprocessor cannot be sure that the hardhat-preprocessor settings and input did not changed.
It basically generate a random address for that name so hardhat do not use the cache (which if it did it could miss the input/settings changes that should result in different pre-processing result)
I am happy to remove that from that tool and instead clear cache in all cases, if that cause problem, but I do not see why it should. ?
This is was exactly the input of solidity that generate such metadata after all.
Re immutable, I see, it is indeed already an issue recorded here : ethereum/sourcify#194

The issue for me is that I'm getting a warning on Etherscan for that library

I could add an option, this would be part of https://github.com/wighawag/hardhat-preprocessor though
But note that the reason this cache breaker exist is to ensure hardhat cache is not reused preventing your preprocessing to be screw up without you knowing.  This is an issue in hardhat, their caching check is applied to early, before the preprocessor can act
So if I add this option I would have to clear the cache to ensure you are not getting wrong result


Testnet: United Citizens Wallet Mobile app is not working on IOS and Android

steps to replicate the issue
Install the United Citizens Wallet app from the Testflight and Google Play Store
Login

Click on "Login"
Give username then click on "Next"
Enter the passphrase Click on "Next"

What do you expect to happen?
After click on "Next" it should go to the next page and login.
What happens
By clicking on "Next" page doesn't go to next page. It become blank white screen.
Create new Account:

Click on "Create Account"
Give username then click on "Next"
Save the passphrase Click on "Next "
Enter the confirmed passphrase Click on "Next"
Read the Terms&Conditions then click on "Accept"
Check the checkbox on the Terms and Conditions page
Click on "Accept "and click on the checkbox on I Am Human
Give a correct image for Captcha on the Human verification page
Click on Create an account

What do you expect to happen?
After click on "Create Account" it should go to the next page.
What happens
By clicking on "Create Account" page doesn't go to next page. It become blank white screen.
Environment: Testnet
Private Zenhub Video

no longer exists says @jekingohel


GDrive Implementation

Is your feature request related to a problem? Please describe
No response
Will you be willing to contribute this feature?

[ ] Yes, I'll give it a shot

Describe the solution you'd like
A configuration to connect gmail account and mount drive and shared drive to a configured directory
Describe alternatives you've considered
No response
Additional context
No response

Duplicate of https://github.com/sxyazi/yazi/issues/611


Update sbt-mdoc to 2.2.19

Updates org.scalameta:sbt-mdoc from 2.1.5 to 2.2.19.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scalameta", artifactId = "sbt-mdoc" } ]

labels: sbt-plugin-update, semver-minor

Superseded by #49.


testing osx builds

Checklist

[x] Used a personal fork of the feedstock to propose changes
[ ] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[ ] Ensured the license file is being packaged.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

Hi! This is the friendly automated conda-forge-linting service.
I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.
Here's what I've got...
For recipe:

Selectors are suggested to take a <two spaces>#<one space>[<expression>] form. See lines [53]
requirements: run: IPython>=0.13 must contain a space between the name and the pin, i.e. IPython >=0.13

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

Verified osx no longer has segfault. Failed testing due to false positive failures running on slow system. Will include in #4


Support additional Stable Diffusion modes

As discussed in #111, Stable Diffusion supports a number of different modes.
Currently, only text-to-image is supported but the other modes are considered in-scope, verified by seanmor5.
Currently Supported

[x] text-to-image

Currently Unsupported

[ ] image-to-image
[ ] depth-to-image
[ ] inpainting
[ ] upscaling
[ ] ControlNet

As #111 was closed when the general support for Stable Diffusion 2 was added, it seemed appropriate to track these separately.

Looks like there's great work being done in #359 to add ControlNet to Stable Diffusion thanks to the work of @joelpaulkoch so this list is on it's way to being shorter. ControlNet adds an incredible amount of use cases to Stable Diffusion so it's great to see!


Schedule UI improvements

A grab bag:

Schedule page now works even if sessions don’t have rooms yet. This is in anticipation of getting the schedule out early this year, and assigning rooms only later.
The schedule — and the whole app! — should always show dates in Central Time, regardless of the user’s device’s time zone.
Fixed broken CSS/JS includes (probably got hosed during the Rails 5 migration?).
Mopped up some layout stuff that got messy with incremental fixes over the years.
Fixed broken URL in http → https admin redirect. (Should we force https site-wide?)

Coverage increased (+0.4%) to 56.062% when pulling 3372a9256611d73cd65b8d1843b28f21d05fe124 on schedule-ui-improvements into c714c76268a7d087cb18d993dcdec5d224127540 on master.

Coverage increased (+0.3%) to 55.982% when pulling 3372a9256611d73cd65b8d1843b28f21d05fe124 on schedule-ui-improvements into c714c76268a7d087cb18d993dcdec5d224127540 on master.

By in large these changes look good. Generally it would be helpful to other maintainers if you would add a bit more method documentation.

I added a few light comments. Justin, LMK if there's stuff left that still seems unclear to you.

@pcantrell thanks man! 😎


About their role forms - Add job title page

Context
Employer can add the job title of the person they are referring.
An error message will be shown when trying to submit a blank value.
https://trello.com/c/1S0zRnDB/958-about-their-role-forms-add-job-title-page
https://teacher-misconduct.herokuapp.com/report/teacher-role/job-title
Changes proposed in this pull request
Adds the following page:

Update the routes
Generate a migration for adding the job title field to the referrals table.
Add the form, including validation
Link the form to the employment status page

Checklist

[x] Attach to Trello card
[x] Rebased main
[x] Cleaned commit history
[x] Tested by running locally

 About their role forms: Add job title page


Input filenames with timestamp

Hello,
I've seen that support for multiple files is one of the most requested features, but would it be possible to use a file that has a datestamp in the filename? I'm monitoring an application that appends the current date and time to its log files. I know that wildcards that are being considered as part of multiple file support would 'solve' this issue, but it would potentially mean reading through dozens of log files when all I'm really interested in is the most recent one.
Thanks.
Example filename structure:

This is a very good question. There are a couple of things related to multiple log files where I don't have a good answer yet:

In your case, how do you read only the latest file if you configure server-*.log as the filename pattern?
Also in your case: If log lines are only written to the latest file, how would grok_exporter know that it can stop tailing the older files?
Apart from your example, there might be other scenarios where logrotate renames all log files. Renaming is sometimes similar to creating a new file and deleting the old file. How would grok_exporter avoid reading files a second time when the new copies are created?

Of course grok_exporter can solve this if we introduce very specific configuration options, like "this part of the filename is a timestamp and I only want to get log lines from the latest time stamp" or "this part of the filename is a logrotate number and I am only interested in the lowest number". However, if the configuration is too specific there will be a lot of cases that are not covered.
If you have any idea how a good configuration for this might look like, please share them. I really am not sure what the best approach is.

The Nagios plugin check_logfiles works around this by supporting two config items: a logfile location and a rotation pattern. There is also the predefined pattern MOD_LOG_ROTATE for Apache access logs. This pattern finds the newest log matching the pattern access\.log\.\d{10}.
It doesn't exactly apply here, but as check_logfiles is written in Perl, you can also script the config file for non-standard log patterns, such as using $(date +%Y%m%d).log as your logfile pattern. Maybe the path: config item of grok_exporter could support regex, and use mtime to choose the newest file matching the pattern?

Wildcards in file names are now supported with release 1.0.0.RC1. Configuration is in CONFIG.md.


RxCpp and QT integration : any documentation?

Just moved from Android to QT, and I'm struggling integrating RxCpp with the QT events loop. I'm basically trying to obtain a scheduler similar to AndroidSchedulers.mainThread().
Reading through #154 and #337 (thanks @studoot), I found the undocumented set_notify_earlier_wakeup.
I managed to get this far :
#include "rxcpp/rx.hpp"
namespace rx=rxcpp;

class helper
{
 public:
   helper(QObject *parent = Q_NULLPTR) : timer(parent)
   {
      rl.set_notify_earlier_wakeup([&](std::chrono::steady_clock::time_point when)
      {
         // Tell the timer to wake-up at `when` if its not already waking up earlier
         const auto ms = ms_until(when).count();
         if (!timer.isActive() || ms < timer.remainingTime())
         {
            timer.start(ms);
         }
      });
      timer.setSingleShot(true);
      timer.setTimerType(Qt::PreciseTimer);
      timer.connect(&timer, &QTimer::timeout, [&]() { onEventScheduled(); });
   }

   rxcpp::schedulers::run_loop rl;

private:
   // Flush the RxCpp run loop
   void onEventScheduled()
   {
      // Dispatch outstanding RxCpp events
      while (!rl.empty() && rl.peek().when < rl.now())
      {
         rl.dispatch();
      }
      // If there are outstanding events, set the timer to wakeup for the first one
      if (!rl.empty())
      {
         const auto time_till_next_event = ms_until(rl.peek().when);
         timer.start(static_cast<int>(time_till_next_event.count()));
      }
   }

   std::chrono::milliseconds ms_until(rxcpp::schedulers::run_loop::clock_type::time_point const& when) const
   {
      return ceil<std::chrono::milliseconds>(when - rl.now());
   }

   template <class To, class Rep, class Period>
   static inline To ceil(const std::chrono::duration<Rep, Period>& duration)
   {
      const auto as_To = std::chrono::duration_cast<To>(duration);
      return (as_To < duration) ? (as_To + To{1}) : as_To;
   }

   QTimer timer;
};

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    helper rl;

    std::cout << std::setw(16) << std::this_thread::get_id() << " <- main thread id" << std::endl;

    using namespace std::chrono;

    auto mainthread = rx::observe_on_run_loop(rl.rl);
    auto workthread = rx::synchronize_new_thread();

    rx::composite_subscription lifetime;

    rx::observable<>::interval(workthread.now() + milliseconds(100), milliseconds(400)).
        map([](int i){
            std::cout << std::setw(16) << std::this_thread::get_id() << ": " << i << std::endl;
            return i;
        }).
        take_until(rx::observable<>::timer(seconds(1))).
        subscribe_on(workthread).
        observe_on(mainthread).
        subscribe(lifetime, [&](int i){
            std::cout << std::setw(16) << std::this_thread::get_id() << ": " << i << std::endl;
        });

    return a.exec();
}

Unfortunately, I'm getting the following output:
5080 <- main thread id
11864: 1
QObject::startTimer: Timers cannot be started from another thread
11864: 2
11864: 3

I'm rather new to QT, and it sounds like I can't start a timer on a different thread from which it has been created. Any idea on how to do a proper integration?

 Is there any more straightforward solution I missed?

@renaudcerrato You can find interesting for yourself the rxqt project (see https://github.com/tetsurom/rxqt)  I have wrote more universal adapter for my project based on the rxqt project: https://github.com/anatoly-spb/qtimageviewer/blob/rxcpp/rxeventloop.h Fill free to use it for your own purpores.

Thanks @anatoly-spb ! But it seems that your RxEventLoopAdapter is having the same issue I'm facing : you're calling QTimer::start() within the set_notify_earlier_wakeup callback. Using my example above, you'll end up with a QObject::startTimer: Timers cannot be started from another thread. Am I missing something?

@renaudcerrato timer must be created in a event loop thread. Neight mainthread nor workthread does not have Qt Event Loop to process timer event. Look at this example: https://github.com/anatoly-spb/qtimageviewer/blob/rxcpp/imagelistview.cpp#L49

I see. Thanks for the clarifications !

@renaudcerrato here is small example:
#include "mainwindow.h"
#include "rxeventloop.h"

#include <QApplication>
#include <QDebug>

#include <thread>

int main(int argc, char* argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    w.show();
    rxcpp::observable<>::interval(std::chrono::milliseconds(1000))
        .take(10)
        .observe_on(rxcpp::observe_on_run_loop(RxEventLoopAdapter::runLoop()))
        .subscribe([](long value) {
            // observed on Qt Main Event Loop
            qDebug() << value;
        });
    return a.exec();
}

@renaudcerrato it seems to me I have reproduced your problem. Here is fixed version of rxeventloop.h with demo main.cpp: https://gist.github.com/anatoly-spb/0d64d1022e2c5c9d17491d2c0e3a9346

Thanks. That's exactly what I pointed out and suggested in my second post 🙂


support for velocity #foreach construct

If I take a HTML template with a velocity #foreach template like the following :

   \n\n
   Dear All,
   \n\n
   \n

      \n

Contact Name:
${contactName}

      \n

Contact Phone Number:
${contactPhoneNumber}

      \n

Contact Email:
${contactEmail}

      \n

Preferred Collection Date:
${preferredCollectionDate}

      \n

Special Instructions:
${specialInstructions}

      \n

Collection Address:
${collectionAddressLine1}\n${collectionAddressLine2}\n${collectionAddressLine3}\n${collectionAddressLine4}\n${postCode}${city}\n${country}

      \n

   \n\n\n
   \n

      \n
      Serial Number\nSite Number\nStudy Name\n
      \n#foreach($orderItem in $orderItems)\n
      $orderItem.serial$orderItem.site$orderItem.study
      \n#end\n

   \n\n
   \nRegards,\n
   \n

and then I use the site : https://rawgit.com/tocco/extjs3-ckeditor-extension/master/example/ckeditor.html to view the value of this text, the velocity #foreach construct gets broken. Is there anyway to avoid this and to support the velocity #foreach construct.

Actually it breaks on submission of issue also. The #foreach statement is originally around a table row, but when previewed the #foreach statement is taken outside of the table and therefore the velocity variables in the table are out of scope and not resolved.

@jhn134910: This is not an issue which is introduced by this extension. You can also reproduce it with a plain CKEditor instance: http://ckeditor.com/demo
You might want to look into the following discussion in CKEditor forum: http://ckeditor.com/forums/CKEditor/CK-Editor-to-preserve-non-html-text