This file contains 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
import androidx.compose.foundation.background | |
import androidx.compose.foundation.clickable | |
import androidx.compose.foundation.layout.Column | |
import androidx.compose.foundation.layout.fillMaxWidth | |
import androidx.compose.foundation.layout.height | |
import androidx.compose.foundation.layout.padding | |
import androidx.compose.foundation.shape.RoundedCornerShape | |
import androidx.compose.material.MaterialTheme | |
import androidx.compose.material.Surface | |
import androidx.compose.material.Text |
This file contains 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
plugins { | |
id 'com.android.application' | |
id 'org.jetbrains.kotlin.android' | |
id 'kotlinx-serialization' | |
} | |
// ... | |
dependencies { | |
implementation 'androidx.core:core-ktx:1.9.0' |
This file contains 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
import org.slf4j.Logger | |
import org.slf4j.LoggerFactory | |
class RecipeUtil { | |
inline fun <reified T> logger(): Logger { | |
return LoggerFactory.getLogger(T::class.java) | |
} | |
} |
This file contains 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
import com.paul.data.Ingredients | |
import com.paul.data.Instructions | |
import com.paul.data.Recipe | |
import com.paul.data.Response | |
import com.paul.entity.IngredientsEntity | |
import com.paul.entity.InstructionsEntity | |
import com.paul.entity.RecipeEntity | |
import com.paul.repository.IngredientsRepository | |
import com.paul.repository.InstructionsRepository | |
import com.paul.repository.RecipeRepository |
This file contains 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
data class Recipe ( | |
var recipeName: String?, | |
var recipeInstructions: String?, | |
var recipeImage: String?, | |
var ingredients: List<Ingredients>, | |
var instructions: List<Instructions> | |
) | |
class Ingredients ( | |
var ingredientsDetails: String |
This file contains 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
import com.paul.entity.IngredientsEntity | |
import com.paul.entity.InstructionsEntity | |
import com.paul.entity.RecipeEntity | |
import org.springframework.data.jpa.repository.JpaRepository | |
import org.springframework.stereotype.Repository | |
@Repository | |
interface IngredientsRepository : JpaRepository<IngredientsEntity, Int> { | |
} |
This file contains 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
import com.fasterxml.jackson.annotation.JsonIgnore | |
import com.fasterxml.jackson.annotation.JsonProperty | |
import com.paul.data.Ingredients | |
import org.hibernate.annotations.CreationTimestamp | |
import java.util.* | |
import javax.persistence.* | |
@Entity |
This file contains 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
package com.paul.config | |
import org.springframework.boot.context.properties.ConfigurationProperties | |
import org.springframework.boot.context.properties.ConstructorBinding | |
@ConfigurationProperties(prefix = "config") | |
@ConstructorBinding | |
data class ApplicationProperties( | |
val internalServerError: String, |
This file contains 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
package com.paul.controller | |
import com.paul.data.Recipe | |
import com.paul.service.RecipeService | |
import com.paul.util.RecipeUtil | |
import org.springframework.beans.factory.annotation.Autowired | |
import org.springframework.http.ResponseEntity | |
import org.springframework.web.bind.annotation.GetMapping | |
import org.springframework.web.bind.annotation.PathVariable | |
import org.springframework.web.bind.annotation.PostMapping |
This file contains 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
from flask import Flask, render_template, redirect, session, request, url_for | |
import pymysql | |
import secret | |
# Initialize the flask library | |
app = Flask(__name__) | |
# create secret key to use for sessions | |
app.secret_key = "JustMakeThisEndInWeirdLines123@#!IThinkThisIsFine" | |
# create a connection to the mysql (phpMyAdmin) server |