3,149,287 events, 1,632,119 push events, 2,513,049 commit messages, 189,574,144 characters
Removed Replay functionality, fixed main menu alignment, added the highly-requestion "Fuck You" option
Implement OptionalAttributes for Objects.
This is another massive PR, sorry. I tried to separate out some of the changes, but the code kept overlapping, unfortunately.
All our Types got an Equal method, so they can be compared using go-cmp. This was necessary to make the tests pass. As part of this, the Type interface was refactored to include an equals() private method, which powers the Equal and Is methods on each type.
I also fixed some periods in error messages to make golint happy.
Of course, with these new methods, there was enough logic to add tests to each Type, so I added some tests that exercised the equality checks.
I also added, which was the main thing I was trying to do here, an OptionalAttributes property to Objects. These are attributes that can be set on an object, but are not required to be.
Because OptionalAttributes made the NewValue logic more complicated for Objects, I wrote some tests for creating Objects with NewValue to test the logic.
Finally, the new Object comparison logic was panicking during a tfprotov5 / tfprotov6 test, because the Object had a nil AttributeTypes map instead of an empty AttributeTypes map. I fixed it to use an empty AttributeTypes map. In theory, I don't think we should ever see a nil AttributeTypes map.
First try at tilt compensation
Holy smokes trig always beats the hell out of me. I've got it mostly working but theres a small error somewhere in the maths representing the rotation matrix im using. The matrix is a combination of both the X and Y rotations so I could probably just separate those operations to isolate the issue. Interestingly, if you swap the order in the arctan function from y,x to x,y you swap the error from the roll to the pitch axis. I'm sure thats a dead giveaway as to where the problem is but my brain is not having it.
However, even these results are still impressive. The error is reduced by a huge amount to less than ~10-15 degrees at the worst (where before it could be off by 50+ degrees). An important note is the order of operation for the correcting factors. You must realign the reference frames BEFORE applying calibration factors, otherwise things don't go well.
The issue I'm having now is there is a ton of noise. The heading can jump around quite a lot so some smoothing will be needed. Ideally I would have an output that tracked the average value over the last N seconds and use that. Maybe PID if we want to get really fancy although thats probably overkill.
we do a little fixing before everything breaks holy fuck oh god please please please please
Update README.md
Aditya Singh Thakur, Blogger, YouTuber, and Engineer is a passionate writer. He believes in simple living and high thinking. He thinks that there is no limit to what you can achieve in life. He wants to make an impact by sharing his knowledge. .
He is interested in Lifestyle, Motivation, Education, and other topics of general interest. He loves reading, playing cricket and he is a health-conscious person. He believes that anyone can scale the heights of success with strong determination and consistent efforts.
Find out more about Aditya at www.adityathewondrouswanderer.xyz".
i have nothing to say about this problem
This problem took SO damn long. It is really hard so I didnt really expect to come up with the solution on my own, but what the hell. Even just understanding the solution is hard. The math at the beginning is super annoying. Its basically an mid level amc question with grunt work mixed in with annoying implementation. After rereading a thousand diff solutions, I somewhat understood what to do.
FUCK YEAH DUDE
- fixed dumb square having a birth defect
- FIXED THE FUCKING NAMETAGS GOD DAMNIT
If you love life, don't waste time, for time is what life is made up of
[CHG] core, web: deprecate t-raw
Add a big fat warning when the qweb compiler finds a t-raw
.
t-esc
should now be used everywhere, the use-case for t-raw
should
be handled by converting the corresponding values to Markup
objects. Even though it's convenient, this constructor should never
be made available in the qweb rendering context (maybe that should be
checked for explicitely?).
Replace werkzeug.escape
by markupsafe.escape
in
odoo.tools.html_escape
, this means the output of html_escape
is
markup-safe.
Updated qweb to work correctly with escaping and Markup
, amongst
other things QWeb bodies should be markup-safe internally (so that a
t-set
value can be fed into a t-esc
). See at the bottom for the
attributes handling as it's a bit complicated.
to_text
needed updating: markupsafe.Markup
is a subclass of str
,
but str
is not a passthrough for strings. So Markup
instances
going through would be converted to normal str
, losing their safety
flag. Since qweb internally uses to_text
on pretty much
everything (in order to handle None / False), this would then cause
almost every Markup
to get mistakenly double-escaped.
Also mark a bunch of APIs as markup-safe by default
- html_sanitize output.
- HTML fields content, sanitization is applied on intake (so stripped
by the trip through the database) and if the field is unsanitised
the injection is very much intentional, probably. Note: this
includes automatically decoding bytes as a number of default values
& computes yield bytes, which Markup will happily accept... by
repr-ing them which is useless. This is hard to notice without
-b
. - Script-safe json, it's rather the point (though it uses a non-standard escaping scheme).
- Note that
nl2br
, kinda: it should work correctly whether or not the input is markup-safe, this means we should not need to escape values fed tonl2br
, but it doesn't hurt either.
Update some qweb field serialisations to mark their output as markup-safe when necessary (e.g. monetary, barcode, contact). Otherwise either using proper escaping internally or doing nothing should do the trick.
Also update qweb to return markup-safe bytes: we want qweb to return
markup-safe contents as a common use-case is to render something with
one template, and inject its content in an other one (with Python code
inbetween, as t-call
works a bit differently and does not go through
the external rendering interface).
However qweb returns bytes
while Markup
extends str
. After a
quick experiment with changing qweb rendering to return str
(rather
unmitigated failure I fear), it looks like the safest tack is to add a
somewhat similar bytes-based type, which decodes to a Markup
but
keeps to bytes semantics.
For debugging and convenience reasons, MarkupSafeBytes does not
stringify and raises an error instead (__repr__
works fine). This is
to avoid implicit stringifications which do the wrong thing (namely
create a string "b'foo'"
).
Also add some configuration around BytesWarning (which still has to be
enabled at the interpreter level via -b
, there's no way to enable it
programmatically smh), and monkeypatch showwarning
to show warning
tracebacks, as it's common for warnings to be triggered in the bowels
of the application, and hard to relate to business logic without the
complete traceback.
t-esc
is a bit confusing for the new behaviour of "maybe escape
maybe not", so add a t-out
alias with the same behaviour.
Unlike t-raw
, t-esc
is only soft-deprecated for now: there are
thousands of instances, so editing all the templates is not
great. Eventually we'll add a ci/style
to prevent addition of new
ones, and eventually we might do a bulk-replace and hard-deprecate.
There are a few issues with respect to attributes. The first issue is
that markup-safe content is not necessarily attributes-safe
e.g. markup-safe content can contain unescaped <
or double-quotes
while attributes can not. So we must forcefully escape the input, even
if it's supposedly markup-safe already.
This causes a problem for script-safe JSON: it's markup-safe but
really does its own thing. So instead of escaping it up-front and
wrapping it in Markup, make script-safe JSON its own type which
applies JSON-escaping *during the __html__
call.
This way if a script-safe JSON object goes through markupsafe.escape
we'll apply script-safe escaping, otherwise it'll be treated as a
regular strings and eventually escaped the normal way.
A second issue was the processing of format-valued
attributes (t-attf
): literal segments should always be markup-safe,
while non-literal may or may not be. This turns out to be an issue if
the non-literal segment is markup-safe: in that case when the
literal and non-literal segments get concatenated the literal segments
will get escaped, then attributes serialization will escape
them again leading to doubly-escaped content in attributes.
The most visible instance of this was the snippet_options
template,
specifically:
<t t-set="so_content_addition_selector" t-translation="off">blockquote, ...</t>
<div id="so_content_addition"
t-att-data-selector="so_content_addition_selector"
t-attf-data-drop-near="p, h1, h2, h3, .row > div > img, #{so_content_addition_selector}"
data-drop-in=".content, nav"/>
Here so_content_addition_selector
is a qweb body therefore
markup-safe, When concatenated with the literal part of
t-atff-data-drop-near
it would cause the HTML-escaping of that
yielding a new Markup object. Normal attributes processing would then
strip the markup flag (using str()
) and escape it again, leading to
doubly-escaped literals.
The original hack around was to unescape() Markup
content before
stringifying it and escaping it again, in the attribute serialization
method (_append_attributes
).
That's pretty disgusting, after some more consideration & testing it
looks like a much better and safer fix is to ensure the
expression (non-literal) segments of format strings always result in
str
, never Markup
, which is easy enough: just all str()
on the
output of strexpr. We could also have concatenated all the bits using
''.join
instead of repeated concatenation (+
).
Also add a check on the type of the format string for safety, I think it should always be a proper str and the bytes thing is only when running in py2 (where lxml uses bytestrings as a space optimization for ascii-only values) but it should not hurt too much to perform a single typecheck assertion on the value... instead of performing one per literal segment.
Note: we may need to implement unescape anyway, because it's still
possible to get double-escaping with the current scheme: given an
explicitly escape-ed foo
and t-att-foo="foo"
, foo
will be
re-escaped.
Ugly ass makefile, but it makes my life a bit easier
fucking bitch ass cunt retarded useless ass shit ball gargling android bs
Update DO WHAT THE FUCK YOU WANT TO PUBLIC LICENCE
Downscaled Bob-omb Painting
Getting this to look right was a fucking pain in the ass, sm64 maps its textures in a weird way
Updated the entire json.
Fixed the entire json and added 88 missing keys.
For anyone in the future please for the love of everythign format this thing properly. Holy fuck..
https://www.hackerrank.com/challenges/bon-appetit/problem
Two friends Anna and Brian, are deciding how to split the bill at a dinner. Each will only pay for the items they consume. Brian gets the check and calculates Anna's portion. You must determine if his calculation is correct.
For example, assume the bill has the following prices: . Anna declines to eat item which costs . If Brian calculates the bill correctly, Anna will pay . If he includes the cost of , he will calculate . In the second case, he should refund to Anna.
Function Description
Complete the bonAppetit function in the editor below. It should print Bon Appetit if the bill is fairly split. Otherwise, it should print the integer amount of money that Brian owes Anna.
bonAppetit has the following parameter(s):
bill: an array of integers representing the cost of each item ordered k: an integer representing the zero-based index of the item Anna doesn't eat b: the amount of money that Anna contributed to the bill Input Format
The first line contains two space-separated integers and , the number of items ordered and the -based index of the item that Anna did not eat. The second line contains space-separated integers where . The third line contains an integer, , the amount of money that Brian charged Anna for her share of the bill.
Constraints
The amount of money due Anna will always be an integer Output Format
If Brian did not overcharge Anna, print Bon Appetit on a new line; otherwise, print the difference (i.e., ) that Brian must refund to Anna. This will always be an integer.
Sample Input 0
4 1 3 10 2 9 12 Sample Output 0
5 Explanation 0 Anna didn't eat item , but she shared the rest of the items with Brian. The total cost of the shared items is and, split in half, the cost per person is . Brian charged her for her portion of the bill. We print the amount Anna was overcharged, , on a new line.
Sample Input 1
4 1 3 10 2 9 7 Sample Output 1
Bon Appetit Explanation 1 Anna didn't eat item , but she shared the rest of the items with Brian. The total cost of the shared items is and, split in half, the cost per person is . Because , we print Bon Appetit on a new line.
Revert part of "Fix music stopping when restarting time trial"
This reverts only a part of f196fcd896defc0b24690851c701b8273ba8074b - as the original commit author did not do their changes atomically, they also squashed in a de-duplication within the same commit. So I'm only reverting the part of the commit that wasn't the de-duplication, which is simply the changes to the music.fadeout() calls.
This is being (partially) reverted for several reasons:
-
It's not the correct behavior. What this does instead is persist the track through after you restart the time trial, instead of fading it out, then restarting it again. This is in contrast to behavior in 2.2, and I see no reason to not keep the same behavior.
-
It's a single-case patch. The time trials are not the only time in the game a music track could fade out and then be restarted with the same track - custom levels could do the same thing too. Instead of fixing only one case, we should strive to fix EVERY case.
The original commit author (trelbutate) also didn't write anything in the commit description of f196fcd896defc0b24690851c701b8273ba8074b. What you should write in the commit description is things like rationale, analysis, and other good information that would be useful to anyone looking at your commit to understand why you did what you did. Having no commit description leaves readers in the dark as to why you did what you did.
Thus, I don't know why trelbutate went with this solution, or if they knew that it was only a single-case patching, or if they knew that it wasn't 2.2 behavior.
By not writing the commit description, they miss a chance for reflection; speaking from personal experience, I myself have gone back and improved my commits countless times because I wrote commit descriptions for every single one of them, and sometimes whenever I write them, I think to myself "hang on a minute, that doesn't sound quite right" and end up finding improvements.
If trelbutate wrote a commit description, they might have realized that it wasn't 2.2 behavior, and gone back and fixed up their commit to be correct. As it stands, though, they didn't have to think about it in the first place because they never bothered to write a commit description.
This email was a joke about my old Unix professor
... from community college, Bernie Cosell ... he had the 8th email address on the internet. That was circa 2006 and I was a real shit who didn't pay attention at all. Basically, i had Stage 4 Dunning-Kruger, coupled with a "Golden Boy" complex.
These days, I'd give anything just to see emacs open on someone's laptop, but I live in Roanoke, so it's been literally 7 years since that's happened... It's unbelievable the number of hours i've spent googling things that I just didn't have the "magic words" to query. Ahhh social isolation...
... anyways
Working scraper with tab logic. One new tab for each article. Code needs some love bc its shit
Completely redesigned everything. See below: First of all, sorry for this insane commit. I forgot to push stuff periodically, so now I gotta push it all at once.
- Started making Scott's design come to life, so the layout is based on his design.
- The frame now has a custom shape with rounded corners. This is achieved through
wxFrame::SetShape(), to which I pass a custom-made png image with the needed shape. This means that it doesn't have a native title bar, so, as of yet, there's no way to close the app without the use of a task manager (or through debugging in Visual Studio). - The left panel uses a wxRichTextCtrl to display the patch notes, since the text needs to be tightly formatted. For loading the text, it fetches stuff from the website (I actually will send the pre-formatted needed text to the website, so this control just copies the buffer). - Made a custom scrollbar class for wxRichTextCtrl. It's not highly customizable yet, but I think that I can improve it enough to actually use it in Amadeus-Writer. - Made the background of the MainPanel dynamic: It offsets the image according to the mouse movement. It pre-positions the image so that the maximum offset is never bigger than the image height or width. - Actually used a wxSFShapeCanvas for the main panel because I needed to make the buttons more customized than possible with the native controls. This is done thorugh a TransparentButton class, which inherits from wxSFRoundRectShape. I still haven't figured out how I'm gonna deal with the positioning of the needed bitmaps inside of it, only text. - Added a HyperlinkPanel class, which displays a bitmap (scaled to the panel's size) and of course opens the browser with the provided url on click. It also has a pseudo hover effect, which draws a semi-transparent black layer on top of the panel if the user isn't hovering it. - Started drawing pretty stuff in the PatchNotesWindow through clever use of the wxDC gradient functions.
There're probably some things that I'm forgetting, but as far as I can tell this covers most of it. I'll of course start commiting more frequently now.
Implement characteristic-based source discretization
E.g. base source discretization on wave speeds computed with the HLLC
method. In practice this leads to upwinding the source. I did not see
great success with this. My goal was to try and eliminate non-constant
behavior I see in the rho_u
solution when we have a source on an
irregular grid. However, this characteristic-based source discretization
still shows non-constant rho_u
. This may be fine as argued by Josh
Hansel...he points out that what matters are the inter-cell fluxes as
opposed to the cell center values for rho_u
. But I struggle with
this...intuitively I would love to see constant rho_u
as an
illustration that we have conservation of mass
Update 01300-01399.xml
Servitor Cure, Servitor Blessing, Wild Magic, Advanced Block, Pa'agrio's Honor, Ritual of Life, Chant of Predator, Chant of Eagle, Chant of Vampire, Body of Avatar, Summon Nightshade, Wind Vortex, Dark Vortex, Warrior Servitor, Wizard Servitor, Assassin Servitor, Prophecy of Fire, Prophecy of Wind, Block Shield, Block Wind Walk, Chant of Spirit, Chant of Victory, Seal of Despair, Seal of Disease, Greater Might, Greater Shield, War Chant, Chant of Earth, Holy Attack Resistance, Dark Attack Resistance, Magical Backfire, Clarity, Mana Burn
Very hacky checker for websockets
Looking pretty fucking dope
Added some extra gifs
Added wallet, lnurl generation should work
Damn you lnurl
check https for wss
added z for lnurlp
zindex to the moon
zindex to moon
lnurl too big in ambition
lnurl big
copy/paste bug address
attach lnurl to view
please work
lnurl bug
lnurl bug
bigger lnurl
added reconect button
me bug
await a string
Update readersupport.py
I think it should be checked, that the abstract base class is used. As far as I see it the user currently just needs to call his class 'Reader' as in the template-file. But he does not have to stick your file. e.g. he doesn't have to use the abstract class. So I think we want to ensure he uses the abstract Base class, as this should be the 'real' template.
So what I would do (if i understand the current code correctly); define an abstract BaseClass done include everything we want the user to use partly done if he should use logging, include it in the abstract class if there are some logs, or info we definitly like to get, we need to include functions, doing that define a template done but it should just contain some info about the two or three functions and parameters that are mandetory.
And sorry, I just hacked it in as I think it will be done in python (still not in the language)
Nun, am ende meines Kommentars frage ich mich, warum ich diesen nicht in Deutsch verfasst habe... Viele Grüße und Danke für die viele Arbeit die du dir schon gemacht hast