Cheat Lightning network (c-lightning) – Bitcoin Stack Exchange

I want to understand how cheat lightning network using c-lightning.
I understand that if a participant of che channel send not last commitment transaction, it means that he tries to cheat. I’d like to replicate this scenario.

I tried to dump commitments, and I found these informations.

    $ ./hsmtool dumpcommitments 022f495a897360fdd287f7a823302479e62856e47727c0c8c9688faf45f4a92aac 1 2 
/tmp/l1-regtest/regtest/hsm_secret mypass
    shaseed: 14d384a3757ea8c750d1325997ed7c0761b1cf2a8845ae0aaf5b6c783bcbe8ef
    commit secret #0: 9d202a2c4df2792d4d77583b969d407dc0b31e9ff38bb9121932ac55e536202e
    commit point #0: 039f4232478aa0629637ba2d8fd9808bd3d06342b5fbc67699d2f09bc1a9c844ad
    commit secret #1: 8cf246e819e78d34ce331f897652909bdc7104b6eac173a4180be1bbcfc46f37
    commit point #1: 03cacc020bcc3a322c41854a3b0337643b5e9b10af79f96ba14ccf4637cd56ba8f

Where can I find the first transaction in order to try to cheat?
Because I want to understand how penalties work and i’d like to decode all commitments transaction

Back button in wizard – User Experience Stack Exchange

I’m designing a multi-step wizard, and in the design I’ve included a back button in-line with the individual step markers

back button

We’ve discussed things internally, and it has been suggested that the back button be removed completely since you can click on the steps themselves, and instead underline the labels on the steps to make it more clear they are also links.

I’ve always been under the impression that it is better to have clear back/forward buttons in a multi-step form.

  1. Should the back button be kept (but thinking of changing the label to match the previous step)
  2. Should the step labels be underlined and the back button removed
  3. Should the back button live at the bottom of the form? Unsure on positioning of this however

If point 3, then I’m unsure where to put the button. The next button is currently on the bottom left, directly under the inputs of the form as this keeps the button in the eye line of the user. However having the next and back button in the same place feels a bit wrong hence I put the button at the top to start with

Learning apache kafka – Software Engineering Stack Exchange

Having knowledge of any messaging system and the fundamentals of Java or any programming language. Good knowledge on Linux Operating system. The knowledge of Java basics will help you understand Kafka concepts faster .

What is Kafka?

Kafka is open-source software that can provides a framework for storing, reading and analysing streaming data. It is fundamentally free to use, and it has a large network of users and developers who contribute towards updates, new features and offering support for new users and it has high reliability and replication characteristics. Kafka is designed to be run in a distributed environment, rather than sitting on one user’s computer, it runs across many servers. This brings additional processing power and storage capacity .

Why learn Apache Kafka?
Kafka training helps you gain expertise in Kafka Architecture, Installation, Configuration, Performance Tuning, Kafka Client APIs like Producer, Consumer and Stream APIs, Kafka Administration, Kafka Connect API and Kafka Integration with Hadoop, Storm and Spark using Twitter Streaming use case.


Stack Exchange Network

Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Post Exchange With Discussion Time

Discussion Time is a free speech forum. or (whichever link you prefer to use).

Looking for:


Rust server load testing – Game Development Stack Exchange

I am looking to stress test my Rust game server and monitor CPU, RAM and FPS. I could not find much around.

I general I think I will need a good amount of compute power, bunch of cloud based VM which generate the load through UDP using some headless client.

Monitoring CPU and RAM should be fairly easy, but how about the in game FPS?
Also I could not find much about Rust clients that could simulate a player.


Migrate messages in shared mailbox exchange, can it be done?

Can I migrate information in IMAP mode for a shared mailbox? Is this possible or not? Why and how?

fourier analysis – InverseFourierSequenceTransform[F[kx,ky],{kx,ky},{x,y}] – Mathematica Stack Exchange

Background: InverseFourierSequenceTransform is a very useful tool which makes it convenient to write a momentum Hamiltonian in real space. For such calculations some times I need for example following calculations,

InverseFourierSequenceTransform(a+b Cos(kx) +c Cos(ky) , {kx, ky}, {x, y})

Previously in this link, I reported that this function has a problem and it gives zero. So I devise following approach: i) add “g1 Cos(kx)” to the function and take its InverseFourierSequenceTransform on the first argument ii) put g1=0

f0 = (InverseFourierSequenceTransform(a + b Cos(kx) + c Cos(ky) +g1 Cos(kx), x,x) /. {g1-> 0})

now, we cannot use InverseFourierSequenceTransform for a Piecewise function! therefore I write following code, which means iii) I extract the f0 to a table and iv) then calculate InverseFourierSequenceTransform after adding “g2 Cos(ky)”. v) At the end I put g2=0.

Piecewise( Flatten((dummy0 = #((2)); dummy1 = InverseFourierSequenceTransform(#((1)) + g2 Cos(ky), ky, y)((1)) /. {g2 -> 0}; Table({dummy1((i, 1)), dummy1((i, 2)) && dummy0}, {i, 1, Length@dummy1}) ) & /@ f0((1)), 1), 0)

So In this sense, I can safely take the InverseFourierSequenceTransform with respect to two parameters. I am wondering is there any other approach or simpler way to do it?

PAIN. Comments Pagination – WordPress Development Stack Exchange

Sorry for flame, but i wasted 7-12 hours trying to understand how comments pagination works….
Never thought that simple step will take that much with WordPress :'((((

i output comments in my theme like this:

         'callback' => 'regular_comment',
         'avatar_size' => 100,
         'style'       => 'ol',
         'short_ping'  => true,
         'reply_text'  => __( 'Reply', 'twentyseventeen' ) . ' ' . '<img class="comments-icon" src="' . get_path() . '/assets/i/others/chat.svg">',

And trying to use

echo paginate_comments_links();

for outputting pagination. Now after many hours of trying i understood that there is no way to use paginated comments unless you select that option in admin under Settings->Discussion…..


If that option is not set – no matter how hard i try to get total comments and set ‘per_page’ arg for wp_list_comments() – pagination urls ({N}/#comments simply won’t work – url just redicts to

So, i have to setup that option… but. If you let’s say want on one page to show 5 comments per page and 10 on another, then you use ‘per_page’ for wp_list_comments(), right ?

wp_list_comments( ...args, 'per_page' => 5)

while in admin panel we have let’s say 10. After setting this up we need to tell paginate_comments_links() total number of comments on pages, because otherwise it will count using values provided in admin settings(under Settings->Discussion)

paginate_comments_links( array( 'total' => count_number_some_way ) )

In this case we will get pagination numbers as we want, but pagination will only work for pages defined in admin panel…. comments now show up on page according to ‘per_page’ argument for wp_list_comments, but pagination still works only for values in admin panel… It does show different number of pages. For example, we have 12 total comments on post, defined 6 per page in admin panel and now want to display 2 per page via ‘per_page’ argument, so pagination number will increase from 1..2 to 1..2..3..4..5..6. But only 1..2 will work, other links will just output no comments…

SQL server row count – Database Administrators Stack Exchange

I had an activity for restoring a full database in SQL server 2008.

I had to restore the database will norecovery since I had to restore the differential backups as well which will be shared everyday.

My query is how do I check the row count of a database which is under recovery?

Thank you.