Replacement for Regex
Regular expressions can be hard to write and is hard to read.
I suggest coming up with a replacement for Regex, one that is easier to write, and absolutely easier to read.
Regular expressions can be hard to write and is hard to read.
I suggest coming up with a replacement for Regex, one that is easier to write, and absolutely easier to read.
Often when you create a calender entry everything goes the way you planned. But sometimes the event ends up on the wrong date. If you don’t happen to remember exactly the erroneous date you entered you have no way to find it again.
Alas – let the calendar have a way to show the last entries so you can find it there.
Jag föreslår 3 pepparkaksformar för att göra ett litet pepparkakshus.
En form är för taket, rektangulärt, en för gavlarna, 5-kantigt, och en för fram- och baksida av huset, rektangel igen. På så sätt kan man enkelt stansa ut ett drygt halvdecimeter högt pepparkakshus man kan limma ihop med kristyr (man bränner sig på socker).
Då kan alla barnen göra var sig och det blir mindre bråk om vilken dekoration som skall var.,
When making gingerbread one uses punches to create the shapes.
I suggest making 3 in the shape of parts for a small house. One for the roof, one for each side and one for the remaining two sides. With 3 punches one has a ginger bread house half a decimeter high. Glue it together with sugar paste.
This means every kid around the table can make his/her own house and not have to share/squabble over which decoration should go where.
Fiddling with commits and branches in Git requires googling.
If it doesn’t – you have done the above already.
There are tools like Fork to aid but I suggest yat (yet another tool).
Show the commit graph graphically with boxes and arrows.
Let the user pull the arrows between commits.
This way one can reorder (i.e. interactive rebase) the commits.
The user can also move arrows between branches. Possibly more complex for the application to sort out but a tremendous help for the user.
If the rebase is ok, just do it.
If the rebase results in a merge problem, let the user handle it in his/her preferred/normal way.
Throwing dice is nice but there are two areas of possible dispute.
1. When the die ends up not on flat ground, with one part lifted up. Is it a valid throw or not?
2. When the die/dice smashes into something on the board and moves a piece or two. Where were we at?
So I suggest a physical electronic die to solve this; and more.
I am aware there certainly are apps and web sites for what is to be described but with apps and phones you cannot phycially throw the device/die/dice. Which is part of the fun.
Let the form be a cube. It is a nice form and feels good in the hand and clearly shows which side is up.
This doesn’t mean it has to simulate a D6. It can be anything from D2 to Dinfinite. It can simulate many dice too, as throwing one D12 die is not the same as throwing two D6.
The randomness can be seeded by a built in clock and the g forces of throwing and bouncing.
When the die has come to a stand still, the top side shows the value.
Well… all sides can show the same value so it is readable from everywhere.
If the die decides it is not flat, the value instead shows an icon for rethrowing.
This means there is not any room for discussion. Flat or not, the die decides and the rules are the same for everyone.
Well… who cares if the die ends up slanted, the randomised result is the result. No room for heated discussion.
If the die notices it has fallen on the floor it is a dead throw and the rethrow icon is shown.
Or… it can be a valid throw and the die continues showing the same value regardless of how it is turned before returned to the table.
Throwing a die is done by either throwing it or putting it down on the table with certain force.
If the latter method is used for “throwing the dice”, the risk of pieces of the board being moved due to an unlucky throw is eliminated. When a throw is recognised the value is animated and then shown.
There is a blue tooth connection with phones and other dice.
The count of throws are counted. This means that if you are plagued by a cheeter, manipulating the dice is not longer an issue. If the dice are moved when everyone is taking a break they don’t change their value. And if they are retrown, a counter increases together with time stamp. The old value is retrieved from the history. The game continues. The culprit chastisised.
Since the dice are connected they don’t have to be passed around the table any more. Everyone can have his/her own dice and they can all show the value of the last thrown dice. Or if everyone has their phone by the table, they phone shows the value.
Personally I prefer passing the dice around as it is tactile, makes people interact and shows who’s turn it is.
All of the above, except for the 6 sided form factor and the throwing part, can be simulated in a phone or tablet or computer or raspberry or whatever.
Update:
The die can simulate more than numeric values. There are games with coloured dice, D6 with 4 different values and 2 specials. If the result represent something, like 1-2 is miss, 3-4 is boarding and 5-6 is sink, the die can simulate a D3 with nice icons instead of figures.
It can simulate a deck of cards. It can even remember what values are already thrown so to not randomise the same card twice. This mimics drawing cards from a deck.
It it not uncommon to mouse-click on a row and then press home-button to move the cursor to the start of the line.
I suggest having yet a button; that moves the cursor to the start of the line.
One way is to have a button on the mouse.
Another way is to have a home button on the left hand side of the keyboard. Or right side if you have your mouse on the left side.
The button does not have to be hard wired to just this but could be configured differently. Move cursor to end of line is not uncommon. Have it change behaviour depending on modifier keys (alt-shift-control-command).
I am presently working on a solution with JWT tokens. When doing manual REST calls there is a lot of logging into the site and find a request and copy its JWT token and paste it into my REST client of choice.
I suggest a solution that can find said token and copy it to my copy buffert, or even update my REST tool, with a single command.
Of all flashlights I have ever tested there is none that is weak enough for night use without blinding. So I suggest making one.
It should start in the weakest setting. It is better to start at a too weak level and then adjust up than to start with blinding the user and then decrease.
By weak it is meant Weak. Go sit in a wardrobe for 5 minutes and first then find out the lowest light needed for reading; weaker than that. Start with what a youngster needs to read a sea map. A grown up probably needs more.
Red light is said to not blind the user but the red is often too strong and blinds anyway. It also makes it harder to make out colours.
Also do Not have flashing light as part of the turn on/adjust/turn off cycle. Flashing light is more or less Never needed.
When hiking in the forest and reading the map you don’t want to blind yourself. Make a small light attached to the hand that can shine down on a map but not much more.
When night sailing way too many (all?) instruments are too bright. Make a small light to fasten to the (inside of the) arm of the sailing/foul weather gear. Make it big enough to light up a map but small enough to not light up the surroundings.
In a tent one sometimes need a “ceiling mounted” down light. Bright enough to find shoes but weak enough to not wake companions or ruin the night vision.
At a scout jamboree or when just taking a leak 20 paces into the forest to show the way. It can be mounted on small poles at regular intervals or situated near hazards, like trippable stones.
Put it on the top of the brim of a cap. It will show your position but not take away your night vision.
Put the weak light at a hazard or a junction or a sign, for any use or when laying out a trek for night hikers.
I have carried a plastic bag with me when hiking in the mountains. I use it as a slide when I happen upon a piece of snow “snölega”.
It is light weight, does not take too much space and can be useful for 1000 other things.
Why not make a slightly heavier/sturdier for use at home, in the regular slope.
It is small enough to stay in the car trunk all winter of one discovers a slope when traveling from point A to point B.