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
# ADD NEW COLUMN id_policy INTO TABLE | |
# action es - alter, update, create, add, drop, etc | |
# php artisan make:migration MIGRATION_NAME | |
# --table=TABLENAME in case alter an existing table | |
php artisan make:migration add_id_policy_documents --table=documents | |
# after we have to modify our new migrate and add in the UP function | |
$table->integer('id_policy')->nullable(); |
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
# If you installed mysql via homebrew and mysql gives you the error | |
# ERROR 1067 (42000) at line 22: Invalid default value for 'some_date_field' | |
# You must open the mysql config file located in /usr/local/etc/my.cnf and add the next line | |
sql_mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | |
# After, you have to restar mysql and that's it | |
brew services restart mysql |
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
# Go to C:\xampp\apache\conf\extra open http-vhost.conf file and add: | |
<VirtualHost *:80> | |
DocumentRoot "C:\xampp\htdocs\envioclickpro\public" | |
ServerName name-of-your-host.dev | |
ServerAlias http://name-of-your-host.dev | |
</VirtualHost> | |
# Go to C:\Windows\System32\drivers\etc open host file and add: |
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
/* Large desktops and laptops */ | |
@media (min-width: 1200px) { | |
} | |
/* Landscape tablets and medium desktops */ | |
@media (min-width: 992px) and (max-width: 1199px) { | |
} |
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
[{ | |
"CityEnglish": "Osaka", | |
"CityJapanese": "大阪府", | |
"Place": [{ | |
"PlaceNameJapanese": "大阪城", | |
"PlaceNameEnglish": "Osaka Castle", | |
"AddressJapanese": "〒540-0002 大阪市中央区大阪城1-1", | |
"AddressEnglish": "1-1 Ōsakajō, Chūō-ku, Ōsaka-shi, Ōsaka-fu 540-0002", | |
"AddressLink": "https://goo.gl/maps/ybSYKFR28KM2" | |
}, |
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
class CutCopyPasteEditText @JvmOverloads constructor( | |
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 | |
) : EditText(context, attrs, defStyleAttr) { | |
interface OnCutCopyPasteListener { | |
fun onCut() | |
fun onCopy() | |
fun onPaste() | |
} |
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 android.content.Context | |
import android.graphics.drawable.BitmapDrawable | |
import android.graphics.drawable.Drawable | |
import android.util.AttributeSet | |
import android.widget.ImageView | |
import androidx.core.graphics.drawable.RoundedBitmapDrawableFactory | |
class CircularImageView @JvmOverloads constructor( | |
context: Context, | |
attrs: AttributeSet? = null, |
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 android.content.Context | |
import android.content.ContextWrapper | |
import android.content.pm.PackageManager | |
import android.util.Base64 | |
import android.util.Log | |
import java.nio.charset.StandardCharsets | |
import java.security.MessageDigest | |
import java.security.NoSuchAlgorithmException | |
import java.util.* | |
import kotlin.collections.ArrayList |
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
class HomeActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_home) | |
setSupportActionBar(toolbar) | |
fab.setOnClickListener { | |
it.snack("Snack message") { | |
action("Action") { toast("Action clicked") } |