Update caching

Hi!
I was using your image to troubleshoot some configuration in the multi-container Carto repo I'm working on, and noticed that Varnish as configured wasn't actually receiving traffic. This PR has Nginx and Varnish config changes that set Varnish up to cache both the SQL API and Windshaft. It also explicitly forces Nginx not to cache those requests, which it tends to do by default (potentially creating two layers of caching, with lots of phantom HTTP 304 bugs as a result). There are more descriptive details in the commit messages, and feel free to @ me if anything is unclear.
A few helpful commands (to run on the container) for testing this out:

tail -f /var/log/nginx/cartodb_access.log
/opt/varnish/bin/varnishlog -c - shows Varnish logs for requests from the client
tail -f /CartoDB-SQL-API/logs/cartodb-sql-api.log

If you run those in separate sessions and then make a new request that hits the SQL API, you should be able to see the request get proxied by Nginx, passed to Varnish, then passed on to the SQL API itself. A subsequent request for the same resource should (barring things like using the Authorization header, which will cause Varnish to automatically pass the request) hit Nginx and Varnish, but not make it all the way to the SQL API.
Also, if you keep the varnish logging process open while making style changes to a visualization in the Builder interface, you will see PURGE requests being processed by Varnish, based on HTTP calls made by the invalidation logic in the postgres trigger created by the code here:
https://github.com/CartoDB/cartodb/blob/05a05fd6959bf4cc42480daec08d28449532cd8e/app/models/user/db_service.rb#L1491-L1538
Hope this is useful,
Nick

Thanks very much


Remove auxpow header from index

The only reason the auxpow header is stored in the blockindex is to verify if the PoW is right when loading from that index. While it is of course super-safe to do that, it leads to very inefficient memory usage: over 200% increase of resident memory on linux and OSX. This change was introduced in 1.10.0, with #1206.
I'm reverting the commit in question which makes my dogecoind on linux go from 1050MB resident memory to about 450MB. A re-index isn't mandatory but saved another 65MB for me, plus it makes paged memory smaller.
Please note that a consensus param from Namecoin was removed in this commit as well, so after reversal of the original commit, I'm re-removing it in a separate commit, so that that can be pulled into any rework for later versions, without needing to include the entire reversed chain.

utACK

Could someone please test this on windows? Here's an archive with binaries; sha256sum: bc43bc1a4b152331c7acf8600f2d18fc4f02c83a6a31f2515518e1656aa49de7

Reindexed on mainnet without issues. ACK.


grt: fix usage from underflow

Fixes: #2633
At the fastroute after calling the Flute algorthm, the function calls fixEmbeddedTrees(). This method changes the embadded trees, but it doesen't updates the usage for the edges that were removed and the edges that were added. This fix updates this usages after changing the trees.
An exemple can be found on the following test case at the net with ID:15270 edge: 1
grt-usage-wraps.tar.gz
Before fixing the embadded tree this edge is:

after fixing the embadded tree this edge is:

But the usage is never added for the new edges, or is decreased for the old edges.

Why does the loop appear when "fixing"?  It seems like another bug.  It looks like it is just flipping the L segment.

I belive there is a bug that creates the loop, according to the code it was supose to create the inverse L route, but this loop is generated. I was looking into it today but still didn't find why is this happening.

Secure-ci is green, so I'll merge this PR.


Ui refinements, closes #248

I fixed one merge conflict in iptt_filter_form.html, please review!

This undoes a lot of the changes I had made. The 'reverting of bootstrap4  branch into ui-refinements' seems to have created counter commits that undoes some of my changes. Moving forward, the following workflow should work better:

pull the latest changes from bootstrap4
branch off of bootstrap4
when ready make a pull request targeting bootstrap4
If you need to pull in the latest changes from bootstrap4 for some reason, you can but please do not revert it even if it breaks the build.

Thanks @mahmoodkhan, I’ll use this workflow instead. I apologize for the breaking reversion.


Improve history handling.

Earth-2 MIP Pull Request
Description
Improve handling of history.  Previously models with history (e.g. DLWP) could not be initialized with data  sources without history.  A work-around was to manually building a new data source, and made the notebooks/examples messy. Also, this was preventing using dlwp for ensemble inference with CDS inits for example.
I added support for history to the function get_initial_condition_for_model, which is used by all the inference routines.
Checklist

[x] I am familiar with the Contributing Guidelines.
[x] New or existing tests cover these changes.
[x] The documentation is up to date with these changes.
[x] The CHANGELOG.md is up to date with these changes.
[ ] An issue is linked to this pull request.

Dependencies

/blossom-ci

/blossom-ci

LGTM


SAK-33903 - Adding OSS parent for Sakai

This will fail the test until I release oss-parent version 1. I'm not going to do that until this is approved but will do it before this PR is merged.

This was how Sakai 2.9 used to be but sometime around there I dumped everything from oss-parent into master. https://source.sakaiproject.org/svn/master/branches/sakai-2.9.x/pom.xml
Now that more things need to use this release information (webjars) and the oss parent is out of date I think we need our own one. Also a lot of webjars in https://github.com/webjars still use oss-parent AND override local plugins and versions in their own module. This would be the alternative but seems like it just adds a lot more to update, relying on a pom that will never be changed.

I'll try to have a fuller look later, but this makes lots of sense to me.


how to use this crate?

how to write a h5?
how to read a h5?
thanks.

There's an example in the readme.


Prometheus MAC learning

Exports the MAC learning 'tables' with Prometheus.
E.g
learned_macs{dpid="0x3728fda4",n="0",port="2",vlan="100"}<PHONE_NUMBER>9869.0

68492399979869.0 = 3E:4B:21:2B:AD:5D
'n' is the 'dimension' to allow multiple MAC addresses on the one port.
https://travis-ci.org/Bairdo/faucet/builds/233057060
The test will add 4 hosts, check that they are exported, then wait 61 seconds for them to timeout, before adding another 2 hosts, where it will then check that the latest 2 are exported with the previous 4 either zeroed out or overwritten.
I have had problems with the test passing consistently when the timeout is set lower (30s or 40s).

Excellent thank you! May be a couple of days delay - at WAND right now
using their FAUCET deployment.
On Wed, May 17, 2017 at 1:34 PM, Bairdo<EMAIL_ADDRESS>wrote:

Exports the MAC learning 'tables' with Prometheus.
E.g
learned_macs{dpid="0x3728fda4",n="0",port="2",vlan="100"}<PHONE_NUMBER>9869.0
68492399979869.0 = 3E:4B:21:2B:AD:5D
'n' is the 'dimension' to allow multiple MAC addresses on the one port.
https://travis-ci.org/Bairdo/faucet/builds/233057060
The test will add 4 hosts, check that they are exported, then wait 61
seconds for them to timeout, before adding another 2 hosts, where it will
then check that the latest 2 are exported with the previous 4 either zeroed
out or overwritten.
I have had problems with the test passing consistently when the timeout is
set lower (30s or 40s).
You can view, comment on, or merge this pull request online at:
https://github.com/REANNZ/faucet/pull/604
Commit Summary

export mac learned 'map' to prometheus metrics
test
Added prometheus check to max hosts test.
clear all for this valve outside loop
temp save
merged
remove commented pylint
Added another check. Cleanup.
remove logging & redundant test code

File Changes

M faucet/faucet.py
https://github.com/REANNZ/faucet/pull/604/files#diff-0 (5)
M faucet/valve.py
https://github.com/REANNZ/faucet/pull/604/files#diff-1 (24)
M tests/faucet_mininet_test.py
https://github.com/REANNZ/faucet/pull/604/files#diff-2 (117)

Patch Links:

https://github.com/REANNZ/faucet/pull/604.patch
https://github.com/REANNZ/faucet/pull/604.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/REANNZ/faucet/pull/604, or mute the thread
https://github.com/notifications/unsubscribe-auth/AEgZ1_uUib7aaB0HrbH1cEfFfyH44ikEks5r6k6xgaJpZM4NdRZH
.

Do you have a Travis URL we can see that shows the tests passing?
On Thu, May 18, 2017 at 9:31 AM, Bailey, Josh<EMAIL_ADDRESS>wrote:

Excellent thank you! May be a couple of days delay - at WAND right now
using their FAUCET deployment.
On Wed, May 17, 2017 at 1:34 PM, Bairdo<EMAIL_ADDRESS>wrote:

Exports the MAC learning 'tables' with Prometheus.
E.g
learned_macs{dpid="0x3728fda4",n="0",port="2",vlan="100"}<PHONE_NUMBER>9869.0
68492399979869.0 = 3E:4B:21:2B:AD:5D
'n' is the 'dimension' to allow multiple MAC addresses on the one port.
https://travis-ci.org/Bairdo/faucet/builds/233057060
The test will add 4 hosts, check that they are exported, then wait 61
seconds for them to timeout, before adding another 2 hosts, where it will
then check that the latest 2 are exported with the previous 4 either zeroed
out or overwritten.
I have had problems with the test passing consistently when the timeout
is set lower (30s or 40s).
You can view, comment on, or merge this pull request online at:
https://github.com/REANNZ/faucet/pull/604
Commit Summary

export mac learned 'map' to prometheus metrics
test
Added prometheus check to max hosts test.
clear all for this valve outside loop
temp save
merged
remove commented pylint
Added another check. Cleanup.
remove logging & redundant test code

File Changes

M faucet/faucet.py
https://github.com/REANNZ/faucet/pull/604/files#diff-0 (5)
M faucet/valve.py
https://github.com/REANNZ/faucet/pull/604/files#diff-1 (24)
M tests/faucet_mininet_test.py
https://github.com/REANNZ/faucet/pull/604/files#diff-2 (117)

Patch Links:

https://github.com/REANNZ/faucet/pull/604.patch
https://github.com/REANNZ/faucet/pull/604.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/REANNZ/faucet/pull/604, or mute the thread
https://github.com/notifications/unsubscribe-auth/AEgZ1_uUib7aaB0HrbH1cEfFfyH44ikEks5r6k6xgaJpZM4NdRZH
.

Apologies, I missed it.
On Thu, May 18, 2017 at 12:22 PM, Bailey, Josh<EMAIL_ADDRESS>wrote:

Do you have a Travis URL we can see that shows the tests passing?
On Thu, May 18, 2017 at 9:31 AM, Bailey, Josh<EMAIL_ADDRESS>wrote:

Excellent thank you! May be a couple of days delay - at WAND right now
using their FAUCET deployment.
On Wed, May 17, 2017 at 1:34 PM, Bairdo<EMAIL_ADDRESS>wrote:

Exports the MAC learning 'tables' with Prometheus.
E.g
learned_macs{dpid="0x3728fda4",n="0",port="2",vlan="100"}<PHONE_NUMBER>9869.0
68492399979869.0 = 3E:4B:21:2B:AD:5D
'n' is the 'dimension' to allow multiple MAC addresses on the one port.
https://travis-ci.org/Bairdo/faucet/builds/233057060
The test will add 4 hosts, check that they are exported, then wait 61
seconds for them to timeout, before adding another 2 hosts, where it will
then check that the latest 2 are exported with the previous 4 either zeroed
out or overwritten.
I have had problems with the test passing consistently when the timeout
is set lower (30s or 40s).
You can view, comment on, or merge this pull request online at:
https://github.com/REANNZ/faucet/pull/604
Commit Summary

export mac learned 'map' to prometheus metrics
test
Added prometheus check to max hosts test.
clear all for this valve outside loop
temp save
merged
remove commented pylint
Added another check. Cleanup.
remove logging & redundant test code

File Changes

M faucet/faucet.py
https://github.com/REANNZ/faucet/pull/604/files#diff-0 (5)
M faucet/valve.py
https://github.com/REANNZ/faucet/pull/604/files#diff-1 (24)
M tests/faucet_mininet_test.py
https://github.com/REANNZ/faucet/pull/604/files#diff-2 (117)

Patch Links:

https://github.com/REANNZ/faucet/pull/604.patch
https://github.com/REANNZ/faucet/pull/604.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/REANNZ/faucet/pull/604, or mute the thread
https://github.com/notifications/unsubscribe-auth/AEgZ1_uUib7aaB0HrbH1cEfFfyH44ikEks5r6k6xgaJpZM4NdRZH
.

218598
I have run the test 30 times without failing once (20s base timeout). However it looks rather hacky, by doing multiple pings to keep the MAC addresses known to faucet.
When using a base timeout of 5s, 10s, & 15s the test fails.
There is also a small improvement made to compile the regex that is is used within a loop (but that should be unrelated to the long timeout issue)
I still need to remove the debugging print statements.
I will continue to investigate, maybe by making the pings simultaneous so the timeout values are closer together.

0dc5123
https://travis-ci.org/Bairdo/faucet/builds/233865749
Changed approach to have first host fping the IP addresses of the second host.
Have run the test 30 times without failure.
Base timeout is set to 10s. 5s failed.

3f8e3af
https://travis-ci.org/Bairdo/faucet/builds/233874462
removes debug printing.

Thanks! Looks like some merge conflicts (due to addition of faucet_metrics.py). Almost there...


Testcase updation

Due new modification changes in lib, i think it requires test cases updatation also, if so can i submit PR?

I have added get testcase for digest auth,
@bulkan Let me know any specific testcases required?
Get With Digest Auth
    [Tags]    get
    ${auth}=    Create List    user    pass
    Create Digest Session    httpbin    https://httpbin.org    auth=${auth}    debug=3
    ${resp}=    Get Request    httpbin    /digest-auth/auth/user/pass
    Should Be Equal As Strings    ${resp.status_code}    200
    Should Be Equal As Strings    ${resp.json()['authenticated']}    True

@vkosuri You can submit a PR for anything you think is necessary :)


Radiotherm KeyError

The problem

Environment

System Health
arch	x86_64
dev	false
docker	true
hassio	false
os_name	Linux
python_version	3.7.6
timezone	America/Chicago
version	0.105.0
virtualenv	false

Home Assistant release with the issue: 0.105.0
Last working Home Assistant release (if known): 0.104.3
Operating environment (Hass.io/Docker/Windows/etc.): Docker
Integration causing this issue: Climate -- radiotherm
Link to integration documentation on our website: https://www.home-assistant.io/integrations/radiotherm/

Problem-relevant configuration.yaml

climate:
  platform: radiotherm
  host:
    - <IP_ADDRESS>
  hold_temp: True

Traceback/Error logs

2020-02-05 15:31:19 ERROR (MainThread) [homeassistant.components.climate] radiotherm: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 304, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 461, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/radiotherm/climate.py", line 300, in update
    self._program_mode = data["program_mode"]
KeyError: 'program_mode'

Additional information

CT50 doesn't seem to support program_mode https://github.com/mhrivnak/radiotherm/blob/master/radiotherm/thermostat.py


Fix numpy_cupy_equal for case that both numpy cupy raise errors

Blocked by https://github.com/cupy/cupy/pull/4252.
Fixes testing.numpy_cupy_equal decorator for the following situation.
class TestX(unittest.TestCase):
    @testing.numpy_cupy_equal()
    def test_x(self, xp):
        raise ValueError

The current master branch passes the above test, even if numpy and cupy raise errors of different types.

@toslunar _check_cupy_numpy_error fails at the following line, if both numpy and cupy raise no errors.
https://github.com/cupy/cupy/blob/51fde7ac2f9411f7ebcd77e8d614fbebc18b220c/cupy/testing/helper.py#L155

Thanks.  I overlooked if cupy_error or numpy_error:.  Many decorators use _make_decorator, and its error check is
https://github.com/cupy/cupy/blob/c42e571418841346589ce94d5c13b274dc19ec73/cupy/testing/helper.py#L236-L241

By the way, should numpy_cupy_equal check that the results are not ndarrays?  For example, assert cupy.array([3.0]) == numpy.array(3) passes (because bool applies to one-element array) but shapes and dtypes are different.

Rebased.

Jenkins, test this please.

Jenkins CI test (for commit 5483623fc78b59168c7aa8d02794319905296af1, target branch master) failed with status FAILURE.

Jenkins, test this please.

Jenkins CI test (for commit 492def696eeab3bc74a7b46354c805fee5fc1275, target branch master) failed with status FAILURE.

The PR found other failures :+1:
tests.cupy_tests.sorting_tests.test_sort.TestArgpartition_param_0_{external=False}.test_argpartition_one_dim
tests.cupy_tests.sorting_tests.test_sort.TestArgpartition_param_1_{external=True}.test_argpartition_one_dim

Fix (or temporarily mark xfail) them, first.

Jenkins, test this please.

Jenkins CI test (for commit 82482c5ce5470ccc50aa8888e873a8cf4b943fb9, target branch master) succeeded!


"Rename" refactoring command is active, but results with NullReferenceException

Current master:

Attached debugger did not stop on this exception.

I've got stack trace with dotTrace:

Looks like we should provide Inline Rename service.

It seems it fails here http://source.roslyn.io/#Microsoft.CodeAnalysis.EditorFeatures/Implementation/InlineRename/InlineRenameService.cs,55

Yeah, it looks like the right direction. After providing default service implementation the error message changed

I'm closing it in favor of https://github.com/Microsoft/visualfsharp/pull/1932


[0.8.x] UF-201: Notifications interfere with top menu navigation

If I understand correctly the first (top most) notification will be positioned below the top most menu bar and dropdown menus in that bar will appear over notifications. Seems reasonable.... however the issue then moves to secondary menu bars... but that I guess is the topic of a different (future) BZ ;-)

+1 to merge.


supported? 7 pins -> without CS pin?

hi,
i trying to get fbcp-ili9341 running. but no success.
instead this python code runs on the same wiring perfectly: https://github.com/solinnovay/Python_ST7789
seems to be a 7789 driver with the CS-Pin missin on my display. this python-lib works.
i tried all this without any reaction on the display.
maybe there is a foolproof way to get an image on the display while this fbcp-ili9341 is running?
root@raspberrypi:/usr/src/fbcp-ili9341/build# history | grep cmake
   36  sudo apt-get install cmake
   40  cmake -DST7789=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DGPIO_TFT_BACKLIGHT=27 -DSTATISTICS=0 ..
   41  cmake -DST7789=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DGPIO_TFT_BACKLIGHT=27 -DSTATISTICS=0 -DSPI_BUS_CLOCK_DIVISOR=20 ..
  104  history | grep cmake
  134  history | grep cmake
  229  history | ggrep cmake
  230  history | grep cmake
  231  cmake -DST7789=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DGPIO_TFT_BACKLIGHT=27 -DSTATISTICS=0 -DSPI_BUS_CLOCK_DIVISOR=40 ..
  233  cmake -DST7789=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DGPIO_TFT_BACKLIGHT=27 -DSTATISTICS=0 -DSPI_BUS_CLOCK_DIVISOR=40 -DUSE_DMA_TRANSFERS=OFF ..
  235  cmake -DST7735=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DGPIO_TFT_BACKLIGHT=27 -DSTATISTICS=0 -DSPI_BUS_CLOCK_DIVISOR=40 -DUSE_DMA_TRANSFERS=OFF ..
  236  cmake -DST7735R=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DGPIO_TFT_BACKLIGHT=27 -DSTATISTICS=0 -DSPI_BUS_CLOCK_DIVISOR=40 -DUSE_DMA_TRANSFERS=OFF ..
  237  cmake -DST7789VW=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DGPIO_TFT_BACKLIGHT=27 -DSTATISTICS=0 -DSPI_BUS_CLOCK_DIVISOR=40 -DUSE_DMA_TRANSFERS=OFF ..
  238  cmake -DST7789VW=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DGPIO_TFT_BACKLIGHT=27 -DSTATISTICS=0 -DSPI_BUS_CLOCK_DIVISOR=40 -DUSE_DMA_TRANSFERS=OFF ..
  239  cmake -DST7735R=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DGPIO_TFT_BACKLIGHT=27 -DSTATISTICS=0 -DSPI_BUS_CLOCK_DIVISOR=40 -DUSE_DMA_TRANSFERS=OFF ..
  241  cmake -DST7789VW=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DGPIO_TFT_BACKLIGHT=27 -DSTATISTICS=0 -DSPI_BUS_CLOCK_DIVISOR=40 -DUSE_DMA_TRANSFERS=OFF ..
  243  cmake -DST7789=ON -DGPIO_TFT_DATA_CONTROL=24 -DSTATISTICS=0 -DSPI_BUS_CLOCK_DIVISOR=40 -DUSE_DMA_TRANSFERS=OFF ..
  245  history | grep cmake

this is my wiring.  works with the python-example. but with same wiring not with the fbcp-ili9341.
i am on an old rasperry
cat /proc/device-tree/model
Raspberry Pi Model B Rev 2

appreciate any hint/help. thanks

One gotcha that has been reported with CMake is that when changing the controller type, one may need to manually delete the file CMakeCache.txt from the build directory (or delete the whole build directory).
Other things to try may be to test if the display is not compatible with
https://github.com/juj/fbcp-ili9341/blob/30b9738f4bd4475ac266b2bbb8fe843b11676c03/spi.cpp#L102
by replacing that line with
#define UNLOCK_FAST_8_CLOCKS_SPI() ((void)0)

Apart from that, can't immediately think what might be the fault. May need to snoop the bus with a logic analyzer to figure the issue out. The ST7789 display I wrote the driver implementation against was this: https://www.adafruit.com/product/3787

thanks for your fast thoughts on this..
i am not that deep into hardware, so i was wondering if CS is needed. but i guess: not.
i will try your code change and see what happens.
as a nooby and as a general question: i dont get errors after starting the  buildfile, what should i expect to see on the spi-display? my display stays black all the time...(not in  python, there it is fine and working with same wiring)
i am connected via ssh, there is no hdmi or any other peripherial than the st7789 display.
i tried to start omxplayer and show an image. i also tried fbi and feh. always black display....
maybe there is a test option?
i am on latest raspian and kernel: Raspbian GNU/Linux 10
root@raspberrypi:/usr/src/fbcp-ili9341/build# uname -a
Linux raspberrypi 5.4.79+ #1373 Mon Nov 23 13:18:15 GMT 2020 armv6l GNU/Linux
root@raspberrypi:/usr/src/fbcp-ili9341/build#

The idea of the CS (Chip Select) pin is to allow chaining multiple SPI devices onto the same data&clock bus, where the CS pins are used to select which of the connected devices the host wants to talk to at any given time. On many displays I have the CS pin can just be connected to ground to make them behave "always-on", but I do have one display that also needs to receive the CS pin high->low edge transitions in order to "wake up" to process any incoming commands. So the answer for "is CS pin needed?" is "it depends on the display".
Given that your display already works without a CS pin using the other library clearly shows that the CS pin is not needed for your particular display. When you don't provide the pin number for fbcp-ili9341, it will just ignore that and not use it when driving the display.
By default when you start up the display, you should see the default framebuffer 0 of the linux. If you are booting to command line mode, I believe the fb0 should be showing a text entry asking to log in to the Pi. If you run any graphical program, it should show that program instead.
Also given that you don't specify -DSTATISTICS=0 override to CMake, it means the driver should be showing a performance statistics overlay on the screen, so even if there is nothing showing up on the Pi linux framebuffer, the perf overlay should at least be getting displayed.
You can try uncommenting https://github.com/juj/fbcp-ili9341/blob/662e8db76ba16d86cf6fd09d85240adc19e62735/gpu.cpp#L21 to force a test pattern to show up, but that should not be necessary, as the overlay should at least be shown.

[as a sidenote: while the executable is running, i can start the python lib&script and get output on the display from the python script (a clock). shouldnt there be a confict for dual use? or is this ok? ]

There will certainly be a conflict. If the python clock script does not hang on the display, then it means that fbcp-ili9341 was probably not actively printing out any bytes to the bus. There is an internal debug config
https://github.com/juj/fbcp-ili9341/blob/662e8db76ba16d86cf6fd09d85240adc19e62735/spi.cpp#L18
that can be used to see what activity happens on the bus.
Hmm, looking at the pin wiring.. having trouble verifying the pins from that photo.. do you have the green reset pin connected to CE0 pin on the Pi? If so, try moving it to another general BCM? pin on the Pi that does not have a special function.

thanks for explanation.
i assue that the fcp-ili9341 is still not working well, even when the binary seem running without  errors...
i may try tomorrow the debug or test-pattern.
i dont change any wiring and the python lib is working well on the same raspberry.
the reset cable is wired to gpio/bcm 25 = pin 22.  i dont see any problems, but i can try a different pin/bcm

---addition:
yes, you spotted something on the image, rights where the pin-header is on the image. i used this from the web, looks wrong on the PCB side. Myself jumpered all wires like the table on the left. the right side shows not my rasperry , i have an old B-Version, not a raspi 3.

i guess my raspberry is a model B, rev2.
following that, the gpip/BCM numbering started here.
i dont think the backlight is wrong, if your pin-numbering is GPIO/BCM. is it?

--> https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/the-gpio-connector

Yes, the pin numbering that is used is the BCM pin names convention. The reason to avoid Pi’s CE0 line is that it is used by the Pi’s hardware SPI0 chip, so it may cause a conflict.

i think i never used CE0=BCM8=Pin24....
must be something else, hope to find time to test some more later...
my wiring...never changed it ( and as a countercheck same wiring running ok with the python lib) ->

Great, yeah, that looks all correct as far as the wiring goes.
Unfortunately I am out of ideas on what would be wrong. Other things you could try is to uncomment
https://github.com/juj/fbcp-ili9341/blob/662e8db76ba16d86cf6fd09d85240adc19e62735/config.h#L111
and then delete all the display initialization and reset related code in https://github.com/juj/fbcp-ili9341/blob/master/st7735r.cpp#L10 , and then see if fbcp-ili9341 is able to drive the display after first using the working python driver.
If it does, then it suggests that the initialization sequence in fbcp-ili9341 is not compatible with the display.

fortunately i bought a pack of 3 displays and have old rasperrys lying around...
i make a second hardware (same pins, but new colors in wiring, but both with latest kernel 5.x, which dropped fbtft_device, may that affect your code also) and test your suggestion. will report back ...

second system up and running, python lib ok, fbili9341 still black...
i will further test something of your suggestions ...

one option failed. weird.
-DST7789 compiled
-DST7735 failed
-DST7735R compiled
(sidenote: would be helpful to get textoutput for witch driver -DST the executable was once build, dont see it at the moment)
but tft still black.. will try more...

Unfortunately I am out of ideas on what would be wrong. Other things you could try is to uncomment
https://github.com/juj/fbcp-ili9341/blob/662e8db76ba16d86cf6fd09d85240adc19e62735/config.h#L111
and then delete all the display initialization and reset related code
If it does, then it suggests that the initialization sequence in fbcp-ili9341 is not compatible with the display.

thats was it. something in the init is not right.
without init its now running --- all with your help ..... -> 💐
many, many thanks for your time and effort.. i see it blinking now, great.
tomorrow will be another day (to go further) ...
thx again for now, great help!

testing .. 😄

Nice! You may be able to improve performance by reducing CDIV to a smaller value from 40. My ST7789 display was able to reach up to CDIV=4. (85MHz bus speed)

after some testing and reboots:
INIT:
i need init from the python lib....
maybe i need further help to find necessary init-sequence...
🙏
SPI on works:
i leave spi-on in config.txt for the python lib.
does not affect the fbcp-ili9341... works
Rotation:
/boot/config.txt:
dtparam=spi=on
gpu_mem=128
avoid_warnings=1
display_rotate=1
#hdmi_force_hotplug=1
#hdmi_cvt=240 240 30 3
#hdmi_group=2
#hdmi_mode=87
#hdmi_drive=2
the rotation brings distortion/scaling... any hint to get this right?

i read your instructions again and added:
/boot/config.txt
hdmi_group=2
hdmi_mode=87
hdmi_cvt=240 240 60 1 0 0 0
hdmi_force_hotplug=1

display_rotate=1

now this is correct.

(only left to figure out the init...)

python-lib starts the display with reset and init:
https://github.com/solinnovay/Python_ST7789/blob/master/ST7789/ST7789.py#L204
how to test and transfer this to fbcp-ili9341 ?

i am a horrible coder, just a general noob ... 🤡
seems that a possible init is already there (whats this If 0 ?):
https://github.com/juj/fbcp-ili9341/blob/master/st7735r.cpp#L107
how to set code and option for another init like the python one?
https://github.com/solinnovay/Python_ST7789/blob/master/ST7789/ST7789.py#L204

#if 0 is https://stackoverflow.com/questions/2852913/what-exactly-does-an-if-0-endif-block-do .
Fbcp-ili9341 specifies the command-data sequences as strings on one line. The first character is the command byte, and the subsequent characters are the data bytes. E.g.
https://github.com/juj/fbcp-ili9341/blob/662e8db76ba16d86cf6fd09d85240adc19e62735/st7735r.cpp#L39
is the same as
https://github.com/solinnovay/Python_ST7789/blob/9da7aecdfb81cc46e881fe15bd12d39e0aa42e95/ST7789/ST7789.py#L215-216

ok,
thanks for link to explanation #if 0 -> commented out the C-Way. all right.
my display seems to need a sequence. i can fiddle in my code-files and report if it works.
but that my be not a professional way to get it into your codebase.
i will report success/fail and than you can see if you want to make this an -DST or --Option?

i tried to port only the hex-binary init-sequence from the python-lib to a place in the .cpp init (all at random place, i guess), but it did not work out yet.
dont know if the SPI must somehow initialized...
dont know if the python-send routine for the commands is different...
still trying to get it in order...
void InitST7735R()
{
// python lib does it like this:
//SPI_MODE = 0b11
//SPI_SPEED_HZ = 40000000
//disp = TFT.ST7789(spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE, max_speed_hz=SPI_SPEED_HZ),mode=SPI_MODE, rst=RST, dc=DC, led=LED)

// python lib init:
//# Initialize display.
//disp.begin()

// python lib init drives this:
//
//# Turn on the backlight LED
//self._gpio.setup(led, GPIO.OUT)
//self._gpio.setup(led, GPIO.HIGH)
//
//# Set SPI to mode 0, MSB first.
//
//spi.set_mode(mode)
//spi.set_bit_order(SPI.MSBFIRST)
//spi.set_clock_hz(SPI_CLOCK_HZ)

// testing TFT disply 7 pin without CS
//disp.begin() == disp.reset, disp.ini

// disp.reset
/*
"""Reset the display, if reset pin is connected."""
        if self._rst is not None:
            self._gpio.set_high(self._rst)
            time.sleep(0.100)
            self._gpio.set_low(self._rst)
            time.sleep(0.100)
            self._gpio.set_high(self._rst)
            time.sleep(0.100)
*/

  // If a Reset pin is defined, toggle it briefly high->low->high to enable the device. Some devices do not have a reset pin, in which case compile with GPIO_TFT_RESET_PIN left undefined.
#if defined(GPIO_TFT_RESET_PIN) && GPIO_TFT_RESET_PIN >= 0
  printf("Resetting display at reset GPIO pin %d\n", GPIO_TFT_RESET_PIN);
  SET_GPIO_MODE(GPIO_TFT_RESET_PIN, 1);
  SET_GPIO(GPIO_TFT_RESET_PIN);
  usleep(120 * 1000);
  CLEAR_GPIO(GPIO_TFT_RESET_PIN);
  usleep(120 * 1000);
  SET_GPIO(GPIO_TFT_RESET_PIN);
  usleep(120 * 1000);
#endif

// Do the initialization with a very low SPI bus speed, so that it will succeed even if the bus speed chosen by the user is too high.
spi->clk = 34;
__sync_synchronize();

    // TODO: ST7789 Python example
    // disp.init:

    printf("sending pythonlib init..");

    usleep(10 * 1000);  // usleep is microseconds, should be python (fragment of seconds=miliseconds): time.sleep(0.010). right?
    SPI_TRANSFER(0x11);
    usleep(150 * 1000); // usleep is microseconds, should be python: time.sleep(0.150). right?  ?? is timing critial?

    SPI_TRANSFER(0x36, 0x00);
    SPI_TRANSFER(0x3A, 0x05);

    SPI_TRANSFER(0xB2, 0x0C, 0x0C);
    SPI_TRANSFER(0xB7, 0x35);
    SPI_TRANSFER(0xBB, 0x1A);

    SPI_TRANSFER(0xC0, 0x2C);
    SPI_TRANSFER(0xC2, 0x01);
    SPI_TRANSFER(0xC3, 0x0B);
    SPI_TRANSFER(0xC4, 0x20);
    SPI_TRANSFER(0xC6, 0x0F);

    SPI_TRANSFER(0xd0, 0xa4, 0xa1);

    SPI_TRANSFER(0x21);

    SPI_TRANSFER(0xe0, 0x00, 0x19, 0x1E, 0x0A, 0x09, 0x15, 0x3D, 0x44, 0x51, 0x12, 0x03, 0x00, 0x3F, 0x3F);
    SPI_TRANSFER(0x00, 0x18, 0x1E, 0x0A, 0x09, 0x25, 0x3F, 0x3f, 0x43, 0x52, 0x33, 0x03, 0x00, 0x3F, 0x3F);
    //SPI_TRANSFER(0x21);
    //SPI_TRANSFER(0x11);
    SPI_TRANSFER(0x29);
    usleep(100 * 1000);   // python: time.sleep(0.100) # 100 ms  // python ms=miliseconds--> "C"= ulseep microseconds * 1000 ??

    printf("sending pythonlib init end");

}

Still fails to init
tried to sort it with fiddling, but still only python init works.

made a fresh checkout
changed only your init-suggestions for st7735r.cpp (see image 1 )
cleared build-dir always with rm -r *
compiled always with  cmake -DST7789=ON -DSTATISTICS=0 -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DGPIO_TFT_BACKLIGHT=27 -DSPI_BUS_CLOCK_DIVISOR=20 -DUSE_DMA_TRANSFERS=OFF ..

😢 fail: fbcp-ili9341 works only after previous init with the python-lib.
🔈  (it fails, if i do the init again. i can end and start fcbp-ili9341 executable without error and its working, but all stops if i do the python-init again)
Question of a NOOB:
Differences in python? --> see image2

maybe the python-lib sends mode 3  for success  (whats this mode? needed?) ?
maybe the python-lib sends bit_order for success (how to do this?) ?

How do i test further to get the right init commands copied over from the python-lib?
any clue? thanks for every hint....
i am out of luck for today...
IMAGE 1:
https://github.com/juj/fbcp-ili9341/blob/master/st7735r.cpp#L10

IMAGE2:
https://github.com/solinnovay/Python_ST7789/blob/master/ST7789/ST7789.py#L164

Huuu, whats this?
May the Fork has dark Powers?

no initialize with fbcp-ili9341
i tried your first suggestion without success. 😢

i tried the change from the fork without success. 😢

👍  running fbcp-ili9341 after the python init works alltimes fine.
than the display shows always framebuffer content.
😕 my last clue is that is something with 1) spi-mode. 2) spi_clock/timing or 3) DC-settings while commands.
dont know how to test this....

digged the internet, another fork seems again to have patches for my display...
(but i am to dull how to make this working.)

so i googled and found, that my display needs SPI mode 3 !!!!!!
how to set SPI mode to 3?

thats the end of my google wisdom.
and the end for today.
i dont see how to set mode 3 like this on SPI in your code....

Interesting find, that might be the reason. To configure SPI mode 3, you can add
#define DISPLAY_SPI_DRIVE_SETTINGS (1 | BCM2835_SPI0_CS_CPOL | BCM2835_SPI0_CS_CPHA)

in e.g. after line
https://github.com/juj/fbcp-ili9341/blob/662e8db76ba16d86cf6fd09d85240adc19e62735/st7735r.h#L16
Or alternatively replace this line:
https://github.com/juj/fbcp-ili9341/blob/662e8db76ba16d86cf6fd09d85240adc19e62735/display.h#L83

you shed a light of hope...i will try... thx

😿  sadly that all does not help to init the display.
if i configure SPImode=3 like suggestest, stopping the fbi-ili9341 executable breaks the display showing up again with the ext start.
if i compile without #define DISPLAY_SPI_DRIVE_SETTINGS (1 | BCM2835_SPI0_CS_CPOL | BCM2835_SPI0_CS_CPHA)i can start and stop the fbi... executable and the display always shows the frambuffer content.
STILL 😢 i do have to init the display with the python code first, to show anything on fb.
as a noob, i am now out of ideas to test (speed/SPI-speed/ clock, order of init-cmds?...dont know..

SCK line must be driven high ?
as it does not work with code for SPImode=3, do this all need more code change?
its above my understanding of SPI, but may you get a clue for something i can test?
more on this here, very interesting:
https://github.com/Bodmer/TFT_eSPI/issues/163#issuecomment-515667488
A gotcha... The ST7789 is unusual, it is operated in SPI Mode 3, so the SCK line must be driven high when you do not wish to communicate with the TFT, otherwise an extra clock pulse will be introduced and that will mess up the next command.
maybe the spi-cmds on init fails, for this reason?
if is not working for missing CS (who knows?), some crazy guy broke this out.
it my type of display...
https://www.instructables.com/Adding-CS-Pin-to-13-LCD/

still deperate looking or a solution with my limit knowledge,
i compared the adafruit init with the python init for the st7789 and found differences in cmd for resolution (0x55 vs 0x05)
and i dont know how to transfer cmds for dimension to SPI_TRANSFERS....
(sidenote: my fragment of the adafruit init did not resolve the problem)

A gotcha... The ST7789 is unusual, it is operated in SPI Mode 3, so the SCK line must be driven high when you do not wish to communicate with the TFT, otherwise an extra clock pulse will be introduced and that will mess up the next command.
maybe the spi-cmds on init fails, for this reason?

That is what Mode 3 means. Having BCM2835_SPI0_CS_CPOL present in DISPLAY_SPI_DRIVE_SETTINGS is what flips the Serial CLock signal line to be driven high when communicating with the display.

if is not working for missing CS (who knows?), some crazy guy broke this out.

The fact that the display works with any driver at all definitely means that the display does not need a Chip Select line. Lacking a CS line will just mean that you cannot connect a second SPI display or other device, like touch controller, on the same line.

i compared the adafruit init with the python init for the st7789 and found differences in cmd for resolution (0x55 vs 0x05)

Both 0x05 and 0x55 should result in the same 16-bit 64KB color format for SPI displays. Iiuc the high nybble is only in effect when using the RGB color mode of the interface. According to the data sheet:

No harm to pass 0x55 there though to reduce a source of differences.
The CASET and RASET commands are not part of the initialization sequence. They are sent hundreds of times per frame at display runtime when uploading pixel commands. If you did not do any other modifications to fbcp-ili9341 except to remove all the init code when you got it working, then it means that fbcp-ili9341 is successfully sending the CASET and RASET messages to the display to upload pixels.

now confued using google: i found a different init-sequence:
https://www.newhavendisplay.com/app_notes/2-4TFT_ST7789.txt
i crosschecked some slight differenences, but my python-init still works.
at the moment i will stick with it, because i dont know the starting cause and if (only) changing the init will help...
for reference:
void TFT_24_7789_Init(void)
{
int n;
GPIO_ResetBits(GPIOC, CS1);
GPIO_SetBits(GPIOC, nRD);
GPIO_ResetBits(GPIOC, nWR);
GPIO_WriteBit(GPIOC, RES, Bit_RESET);
TFT_delay(100);
GPIO_WriteBit(GPIOC, RES, Bit_SET);
TFT_delay(100);
TFT_24_7789_Write_Command(0x0011);//exit SLEEP mode
TFT_delay(100);

TFT_24_7789_Write_Command(0x0036);TFT_24_7789_Write_Data(0x0080);//MADCTL: memory data access control
TFT_24_7789_Write_Command(0x003A);TFT_24_7789_Write_Data(0x0066);//COLMOD: Interface Pixel format *** I use 262K-colors in 18bit/pixel format when using 8-bit interface to allow 3-bytes per pixel
//TFT_24_7789_Write_Command(0x003A);TFT_24_7789_Write_Data(0x0055);//COLMOD: Interface Pixel format  *** I use 65K-colors in 16bit/pixel (5-6-5) format when using 16-bit interface to allow 1-byte per pixel
TFT_24_7789_Write_Command(0x00B2);TFT_24_7789_Write_Data(0x000C);TFT_24_7789_Write_Data(0x0C);TFT_24_7789_Write_Data(0x00);TFT_24_7789_Write_Data(0x33);TFT_24_7789_Write_Data(0x33);//PORCTRK: Porch setting
TFT_24_7789_Write_Command(0x00B7);TFT_24_7789_Write_Data(0x0035);//GCTRL: Gate Control
TFT_24_7789_Write_Command(0x00BB);TFT_24_7789_Write_Data(0x002B);//VCOMS: VCOM setting
TFT_24_7789_Write_Command(0x00C0);TFT_24_7789_Write_Data(0x002C);//LCMCTRL: LCM Control
TFT_24_7789_Write_Command(0x00C2);TFT_24_7789_Write_Data(0x0001);TFT_24_7789_Write_Data(0xFF);//VDVVRHEN: VDV and VRH Command Enable
TFT_24_7789_Write_Command(0x00C3);TFT_24_7789_Write_Data(0x0011);//VRHS: VRH Set
TFT_24_7789_Write_Command(0x00C4);TFT_24_7789_Write_Data(0x0020);//VDVS: VDV Set
TFT_24_7789_Write_Command(0x00C6);TFT_24_7789_Write_Data(0x000F);//FRCTRL2: Frame Rate control in normal mode
TFT_24_7789_Write_Command(0x00D0);TFT_24_7789_Write_Data(0x00A4);TFT_24_7789_Write_Data(0xA1);//PWCTRL1: Power Control 1
TFT_24_7789_Write_Command(0x00E0);TFT_24_7789_Write_Data(0x00D0);
								  TFT_24_7789_Write_Data(0x0000);
								  TFT_24_7789_Write_Data(0x0005);
								  TFT_24_7789_Write_Data(0x000E);
								  TFT_24_7789_Write_Data(0x0015);
								  TFT_24_7789_Write_Data(0x000D);
								  TFT_24_7789_Write_Data(0x0037);
								  TFT_24_7789_Write_Data(0x0043);
								  TFT_24_7789_Write_Data(0x0047);
								  TFT_24_7789_Write_Data(0x0009);
								  TFT_24_7789_Write_Data(0x0015);
								  TFT_24_7789_Write_Data(0x0012);
								  TFT_24_7789_Write_Data(0x0016);
								  TFT_24_7789_Write_Data(0x0019);//PVGAMCTRL: Positive Voltage Gamma control
TFT_24_7789_Write_Command(0x00E1);TFT_24_7789_Write_Data(0x00D0);
								  TFT_24_7789_Write_Data(0x0000);
								  TFT_24_7789_Write_Data(0x0005);
								  TFT_24_7789_Write_Data(0x000D);
								  TFT_24_7789_Write_Data(0x000C);
								  TFT_24_7789_Write_Data(0x0006);
								  TFT_24_7789_Write_Data(0x002D);
								  TFT_24_7789_Write_Data(0x0044);
								  TFT_24_7789_Write_Data(0x0040);
								  TFT_24_7789_Write_Data(0x000E);
								  TFT_24_7789_Write_Data(0x001C);
								  TFT_24_7789_Write_Data(0x0018);
								  TFT_24_7789_Write_Data(0x0016);
								  TFT_24_7789_Write_Data(0x0019);//NVGAMCTRL: Negative Voltage Gamma control
TFT_24_7789_Write_Command(0x002A);TFT_24_7789_Write_Data(0x0000);TFT_24_7789_Write_Data(0x0000);TFT_24_7789_Write_Data(0x0000);TFT_24_7789_Write_Data(0x00EF);//X address set
TFT_24_7789_Write_Command(0x002B);TFT_24_7789_Write_Data(0x0000);TFT_24_7789_Write_Data(0x0000);TFT_24_7789_Write_Data(0x0001);TFT_24_7789_Write_Data(0x003F);//Y address set

TFT_delay(10);
}

uhh sorry, i did not notice your posting... thanks for still giving me some feedback

If you did not do any other modifications to fbcp-ili9341 except to remove all the init code when you got it working, then it means that fbcp-ili9341 is successfully sending the CASET and RASET messages to the display to upload pixels.

yes, i am only fiddling with the init code in fbcp-ili9341 st7735r.cpp....but nothing helps.
after a reboot i still first need the python code , after that i can start tie fbcp-i..executable and the display shows up.
my goal was to only run the compiled fbcp...executable to show the framebuffer on the tft.
up to now: no luck.
but i can reproduce the sequence with python and the compiled executable to get working tft-display.
i am bit lost in space, and still think hopefully only the init-sequence in st7735r.cpp must be tewaked?

thats what i have at the minute:
void InitST7735R()
{

BEGIN_SPI_COMMUNICATION();

#if 0
printf("start adafruitlib init..\n");

// sequence from adafruit lib: https://github.com/adafruit/Adafruit-ST7735-Library/blob/master/Adafruit_ST7789.cpp
// 9 cmds:
SPI_TRANSFER(0x01/*Software Reset*/);  // needed?
usleep(150 * 1000);
SPI_TRANSFER(0x11);  //SPI_TRANSFER(0x11/*Sleep Out*/)
usleep(10 * 1000);
SPI_TRANSFER(0x3A, 0x55);  //SPI_TRANSFER(0x3A/*COLMOD: Pixel Format Set*/, 0x05/*16bpp*/);   on python 0x05, on dafruit 0x55!!
usleep(10 * 1000);
SPI_TRANSFER(0x36, 0x08);  //SPI_TRANSFER(0x36/*MADCTL: Memory Access Control*/, madctl);  on python: 0x00
//SPI_TRANSFER(0x2A, 0x00,0,0,240);  //SPI_TRANSFER(0x36/*MADCTL: Memory Access Control*/, madctl);  on python: 0x00
//SPI_TRANSFER(0x2B, 0x00,0,320>>8,320&0xFF);  //SPI_TRANSFER(0x36/*MADCTL: Memory Access Control*/, madctl);  on python: 0x00
SPI_TRANSFER(0x21);  //SPI_TRANSFER(0x21/*Display Inversion On*/);
usleep(10 * 1000);
SPI_TRANSFER(0x13/*NORON: Partial off (normal)*/);
usleep(10 * 1000);
SPI_TRANSFER(0x29);
usleep(10 * 1000);

printf("end  adafruitlib init..\n");
#endif

// disp.init (python-lib):
printf("start pythonlib init..\n");

//not from python, worth a try. seems to brake something

//SPI_TRANSFER(0xFD/Set Command Lock/, 0x12);
//SPI_TRANSFER(0xFD/Set Command Lock/, 0xB1);

//SPI_TRANSFER(0x01/*Software Reset*/);  // needed?

usleep(10 * 1000);  // usleep is microseconds, should be python (fragment of seconds=miliseconds): time.sleep(0.010). right?
SPI_TRANSFER(0x11);  //SPI_TRANSFER(0x11/*Sleep Out*/)
usleep(150 * 1000); // usleep is microseconds, should be python: time.sleep(0.150). right?  ?? is timing critial?

//SPI_TRANSFER(0x13/*NORON: Partial off (normal)*/);
//SPI_TRANSFER(0x26/*Gamma Curve Select*/, 0x04/*Gamma curve 3 (2.5x if GS=1, 2.2x otherwise)*/);

SPI_TRANSFER(0x36, 0x00);  //SPI_TRANSFER(0x36/*MADCTL: Memory Access Control*/, madctl);
//SPI_TRANSFER(0x37/*VSCSAD: Vertical Scroll Start Address of RAM*/, 0, 320 - DISPLAY_WIDTH);
SPI_TRANSFER(0x3A, 0x05);  //SPI_TRANSFER(0x3A/*COLMOD: Pixel Format Set*/, 0x05/*16bpp*/);

//SAM SPI_TRANSFER(0xA0/*Set Remap*/, 0x34/*0x04=BGR<->RGB Swap | 0x10=Vertical swap | 0x20=Enable COM split odd even (this makes pixel addressing sane as one'd expect)*/);
//SPI_TRANSFER(0xA0/*Set Remap*/, 0x74/*0x04=BGR<->RGB Swap | 0x10=Vertical swap | 0x20=Enable COM split odd even (this makes pixel addressing sane as one'd expect)*/);

//SPI_TRANSFER(0xA1/*Set Display Start Line*/, 0);
//SPI_TRANSFER(0xA1/*Set Display Start Line*/, 128);

//SPI_TRANSFER(0xA2/*Set Display Offset*/, 0);
//SPI_TRANSFER(0xAB/*Set Function Select*/, 0x01/*16bpp colors*/);
//SPI_TRANSFER(0xB5/*Set GPIO0 and GPIO1 pin*/, 0);

//SPI_TRANSFER(0xAE/Sleep Mode On (Display OFF)/);

SPI_TRANSFER(0xB2, 0x0C, 0x0C); //PORCTRK: Porch setting
//SPI_TRANSFER(0xB3/*Set Front Clock Divider/Oscillator Frequency*/, 0xF1/*Divide Ratio=1, Oscillator Frequency=0xF*/); // This controls frame rate -> set to fastest
SPI_TRANSFER(0xB7, 0x35);   //GCTRL: Gate Control
//SPI_TRANSFER(0xBA/*DGMEN: Enable Gamma*/, 0x04);
SPI_TRANSFER(0xBB, 0x1A); //data(0x002B);//VCOMS: VCOM setting

SPI_TRANSFER(0xC0, 0x2C); //LCMCTRL: LCM Control
SPI_TRANSFER(0xC2, 0x01); // 00C2);TFT_24_7789_Write_Data(0x0001);TFT_24_7789_Write_Data(0xFF) //VDVVRHEN: VDV and VRH Command Enable
SPI_TRANSFER(0xC3, 0x0B);  //_Data(0x0011);//VRHS: VRH Set
SPI_TRANSFER(0xC4, 0x20);//VDVS: VDV Set
SPI_TRANSFER(0xC6, 0x0F); //FRCTRL2: Frame Rate control in normal mode

//SAM SPI_TRANSFER(0xCA/*Set Multiplex Ratio*/, 95); // This effectively sets the pixel height of the display, set this to 127 for 128x128 OLED, and to 95 for 128x96 OLED. It looks like even the 128x96 OLED has 128x128 bytes worth of internal memory (for hardware scrolling?)
//SPI_TRANSFER(0xCA/*Set Multiplex Ratio*/, 127); // This effectively sets the pixel height of the display, set this to 127 for 128x128 OLED, and to 95 for 128x96 OLED. It looks like even the 128x96 OLED has 128x128 bytes worth of internal memory (for hardware scrolling?)

SPI_TRANSFER(0xD0, 0xa4, 0xa1); ;//PWCTRL1: Power Control 1

SPI_TRANSFER(0x21);  //SPI_TRANSFER(0x21/*Display Inversion On*/);

SPI_TRANSFER(0xE0, 0x00, 0x19, 0x1E, 0x0A, 0x09, 0x15, 0x3D, 0x44, 0x51, 0x12, 0x03, 0x00, 0x3F, 0x3F);
SPI_TRANSFER(0xE1, 0x00, 0x18, 0x1E, 0x0A, 0x09, 0x25, 0x3F, 0x43, 0x52, 0x33, 0x03, 0x00, 0x3F, 0x3F);
//SPI_TRANSFER(0x21);
//SPI_TRANSFER(0x11);
SPI_TRANSFER(0x29);
usleep(100 * 1000);   // python: time.sleep(0.100) # 100 ms  // python ms=miliseconds--> "C"= ulseep microseconds * 1000 ??

printf("end  pythonlib init end\n");

#if defined(GPIO_TFT_BACKLIGHT) && defined(BACKLIGHT_CONTROL)
    printf("Setting TFT backlight on at pin %d\n", GPIO_TFT_BACKLIGHT);
    SET_GPIO_MODE(GPIO_TFT_BACKLIGHT, 0x01); // Set backlight pin to digital 0/1 output mode (0x01) in case it had been PWM controlled
    SET_GPIO(GPIO_TFT_BACKLIGHT); // And turn the backlight on.

//test
printf("BL off\n");
CLEAR_GPIO(GPIO_TFT_BACKLIGHT); // And turn the backlight on.
usleep(100 * 1000);

printf("BL on\n");
SET_GPIO(GPIO_TFT_BACKLIGHT); // And turn the backlight on.
usleep(100 * 1000);

printf("BL off\n");
CLEAR_GPIO(GPIO_TFT_BACKLIGHT); // And turn the backlight on.
usleep(100 * 1000);

printf("BL on\n");
SET_GPIO(GPIO_TFT_BACKLIGHT); // And turn the backlight on.
usleep(100 * 1000);

#endif

ClearScreen();

#ifndef USE_DMA_TRANSFERS // For DMA transfers, keep SPI CS & TA active.
  END_SPI_COMMUNICATION();
#endif
}

out of ideas, again.  😭
What works:

/boot/config.txt dtparam=spi=on
init the display with solinnovay-python lib

#!/usr/bin/env python
# -*- coding: utf-8 -*-

#import Adafruit_GPIO as GPIO
import Adafruit_GPIO.SPI as SPI

# test  visual studio save!

import sys
sys.path.append('/usr/src/Python_ST7789/ST7789')

import ST7789 as TFT
#import datetime
#from time import sleep

#from PIL import Image, ImageDraw, ImageFont, ImageColor

#import numpy as np

# Raspberry Pi pin configuration:
RST = 25
DC  = 24
LED = 27
SPI_PORT = 0
SPI_DEVICE = 0
SPI_MODE = 0b11             // binary 0b11 ==  dezimal=3 ??
SPI_SPEED_HZ = 40000000

disp = TFT.ST7789(spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE, max_speed_hz=SPI_SPEED_HZ),mode=SPI_MODE, rst=RST, dc=DC, led=LED)

# Initialize display.
print('disp.begin...')
#disp.begin()
disp.begin()

# Clear display.
print('disp.clear...')
disp.clear()

print('sys.exit ...')
sys.exit()

run fbcp-ili9341

can stop and start the executabele repeatedly when unchanged fbcp-ili9342 code for
#define DISPLAY_SPI_DRIVE_SETTINGS
config.txt has  dtparam=spi=on   , needed for python -init first

start/stop/start... works only one time with spi-mode 3 in st7734.h
#define DISPLAY_SPI_DRIVE_SETTINGS (1 | BCM2835_SPI0_CS_CPOL | BCM2835_SPI0_CS_CPHA)
does no also not work standalone when config. txt has no dtparam=spi=on .😕

did always hard-reset between tests and compile with:
cmake -DST7789=ON -DSTATISTICS=0 -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DGPIO_TFT_BACKLIGHT=27 -DSPI_BUS_CLOCK_DIVISOR=20 -DUSE_DMA_TRANSFERS=OFF .. && make -j

tested the init of TFT_eSPI for ST7789_2, but also fails to init the display.

SPI_TRANSFER(0x11);  //SPI_TRANSFER(0x11/*Sleep Out*/)
usleep(150 * 1000);
usleep(250 * 1000);
SPI_TRANSFER(0x3A, 0x55);  //SPI_TRANSFER(0x3A/*COLMOD: Pixel Format Set*/, 0x05/*16bpp*/);   on python 0x05, on dafruit 0x55!!
usleep(10 * 1000);
SPI_TRANSFER(0x36, 0x00);
SPI_TRANSFER(0x2A, 0x00,0x00,0x00,0xF0);  //SPI_TRANSFER(0x36/*MADCTL: Memory Access Control*/, madctl);  on python: 0x00
SPI_TRANSFER(0x2B, 0x00,0x00,0x00,0xF0);  //SPI_TRANSFER(0x36/*MADCTL: Memory Access Control*/, madctl);  on python: 0x00
SPI_TRANSFER(0x21);  //SPI_TRANSFER(0x21/*Display Inversion On*/);
usleep(10 * 1000);
SPI_TRANSFER(0x13/*NORON: Partial off (normal)*/);
usleep(10 * 1000);
SPI_TRANSFER(0x29);
usleep(150 * 1000);
usleep(250 * 1000);

printf("end bodmer TFT eSPI init..\n");

Conclusion:

init-sequence commands not that important, or wrong? or incomplete?
must be some other timing? SPI timing or sequence timing?
any other setting is relevant ? SPI start/stop ? SPI speed?...
what can i test with my limited knowledge?

Help needed: Python works, Why?
why does the python-lib init the display correct, so that afterwards the fbcp-ili9341 excecutable can display the FB ?
any idea for another test?

Success. it runs!
(details following: gues SPI mode 3 and RESET in init has done the trick)

only SPI-mode=3 does the trick.
i fiddeld too much with code,
i did a new checkout and changed only this:

#define DISPLAY_SPI_DRIVE_SETTINGS (1 | BCM2835_SPI0_CS_CPOL | BCM2835_SPI0_CS_CPHA)

in https://github.com/juj/fbcp-ili9341/blob/662e8db76ba16d86cf6fd09d85240adc19e62735/st7735r.h#L16
like you suggested before(https://github.com/juj/fbcp-ili9341/issues/178#issuecomment-748534058).
Gotcha. Succes.

Hey, that is great to hear!
Made a TODO to make that a build option. It seems that different instances of the same controller out there may need to use a different SPI mode. So far my experience had been that if one had a certain type of controller (ILI9341, ILI9486, ST7789, etc.), it would always dictate which SPI mode was needed, but this is the first scenario that shows that it is not so: your display with ST7789 needs SPI mode 3, whereas my display with ST7789 needs SPI mode 0.  Interesting.
I'll close this bug out when I have that implementation available.

Your help was indispensable and great. thanx a lot.
Great to hear to you mantainance the code and build this option. realy great.
there are some people out on the internet with this kind of display, but lost. may they find the buildoption.
the maintainer of the TFT_eSPI has also build option for the SPI-Mode=3 variant as a second ST7789 = ST7789_2
maybe it is of helpt to have a similar naming convention?
https://github.com/Bodmer/TFT_eSPI/blob/master/TFT_Drivers/ST7789_2_Init.h
🤝

now playing around to get a 3d-printed frame around the eye 😄

Hey @ozett! Thanks for collaborating with @juj to solve this issue! I'm sorting through this issue myself (I have the same components you do and am experiencing the same issue)
Quick question if you have a moment! Just want to make sure I wired everything up correctly, if you can confirm you have similarly wired everything up.
(For reference all of the Raspberry Pi pins I list will be the physical pins)

Raspberry PI
Display

6
GND

13
BLK

15
RES

17
VCC

18
DC

19
SDA

21
SCL

If possible, could you also provide the solution you used to get it working? Apologies, I'm having a tough time parsing it out from the comments (I'm bad at reading :joy: )
THANKS!! :tada:

Hey @ozett! Thanks for collaborating with @juj to solve this issue! I'm sorting through this issue myself (I have the same components you do and am experiencing the same issue)
Quick question if you have a moment! Just want to make sure I wired everything up correctly, if you can confirm you have similarly wired everything up.
(For reference all of the Raspberry Pi pins I list will be the physical pins)

Raspberry PI
Display

6
GND

13
BLK

15
RES

17
VCC

18
DC

19
SDA

21
SCL

If possible, could you also provide the solution you used to get it working? Apologies, I'm having a tough time parsing it out from the comments (I'm bad at reading :joy: )
THANKS!! :tada:

colors or your wiring are hard see.
code:
checkout github code already?
than you added only this:

#define DISPLAY_SPI_DRIVE_SETTINGS (1 | BCM2835_SPI0_CS_CPOL | BCM2835_SPI0_CS_CPHA)

after that line in https://github.com/juj/fbcp-ili9341/blob/662e8db76ba16d86cf6fd09d85240adc19e62735/st7735r.h#L16
like the DEVeloper suggested before(https://github.com/juj/fbcp-ili9341/issues/178#issuecomment-748534058).
Wiring is other than yours, this is mine:

your wiring
your wiring is different.
you must use the gpio-number from your wiring in the compile comand:
got to your source-path (like readme.md describes):
root@raspberrypi:/usr/src/fbcp-ili9341/build#

and compile with your gpio-pin-nr.
cmake -DST7789VW=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DGPIO_TFT_BACKLIGHT=27 -DSTATISTICS=0 -DSPI_BUS_CLOCK_DIVISOR=40 -DUSE_DMA_TRANSFERS=OFF ..

todo:
check your the gpio-numbers of your pins and use the correct ones in the compile-command.
maybe use a helper like this:

colors or your wiring are hard see.
code:
checkout github code already?
than you added only this:

#define DISPLAY_SPI_DRIVE_SETTINGS (1 | BCM2835_SPI0_CS_CPOL | BCM2835_SPI0_CS_CPHA)

after that line in https://github.com/juj/fbcp-ili9341/blob/662e8db76ba16d86cf6fd09d85240adc19e62735/st7735r.h#L16
like the DEVeloper suggested before(https://github.com/juj/fbcp-ili9341/issues/178#issuecomment-748534058).
Wiring is other than yours, this is mine:

your wiring
your wiring is different.
you must use the gpio-number from your wiring in the compile comand:
got to your source-path (like readme.md describes):
root@raspberrypi:/usr/src/fbcp-ili9341/build#

and compile with your gpio-pin-nr.
cmake -DST7789VW=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DGPIO_TFT_BACKLIGHT=27 -DSTATISTICS=0 -DSPI_BUS_CLOCK_DIVISOR=40 -DUSE_DMA_TRANSFERS=OFF ..

todo:
check your the gpio-numbers of your pins and use the correct ones in the compile-command.
maybe use a helper like this:

Thank you!! 😁

Thank you!! 😁

Update
SUCCESS
:tada: :tada: :tada: :tada: :tada: :tada:
That was it, 100%.
After adding that line and re-wiring it to your photo with your wiring it began to work!
Thank youuuuuuuuuuuuuuuuuuu! :tada: :confetti_ball:
:tada: :confetti_ball: :tada: :confetti_ball: :tada: :confetti_ball: :tada: :confetti_ball: :tada: :confetti_ball:
Best way to start a monday morning

Update
SUCCESS
:tada: :tada: :tada: :tada: :tada: :tada:
That was it, 100%.
After adding that line and re-wiring it to your photo with your wiring it began to work!
Thank youuuuuuuuuuuuuuuuuuu! :tada: :confetti_ball:
:tada: :confetti_ball: :tada: :confetti_ball: :tada: :confetti_ball: :tada: :confetti_ball: :tada: :confetti_ball:
Best way to start a monday morning

Famtastic to see in picture that you got it working!
Was a pleasure to help. Cheers 👋

Famtastic to see in picture that you got it working!
Was a pleasure to help. Cheers 👋

I have 2 of these displays so thank you guys so much for this!

I have 2 of these displays so thank you guys so much for this!

@james1236 were you able to get output to 2 screens?? Or do you just have 2 screens haha
Just thought I'd ask, that sounds like a pretty sweet setup if you have output to 2 screens.

@james1236 were you able to get output to 2 screens?? Or do you just have 2 screens haha
Just thought I'd ask, that sounds like a pretty sweet setup if you have output to 2 screens.

@james1236 were you able to get output to 2 screens?? Or do you just have 2 screens haha
Just thought I'd ask, that sounds like a pretty sweet setup if you have output to 2 screens.

Just one screen at a time, I have 2 screens that looked a bit different so them both working was a surprise

@james1236 were you able to get output to 2 screens?? Or do you just have 2 screens haha
Just thought I'd ask, that sounds like a pretty sweet setup if you have output to 2 screens.

Just one screen at a time, I have 2 screens that looked a bit different so them both working was a surprise

@james1236 were you able to get output to 2 screens?? Or do you just have 2 screens haha
Just thought I'd ask, that sounds like a pretty sweet setup if you have output to 2 screens.

Just one screen at a time, I have 2 screens that looked a bit different so them both working was a surprise

Gotcha! Haha awesome!

@james1236 were you able to get output to 2 screens?? Or do you just have 2 screens haha
Just thought I'd ask, that sounds like a pretty sweet setup if you have output to 2 screens.

Just one screen at a time, I have 2 screens that looked a bit different so them both working was a surprise

Gotcha! Haha awesome!


Invalid argument supplied for foreach()

Hello,
I got this error "Invalid argument supplied for foreach()" when I am trying to foreach results
this is a code
$results = Cartalyst\Sentinel\Users\EloquentUser::search('arina');
if (is_array($results)) {
    foreach ($results as $result) {
        foreach ($result as $a) {
            $name = $a['full_name'];
        }
    }
}

@maxiloc Please, if you can help me.

@Mohamed-Zedan What are you trying to do ?

@maxiloc Thanks for your response.
am trying to get and display the results, Is this true ?

It should more looks something like:
$results = Cartalyst\Sentinel\Users\EloquentUser::search('arina');
if (is_array($results)) {
    foreach ($results as $result) {
        var_dump($result);
    }
}

@maxiloc Ok this returns this:
array:3 [▼
  0 => array:20 [▼
    "id" => 3
    "email" =><EMAIL_ADDRESS>    "password" => "$2y$10$rG9GCRHQw1WPOjFv4b3qL.QkgF7jFQ8U.q6V7VDuLUw5mK7HNrJzS"
    "permissions" => []
    "last_login" => array:3 [▶]
    "first_name" => "Arina"
    "last_name" => "Systems"
    "full_name" => "Arina Systems"
    "birthDay" => "1996-03-26"
    "birthPlace" => "Egypt"
    "gender" => "Female"
    "address" => "2 El Fawakeh St., next to Mostafa Mahmoud Mosque"
    "phone" => "+2010000936782"
    "national_id" => "29404118800359"
    "idProof" => "system/users/IDs/29404118800357.jpg"
    "image" => "system/users/pp/29404118800357.jpg"
    "created_at" => "2015-12-22 20:35:37"
    "updated_at" => "2016-01-25 14:38:56"
    "objectID" => "3"
    "_highlightResult" => array:6 [▶]
  ]
  1 => array:20 [▼
    "id" => 2
    "email" =><EMAIL_ADDRESS>    "password" => "$2y$10$F8/3Og1nnBoebvB4O7fLHOp.F1txUNmujQ8LSInyK6SNDpqEDaIfm"
    "permissions" => []
    "last_login" => "2016-01-25 03:20:28"
    "first_name" => "Salma"
    "last_name" => "ElsaadaNy"
    "full_name" => "Salma ElsaadaNy"
    "birthDay" => "1996-03-26"
    "birthPlace" => "Egypt"
    "gender" => "Female"
    "address" => "2 El Fawakeh St., next to Mostafa Mahmoud Mosque"
    "phone" => "+2010000936781"
    "national_id" => "29404118800358"
    "idProof" => "system/users/IDs/29404118800357.jpg"
    "image" => "system/users/pp/29404118800357.jpg"
    "created_at" => "2015-12-22 20:35:36"
    "updated_at" => "2016-01-25 03:20:28"
    "objectID" => "2"
    "_highlightResult" => array:6 [▶]
  ]
  2 => array:20 [▼
    "id" => 1
    "email" =><EMAIL_ADDRESS>    "password" => "$2y$10$33ga9yVODaH96o5hWnD7uOgQ3TaXZW/XH9pPDKxnbY5thO7QBQa7."
    "permissions" => []
    "last_login" => "2015-12-30 13:30:24"
    "first_name" => "Mohamed"
    "last_name" => "Zedan"
    "full_name" => "Mohamed Zedan"
    "birthDay" => "1994-04-11"
    "birthPlace" => "Emirates"
    "gender" => "Male"
    "address" => "2 El Fawakeh St., next to Mostafa Mahmoud Mosque"
    "phone" => "+2010000936780"
    "national_id" => "29404118800357"
    "idProof" => "system/users/IDs/29404118800357.jpg"
    "image" => "system/users/pp/29404118800357.jpg"
    "created_at" => "2015-12-22 20:35:36"
    "updated_at" => "2015-12-30 13:30:24"
    "objectID" => "1"
    "_highlightResult" => array:6 [▶]
  ]
]

Now I want to get "full_name" from each array, how I can do this ?

You should do $result["full_name"]. This is working as expected. I am closing this as not an issue of the extension. Feel free to reach support at algolia dot com if you need

Sorry bro @maxiloc , but i really need a help.
If I do this
$results = Cartalyst\Sentinel\Users\EloquentUser::search('arina');
if (is_array($results)) {
    foreach ($results as $result) {
        var_dump($result["full_name"]);
    }
}

I got an error "Undefined index: full_name", because there is no full_name in $result. In $result there are three arrays '0', '1' and '2' needs to foreach again to get a full_name from each array. This is already what you've done: (This is what i am talking about from the beginning )
$results = Cartalyst\Sentinel\Users\EloquentUser::search('arina');
if (is_array($results)) {
    foreach ($results as $result) {
        foreach ($result as $a) {
            $name = $a['full_name'];
        }
    }
}

Please if you can help me ..

I am sorry but:

This is really out of the scope of our support
Github issues are reserved for bug reporting related to the extension

@maxiloc ok thanks


global-copilot-mode uses entire system memory

When I M-x global-copilot-mode,  I run out of system memory.
It essentially spawns .../copilot//dist/agent.js processes until the OOM starts killing off programs.
Annoyingly, for some reason I cannot exit emacs once too many processes are started.
I get error messages like the following:
Lisp nesting exceeds 'max-lisp-eval-depth' and error in process sentinel: Lisp nesting exceeds 'maxlisp-eval-depth'.

I am running
Linux Mint 21.1 Vera
$ node --version
v20.10.0
$ doom --version
GNU Emacs     v27.1            nil
Doom core     v3.0.0-pre       grafted, HEAD -> master, origin/master,
origin/HEAD 03d692f1 2023-12-08 15:11:45 -0500
Doom modules  v23.12.0-pre     grafted, HEAD -> master, origin/master,
origin/HEAD 03d692f1 2023-12-08 15:11:45 -0500

Currently on master branch 1542d76909636bf8804dd9c770f28818a897cfdc, installed with straight. (For the installation I just followed what was written in the README)
To reproduce error

start emacs
M-x global-copilot-mode

Also, no strange behavior when M-x copilot-mode  is run before M-x global-copilot-mode

Using  M-x copilot-mode works just fine. So it's really not an inconvenience and generally copilot works great.
Just thought I'd let you guys know.
Cheers

Has there been any progress on this issue? I'm currently using Doom Emacs. My workaround is as follows:
(use-package! copilot
  :after company
  :hook ((prog-mode . copilot-mode)
         (org-mode . copilot-mode)
         (markdown-mode . copilot-mode))
  :bind (("C-TAB" . 'copilot-accept-completion-by-word)
         ("C-<tab>" . 'copilot-accept-completion-by-word)
         ("C-!" . 'copilot-next-completion)
         :map copilot-completion-map
         ("<tab>" . 'copilot-accept-completion)
         ("TAB" . 'copilot-accept-completion)
         :map company-active-map
         ("<tab>" . 'my/copilot-tab)
         ("TAB" . 'my/copilot-tab)
         :map company-mode-map
         ("<tab>" . 'my/copilot-tab)
         ("TAB" . 'my/copilot-tab))
  :config
  ;; https://github.com/copilot-emacs/copilot.el/issues/226
  ;; (global-copilot-mode)
  (setq! copilot-idle-delay 0.12)
  (setq! copilot-max-char -1)
  (setq! copilot-log-max 10000))

Same problem here, solved it with this change:
(defun copilot-turn-on-unless-buffer-read-only ()
  "Turn on `copilot-mode' if the buffer is writable."
  (unless (or buffer-read-only (not (buffer-file-name (current-buffer))))
    (copilot-mode 1)))

I think the problem is that global-copilot-mode enables copilot-mode in *Messages*, and then starts running on every change in there.

I don't like the idea of an unrestricted global mode for copilot in Emacs. It is too unpredictable.
I would vote for users to set up hooks for copilot mode in whatever buffers they would actually want it in.
Supporting global-copilot-mode will be more effort than it's worth IMO. What do you think @zerolfx ?

@emil-vdw Making breaking changes could be a last resort. Global mode is useful in my view, because it is the default behavior of Copilot in other IDEs.
I know the problem could be complex in Emacs, but how about trying the suggested fix from @rakete?

The problem with @rakete's approach is that the global mode won't be active for buffers without a saved file corresponding to the buffer. This includes buffers just created (like temp.py) but not saved yet.
Another approach would be to not activate when the major mode is special-mode derived or just ban certain modes (like messages-buffer-mode).
In my opinion though, Emacs it would be better to hand craft a set of modes for which global-copilot-mode should activate:
(derived-mode-p
 prog-mode
 Info-mode
 ;; Other modes
 )

But at that point we might as well advise the user to use these hooks in their config for copilot-mode?
The concept of global copilot mode works very well in other editors because they are only text editors. Not including process buffers, web browsers, PDF viewers, etc.

@emil-vdw Thanks for your explanation. It seems having global-copilot-mode could cause many potential problems, and deprecating it is reasonable.

It worked on the peripheral version when I wrote my copilot-turn-on-unless-buffer-read-only, but I encounter the same problem on other machines.
It works on the machine that I have stopped updating elpa.
I wonder how it works.
At any rate, it seems like the right decision to discontinue it before it doesn't work.

I set copilot-mode to text-mode-hook and prog-mode-hook.
I have tried it for about a week and it is good.


Replace binding to setup_aerosol_optics

Replace binding between derived type aerosol_optics_type and
procedure radiation_aerosol_optics_data::setup_aerosol_optics by a
procedure pointer component.
The motivation is to allow the user of ECRad to use and read a NetCDF
file containing aerosol optical properties with a different structure
than data/aerosol_ifs_rrtm_46R1_with_NI_AM.nc.
The procedure radiation_aerosol_optics::setup_aerosol_optics defines
radiation_aerosol_optics_data::setup_aerosol_optics as the default
procedure pointed by config%aerosol_optics%setup. The user of ECRad
can choose another procedure before the call to
radiation_aerosol_optics::setup_aerosol_optics, for example in
ecrad_driver or in radiation_setup::setup_radiation_scheme, by
pointing config%aerosol_optics%setup or
rad_config%aerosol_optics%setup to a custom procedure.

Thank you for your answer.

this feature is incomplete

Yes, you are right, some additional code change (one line actually) is needed, in ecrad_driver for example, to change the loader. If we want to use ECRad online, in a GCM, a line of code also has to be added in the GCM to  change the loader. The point is that this code change is made outside of ECRad. A user can integrate ECRad in a GCM and customize the loader without touching ECRad. Even ecrad_driver can be considered an outer part of ECRad. So for ECRad offline, you might expect the user to customize ecrad_driver.

"if" statements are used ...  I prefer a consistent style

OK, I see what you mean. Of course, "if" statements offer closed choices while the procedure pointer is an open choice. But OK.

this adds code clutter

OK.

It would be helpful to know what features you need that are not supported by the current aerosol optics format.

There is no missing feature, I think, in your NetCDF file. But I found it difficult to read and understand the first time I saw it. Here are the differences with our NetCDF file:

Our file has groups instead of a flat structure.
It has coordinates inside the groups (coordinate: monotonic one-dimensional variable with the same name as its dimension).
The SW bands are in order, as befits a NetCDF coordinate.
Spectral and relative humidity bounds are defined according to the CF convention.
The unused variables, monochromatic single-scattering, asymmetry factor and lidar backscattering are not present.
We do not characterize our aerosol types with a separate character code and a bin number. We do not use min and max radius.

Here it is, if you want to see it. Of course, all these differences are just differences in form, we could adjust our creation process to mimic your NetCDF format. I still think it makes sense to leave input/ouput details open to the user if, as you say, you judge it does not clutter the code.

Thanks for the additional info!  Ultimately this is free software so you are welcome to modify your own version how you like for your own purposes, and as your changes are small you can still merge in any future upgrades of ecRad.  I see the benefit of the procedure pointer approach better now - but I think if I were to apply this then for consistencyI would use it for other things too (solver, cloud optics etc) which will need more thought, and I'd like to know there are other users who need it first.
I agree that the file could be more convention-conforming, and to some extent this could be easily achieved with my newer (simpler) 49r1 format since it works with wavenumber points not bands, but I can explain the current file structure:

Groups are annoying for reading the file in my opinion, and many platforms (including our Cray supercomputer, unfortunately) do not support NetCDF4/HDF5.
The SW bands are out of order because the RRTMG model (which I didn't write but is called by ecRad) has them out of order - if you reorder them then I'm pretty sure they'll be wrongly mapped to the available bands (i.e. I don't think the wavenumber bounds are checked)
The unused variables are actually used in the IFS when we do lidar and solar radiance assimilation
The aerosol codes and bin numbers are now needed even more (which is why they are more detailed in the newer format file) because I have added the facility for aerosol optical properties to be looked up by code/bin-num/optical-model, rather than just by index (positive/negative) which is error prone especially if someone changes the file.
I'm a bit puzzled why you have so many missing values in your dataset.

The other reason for using ecRad's existing 49r1 format is that then other ecRad users would be able to try your optical properties. There is still scope to improve this format, and certainly scope to add things like standard_name.

many platforms (including our Cray supercomputer, unfortunately) do not support NetCDF4/HDF5.

OK

The SW bands are out of order because the RRTMG model (which I didn't write but is called by ecRad) has them out of order - if you reorder them then I'm pretty sure they'll be wrongly mapped to the available bands (i.e. I don't think the wavenumber bounds are checked)

You could cshift the variables just after reading them from the NetCDF file (this is what we do to use ECRad). Or maybe I miss something about the way the NetCDF file can be used.

The unused variables are actually used in the IFS when we do lidar and solar radiance assimilation

OK

The aerosol codes and bin numbers are now needed even more (which is why they are more detailed in the newer format file) because I have added the facility for aerosol optical properties to be looked up by code/bin-num/optical-model, rather than just by index (positive/negative) which is error prone especially if someone changes the file.

OK

I'm a bit puzzled why you have so many missing values in your dataset.

Yes, we only have LW properties for dust and seasalt.

The other reason for using ecRad's existing 49r1 format is that then other ecRad users would be able to try your optical properties.

OK, good point.
Thanks.

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

As we are making other changes on our master branch that are independent of this pull request, I have created a branch pull_request_9 and it would make sense to correct this pull request: request to merge lguez:pull_request_9 instead of lguez:master. I do not think I have the authorization to do this myself.


[output] 100% coverage for Jira output

to: @ryandeivert
cc: @airbnb/streamalert-maintainers
size: small
Background
Just bringing code coverage back to 100%.
Changes

Added new tests so coverage will be again 100% after adding backoff support.

Testing
$ rm .coverage && ./tests/scripts/unit_tests.sh
...
TOTAL                                                    2803     99    96%
----------------------------------------------------------------------
Ran 494 tests in 9.749s

OK

$ ./tests/scripts/pylint.sh

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

$ python manage.py lambda test --processor rule all
...
StreamAlertCLI [INFO]: (59/59) Successful Tests
StreamAlertCLI [INFO]: (93/93) Alert Tests Passed
StreamAlertCLI [INFO]: Completed

Coverage increased (+0.1%) to 95.491% when pulling 529475550ca0b35134323dfac2bc6758fae8ae2b on javier-streamalert-jira-backoff-tests into 1c0006010d61459d714f0daf158680f8ad4bf77a on master.

Coverage increased (+0.1%) to 95.506% when pulling 506cefdacfb37c51d2730242147223e407e198dd on javier-streamalert-jira-backoff-tests into 1f27c2e2edf97daee9af9ad678aa80236b4ba4bc on master.


Change pgkymhybrid to hybrid in basis name matching

To be consistent with G0, please rename pkpmhybrid to just hybrid. In G0 we do not have any such string as pkpmhybrid

Can be closed after merging the pull request @ammarhakim


Implement environments in API

The code has to act differently depending on whether the API is just being developed, or is actively deployed and serving customs (in production). The way logging is done, or the emails are sent, will be affected by it
Just like the angular apps, the springboot app needs to manage that through environment profiles. Springboot provides functionality for it out of the box, and it is explained in this guide
It should feature a development and production profile, with the former being the default one.
Change to the environment should affect the following:

database schema (treecreate, treecreate_prod)
email sending (WiP, #17)

As part of this issue, the single-url jdbc connection string should be broken down into the following:

TREECREATE_JDBC_HOST
TREECREATE_JDBC_USER
TREECREATE_JDBC_PASS

Covered by #129 and #141


Unbalanced <?php

Please, add a final ?> at end of Parsedown.php file because the <?php is unbalanced.
That's apparently of no importance to most php environment but with uHTTPd running on Arduino Yún (and probably all OpenWrt distributions), that's a problem.
Thank's.

There is a good reason to omit the closing tag, see this Note.

Thank's atrol, you are right with the mentionned note.
But I disagree with this syntax because we are unsure about if the file is inadvertently truncated.
And I was wrong with my sentence about uHTTPd of Yún implementation, that's of no problem.
Parsedown.php is a great job!


[Event Request] Peport 7305 "Whse.-Source - Create Document".OnOpenPage

Please add these events.
    requestpage
    {

        layout
        {
            area(content)
            {
                group(Options)
                {
                    Caption = 'Options';
                    field(AssignedID; AssignedID)
                    {
                        ApplicationArea = Warehouse;
                        Caption = 'Assigned User ID';
                        TableRelation = "Warehouse Employee";
                        ToolTip = 'Specifies the ID of the assigned user to perform the pick instruction.';

                        trigger OnLookup(var Text: Text): Boolean
                        var
                            WhseEmployee: Record "Warehouse Employee";
                            LookupWhseEmployee: Page "Warehouse Employee List";
                        begin
                            WhseEmployee.SetCurrentKey("Location Code");
                            WhseEmployee.SetRange("Location Code", GetHeaderLocationCode);
                            LookupWhseEmployee.LookupMode(true);
                            LookupWhseEmployee.SetTableView(WhseEmployee);
                            if LookupWhseEmployee.RunModal = ACTION::LookupOK then begin
                                LookupWhseEmployee.GetRecord(WhseEmployee);
                                AssignedID := WhseEmployee."User ID";
                            end;
                        end;

                        trigger OnValidate()
                        var
                            WhseEmployee: Record "Warehouse Employee";
                        begin
                            if AssignedID <> '' then
                                WhseEmployee.Get(AssignedID, GetHeaderLocationCode);
                        end;
                    }
                    field(SortingMethodForActivityLines; SortActivity)
                    {
                        ApplicationArea = Warehouse;
                        Caption = 'Sorting Method for Activity Lines';
                        MultiLine = true;
                        ToolTip = 'Specifies the method by which the lines in the instruction will be sorted. The options are by item, document, shelf or bin (when the location uses bins, this is the bin code), due date, bin ranking, or action type.';
                    }
                    field(BreakbulkFilter; BreakbulkFilter)
                    {
                        ApplicationArea = Warehouse;
                        Caption = 'Set Breakbulk Filter';
                        ToolTip = 'Specifies if you want the program to hide intermediate break-bulk lines when an entire larger unit of measure is converted to a smaller unit of measure and picked completely.';
                    }
                    field(DoNotFillQtytoHandle; DoNotFillQtytoHandle)
                    {
                        ApplicationArea = Warehouse;
                        Caption = 'Do Not Fill Qty. to Handle';
                        ToolTip = 'Specifies if you want to manually fill in the Quantity to Handle field on each line.';
                    }
                    field(PrintDoc; PrintDoc)
                    {
                        ApplicationArea = Warehouse;
                        Caption = 'Print Document';
                        ToolTip = 'Specifies if you want the instructions to be printed. Otherwise, you can print it later from the warehouse instruction window.';
                    }
                }
            }
        }

        actions
        {
        }

        trigger OnOpenPage()
        var
            Location: Record Location;
        begin
            GetLocation(Location, GetHeaderLocationCode);
            if Location."Use ADCS" then
                DoNotFillQtytoHandle := true;

            //------------------------------------------------------------OnAfterOpenPage:BEGIN
            OnAfterOpenPage(Location,DoNotFillQtytoHandle);
            //------------------------------------------------------------OnAfterOpenPage:END
        end;
    }

    [IntegrationEvent(TRUE, false)]
    local procedure OnAfterOpenPage(var Location: Record Location; var DoNotFillQtytoHandle: Boolean)
    begin
    end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


KAFKA-6592: ConsoleConsumer should support WindowedSerdes

https://issues.apache.org/jira/browse/KAFKA-6592
Have Console consumer support TimeWindowedDeserializer/SessionWindowedDeserializer by adding new parameters default.windowed.key.serde.inner and default.windowed.value.serde.inner.
An example would be like this:
... --property value.deserializer=org.apache.kafka.common.serialization.StringDeserializer --property key.deserializer=org.apache.kafka.streams.kstream.TimeWindowedDeserializer --default.windowed.key.serde.inner org.apache.kafka.common.serialization.Serdes\$StringSerde
When key/value.deserializer is not TimeWindowedDeserializer or SessionWindowedDeserializer, specifying default.windowed.key.serde.inner or default.windowed.value.serde.inner takes no effect.
More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.
Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

@guozhangwang Please review and guide how to write test cases like this since it's a little bit hard to create TimeWindowedDeserializer instance through reflection in unit test.

@guozhangwang Please review the updated patch. And, currently it's sort of through the reflection to instantiate other packages's class instances. Is it possible in unit tests?

Code change looks good to me, could you add a unit test as well (reflections are OK though not ideal, if some of those fields are private we can either add a getter function and leaving a comment that is only for tests, or use reflections)?

Thanks for the comments. Seems core does not see any classes in streams in unit tests. Do you think it's a good idea to add testCompile project(':clients').sourceSets.test.output for project(':core') ?

Do you think it's a good idea to add testCompile project(':clients').sourceSets.test.output for project(':core') ?

cc @ijuma

It's weird for Core to depend on Streams. Seems like we'd have to move the ConsoleConsumer somewhere else, maybe tools.

@huxihx I'd suggest we skip the unit test for now and add it when we migrate console consumer to tools (I vaguely remember there is already a JIRA for this migration).

Hmm, how can we add functionality without tests?

Hmm, how can we add functionality without tests?

I don't think it is a yes / no question: if we want to add the test, then we either have to move ConsoleConsumer to tools which is a breaking change and we cannot just do it right away; or add dependency of streams to core which is an overkill. If you have a better idea let me know.

I don't think we should add features without tests. There are ways to make this work, I'll chat with you offline and then we can summarise the options here.

I noticed there is a system test named console_consumer.py. Is it possible to refine this test to test this feature?

@huxihx @ijuma  thinking about this a bit more and chatted with Ismael offline, I'd like to suggest the following for the test coverage:

In ConsoleConsumerTest, we only test that the deserializer is correctly configured generally, i.e. keyDeserializer.get.configure is called with any custom user props specified (here we consider the inner.serde just as part of the custom user props for the deserializer).

Then in o.a.k.streams.integration package, under KStreamAggregationIntegrationTest, update shouldReduceWindowed and shouldAggregateWindowed such that

2.a. we remove the flatten function (windowedKey.key() + "@" + windowedKey.window().start()) in toStream , to write Windowed<K> key type directly to the sink topic.
2.b. update receiveMessages to use windowed deserializer.
2.c. along with receiveMessages, also use a console consumer and validate the output string is as expected.

@guozhangwang please review the updated patch. Thanks.

@huxihx the updated tests in KStreamAggregationIntegrationTest looks good to me. But it seems you have not done 1) and 2.c) above right? I think these two parts are still important to add since others do not actually create a ConsoleConsumer and test its functionality.

@guozhangwang added two cases to cover ConsoleConsumerTest and KStreamAggregationIntegrationTest respectively. Please have a review. Thanks.

retest this please

retest this please

@huxihx the failure on JDK9 seems relevant to scala / java conversions, could you take a look?

@guozhangwang Please review again. Thanks.

Thanks @huxihx .


Implement deletion in the type-level tree

For Records, it would enable removal of fields.
for Variants, it would enable a better form of match that when it fails returns a Variant with a reduced set of branches.

Added in Hackage-<IP_ADDRESS>.


correlated aggregates and repository implementation

remove the need to inject the correlation and source id into the method call on the aggregates in  the domain.
the repository should take a source on the GetById call on the ICorrelatedRepository and have the correct source and parent id's into the events persisted on the related Save call.
This will create a sort of unit of work pattern in the service handlers.
Must include examples
Must work with cached repository and hot aggregate scenarios.

in these scenarios a new source can be applied to a hot aggregate by the repo to create a new unit of work after save has been called.

check to see if this is complete


onnx broadcast ops fixes

Description
Fixes https://github.com/apache/incubator-mxnet/issues/13138
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.

[x] Changes are complete (i.e. I finished coding on this PR)
[x] All changes have test coverage:
Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
[x] Code is well-documented:
For user-facing API changes, API doc string has been updated.
For new C++ functions in header files, their functionalities and arguments are documented.
For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
[x] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

@sandeep-krishnamurthy This path of broadcast ops is used by multiple models which are already tested in CI like inception, etc.


Support “filtering monomers by names” functionality in monomer library and on canvas

Background:
The system shall support users to filter monomers by names in monomer library as well as on canvas.
Requirements:
1)Search bar in monomer library and on canvas:
-The system shall have a search bar placed in the upper right corner in a monomer library.
-Once a user clicks on the search bar in the monomer library, the system shall allow searching monomers by names.
-Once a user clicks on any part on canvas, search bar shall appear on canvas and the user can start searching monomers by names.
-The search bar shall be in the shape of a rectangle.
-Empty search bar shall contain the following text: "Type to search".
-The search bar should be case insensitive.
2)Searching monomers by names in monomer library and on canvas:
-Once a user starts initiating a search, the system shall allow searching monomers based on both criteria: Searching monomers by short names and searching monomers by full names.
-When a user hovers over a monomer with both short name and full name in a monomer library, the system shall present its structure with both names respectively, where the full name should appear in brackets.
3)Searching results in monomer library and on canvas:
-Once a minimum of 1 letter is entered by a user, the system shall present all possible monomers with this letter.
-The system shall firstly present all monomer names that begin with the entered letter, only then the system shall present all monomer names that have an entered letter in each subsequent place.
-The system shall allow narrowing down search results with every newly entered letter.
-Once enough letters are entered to locate desired monomers, the user shall be able to click on it and display it on canvas.

Obsolete


[BUG/ISSUE] "No package found matching input criteria" beta version winget pkg

I get this error when trying to install any Winget pkg using the latest commit  (doesn't matter if building or running the .py file). The latest stable version works fine though. I am on Windows 10, Python 3.11.2

Any package? There's not any package that works?

I don't think so. I have tried gsudo, firefox and pdf-xchange

However, installing form the context menu works, right?

that is correct


long x-axis labels does not rotate to 90 on barcharts for version 2.3.0

When the label is long the label only rotate ~50 degrees, and it pushes the bars away:
https://jsfiddle.net/w1p4jdka/8/
Expected Behavior
labels rotate to 90 degrees: https://jsfiddle.net/w1p4jdka/12/
Current Behavior
https://jsfiddle.net/w1p4jdka/8/

I believe the render issues will be addressed in #3508 (targeted for v2.5). I'm not sure what the best way to address the rotation is other than encouraging the use of the minRotation option. We will need to do some investigation into this and what users expect.

The bars being pushed away will be addressed when v2.5 releases.
To get that rotation, you can do
options: {
  scales: {
    xAxes: [{
      ticks: {
        minRotation: 90
      }
    }]
  }
}

The reason that the rotation doesn't go further is that the default maxRotation setting is 90 and the labels are too long for the chart. Making the chart taller and setting maxRotation: 90 makes it better. See https://jsfiddle.net/e1g7qyuq/1/ using v2.5


[Bug] Links Area in Hi-res screen generated HTML report are not aligned with pictures

Version of Archi, Operating System

Archi 4.4.0
Windows 10 64bit 1903
Expected Behaviour

To Click on object for properties in Hi-res HTML report
To Click on View Object to move to another view in Hi-res HTML report
Actual Behaviour

Links Area within Hi-res HTML report are not aligned with objects (the clikable areas are here but not at the same scale of the picture)
With the 2x size Report option Checked or unchecked.
Steps to Reproduce the Behaviour

Insert views object (or just any object) in a view. Save
Export HTML with a Hi-Res screen.
Open the report on hi-Res screen and try to click on objects

I tested this and it's working for me. Assuming you mean a View link box on a diagram?

Yes. A View link box on a diagram.
After investigation, it seems that all links area are "offset" (like the old bug for 4K screens with links HTML report)

Old bug  #328

Could you amend this bug's title and description? Or close this one and open a new bug report?

There is also a new Preference, can you see how this is set:

Could you amend this bug's title and description? Or close this one and open a new bug report?

Of course, i'll edit

There is also a new Preference, can you see how this is set:

It was unchecked.
If i check it, the offset is higher on my 4K screen.

Did this used to work for you? Was it on a different machine and screen?
This is not easy for me to debug because I don't have 4k screen so I'm having to guess. It would certainly help if someone with such a setup could help on this with the code.

Phil,
I’m living in France and the 4K screen is at work.
Tomorrow i’ll test 6 more scenarios.
Generation on 1K with checkbox unchecked and consulting of report on 1K
Generation on 1K with checkbox checked and consulting of report on 1K
Generation on 1K with checkbox unchecked and consulting of report on 4K
Generation on 1K with checkbox checked and consulting of report on 4K
Generation on 4K with checkbox unchecked and consulting of report on 1K
Generation on 4K with checkbox checked and consulting of report on 1K
Generation on 4K with checkbox unchecked and consulting of report on 4K (bug)
Generation on 4K with checkbox checked and consulting of report on 4K (bug)
With the same machine.

Did this used to work for you? Was it on a different machine and screen?
This is not easy for me to debug because I don't have 4k screen so I'm having to guess. It would certainly help if someone with such a setup could help on this with the code.

Never used with 4.4.0

Is the scaling in Windows showing as 200% or 400% or...?

Is the scaling in Windows showing as 200% or 400% or...?

150% but i cannot verify and test at this time

If it is 150% that might account for it.

When you are ready, could you try this build and ensure that the preference option is ticked:
https://www.archimatetool.com/downloads/beta/Archi-Win64-4.4.1.zip
My suspicion is that in the older version the image size and hitbox calculation used the device scaling factor but the new code uses 200%. The beta build uses the old method.

When you are ready, could you try this build and ensure that the preference option is ticked:
https://www.archimatetool.com/downloads/beta/Archi-Win64-4.4.1.zip
My suspicion is that in the older version the image size and hitbox calculation used the device scaling factor but the new code uses 200%. The beta build uses the old method.

I will try tomorrow morning here.  Thx.

I'm not sure 150% scaling will affect things. From what I can make out, scaling in Eclipse and Archi is either 100% or 200%.

Can you remember a version of Archi where this worked with the 4k screen?

Hi, sorry for silence.
No. But if you have old exe somewhere i can test to know when it works and when it doesn't

You could try the beta:
https://www.archimatetool.com/beta/