I'm looking to see if there is a way, in PHP, to determine if a glyph exists for a given character in a font.
- Nov 2022
-
copyprogramming.com copyprogramming.com
-
-
unix.stackexchange.com unix.stackexchange.com
-
And get a list of characters in a font like this:
-
-
apple.stackexchange.com apple.stackexchange.com
-
All glyphs are Unicode glyphs!
-
In the absence of fonts specified in the webpage itself, Safari will use its default font, Time New Roman. However, TNR does not have glyphs in the range shown on this page so Safari cascades to its default for each Unicode range.
-
-
help.fontlab.com help.fontlab.com
-
Characters are logical text units identified by Unicode codepoints, whereas glyphs are graphical font units. The distinction between character and glyph is critical to understanding FontLab, and fonts in general.
-
A Glyphset is the glyph repertoire of a font, i.e. all glyphs present in the font. The old term for this repertoire was “character set”, but it is misleading because in modern font technology, a font is a collection of glyphs, not a collection of characters.
-
-
-
stackoverflow.com stackoverflow.com
-
I know this is older but I'm surprised by the "Is redrawing 110K glyphs (with metrics and kerning and combining attributes and hinting) too hard?" I used to do typography. A plain, unoriginal typeface with 255 straightforward latin-# oriented letters is at least a couple days of work; probably a couple weeks; couple months for truly good work. 110K is the equivalent of 400+ faces with much harder metrics and such. 15,000 hours of work or drastically more; so at least 7 or so years. So, kinda hard.
-
-
nickjanetakis.com nickjanetakis.com
-
That’s fine and dandy if you’re running in production and have a publicly accessible address such as your domain name but what about during development?You can’t just tell Stripe to access http://localhost because that address isn’t publicly accessible to the internet.
-
When developing real world applications you tend to run into certain road blocks such as:How do I test webhooks locally?How can I show a demo of my site to a client?How can I develop a web app that uses subdomains on localhost?How can I test Let’s Encrypt without a domain name?
-
-
Lucky for us, it’s super easy to use subdomains in development nowadays. http://lvh.me is a free service that resolves itself along with all subdomains to localhost.
-
-
stackoverflow.com stackoverflow.com
-
Unless you are the maintainer of lvh.me, you can not be sure it will not disappear or change its RRs for lvh.me. You can use localhost.localdomain instead of localhost, by adding the following lines in your hosts file: 127.0.0.1 localhost localhost.localdomain ::1 localhost localhost.localdomain This is better than using lvh.me because: you may not always have access to a DNS resolver, when developing
-
-
www.benpickles.com www.benpickles.com
-
scale: 3 means 3 of those digits come after the decimal point (surely it should be the other way round, scale for how big the number is and precision for its decimal places?):
-
-
www.benpickles.com www.benpickles.com
Tags
Annotators
URL
-
-
github.com github.com
-
Sidekiq uses all of the data structures Redis provides: lists, sorted sets, hashes.
-
If you want a queueing system that uses X, use a queuing system that uses X! Sidekiq's mantra is simple and efficient. Redis is both. Abstracting data storage is neither.
-
-
store.steampowered.com store.steampowered.com
-
Played for free during the first few days of the game's release. For its current price to content ratio, I can't justify spending $30 for four modes of play (minus one since I rarely play local multiplayer). Battle Royale is dead on arrival as a result of being locked behind such a wall.
-
this game really needs to go free-to-play (just for the battle royale mode) in order to not be immediately DOA. the fact that even during a free weekend on launch day lobbies are still barely filling up is very concerning for this game's future.
-
-
gitlab.nadadventist.org gitlab.nadadventist.org
-
If you want it to automatically check/fix lint errors like this, I would recommend setting up https://github.com/gabyx/githooks in your dev environment. We have a pre-commit hook that automatically runs rubocop for any changed files whenever you try to do a commit. I find it helpful anyway. (Nick prefers a VS Code extension that actually runs it every time he saves a file, which is oftener than I prefer but works for him.)
-
-
github.com github.com
-
I don't see why this is a false positive
-
that return is definitely inside the transaction block, and will cause exactly the sort of unwind that has changed behaviour. (To me, such a "rescue and then return" pattern is exactly the case one should worry about the most!)
.
-
-
github.com github.com
-
It may not seem like the obvious behaviour for return, but perhaps it is a safe assumption to make in general to think of return as aborting the method yielding to the block.
Interesting possible convention:
-
def with_something prepare yield on_success end any return, break or throw would skip the on_success code. Skipping over the on_success code also seems quite reasonable when the block calls break and throw. It may not seem like the obvious behaviour for return, but perhaps it is a safe assumption to make in general to think of return as aborting the method yielding to the block. It might be desirable to discourage the use of return in this way for transactions to keep the code clearer, but that would also affect the use of break which seems like a reasonable way to abort a transaction from within the transaction block.
-
Can you refactor your code so that instead of returning from within the transaction block you set a variable and then return outside of the block?
-
Is there a recommended way to patch Rails to disable this behavior? We are blocked on upgrading to 7 because of this.
.
-
I just spent a day dismantling a model, trying to find the cause of the silent rollback - taking out every association, every validation, every callback, whittling down all the code in the transaction, only to finally discover that it was return true that was the cause of it all. Or yes, an exception!
-
I think I had expected that existing rails developers would discover this problem in existing code through the deprecation warning to avoid a nasty surprise. I'm worried about my future kids learning Rails and writing perfectly looking Ruby code just to learn the hard way that return is sometimes a nono! Jokes aside, I think that no one expected that the deprecation will turn into silent rollbacks. This is a very controversial change, pretty much everyone taking part in the discussion on the deprecation PR raised some concerns about the potential consequences of this change. The only thing that was making it easier to swallow was the promise of making it clear to the user by throwing an exception after the rollback.
Tags
- Ruby: return/break/next
- surprising behavior
- surprising
- controversial
- unfortunate decisions leading to less-than-ideal workarounds
- don't want to be surprised
- convention
- unfortunate workarounds
- error/exception handling
- errors are helpful for development (better than silently failing)
Annotators
URL
-
-
stackoverflow.com stackoverflow.com
-
If you're nested inside several blocks and can't use next, rather extract the contents of the transaction into its own method and use return there.
-
-
gitlab.com gitlab.com
-
I fail to understand how this is such a low priority. Code review is one of the most basic and critical portions of development lifecycle, and prior to discovery of this ticket I literally had to roll an entire other repository manager just to perform that correctly when I discovered entire directories of changes had been omitted from the Gitlab generated MR. We actually found that in order to get the change set fix to apply reliably, that it is required to add "?w=1" to the url even after updating the white space setting.
-
FYI these kind of limits bugs are very confusing for users.
-
Just a repro datapoint. Lost my mind and 1.5 days trying to figure this out on our gitlab server. Unchecking checkbox worked around it.
-
-
gitlab.com gitlab.com
-
Source Code is currently understaffed and working through our P2 bugs at the moment.
-
-
github.com github.com
-
-
Related: #45017 ActiveRecord silently triggers a rollback when return is used in the transaction block.
-
-
github.com github.com
-
Expected behavior this code should be ignored. Actual behavior this code is flagged.
This issue is a correct usage of 'false positive"
-
- Oct 2022
-
steamcommunity.com steamcommunity.com
-
Not sure why every review is positive when the game is like this. I mean, it technically works and can be completed, so there's that. But the implementation is not great.
-
The "developer" here, Dnovel/My Way Games is a serial Russian asset flipper. This Russian "Developer" consistently uses a paid/fake review service for all of his games and asset flips, to create false positive review impressions, in an attempt to mislead gamers.This is basically a scam, and your instinct to question the fake positive review score is spot on.
-
-
store.steampowered.com store.steampowered.com
-
The audio department is mostly comprised of a track of piano elevator music and some sound effects which were taken from freesound.org, mostly without adhering to the Creative Commons licene:A pile of wood - https://freesound.org/people/jorickhoofd/sounds/178740/ - BY-4.0PickupBook1.wav - https://freesound.org/people/jomse/sounds/428666/ - BY-3.0Ambience, Seaside Waves, Close, A.wav - https://freesound.org/people/InspectorJ/sounds/400632/ - BY-4.0Whistling antarctic blizzard - https://freesound.org/people/stormpetrel/sounds/173096/ - BY-NC-3.0campfire_01.wav - https://freesound.org/people/matucha/sounds/170247/ - BY-4.0Windy Window.wav - https://freesound.org/people/Pedaling%20Prince/sounds/338952/ - BY-3.0The "BY-NC" license doesn't allow commercial exploitation, by the way, so this is a clear copyright violation.
.
-
-
www.kickstarter.com www.kickstarter.com
-
github.com github.com
-
Capybara.register_driver(:cuprite) do |app| Capybara::Cuprite::Driver.new( app, { window_size: [1200, 800], inspector: true, url_blacklist: ['https://www.google-analytics.com/analytics.js', 'https://www.google-analytics.com/', 'https://js-agent.newrelic.com', 'https://www.googletagmanager.com', 'https://cdnjs.cloudflare.com', 'http://fonts.googleapis.com', 'https://use.fontawesome.com', 'https://bam.nr-data.net', 'http://connect.facebook.net', 'http://static.ak.facebook.com', 'https://s-static.ak.facebook.com', 'https://www.facebook.com', 'http://ajax.googleapis.com'], debug: true, browser_options: { 'no-sandbox' => nil, 'headless' => nil, 'blink-settings' => 'imagesEnabled=false' }, timeout: 20, logger: $stdout, process_timeout: 20 } ) end
Tags
Annotators
URL
-
-
store.steampowered.com store.steampowered.com
-
a little flaw (Google translation can not find the translation of the word "瑕疵", so can only use the word "flaw" instead)
annotation meta: may need new tag: no exact translation in other language
-
-
steamcommunity.com steamcommunity.com
-
so this means that there are no documentation telling you that this is the way you have to do it anywhere so naturally a lot of devs do not know about this, unless they ask about it by luck or of curiousity.
annotation meta: may need new tag: how could they know / how would one find out?
-
-
www.theverge.com www.theverge.com
-
As a kid, I had cobbled together a version of “me” using parts from different sets, but it never looked exactly right (though I did have two lightsabers and a hoverboard, which is definitely just like the real me).
-
-
-
-
Just as a breadcrumb here for future readers (I found this thread when I was searching), it seems Cuprite has support for non-headless now (via Ferrum). headless: false in the options does the trick. And thanks for your work on Cuprite.
-
@route @twalpole as a community I think we're super grateful for your work on a CDP alternative to chromedriver/selenium, poltergeist etc. I do think collaboration could be very valuable though, although it would likely mean abandoning one of the projects and teaming up on the other, you both obviously have very deep knowledge of CDP and therefore would get a load more done than any of us "end users" trying to wade in there. The status for us on our Rails project is that Apparition fails with a ton of errors, they all seem related to handling timing events (accept_prompt doesn't work, opening new windows seems problematic etc etc etc) whereas Cuprite only rails with a cookie gem we're using (easy fixed) and doesn't support drag_to yet. So to me Cuprite seems more complete, but I don't know much about the internals.
-
As both projects are written by 2 different people independently there's huge difference in the code. I don't think I have time or wish to merge them because it's huge amount of work. The common thing between them is only CDP that's all. Though Cuprite is already stable and supports all features that Capybara requires, we run tests and do many cools things with it in production.
-
As a history mark, when back then I asked Thomas if he started to work on CDP, he said yes but never finished it, so I started this project from scratch which by now feels completed. After releasing it I only yesterday realized that he open-sourced his project and keeps working on it. I think it just feels hard to throw everything you have written to trash, but I wasn't proposed at the beginning to work together on common project and this is the reason Cuprite had began. Though since this project is completed I see no sense to work on something else especially for me, the only difference would be in Ruby implementation which is boring as you can do things in a different manner and CDP has issues too so the difference could be only how we workaround them.
-
And yeah, you two should probably gang up :)
-
what is the difference? and why do you write it from scratch?
-
Haven't really looked through your code, so not sure what the difference is - I would guess not too much. I told you about my version when we were discussing the issues you were having on cuprite -- It was 70+ percent done so I released it and finished up most of the rest. I guess one difference is that you appear to be aiming at bleeding edge Chromium, whereas I'm more focused on things working on Chrome release since I think that's more important for people to test with (no customer is going to be running Chromium alpha).
-
I also was surprised to see 2 "kind of similar" new drivers both targeting CDP I wonder if joining forces ultimately would be a good idea?
-
-
github.com github.com
-
stedolan.github.io stedolan.github.io
-
Multiplying two objects will merge them recursively: this works like addition but if both objects contain a value for the same key, and the values are objects, the two are merged with the same strategy.
Unfortunately, it doesn't merge/concatenate arrays. Sometimes that's what you want (you want the 2nd value to override the 1st but sometimes not.
If you want it to concatenate instead, here are some workarounds:
-
https://stackoverflow.com/questions/53661930/jq-recursively-merge-objects-and-concatenate-arrays
-
If you only need/want to concatenate for some fixed list of keys, you could do it more simply like this (but could get repetitive to repeat for each key you want it for):
⟫ jq -n '[{hosts: ["a"]}, {hosts: ["b"]}] | .[]' | jq -s '.[0] * .[1] * {hosts: (.[0].hosts + .[1].hosts)}' { "hosts": [ "a", "b" ] }
-
-
-
stackoverflow.com stackoverflow.com
-
github.com github.com
-
jq -s '.[0] * .[1]' $config_file $local_config_file
Tags
Annotators
URL
-
-
stackoverflow.com stackoverflow.com
-
Test.new.test { puts "Hi!" }
-
-
The problem is that the caller may write yield instead of block.call. The code I have given is possible caller's code. Extended method definition in my library can be simplified to my code above. Client provides block passed to define_method (body of a method), so he/she can write there anything. Especially yield. I can write in documentation that yield simply does not work, but I am trying to avoid that, and make my library 100% compatible with Ruby (alow to use any language syntax, not only a subset).
An understandable concern/desire: compatibility
Added new tag for this: allowing full syntax to be used, not just subset
-
Unfortunately this is not what I am looking for. I know I can call block this way, but I need to use yield. b variable was used only to indicate that block is actually given.
-
You cannot use yield inside a define_method block. This is because blocks are captured by closures, observe: def hello define_singleton_method(:bye) { yield } end hello { puts "hello!" } bye { puts "bye!" } #=> "hello!"
-
This breaks the TIMTOWTDI rule
-
-
conf.raku.org conf.raku.org
Tags
Annotators
URL
-
-
raku.org raku.org
-
-
grammar Parser { rule TOP { I <love> <lang> } token love { '♥' | love } token lang { < Raku Perl Rust Go Python Ruby > } } say Parser.parse: 'I ♥ Raku'; # OUTPUT: 「I ♥ Raku」 love => 「♥」 lang => 「Raku」 say Parser.parse: 'I love Perl'; # OUTPUT: 「I love Perl」 love => 「love」 lang => 「Perl」
-
Definable grammars for pattern matching and generalized string processing
annotation meta: may need new tag: "definable __"?
-
-
bugs.python.org bugs.python.org
-
I'm afraid you missed the joke ;-) While you believe spaces are required on both sides of an em dash, there is no consensus on this point. For example, most (but not all) American authorities say /no/ spaces should be used. That's the joke. In writing a line about "only one way to do it", I used a device (em dash) for which at least two ways to do it (with spaces, without spaces) are commonly used, neither of which is obvious -- and deliberately picked a third way just to rub it in. This will never change ;-)
-
This text has a line which has an ortographical typo in it. Please look at this line of text from the Zen of Python: There should be one-- and preferably only one --obvious way to do it.
first sighting: ortographical
-
I'm sorry, but syntax is part of poetry, too.
-
-
en.wikipedia.org en.wikipedia.org
-
Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one– and preferably only one –obvious way to do it.[a] Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than right now.[b] If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea – let's do more of those!
-
The formatting of the dashes in this line and the final is purposely inconsistent, in reference to the varying formatting conventions.[6]
reference to: https://hyp.is/3ZYfYFVPEe2WcguQTUPJtA/bugs.python.org/issue3364
-
-
en.wikipedia.org en.wikipedia.org
-
The language was designed with this idea in mind, in that it “doesn't try to tell the programmer how to program.”
-
This motto has been very much discussed in the Perl community, and eventually extended to There’s more than one way to do it, but sometimes consistency is not a bad thing either (TIMTOWTDIBSCINABTE, pronounced Tim Toady Bicarbonate).[1] In contrast, part of the Zen of Python is, "There should be one— and preferably only one —obvious way to do it."
-
-
webkit.org webkit.org
-
Note: Safari is not WebKit. Safari bugs should be reported to Apple.
-
-
-
stackoverflow.com stackoverflow.com
-
It's really not always a better user experience to keep things in one browser... What if they are in a sign-up or check-out flow in your SPA, and at the last step they need to agree to some conditions in an external page? Unless you use a modal, opening in a new window would really be preferable to the user completely losing context and having to go through the whole process again.
-
-
github.com github.com
-
This is the latest version of our README.md (main branch).
Tags
Annotators
URL
-
-
github.com github.com
-
Our most current documentation to get started with Aruba as a user can be found in ./features/.
-
-
-
github.com github.com
-
-
It acts as a black hole null object, allowing arbitrarily deep method chains.
If that's what it does, then perhaps the name should reflect that in the name!
-
For any message that has not explicitly allowed or expected, the double will return itself.
If that's what it does, then perhaps the name should reflect that in the name!
-
to make the double "loose"
If that's what it does, then perhaps the name should reflect that in the name!
-
Null object doubles
as_loose_object
oras_black_hole
orallow_any_message
would have been better names."null" makes it sound like nil, which you can't send any (almost) message to! So it sounds like it does the opposite (disallows random messages) of what it does (allows random messages).
-
-
store.steampowered.com store.steampowered.com
-
Computer Gaming World named this the 34th worst game ever made? lol First of all, gaming mainstream media sucks. Yeah, they are terrible reviewers. IGN, Metacritic, GameSpot, all of them, I don't like or follow them. CGW is today a defunct 80s/90s magazine which I never read because I live in Brazil, but here we had similar ones which reviews sucked and they are all dead by now too.
.
-
in 1994, this was a great game for MS-DOS, a classic today, even a masterpiece as much as SimCity is if you ask me so. It's fun, difficult, complex, had decent graphics for MS-DOS, it's too robust for its time, just don't believe the mass media
.
-
-
store.steampowered.com store.steampowered.com
-
bares no explanation
-
And that was intentional with Freezeframe (spelled in Caps for some reason).
[all caps]
-
-
-
Note that one extra type that is accepted by convention is the Boolean type, which represents both the TrueClass and FalseClass types.
-
This type does not exist in Ruby, however.
-
Note: For keyword parameters, use @param, not @option.
I sure was looking for @option (knowing already about @param) and assuming/expecting that (if it exists) it would totally be the right thing to use for documenting keyword parameters. So I was quite surprised to see this much-needed warning (for me and others like me who came here expecting/assuming the same thing).
-
-
yardoc.org yardoc.org
-
-
en.wikipedia.org en.wikipedia.org
-
created an ancillary tool, named Yardstick, which verifies YARD (or RDoc) documentation coverage.
-
-
Several templates and tools are available to assist in formatting, such as Reflinks (documentation), reFill (documentation) and Citation bot (documentation)
I clicked the link for reFill and thought it looked interesting. Would like to look into this further.
-
-
-
Another possibility is that the alternator will take on the task of recharging a depleted automotive battery. As a result of this increased strain on your alternator, you may notice that your car’s alternator begins to fail.
-
-
ricksfreeautorepairadvice.com ricksfreeautorepairadvice.com
-
Your alternator is NOT a chargerThe alternator’s job is to supply the power needed for all electrical items on the vehicle, plus replenish the battery from the last start up. The alternator is not a battery charger so much as it is a battery maintainer. If the alternator has to recharge an overly discharged battery, the alternator will become over-worked, which will shorten its life.If you use your alternator to charge your dead battery, you will overheat the alternator during its charging process. The greater the amperage flowing through it, the higher the heat an alternator creates.Maximum Alternator Output Only Occurs at high RPMSAfter you start your car with jumper cables, the voltage regulator sees a discharged battery and commands maximum field in the rotor. But at 600 RPM, the alternator can only provide about 1/4th of its rated output. Let it idle for a long period and all you’ll do it overheat the rotor windings and burn up your expensive alternator. A 110-amp alternator can only output 110-amps at RPMS of 2,500 or more. So don’t even think about letting it idle to recharge the battery.A battery charger costs $40. A new Alternator $350Not exactly brain surgery, is it?The correct way to deal with this situation is to jump the battery (using a jumper pack is much safer than jumper cables) and driving it to a place where you can place a REAL battery charger on the battery.
Is this outdated info?
According to https://hyp.is/n7ZQpFF0Ee24ZbcIYA3xVQ/www.reddit.com/r/Cartalk/comments/aoks7b/how_much_idling_needed_after_jump_start_to/ it is. Which advice should we trust?
-
-
www.carproclub.com www.carproclub.com
-
Your Alternator Is Not A ChargerYes, you read that right. An alternator is designed to MAINTAIN your car battery, not recharge it from a deeply discharged state. Its designed to run at only 35-50% of its fully rated output. When you use your cars alternator to recharge a dead battery, you force it to run at nearly 100% of its rated capacity and that overheats the alternator and dramatically shortens its life.
This was the opinion also of https://hyp.is/YNQwwlF0Ee206UcS3HYLnA/www.reddit.com/r/Cartalk/comments/aoks7b/how_much_idling_needed_after_jump_start_to/
but are they misinformed?
-
-
www.reddit.com www.reddit.com
-
In the interest of reducing warranty claims (which are much more expensive than that incremental manufacturing cost) carmakers are sizing the whole unit to reliably accommodate the worst case draw (driver turns everything on at the same time, at idle).
-
This was much more of an issue a generation ago, when your ‘74 Chevy Nova or ‘69 Ford F-100 had a 35 amp alternator. Any car made in the last 15-20 years will have a 75 amp alternator as a bare minimum, and ratings well north of 100 amps are common in larger vehicles.There’s dozens of amps of headroom to charge the battery at idle speed, especially if you turn off the lights, stereo, HVAC, etc. That said, it’ll charge even more quickly if you drive the car.
This seems like more sound/trustworthy advice than the replied-to's advice/info.
-
This will KILL your alternator. You should get a battery charger or a trickle charger. Alternators go through hell when trying to recharge a fully depleted battery.
-
-
gamefound.com gamefound.com
-
After the first week of the campaign, we realized what are the main problematic pillars and fixed them right away. Nevertheless, even with these improvements and strong support from the Gamefound team, we’re not even close to achieving the backer numbers with which we could safely promise to create a game of the quality we think it deserves.
-
First and foremost, we need to acknowledge that even though the funding goal has been met–it does not meet the realistic costs of the project. Bluntly speaking, we did not have the confidence to showcase the real goal of ~1.5 million euros (which would be around 10k backers) in a crowdfunding world where “Funded in XY minutes!” is a regular highlight.
new tag: pressure to understate the real cost/estimate
-
-
sylvercard.itch.io sylvercard.itch.io
Tags
Annotators
URL
-
-
store.steampowered.com store.steampowered.com
-
Welch eine Perle da beinahe an mir vorüber gegangen wäre!Super Story, gute Steuerung, stimmige Musik, tolle Sprecher [DE], ...Ein rundum gutes Paket - und leider [zu] kurz ...Passiert in letzter Zeit selten, dass ich mich an an Game setze und es in einer Tour durchspiele.Hier war dem aber so - ich wollte wissen: was, warum, wieso, wer ... orrrrrrrrrrr Hier und da n Rätselchen - da wollte ich ja zuerst nicht mehr, sind nicht so mein Fall.Sind aber alle nach den zweiten mal "schauen" mit dem Hausverstand lösbar, haben also keinesfalls den Spielfluss gehemmt und eher der [etwas] spielverlängernden Unterhaltung gedient, waren okay.Von mir bekommt das Game solide 8.5/10 Read More
Tags
Annotators
URL
-
-
store.steampowered.com store.steampowered.com
-
i was a bit unsure what to think of it, as i wished to go into this 100% blind. And boy am i glad i did.
-
-
stackoverflow.com stackoverflow.com
-
Auto Margins With auto margins, flex items can be centered, spaced away or packed into sub-groups. Unlike justify-content, which is applied to the flex container, auto margins go on flex items. They work by consuming all free space in the specified direction. Align group of flex items to the right, but first item to the left Scenario from the question: making a group of flex items align-right (justify-content: flex-end) but have the first item align left (justify-self: flex-start) Consider a header section with a group of nav items and a logo. With justify-self the logo could be aligned left while the nav items stay far right, and the whole thing adjusts smoothly ("flexes") to different screen sizes.
-
-
superuser.com superuser.com
-
apple.stackexchange.com apple.stackexchange.com
-
This is great because it works in Terminal, iTerm2, Chrome, Sublime & Outlook. The alternative (Karabina) is less good because that maps "Home" to Command+LeftArrow, which actually switches windows in Terminal.
-
-
webmasters.stackexchange.com webmasters.stackexchange.com
-
The answer is simple and here is an oversimplified example: // Your browser is identifying itself as this $ua_string = 'EDGE'; // The website logic is this if($ua_string === 'IE') { echo 'You are using IE'; } elseif($ua_string === 'FIREFOX') { echo 'You are using Firefox'; } else { echo 'You are using Chrome, and we don\'t support that.'; }
answering using source code
-
-
po-ru.com po-ru.com
-
But what if we’ve more elements to ignore? people = { "Alice" => ["green", 34, "alice@example.com"], "Bob" => ["brown", 27, "bob@example.com"] } No problem. Just re-use the underscore: people.map { |name, (_, _, email)| [name, email] } You can’t do it with any variable, though, at least in Ruby 1.9. It only works with variables that are called _: people.map { |name, (x, x, email)| [name, email] } # SyntaxError: (eval):2: duplicated argument name
-
-
stackoverflow.com stackoverflow.com
-
No, I am interested in gathering all of the optional, named Keyword Parameters into a hash. I am not trying to create a new options hash. I want a hash of {:name => val, :color => val, etc.}, which are named in the method signature.
-
opts = method(__method__).parameters.map(&:last).map { |p| [p, eval(p.to_s)] }.to_h SomeOtherObject.some_other_method(opts)
-
Better to use binding.local_variable_get(p) instead of eval(p.to_s) when using local_variables, just to avoid that evil eval
.
-
that's right, we don't want to do params = { ... } because then we're hardcoding the implementation and it becomes very coupled. The benefit of doing it like in my examples is that you can change the method signature and still automatically capture all keyword parameters.
-
Ruby 2.2 introduced Binding#local_variables which can be used instead of Method#parameters
-
-
support.humblebundle.com support.humblebundle.com
-
While splits on each bundle will vary, on average, there will be a minimum amount for Humble Bundle, generally between 15 - 30%. This minimum amount will allow Humble Bundle to continue offering great prices on amazing games, books, and software, all while supporting important charitable initiatives with every purchase. This minimum amount also lets us invest in exciting content to continue to grow the Humble community which ultimately drives more donations for charitable causes.
positive spin on the required minimum
-
-
www.hanselman.com www.hanselman.com
-
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main
Probably would be better to use:
git remote set-head origin -a
-
git config --global init.defaultBranch main
-
-
gitbetter.substack.com gitbetter.substack.com
-
git remote set-head origin -aThe above command will query the remote host for the HEAD upstream and it updates that upstream in the local.
-
There is evidence that states it was intended to mention master-copy or master recording. And it is not intended to master-slave.
.
-
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
I like it. I’m biased though since I’m a sucker for opportunities to simplify like this one.
-
Current ruby releases generate *.tar.gz, *.tar.bz2, *.tar.xz, and *.zip. But I think we can stop generating *.tar.bz2. I think *.tar.bz2 are less merit. For better size, *.tar.xz exist. For better compatibility, *.tar.gz and *.zip exist.
-
-
github.com github.com
-
passenger-docker images contain an Ubuntu 20.04 operating system. You may want to update this OS from time to time, for example to pull in the latest security updates. OpenSSL is a notorious example. Vulnerabilities are discovered in OpenSSL on a regular basis, so you should keep OpenSSL up-to-date as much as you can. While we release passenger-docker images with the latest OS updates from time to time, you do not have to rely on us. You can update the OS inside passenger-docker images yourself, and it is recommend that you do this instead of waiting for us.
-
apt-get upgrade -y -o Dpkg::Options::="--force-confold"
-
-
www.phusionpassenger.com www.phusionpassenger.com
-
-
multitenancy. The Nginx and Apache integration modes can host multiple apps at the same time.
-
The Ruby on Rails framework provides a builtin server tool, which you can access with the rails server command. The "rails server" is not an application server by itself, but just a small wrapper that launches your application in an application server. This is why people do not use "rails server" in production. They use an application server – such as Passenger – directly. "rails server" uses Puma by default as of Rails 5.
-
-
www.ruby-lang.org www.ruby-lang.org
-
Please be sure to read Ruby’s License.
Why draw attention to this?
-
-
en.wikipedia.org en.wikipedia.org
Tags
Annotators
URL
-
-
blog.appsignal.com blog.appsignal.com
-
def initialize_copy(original_animal) self.age = 0 super end def initialize_dup(original_animal) self.dna = generate_dna self.name = "A new name" super end def initialize_clone(original_animal) self.name = "#{original_animal.name} 2" super end
-
Now that we have seen this implementation, you might be wondering what is the use case for having two #initialize_* methods. The answer is: there is another way to copy objects, called #clone. You generally use #clone if you want to copy an object including its internal state. This is what Rails is using with its #dup method on ActiveRecord. It uses #dup to allow you to duplicate a record without its "internal" state (id and timestamps), and leaves #clone up to Ruby to implement.
-
Are There Other Methods to Copy Something?
-
If we would have kept the call to super out of the #initialize_dup method, we would never have called initialize_copy, so it is important to keep that in.
-
An interesting fact here is that Rails deliberately chose to override the #initialize_dup method instead of the #initialize_copy method. Why would it do that? Let's investigate.
-
-
stackoverflow.com stackoverflow.com
-
what fixed my issue was: remove the node-sass from package.json npm install install it again in latest version via npm install --save-dev node-sass if you find this helpful, I assume you just need to upgrade your node-sass for the latest version because it uses node-gyp as a lower version.
-
-
www.reddit.com www.reddit.com
-
"I thought WSL ran as root in Windows" ... ABSOLUTELY NOT! Do you think we're crazy? ;) When opened normally, your Bash instances are launched with standard Windows user rights. If you want to edit your Windows hosts file, you must do so from an elevated Bash instance ... though only do this with enormous care - any other script you run in the same elevated Bash Console will also get admin rights to the rest of your machine!!
-
-
unix.stackexchange.com unix.stackexchange.com
-
The bash manual contains the statement For almost every purpose, aliases are superseded by shell functions.
-
Functions are much more flexible than aliases. The following would overload the usual ls with a version that always does ls -F (arguments are passed in $@, including any flags that you use), pretty much as the alias alias ls="ls -F" would do: ls () { command ls -F "$@" }
-
Simply don't use aliases in scripts. It makes little sense to use a feature designed for interactive use in scripts. Instead, use functions
-
-
www.youtube.com www.youtube.com
Tags
Annotators
URL
-
-
-
Options to import/export locally stored passwords have been a staple of Chrome for years. For god knows what reason either option seemed to randomly disappear in one Chrome Version and then re-appear in the next.Sometimes there was an import option with no export option, sometimes the other way round like right now, sometimes neither option was available, but you could always add either Option via chrome://flags.If they wanted to force people to use online sync only, why have options for local export still, but not import?
-
-
stackoverflow.com stackoverflow.com
-
You can even simplify this with the *** pattern that was added in version 2.6.7: + /mnt/ + /mnt/data/ + /mnt/data/i-want-to-rsyncthisdirectory/*** - /mnt/** This operator allows you to use the ** wildcard for exclusion and consequently to have only one exclude line.
What does * mean? And why is it used in the + line but is used in the - line?
-
which failed to work because of the trailing slash before the **. Removing the / made it all spring in to life as intended!
-
-
-
nickjanetakis.com nickjanetakis.com
Tags
Annotators
URL
-
-
nickjanetakis.com nickjanetakis.com
-
I had to do 13 steps just to get to the point where I can start writing. To make matters worse, I often compulsively close terminal windows after I am done. This is a process that gets repeated single every time I feel like writing.It’s actually a huge barrier of entry. Sure they are trivial tasks, but they take up a whole lot of mental energy.Living the good life is not all about money, it’s about avoiding stupid things like having to perform a tedious 30 second routine just to get started working on what you want to do.
-
-
-
-
askubuntu.com askubuntu.com
-
Note that fixing a deleted ESP requires re-creating not just the ESP itself, but the boot loader(s) that it used to contain. Such a repair will require the use of an emergency boot disk, like an Ubuntu disk in its "try before installing" mode. You'll also need to restore all the boot loader files. In the case of a Windows/Ubuntu dual-boot, this means recovering both OS's boot loaders. To simplify this task, I strongly recommend backing up the ESP. A file-level backup (using tar, cp, or similar tools) should be sufficient.
-
-
-
In all honesty, I haven't had the patience to experiment with the latter in order to gain certainty about it. Ditto for trusting the boundaries of firmware settings and booted drivers. Indeed, I don't really trust the standard 'buntu installer to reliably ensure that the external drive will even get an ESP partition - at least, without being explicitly told by a custom partitioning step.
-
-
www.reddit.com www.reddit.com
-
Yep, the easiest thing is to create a second EFI partition: https://pop.system76.com/docs/dual-booting-windows/It is still possible to encrypt your popOS ext4 partition using LUKS and LVM, though this won't just work out of the box.
-
-
www.linuxquestions.org www.linuxquestions.org
-
I'd like rsync to create the source dir structure on the remote, when I'm only synching a file in a sub-dir. At the moment it seems I need to do this in 2 commands, e.g.. ssh <remote> mkdir -p /backup/var/spool/cron/crontabs rsync -vauz /var/spool/cron/crontabs <remote>:/backup/home/var/spool/cron/. Ideally, I'd like to be able to do this: rsync -Mvauz /var/spool/cron/crontabs <remote>:/backup/home/var/spool/cron/.
-
-
www.linuxquestions.org www.linuxquestions.org
-
I'd like rsync to create the source dir structure on the remote, when I'm only synching a file in a sub-dir. At the moment it seems I need to do this in 2 commands, e.g.. ssh <remote> mkdir -p /backup/var/spool/cron/crontabs rsync -vauz /var/spool/cron/crontabs <remote>:/backup/home/var/spool/cron/. Ideally, I'd like to be able to do this: rsync -Mvauz /var/spool/cron/crontabs <remote>:/backup/home/var/spool/cron/. ...where M (make parents) is a new option that tells mkdir to do 'mkdir -p' on the remote target dir.
-
-
askubuntu.com askubuntu.com
-
refused connect from [IP-ADDRESS] ([IP-ADDRESS]) This particular message is emitted by the TCP wrappers library when it decides to reject a connection. Ubuntu's sshd is built to use TCP wrappers. Check the two files "/etc/hosts.allow" and "/etc/hosts.deny" on the ssh server. You have an entry in one of those files which causes ssh connections from that address to be rejected. See the Ubuntu man page for these files.
answered question: error message in logs but don't know where coming from
-
-
www.quora.com www.quora.com
-
Going first through an inverter from 12 V D.C to house hold 120 or 240 and than back again to laptop charger is very inefficient. You have the magnetization losses of both the inverter and the charger, which could be 8 or 10 VA each , it does not sound much but 16 VA at 12 Volt = 1.33 Amps without doing any real work for you.
inefficient
-
-
stackoverflow.com stackoverflow.com
-
With JSON Schema, you don't have to specify things. The syntax is declarative and adds restrictions. So if you don't want a restriction on the type of value that's allowed, don't use the type keyword.
-
-
-
www.imdb.com www.imdb.com
-
Just because a movie is what people call "cliche", doesn't mean its inherently bad.
-
-
blog.unity.com blog.unity.com
-
Why is the price of my Unity plan changing? The new price reflects the value of our products today, and it’s our first increase in almost three years. In that time, we’ve expanded our R&D resources by 172%, with the Unity Editor being our largest focus for R&D investment at Unity. This continued investment has helped us deliver Unity 2021 LTS with powerful improvements to workflows, rendering capabilities, and supported platforms. We will continue delivering improvements based on your feedback in every release to enhance your productivity, performance and stability.
positive spin
-
-
-
I expect RuboCop to either make no suggestion on how to resolve the ambiguity, or to suggest something that does not change the semantics of the code as it stands.
-
However, the code as it stands associates the block with bar, and if the code is currently working, the programmer should definitely not parenthesize the parameter, because it would change the meaning of the code.
Tags
Annotators
URL
-
-
github.com github.com
-
A better message, clarifying the true purpose of the cop, which I guess is to differentiate empty Hash literals and blocks.
-
But this sounds like spreading fear and doubt when the Ruby parser has no such concepts :) {} always binds tightly to the call right next to it. This block {} will never go to using, unless it's rewritten as do ... end.
-
-
github.com github.com
-
That's actually a false negative if it doesn't trigger the cop but should; a false positive is when it does trigger the cop/test/fire alarm/etc. but should not.
-
-
en.wikipedia.org en.wikipedia.org
-
new top-level element for describing Webhooks that are registered and managed out of band
Tags
Annotators
URL
-
-
openvalidation.io openvalidation.io
-
Machines understand languages, that are formal and rigid, with unique and unambiguous instructions that are interpreted in precisely one way. Those formal, abstract languages, and programming languages in general, are hard to understand for humans like ourselves. Primarily, they are tailored towards the requirements of the machine. The user is therefore forced to adapt to the complexity of the formal language.
.
-
Instead of forcing humans to understand the complex inner workings of machines, we should construct machines in a way, so they better understand us humans!
.
-
-
docs.openvalidation.io docs.openvalidation.io
-
This distinguishes this grammar from other programming languages or domain-specific languages.
-
The additional content is only relevant for human readability. The machine, on the other hand, ignores this addition. Thus it is possible to express the rules in a grammatically correct way on the one hand and to give them a semantic context on the other.
-
Rules formulated with openVALIDATION are thus at the same time a formal, machine-processable specification, but also a documentation that is easy for people to understand.
-
-
github.com github.com
-
var a = document.createElement("a"); a.href = blob; a.target = "_blank"; setTimeout(function() { click(a); });
-
-
-
www.amazon.com www.amazon.com
-
Also it expects you to buy a bunch of hardware like a raspberry pi and such in order to do the project. I kind of thought there was going to be some kind of public API that acted like a virtual weather sensor but apparently we're building a real one.
-
-
www.syncfusion.com www.syncfusion.com
-
elixir-lang.org elixir-lang.org
-
elixir-lang.org elixir-lang.org
-
nice list of books
Tags
Annotators
URL
-
-
www.amazon.com www.amazon.com
-
I failed to notice that, unlike the Whiz, which has the same distribution settings as a Scotts push spreader (i.e., settings 2 - 9 with half- and quarter-steps between) and which all products you use in a spreader, Scotts or not, conforms to in their instructions for telling you what to set the spreader at, the Whirl does NOT have these settings, meaning there's no way to follow directions on the packages of products you'll be using the Whirl spreader for, not even on the packages of products made by Scotts itself. That makes knowing what to set it at total guesswork, stabbing in the dark, which, as anyone knows who has ever burned their lawn with fertilizer knows, is very risky and potentially very costly. All Scotts gives you with the Whirl, after giving a disclaimer that you must "READ AND FOLLOW ALL LABEL DIRECTIONS OF THE PRODUCT YOU ARE APPLYING," which of course you can't do because those label directions give you a spreader setting that does NOT apply to this spreader, is generic instructions that say to set it at 1 for light seed, 3 for moderate fertilizer, and 5 for heavy ice-melt, only that's all very subjective and products, like fertilizers (even Scotts' own), don't all provide the same spreader setting by type but vary, meaning one fertalizer will tell you to set a standard spreader at 3 3/4, but another will tell you to set it at 5, while if you put any fertalizer on your lawn as heavily as you put ice-melt down, which is what the Whirl suggests for ice-melt, you'll burn your lawn.
-
-
www.homedepot.com www.homedepot.com
-
Topsoil has different grades. Lower-grade topsoils are meant for filling and leveling holes and should only be used for that purpose. Higher-grade topsoils are great for conditioning or adding organic matter to the native soil. Neither grade should be used when planting.
Should not be used for planting anything?? Hmm.
-
-
gardeninguru.com gardeninguru.com
-
-
moisten mixture after spreading (promotes compaction)
compaction good?
-
-
gardeninguru.com gardeninguru.com
-
clayey
-
-
-
www.housedigest.com www.housedigest.com
- Sep 2022
-
blog.mozilla.org blog.mozilla.org
-
In other words, i18n allows applications to support and satisfy the needs of multiple locales, thus “enabling” l10n.
one feature enables the other
-
“Internationalization is the design and development of a product, application or document content that enables easy localization for target audiences that vary in culture, region, or language. Localization refers to the adaptation of a product, application or document content to meet the language, cultural and other requirements of a specific target market (a locale).”
-
-
douglasorr.github.io douglasorr.github.io
-
First, to clarify - what is "code", what is "data"? In this article, when I say "code", I mean something a human has written, that will be read by a machine (another program or hardware). When I say "data", I mean something a machine has written, that may be read by a machine, a human, or both. Therefore, a configuration file where you set logging.level = DEBUG is code, while virtual machine instructions emitted by a compiler are data. Of course, code is data, but I think this over-simplified view (humans write code, machines write data) will serve us best for now...
-
-
fonts.google.com fonts.google.com
-
Alle Menschen sind frei und gleich an Würde und Rechten
see https://www.sozial.de/alle-menschen-sind-frei-und-gleich-an-wuerde-und-rechten-geboren.html
-
-
-
infinum.com infinum.com
-
set up
.
-