- Take any given Markdown document (README, docs, notes).
- Translate the English text into Kyrgyz language.
- Write the Kyrgyz output using the new Kyrgyz Latin alphabet (Qyrgyz) as defined below.
- Preserve Markdown structure, formatting, links, and code blocks exactly.
- Only translate human-readable text (headings, paragraphs, list items, blockquotes, captions, table cells).
- Do not translate code snippets, file paths, URLs, or commands.
Synchronized output is merely implementing the feature as inspired by iTerm2 synchronized output,
except that it's not using the rare DCS but rather the well known SM ? and RM ?. iTerm2 has now also adopted to use the new syntax instead of using DCS.
When rendering the screen of the terminal, the Emulator usually iterates through each visible grid cell and renders its current state. With applications updating the screen a at higher frequency this can cause tearing.
This mode attempts to mitigate that.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Your actual dynamic worker | |
| defmodule Awesome.Worker do | |
| use GenServer, restart: :transient | |
| alias Awesome.Hero | |
| # Client | |
| def start_link(%Hero{} = hero), do: | |
| GenServer.start_link(@mod, hero, name: proc_name(hero)) | |
| defp proc_name(%Hero{name: name}), do: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def from_packages_list(data: str) -> Generator: | |
| """Parses CRAN package metadata from | |
| https://cran.r-project.org/src/contrib/PACKAGES | |
| and returns the list of dictionaries. | |
| Args: | |
| data (str): raw text from the package list | |
| Returns: | |
| (Generator): each entry from packages as dictionary |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def process_errors(%Changeset{} = changeset) do | |
| %{ | |
| message: "Changeset errors occurred", | |
| code: :schema_errors, | |
| errors: to_api_errors(changeset) | |
| } | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # add this to your schema module | |
| # if it's a field for the mutation object, add this middleware to the end | |
| def middleware(middleware, _field, %{identifier: :mutation}) do | |
| middleware ++ [Idp.Middlewares.HandleAPIErrors] | |
| end | |
| # if it's any other object keep things as is | |
| def middleware(middleware, _field, _object), do: middleware |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule Idp.Middlewares.HandleAPIErrors do | |
| @behaviour Absinthe.Middleware | |
| alias Idp.EctoHelpers | |
| def call(resolution, _config) do | |
| errors = | |
| resolution | |
| |> Map.get(:errors) | |
| |> Enum.flat_map(&process_errors/1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def action_wrapped(fun) do | |
| case fun.() do | |
| {:ok, result} -> | |
| {:ok, result} | |
| {:error, changeset = %Changeset{}} -> | |
| { | |
| :error, | |
| %{ | |
| message: "Changeset errors occurred", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule IdpWeb.Schema.CityResolvers do | |
| use IdpWeb.Schema.Errors | |
| alias Idp.Geo.Cities | |
| alias Idp.EctoHelpers | |
| def create(_parent, city, _ctx) do | |
| EctoHelpers.action_wrapped(fn -> | |
| Cities.create_city(city) | |
| end) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule IdpWeb.Schema.Errors do | |
| @moduledoc """ | |
| Defines common GraphQL error responses | |
| """ | |
| defmacro __using__(_) do | |
| quote do | |
| @permission_denied { | |
| :error, | |
| %{ | |
| message: "Permission denied", |
NewerOlder