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 React from 'react'; | |
import { | |
SafeAreaView, View, | |
} from 'react-native'; | |
function App(): React.JSX.Element { | |
return ( | |
<SafeAreaView style={{ flex: 1 }}> | |
<View> | |
<View style={{ flexDirection: 'row' }}> |
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 main | |
import ( | |
"fmt" | |
"strings" | |
) | |
func main() { | |
var string_a string = "My super \nsweet \nstring has \nmany newline\n characters" |
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
use borsh::{BorshDeserialize, BorshSerialize}; | |
use solana_program::{ | |
account_info::{next_account_info, AccountInfo}, | |
entrypoint, | |
entrypoint::ProgramResult, | |
msg, | |
program_error::ProgramError, | |
pubkey::Pubkey, | |
}; |
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.example.toastapp; | |
import androidx.appcompat.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.Toast; | |
public class MainActivity extends AppCompatActivity { | |
@Override |
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
-- DisplayTextModule is some code I use to display text on screen for testing, if you see this in a code snippet, ignore this part | |
local DisplayTextModule = require(script.Parent.Parent.StarterGui.ScreenGui.Frame.TextLabel.DisplayTextModuleScript) | |
local Players = game:GetService("Players") | |
-- Works for R15, not sure if this works for R6 or not | |
local function partIsHumanoid(part) | |
if part.Name == "Head" then | |
return true | |
elseif part.Name == "UpperTorso" then |
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
local Players = game:GetService("Players") | |
local function alterPlayer(player) | |
local character = player.Character or player.CharacterAdded:Wait() | |
local humanoid = character:WaitForChild("Humanoid") | |
local userId = player.UserId | |
local humanoidDescription = game.Players:GetHumanoidDescriptionFromUserId(userId) | |
humanoidDescription.HeadColor = Color3.fromHex("#39FF14") | |
humanoidDescription.LeftArmColor = Color3.fromHex("#39FF14") | |
humanoidDescription.RightArmColor = Color3.fromHex("#39FF14") |
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
local DisplayTextModule = require(script.Parent.Parent.StarterGui.ScreenGui.OnScreenLogger.TextLabel.DisplayTextModuleScript) | |
DisplayTextModule.Display("hello, world") |
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
local module = {} | |
function Display(text) | |
local textLabel = script.Parent | |
textLabel.Text = text | |
end | |
module.Display = Display | |
return module |
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 mysql.connector | |
# Create MySQL Database Connection | |
database_connection = mysql.connector.connect( | |
host="99.111.11.99", # dummy ip address | |
user="your-super-sweet-admin-name", | |
passwd="y0uRpAsSw0Rd", | |
database="your_db" | |
) | |
cursor = database_connection.cursor() |
NewerOlder