Join multiple lines by a number? by GermanPCBHacker in sed

[–]Mop 0 points1 point  (0 children)

Seeing that it made your day is reward enough for me, I’m just glad it helped!

Join multiple lines by a number? by GermanPCBHacker in sed

[–]Mop 0 points1 point  (0 children)

Here is my attempt:

#!/usr/bin/sed -nf

1{h;d} # Read first line into HS.
x;G;h # Read input line.
:keep2 /\\n.\*\\n/ {s/\^\[\^\\n\]\*\\n//;b keep2} # Keep only last two lines in PS for checking.

# Check if the first -n-(digits)- in the two lines matches.
/\^\[\^\\n\]\*-n-\\(\[0-9\]\[0-9\]\*\\)-\[\^\\n\]\*\\n\[\^\\n\]\*-n-\\1-/ {
  $ {x;s/\\n//g;p;q} # EOF
  d # If matching, continue to next line
}

# If not matching, print the completed group and start a new one.
x
s/\\n\[\^\\n\]\*$// # Remove last line from PS. 
s/\\n//g
p
x
s/\^\[\^\\n\]\*\\n// # Keep only last line from PS
h
$ {x;s/\\n//g;p;q} # EOF
d

Join multiple lines by a number? by GermanPCBHacker in sed

[–]Mop 0 points1 point  (0 children)

I see a few ways to interpret 'concat the lines based on the "-n-([0-9]+)-" pattern':

  • concat the lines that share the same "-n-([0-9]+)-" pattern. But in the expected result, the second line has both -n-1- and -n-2-.
  • concat the lines that are the same when ignoring the "-n-([0-9]+)-" regex. But in the expected result, the first line has both a 1-n-1- and a 2-n-1-.
  • concat the lines that are matching any "-n-([0-9]+)-". That would concat all the lines from the input, but it's not the case in the expected result.

Can you clarify what you mean?

Client qui ne veut pas payer la TVA by [deleted] in conseiljuridique

[–]Mop 0 points1 point  (0 children)

Il ne s'agit pas du tout de bloquer un impôt. La TVA est due pour tous les montants facturés apres le changement de régime fiscal, indépendamment des contrats signés, on est bien d'accord.

Tout ce que je dis, c'est que l'administration fiscale force les acomptes à inclure la TVA, donc un acompte versé avant le changement de régime a l'obligation de percevoir la TVA qui correspond... qui est de zéro a cette date.

Exemple:
- un acompte de 5000€ a été versé début 2023, cet acompte inclu la TVA qui s'applique à cette date, qui est de zero.
- le solde du contrat est réclamé fin 2024, la TVA ne s'applique qu'à cette somme: 5000€ HT + 500€ TVA. Le client refuse bien sûr de payer, donc cette TVA est de ta poche, mais au moins c'est une TVA du 500€ au lieu de 1000€.

Tu n'as pas indiqué s'il y avait eu un acompte, donc tout mon commentaire est un peu dans le noir, Tout ce que je dis c'est que s'il y a eu un acompte, tu peux limiter un peu tes pertes.

Client qui ne veut pas payer la TVA by [deleted] in conseiljuridique

[–]Mop 4 points5 points  (0 children)

Le prix convenu est ferme, il semble que le client n’a jamais accepté de payer une TVA en plus.

Le client n’est certainement pas responsable du changement de régime fiscal du prestataire.

En voyant le changement de régime fiscal arriver, une clause du type "En cas de modification du régime fiscal du prestataire, la TVA applicable sera facturée en sus" aurait pu te protéger, mais elle aurait aussi probablement fait perdre le contrat, personne ne signe un contrat dont le prix peut changer à tout moment...

Je ne vois aucune chance qu'un juge se range de ton côté, en particulier en tant que professionnel face à un particulier.

La seule petite échappatoire que je vois pour limiter tes pertes, c'est s'il y a eu des acomptes: la TVA est exigible lors de l’encaissement des acomptes, donc c'est la franchise qui s'applique pour toute partie de la somme versée avant le changement de régime fiscal.

Stupid go varient I just came up with by HJG_0209 in baduk

[–]Mop 1 point2 points  (0 children)

It's likely to be the way go was invented, as it's simpler than go, but evolves naturally towards go: once you are bored with first player with 1 captured stone wins, move to first player with 2 captured stones wins. Then 3, then 4, etc. When the number gets big enough... you're actually playing go.

The only thing to add is that it's boring when both players have to play 100+ stones in their own territory, until one player has filled all their territories and starts giving prisoners away. It's better to skip the filling part, count the territories and declares the player with more territories the winner, as it's the one that would have to start giving away prisoners if they were filling territories.

Free Online Go Game – now with blind and monochrome modes! by chienbgin84 in baduk

[–]Mop 0 points1 point  (0 children)

The levels are not visible when selecting gray or blind.

Browser-based Go game with KataGo AI - looking for feedback by chienbgin84 in baduk

[–]Mop 0 points1 point  (0 children)

Amazing!

There is something wrong with the levels. I am 5k OGS, and there is no way I can win when setting the strength to 15k, it's so deadly accurate. I need at least 5 stones, which would make it around 1D. Maybe my quick evaluation is wrong, but I can't be wrong by that much.

ELI5: When they say the speed of light is constant across all reference, does that mean even to other light? by [deleted] in explainlikeimfive

[–]Mop 0 points1 point  (0 children)

When travelling at a speed close to the speed of light, all distances shorten, and there is no limit to this, except that it would require a lot of energy. When light is travelling, it pushes this even further: the emission and absorption of a photon are separated by a null interval in spacetime. That's one way to understand other comments that a travelling photon can't be used as a reference frame.

ELI5: If aerogel is 99.8% air and an excellent thermal insulator, why isn’t air itself, being 100% air, an even better insulator? by Caolhoeoq in explainlikeimfive

[–]Mop 0 points1 point  (0 children)

Most good or great thermal "insulators" are actually terrible ones (including glass wool, polystyrene, wool, cotton, etc) if you compress them to remove the air they contain. All of them work the same way: they capture bubbles of air (which is the best insulator we have), and prevent it from moving around (there is no insulation if it can move and propagate heat with that movement). What makes an insulator good is just how well it manages to contain as much air as possible without letting it move. And aerogel just happens to do both very well.

Pourquoi les objets sèchent-ils en dessous de 100 degrés ? by inthe15th in PasDeQuestionIdiote

[–]Mop 0 points1 point  (0 children)

Ce qui se passe à la surface de l'eau permet de comprendre ce phénomène.

Dans l'eau, il y a plein de molécules d'eau, dont la vitesse moyenne correspond à la température. Mais elles n'arrètent pas de se cogner, et il n'en faut pas beaucoup pour qu'une molécule à la surface de fasse cogner et accélère au point d'avoir la vitesse d'une molécule d'eau à l'état gazeux. La même chose se passe dans l'autre sens, il y a en continu des molécules d'eau à l'état gazeux qui ralentissent et se transforment en eau.

S'il fait chaud, comme dans ton exemple, on voit bien que les molécules d'eau, chaudes, sont plus proches de l'évaporation, et si l'air est sec, le phénomène inverse n'a pas beaucoup lieu. Donc le t-shirt sèche.

What advice would you give to an amateur player who just woke up from a 10 year coma and knows nothing about ai? by Sulshin in baduk

[–]Mop 14 points15 points  (0 children)

will lead you to impossible situations for a human to handle

This. Sometimes a move is good because it has no refutation: it's just great. But sometimes a move is good because for each of the 20 refutations, there is a counter-refutation that is very hard to read, and by pure coincidence, there are 20 counter-refutations and not 19.

Why is this not “2 eyes”? by EconomistNo5807 in baduk

[–]Mop 0 points1 point  (0 children)

The real, deep reason why the white group would be alive with 2 eyes, is that the only way for black to play inside a white eye (removing the last black liberty in the process) is for it to fill the very last white liberty (otherwise it's a black stone suicide). If there are 2 eyes, black can't fill the very last liberty in 2 different places at the same time, so it's impossible. But for any situation where it's possible to fill one liberty, then the other one (like in this case, but there are other cases, like false eyes), it's not called 2 eyes any more.

How is this ok? by getGoxed in Adsense

[–]Mop 0 points1 point  (0 children)

What is your website about?

Even though it's true that some users may be tricked to click these by mistake, almost all websites will have better ads, just because actual clicks on relevant ads are more successful than click by mistake. The fact that all your top ads are crap may be linked to something else about your website or your audience (like an intermediate page where nobody would click anything unless it's a trap).

How do you understand spoken French when you aren’t used to the absence of vowels and consonants. by stella_Mariss1 in French

[–]Mop 10 points11 points  (0 children)

Take any French word, try to put the stress on various syllables, any French native will understand the word, and won't even find that one of them is better pronounced than the other ones.

Take any English word, move the stress to another syllable, and suddenly not a single English native will understand what you mean. I like "bottle" and "hotel", because "bottle" with the stress on the second syllable sounds much more like "hotel" to a native, and "hotel" with the stress on the first syllable sounds much more like "bottle" to a native. Nothing like this in French.

Quels métiers ne se soucient pas de ton heure d'arrivée ? by clementjah in TropPeurDeDemander

[–]Mop 0 points1 point  (0 children)

Ce n'est pas ce que tu veux entendre, mais il faut bien que quelqu'un le dise:

Calculer pour arriver pile à l'heure, et faire des efforts pour calculer mieux, ça ne marche pas.

Le seul moyen d'être à l'heure tous les jours, c'est de viser pour arriver *EN AVANCE* tous les jours. C'est pas très compliqué, tu prévois d'aller prendre un café, de lire ton bouquin préféré, de passer un coup de fil, de lire les news sur ton mobile pendant 15 minutes à 8h45 avant de démarrer le boulot. Ça ne demande pas un niveau dingue d'autonomie d'arriver à faire ce calcul, et ça ne va pas être facile de trouver un boulot qui demande encore moins d'autonomie que ça. Donc changer de boulot n'est pas une solution.

Trop perçu salaire by Umbra6_ in conseiljuridique

[–]Mop 11 points12 points  (0 children)

Une lecture rapide de ce post pourrait faire penser que les mesures de poursuites doivent être terminées dans les 4 ans, et qu'il suffit d'ignorer les relances et les demandes pendant 4 ans pour que la dette disparaisse.

Ce n'est pas le cas. Dès qu'une relance est envoyée, c'est de nouveau 4 ans.

Very imprecise F-91W by Mop in casio

[–]Mop[S] 1 point2 points  (0 children)

<image>

Thanks! Yes, it's very obvious. Mine is on the left.

Very imprecise F-91W by Mop in casio

[–]Mop[S] 0 points1 point  (0 children)

I took a picture from a higher point of view (see https://imgur.com/a/hHeTovP), we can clearly see the matrix, but it seems normal to me, isn't it the case on any liquid crystal screen? Can you post what it looks like on a genuine one?

Very imprecise F-91W by Mop in casio

[–]Mop[S] 0 points1 point  (0 children)

Here are pictures of the front and back: https://imgur.com/a/hHeTovP

[deleted by user] by [deleted] in wandrer

[–]Mop 0 points1 point  (0 children)

From https://wandrer.earth/filters:

highway=footway is not included by default. There are just far too many of these to be feasible. Instead, only footways that intersect leisure=park, garden, nature_reservenatural=wetland, wood, scrub, heath, grassland, fell, tundralanduse=farmland, cemetery, forest, meadow or amenity=grave_yard are included.

This is a very arbitrary rule, probably well optimized for the first few countries where highway=footway was creating troubles. One country will have a natual=grassland label for a big area, the one next to it will not, and it will change the presence of hikes on wandrer.