All public logs
Combined display of all available logs of ElixirBlocks. You can narrow down the view by selecting a log type, the username (case-sensitive), or the affected page (also case-sensitive).
- 16:42, 2 May 2024 Admin talk contribs created page Retroactively Change Data Type of Table Field (Phoenix / Ecto) (Created page with "Example: <source> alter table(:name_of_table) do modify :content, :binary end </source>")
- 10:16, 29 April 2024 Admin talk contribs created page Non-Blocking Error Check Example (Created page with "Example of error checking using the ElixirRss module. <source> def fetch_and_parse(rss) do case ElixirRes.fetch_and_parse(rss) do {:ok, _response} = out -> out {:error, _} = err -> err end rescue e -> dbg(e) {:error, :unknown} end </source>")
- 20:19, 25 April 2024 Admin talk contribs created page Phoenix CORS (Cross Origin Resource Sharing) (Created page with "https://victorbjorklund.com/cors-error-phoenix-elixir-cors-plug")
- 16:09, 5 April 2024 Admin talk contribs created page How to Generate a UML Block Diagram of Ecto Database (Created page with "The ecto_erd module lets you generate a block diagram image of your schema by only using a few easy commands. https://github.com/fuelen/ecto_erd")
- 00:44, 15 March 2024 Admin talk contribs created page Router (Created page with "In Elixir Phoenix this is the file responsible for "routing" endpoint requests to data. When you create a new phoenix application named "app" the router is in this directory: '''app/lib/app_web/router.ex'''")
- 02:33, 14 March 2024 Admin talk contribs created page Add an HTML Page to Elixir Phoenix (Created page with "This tutorial describes how to render an HTML page in Elixir Phoenix. THis tutorial does not use Liveview. ==Create the Route== In '''app/appweb/router.ex''' set a route. In the example below, the route is a get request and the endpoint is '''/landing'''. Assign a Controller, in the code below this is '''PageController'''. In the third argument, set an atom that will be the name of the HTML page, in this case it is '''index'''. <source> get "/landing", PageControl...")
- 14:57, 4 January 2024 Admin talk contribs created page User talk:Admin (Created page with "ML Notes == Types of Machine Learning == ===Supervised=== '''Most common form of learning.''' Supervised ML simply means that we have an answer key for every question we’re using to train our machine. That is to say, our data is labeled. So if we’re trying to teach a machine to distinguish if a photo contains a bird, we can immediately grade the AI on whether it was right or wrong. Like a Scantron, we have the answer key. But unlike a Scantron and because it’s...")
- 19:12, 5 December 2023 Admin talk contribs created page How to Render RSS Feeds in Elixir Phoenix (Created page with "This is an example of how to capture and display an RSS feed in Phoenix. You must first install the '''Feedex''' RSS package. * https://www.hex.pm/packages/feedex * https://hexdocs.pm/feedex/Feedex.html * https://github.com/diegocurbelo/feedex Below is a LiveView example that uses the above package to render contents of an RSS feed to the browser. The raw() method comes with Elixir Phoenix and is used to sanitize HTML. ==Example== <source> defmodule AppWeb.PageLi...")
- 02:10, 3 December 2023 Admin talk contribs created page How to Use Built-In Phoenix Authentication (Created page with "{{In_progress}} <hr/> Phoenix has a built in authentication generator. To use the feature, you can run the following command: <source> mix phx.gen.auth Accounts User users </source> You are asked to choose the form of authentication that you want. The 2 choices are LiveView authentication or Controller based authentication. ==LiveView Authentication== ==Controller Based Authentication==")
- 16:07, 28 October 2023 Admin talk contribs created page Template:Liveview basics required (Created page with "This document assumes that you understand the basics of Liveview. This includes: * Phoenix and Elixir installation * Create an empty starter application * How to create a basic Liveview application * How to perform basic form submission * How_to_Iterate_and_Render_Database_Data_in_Phoenix_LiveView...")
- 23:38, 21 October 2023 User account Will talk contribs was created by Admin talk contribs
- 14:07, 20 October 2023 Admin talk contribs created page How to Move a Phoenix Project to a Different Development Server (Created page with " Remove '''_build''' and '''deps''' directories. Make sure your migration files are available in '''priv/repo/migrations''' If you are using a different database, in config/dev make sure your database credentials are set properly for the new database. '''run:''' * mix deps.get + compile * mix ecto.create * mix ecto.migrate * mix phx.server *")
- 14:03, 20 October 2023 Admin talk contribs deleted page How to Move a Project fto a Different Development Server (content was: "#REDIRECT How to Move a Project to a Different Development Server", and the only contributor was "Admin" (talk))
- 14:02, 20 October 2023 Admin talk contribs deleted page How to Move a Project to a Different Development Server (content was: " Remove '''_build''' and '''deps''' directories. Make sure your migration files are available '''priv/repo/migrations''' If you have changed your tables you will need to manually update the migration files. In config/dev make sure your database credentials are set and set a new database if desired. run: mix deps.get + compile mix ecto.create mix ecto.migrate mix phx.server", and the only contributor was "Admin" (talk))
- 16:11, 19 October 2023 Admin talk contribs created page How to Generate a Migration File (Created page with "A migration file lets you update and create table data. ==Generate a migration file== A migration file is generated using a console command. After it is generated, you write code that configures table fields and then invoke the migration file. The command to create a migration file is: <source> mix ecto.gen.migration name_of_migration </source> For this example, I will add a new field named owner <source> mix ecto.gen.migration create_owner_field </source> The mi...")
- 15:55, 19 October 2023 Admin talk contribs created page How to Set a Unique Constraint to a Table Field (Created page with "If you already have a table and retroactively want to set a field to only allow unique values, you need to create a migration with: <source> create unique_index(:table_name, [:field_name]) </source>")
- 13:39, 19 October 2023 Admin talk contribs moved page How to Delete A Table That has many Without Deleting Children to How to Delete A Table That Contains a "has many" Value Without Deleting Children
- 13:38, 19 October 2023 Admin talk contribs created page How to Delete A Table That has many Without Deleting Children (Created page with " If you have a table that you are trying to delete and the table contains a has_many relationship, you may get an error similar to the one below when you attempt to delete the parent table. ===Error=== <source> constraint error when attempting to delete struct: * item_id_fkey (foreign_key_constraint) If you would like to stop this constraint violation from raising an exception and instead add it as an error to your changeset, please call `foreign_key_constraint/3`...")
- 18:59, 18 October 2023 Admin talk contribs created page Working Example of Phoenix Built in Form Component (Created page with " <source> defmodule AppWeb.PageLive do use AppWeb, :live_view def mount(_params, _session, socket) do {:ok, assign(socket, form: to_form(%{}, as: :my_form))} end def handle_event("save", params, socket) do {:noreply, socket} end def render(assigns) do ~H""" <.form for={@form} phx-change="validate" phx-submit="save"> <.input type="text" field={@form[:username]} /> <.input type="email" field={@form[:email]} />...")
- 16:18, 16 October 2023 Admin talk contribs created page How to Use phx-change with a Select Element in Phoenix (Created page with " Example: Render <source> defmodule AppWeb.GroupLive do use AppWeb, :live_view alias App.TestBeds alias App.Groups def mount(_params, _session, socket) do {:ok, assign(socket, testbeds: TestBeds.list_testbeds(), groups: Groups.list_groups())} end def handle_event("select-group", params, socket) do IO.inspect params {:noreply, socket} end def render(assigns) do ~H""" <div> TestBed Name</div> <%= for testbed <- @...")
- 13:10, 13 October 2023 Admin talk contribs created page How to Create an Empty Phoenix Application (Created page with "'''Before You Begin''' {{Phoenix-Installation-Required}} ==What you will do== * Create a new Phoenix application instance ==Create the App== Select a directory, open a terminal and type: <syntaxhighlight> mix phx.new app </syntaxhighlight> This creates a new phoenix application named "app". The terminal will prompt you to download dependencies, select Y for yes. When dependency downloading is complete, you have the choice to connect your app to a database usin...")
- 13:04, 13 October 2023 Admin talk contribs moved page Forms and Event Handlers in Elixir Phoenix to Forms and Event Handlers in Elixir Phoenix Liveview
- 11:39, 13 October 2023 Admin talk contribs moved page How to Understand Forms and Changesets to Understanding Forms and Changesets
- 11:34, 13 October 2023 Admin talk contribs created page How to Understand Forms and Changesets (Created page with "{{In_progress}} In this tutorial you seed database and Ecto "Context" data. You then write controllers and forms while learning how changesets work.")
- 10:24, 13 October 2023 Admin talk contribs created page How to Use Code Generators to Create an App in Phoenix (Created page with "{{In_progress}} ==Create Context== To create Table Data, Schema and Model information you can use this code. The example below creates the database table and the Elixir/Ecto functions needed to interact with it. This code does ''not'' create any HTML, Route or Controller data. <source> mix phx.gen.context Items Item items name:string </source> '''According to the official docs:''' Generates a context with functions around an Ecto schema. <source> mix phx.gen.co...")
- 09:23, 13 October 2023 Admin talk contribs created page How to Create Default Parameters/Arguments for a Function (Created page with " The two backslash characters are used to create default parameters/arguments in a function. <source> def x(item \\ %{})do item # default argument of %{} end </source>")
- 08:52, 13 October 2023 Admin talk contribs created page What is the Difference Between Import, Alias and Use (Created page with "These are keywords that let you use code across modules. ==Alias== A shortcut to another module. The syntax lets you reference a function without typing out the entire module names/hierarchy. ==Import== Pulls all functions from a module into the current module. You use the imported module functions in the current module. ==Use== ?")
- 12:56, 12 October 2023 Admin talk contribs deleted page Elixir Phoenix HTML HEEx Quick Reference (content was: "{{In_progress}} ==Variable== ==Conditional== ==For Loop==", and the only contributor was "Admin" (talk))
- 10:32, 12 October 2023 Admin talk contribs moved page How to Move a Project fto a Different Development Server to How to Move a Project to a Different Development Server
- 10:15, 12 October 2023 Admin talk contribs created page Phoenix HEEx (HTML Template) Quick Reference Guide (Created page with "https://studioindie.co/blog/heex-guide/#logic")
- 08:34, 12 October 2023 Admin talk contribs deleted page File:Phoenix control flow.png
- 08:33, 12 October 2023 Admin talk contribs deleted page File:Phoenix Control Flow.png
- 21:20, 11 October 2023 Admin talk contribs deleted page Drawio:Phoenix Control Flow (content was: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABGEAAAHrCAYAAABvg4ArAAAAAXNSR0IArs4c6QAAKQ90RVh0bXhmaWxlACUzQ214ZmlsZSUyMGhvc3QlM0QlMjJlbWJlZC5kaWFncmFtcy5uZXQlMjIlMjBtb2RpZmllZCUzRCUyMjIwMjMtMTAtMTFUMTglM0E1NyUzQTAxLjEyM1olMjIlMjBhZ2VudCUzRCUyMk1vemlsbGElMkY1LjAlMjAoV2luZG93cyUyME5UJTIwMTAuMCUzQiUyMFdpbjY0JTNCJTIweDY0KSUyMEFwcGxlV2ViS2l0JTJGNTM3LjM2JTIwKEtIVE1MJTJDJTIwbGlrZSUyMEdlY2t...", and the only contributor was "Admin" (talk))
- 17:59, 11 October 2023 Admin talk contribs uploaded File:Phoenix control flow.png
- 17:59, 11 October 2023 Admin talk contribs created page File:Phoenix control flow.png
- 17:55, 11 October 2023 Admin talk contribs uploaded File:Phoenix Control Flow.png
- 17:55, 11 October 2023 Admin talk contribs created page File:Phoenix Control Flow.png
- 16:54, 11 October 2023 Admin talk contribs created page Drawio:Phoenix Control Flow (Created page with "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABJ0AAAFOCAYAAAAsImxhAAAAAXNSR0IArs4c6QAAJRx0RVh0bXhmaWxlACUzQ214ZmlsZSUyMGhvc3QlM0QlMjJlbWJlZC5kaWFncmFtcy5uZXQlMjIlMjBtb2RpZmllZCUzRCUyMjIwMjMtMTAtMTFUMTYlM0E1NCUzQTM1LjI4MlolMjIlMjBhZ2VudCUzRCUyMk1vemlsbGElMkY1LjAlMjAoV2luZG93cyUyME5UJTIwMTAuMCUzQiUyMFdpbjY0JTNCJTIweDY0KSUyMEFwcGxlV2ViS2l0JTJGNTM3LjM2JTIwKEtIVE1MJTJDJTIwbGlrZSUyMEdlY2tvKSUyMENocm9tZSUyRjExNy4wLjAuMCUyMFNhZmFyaSUyRjUzNy4zNiUyMiUyMHZlcnNpb24lM0QlMjIyMi4wLjQlM...")
- 11:22, 11 October 2023 Admin talk contribs created page Drawio:Test (Created page with "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFEAAABRCAYAAACqj0o2AAAAAXNSR0IArs4c6QAABWl0RVh0bXhmaWxlACUzQ214ZmlsZSUyMGhvc3QlM0QlMjJlbWJlZC5kaWFncmFtcy5uZXQlMjIlMjBtb2RpZmllZCUzRCUyMjIwMjMtMTAtMTFUMTElM0EyMiUzQTE1LjkwNVolMjIlMjBhZ2VudCUzRCUyMk1vemlsbGElMkY1LjAlMjAoWDExJTNCJTIwTGludXglMjB4ODZfNjQpJTIwQXBwbGVXZWJLaXQlMkY1MzcuMzYlMjAoS0hUTUwlMkMlMjBsaWtlJTIwR2Vja28pJTIwQ2hyb21lJTJGMTE3LjAuMC4wJTIwU2FmYXJpJTJGNTM3LjM2JTIyJTIwdmVyc2lvbiUzRCUyMjIyLjAuNCUyMiUyMGV0YWclM0QlMjJFd...")
- 18:57, 10 October 2023 Admin talk contribs created page Phoenix Control Flow and Mental Model (Created page with "{{In_progress}}")
- 17:18, 10 October 2023 Admin talk contribs created page Using Forms to Render Nested Association Data (How to render foreign key data (has_many, belongs_to))
- 19:46, 9 October 2023 Admin talk contribs created page How to Read Error Messages (Created page with "{{In_progress}}")
- 20:29, 8 October 2023 Admin talk contribs created page Ecto Changesets (Created page with "{{In_Progress}} Ecto.Repo.insert/2, update/2 and delete/2 require a changeset as their first parameter. The creating, updating or deleting of table data always requires a changeset.")
- 00:58, 6 October 2023 Admin talk contribs created page Create Foreign Key Relationship Between Ecto Tables (Created page with "{{In_progress}} My goal is to create two html generated tables in Phoenix. * Testbed(s) * Group(s) I want to create a relationship between these two tables so that: * A Group can have many Testbeds * Each Testbed can belong to 1 Group * I intend to write front end code that presents this relationship to the user. Steps In Phoenix I generated the two tables and related UI code using these commands: <source> mix phx.gen.html Testbeds Testbed testbeds name:string mi...")
- 17:49, 19 September 2023 Admin talk contribs created page Roll Back Last Migration (Created page with "<source> mix ecto.rollback </source>")
- 05:21, 2 September 2023 Admin talk contribs created page How to Convert Map to a List of Keys and Values (Created page with "<source> %{:en => 1, :jp => 4, :zip => 0} |> Enum.map(&Tuple.to_list/1) |> IO.inspect </source>")
- 04:58, 2 September 2023 Admin talk contribs created page How to Convert String to Key Value Map of Items and Count Number (Created page with "<source> words = "The world hello world to the world" list = String.split(words," ") Enum.map(list, fn(item)-> item end)|> Enum.frequencies()|> IO.inspect #%{"The" => 1, "hello" => 1, "the" => 1, "to" => 1, "world" => 3} </source>")
- 02:26, 2 September 2023 Admin talk contribs created page Elixir Pattern Matching Tutorial (Created page with " '''Use Pattern Matching as a Replacement for Conditional Statements''' In most programming languages conditional if/else statements are used to program branched actions in a program. In Elixir, it is considered "idiomatic" to use pattern patching in place of conditional statements. If you are learning Elixir after learning another programming language, you may be tempted to use if/else conditional statements. In Elixir, resist this temptation and instead default to...")
- 05:17, 30 July 2023 Admin talk contribs created page Toggle Show Hide on Client in Liveview (Created page with "This is a working example: <source> defmodule AppWeb.PageLive do use AppWeb, :live_view def mount(_params, _session, socket) do {:ok, socket} end def render(assigns) do ~H""" <div phx-click={JS.toggle(to: "#item")} > CLICK ME </div> <div id="item"> hi there </div> """ end end </source>")
- 08:04, 27 June 2023 Admin talk contribs created page Elixir Phoenix HTML HEEx Quick Reference (Created page with "{{In_progress}} ==Variable== ==Conditional== ==For Loop==")