Snippets Collections
if (condition)
  {
    return;
  }
else...
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":star: Introducing Xero Boost Days! :star:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Hey Perth! \n\nWe're excited to announce the launch of our Boost Day Program!\n\nStarting this week, as part of our <https://xpresso.xero.com/blog/featured/more-opportunities-to-come-together-with-xeros-connect/|*Xeros Connect Strategy*>, you'll experience supercharged days at the office every *Wednesday*. Get ready for a blend of delicious food, beverages and fun connections among each other!\n\nPlease see below for what's on this week! "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-31: Wednesday, 31st July",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n:coffee: *Premium Coffee Experience*: Brew your own café-quality coffee and enjoy premium teas, syrups, and a variety of milk options.\n:breakfast: *Breakfast*: Provided by *Soul Origin* from *8:30AM - 10:30AM* in the office."
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Stay tuned to this channel for more details, check out the <https://calendar.google.com/calendar/u/0?cid=Y180NzA5YTUyZjM5ZjBmMmU3MTBjZWQ3NGQ1Y2M5MzVlMjY3ZWFlMTI1NzMxYzAyODZkZWNhNjAyODU1OGM5M2U2QGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20|*Perth Social Calendar*>, and get ready to Boost your workdays!\n\nLove,\nWX Team :party-wx:"
			}
		}
	]
}
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp.router(
      routerConfig: _router,
    );
  }
}
import 'package:go_router/go_router.dart';

// GoRouter configuration
final _router = GoRouter(
  initialLocation: '/',
  routes: [
    GoRoute(
      name: 'home', // Optional, add name to your routes. Allows you navigate by name instead of path
      path: '/',
      builder: (context, state) => HomeScreen(),
    ),
    GoRoute(
      name: 'page2',
      path: '/page2',
      builder: (context, state) => Page2Screen(),
    ),
  ],
);
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":star: Introducing Xero Boost Days! :star:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Hey Singapore! \n\nWe're excited to announce the launch of our Boost Day Program!\n\nStarting this week, as part of our <https://xpresso.xero.com/blog/featured/more-opportunities-to-come-together-with-xeros-connect/|*Xeros Connect Strategy*>, you'll experience supercharged days at the office every *Monday* and *Wednesday*. Get ready for a blend of delicious food, café beverages, promoted wellness activites, and just generally fun connections with each other!\n\nPlease see below for what's on this week! "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-29: Monday, 29th July",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n:coffee: *Café Partnership*: Café-style beverages with Group Therapy Coffee\n:breakfast: *Breakfast*: Provided by *Group Therapy Café* from *8:30AM - 10:30AM* in the Kitchen."
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-31: Wednesday, 31st July",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n:coffee: *Café Partnership*: Café-style beverages with Group Therapy Coffee\n:breakfast: *Lunch*: Provided by *Group Therapy Café* from *12PM - 2PM* in the Kitchen."
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*LATER THIS MONTH:*"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*Wednesday, 28th August*\n :blob-party: *Social +*: Drinks, food, and engaging activities bringing everyone together."
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Stay tuned to this channel for more details, check out the <https://calendar.google.com/calendar/u/0?cid=Y19lZTA1MmE0NWUxMzQ1OTQ0ZDRjOTk2M2IyNjA4M[…]MjRmZmJhODk0MGEwYjQ4ZDllQGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20|*Singapore Social Calendar*>, and get ready to Boost your workdays!\n\nLove,\nWX Team :party-wx:"
			}
		}
	]
}
sudo apt update        # Fetches the list of available updates
sudo apt upgrade       # Installs some updates; does not remove packages
sudo apt full-upgrade  # Installs updates; may also remove some packages, if needed
sudo apt autoremove    # Removes any old packages that are no longer needed
using av_motion_api.Data;
using av_motion_api.Interfaces;
using av_motion_api.Models;
using av_motion_api.ViewModels;
using Microsoft.AspNetCore.Mvc;

// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860

namespace av_motion_api.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class ProductController : ControllerBase
    {
        private readonly AppDbContext _appContext;
        public readonly IRepository _repository;
        public ProductController(AppDbContext _context, IRepository repository)
        {

            _appContext = _context;
            _repository = repository;
        }
        // GET: api/<ProductController>
        [HttpGet]
        public async Task<ActionResult<IEnumerable<ProductViewModel>>> GetProducts()
        {
            var products = await _repository.GetProducts();

            return Ok(products);
        }

        // GET api/<ProductController>/5
        [HttpGet("{id}")]
        public async Task<ActionResult<ProductViewModel>> GetProduct(int id)
        {
            if (_appContext.Products == null)
            {
                return NotFound();
            }
            var product = await _repository.GetProduct(id);
            if (product == null)
            {
                return NotFound();
            }

            return Ok(product);
        }
        //POST api/<ProductController>
        [HttpPost]
        public async Task<ActionResult<Product>> PostProduct([FromBody] ProductViewModel product)
        {
            var newProduct = new Product()
            {
                Product_Name = product.name,
                Product_Description = product.description,
                Create_Date = DateTime.Now,
                Last_Update_Date = DateTime.Now,
                IsActive = product.IsActive,
                Size = product.Size,
                Product_Category_ID = product.Product_Category_ID,
                Supplier_ID = product.Supplier_ID,

            };



            if (_appContext.Products == null)
            {
                return Problem("Entity set 'AppDbContext.Products'  is null.");
            }
            _appContext.Products.Add(newProduct);
            await _appContext.SaveChangesAsync();

            return Ok(newProduct);
        }


        // PUT api/<ProductController>/5
        [HttpPut("{id}")]
        public async Task<IActionResult> PutProduct(int id, [FromBody] ProductViewModel updatedProduct)
        {
            var existingproduct = await _appContext.Products.FindAsync(id);
            if (existingproduct == null)
            {
                return NotFound();
            }

            existingproduct.Product_Name = updatedProduct.name;
            existingproduct.Product_Description = updatedProduct.description;
            existingproduct.Last_Update_Date = DateTime.Now;
            existingproduct.Product_Category_ID = updatedProduct.Product_Category_ID;
            existingproduct.Size = updatedProduct.Size;
           
            return null;
        }

        // DELETE api/<ProductController>/5
        [HttpPut("hide-product/{id}")]
      
        public async Task<IActionResult> HideProduct(int id)
        {
            if (_appContext.Products == null)
            {
                return NotFound();
            }
            var product = await _appContext.Products.FindAsync(id);
            if (product == null)
            {
                return NotFound();
            }

            product.IsActive = false; 
            await _appContext.SaveChangesAsync();

            return NoContent();
        }

        [HttpPut("unhide-product/{id}")]

        public async Task<IActionResult> UnHideProduct(int id)
        {
            if (_appContext.Products == null)
            {
                return NotFound();
            }
            var product = await _appContext.Products.FindAsync(id);
            if (product == null)
            {
                return NotFound();
            }

            product.IsActive = true;
            await _appContext.SaveChangesAsync();

            return NoContent();
        }

        private bool ProductExists(int id)
        {
            return (_appContext.Products?.Any(e => e.Product_ID == id)).GetValueOrDefault();
        }

    }
}
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":star: Introducing Xero Boost Days! :star:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Sydney! \n\nWe're excited to announce the launch of our Boost Day Program!\n\nStarting this week, as part of our <https://xpresso.xero.com/blog/featured/more-opportunities-to-come-together-with-xeros-connect/|*Xeros Connect Strategy*>, you'll experience supercharged days at the office every *Wednesday* and *Thursday*. Get ready for a blend of delicious food, beverages, wellness activites, and fun connections!\n\nPlease see below for what's on this week! "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-31: Wednesday, 31th July",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n:coffee: *Café Partnership*: Café Partnership: Enjoy free coffee and café-style beverages from our partner, *Elixir Sabour*, which used to be called Hungry Bean.\n:breakfast: *Morning Tea*: Provided by *Elixir Sabour* from *9AM - 10AM* in the All Hands.\n:massage:*Wellbeing*: Crossfit class at *Be Athletic* from 11am."
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-1: Thursday, 1st August",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":coffee: *Café Partnership*: Café Partnership: Enjoy coffee and café-style beverages from our partner, *Elixir Sabour*, which used to be called Hungry Bean.\n:late-cake: *Lunch*: Provided by *Elixir Sabour* from *12:30PM - 1:30PM* in the All Hands."
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*LATER THIS MONTH:*"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*Thursday, 22nd August*\n :blob-party: *Social +*: Drinks, food, and engaging activities bringing everyone together."
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Stay tuned to this channel for more details, check out the <https://calendar.google.com/calendar/u/0/r?cid=Y185aW90ZWV0cXBiMGZwMnJ0YmtrOXM2cGFiZ0Bncm91cC5jYWxlbmRhci5nb29nbGUuY29t|*Sydney Social Calendar*>, and get ready to Boost your workdays!\n\nLove,\nWX Team :party-wx:"
			}
		}
	]
}
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":star: Introducing Xero Boost Days! :star:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Hey Melbourne! \n\nWe're excited to announce the launch of our Boost Day Program!\n\nStarting this week, as part of our <https://xpresso.xero.com/blog/featured/more-opportunities-to-come-together-with-xeros-connect/|*Xeros Connect Strategy*>, you'll experience supercharged days at the office every *Wednesday* and *Thursday*. Get ready for a blend of delicious food, beverages, wellness activites, and fun connections!\n\nPlease see below for what's on this week! "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-30: Wednesday, 31st July",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n:coffee: *Xero Café*: Café-style beverages and sweet treats.\n:clipboard: *Weekly Café Special*: _Biscoff Latte_.\n:late-cake: *Afternoon Tea*: Provided by *Your Private Chef* from *2pm - 3pm* in the Wominjeka Breakout Space.\n:massage:*Wellbeing - Massage*: Book a session <https://bookings.corporatebodies.com/|*here*> to relax and unwind. \n *Username:* xero \n *Password:* 1234"
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-1: Thursday, 1st August",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":coffee: *Xero Café*: Café-style beverages and sweet treats.\n:clipboard: *Weekly Café Special*: _Biscoff Latte_.\n:breakfast: *Breakfast*: Provided by *Kartel Catering* from *8:30am - 10:30am* in the Wominjeka Breakout Space.\n "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*LATER THIS MONTH:*"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*Thursday, 22nd August*\n :blob-party: *Social +*: Drinks, food, and engaging activities bringing everyone together."
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Stay tuned to this channel for more details, check out the <https://calendar.google.com/calendar/u/0?cid=Y19xczkyMjk5ZGlsODJzMjA4aGt1b3RnM2t1MEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t|*Melbourne Social Calendar*>, and get ready to Boost your workdays!\n\nLove,\nWX Team :party-wx:"
			}
		}
	]
}
function slick_cdn_enqueue_scripts(){
	wp_enqueue_style( 'slick-style', '//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css' );
	wp_enqueue_script( 'slick-script', '//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.min.js', array(), null, true );
}
add_action( 'wp_enqueue_scripts', 'slick_cdn_enqueue_scripts' );
List<Account> accountList = new List<Account>();

Datetime startDttm = System.now();
for( Integer i = 0; i < 1000; i++ ) {
	update accountList;
}
system.debug( 'update no checks -> ' + ( System.now().getTime() - startDttm.getTime() ) );

startDttm = System.now();
for( Integer j = 0; j < 1000; j++ ) {
    if( ! accountList.isEmpty() ) {
        update accountList;
    }
}
system.debug( 'check before update -> ' + ( System.now().getTime() - startDttm.getTime() ) );
*DateTable = 
VAR MinDate = MIN(OE_INV_SNAPSHOTS[Actual_Snapshot_Date])
VAR MaxDate = MAX(OE_INV_SNAPSHOTS[Actual_Snapshot_Date])
RETURN
ADDCOLUMNS (
    CALENDAR ( MinDate, MaxDate ),
    "Year", YEAR([Date]),
    "Month", MONTH([Date]),
    "Day", DAY([Date]),
    "Quarter", QUARTER([Date]),
    "MonthName", FORMAT([Date], "MMMM"),
    "Weekday", WEEKDAY([Date], 2),
    "WeekdayName", FORMAT([Date], "dddd"),
    "YearMonth", FORMAT([Date], "YYYY-MM")
)
@ECHO OFF

@REM WARNING: This file is created by the Configuration Wizard.
@REM Any changes to this script may be lost when adding extensions to this configuration.

SETLOCAL

@REM --- Start Functions ---

GOTO :ENDFUNCTIONS

:stopAll
    @REM We separate the stop commands into a function so we are able to use the trap command in Unix (calling a function) to stop these services
    if NOT "X%ALREADY_STOPPED%"=="X" (
        exit /b
    )
    @REM STOP DERBY (only if we started it)
    if "%DERBY_FLAG%"=="true" (
        echo Stopping Derby server...
        call "%WL_HOME%\common\derby\bin\stopNetworkServer.cmd"  >"%DOMAIN_HOME%\derbyShutdown.log" 2>&1 

        echo Derby server stopped.
    )

    set ALREADY_STOPPED=true
GOTO :EOF

:generateClassList
    set JAVA_OPTIONS=%JAVA_OPTIONS% -Xshare:off -XX:+UnlockCommercialFeatures -XX:+IgnoreEmptyClassPaths -XX:DumpLoadedClassList=%APPCDS_CLASS_LIST% -XX:+UseAppCDS
GOTO :EOF

:useArchive
    set JAVA_OPTIONS=%JAVA_OPTIONS% -XX:+UnlockCommercialFeatures -Xshare:auto -XX:+UseAppCDS -XX:+IgnoreEmptyClassPaths -XX:SharedArchiveFile=%APPCDS_ARCHIVE% -showversion
    set USING_SHOWVERSION=true
GOTO :EOF


:ENDFUNCTIONS
ECHO HOLA.........................................................................
@REM --- End Functions ---

@REM *************************************************************************
@REM This script is used to start WebLogic Server for this domain.
@REM 
@REM To create your own start script for your domain, you can initialize the
@REM environment by calling @USERDOMAINHOME\setDomainEnv.
@REM 
@REM setDomainEnv initializes or calls commEnv to initialize the following variables:
@REM 
@REM BEA_HOME       - The BEA home directory of your WebLogic installation.
@REM JAVA_HOME      - Location of the version of Java used to start WebLogic
@REM                  Server.
@REM JAVA_VENDOR    - Vendor of the JVM (i.e. BEA, HP, IBM, Sun, etc.)
@REM PATH           - JDK and WebLogic directories are added to system path.
@REM WEBLOGIC_CLASSPATH
@REM                - Classpath needed to start WebLogic Server.
@REM PATCH_CLASSPATH - Classpath used for patches
@REM PATCH_LIBPATH  - Library path used for patches
@REM PATCH_PATH     - Path used for patches
@REM WEBLOGIC_EXTENSION_DIRS - Extension dirs for WebLogic classpath patch
@REM JAVA_VM        - The java arg specifying the VM to run.  (i.e.
@REM                - server, -hotspot, etc.)
@REM USER_MEM_ARGS  - The variable to override the standard memory arguments
@REM                  passed to java.
@REM PRODUCTION_MODE - The variable that determines whether Weblogic Server is started in production mode.
@REM DERBY_HOME - Derby home directory.
@REM DERBY_CLASSPATH
@REM                - Classpath needed to start Derby.
@REM 
@REM Other variables used in this script include:
@REM SERVER_NAME    - Name of the weblogic server.
set "JAVA_OPTIONS=%JAVA_OPTIONS% -DUPLOAD_HOME=C:\files"
@REM JAVA_OPTIONS   - Java command-line options for running the server. (These
@REM                  will be tagged on to the end of the JAVA_VM and
@REM                  MEM_ARGS)
@REM PROXY_SETTINGS - These are tagged on to the end of the JAVA_OPTIONS. This variable is deprecated and should not
@REM                  be used. Instead use JAVA_OPTIONS
@REM 
@REM For additional information, refer to "Administering Server Startup and Shutdown for Oracle WebLogic Server"
@REM *************************************************************************

set SCRIPTPATH=%~dp0
set SCRIPTPATH=%SCRIPTPATH%
for %%i in ("%SCRIPTPATH%") do set SCRIPTPATH=%%~fsi


@REM Call setDomainEnv here.

set DOMAIN_HOME=C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain
for %%i in ("%DOMAIN_HOME%") do set DOMAIN_HOME=%%~fsi

call "%DOMAIN_HOME%\bin\setDomainEnv.cmd" %*

set SAVE_JAVA_OPTIONS=%JAVA_OPTIONS%

set SAVE_CLASSPATH=%CLASSPATH%

set TMP_UPDATE_SCRIPT=%TMP%\update.cmd


@REM Start Derby

set DERBY_DEBUG_LEVEL=0

if "%DERBY_FLAG%"=="true" (
    call "%WL_HOME%\common\derby\bin\startNetworkServer.cmd"  >"%DOMAIN_HOME%\derby.log" 2>&1 

)

set JAVA_OPTIONS=%SAVE_JAVA_OPTIONS%

@REM In order to use resource consumption management policies or to get partition's resource consumption metrics, uncomment the following JAVA_OPTIONS

set #JAVA_OPTIONS=-XX:+UnlockCommercialFeatures -XX:+ResourceManagement -XX:+UseG1GC %SAVE_JAVA_OPTIONS%

set SAVE_JAVA_OPTIONS=

set CLASSPATH=%SAVE_CLASSPATH%

set SAVE_CLASSPATH=

if "%PRODUCTION_MODE%"=="true" (
    set WLS_DISPLAY_MODE=Production
) else (
    set WLS_DISPLAY_MODE=Development
)

if NOT "%WLS_USER%"=="" (
    set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.management.username=%WLS_USER%
)

if NOT "%WLS_PW%"=="" (
    set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.management.password=%WLS_PW%
)

if NOT "%MEDREC_WEBLOGIC_CLASSPATH%"=="" (
    if NOT "%CLASSPATH%"=="" (
        set CLASSPATH=%CLASSPATH%;%MEDREC_WEBLOGIC_CLASSPATH%
    ) else (
        set CLASSPATH=%MEDREC_WEBLOGIC_CLASSPATH%
    )
)

if "%GENERATE_CLASS_LIST%"=="true" (
    CALL :generateClassList
)

if "%USE_ARCHIVE%"=="true" (
    CALL :useArchive
)

echo .

echo .

echo JAVA Memory arguments: %MEM_ARGS%

echo .

echo CLASSPATH=%CLASSPATH%

echo .

echo PATH=%PATH%

echo .

echo ***************************************************

echo *  To start WebLogic Server, use a username and   *

echo *  password assigned to an admin-level user.  For *

echo *  server administration, use the WebLogic Server *

echo *  console at http:\\hostname:port\console        *

echo ***************************************************

@REM START WEBLOGIC

if NOT "%USE_JVM_SYSTEM_LOADER%"=="true" (
    set LAUNCH_ARGS=-cp %WL_HOME%\server\lib\weblogic-launcher.jar -Dlaunch.use.env.classpath=true
)

if "%USING_SHOWVERSION%"=="true" (
    echo starting weblogic with Java version:
    %JAVA_HOME%\bin\java %JAVA_VM% -version
)

if "%WLS_REDIRECT_LOG%"=="" (
    echo Starting WLS with line:
    echo %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% %LAUNCH_ARGS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WLS_POLICY_FILE% %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS%
    %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% %LAUNCH_ARGS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WLS_POLICY_FILE% %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS%
) else (
    echo Redirecting output from WLS window to %WLS_REDIRECT_LOG%
    %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% %LAUNCH_ARGS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WLS_POLICY_FILE% %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS%  >"%WLS_REDIRECT_LOG%" 2>&1 
)

IF ERRORLEVEL 86 IF NOT ERRORLEVEL 87 (set shutDownStatus=86) ELSE (IF ERRORLEVEL 88 IF NOT ERRORLEVEL 89 ( set shutDownStatus=88 ) )


CALL :stopAll

popd

IF EXIST %TMP_UPDATE_SCRIPT% (set fileExists=true) ELSE (set fileExists=false)


if "%shutDownStatus%"=="86" (
    if "%fileExists%"=="true" (
        echo Calling %TMP_UPDATE_SCRIPT%

        cd %TMP:~0,2%
        cd %TMP%
        call %TMP_UPDATE_SCRIPT%
        IF ERRORLEVEL 42 IF NOT ERRORLEVEL 43 (set ustatus=42 )

        @REM restoring the original env before unsetting JAVA_HOME
        @REM in order to unset any JAVA_HOME that was passed in from domainEnv
        if "%ustatus%"=="42" (
            set JAVA_HOME=
        )
    ) else (
        echo ERROR! %TMP_UPDATE_SCRIPT% did not exist
    )
    @REM Call the same script path that was supplied in order to restart ourselves
    @REM restoreOrigEnv will go here

    call "%SCRIPTPATH%\startWebLogic.cmd"

) else (
    if "%shutDownStatus%"=="88" (
        @REM restoreOrigEnv will go here

        call "%SCRIPTPATH%\startWebLogic.cmd"

    )
)

@REM Exit this script only if we have been told to exit.

if "%doExitFlag%"=="true" (
    exit
)



ENDLOCAL

// } Driver Code Ends


//User function Template for Java


class Solution
{
    //Function to return a list containing the bottom view of the given tree.
    public ArrayList <Integer> bottomView(Node root)
    {
        // Code here
        
        Queue<Pair> q = new ArrayDeque<>();
        
        TreeMap<Integer,Integer> mpp=new TreeMap<>();
        
        q.add(new Pair(0,root));
        
        while(!q.isEmpty()){
            Pair curr = q.poll();
            mpp.put(curr.hd,curr.node.data);
            
            if(curr.node.left!=null){
                q.add(new Pair(curr.hd-1,curr.node.left));
            }
            if(curr.node.right!=null){
                q.add(new Pair(curr.hd+1,curr.node.right));
            }
        }
        
        
        ArrayList<Integer> res = new ArrayList<>();
        
        for(Map.Entry<Integer,Integer> entry: mpp.entrySet()){
            res.add(entry.getValue());
        }
        
        
        return res;
        
        
        
    }
    
    
    static class Pair{
        int hd;
        Node node;
        
        public Pair(int hd,Node node){
            this.hd=hd;
            this.node = node;
        }
    }
    
    
}
 class Solution{
    //Function to return a list containing the bottom view of the given tree.
    public ArrayList <Integer> bottomView(Node root){
        // Code here
        
         
    
        // Code here
        
        Queue<Pair> q = new ArrayDeque<>();
        
        TreeMap<Integer,Integer> mpp=new TreeMap<>();
        
        q.add(new Pair(0,root));
        
        while(!q.isEmpty()){
            Pair curr = q.poll();
            mpp.put(curr.hd,curr.node.data);
            
            if(curr.node.left!=null){
                q.add(new Pair(curr.hd-1,curr.node.left));
            }
            if(curr.node.right!=null){
                q.add(new Pair(curr.hd+1,curr.node.right));
            }
        }
        
        
        ArrayList<Integer> res = new ArrayList<>();
        
        for(Map.Entry<Integer,Integer> entry: mpp.entrySet()){
            res.add(entry.getValue());
        }
        
        
        return res;
        
        
        
    }
    
    static class Pair{
        int hd;
        Node node;
        
        public Pair(int hd,Node node){
            this.hd=hd;
            this.node = node;
        }
    }
    
    
    
    
    
    
}           
                        
import datetime
import json

from psycopg2.extras import DateRange, DateTimeTZRange, NumericRange, Range

from django.contrib.postgres import forms, lookups
from django.db import models
from django.db.models.lookups import PostgresOperatorLookup

from .utils import AttributeSetter

__all__ = [
    'RangeField', 'IntegerRangeField', 'BigIntegerRangeField',
    'DecimalRangeField', 'DateTimeRangeField', 'DateRangeField',
    'RangeBoundary', 'RangeOperators',
]



[docs]class RangeBoundary(models.Expression):
    """A class that represents range boundaries."""
    def __init__(self, inclusive_lower=True, inclusive_upper=False):
        self.lower = '[' if inclusive_lower else '('
        self.upper = ']' if inclusive_upper else ')'

    def as_sql(self, compiler, connection):
        return "'%s%s'" % (self.lower, self.upper), []




[docs]class RangeOperators:
    # https://www.postgresql.org/docs/current/functions-range.html#RANGE-OPERATORS-TABLE
    EQUAL = '='
    NOT_EQUAL = '<>'
    CONTAINS = '@>'
    CONTAINED_BY = '<@'
    OVERLAPS = '&&'
    FULLY_LT = '<<'
    FULLY_GT = '>>'
    NOT_LT = '&>'
    NOT_GT = '&<'
    ADJACENT_TO = '-|-'




[docs]class RangeField(models.Field):
    empty_strings_allowed = False

    def __init__(self, *args, **kwargs):
        # Initializing base_field here ensures that its model matches the model for self.
        if hasattr(self, 'base_field'):
            self.base_field = self.base_field()
        super().__init__(*args, **kwargs)

    @property
    def model(self):
        try:
            return self.__dict__['model']
        except KeyError:
            raise AttributeError("'%s' object has no attribute 'model'" % self.__class__.__name__)

    @model.setter
    def model(self, model):
        self.__dict__['model'] = model
        self.base_field.model = model

    @classmethod
    def _choices_is_value(cls, value):
        return isinstance(value, (list, tuple)) or super()._choices_is_value(value)

    def get_prep_value(self, value):
        if value is None:
            return None
        elif isinstance(value, Range):
            return value
        elif isinstance(value, (list, tuple)):
            return self.range_type(value[0], value[1])
        return value

    def to_python(self, value):
        if isinstance(value, str):
            # Assume we're deserializing
            vals = json.loads(value)
            for end in ('lower', 'upper'):
                if end in vals:
                    vals[end] = self.base_field.to_python(vals[end])
            value = self.range_type(**vals)
        elif isinstance(value, (list, tuple)):
            value = self.range_type(value[0], value[1])
        return value

    def set_attributes_from_name(self, name):
        super().set_attributes_from_name(name)
        self.base_field.set_attributes_from_name(name)

    def value_to_string(self, obj):
        value = self.value_from_object(obj)
        if value is None:
            return None
        if value.isempty:
            return json.dumps({"empty": True})
        base_field = self.base_field
        result = {"bounds": value._bounds}
        for end in ('lower', 'upper'):
            val = getattr(value, end)
            if val is None:
                result[end] = None
            else:
                obj = AttributeSetter(base_field.attname, val)
                result[end] = base_field.value_to_string(obj)
        return json.dumps(result)

    def formfield(self, **kwargs):
        kwargs.setdefault('form_class', self.form_field)
        return super().formfield(**kwargs)




[docs]class IntegerRangeField(RangeField):
    base_field = models.IntegerField
    range_type = NumericRange
    form_field = forms.IntegerRangeField

    def db_type(self, connection):
        return 'int4range'




[docs]class BigIntegerRangeField(RangeField):
    base_field = models.BigIntegerField
    range_type = NumericRange
    form_field = forms.IntegerRangeField

    def db_type(self, connection):
        return 'int8range'




[docs]class DecimalRangeField(RangeField):
    base_field = models.DecimalField
    range_type = NumericRange
    form_field = forms.DecimalRangeField

    def db_type(self, connection):
        return 'numrange'




[docs]class DateTimeRangeField(RangeField):
    base_field = models.DateTimeField
    range_type = DateTimeTZRange
    form_field = forms.DateTimeRangeField

    def db_type(self, connection):
        return 'tstzrange'




[docs]class DateRangeField(RangeField):
    base_field = models.DateField
    range_type = DateRange
    form_field = forms.DateRangeField

    def db_type(self, connection):
        return 'daterange'



RangeField.register_lookup(lookups.DataContains)
RangeField.register_lookup(lookups.ContainedBy)
RangeField.register_lookup(lookups.Overlap)


class DateTimeRangeContains(PostgresOperatorLookup):
    """
    Lookup for Date/DateTimeRange containment to cast the rhs to the correct
    type.
    """
    lookup_name = 'contains'
    postgres_operator = RangeOperators.CONTAINS

    def process_rhs(self, compiler, connection):
        # Transform rhs value for db lookup.
        if isinstance(self.rhs, datetime.date):
            value = models.Value(self.rhs)
            self.rhs = value.resolve_expression(compiler.query)
        return super().process_rhs(compiler, connection)

    def as_postgresql(self, compiler, connection):
        sql, params = super().as_postgresql(compiler, connection)
        # Cast the rhs if needed.
        cast_sql = ''
        if (
            isinstance(self.rhs, models.Expression) and
            self.rhs._output_field_or_none and
            # Skip cast if rhs has a matching range type.
            not isinstance(self.rhs._output_field_or_none, self.lhs.output_field.__class__)
        ):
            cast_internal_type = self.lhs.output_field.base_field.get_internal_type()
            cast_sql = '::{}'.format(connection.data_types.get(cast_internal_type))
        return '%s%s' % (sql, cast_sql), params


DateRangeField.register_lookup(DateTimeRangeContains)
DateTimeRangeField.register_lookup(DateTimeRangeContains)


class RangeContainedBy(PostgresOperatorLookup):
    lookup_name = 'contained_by'
    type_mapping = {
        'smallint': 'int4range',
        'integer': 'int4range',
        'bigint': 'int8range',
        'double precision': 'numrange',
        'numeric': 'numrange',
        'date': 'daterange',
        'timestamp with time zone': 'tstzrange',
    }
    postgres_operator = RangeOperators.CONTAINED_BY

    def process_rhs(self, compiler, connection):
        rhs, rhs_params = super().process_rhs(compiler, connection)
        # Ignore precision for DecimalFields.
        db_type = self.lhs.output_field.cast_db_type(connection).split('(')[0]
        cast_type = self.type_mapping[db_type]
        return '%s::%s' % (rhs, cast_type), rhs_params

    def process_lhs(self, compiler, connection):
        lhs, lhs_params = super().process_lhs(compiler, connection)
        if isinstance(self.lhs.output_field, models.FloatField):
            lhs = '%s::numeric' % lhs
        elif isinstance(self.lhs.output_field, models.SmallIntegerField):
            lhs = '%s::integer' % lhs
        return lhs, lhs_params

    def get_prep_lookup(self):
        return RangeField().get_prep_value(self.rhs)


models.DateField.register_lookup(RangeContainedBy)
models.DateTimeField.register_lookup(RangeContainedBy)
models.IntegerField.register_lookup(RangeContainedBy)
models.FloatField.register_lookup(RangeContainedBy)
models.DecimalField.register_lookup(RangeContainedBy)


@RangeField.register_lookup
class FullyLessThan(PostgresOperatorLookup):
    lookup_name = 'fully_lt'
    postgres_operator = RangeOperators.FULLY_LT


@RangeField.register_lookup
class FullGreaterThan(PostgresOperatorLookup):
    lookup_name = 'fully_gt'
    postgres_operator = RangeOperators.FULLY_GT


@RangeField.register_lookup
class NotLessThan(PostgresOperatorLookup):
    lookup_name = 'not_lt'
    postgres_operator = RangeOperators.NOT_LT


@RangeField.register_lookup
class NotGreaterThan(PostgresOperatorLookup):
    lookup_name = 'not_gt'
    postgres_operator = RangeOperators.NOT_GT


@RangeField.register_lookup
class AdjacentToLookup(PostgresOperatorLookup):
    lookup_name = 'adjacent_to'
    postgres_operator = RangeOperators.ADJACENT_TO


@RangeField.register_lookup
class RangeStartsWith(models.Transform):
    lookup_name = 'startswith'
    function = 'lower'

    @property
    def output_field(self):
        return self.lhs.output_field.base_field


@RangeField.register_lookup
class RangeEndsWith(models.Transform):
    lookup_name = 'endswith'
    function = 'upper'

    @property
    def output_field(self):
        return self.lhs.output_field.base_field


@RangeField.register_lookup
class IsEmpty(models.Transform):
    lookup_name = 'isempty'
    function = 'isempty'
    output_field = models.BooleanField()


@RangeField.register_lookup
class LowerInclusive(models.Transform):
    lookup_name = 'lower_inc'
    function = 'LOWER_INC'
    output_field = models.BooleanField()


@RangeField.register_lookup
class LowerInfinite(models.Transform):
    lookup_name = 'lower_inf'
    function = 'LOWER_INF'
    output_field = models.BooleanField()


@RangeField.register_lookup
class UpperInclusive(models.Transform):
    lookup_name = 'upper_inc'
    function = 'UPPER_INC'
    output_field = models.BooleanField()


@RangeField.register_lookup
class UpperInfinite(models.Transform):
    lookup_name = 'upper_inf'
    function = 'UPPER_INF'
    output_field = models.BooleanField()
function add_custom_body_class($classes) {
if (has_blocks()) {
$classes[] = 'gutenberg-page';
}
if (is_woocommerce() || is_shop() || is_product_category() || is_product_tag()) {
$classes[] = 'woocommerce-page';
}
return $classes;
}
add_filter('body_class', 'add_custom_body_class');
//User function Template for Java

/* A Binary Tree node
class Node
{
    int data;
    Node left, right;

    Node(int item)
    {
        data = item;
        left = right = null;
    }
}*/
class Tree
{
    //Function to return list containing elements of left view of binary tree.
    ArrayList<Integer> leftView(Node root)
    {
      // Your code here
      
      ArrayList<Integer> res = new ArrayList<>();
      int level =0;
      
      leftView(root,res,level);
      
      return res;
    }
    
    
    private void leftView(Node node , List<Integer> res,int level){
        if(node == null){
            return;
        }
        
        if(level ==res.size()){
            res.add(node.data);
        }
        
        leftView(node.left,res,level+1);
        leftView(node.right,res,level+1);
    }
    
    
    
}
/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     int val;
 *     TreeNode left;
 *     TreeNode right;
 *     TreeNode() {}
 *     TreeNode(int val) { this.val = val; }
 *     TreeNode(int val, TreeNode left, TreeNode right) {
 *         this.val = val;
 *         this.left = left;
 *         this.right = right;
 *     }
 * }
 */
class Solution {
    ArrayList<Integer> res = new ArrayList<>();
    public List<Integer> postorderTraversal(TreeNode root) {
        postOrder(root);
        return res;
    }

    private void postOrder(TreeNode root){
        if(root == null){
            return;
        }
        postOrder(root.left);
        postOrder(root.right);
        res.add(root.val);
    }
}
/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     int val;
 *     TreeNode left;
 *     TreeNode right;
 *     TreeNode() {}
 *     TreeNode(int val) { this.val = val; }
 *     TreeNode(int val, TreeNode left, TreeNode right) {
 *         this.val = val;
 *         this.left = left;
 *         this.right = right;
 *     }
 * }
 */
class Solution {
    public List<Integer> preorderTraversal(TreeNode root) {

        List<Integer> res = new ArrayList<>();

        preOrder(root,res);

        return res;
        
    }


    private void preOrder(TreeNode node,List<Integer> res){
        if(node == null){
            return;
        }

        res.add(node.val);
        preOrder(node.left,res);
        preOrder(node.right,res);



    }
}
/**
 * Definition for a binary tree node.
 * public class TreeNode {
 * int val;
 * TreeNode left;
 * TreeNode right;
 * TreeNode() {}
 * TreeNode(int val) { this.val = val; }
 * TreeNode(int val, TreeNode left, TreeNode right) {
 * this.val = val;
 * this.left = left;
 * this.right = right;
 * }
 * }
 */
class Solution {
    public List<Integer> inorderTraversal(TreeNode root) {

        ArrayList<Integer> res = new ArrayList<>();
        inOrder(root, res);
        return res;

    }

    private void inOrder(TreeNode node, List<Integer> res) {
        if (node == null) {
            return;
        }

        inOrder(node.left, res);
        res.add(node.val);
        inOrder(node.right, res);
    }
}
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        
        int n = 4;
        int m =5;
        
        // outer loop
        for (int i = 1; i <=n ; i++) {
            // inner loop
            for (int j = 1; j <= m; j++) {
                if (i==1 || i==n || j==1 || j==m) {
                    System.out.print("*");
                }
                else {
                    System.out.print(" ");
                }

            }
            System.out.println();
           
        }
        
    }
}
 {
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":star: Introducing Xero Boost Days! :star:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Hey Wellington! \n\nWe're excited to announce the launch of our Boost Day Program!\n\nStarting this week, as part of our <https://xpresso.xero.com/blog/featured/more-opportunities-to-come-together-with-xeros-connect/|*Xeros Connect Strategy*>, you'll experience supercharged days at the office every *Tuesday* and *Thursday*. Get ready for a blend of delicious food, beverages, wellness activites, and fun connections!\n\nPlease see below for what's on this week! "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-30: Tuesday, 30th July",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n:coffee: *Xero Café*: Café-style beverages and sweet treats.\n:clipboard: *Weekly Café Special*: _Caramel Mocha Latte_.\n:breakfast: *Breakfast*: Provided by *Simply Food* from *8AM - 10AM* in the All Hands.\n:massage:*Wellbeing - Massage*: Book a session <https://www.google.com/|*here*> to relax and unwind."
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-1: Thursday, 1st August",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":coffee: *Xero Café*: Café-style beverages and sweet treats.\n:clipboard: *Weekly Café Special*: _Caramel Mocha Latte_.\n:late-cake: *Afternoon Tea*: Provided by *Little Bread Loaf* from *2:30PM - 3:30PM* in the All Hands.\n:yoga:*Fitness - Yoga Class*: Instructor-led session at *10:30AM* in the Gym. Sign up <google.com|*here*>!"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*LATER THIS MONTH:*"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*Thursday, 22nd August*\n :blob-party: *Social +*: Drinks, food, and engaging activities bringing everyone together."
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Stay tuned to this channel for more details, check out the <https://calendar.google.com/calendar/u/0?cid=Y180Y2UwNGEwNjY2YjI5NDNlZmEwZGM4YWI5MTdjMTcyNDE2NzVhZmQ5MTllN2EwZjg5NTg5OTVkMTA2MDAzZmEwQGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20|*Wellington Social Calendar*>, and get ready to Boost your workdays!\n\nLove,\nWX Team :party-wx:"
			}
		}
	]
}
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
@ECHO OFF
set list=Desktop Documents Downloads Favorites Music Pictures Videos
set baseLocation="%USERPROFILE%\OneDrive - Olivet Nazarene University\LocalPC\"
set "Key=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
set "Typ=REG_EXPAND_SZ"
set RegList="Desktop" "Personal" "{374DE290-123F-4565-9164-39C4925E467B}" "Favorites" "My Music" "My Pictures" "My Video"
set /a c=0
setLocal enableDelayedExpansion
for %%j in (%RegList%) do (
    set RegList[!c!]=%%j & set /a c=c+1
)
for %%i in (%list%) do (
    if not exist %baseLocation%%%i (
        mkdir %baseLocation%%%i
    ) else (
        echo %%i already exsists
    )
)
set baseLocation=%baseLocation:"=%
for %%i in (%list%) do (
    RoboCopy.exe "%USERPROFILE%\%%~i\." "%baseLocation%\%%~i\." *.* /MOV /FP /NP /IS /Z /E /NFL /NDL /NJH
)
set /a d=0
for %%k in (%list%) do (
    call set val=%%RegList[!d!]%% & Reg Add "%Key%" /f /V !val! /T %Typ% /D "%baseLocation%%%k" & set /a d=d+1
)  
echo DONE!
pause
@ECHO OFF
set list=Desktop Documents Downloads Favorites Music Pictures Videos
set baseLocation="%USERPROFILE%\OneDrive - Olivet Nazarene University\LocalPC\"
set "Key=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
set "Typ=REG_EXPAND_SZ"
set RegList="Desktop" "Personal" "{374DE290-123F-4565-9164-39C4925E467B}" "Favorites" "My Music" "My Pictures" "My Video"
set /a c=0
setLocal enableDelayedExpansion
for %%j in (%RegList%) do (
    set RegList[!c!]=%%j & set /a c=c+1
)
for %%i in (%list%) do (
    if not exist %baseLocation%%%i (
        mkdir %baseLocation%%%i
    ) else (
        echo %%i already exsists
    )
)
set baseLocation=%baseLocation:"=%
for %%i in (%list%) do (
    RoboCopy.exe "%USERPROFILE%\%%~i\." "%baseLocation%\%%~i\." *.* /MOV /FP /NP /IS /Z /E /NFL /NDL /NJH
)
set /a d=0
for %%k in (%list%) do (
    call set val=%%RegList[!d!]%% & Reg Add "%Key%" /f /V !val! /T %Typ% /D "%baseLocation%%%k" & set /a d=d+1
)  
echo DONE!
pause
[HttpPost]
[Route("ForgotPassword")]
public async Task<IActionResult> ForgotPassword(ForgotPasswordViewModel model)
{
    if (!ModelState.IsValid)
    {
        return BadRequest("Invalid data.");
    }

    var user = await _userManager.FindByEmailAsync(model.Email);
    if (user == null)
    {
        return NotFound("User not found.");
    }

    var token = await _userManager.GeneratePasswordResetTokenAsync(user);
    var encodedToken = HttpUtility.UrlEncode(token);

    // Send the token to the user's email
    var resetLink = Url.Action("ResetPassword", "Account", new { token = encodedToken, email = model.Email }, Request.Scheme);
    // Add email sending logic here

    return Ok(encodedToken);
}



[HttpPost]
[Route("ResetPassword")]
public async Task<IActionResult> ResetPassword([FromBody] ResetPasswordViewModel model)
{
    if (!ModelState.IsValid)
    {
        return BadRequest("Invalid data.");
    }

    var user = await _userManager.FindByEmailAsync(model.Email);
    if (user == null)
    {
        return NotFound("User not found.");
    }

    var decodedToken = HttpUtility.UrlDecode(model.Token);
    var result = await _userManager.ResetPasswordAsync(user, decodedToken, model.Password);
    if (result.Succeeded)
    {
        return Ok("Password has been reset successfully.");
    }

    // Log errors for debugging
    var errors = string.Join(", ", result.Errors.Select(e => e.Description));
    return BadRequest($"Error while resetting the password: {errors}");
}
/// Usage


 CustomPaint(
                        painter: SegmentBorderPainter(
                          divisions: 3, // Number of divisions
                          gradient: const LinearGradient(
                            colors: [
                              Colors.orange,
                              Colors.orange,
                              Colors.red,
                              Colors.red,
                            ],
                          ),
                        ), 
                        child: Container(
                          height: 58.r,
                          width: 58.r,
                          child: SizedBox.shrink(),
                          ),
                        ),
                      ),


/// CODE

class SegmentBorderPainter extends CustomPainter {
  final int divisions;
  final double strokeWidth;
  final Gradient gradient;

  SegmentBorderPainter({
    required this.divisions,
    this.strokeWidth = 3.0,
    required this.gradient,
  });

  @override
  void paint(Canvas canvas, Size size) {
    final Paint paint = Paint()
      ..strokeWidth = strokeWidth
      ..style = PaintingStyle.stroke;

    final double radius = size.width / 2;
    final double angle = (2 * 3.141592653589793) / divisions;
    const double startAngle = -3.141592653589793 / 2;

    paint.shader = gradient.createShader(
      Rect.fromCircle(center: Offset(radius, radius), radius: radius),
    );

    if (divisions == 1) {
      canvas.drawCircle(Offset(radius, radius), radius, paint);
    } else if (divisions == 2) {
      for (int i = 0; i < divisions; i++) {
        canvas.drawArc(
          Rect.fromCircle(center: Offset(radius, radius), radius: radius),
          startAngle + i * angle + 0.08,
          angle * 0.95,
          false,
          paint,
        );
      }
    } else {
      for (int i = 0; i < divisions; i++) {
        canvas.drawArc(
          Rect.fromCircle(center: Offset(radius, radius), radius: radius),
          startAngle + i * angle + 0.05,
          angle * 0.95,
          false,
          paint,
        );
      }
    }
  }

  @override
  bool shouldRepaint(covariant CustomPainter oldDelegate) {
    return false;
  }
}
<#
Run Get-ExecutionPolicy. If it returns Restricted, then run Set-ExecutionPolicy AllSigned or Set-ExecutionPolicy Bypass -Scope Process.
Now run the following command:
#>

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
using av_motion_api.Data;
using av_motion_api.Factory;
using av_motion_api.Models;
using av_motion_api.Interfaces;
using av_motion_api.Services;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.IdentityModel.Tokens;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.Extensions.Logging;
using System.Text;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using System.Text.Json.Serialization;

var builder = WebApplication.CreateBuilder(args);

// Configure the app environment
ConfigurationManager configuration = builder.Configuration;

builder.Configuration.SetBasePath(Directory.GetCurrentDirectory())
    .AddJsonFile($"appsettings.{builder.Environment.EnvironmentName}.json", optional: false);

builder.Host.ConfigureAppConfiguration((hostingContext, config) =>
{
    config.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
    config.AddJsonFile($"appsettings.{builder.Environment.EnvironmentName}.json", optional: true);
});

// Configure logging
builder.Logging.ClearProviders();
builder.Logging.AddConsole();
builder.Logging.AddDebug();

// CORS
if (builder.Environment.IsDevelopment())
{
    builder.Services.AddCors(options =>
    {
        options.AddPolicy("AllowAll", policy =>
        {
            policy.AllowAnyOrigin()
                  .AllowAnyHeader()
                  .AllowAnyMethod();
        });
    });
}

// Add services to the container
builder.Services.AddControllers()
                .AddJsonOptions(options =>
                {
                    options.JsonSerializerOptions.ReferenceHandler = ReferenceHandler.IgnoreCycles;
                    options.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull;
                });

// SQL
builder.Services.AddDbContext<AppDbContext>(options =>
    options.UseSqlServer(configuration.GetConnectionString("DefaultConnection")));
builder.Services.AddScoped<IRepository, Repository>();

builder.Services.AddIdentity<User, Role>(options =>
                {
                    options.Password.RequireUppercase = false;
                    options.Password.RequireLowercase = false;
                    options.Password.RequireNonAlphanumeric = false;
                    options.Password.RequireDigit = true;
                    options.User.RequireUniqueEmail = true;
                })
                .AddRoles<Role>()
                .AddEntityFrameworkStores<AppDbContext>()
                .AddDefaultTokenProviders();

builder.Services.AddAuthentication(options =>
                {
                    options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
                    options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
                    options.DefaultScheme = JwtBearerDefaults.AuthenticationScheme;
                })
                .AddCookie()
                .AddJwtBearer(options =>
                {
                    options.TokenValidationParameters = new TokenValidationParameters()
                    {
                        ValidateIssuer = true,
                        ValidateAudience = true,
                        ValidateLifetime = true,
                        ValidateIssuerSigningKey = true,
                        ValidIssuer = builder.Configuration["Tokens:Issuer"],
                        ValidAudience = builder.Configuration["Tokens:Audience"],
                        IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(builder.Configuration["Tokens:Key"]))
                    };
                });

// Configure FormOptions for file uploads
builder.Services.Configure<FormOptions>(o =>
{
    o.ValueLengthLimit = int.MaxValue;
    o.MultipartBodyLengthLimit = int.MaxValue;
    o.MemoryBufferThreshold = int.MaxValue;
});

builder.Services.AddScoped<IUserClaimsPrincipalFactory<User>, AppUserClaimsPrincipalFactory>();

builder.Services.Configure<DataProtectionTokenProviderOptions>(options => options.TokenLifespan = TimeSpan.FromHours(3));

// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

var app = builder.Build();

// Configure the HTTP request pipeline
if (app.Environment.IsDevelopment())
{
    app.UseSwagger();
    app.UseSwaggerUI();
}

// Use CORS
app.UseCors("AllowAll");

app.UseHttpsRedirection();
app.UseAuthentication();
app.UseAuthorization();

app.MapControllers();

app.Use(async (context, next) =>
{
    var logger = app.Services.GetRequiredService<ILogger<Program>>();
    logger.LogInformation("Handling request: " + context.Request.Path);
    await next.Invoke();
    logger.LogInformation("Finished handling request.");
});

app.Run();
import requests
import json
import sys
sys.path.append('/Workspace/Users/khoa.nguyen@houstontexans.com/production_jobs/Data_Ops_Tools')
import EnvVars
from EnvVars import env_vars_dict


apigeeKey = env_vars_dict['tm']['apiKey']
eventName = '23COPAST'
startDateTime = '2023-07-26 12:00'

url = "https://app.ticketmaster.com/sth-buy/ticketing_services.aspx?dsn=texans"

payload = {
  "header":{
    "src_sys_type":2,"ver":1
    ,"src_sys_name":"test"
    ,"archtics_version":"V999"
    },
  "command1":{
    "cmd":"get_attendance_incremental"
    ,"start_datetime":startDateTime
    ,"uid":"texans64"
    ,"dsn":"texans"
    ,"event_name":eventName
    }
  }

headers = {
  'apikey': apigeeKey, 
  'Content-Type': 'application/json',
  'Connection': 'keep-alive'
}

response = requests.post( url, headers=headers , json=payload)
data = response.json()
data
from datetime import datetime as dt , timedelta
print(len(os.listdir(processed_tm_sftp_files_root_dir)))

for f_dir in os.listdir(processed_tm_sftp_files_root_dir):
  folder_path = f"{processed_tm_sftp_files_root_dir}\{f_dir}"
  folder_date = f_dir.replace('texans_texans_texans_','').split('_')[0][:8]

  folder_date = dt.strptime(folder_date,'%Y%m%d')

  if folder_date < dt.today() - timedelta(days=120):

    for f in os.listdir(folder_path):
      file_path = f"{folder_path}\{f}"
      if os.path.isfile(file_path):
        os.remove(file_path)
        print(f"Deleted file: {file_path}")
import pandas as pd
 
sheets_dict = pd.read_excel('Book1.xlsx', sheetname=None)
 
full_table = pd.DataFrame()
for name, sheet in sheets_dict.items():
    sheet['sheet'] = name
    sheet = sheet.rename(columns=lambda x: x.split('\n')[-1])
    full_table = full_table.append(sheet)
 
full_table.reset_index(inplace=True, drop=True)
 
print full_table
import sys 
sys.path.append ('/Workspace/Users/khoa.nguyen@houstontexans.com/production_jobs/Data_Ops_Tools/') 

import EnvVars
from EnvVars import *

dev_credentials = env_vars_dict['azure_storage_dev']

from azure.storage.blob import BlobServiceClient , BlobClient

# Replace the following variables with your Azure Storage account and container information
storage_account_name = dev_credentials['accountName']
storage_account_key = dev_credentials['secretValue']
container_name = "raw"
directory_name = "PSL/"  # Leave empty to list files from the root of the container

mount_name = 'PSL'
directory_path = 'PSL'


dbutils.fs.mount(
  source=f"wasbs://{container_name}@{storage_account_name}.blob.core.windows.net/{directory_path}",
  mount_point=f"/mnt/azure_storage/{mount_name}",
  extra_configs={
    f"fs.azure.account.key.{storage_account_name}.blob.core.windows.net": storage_account_key
  }
)

# List all mount points
mounts = dbutils.fs.mounts()
## Date Formatting 

#### Sql
```sql
date_format(dt_obj, 'yyyy-MM-dd hh:mm:ss a') 
```

#### Python
```python
dt_obj.strftime("%-m-%d-%Y %-I:%M%p")
```
---
qry = """
SELECT COUNT(*) CNT , 'eloqua_contact' AS tbl
FROM reporting.eloqua_contact
UNION 
SELECT COUNT(*) CNT , 'eloqua_form' AS tbl
FROM reporting.eloqua_form
UNION 
SELECT COUNT(*) CNT , 'eloqua_form_submission' AS tbl
FROM reporting.eloqua_form_submission
UNION
SELECT COUNT(*) CNT , 'eloqua_system_preference_center' AS tbl
FROM reporting.eloqua_system_preference_center
UNION
SELECT COUNT(*) CNT , 'eloqua_system_sms_preference_center' AS tbl
FROM reporting.eloqua_system_sms_preference_center
UNION 
SELECT COUNT(*) CNT , 'eloqua_system_preference_center_toro_s_kids_club' AS tbl
FROM reporting.eloqua_system_preference_center_toro_s_kids_club
UNION
SELECT COUNT(*) CNT , 'eloqua_system_preference_center_historic' AS tbl
FROM reporting.eloqua_system_preference_center_historic
UNION
SELECT COUNT(*) CNT , 'eloqua_system_bi_prospect_scores' AS tbl
FROM reporting.eloqua_system_bi_prospect_scores

"""

# Get Pre Run Cnts
pre_run_df = spark.read.format("sqlserver")\
      .option("host", "sqls-houstontexans-db-01.database.windows.net")\
      .option("user", prodProperties['user']).option("password", prodProperties['password'])\
      .option("database","sqls-houstontexans")\
      .option("query", qry)\
      .option("fetchSize", 35000)\
      .load()
 
# write data from dbrix to azure
prod_dbrix_to_azure('eloqua.contact','reporting.eloqua_contact')
prod_dbrix_to_azure('eloqua.form','reporting.eloqua_form')
prod_dbrix_to_azure('eloqua.form_submission','reporting.eloqua_form_submission')
prod_dbrix_to_azure('eloqua.system_preference_center','reporting.eloqua_system_preference_center')
prod_dbrix_to_azure('eloqua.system_sms_preference_center','reporting.eloqua_system_sms_preference_center')
prod_dbrix_to_azure('eloqua.system_preference_center_toro_s_kids_club','reporting.eloqua_system_preference_center_toro_s_kids_club')
prod_dbrix_to_azure('eloqua.system_preference_center_historic','reporting.eloqua_system_preference_center_historic')
prod_dbrix_to_azure('eloqua.system_bi_prospect_scores','reporting.eloqua_system_bi_prospect_scores')

# Get Post Run Cnts
post_run_df = spark.read.format("sqlserver")\
      .option("host", "sqls-houstontexans-db-01.database.windows.net")\
      .option("user", prodProperties['user']).option("password", prodProperties['password'])\
      .option("database","sqls-houstontexans")\
      .option("query", qry)\
      .option("fetchSize", 35000)\
      .load()
      
# Compare Pre and Post Run Df 
pre_post_cnts_df = pre_run_df.join(post_run_df, on='tbl', how='inner').select(pre_run_df.tbl ,  pre_run_df.CNT.alias('pre_run_cnt'), post_run_df.CNT.alias('post_run_cnt'))
pre_post_cnts_df.display()
import sys 
sys.path.append ('/Workspace/Users/khoa.nguyen@houstontexans.com/production_jobs/Data_Ops_Tools/')
from DataOpsMainFunctions import prod_azure_to_dbrix, prod_dbrix_to_azure , prodProperties

query_azure_db_df = spark.read.format("sqlserver")\
      .option("host", "sqls-houstontexans-db-01.database.windows.net")\
      .option("user", prodProperties['user']).option("password", prodProperties['password'])\
      .option("database","sqls-houstontexans")\
      .option("query", "SELECT * FROM reporting.db_data_catalogue WHERE table_schema='survey_monkey'")\
      .option("fetchSize", 35000)\
      .load()
query_azure_db_df.display()
import React, {
  ChangeEvent,
  useEffect,
  useLayoutEffect,
  useRef,
  useState,
} from "react";
import { AttachCreatedFile, IDisplayComponentRef } from "./DisplayComponent";
import { Components, PropNames } from "./Components";
import {
  ComponentTitle,
  Container,
  GridItem,
  Label,
  TextInput,
  WideGridItem,
  WideTextInput,
  WideTextArea,
} from "./EditComponents";
import Repository from "../../common/repository/repository";
import config from "../../config.json";
import { ColorSelector } from "./ColorSelector";
import {
  AssetType,
  IAsset,
  IDirection,
  IObjectFit,
  ITemperatureType,
  IAnimatedDrmDotPosition,
  AssetNames,
} from "../../digital_assets_management/interfaces/IAsset";
import { useTranslations } from "../../i18n/useTranslations";
import { Input } from "reactstrap";
import { ThumbnailModal } from "../../common/components/ThumbnailModal";
import * as Constants from "../constants/component-constants";
import * as Global_Constants from "../../common/constants/shared-constants";
import * as Property_Constants from "../../common/constants/property-constants";
interface IComponentProps {
  component: IDisplayComponentRef | null;
  configuration: any;
  onValueChanged: (x: number, y: number, width: number, height: number) => void;
  onDeleteComponent?: (c: string) => void;
  onDuplicateComponent?: (c: IDisplayComponentRef) => void;
}
export const ComponentPropertyBar = ({
  component,
  configuration,
  onValueChanged,
  onDeleteComponent,
  onDuplicateComponent,
}: IComponentProps) => {
  const [checked, setChecked] = useState(true);
  const [isPlaying, setIsPlaying] = useState(false);
  const [align, setAlign] = useState("");
  const [extraProps, setExtraProps] = useState(
    {} as { [key: string]: any | number | boolean }
  );
  const refX = useRef<any>();
  const refY = useRef<any>();
  const refW = useRef<any>();
  const refH = useRef<any>();
  const i18n = useTranslations();
  const [createdFile, setCreatedFile] = useState({
    name: "",
    fileptr: Global_Constants.NOT_A_FP,
  } as AttachCreatedFile);
  const [styleAssets, setStyleAssets] = useState<IAsset[]>([]);
  const [arrowImage, setArrowImage] = useState<string | undefined>(undefined);
  const [imageAssets, setImageAssets] = useState<IAsset[]>([]);
  const [videoAssets, setVideoAssets] = useState<IAsset[]>([]);
  const [multiTextChecked, setMultiTextChecked] = useState(false);
  const [direction, setDirection] = useState<string>("left");
  const directionOptional = useRef([
    IDirection.LEFT,
    IDirection.RIGHT,
    IDirection.UP,
    IDirection.DOWN,
  ]);
  const [fitObject, setFitObject] = useState<string>();
  const objectsFitOptions = useRef([
    IObjectFit.CONTAIN,
    IObjectFit.COVER,
    IObjectFit.fill,
  ]);
  const [, setTempartureType] = useState();
  const tempartureTypesOptions = useRef([
    ITemperatureType.CELSIUS,

    ITemperatureType.FAHRENHEIT,
  ]);
  const [temperatureUnit, setTemperatureUnit] = useState<string>();
  const [ddrInputEvents, setDDRInputEvents] = useState<string>();
  const [animatedDrmDotOptionValue, setAnimatedDrmDotOptionValue] =
    useState("default");
  const animatedDrmDotPosition = useRef([
    IAnimatedDrmDotPosition.DEFAULT,
    IAnimatedDrmDotPosition.UPPER,
    IAnimatedDrmDotPosition.LOWER,
    IAnimatedDrmDotPosition.ZIGZAG,
  ]);
  const [showImageModal, setShowImageModal] = useState(false);
  const openImageModal = () => {
    setShowImageModal(true);
  };
  const closeImageModal = () => {
    setShowImageModal(false);
  };
  const [searchQuery, setSearchQuery] = useState("");
  const [numStations, setNumStations] = useState(2); // Default number of stations
  const [numberofArrows, setArrowIndex] = useState(0);
  const [fontOptions, setFontOptions] = useState([]);
  const [selectedFont, setSelectedFont] = useState("");
  const dataChanged = () => {
    const bounds = component!.getBounds();
    let x = parseInt(refX.current!.value);
    x = isNaN(x) ? bounds.x : x;
    let y = parseInt(refY.current!.value);
    y = isNaN(y) ? bounds.y : y;
    let width = parseInt(refW.current!.value);
    width = isNaN(width) ? bounds.width : width;
    let height = parseInt(refH.current!.value);
    height = isNaN(height) ? bounds.height : height;
    onValueChanged(x, y, width, height);
  };
  useEffect(() => {
    if (extraProps.direction) {
      setDirection(extraProps.direction.toString());
    } else {
      setDirection("left");
    }
  }, [extraProps.direction]);

  useEffect(() => {
    setExtraProps({});
    if (!component) return;
    const bounds = component.getBounds();
    setValue(refX.current!, Math.round(bounds.x));
    setValue(refY.current!, Math.round(bounds.y));
    setValue(refW.current!, Math.round(bounds.width));
    setValue(refH.current!, Math.round(bounds.height));
    const props = component.getExtraProps();
    if (props) {
      setExtraProps(props);
      setChecked(props[Property_Constants.IS_ANIMATED]);
      setAlign(props[Property_Constants.ALIGNMENT]);
      setIsPlaying(props[Property_Constants.IS_PLAYING]);
      setMultiTextChecked(props[Constants.MULTI_LINE_TEXT]);
      setFitObject(props[Constants.OBJECT_FIT]);
      setTempartureType(props[Property_Constants.TEMPERATURE_TYPE]);
      setDDRInputEvents(props[Property_Constants.DDR_EVENTS]);
      setNumStations(props[Property_Constants.NUM_STATIONS]);
      setArrowIndex(props[Property_Constants.NUMBER_OF_ARROWS]);
    }
    const attachedFile = component.getCreatedFile();
    if (attachedFile) {
      setCreatedFile(attachedFile);
    }
  }, [component]);
  useEffect(() => {
    const retreiveAssets = async () => {
      const styleAssets = (
        await Repository.getInstance().getAssets(0, 0, "", AssetType.Style)
      ).items;
      setStyleAssets(styleAssets);

      const imageAssets = (
        await Repository.getInstance().getAssets(0, 0, "", AssetType.Image)
      ).items;
      setImageAssets(imageAssets);

      const videoAssets = (
        await Repository.getInstance().getAssets(0, 0, "", AssetType.Video)
      ).items;
      setVideoAssets(videoAssets);
    };

    retreiveAssets();
  }, []);
  const setValue = (el: HTMLInputElement, value: number) => {
    el.value = value.toString();
  };
  const animateChanged = (t: HTMLInputElement) => {
    const newValue = t.checked;
    setChecked(newValue);
    const props = { ...extraProps, isAnimated: newValue };
    setExtraProps(props);
    component!.setExtraProps(props);
  };
  const multiLineChanged = (t: HTMLInputElement) => {
    const newValue = t.checked;
    setMultiTextChecked(newValue);
    const props = { ...extraProps, multiLineText: newValue };
    setExtraProps(props);
    component!.setExtraProps(props);
  };

  const changeAnimationDirection = (t: React.ChangeEvent<HTMLInputElement>) => {
    const newValue = t.target.value;
    setDirection(newValue);
    const props = { ...extraProps, direction: newValue };
    setExtraProps(props);
    component!.setExtraProps(props);
  };

  const handleTemperatureChange = (t: React.ChangeEvent<HTMLInputElement>) => {
    const newValue = t.target.value;
    const props = { ...extraProps, temperatureScales: newValue };
    setTemperatureUnit(newValue);
    setExtraProps(props);
    component!.setExtraProps(props);
  };
  const handleDotOptionChange = (t: React.ChangeEvent<HTMLInputElement>) => {
    const newValue = t.target.value;
    setAnimatedDrmDotOptionValue(newValue);
    const props = { ...extraProps, animatedDrmDotOptionValue: newValue };
    setExtraProps(props);
    component!.setExtraProps(props);
  };

  const handleFileUploadChange = (
    event: React.ChangeEvent<HTMLInputElement>
  ) => {
    const file = event.target.files?.[0];
    if (file) {
      const reader = new FileReader();
      reader.onload = (e) => {
        const uploadedFile = e.target?.result as string;
        // Set uploaded file as background image
        setArrowImage(uploadedFile);
      };
      reader.readAsDataURL(file);
    }
  };

  const changeProp = (
    propName: string,
    propValue: string | number | boolean
  ) => {
    const currentValue = extraProps[propName];
    if (currentValue !== propValue) {
      const props = { ...extraProps, [propName]: propValue };
      setExtraProps(props);
      component!.setExtraProps(props);
    }
  };

  const propChanged = (e: ChangeEvent<HTMLInputElement>) => {
    const propName = e.target.id.toString().substring(5);
    const newValue =
      typeof extraProps[propName] === "number"
        ? +e.target.value
        : typeof extraProps[propName] === "boolean"
        ? e.target.checked
        : e.target.value;

    changeProp(propName, newValue);
  };

  const propChangedForTextarea = (e: ChangeEvent<HTMLTextAreaElement>) => {
    const propName = e.target.id.toString().substring(5);
    const newValue = e.target.value;
    changeProp(propName, newValue);
  };

  const alignChanged = (e: ChangeEvent<HTMLInputElement>) => {
    const propName = e.target.id.toString().split("-")[1];
    const newValue = e.target.value;
    setAlign(newValue);
    changeProp(propName, newValue);
  };

  const changeInputDDREventState = (e: React.ChangeEvent<HTMLInputElement>) => {
    const ddrValue = e.target.value;
    const props = { ...extraProps, ddrEvents: ddrValue };
    setDDRInputEvents(ddrValue);
    setExtraProps(props);
    component!.setExtraProps(props);
  };

  const changeComponetObjectFit = (e: React.ChangeEvent<HTMLInputElement>) => {
    const targetValue = e.target.value;
    const props = { ...extraProps, objectFit: targetValue };
    setFitObject(targetValue);
    setExtraProps(props);
    component!.setExtraProps(props);
  };

  const handleStationChange = (e: React.ChangeEvent<HTMLInputElement>) => {
    //  const newNumStations = +e.target.value;
    const newNumStations = parseInt(e.target.value);
    setNumStations(newNumStations);
    // Ensure arrow index doesn't exceed the number of stations
    setArrowIndex(Math.min(numberofArrows, newNumStations - 1));
    const props = { ...extraProps, numStations: newNumStations };
    setExtraProps(props);
    component!.setExtraProps(props);
  };

  const handleArrowChange = (e: React.ChangeEvent<HTMLInputElement>) => {
    const newArrowIndex = Number(e.target.value);
    setArrowIndex(Math.max(0, Math.min(newArrowIndex, numStations - 1)));
    const props = { ...extraProps, numberofArrows: newArrowIndex };
    setExtraProps(props);
    component!.setExtraProps(props);
  };

  const changeComponentAssetSelector = (
    e: React.ChangeEvent<HTMLInputElement>,
    assetType: string | undefined
  ) => {
    let createdFile = {
      name: "",
      fileptr: Global_Constants.NOT_A_FP,
    } as AttachCreatedFile;
    let props = extraProps;
    if (e.target.value === Global_Constants.NOT_A_FP) {
      setCreatedFile(createdFile);
      return;
    }

    if (assetType === AssetType.Style) {
      const asset = styleAssets?.find((v) => v.file_pointer === e.target.value);
      if (!asset) return;
      props = { ...props, style: asset?.infoJson ?? "{}" };
      createdFile = {
        name: asset.name,
        fileptr: asset.file_pointer,
      } as AttachCreatedFile;
    } else {
      const asset =
        assetType === AssetType.Image
          ? imageAssets?.find((v) => v.file_pointer === e.target.value)
          : videoAssets?.find((v) => v.file_pointer === e.target.value);
      if (!asset) return;
      props = {
        ...extraProps,
        src: `${config.assetsUrl}/${asset.file_pointer}`,
        source: asset.name,
      };
      createdFile = {
        name: asset.name,
        fileptr: asset.file_pointer,
      } as AttachCreatedFile;
      if (assetType === AssetType.Video) {
        const bounds = component!.getBounds();
        const newSize = JSON.parse(asset.infoJson);
        component!.setBounds({
          ...bounds,
          width: newSize["width"],
          height: newSize["height"],
        });
      }
    }

    setExtraProps(props);
    component!.setExtraProps(props);
    setCreatedFile(createdFile);
    component!.setCreatedFile(createdFile);
  };

  function updateMultilanguage(locale: string, duration: any) {
    let multiLanguage = JSON.parse(
      String(extraProps[Property_Constants.MULTI_LANGUAGE])
    );
    multiLanguage = {
      ...multiLanguage,
      [locale]: { ...multiLanguage[locale], duration: duration },
    };
    return multiLanguage;
  }

  const handleMultilingualCheckboxChange = (
    e: any,
    localecode: string,
    sampleMessage: string
  ) => {
    const sortedLocales = [...configuration.medialocales.locales].sort(
      (a, b) => a.order - b.order
    );
    const allLocales = sortedLocales.map((item: any) => item.localecode);
    let multiLanguage = JSON.parse(
      String(extraProps[Property_Constants.MULTI_LANGUAGE])
    );

    const currentLocaleIndex = allLocales.indexOf(localecode);

    for (
      let index = currentLocaleIndex + 1;
      index < allLocales.length;
      index++
    ) {
      const nextLocale = allLocales[index];
      if (!e.target.checked) {
        if (multiLanguage[nextLocale].checked) {
          const nextLocaleDuration =
            parseInt(multiLanguage[nextLocale][Property_Constants.DURATION]) +
            parseInt(multiLanguage[localecode][Property_Constants.DURATION]);
          multiLanguage = updateMultilanguage(nextLocale, nextLocaleDuration);
          break;
        }
      } else {
        if (multiLanguage[nextLocale].checked) {
          let nextLocaleDuration =
            parseInt(multiLanguage[nextLocale][Property_Constants.DURATION]) -
            parseInt(multiLanguage[localecode][Property_Constants.DURATION]);
          nextLocaleDuration = Math.max(nextLocaleDuration, 0);
          multiLanguage = updateMultilanguage(nextLocale, nextLocaleDuration);
          break;
        }
      }
    }
    multiLanguage = {
      ...multiLanguage,
      [localecode]: {
        ...multiLanguage[localecode],
        id: localecode,
        sampleText: sampleMessage,
        checked: e.target.checked,
      },
    };
    const props = {
      ...extraProps,
      [Property_Constants.MULTI_LANGUAGE]: JSON.stringify(multiLanguage),
    };
    setExtraProps(props);
    component!.setExtraProps(props);
  };

  const handleDurationsInputChange = (
    event: React.ChangeEvent<HTMLInputElement>,
    locale: string
  ) => {
    const { value } = event.target;
    const multiLanguage = updateMultilanguage(locale, value);
    const props = {
      ...extraProps,
      [Property_Constants.MULTI_LANGUAGE]: JSON.stringify(multiLanguage),
    };
    setExtraProps(props);
    component!.setExtraProps(props);
  };

  const onMultilanguageTextChanged = (e: ChangeEvent<HTMLTextAreaElement>) => {
    const propName = e.target.id.toString().split("-")[1];
    const newValue = e.target.value;
    let multiLanguage = JSON.parse(
      String(extraProps[Property_Constants.MULTI_LANGUAGE])
    );
    multiLanguage = {
      ...multiLanguage,
      [propName]: {
        id: propName,
        sampleText: newValue,
        checked: true,
        duration: multiLanguage[propName][Property_Constants.DURATION],
      },
    };
    const props = {
      ...extraProps,
      [Property_Constants.MULTI_LANGUAGE]: JSON.stringify(multiLanguage),
    };
    setExtraProps(props);
    component!.setExtraProps(props);
  };

  const toProperCase = (s: string) => s.charAt(0).toUpperCase() + s.slice(1);

  const playPause = () => {
    const newValue = !isPlaying;
    setIsPlaying(newValue);
    changeProp(Property_Constants.IS_PLAYING, newValue);
    document
      .getElementById("icon-play")!
      .setAttribute("class", `fa fa-fw ${newValue ? "fa-pause" : "fa-play"}`);
  };

  const hiddenProps = [
    Property_Constants.SOURCE,
    Property_Constants.SRC,
    Property_Constants.IS_PLAYING,
    Constants.MULTI_LINE_TEXT,
    Constants.OBJECT_FIT,
    Property_Constants.TEMPERATURE_SCALES,
    Property_Constants.INPUT_BOX,
  ];

  const radioChanged = () => {
    //
  };

  const alignmentInput = (p: string, propId: string): JSX.Element => {
    return (
      <WideGridItem className="px-2" key={p}>
        <label>
          {i18n(Global_Constants.SCENE_LOCALES, PropNames[p]?.displayText) ??
            toProperCase(p)}
        </label>
        <div onChange={alignChanged} className="d-flex justify-content-between">
          <div>
            <input
              type="radio"
              id={propId + "-left"}
              value="left"
              checked={align === "left"}
              onChange={radioChanged}
            />
            <i className="fa fa-align-left mx-1" />
          </div>
          <div>
            <input
              type="radio"
              id={propId + "-center"}
              value="center"
              checked={align === "center"}
              onChange={radioChanged}
            />
            <i className="fa fa-align-center mx-1" />
          </div>
          <div>
            <input
              type="radio"
              id={propId + "-right"}
              value="right"
              checked={align === "right"}
              onChange={radioChanged}
            />
            <i className="fa fa-align-right mx-1" />
          </div>
        </div>
      </WideGridItem>
    );
  };

  const styleInput = (p: string, propId: string): JSX.Element => (
    <WideGridItem key="style">
      <Label htmlFor="prop-source" accessKey="s">
        {i18n(Global_Constants.GLOBAL, Global_Constants.STYLE)}
      </Label>
      <Input
        type="select"
        value={createdFile.fileptr}
        onChange={(e) => changeComponentAssetSelector(e, AssetType.Style)}
        id="comp-text-style-sel"
        name="comp-text-style-sel"
        title="Text Style selector"
        className="comp-textStyle-select"
      >
        <option value="_not_a_fp__" key="non_comp-text-style-id">
          {i18n(Global_Constants.SCENE_LOCALES, Constants.CHOOSE_STYLE)}
        </option>
        {styleAssets?.map((sa) => (
          <option
            key={`comp-text-style-id-${sa.file_pointer}`}
            value={sa.file_pointer}
          >
            {sa.name}
          </option>
        ))}
      </Input>
    </WideGridItem>
  );

  const DynamicField = (p: string) => {
    const renderFields = () => {
      const sortedLocales = [...configuration.medialocales.locales].sort(
        (a, b) => a.order - b.order
      );
      const multiLanguageText = JSON.parse(String(extraProps[p]));
      const inputBox = Boolean(extraProps.inputBox);
      const fields = sortedLocales.map((item: any) => {
        const { title, sampleText, localecode } = item;
        const languageTextObj =
          multiLanguageText && multiLanguageText[localecode]
            ? multiLanguageText[localecode]
            : {
                id: localecode,
                sampleText: sampleText,
                checked: true,
                duration: "4",
              };
        if (!multiLanguageText[localecode]) {
          multiLanguageText[localecode] = languageTextObj;
          const props = {
            ...extraProps,
            [p]: JSON.stringify(multiLanguageText),
          };
          setExtraProps(props);
          component!.setExtraProps(props);
        }
        return getInputWithCheckboxComponent(
          `${p}-${localecode}`,
          `multilanguage-${localecode}`,
          multiLanguageText[localecode].sampleText,
          onMultilanguageTextChanged,
          null,
          multiLanguageText[localecode].checked,
          title,
          inputBox,
          multiLanguageText[localecode].duration
        );
      });
      return fields;
    };
    return <>{renderFields()}</>;
  };

  const handleDropdownChange = (
    e: React.ChangeEvent<HTMLInputElement>,
    component: any,
    p: string,
    index: number
  ) => {
    const newValue = e.target.value;
    const updatedDropdown = extraProps.dropdown.map(
      (dropdownItem: any, idx: number) => {
        if (idx === index) {
          return { ...dropdownItem, selectedValue: newValue };
        }
        return dropdownItem;
      }
    );

    const props = {
      ...extraProps,
      dropdown: updatedDropdown,
    };
    setExtraProps(props);
    component!.setExtraProps(props);
  };

  const createDropdown = (p: string, component: any) => {
    const renderFields = () => {
      if (!Array.isArray(extraProps.dropdown)) {
        return null;
      }

      return extraProps.dropdown.map((dropdownItem: any, index: number) => {
        const dropdownData: any =
          Components[component.componentType].properties?.[dropdownItem.name];
        const dropdownOptions = dropdownData?.options || [];
        const selectedValue = dropdownItem.selectedValue;

        return (
          <WideGridItem key={index}>
            <Label
              htmlFor={`${component.componentType}${dropdownItem.name}Dropdown`}
            >
              {i18n(Global_Constants.SCENE_LOCALES, dropdownItem.name)}
            </Label>
            <Input
              type="select"
              onChange={(e) => handleDropdownChange(e, component, p, index)}
              className="animation-direction text-capitalize"
              value={selectedValue}
            >
              {dropdownOptions.map((value: any, idx: number) => (
                <option key={idx} value={value}>
                  {value}
                </option>
              ))}
            </Input>
          </WideGridItem>
        );
      });
    };

    return <>{renderFields()}</>;
  };

  const getInputWithCheckboxComponent = (
    pElementkey: string,
    propId: string,
    inputValue: string,
    onChangeHandler: any,
    numberProps: any,
    isChecked: boolean,
    label: string,
    inputBox: boolean,
    duration: any
  ) => {
    return (
      <WideGridItem key={pElementkey}>
        <Label htmlFor={propId} accessKey={PropNames[pElementkey]?.accessKey}>
          {label
            ? label
            : i18n(
                Global_Constants.SCENE_LOCALES,
                PropNames[pElementkey]?.displayText
              ) ?? toProperCase(pElementkey)}
          <input
            className="check-multilang"
            id={propId}
            key={`checkbox-${propId}`}
            checked={isChecked}
            onChange={(e) =>
              handleMultilingualCheckboxChange(
                e,
                propId.split("-")[1],
                inputValue
              )
            }
            type="checkbox"
          />
          {inputBox && (
            <input
              type="number"
              id={`text-${propId}`}
              key={`text-${propId}`}
              min={0}
              max={3600}
              style={{
                width: "50px",
                border: "1px solid black",
                borderRadius: "5px",
                marginLeft: "5px",
                marginBottom: "2px",
              }}
              value={duration}
              onChange={(e) =>
                handleDurationsInputChange(e, propId.split("-")[1])
              }
            />
          )}
        </Label>
        <WideTextArea
          id={propId}
          value={inputValue}
          onChange={onChangeHandler}
          {...numberProps}
        />
      </WideGridItem>
    );
  };

  const textInput = (
    p: string,
    propId: string,
    inputType: string
  ): JSX.Element => {
    let numberProps = {};
    if (
      component &&
      component.componentType === Constants.COMPONENT_TYPE_MULTILINE_TEXT
    ) {
      numberProps = { min: 1, max: 3 };
    }
    return propId === "prop-text" ? (
      <WideGridItem key={p}>
        <Label htmlFor={propId} accessKey={PropNames[p]?.accessKey}>
          {i18n(Global_Constants.SCENE_LOCALES, PropNames[p]?.displayText) ??
            toProperCase(p)}
        </Label>
        <WideTextArea
          id={propId}
          value={extraProps[p].toString()}
          onChange={propChangedForTextarea}
          {...numberProps}
        />
      </WideGridItem>
    ) : propId === "prop-ddrEvents" ? (
      <WideGridItem key={p}>
        <Label htmlFor={propId} accessKey={PropNames[p]?.accessKey}>
          {i18n(Global_Constants.SCENE_LOCALES, PropNames[p]?.displayText) ??
            toProperCase(p)}
        </Label>
        <WideTextInput
          id={propId}
          value={ddrInputEvents}
          placeholder={i18n(
            Global_Constants.SCENE_LOCALES,
            Constants.ENTER_DDR_VAR_NAMES
          )}
          onChange={changeInputDDREventState}
          {...numberProps}
        />
      </WideGridItem>
    ) : propId == "prop-numStations" ? (
      <WideGridItem key={p}>
        <Label htmlFor={propId} accessKey={PropNames[p]?.accessKey}>
          {i18n(Global_Constants.SCENE_LOCALES, PropNames[p]?.displayText) ??
            toProperCase(p)}
        </Label>
        <WideTextInput
          id={propId}
          type="number"
          className="numarrows"
          value={numStations}
          min={2}
          onChange={handleStationChange}
          {...numberProps}
        />
      </WideGridItem>
    ) : propId == "prop-numberofArrows" ? (
      <WideGridItem key={p}>
        <Label htmlFor={propId} accessKey={PropNames[p]?.accessKey}>
          {i18n(Global_Constants.SCENE_LOCALES, PropNames[p]?.displayText) ??
            toProperCase(p)}
        </Label>
        <WideTextInput
          id={propId}
          type="number"
          value={numberofArrows}
          className="numarrows"
          max={numStations - 1}
          min={0}
          onChange={handleArrowChange}
          {...numberProps}
        />
      </WideGridItem>
    ) : propId !== "prop-direction" ? (
      <WideGridItem key={p}>
        <Label htmlFor={propId} accessKey={PropNames[p]?.accessKey}>
          {i18n(Global_Constants.SCENE_LOCALES, PropNames[p]?.displayText) ??
            toProperCase(p)}
        </Label>
        <WideTextInput
          id={propId}
          value={extraProps[p].toString()}
          onChange={propChanged}
          {...numberProps}
        />
      </WideGridItem>
    ) : (
      <></>
    );
  };

  return component ? (
    <Container>
      <ComponentTitle>
        {i18n(
          Global_Constants.SCENE_LOCALES,
          Components[component.componentType].displayName
        )}
      </ComponentTitle>
      <GridItem>
        <Label htmlFor="prop-x" accessKey="x">
          x
        </Label>
        <TextInput
          id="prop-x"
          ref={refX}
          onChange={dataChanged}
          type="number"
        />
      </GridItem>
      <GridItem>
        <Label htmlFor="prop-y" accessKey="y">
          y
        </Label>
        <TextInput
          id="prop-y"
          ref={refY}
          onChange={dataChanged}
          type="number"
        />
      </GridItem>
      <GridItem>
        <Label htmlFor="prop-width" accessKey="l">
          {i18n(
            Global_Constants.SEQUENCE_LOCALES,
            PropNames["width"]?.displayText
          ) ?? "Width"}
        </Label>
        <TextInput
          id="prop-width"
          ref={refW}
          onChange={dataChanged}
          type="number"
          readOnly={component.componentType === "Video"}
        />
      </GridItem>
      <GridItem>
        <Label htmlFor="prop-height" accessKey="h">
          {i18n(
            Global_Constants.SEQUENCE_LOCALES,
            PropNames["height"]?.displayText
          ) ?? "Height"}
        </Label>
        <TextInput
          id="prop-height"
          ref={refH}
          onChange={dataChanged}
          type="number"
        />
      </GridItem>

      {component && Components[component.componentType].canAnimate ? (
        <WideGridItem className="form-check form-switch">
          <input
            className="form-check-input"
            onChange={(e) => animateChanged(e.target)}
            type="checkbox"
            id="checkAnimate"
            checked={checked}
          />
          <label
            className="form-check-label"
            htmlFor="checkAnimate"
            accessKey="a"
          >
            {i18n(Global_Constants.SCENE_LOCALES, Constants.ANIMATE)}
          </label>
        </WideGridItem>
      ) : (
        <></>
      )}

      {Components[component.componentType].assetType ===
      AssetType.AnimatedDrmDropdown ? (
        <WideGridItem>
          <Label htmlFor="animatedDrmDropdown" accessKey="d">
            Line Style
          </Label>

          <Input
            type="select"
            onChange={(e) => handleDotOptionChange(e)}
            className="animation-direction text-capitalize"
            value={animatedDrmDotOptionValue}
          >
            {animatedDrmDotPosition.current.map((value, index) => (
              <option key={index} value={value}>
                {value}
              </option>
            ))}
          </Input>
        </WideGridItem>
      ) : (
        <></>
      )}

      {Components[component.componentType].assetNames ===
      AssetNames.AT_DotsDropdown ? (
        <WideGridItem>
          <Label htmlFor="DotsDropdown" accessKey="d">
            Arrow Type{" "}
          </Label>

          <input
            type="file"
            id="fileUpload"
            onChange={handleFileUploadChange}
          />
        </WideGridItem>
      ) : (
        <></>
      )}

      {component && Components[component.componentType].canMultiLine ? (
        <WideGridItem className="form-check form-switch">
          <input
            className="form-check-input"
            onChange={(e) => multiLineChanged(e.target)}
            type="checkbox"
            id="multiLine"
            checked={multiTextChecked}
          />
          <label className="form-check-label" htmlFor="multiLine" accessKey="m">
            {i18n(Global_Constants.SCENE_LOCALES, Constants.MULTI_LINE_TEXT)}
          </label>
        </WideGridItem>
      ) : (
        <></>
      )}

      {extraProps &&
        Object.keys(extraProps)
          .filter((p) => p !== "isAnimated" && !hiddenProps.includes(p))
          .map((p) => {
            const inputType = p.toLowerCase().includes("color")
              ? "color"
              : typeof extraProps[p] === "number"
              ? "number"
              : "text";
            const propId = `prop-${p}`;
            return p.toLowerCase().includes("color") ? (
              <ColorSelector
                key={p}
                propId={propId}
                colorValue={extraProps[p].toString()}
                onColorChanged={(c) => changeProp(p, c)}
                component={component}
              />
            ) : typeof extraProps[p] === "boolean" ? (
              <WideGridItem className="form-check form-switch" key={p}>
                <input
                  className="form-check-input"
                  onChange={propChanged}
                  type="checkbox"
                  id={propId}
                />
                <label
                  className="form-check-label"
                  htmlFor={propId}
                  accessKey={PropNames[p]?.accessKey}
                >
                  {i18n(
                    Global_Constants.SCENE_LOCALES,
                    PropNames[p]?.displayText
                  ) ?? toProperCase(p)}
                </label>
              </WideGridItem>
            ) : p.toLowerCase() === "alignment" ? (
              alignmentInput(p, propId)
            ) : p.toLowerCase() === "style" ? (
              styleInput(p, propId)
            ) : p.toLowerCase() === "direction" ? (
              <WideGridItem>
                <Label htmlFor={propId} accessKey="s">
                  {i18n(
                    Global_Constants.SCENE_LOCALES,
                    PropNames[p]?.displayText
                  ) ?? toProperCase(p)}
                </Label>
                <Input
                  type="select"
                  onChange={(e) => changeAnimationDirection(e)}
                  id={propId}
                  name={propId}
                  className="animation-direction text-capitalize"
                  value={direction}
                >
                  {directionOptional.current.map((value, index) => (
                    <option key={index} value={value}>
                      {value}
                    </option>
                  ))}
                </Input>
              </WideGridItem>
            ) : p === "multilanguage" ? (
              DynamicField(p)
            ) : p === "dropdown" ? (
              createDropdown(p, component)
            ) : (
              textInput(p, propId, inputType)
            );
          })}

      {Components[component.componentType].assetType === "AT_Temprature" ? (
        <WideGridItem key="Type">
          <Label htmlFor="prop-Temperature" accessKey="t">
            Type
          </Label>
          <Input
            type="select"
            onChange={(e) => handleTemperatureChange(e)}
            id="prop-Temperature"
            name="Temprature"
            title="Type Temprature"
            className="comp-temprature-select"
            value={temperatureUnit}
          >
            {tempartureTypesOptions.current.map((item) => (
              <option key={item} value={item}>
                {item}
              </option>
            ))}
          </Input>
        </WideGridItem>
      ) : (
        Components[component.componentType].assetType &&
        Components[component.componentType].assetType !==
          AssetType.AnimatedDrmDropdown && (
          <WideGridItem key="Source">
            <Label htmlFor="prop-source" accessKey="s">
              Source
            </Label>
            {showImageModal && (
              <ThumbnailModal
                show={showImageModal}
                header="Select Resource"
                onCloseModal={closeImageModal}
                isOkVisible={false}
                isCanVisible={true}
                searchQuery={searchQuery}
                setSearchQuery={setSearchQuery}
                // eslint-disable-next-line @typescript-eslint/no-empty-function
                // onOkClick={() => {}}
                i18n={i18n}
              >
                <div
                  style={{
                    display: "flex",
                    flexWrap: "wrap",
                    overflowX: "hidden",
                    height: "100%",
                    width: "1100px",
                    minHeight: "600px",
                    minWidth: "1100px",
                    justifyContent: "center",
                  }}
                >
                  {(Components[component.componentType].assetType ===
                  AssetType.Image
                    ? imageAssets
                    : videoAssets
                  )
                    ?.filter((asset) =>
                      asset.name
                        .toLowerCase()
                        .includes(searchQuery.toLowerCase())
                    )
                    .map((asset) => (
                      <div
                        style={{
                          padding: "5px",
                          justifyContent: "center",
                          alignItems: "center",
                          flex: "0 0 250px",
                          marginRight: "20px",
                          marginBottom: "20px",
                          border: "5px solid black",
                          height: "250px",
                          position: "relative",
                          display: "flex",
                          flexDirection: "column",
                          paddingTop: "15px",
                        }}
                        key={asset.file_pointer}
                        onClick={() => {
                          const syntheticEvent = {
                            target: { value: asset.file_pointer },
                          } as React.ChangeEvent<HTMLInputElement>;
                          changeComponentAssetSelector(
                            syntheticEvent,
                            Components[component.componentType].assetType ===
                              AssetType.Image
                              ? AssetType.Image
                              : AssetType.Video
                          );
                          closeImageModal();
                        }}
                      >
                        <div
                          style={{
                            display: "flex",
                            justifyContent: "center",
                            alignItems: "center",
                            height: "100%",
                          }}
                        >
                          {Components[component.componentType].assetType ===
                          AssetType.Image ? (
                            <img
                              src={`${config.assetsUrl}/${asset.file_pointer}`}
                              alt={asset.name}
                              style={{
                                maxWidth: "150px",
                                maxHeight: "150px",
                                cursor: "pointer",
                                marginBottom: "10px",
                                alignSelf: "center",
                              }}
                            />
                          ) : (
                            <video
                              src={`${config.assetsUrl}/${asset.file_pointer}`}
                              style={{
                                maxWidth: "150px",
                                maxHeight: "150px",
                                cursor: "pointer",
                                marginBottom: "10px",
                                alignSelf: "center",
                              }}
                            />
                          )}
                        </div>
                        <p
                          style={{
                            textAlign: "center",
                            marginTop: "auto",
                            marginBottom: "0",
                            backgroundColor: "#548b8b",
                            padding: "5px",
                            color: "white",
                            fontWeight: "bold",
                            height: "50px",
                            width: "100%",
                            overflow: "auto",
                          }}
                        >
                          {asset.name}
                        </p>
                      </div>
                    ))}
                </div>
              </ThumbnailModal>
            )}
            <button className="btn btn-secondary" onClick={openImageModal}>
              {i18n(Global_Constants.SCENE_LOCALES, Constants.SELECT_RESOURCE)}
            </button>
          </WideGridItem>
        )
      )}

      {Components[component.componentType].assetType === AssetType.Image ? (
        <WideGridItem key="Object-fit">
          <Label htmlFor="prop-objectFit" accessKey="s">
            {i18n(Global_Constants.SCENE_LOCALES, Constants.OBJECT_FIT)}
          </Label>
          <Input
            type="select"
            name="prop-objectFit"
            id="prop-objectFit"
            title="ObjectFit"
            onChange={(e) => changeComponetObjectFit(e)}
            value={fitObject}
            className="text-capitalize"
          >
            {objectsFitOptions.current.map((item) => (
              <option className="text-capitalize" key={item} value={item}>
                {item}
              </option>
            ))}
          </Input>
        </WideGridItem>
      ) : (
        <></>
      )}

      {Components[component.componentType].assetType === AssetType.Video ? (
        <WideGridItem>
          <button className="btn btn-primary" onClick={playPause}>
            <i className="fa fa-play fa-fw" id="icon-play" />
          </button>
        </WideGridItem>
      ) : (
        <></>
      )}
      {onDeleteComponent && (
        <GridItem>
          <button
            className="btn btn-primary"
            onClick={() => onDeleteComponent(component.compId)}
          >
            <i className="fa fa-trash fa-fw" />
          </button>
        </GridItem>
      )}
      {onDuplicateComponent && (
        <GridItem>
          <button
            className="btn btn-success"
            onClick={() => onDuplicateComponent(component)}
          >
            <i className="fa fa-clone fa-fw" />
          </button>
        </GridItem>
      )}
    </Container>
  ) : (
    <div>
      {i18n(Global_Constants.SCENE_LOCALES, Constants.SELECT_COMPONENT)}
    </div>
  );
};
import { DDRPlaceholderSelector } from "../../../composition_riv/constants/RIV";
import {
  MultiLangListContainer,
  MultiLangListItemContainer,
  MultiLangTextContainer,
} from "../containers/Container";
import {
  MultiLangListContainerStyle,
  MultiLangListTextAnimationStyle,
  MultiLangTextContainerStyle,
} from "../styles/InlineStyles";
import { useEffect, useState } from "react";

export interface IMlTextProps {
  fontSize: number;
  style: string;
  color?: string;
  multilanguage: string;
  multiLineText?: boolean;
  direction: string;
  speed: number;
}

export interface IMultilingualText {
  sampleText: any;
  localecode: any;
}

export const MlFreeTextMessage = ({
  multilanguage,
  multiLineText,
  fontSize,
  style,
  color,
  direction,
}: IMlTextProps) => {
  const [previous, setPrevious] = useState(multilanguage);
  const [languages, setLanguages] = useState<IMultilingualText[]>([]);
  const [previousDirection, setPreviousDirection] = useState(direction);
  useEffect(() => {
    if (previous !== multilanguage || direction !== previousDirection) {
      populateLanguageList();
    }
  }, [multilanguage, previousDirection]);

  useEffect(() => {
    if (previousDirection !== direction) {
      setPreviousDirection(direction);
    }
  }, [direction]);

  useEffect(() => {
    if (multilanguage) {
      populateLanguageList();
    }
  }, []);

  function populateLanguageList() {
    setPrevious(multilanguage);
    const language = renderMultilanguageText() || [];
    setLanguages(language);
  }

  function renderMultilanguageText(): IMultilingualText[] {
    const previousTextInfo = JSON.parse(String(multilanguage));
    return (
      Object.keys(previousTextInfo)
        .filter((lang) => previousTextInfo[lang].checked)
        .map((lang) => ({
          sampleText: previousTextInfo[lang].sampleText,
          localecode: previousTextInfo[lang].id,
        })) || []
    );
  }

  function getSelectedLocaleCodes() {
    if (!multilanguage) return [];
    const previousTextInfo = JSON.parse(String(multilanguage));
    const localeCodes = Object.keys(previousTextInfo)
      .filter((lang) => previousTextInfo[lang].checked)
      .map((lang) => previousTextInfo[lang].id);
    return localeCodes;
  }

  function getExistingLocaleCode() {
    if (!multilanguage) return [];
    const previousTextInfo = JSON.parse(String(multilanguage));
    const existingLocales = Object.keys(previousTextInfo).map(
      (lang) => previousTextInfo[lang].id
    );
    return existingLocales;
  }

  const itemCount = languages.length;
  const isSameContent = () => {
    return previous === multilanguage && previousDirection === direction;
  };

  return (
    <MultiLangTextContainer style={MultiLangTextContainerStyle()}>
      <MultiLangListContainer
        data-existing-locales={getExistingLocaleCode()}
        data-selected-locales={getSelectedLocaleCodes()}
        data-msg-ddrvarid="data-ddr-msg-list"
        data-direction={direction}
        style={MultiLangListContainerStyle(
          fontSize,
          color,
          multiLineText,
          style
        )}
      >
        {isSameContent() &&
          languages.map(
            (item: { sampleText: any; localecode: string }, index: number) => (
              <MultiLangListItemContainer
                className="not-saved"
                style={MultiLangListTextAnimationStyle(
                  index * 4,
                  itemCount,
                  4,
                  direction
                )}
                key={`mlListItem${item.sampleText}${index}`}
                data-ddrvarid={`${DDRPlaceholderSelector.MultiLangFreeTextMessage}.${item.localecode}`}
              >
                {item.sampleText}
              </MultiLangListItemContainer>
            )
          )}
      </MultiLangListContainer>
    </MultiLangTextContainer>
  );
};
import { CSSProperties } from "styled-components";
import { TextAlign } from "../editor/Text";
import { objectFitOptions } from "../editor/Image";
import { Eases } from "../../../common/constants/AnimationDirection";
import { wrap } from "underscore";

export const TextContainerStyle = (
  fontSize: number,
  alignment?: TextAlign,
  color?: string,
  inStyle?: string,
  multiLineText?: boolean,
  speed?: number,
  fontFamily?: string
): CSSProperties => {
  const adjustTop = 2 * (fontSize * 1.125 - fontSize);
  let style: CSSProperties = {
    fontSize: `${fontSize}px`,
    whiteSpace: "nowrap",
    width: "100%",
    textAlign: `${alignment ?? TextAlign.LEFT}`,
    overflow: "hidden",
    marginTop: `-${adjustTop}px`,
    fontFamily: fontFamily,
  };

  if (multiLineText) {
    style = { ...style, whiteSpace: "break-spaces", height: "100%" };
  }

  if (color) {
    style = { ...style, color: `${color}` };
  }

  if (inStyle) {
    style = { ...style, ...JSON.parse(inStyle) };
  }

  return style;
};

export const StationNameContainerStyle = (): CSSProperties => {
  return {
    width: "100%",
  };
};

export const VideoContainerStyle = (): CSSProperties => {
  return {
    width: "100%",
    height: "100%",
    objectFit: "contain",
  };
};

export const VerticalLineStyle = (
  height: number,
  width: number,
  color: string
): CSSProperties => {
  return {
    borderLeft: `${width}px solid ${color}`,
    height: `${height}px`,
  };
};

export const RectangleStyle = (
  width: number,
  height: number,
  borderColor: string,
  borderWidth: number,
  fillColor: string,
  borderRadius: number
): CSSProperties => {
  return {
    border: `${borderWidth}px solid ${borderColor}`,
    width: `${width}px`,
    height: `${height}px`,
    backgroundColor: `${fillColor}`,
    borderRadius: `${borderRadius}px`,
    backgroundClip: "padding-box",
  };
};

export const ParamContainerStyle = (): CSSProperties => {
  return {
    width: "100%",
    height: "100%",
  };
};

export const MultilineTextContainerStyle = (
  fontSize: number,
  lines: number,
  inStyle?: string,
  color?: string,
  alignment?: TextAlign
): CSSProperties => {
  const adjustTop = 2 * (fontSize * 1.125 - fontSize);
  const adjustHeight = fontSize * lines * 1.125 + 5;
  const adjustLineHeight = fontSize + adjustTop / 2;

  let style: CSSProperties = {
    fontSize: `${fontSize}px`,
    width: "100%",
    textAlign: `${alignment ?? TextAlign.LEFT}`,
    wordWrap: "break-word",
    lineHeight: `${adjustLineHeight}px`,
    height: `${adjustHeight}px`,
    overflow: "hidden",
  };
  if (color) {
    style = { ...style, color: `${color}` };
  }

  if (inStyle) {
    style = { ...style, ...JSON.parse(inStyle) };
  }
  return style;
};

export const checkedMultilineTextContainerStyle = (
  fontSize: number,
  lines: number,
  inStyle?: string,
  color?: string,
  alignment?: TextAlign
): CSSProperties => {
  const adjustTop = 2 * (fontSize * 1.125 - fontSize);
  // const adjustHeight = fontSize * lines * 1.125 + 5; //Commentted for now, need to see impact
  const adjustLineHeight = fontSize + adjustTop / 2;

  let style: CSSProperties = {
    fontSize: `${fontSize}px`,
    width: "100%",
    textAlign: `${alignment ?? TextAlign.LEFT}`,
    wordWrap: "break-word",
    lineHeight: `${adjustLineHeight}px`,
    height: "auto",
    overflow: "hidden",
  };
  if (color) {
    style = { ...style, color: `${color}` };
  }

  if (inStyle) {
    style = { ...style, ...JSON.parse(inStyle) };
  }
  return style;
};

export const EmptyContainerStyle = (isPosition?: boolean): CSSProperties => {
  let style: CSSProperties = {
    width: "100%",
    height: "100%",
    backgroundColor: "transparent",
  };
  if (isPosition) {
    style = { ...style, position: "absolute" };
  }
  return style;
};

export const ImageContainerStyle = (
  objectFit?: objectFitOptions
): CSSProperties => {
  return {
    position: "absolute",
    objectFit: `${objectFit ?? objectFitOptions.CONTAIN}`,
    width: "100%",
    height: "100%",
  };
};

export const HourContainerStyle = (
  alignment?: TextAlign,
  inStyle?: string,
  fontSize?: string
): CSSProperties => {
  let style: CSSProperties = {
    fontSize: `${fontSize}px`,
    fontWeight: "bold",
    color: "rgb(37, 48, 59)",
    textAlign: `${alignment ?? TextAlign.LEFT}`,
  };

  if (inStyle) {
    style = { ...style, ...JSON.parse(inStyle) };
  }
  return style;
};

export const TrainLineContainerStyle = (color: string): CSSProperties => {
  return {
    height: "512px",
    width: "41px",
    backgroundColor: `${color}`,
    overflowY: "hidden",
  };
};

export const TrainLineThreeContainerStyle = (color: string): CSSProperties => {
  return {
    height: "455px",
    width: "41px",
    background: `${color}`,
    overflowY: "hidden",
    borderBottomRightRadius: "30px",
    borderBottomLeftRadius: "30px",
  };
};

export const TrainLineLastContainerStyle = (color: string): CSSProperties => {
  return {
    height: "109px",
    width: "41px",
    background: `${color}`,
    overflowY: "hidden",
    borderBottomRightRadius: "30px",
    borderBottomLeftRadius: "30px",
  };
};

export const TrainLineTwoContainerStyle = (color: string): CSSProperties => {
  return {
    height: "282px",
    width: "41px",
    background: `${color}`,
    overflowY: "hidden",
    borderBottomRightRadius: "30px",
    borderBottomLeftRadius: "30px",
  };
};

export const CircleContainerStyle = (
  width: number,
  height: number,
  borderColor: string,
  borderWidth: number,
  fillColor: string,
  borderRadius: number
): CSSProperties => {
  return {
    border: `${borderWidth}px solid ${borderColor}`,
    width: `${width}px`,
    height: `${height}px`,
    backgroundColor: `${fillColor}`,
    borderRadius: `${borderRadius}%`,
    backgroundClip: "padding-box",
  };
};

export const ConnectionContainerStyle = (
  width: number,
  connImageAlignment: string
): CSSProperties => {
  return {
    width: `${width}px`,
    height: "100%",
    position: "absolute",
    overflow: "hidden",
    display: "flex",
    flexDirection: "row",
    flexWrap: "wrap",
    justifyContent:
      connImageAlignment === "left"
        ? "flex-start"
        : connImageAlignment === "center"
          ? "center"
          : "flex-end",
    alignItems: "center",
  };
};

export const RemovableContentStyle = (
  connectionIconSize: number
): CSSProperties => {
  return {
    width: `${connectionIconSize}px` || "93px",
    height: `${connectionIconSize}px` || "93px",
    display: "flex",
    justifyContent: "center",
    alignItems: "center",
  };
};

export const ConnectionImageContainerStyle = (
  connectionIconSize: number
): CSSProperties => {
  return {
    width: `${connectionIconSize}px` || "100%",
    height: `${connectionIconSize}px` || "100%",
  };
};

export const HorizontalLineContainerStyle = (
  width: number,
  height: number,
  color: string
): CSSProperties => {
  return {
    borderTop: `${height}px solid ${color}`,
    width: `${width}px`,
  };
};

export const ConnTrainMainContainerStyle = (): CSSProperties => {
  return {
    border: "14px solid black",
    width: "100%",
    height: "100%",
    backgroundColor: "white",
  };
};

export const ConnTrainLeftContainerStyle = (): CSSProperties => {
  return {
    position: "relative",
    width: "865px",
    minWidth: "865px",
    maxWidth: "865px",
  };
};

export const ConnTrainRightContainerStyle = (): CSSProperties => {
  return {
    position: "absolute",
    width: "997px",
    top: "0px",
    left: "988px",
  };
};

export const ConnTrainAbsoluteTextSpanContainerStyle = (
  color: string,
  left: number,
  top: number
): CSSProperties => {
  return {
    position: "absolute",
    fontSize: "54px",
    color: `${color}`,
    left: `${left}px`,
    top: `${top}px`,
  };
};

export const ConnTrainPositionedLeftTextContainerStyle = (
  left: number,
  top: number
): CSSProperties => {
  return {
    position: "absolute",
    top: `${top}px`,
    left: `${left}px`,
    whiteSpace: "nowrap",
    display: "flex",
    flexDirection: "row",
  };
};

export const ConnTrainTextSpanContainerStyle = (
  color: string
): CSSProperties => {
  return {
    fontSize: "54px",
    color: `${color}`,
  };
};

export const StationConnectionContainerStyle = (): CSSProperties => {
  return {
    position: "absolute",
    left: "137px",
    top: "43px",
    width: "215px",
  };
};

export const MultiLangTextContainerStyle = (): CSSProperties => {
  return {
    height: "100%",
    overflow: "hidden",
    padding: 0,
    margin: 0,
    fontFamily: "sans-serif",
  };
};

export const MultiLangListContainerStyle = (
  fontSize: number,
  color?: string,
  multiLineText?: boolean,
  inStyle?: string
): CSSProperties => {
  let style: CSSProperties = {
    fontSize: `${fontSize}px`,
    height: "100%",
    position: "relative",
    overflow: "hidden",
    margin: 0,
    padding: 0,
  };

  if (multiLineText) {
    style = { ...style, whiteSpace: "break-spaces", height: "100%" };
  }

  if (color) {
    style = { ...style, color: `${color}` };
  }
  if (inStyle) {
    style = { ...style, ...JSON.parse(inStyle) };
  }
  return style;
};

export const TemperatureContainerStyle = (
  alignment?: TextAlign,
  inStyle?: string
): CSSProperties => {
  let style: CSSProperties = {
    fontSize: "41px",
    fontWeight: "bold",
    color: "rgb(37, 48, 59)",
    textAlign: `${alignment ?? TextAlign.LEFT}`,
  };

  if (inStyle) {
    style = { ...style, ...JSON.parse(inStyle) };
  }
  return style;
};

export const MultiLangListTextAnimationStyle = (
  delay: number,
  itemCount: number,
  speed: number,
  direction: string
): CSSProperties => {
  let style: CSSProperties = {
    position: "absolute",
    paddingLeft: "1rem",
    animation: `ml-list-item-anim-${direction} ${itemCount * speed}s infinite ${Eases.In
      }`,
    animationDelay: `${delay}s`,
  };

  switch (direction) {
    case "right":
      style = { ...style, right: "100%" };
      break;

    case "left":
      style = { ...style, left: "100%" };
      break;

    case "up":
      style = { ...style, top: "-100%" };
      break;

    case "down":
      style = { ...style, top: "100%" };
      break;
  }

  return style;
};

export const AnimatedDrmContainerStyle = (
  width: number,
  height: number,
  color: string
): CSSProperties => {
  return {
    position: "relative",
    width: `${width}px`,
    height: `${height}px`,
    borderTop: `${height}px solid ${color}`,
  };
};

export const AnimatedLineContainerStyle = (
  width: number,
  height: number,
  color: string
): CSSProperties => {
  return {
    position: "relative",
    width: `${width}px`,
    height: `${height}px`,
    borderTop: `${height}px solid ${color}`,
  };
};
Enhance your crypto presence with our professional marketing services. We offer customized strategies to increase your project's visibility and impact.

Our services include social media campaigns, content marketing, influencer collaborations, and PR. We focus on building strong, engaged communities around your project. Our team stays ahead of industry trends to ensure your marketing efforts are effective and relevant. Let us help you navigate the complex crypto landscape and achieve your goals. Reach out to discuss your marketing needs.
$ mkdir projects
$ cd projects
$ rails new ideastore
    create
    create  README.md
    create  Rakefile
...
    remove  config/initializers/cors.rb
    remove  config/initializers/new_framework_defaults_6_0.rb
       run  bundle install
Fetching gem metadata from https://rubygems.org/............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 13.0.1
Using concurrent-ruby 1.1.7
...
Fetching webpacker 4.3.0
Installing webpacker 4.3.0
Bundle complete! 17 Gemfile dependencies, 74 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
    run  bundle binstubs bundler
    run  bundle exec spring binstub --all
* bin/rake: Spring inserted
* bin/rails: Spring inserted
      rails  webpacker:install
    create  config/webpacker.yml
Copying webpack core config
    create  config/webpack
    create  config/webpack/development.js
    create  config/webpack/environment.js
    create  config/webpack/production.js
    create  config/webpack/test.js
...
Installing all JavaScript dependencies [4.3.0]
         run  yarn add @rails/webpacker@4.3.0 from "."
yarn add v1.22.4
info No lockfile found.
[1/4] 🔍  Resolving packages...
...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
...
├─ webpack-dev-middleware@3.7.2
├─ webpack-dev-server@3.11.0
└─ ws@6.2.1
✨  Done in 19.51s.
Webpacker successfully installed 🎉 🍰
sudo apt-get update

sudo apt-get --only-upgrade install google-chrome-stable.
SELECT Id, PermissionSet.Id, Assignee.Name, PermissionSet.Name
FROM PermissionSetAssignment 
WHERE PermissionSet.PermissionsModifyAllData = true AND PermissionSet.IsOwnedByProfile = false
star

Thu Jul 25 2024 08:24:02 GMT+0000 (Coordinated Universal Time)

@nishpod

star

Thu Jul 25 2024 07:27:34 GMT+0000 (Coordinated Universal Time)

@FOHWellington

star

Thu Jul 25 2024 07:21:26 GMT+0000 (Coordinated Universal Time) https://medium.com/

@zemax_c4 ##flutter #go_router

star

Thu Jul 25 2024 07:20:36 GMT+0000 (Coordinated Universal Time) https://medium.com/

@zemax_c4 ##flutter

star

Thu Jul 25 2024 06:07:40 GMT+0000 (Coordinated Universal Time)

@FOHWellington

star

Thu Jul 25 2024 04:19:44 GMT+0000 (Coordinated Universal Time)

@sosiegoless

star

Thu Jul 25 2024 01:15:02 GMT+0000 (Coordinated Universal Time)

@iamkatmakhafola

star

Thu Jul 25 2024 01:08:51 GMT+0000 (Coordinated Universal Time)

@FOHWellington

star

Thu Jul 25 2024 00:06:01 GMT+0000 (Coordinated Universal Time)

@WXAPAC

star

Wed Jul 24 2024 22:03:01 GMT+0000 (Coordinated Universal Time)

@wasim_mm1

star

Wed Jul 24 2024 21:08:13 GMT+0000 (Coordinated Universal Time)

@taurenhunter

star

Wed Jul 24 2024 18:35:54 GMT+0000 (Coordinated Universal Time)

@bdusenberry

star

Wed Jul 24 2024 16:30:00 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/8158199/custom-arguments-to-set-in-weblogic-jvm

@ahmadelboghdady

star

Wed Jul 24 2024 15:37:14 GMT+0000 (Coordinated Universal Time)

@pratiksh21 #java

star

Wed Jul 24 2024 14:20:30 GMT+0000 (Coordinated Universal Time) https://www.geeksforgeeks.org/problems/top-view-of-binary-tree/1

@pratiksh21 #java

star

Wed Jul 24 2024 12:04:39 GMT+0000 (Coordinated Universal Time) https://docs.djangoproject.com/en/3.2/_modules/django/contrib/postgres/fields/ranges/

@fearless

star

Wed Jul 24 2024 10:18:27 GMT+0000 (Coordinated Universal Time) https://kontinuum.it/wp-admin/theme-editor.php?file

@webisko

star

Wed Jul 24 2024 09:42:47 GMT+0000 (Coordinated Universal Time) https://gunsbuyerusa.com/product/barwarus-bw-t4-mlok-handguard/

@ak74uforsale

star

Wed Jul 24 2024 08:38:49 GMT+0000 (Coordinated Universal Time)

@pratiksh21 #java

star

Wed Jul 24 2024 08:37:21 GMT+0000 (Coordinated Universal Time) https://leetcode.com/problems/binary-tree-postorder-traversal/description/

@pratiksh21 #java

star

Wed Jul 24 2024 08:35:53 GMT+0000 (Coordinated Universal Time) https://leetcode.com/problems/binary-tree-preorder-traversal/description/

@pratiksh21 #java

star

Wed Jul 24 2024 08:34:51 GMT+0000 (Coordinated Universal Time) https://leetcode.com/problems/binary-tree-inorder-traversal/description/

@pratiksh21 #java

star

Wed Jul 24 2024 07:57:38 GMT+0000 (Coordinated Universal Time)

@kapish #java

star

Wed Jul 24 2024 04:33:20 GMT+0000 (Coordinated Universal Time) https://ssstik.io/en-1

@stonegaming4440

star

Wed Jul 24 2024 02:16:06 GMT+0000 (Coordinated Universal Time)

@FOHWellington

star

Wed Jul 24 2024 00:13:20 GMT+0000 (Coordinated Universal Time) https://scoop.sh/

@baamn #scoop #terminal

star

Tue Jul 23 2024 22:49:40 GMT+0000 (Coordinated Universal Time) https://superuser.com/questions/1582439/changing-windows-user-folders-3d-objects-desktop-downloads-documents-favori

@baamn #batch #cmd #user

star

Tue Jul 23 2024 22:48:10 GMT+0000 (Coordinated Universal Time) https://superuser.com/questions/1582439/changing-windows-user-folders-3d-objects-desktop-downloads-documents-favori

@baamn

star

Tue Jul 23 2024 21:54:58 GMT+0000 (Coordinated Universal Time)

@iamkatmakhafola

star

Tue Jul 23 2024 21:02:10 GMT+0000 (Coordinated Universal Time)

@Samuel1347 #flutter #dart

star

Tue Jul 23 2024 20:16:06 GMT+0000 (Coordinated Universal Time) https://docs.chocolatey.org/en-us/choco/setup/

@baamn #powershell

star

Tue Jul 23 2024 17:02:09 GMT+0000 (Coordinated Universal Time)

@iamkatmakhafola

star

Tue Jul 23 2024 15:46:36 GMT+0000 (Coordinated Universal Time) https://www.heritagelace.com/

@SMcFarland #gtag- home page

star

Tue Jul 23 2024 15:40:24 GMT+0000 (Coordinated Universal Time)

@knguyencookie #python

star

Tue Jul 23 2024 15:36:40 GMT+0000 (Coordinated Universal Time)

@knguyencookie #python

star

Tue Jul 23 2024 15:34:32 GMT+0000 (Coordinated Universal Time) https://www.thiscodeworks.com/python-loop-through-excel-sheets-place-into-one-df-stack-overflow-python/5ff5c97426c684001453b627

@knguyencookie

star

Tue Jul 23 2024 15:33:20 GMT+0000 (Coordinated Universal Time)

@knguyencookie #python

star

Tue Jul 23 2024 15:31:52 GMT+0000 (Coordinated Universal Time)

@knguyencookie #python

star

Tue Jul 23 2024 15:30:42 GMT+0000 (Coordinated Universal Time)

@knguyencookie #python

star

Tue Jul 23 2024 15:29:42 GMT+0000 (Coordinated Universal Time)

@knguyencookie #python

star

Tue Jul 23 2024 13:46:31 GMT+0000 (Coordinated Universal Time)

@vibeman

star

Tue Jul 23 2024 10:34:12 GMT+0000 (Coordinated Universal Time)

@faizan

star

Tue Jul 23 2024 10:31:01 GMT+0000 (Coordinated Universal Time)

@faizan

star

Tue Jul 23 2024 10:30:38 GMT+0000 (Coordinated Universal Time)

@faizan

star

Tue Jul 23 2024 10:10:48 GMT+0000 (Coordinated Universal Time) https://www.blockchainappfactory.com/crypto-marketing-agency

@auroragrace #cryptoexchange #cryptoexchangedevelopment

star

Tue Jul 23 2024 10:01:20 GMT+0000 (Coordinated Universal Time) https://dhanusir.com/ruby-on-rails/section-three/app-idea-model

@dhanusir #ruby #rubyonrails

star

Tue Jul 23 2024 09:50:47 GMT+0000 (Coordinated Universal Time) https://askubuntu.com/questions/1275967/how-to-update-chrome-in-ubuntu-20-04

@hamzaaeel

star

Tue Jul 23 2024 09:16:17 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix-it

@affank1020 #cs

star

Tue Jul 23 2024 07:29:05 GMT+0000 (Coordinated Universal Time) https://www.salesforceben.com/crucial-salesforce-permissions-you-should-not-assign-to-users/

@WayneChung

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension