问:
Pinescript Tradingview Screener to watch Macd and Price highs and lows in session
In screenr bellow i have crypto, stocks, futures etc
each of them have different session time
stocks 0930-1600
futures 1800-1700
crypto 0000-2359
in screener bellow i use session time for futures and screener use it for all symbols i want to change it to when is stock get results from his ows session when is crypto get results from his own session
thank you

sorry my english is not good.

`

```//@version=5
indicator('MACD && Price',  overlay=true)

col_width = input.float(5, title = "Column Width (%)")
scr_numb  = input.int(1, title = "Screen #", tooltip = '1 - rightmost screener', minval = 1)

i_sess = input.session("1800-1700", "Session")
t = time(timeframe.period, i_sess)
bgcolor(not na(t) ? color.rgb(76, 175, 79, 85) : na)

 // MACD Params
fastInput = input(12, "Fast length",group = 'MACD')
slowInput = input(26, "Slow length",group = 'MACD')
signalInput=input(9,"signal lenght",group = 'MACD')

u01 = input.bool(true,  title = "", group = 'Symbols', inline = 's01')
u02 = input.bool(true,  title = "", group = 'Symbols', inline = 's02')
u03 = input.bool(true,  title = "", group = 'Symbols', inline = 's03')
u04 = input.bool(true,  title = "", group = 'Symbols', inline = 's04')
u05 = input.bool(true,  title = "", group = 'Symbols', inline = 's05')
u06 = input.bool(true,  title = "", group = 'Symbols', inline = 's06')
u07 = input.bool(true,  title = "", group = 'Symbols', inline = 's07')
u08 = input.bool(true,  title = "", group = 'Symbols', inline = 's08')
u09 = input.bool(true,  title = "", group = 'Symbols', inline = 's09')
u10 = input.bool(true,  title = "", group = 'Symbols', inline = 's10')
u11 = input.bool(true,  title = "", group = 'Symbols', inline = 's11')
u12 = input.bool(true,  title = "", group = 'Symbols', inline = 's12')
u13 = input.bool(true,  title = "", group = 'Symbols', inline = 's13')
u14 = input.bool(true,  title = "", group = 'Symbols', inline = 's14')
u15 = input.bool(true,  title = "", group = 'Symbols', inline = 's15')
u16 = input.bool(true,  title = "", group = 'Symbols', inline = 's16')
u17 = input.bool(true,  title = "", group = 'Symbols', inline = 's17')
u18 = input.bool(true,  title = "", group = 'Symbols', inline = 's18')

s01 = input.symbol('BITSTAMP:EURUSD',  group = 'Symbols', inline = 's01')
s02 = input.symbol('BITSTAMP:GBPUSD',  group = 'Symbols', inline = 's02')
s03 = input.symbol('COMEX:GC1!', group = 'Symbols', inline = 's03')
s04 = input.symbol('NYMEX:CL1!',  group = 'Symbols', inline = 's04')
s05 = input.symbol('CBOT:ZB1!',  group = 'Symbols', inline = 's05')
s06 = input.symbol('AMEX:SPY',  group = 'Symbols', inline = 's06')
s07 = input.symbol('AMEX:IWM',   group = 'Symbols', inline = 's07')
s08 = input.symbol('NASDAQ:QQQ',  group = 'Symbols', inline = 's08')
s09 = input.symbol('AMEX:DIA',  group = 'Symbols', inline = 's09')
s10 = input.symbol('TVC:DXY',  group = 'Symbols', inline = 's10')
s11 = input.symbol('CME:6E1!',  group = 'Symbols', inline = 's11')
s12 = input.symbol('CME:6B1!',  group = 'Symbols', inline = 's12')
s13 = input.symbol('CME:6A1!',  group = 'Symbols', inline = 's13')
s14 = input.symbol('CME:6J1!',   group = 'Symbols', inline = 's14')
s15 = input.symbol('CME:6N1!',   group = 'Symbols', inline = 's15')
s16 = input.symbol('AMEX:SDS',  group = 'Symbols', inline = 's16')
s17 = input.symbol('NASDAQ:SQQQ',  group = 'Symbols', inline = 's17')
s18 = input.symbol('AMEX:TZA',  group = 'Symbols', inline = 's18')

//////////////////
// CALCULATIONS //

// Get only symbol
only_symbol(s) =>
    array.get(str.split(s, ":"), 1)

screener_func() =>
    // MACD
    [macd, macd_signal, macd_hist] = ta.macd(close, fastInput, slowInput, signalInput)
    macd

// Security call
MACD01 = request.security(s01, timeframe.period, screener_func())
MACD02 = request.security(s02, timeframe.period, screener_func())
MACD03 = request.security(s03, timeframe.period, screener_func())
MACD04 = request.security(s04, timeframe.period, screener_func())
MACD05 = request.security(s05, timeframe.period, screener_func())
MACD06 = request.security(s06, timeframe.period, screener_func())
MACD07 = request.security(s07, timeframe.period, screener_func())
MACD08 = request.security(s08, timeframe.period, screener_func())
MACD09 = request.security(s09, timeframe.period, screener_func())
MACD10 = request.security(s10, timeframe.period, screener_func())
MACD11 = request.security(s11, timeframe.period, screener_func())
MACD12 = request.security(s12, timeframe.period, screener_func())
MACD13 = request.security(s13, timeframe.period, screener_func())
MACD14 = request.security(s14, timeframe.period, screener_func())
MACD15 = request.security(s15, timeframe.period, screener_func())
MACD16 = request.security(s16, timeframe.period, screener_func())
MACD17 = request.security(s17, timeframe.period, screener_func())
MACD18 = request.security(s18, timeframe.period, screener_func())

[high01, low01]=request.security(s01, timeframe.period, [high,low])
[high02, low02]=request.security(s02, timeframe.period, [high,low])
[high03, low03]=request.security(s03, timeframe.period, [high,low])
[high04, low04]=request.security(s04, timeframe.period, [high,low])
[high05, low05]=request.security(s05, timeframe.period, [high,low])
[high06, low06]=request.security(s06, timeframe.period, [high,low])
[high07, low07]=request.security(s07, timeframe.period, [high,low])
[high08, low08]=request.security(s08, timeframe.period, [high,low])
[high09, low09]=request.security(s09, timeframe.period, [high,low])
[high10, low10]=request.security(s10, timeframe.period, [high,low])
[high11, low11]=request.security(s11, timeframe.period, [high,low])
[high12, low12]=request.security(s12, timeframe.period, [high,low])
[high13, low13]=request.security(s13, timeframe.period, [high,low])
[high14, low14]=request.security(s14, timeframe.period, [high,low])
[high15, low15]=request.security(s15, timeframe.period, [high,low])
[high16, low16]=request.security(s16, timeframe.period, [high,low])
[high17, low17]=request.security(s17, timeframe.period, [high,low])
[high18, low18]=request.security(s18, timeframe.period, [high,low])

var float maxHigh01=-10000000
var float maxHigh02=-100000000
var float maxHigh03=-100000000
var float maxHigh04=-100000000
var float maxHigh05=-100000000
var float maxHigh06=-100000000
var float maxHigh07=-100000000
var float maxHigh08=-100000000
var float maxHigh09=-100000000
var float maxHigh10=-100000000
var float maxHigh11=-100000000
var float maxHigh12=-100000000
var float maxHigh13=-100000000
var float maxHigh14=-100000000
var float maxHigh15=-100000000
var float maxHigh16=-100000000
var float maxHigh17=-100000000
var float maxHigh18=-100000000

var float minLow01=100000000
var float minLow02=100000000
var float minLow03=100000000
var float minLow04=100000000
var float minLow05=100000000
var float minLow06=100000000
var float minLow07=100000000
var float minLow08=100000000
var float minLow09=100000000
var float minLow10=100000000
var float minLow11=100000000
var float minLow12=100000000
var float minLow13=100000000
var float minLow14=100000000
var float minLow15=100000000
var float minLow16=100000000
var float minLow17=100000000
var float minLow18=100000000

var float maxMacd01=-100000000
var float maxMacd02=-100000000
var float maxMacd03=-100000000
var float maxMacd04=-100000000
var float maxMacd05=-100000000
var float maxMacd06=-100000000
var float maxMacd07=-100000000
var float maxMacd08=-100000000
var float maxMacd09=-100000000
var float maxMacd10=-100000000
var float maxMacd11=-100000000
var float maxMacd12=-100000000
var float maxMacd13=-100000000
var float maxMacd14=-100000000
var float maxMacd15=-100000000
var float maxMacd16=-100000000
var float maxMacd17=-100000000
var float maxMacd18=-100000000

var float minMacd01=1000000000
var float minMacd02=1000000000
var float minMacd03=1000000000
var float minMacd04=1000000000
var float minMacd05=1000000000
var float minMacd06=1000000000
var float minMacd07=1000000000
var float minMacd08=1000000000
var float minMacd09=1000000000
var float minMacd10=1000000000
var float minMacd11=1000000000
var float minMacd12=1000000000
var float minMacd13=1000000000
var float minMacd14=1000000000
var float minMacd15=1000000000
var float minMacd16=1000000000
var float minMacd17=1000000000
var float minMacd18=1000000000

if na(t)
    maxHigh01:=-10000000
    maxHigh02:=-100000000
    maxHigh03:=-100000000
    maxHigh04:=-100000000
    maxHigh05:=-100000000
    maxHigh06:=-100000000
    maxHigh07:=-100000000
    maxHigh08:=-100000000
    maxHigh09:=-100000000
    maxHigh10:=-100000000
    maxHigh11:=-100000000
    maxHigh12:=-100000000
    maxHigh13:=-100000000
    maxHigh14:=-100000000
    maxHigh15:=-100000000
    maxHigh16:=-100000000
    maxHigh17:=-100000000
    maxHigh18:=-100000000

    minLow01:=100000000
    minLow02:=100000000
    minLow03:=100000000
    minLow04:=100000000
    minLow05:=100000000
    minLow06:=100000000
    minLow07:=100000000
    minLow08:=100000000
    minLow09:=100000000
    minLow10:=100000000
    minLow11:=100000000
    minLow12:=100000000
    minLow13:=100000000
    minLow14:=100000000
    minLow15:=100000000
    minLow16:=100000000
    minLow17:=100000000
    minLow18:=100000000

    maxMacd01:=-100000000
    maxMacd02:=-100000000
    maxMacd03:=-100000000
    maxMacd04:=-100000000
    maxMacd05:=-100000000
    maxMacd06:=-100000000
    maxMacd07:=-100000000
    maxMacd08:=-100000000
    maxMacd09:=-100000000
    maxMacd10:=-100000000
    maxMacd11:=-100000000
    maxMacd12:=-100000000
    maxMacd13:=-100000000
    maxMacd14:=-100000000
    maxMacd15:=-100000000
    maxMacd16:=-100000000
    maxMacd17:=-100000000
    maxMacd18:=-100000000

    minMacd01:=1000000000
    minMacd02:=1000000000
    minMacd03:=1000000000
    minMacd04:=1000000000
    minMacd05:=1000000000
    minMacd06:=1000000000
    minMacd07:=1000000000
    minMacd08:=1000000000
    minMacd09:=1000000000
    minMacd10:=1000000000
    minMacd11:=1000000000
    minMacd12:=1000000000
    minMacd13:=1000000000
    minMacd14:=1000000000
    minMacd15:=1000000000
    minMacd16:=1000000000
    minMacd17:=1000000000
    minMacd18:=1000000000

////////////
// ARRAYS //

s_arr   = array.new_string(0)
u_arr   = array.new_bool(0)

// Add Symbols 15
array.push(s_arr, only_symbol(s01))
array.push(s_arr, only_symbol(s02))
array.push(s_arr, only_symbol(s03))
array.push(s_arr, only_symbol(s04))
array.push(s_arr, only_symbol(s05))
array.push(s_arr, only_symbol(s06))
array.push(s_arr, only_symbol(s07))
array.push(s_arr, only_symbol(s08))
array.push(s_arr, only_symbol(s09))
array.push(s_arr, only_symbol(s10))
array.push(s_arr, only_symbol(s11))
array.push(s_arr, only_symbol(s12))
array.push(s_arr, only_symbol(s13))
array.push(s_arr, only_symbol(s14))
array.push(s_arr, only_symbol(s15))
array.push(s_arr, only_symbol(s16))
array.push(s_arr, only_symbol(s17))
array.push(s_arr, only_symbol(s18))

// FLAGS 15
array.push(u_arr, u01)
array.push(u_arr, u02)
array.push(u_arr, u03)
array.push(u_arr, u04)
array.push(u_arr, u05)
array.push(u_arr, u06)
array.push(u_arr, u07)
array.push(u_arr, u08)
array.push(u_arr, u09)
array.push(u_arr, u10)
array.push(u_arr, u11)
array.push(u_arr, u12)
array.push(u_arr, u13)
array.push(u_arr, u14)
array.push(u_arr, u15)
array.push(u_arr, u16)
array.push(u_arr, u17)
array.push(u_arr, u18)

H_arr   = array.new_float(0)
array.push(H_arr, high01)
array.push(H_arr, high02)
array.push(H_arr, high03)
array.push(H_arr, high04)
array.push(H_arr, high05)
array.push(H_arr, high06)
array.push(H_arr, high07)
array.push(H_arr, high08)
array.push(H_arr, high09)
array.push(H_arr, high10)
array.push(H_arr, high11)
array.push(H_arr, high12)
array.push(H_arr, high13)
array.push(H_arr, high14)
array.push(H_arr, high15)
array.push(H_arr, high16)
array.push(H_arr, high17)
array.push(H_arr, high18)

L_arr   = array.new_float(0)
array.push(L_arr, low01)
array.push(L_arr, low02)
array.push(L_arr, low03)
array.push(L_arr, low04)
array.push(L_arr, low05)
array.push(L_arr, low06)
array.push(L_arr, low07)
array.push(L_arr, low08)
array.push(L_arr, low09)
array.push(L_arr, low10)
array.push(L_arr, low11)
array.push(L_arr, low12)
array.push(L_arr, low13)
array.push(L_arr, low14)
array.push(L_arr, low15)
array.push(L_arr, low16)
array.push(L_arr, low17)
array.push(L_arr, low18)

macd_arr   = array.new_float(0)
array.push(macd_arr, MACD01)
array.push(macd_arr, MACD02)
array.push(macd_arr, MACD03)
array.push(macd_arr, MACD04)
array.push(macd_arr, MACD05)
array.push(macd_arr, MACD06)
array.push(macd_arr, MACD07)
array.push(macd_arr, MACD08)
array.push(macd_arr, MACD09)
array.push(macd_arr, MACD10)
array.push(macd_arr, MACD11)
array.push(macd_arr, MACD12)
array.push(macd_arr, MACD13)
array.push(macd_arr, MACD14)
array.push(macd_arr, MACD15)
array.push(macd_arr, MACD16)
array.push(macd_arr, MACD17)
array.push(macd_arr, MACD18)

MaxMacd_arr   = array.new_float(0)
array.push(MaxMacd_arr, maxMacd01)
array.push(MaxMacd_arr, maxMacd02)
array.push(MaxMacd_arr, maxMacd03)
array.push(MaxMacd_arr, maxMacd04)
array.push(MaxMacd_arr, maxMacd05)
array.push(MaxMacd_arr, maxMacd06)
array.push(MaxMacd_arr, maxMacd07)
array.push(MaxMacd_arr, maxMacd08)
array.push(MaxMacd_arr, maxMacd09)
array.push(MaxMacd_arr, maxMacd10)
array.push(MaxMacd_arr, maxMacd11)
array.push(MaxMacd_arr, maxMacd12)
array.push(MaxMacd_arr, maxMacd13)
array.push(MaxMacd_arr, maxMacd14)
array.push(MaxMacd_arr, maxMacd15)
array.push(MaxMacd_arr, maxMacd16)
array.push(MaxMacd_arr, maxMacd17)
array.push(MaxMacd_arr, maxMacd18)

MinMacd_arr   = array.new_float(0)
array.push(MinMacd_arr, minMacd01)
array.push(MinMacd_arr, minMacd02)
array.push(MinMacd_arr, minMacd03)
array.push(MinMacd_arr, minMacd04)
array.push(MinMacd_arr, minMacd05)
array.push(MinMacd_arr, minMacd06)
array.push(MinMacd_arr, minMacd07)
array.push(MinMacd_arr, minMacd08)
array.push(MinMacd_arr, minMacd09)
array.push(MinMacd_arr, minMacd10)
array.push(MinMacd_arr, minMacd11)
array.push(MinMacd_arr, minMacd12)
array.push(MinMacd_arr, minMacd13)
array.push(MinMacd_arr, minMacd14)
array.push(MinMacd_arr, minMacd15)
array.push(MinMacd_arr, minMacd16)
array.push(MinMacd_arr, minMacd17)
array.push(MinMacd_arr, minMacd18)

MinPrice_arr   = array.new_float(0)
array.push(MinPrice_arr, minLow01)
array.push(MinPrice_arr, minLow02)
array.push(MinPrice_arr, minLow03)
array.push(MinPrice_arr, minLow04)
array.push(MinPrice_arr, minLow05)
array.push(MinPrice_arr, minLow06)
array.push(MinPrice_arr, minLow07)
array.push(MinPrice_arr, minLow08)
array.push(MinPrice_arr, minLow09)
array.push(MinPrice_arr, minLow10)
array.push(MinPrice_arr, minLow11)
array.push(MinPrice_arr, minLow12)
array.push(MinPrice_arr, minLow13)
array.push(MinPrice_arr, minLow14)
array.push(MinPrice_arr, minLow15)
array.push(MinPrice_arr, minLow16)
array.push(MinPrice_arr, minLow17)
array.push(MinPrice_arr, minLow18)

MaxPrice_arr   = array.new_float(0)
array.push(MaxPrice_arr, maxHigh01)
array.push(MaxPrice_arr, maxHigh02)
array.push(MaxPrice_arr, maxHigh03)
array.push(MaxPrice_arr, maxHigh04)
array.push(MaxPrice_arr, maxHigh05)
array.push(MaxPrice_arr, maxHigh06)
array.push(MaxPrice_arr, maxHigh07)
array.push(MaxPrice_arr, maxHigh08)
array.push(MaxPrice_arr, maxHigh09)
array.push(MaxPrice_arr, maxHigh10)
array.push(MaxPrice_arr, maxHigh11)
array.push(MaxPrice_arr, maxHigh12)
array.push(MaxPrice_arr, maxHigh13)
array.push(MaxPrice_arr, maxHigh14)
array.push(MaxPrice_arr, maxHigh15)
array.push(MaxPrice_arr, maxHigh16)
array.push(MaxPrice_arr, maxHigh17)
array.push(MaxPrice_arr, maxHigh18)

for i=0 to 17
    if array.get(u_arr, i)
        if array.get(macd_arr, i) >= array.get(MaxMacd_arr, i)
            switch
                i==0=> maxMacd01:=array.get(macd_arr, i)
                i==1=> maxMacd02:=array.get(macd_arr, i)
                i==2=> maxMacd03:=array.get(macd_arr, i)
                i==3=> maxMacd04:=array.get(macd_arr, i)
                i==4=> maxMacd05:=array.get(macd_arr, i)
                i==5=> maxMacd06:=array.get(macd_arr, i)
                i==6=> maxMacd07:=array.get(macd_arr, i)
                i==7=> maxMacd08:=array.get(macd_arr, i)
                i==8=> maxMacd09:=array.get(macd_arr, i)
                i==9=> maxMacd10:=array.get(macd_arr, i)
                i==10=> maxMacd11:=array.get(macd_arr, i)
                i==11=> maxMacd12:=array.get(macd_arr, i)
                i==12=> maxMacd13:=array.get(macd_arr, i)
                i==13=> maxMacd14:=array.get(macd_arr, i)
                i==14=> maxMacd15:=array.get(macd_arr, i)
                i==15=> maxMacd16:=array.get(macd_arr, i)
                i==16=> maxMacd17:=array.get(macd_arr, i)
                i==17=> maxMacd18:=array.get(macd_arr, i)
        if array.get(macd_arr, i) <= array.get(MinMacd_arr, i)
            switch
                i==0=> minMacd01:=array.get(macd_arr, i)
                i==1=> minMacd02:=array.get(macd_arr, i)
                i==2=> minMacd03:=array.get(macd_arr, i)
                i==3=> minMacd04:=array.get(macd_arr, i)
                i==4=> minMacd05:=array.get(macd_arr, i)
                i==5=> minMacd06:=array.get(macd_arr, i)
                i==6=> minMacd07:=array.get(macd_arr, i)
                i==7=> minMacd08:=array.get(macd_arr, i)
                i==8=> minMacd09:=array.get(macd_arr, i)
                i==9=> minMacd10:=array.get(macd_arr, i)
                i==10=> minMacd11:=array.get(macd_arr, i)
                i==11=> minMacd12:=array.get(macd_arr, i)
                i==12=> minMacd13:=array.get(macd_arr, i)
                i==13=> minMacd14:=array.get(macd_arr, i)
                i==14=> minMacd15:=array.get(macd_arr, i)
                i==15=> minMacd16:=array.get(macd_arr, i)
                i==16=> minMacd17:=array.get(macd_arr, i)
                i==17=> minMacd18:=array.get(macd_arr, i)
        if array.get(H_arr, i) >= array.get(MaxPrice_arr, i)
            switch
                i==0=> maxHigh01:=array.get(H_arr, i)
                i==1=> maxHigh02:=array.get(H_arr, i)
                i==2=> maxHigh03:=array.get(H_arr, i)
                i==3=> maxHigh04:=array.get(H_arr, i)
                i==4=> maxHigh05:=array.get(H_arr, i)
                i==5=> maxHigh06:=array.get(H_arr, i)
                i==6=> maxHigh07:=array.get(H_arr, i)
                i==7=> maxHigh08:=array.get(H_arr, i)
                i==8=> maxHigh09:=array.get(H_arr, i)
                i==9=> maxHigh10:=array.get(H_arr, i)
                i==10=> maxHigh11:=array.get(H_arr, i)
                i==11=> maxHigh12:=array.get(H_arr, i)
                i==12=> maxHigh13:=array.get(H_arr, i)
                i==13=> maxHigh14:=array.get(H_arr, i)
                i==14=> maxHigh15:=array.get(H_arr, i)
                i==15=> maxHigh16:=array.get(H_arr, i)
                i==16=> maxHigh17:=array.get(H_arr, i)
                i==17=> maxHigh18:=array.get(H_arr, i)
        if array.get(L_arr, i) <= array.get(MinPrice_arr, i)
            switch
                i==0=> minLow01:=array.get(L_arr, i)
                i==1=> minLow02:=array.get(L_arr, i)
                i==2=> minLow03:=array.get(L_arr, i)
                i==3=> minLow04:=array.get(L_arr, i)
                i==4=> minLow05:=array.get(L_arr, i)
                i==5=> minLow06:=array.get(L_arr, i)
                i==6=> minLow07:=array.get(L_arr, i)
                i==7=> minLow08:=array.get(L_arr, i)
                i==8=> minLow09:=array.get(L_arr, i)
                i==9=> minLow10:=array.get(L_arr, i)
                i==10=> minLow11:=array.get(L_arr, i)
                i==11=> minLow12:=array.get(L_arr, i)
                i==12=> minLow13:=array.get(L_arr, i)
                i==13=> minLow14:=array.get(L_arr, i)
                i==14=> minLow15:=array.get(L_arr, i)
                i==15=> minLow16:=array.get(L_arr, i)
                i==16=> minLow17:=array.get(L_arr, i)
                i==17=> minLow18:=array.get(L_arr, i)

///////////
// PLOTS //

var tbl = table.new(position.bottom_right, 3, 19, frame_color=#151715, frame_width=1, border_width=2, border_color=color.new(color.white, 100))

if barstate.islast

    table.cell(tbl, 0, 0,'Symbol',  width = col_width,     text_halign = text.align_center, bgcolor = color.black, text_color = color.white, text_size = size.small)
    table.cell(tbl, 1, 0, 'MACD',     width = col_width,     text_halign = text.align_center, bgcolor = color.black, text_color = color.white, text_size = size.small)
    table.cell(tbl, 2, 0, 'Price',     width = col_width,     text_halign = text.align_center, bgcolor = color.black, text_color = color.white, text_size = size.small)
    if (scr_numb > 1)
        table.cell(tbl, 3, 0,  '',       width = col_width * 2 * (scr_numb - 1), text_halign = text.align_center, bgcolor = color.new(color.black, 100), text_size = size.small)

    for i = 0 to 17
        if array.get(u_arr, i)

            macd_col  = array.get(macd_arr, i) >= array.get(MaxMacd_arr, i)   ? color.green   : array.get(macd_arr, i) <= array.get(MinMacd_arr, i)  ? color.red : color.gray
            price_col  = array.get(H_arr, i) >= array.get(MaxPrice_arr, i)   ? color.green   : array.get(L_arr, i) <= array.get(MinPrice_arr, i)  ? color.red : color.gray

            table.cell(tbl, 0, i + 1, array.get(s_arr, i),                                 text_halign = text.align_center, bgcolor = color.black, text_color = color.white, text_size = size.small)
            table.cell(tbl, 1, i + 1, str.tostring(array.get(macd_arr, i), "#.#####"),         text_halign = text.align_center, bgcolor = macd_col,    text_color = color.white, text_size = size.small)
            table.cell(tbl, 2, i + 1, price_col==color.green? str.tostring(array.get(H_arr, i), "#.##"):price_col==color.red? str.tostring(array.get(L_arr, i), "#.##"):"No",         text_halign = text.align_center, bgcolor = price_col,    text_color = color.white, text_size = size.small)

//plot(maxHigh01)
//plot(minLow01,color = color.red)
```

`

i try to integrate syminfo.type but im not coder and i cant

Body:
In screenr bellow i have crypto, stocks, futures etc
each of them have different session time
stocks 0930-1600
futures 1800-1700
crypto 0000-2359
in screener bellow i use session time for futures and screener use it for all symbols i want to change it to when is stock get results from his ows session when is crypto get results from his own session
thank you

sorry my english is not good.

`

//@version=5
indicator('MACD && Price',  overlay=true)

col_width = input.float(5, title = "Column Width (%)")
scr_numb  = input.int(1, title = "Screen #", tooltip = '1 - rightmost screener', minval = 1)

i_sess = input.session("1800-1700", "Session")
t = time(timeframe.period, i_sess)
bgcolor(not na(t) ? color.rgb(76, 175, 79, 85) : na)

 // MACD Params
fastInput = input(12, "Fast length",group = 'MACD')
slowInput = input(26, "Slow length",group = 'MACD')
signalInput=input(9,"signal lenght",group = 'MACD')

u01 = input.bool(true,  title = "", group = 'Symbols', inline = 's01')
u02 = input.bool(true,  title = "", group = 'Symbols', inline = 's02')
u03 = input.bool(true,  title = "", group = 'Symbols', inline = 's03')
u04 = input.bool(true,  title = "", group = 'Symbols', inline = 's04')
u05 = input.bool(true,  title = "", group = 'Symbols', inline = 's05')
u06 = input.bool(true,  title = "", group = 'Symbols', inline = 's06')
u07 = input.bool(true,  title = "", group = 'Symbols', inline = 's07')
u08 = input.bool(true,  title = "", group = 'Symbols', inline = 's08')
u09 = input.bool(true,  title = "", group = 'Symbols', inline = 's09')
u10 = input.bool(true,  title = "", group = 'Symbols', inline = 's10')
u11 = input.bool(true,  title = "", group = 'Symbols', inline = 's11')
u12 = input.bool(true,  title = "", group = 'Symbols', inline = 's12')
u13 = input.bool(true,  title = "", group = 'Symbols', inline = 's13')
u14 = input.bool(true,  title = "", group = 'Symbols', inline = 's14')
u15 = input.bool(true,  title = "", group = 'Symbols', inline = 's15')
u16 = input.bool(true,  title = "", group = 'Symbols', inline = 's16')
u17 = input.bool(true,  title = "", group = 'Symbols', inline = 's17')
u18 = input.bool(true,  title = "", group = 'Symbols', inline = 's18')

s01 = input.symbol('BITSTAMP:EURUSD',  group = 'Symbols', inline = 's01')
s02 = input.symbol('BITSTAMP:GBPUSD',  group = 'Symbols', inline = 's02')
s03 = input.symbol('COMEX:GC1!', group = 'Symbols', inline = 's03')
s04 = input.symbol('NYMEX:CL1!',  group = 'Symbols', inline = 's04')
s05 = input.symbol('CBOT:ZB1!',  group = 'Symbols', inline = 's05')
s06 = input.symbol('AMEX:SPY',  group = 'Symbols', inline = 's06')
s07 = input.symbol('AMEX:IWM',   group = 'Symbols', inline = 's07')
s08 = input.symbol('NASDAQ:QQQ',  group = 'Symbols', inline = 's08')
s09 = input.symbol('AMEX:DIA',  group = 'Symbols', inline = 's09')
s10 = input.symbol('TVC:DXY',  group = 'Symbols', inline = 's10')
s11 = input.symbol('CME:6E1!',  group = 'Symbols', inline = 's11')
s12 = input.symbol('CME:6B1!',  group = 'Symbols', inline = 's12')
s13 = input.symbol('CME:6A1!',  group = 'Symbols', inline = 's13')
s14 = input.symbol('CME:6J1!',   group = 'Symbols', inline = 's14')
s15 = input.symbol('CME:6N1!',   group = 'Symbols', inline = 's15')
s16 = input.symbol('AMEX:SDS',  group = 'Symbols', inline = 's16')
s17 = input.symbol('NASDAQ:SQQQ',  group = 'Symbols', inline = 's17')
s18 = input.symbol('AMEX:TZA',  group = 'Symbols', inline = 's18')

//////////////////
// CALCULATIONS //

// Get only symbol
only_symbol(s) =>
    array.get(str.split(s, ":"), 1)

screener_func() =>
    // MACD
    [macd, macd_signal, macd_hist] = ta.macd(close, fastInput, slowInput, signalInput)
    macd

// Security call
MACD01 = request.security(s01, timeframe.period, screener_func())
MACD02 = request.security(s02, timeframe.period, screener_func())
MACD03 = request.security(s03, timeframe.period, screener_func())
MACD04 = request.security(s04, timeframe.period, screener_func())
MACD05 = request.security(s05, timeframe.period, screener_func())
MACD06 = request.security(s06, timeframe.period, screener_func())
MACD07 = request.security(s07, timeframe.period, screener_func())
MACD08 = request.security(s08, timeframe.period, screener_func())
MACD09 = request.security(s09, timeframe.period, screener_func())
MACD10 = request.security(s10, timeframe.period, screener_func())
MACD11 = request.security(s11, timeframe.period, screener_func())
MACD12 = request.security(s12, timeframe.period, screener_func())
MACD13 = request.security(s13, timeframe.period, screener_func())
MACD14 = request.security(s14, timeframe.period, screener_func())
MACD15 = request.security(s15, timeframe.period, screener_func())
MACD16 = request.security(s16, timeframe.period, screener_func())
MACD17 = request.security(s17, timeframe.period, screener_func())
MACD18 = request.security(s18, timeframe.period, screener_func())

[high01, low01]=request.security(s01, timeframe.period, [high,low])
[high02, low02]=request.security(s02, timeframe.period, [high,low])
[high03, low03]=request.security(s03, timeframe.period, [high,low])
[high04, low04]=request.security(s04, timeframe.period, [high,low])
[high05, low05]=request.security(s05, timeframe.period, [high,low])
[high06, low06]=request.security(s06, timeframe.period, [high,low])
[high07, low07]=request.security(s07, timeframe.period, [high,low])
[high08, low08]=request.security(s08, timeframe.period, [high,low])
[high09, low09]=request.security(s09, timeframe.period, [high,low])
[high10, low10]=request.security(s10, timeframe.period, [high,low])
[high11, low11]=request.security(s11, timeframe.period, [high,low])
[high12, low12]=request.security(s12, timeframe.period, [high,low])
[high13, low13]=request.security(s13, timeframe.period, [high,low])
[high14, low14]=request.security(s14, timeframe.period, [high,low])
[high15, low15]=request.security(s15, timeframe.period, [high,low])
[high16, low16]=request.security(s16, timeframe.period, [high,low])
[high17, low17]=request.security(s17, timeframe.period, [high,low])
[high18, low18]=request.security(s18, timeframe.period, [high,low])

var float maxHigh01=-10000000
var float maxHigh02=-100000000
var float maxHigh03=-100000000
var float maxHigh04=-100000000
var float maxHigh05=-100000000
var float maxHigh06=-100000000
var float maxHigh07=-100000000
var float maxHigh08=-100000000
var float maxHigh09=-100000000
var float maxHigh10=-100000000
var float maxHigh11=-100000000
var float maxHigh12=-100000000
var float maxHigh13=-100000000
var float maxHigh14=-100000000
var float maxHigh15=-100000000
var float maxHigh16=-100000000
var float maxHigh17=-100000000
var float maxHigh18=-100000000

var float minLow01=100000000
var float minLow02=100000000
var float minLow03=100000000
var float minLow04=100000000
var float minLow05=100000000
var float minLow06=100000000
var float minLow07=100000000
var float minLow08=100000000
var float minLow09=100000000
var float minLow10=100000000
var float minLow11=100000000
var float minLow12=100000000
var float minLow13=100000000
var float minLow14=100000000
var float minLow15=100000000
var float minLow16=100000000
var float minLow17=100000000
var float minLow18=100000000

var float maxMacd01=-100000000
var float maxMacd02=-100000000
var float maxMacd03=-100000000
var float maxMacd04=-100000000
var float maxMacd05=-100000000
var float maxMacd06=-100000000
var float maxMacd07=-100000000
var float maxMacd08=-100000000
var float maxMacd09=-100000000
var float maxMacd10=-100000000
var float maxMacd11=-100000000
var float maxMacd12=-100000000
var float maxMacd13=-100000000
var float maxMacd14=-100000000
var float maxMacd15=-100000000
var float maxMacd16=-100000000
var float maxMacd17=-100000000
var float maxMacd18=-100000000

var float minMacd01=1000000000
var float minMacd02=1000000000
var float minMacd03=1000000000
var float minMacd04=1000000000
var float minMacd05=1000000000
var float minMacd06=1000000000
var float minMacd07=1000000000
var float minMacd08=1000000000
var float minMacd09=1000000000
var float minMacd10=1000000000
var float minMacd11=1000000000
var float minMacd12=1000000000
var float minMacd13=1000000000
var float minMacd14=1000000000
var float minMacd15=1000000000
var float minMacd16=1000000000
var float minMacd17=1000000000
var float minMacd18=1000000000

if na(t)
    maxHigh01:=-10000000
    maxHigh02:=-100000000
    maxHigh03:=-100000000
    maxHigh04:=-100000000
    maxHigh05:=-100000000
    maxHigh06:=-100000000
    maxHigh07:=-100000000
    maxHigh08:=-100000000
    maxHigh09:=-100000000
    maxHigh10:=-100000000
    maxHigh11:=-100000000
    maxHigh12:=-100000000
    maxHigh13:=-100000000
    maxHigh14:=-100000000
    maxHigh15:=-100000000
    maxHigh16:=-100000000
    maxHigh17:=-100000000
    maxHigh18:=-100000000

    minLow01:=100000000
    minLow02:=100000000
    minLow03:=100000000
    minLow04:=100000000
    minLow05:=100000000
    minLow06:=100000000
    minLow07:=100000000
    minLow08:=100000000
    minLow09:=100000000
    minLow10:=100000000
    minLow11:=100000000
    minLow12:=100000000
    minLow13:=100000000
    minLow14:=100000000
    minLow15:=100000000
    minLow16:=100000000
    minLow17:=100000000
    minLow18:=100000000

    maxMacd01:=-100000000
    maxMacd02:=-100000000
    maxMacd03:=-100000000
    maxMacd04:=-100000000
    maxMacd05:=-100000000
    maxMacd06:=-100000000
    maxMacd07:=-100000000
    maxMacd08:=-100000000
    maxMacd09:=-100000000
    maxMacd10:=-100000000
    maxMacd11:=-100000000
    maxMacd12:=-100000000
    maxMacd13:=-100000000
    maxMacd14:=-100000000
    maxMacd15:=-100000000
    maxMacd16:=-100000000
    maxMacd17:=-100000000
    maxMacd18:=-100000000

    minMacd01:=1000000000
    minMacd02:=1000000000
    minMacd03:=1000000000
    minMacd04:=1000000000
    minMacd05:=1000000000
    minMacd06:=1000000000
    minMacd07:=1000000000
    minMacd08:=1000000000
    minMacd09:=1000000000
    minMacd10:=1000000000
    minMacd11:=1000000000
    minMacd12:=1000000000
    minMacd13:=1000000000
    minMacd14:=1000000000
    minMacd15:=1000000000
    minMacd16:=1000000000
    minMacd17:=1000000000
    minMacd18:=1000000000

////////////
// ARRAYS //

s_arr   = array.new_string(0)
u_arr   = array.new_bool(0)

// Add Symbols 15
array.push(s_arr, only_symbol(s01))
array.push(s_arr, only_symbol(s02))
array.push(s_arr, only_symbol(s03))
array.push(s_arr, only_symbol(s04))
array.push(s_arr, only_symbol(s05))
array.push(s_arr, only_symbol(s06))
array.push(s_arr, only_symbol(s07))
array.push(s_arr, only_symbol(s08))
array.push(s_arr, only_symbol(s09))
array.push(s_arr, only_symbol(s10))
array.push(s_arr, only_symbol(s11))
array.push(s_arr, only_symbol(s12))
array.push(s_arr, only_symbol(s13))
array.push(s_arr, only_symbol(s14))
array.push(s_arr, only_symbol(s15))
array.push(s_arr, only_symbol(s16))
array.push(s_arr, only_symbol(s17))
array.push(s_arr, only_symbol(s18))

// FLAGS 15
array.push(u_arr, u01)
array.push(u_arr, u02)
array.push(u_arr, u03)
array.push(u_arr, u04)
array.push(u_arr, u05)
array.push(u_arr, u06)
array.push(u_arr, u07)
array.push(u_arr, u08)
array.push(u_arr, u09)
array.push(u_arr, u10)
array.push(u_arr, u11)
array.push(u_arr, u12)
array.push(u_arr, u13)
array.push(u_arr, u14)
array.push(u_arr, u15)
array.push(u_arr, u16)
array.push(u_arr, u17)
array.push(u_arr, u18)

H_arr   = array.new_float(0)
array.push(H_arr, high01)
array.push(H_arr, high02)
array.push(H_arr, high03)
array.push(H_arr, high04)
array.push(H_arr, high05)
array.push(H_arr, high06)
array.push(H_arr, high07)
array.push(H_arr, high08)
array.push(H_arr, high09)
array.push(H_arr, high10)
array.push(H_arr, high11)
array.push(H_arr, high12)
array.push(H_arr, high13)
array.push(H_arr, high14)
array.push(H_arr, high15)
array.push(H_arr, high16)
array.push(H_arr, high17)
array.push(H_arr, high18)

L_arr   = array.new_float(0)
array.push(L_arr, low01)
array.push(L_arr, low02)
array.push(L_arr, low03)
array.push(L_arr, low04)
array.push(L_arr, low05)
array.push(L_arr, low06)
array.push(L_arr, low07)
array.push(L_arr, low08)
array.push(L_arr, low09)
array.push(L_arr, low10)
array.push(L_arr, low11)
array.push(L_arr, low12)
array.push(L_arr, low13)
array.push(L_arr, low14)
array.push(L_arr, low15)
array.push(L_arr, low16)
array.push(L_arr, low17)
array.push(L_arr, low18)

macd_arr   = array.new_float(0)
array.push(macd_arr, MACD01)
array.push(macd_arr, MACD02)
array.push(macd_arr, MACD03)
array.push(macd_arr, MACD04)
array.push(macd_arr, MACD05)
array.push(macd_arr, MACD06)
array.push(macd_arr, MACD07)
array.push(macd_arr, MACD08)
array.push(macd_arr, MACD09)
array.push(macd_arr, MACD10)
array.push(macd_arr, MACD11)
array.push(macd_arr, MACD12)
array.push(macd_arr, MACD13)
array.push(macd_arr, MACD14)
array.push(macd_arr, MACD15)
array.push(macd_arr, MACD16)
array.push(macd_arr, MACD17)
array.push(macd_arr, MACD18)

MaxMacd_arr   = array.new_float(0)
array.push(MaxMacd_arr, maxMacd01)
array.push(MaxMacd_arr, maxMacd02)
array.push(MaxMacd_arr, maxMacd03)
array.push(MaxMacd_arr, maxMacd04)
array.push(MaxMacd_arr, maxMacd05)
array.push(MaxMacd_arr, maxMacd06)
array.push(MaxMacd_arr, maxMacd07)
array.push(MaxMacd_arr, maxMacd08)
array.push(MaxMacd_arr, maxMacd09)
array.push(MaxMacd_arr, maxMacd10)
array.push(MaxMacd_arr, maxMacd11)
array.push(MaxMacd_arr, maxMacd12)
array.push(MaxMacd_arr, maxMacd13)
array.push(MaxMacd_arr, maxMacd14)
array.push(MaxMacd_arr, maxMacd15)
array.push(MaxMacd_arr, maxMacd16)
array.push(MaxMacd_arr, maxMacd17)
array.push(MaxMacd_arr, maxMacd18)

MinMacd_arr   = array.new_float(0)
array.push(MinMacd_arr, minMacd01)
array.push(MinMacd_arr, minMacd02)
array.push(MinMacd_arr, minMacd03)
array.push(MinMacd_arr, minMacd04)
array.push(MinMacd_arr, minMacd05)
array.push(MinMacd_arr, minMacd06)
array.push(MinMacd_arr, minMacd07)
array.push(MinMacd_arr, minMacd08)
array.push(MinMacd_arr, minMacd09)
array.push(MinMacd_arr, minMacd10)
array.push(MinMacd_arr, minMacd11)
array.push(MinMacd_arr, minMacd12)
array.push(MinMacd_arr, minMacd13)
array.push(MinMacd_arr, minMacd14)
array.push(MinMacd_arr, minMacd15)
array.push(MinMacd_arr, minMacd16)
array.push(MinMacd_arr, minMacd17)
array.push(MinMacd_arr, minMacd18)

MinPrice_arr   = array.new_float(0)
array.push(MinPrice_arr, minLow01)
array.push(MinPrice_arr, minLow02)
array.push(MinPrice_arr, minLow03)
array.push(MinPrice_arr, minLow04)
array.push(MinPrice_arr, minLow05)
array.push(MinPrice_arr, minLow06)
array.push(MinPrice_arr, minLow07)
array.push(MinPrice_arr, minLow08)
array.push(MinPrice_arr, minLow09)
array.push(MinPrice_arr, minLow10)
array.push(MinPrice_arr, minLow11)
array.push(MinPrice_arr, minLow12)
array.push(MinPrice_arr, minLow13)
array.push(MinPrice_arr, minLow14)
array.push(MinPrice_arr, minLow15)
array.push(MinPrice_arr, minLow16)
array.push(MinPrice_arr, minLow17)
array.push(MinPrice_arr, minLow18)

MaxPrice_arr   = array.new_float(0)
array.push(MaxPrice_arr, maxHigh01)
array.push(MaxPrice_arr, maxHigh02)
array.push(MaxPrice_arr, maxHigh03)
array.push(MaxPrice_arr, maxHigh04)
array.push(MaxPrice_arr, maxHigh05)
array.push(MaxPrice_arr, maxHigh06)
array.push(MaxPrice_arr, maxHigh07)
array.push(MaxPrice_arr, maxHigh08)
array.push(MaxPrice_arr, maxHigh09)
array.push(MaxPrice_arr, maxHigh10)
array.push(MaxPrice_arr, maxHigh11)
array.push(MaxPrice_arr, maxHigh12)
array.push(MaxPrice_arr, maxHigh13)
array.push(MaxPrice_arr, maxHigh14)
array.push(MaxPrice_arr, maxHigh15)
array.push(MaxPrice_arr, maxHigh16)
array.push(MaxPrice_arr, maxHigh17)
array.push(MaxPrice_arr, maxHigh18)

for i=0 to 17
    if array.get(u_arr, i)
        if array.get(macd_arr, i) >= array.get(MaxMacd_arr, i)
            switch
                i==0=> maxMacd01:=array.get(macd_arr, i)
                i==1=> maxMacd02:=array.get(macd_arr, i)
                i==2=> maxMacd03:=array.get(macd_arr, i)
                i==3=> maxMacd04:=array.get(macd_arr, i)
                i==4=> maxMacd05:=array.get(macd_arr, i)
                i==5=> maxMacd06:=array.get(macd_arr, i)
                i==6=> maxMacd07:=array.get(macd_arr, i)
                i==7=> maxMacd08:=array.get(macd_arr, i)
                i==8=> maxMacd09:=array.get(macd_arr, i)
                i==9=> maxMacd10:=array.get(macd_arr, i)
                i==10=> maxMacd11:=array.get(macd_arr, i)
                i==11=> maxMacd12:=array.get(macd_arr, i)
                i==12=> maxMacd13:=array.get(macd_arr, i)
                i==13=> maxMacd14:=array.get(macd_arr, i)
                i==14=> maxMacd15:=array.get(macd_arr, i)
                i==15=> maxMacd16:=array.get(macd_arr, i)
                i==16=> maxMacd17:=array.get(macd_arr, i)
                i==17=> maxMacd18:=array.get(macd_arr, i)
        if array.get(macd_arr, i) <= array.get(MinMacd_arr, i)
            switch
                i==0=> minMacd01:=array.get(macd_arr, i)
                i==1=> minMacd02:=array.get(macd_arr, i)
                i==2=> minMacd03:=array.get(macd_arr, i)
                i==3=> minMacd04:=array.get(macd_arr, i)
                i==4=> minMacd05:=array.get(macd_arr, i)
                i==5=> minMacd06:=array.get(macd_arr, i)
                i==6=> minMacd07:=array.get(macd_arr, i)
                i==7=> minMacd08:=array.get(macd_arr, i)
                i==8=> minMacd09:=array.get(macd_arr, i)
                i==9=> minMacd10:=array.get(macd_arr, i)
                i==10=> minMacd11:=array.get(macd_arr, i)
                i==11=> minMacd12:=array.get(macd_arr, i)
                i==12=> minMacd13:=array.get(macd_arr, i)
                i==13=> minMacd14:=array.get(macd_arr, i)
                i==14=> minMacd15:=array.get(macd_arr, i)
                i==15=> minMacd16:=array.get(macd_arr, i)
                i==16=> minMacd17:=array.get(macd_arr, i)
                i==17=> minMacd18:=array.get(macd_arr, i)
        if array.get(H_arr, i) >= array.get(MaxPrice_arr, i)
            switch
                i==0=> maxHigh01:=array.get(H_arr, i)
                i==1=> maxHigh02:=array.get(H_arr, i)
                i==2=> maxHigh03:=array.get(H_arr, i)
                i==3=> maxHigh04:=array.get(H_arr, i)
                i==4=> maxHigh05:=array.get(H_arr, i)
                i==5=> maxHigh06:=array.get(H_arr, i)
                i==6=> maxHigh07:=array.get(H_arr, i)
                i==7=> maxHigh08:=array.get(H_arr, i)
                i==8=> maxHigh09:=array.get(H_arr, i)
                i==9=> maxHigh10:=array.get(H_arr, i)
                i==10=> maxHigh11:=array.get(H_arr, i)
                i==11=> maxHigh12:=array.get(H_arr, i)
                i==12=> maxHigh13:=array.get(H_arr, i)
                i==13=> maxHigh14:=array.get(H_arr, i)
                i==14=> maxHigh15:=array.get(H_arr, i)
                i==15=> maxHigh16:=array.get(H_arr, i)
                i==16=> maxHigh17:=array.get(H_arr, i)
                i==17=> maxHigh18:=array.get(H_arr, i)
        if array.get(L_arr, i) <= array.get(MinPrice_arr, i)
            switch
                i==0=> minLow01:=array.get(L_arr, i)
                i==1=> minLow02:=array.get(L_arr, i)
                i==2=> minLow03:=array.get(L_arr, i)
                i==3=> minLow04:=array.get(L_arr, i)
                i==4=> minLow05:=array.get(L_arr, i)
                i==5=> minLow06:=array.get(L_arr, i)
                i==6=> minLow07:=array.get(L_arr, i)
                i==7=> minLow08:=array.get(L_arr, i)
                i==8=> minLow09:=array.get(L_arr, i)
                i==9=> minLow10:=array.get(L_arr, i)
                i==10=> minLow11:=array.get(L_arr, i)
                i==11=> minLow12:=array.get(L_arr, i)
                i==12=> minLow13:=array.get(L_arr, i)
                i==13=> minLow14:=array.get(L_arr, i)
                i==14=> minLow15:=array.get(L_arr, i)
                i==15=> minLow16:=array.get(L_arr, i)
                i==16=> minLow17:=array.get(L_arr, i)
                i==17=> minLow18:=array.get(L_arr, i)

///////////
// PLOTS //

var tbl = table.new(position.bottom_right, 3, 19, frame_color=#151715, frame_width=1, border_width=2, border_color=color.new(color.white, 100))

if barstate.islast

    table.cell(tbl, 0, 0,'Symbol',  width = col_width,     text_halign = text.align_center, bgcolor = color.black, text_color = color.white, text_size = size.small)
    table.cell(tbl, 1, 0, 'MACD',     width = col_width,     text_halign = text.align_center, bgcolor = color.black, text_color = color.white, text_size = size.small)
    table.cell(tbl, 2, 0, 'Price',     width = col_width,     text_halign = text.align_center, bgcolor = color.black, text_color = color.white, text_size = size.small)
    if (scr_numb > 1)
        table.cell(tbl, 3, 0,  '',       width = col_width * 2 * (scr_numb - 1), text_halign = text.align_center, bgcolor = color.new(color.black, 100), text_size = size.small)

    for i = 0 to 17
        if array.get(u_arr, i)

            macd_col  = array.get(macd_arr, i) >= array.get(MaxMacd_arr, i)   ? color.green   : array.get(macd_arr, i) <= array.get(MinMacd_arr, i)  ? color.red : color.gray
            price_col  = array.get(H_arr, i) >= array.get(MaxPrice_arr, i)   ? color.green   : array.get(L_arr, i) <= array.get(MinPrice_arr, i)  ? color.red : color.gray

            table.cell(tbl, 0, i + 1, array.get(s_arr, i),                                 text_halign = text.align_center, bgcolor = color.black, text_color = color.white, text_size = size.small)
            table.cell(tbl, 1, i + 1, str.tostring(array.get(macd_arr, i), "#.#####"),         text_halign = text.align_center, bgcolor = macd_col,    text_color = color.white, text_size = size.small)
            table.cell(tbl, 2, i + 1, price_col==color.green? str.tostring(array.get(H_arr, i), "#.##"):price_col==color.red? str.tostring(array.get(L_arr, i), "#.##"):"No",         text_halign = text.align_center, bgcolor = price_col,    text_color = color.white, text_size = size.small)

//plot(maxHigh01)
//plot(minLow01,color = color.red)

`

i try to integrate syminfo.type but im not coder and i cant


来源: stackexchange

问:
greedy and optimal solution for maximum sub interval in certain range
I tried to get first a greedy solution for me handling reservation buy getting 2 days (start, end) and getting the maximum days that can be reserved without the interval being overlap

```<code>#include <algorithm>
#include <iostream>
using namespace std;

struct Interval {

    int start, end;
};

// Compares two intervals
// according to starting times.

bool comparesorting(Interval i1, Interval i2)//sorting
{

    return (i1.end < i2.end);
}

bool compareoverlap(Interval i1, Interval i2)//overlap
{
    return (i1.start < i2.start) ? true : false;
}

bool isIntersect(Interval arr[], int n)
{
    // Sort intervals in increasing order of start time
    sort(arr, arr + n, compareoverlap);

    // In the sorted array, if start time of an interval
    // is less than end of previous interval, then there
    // is an overlap
    for (int i = 1; i < n; i++)
        if (arr[i - 1].end > arr[i].start)
            //return true;
    if (true) {

            for (int i = 0; i < n; i++)
                cout << "mmmm" << endl;
            cout << "[" << arr[i].start << "," << arr[i].end

                << "] ";

    }

    // If we reach here, then no overlap
    return false;

}
</code>```
```<code>int main()
{

    Interval arr[]

       = { { 6, 8 }, { 7, 9 }, { 2, 4 }, { 4, 7 } , { 1,9 } , {6,9} ,{2,6} , {1,10} };

    int n = sizeof(arr) / sizeof(arr[0]);

    // sort the intervals in increasing order of

    // start time

    sort(arr, arr + n, comparesorting);

    cout << "Intervals sorted  : \n";

    for (int i = 0; i < n; i++)

        cout << "[" << arr[i].start << "," << arr[i].end

        << "] ";

 int n1 = sizeof(arr) / sizeof(arr[0]);
    isIntersect(arr, n1) ? cout << "Yes\n" : cout << "No\n";

return 0;
}
</code>```

the output should be {2,4} {4,7} (that does not overlap)

I'm trying to make an optimal solution to solve this problem. I'm thinking to subtract the end - start and compare it to the addition of this greedy solution
please help I'm stuck!!!!

ContentLicense: CC BY-SA 4.0

Body:
I tried to get first a greedy solution for me handling reservation buy getting 2 days (start, end) and getting the maximum days that can be reserved without the interval being overlap

#include <algorithm>
#include <iostream>
using namespace std;

struct Interval {

    int start, end;
};

// Compares two intervals
// according to starting times.

bool comparesorting(Interval i1, Interval i2)//sorting
{

    return (i1.end < i2.end);
}

bool compareoverlap(Interval i1, Interval i2)//overlap
{
    return (i1.start < i2.start) ? true : false;
}

bool isIntersect(Interval arr[], int n)
{
    // Sort intervals in increasing order of start time
    sort(arr, arr + n, compareoverlap);

    // In the sorted array, if start time of an interval
    // is less than end of previous interval, then there
    // is an overlap
    for (int i = 1; i < n; i++)
        if (arr[i - 1].end > arr[i].start)
            //return true;
    if (true) {

            for (int i = 0; i < n; i++)
                cout << "mmmm" << endl;
            cout << "[" << arr[i].start << "," << arr[i].end

                << "] ";

    }

    // If we reach here, then no overlap
    return false;

}

int main()
{

    Interval arr[]

       = { { 6, 8 }, { 7, 9 }, { 2, 4 }, { 4, 7 } , { 1,9 } , {6,9} ,{2,6} , {1,10} };

    int n = sizeof(arr) / sizeof(arr[0]);

    // sort the intervals in increasing order of

    // start time

    sort(arr, arr + n, comparesorting);

    cout << "Intervals sorted  : \n";

    for (int i = 0; i < n; i++)

        cout << "[" << arr[i].start << "," << arr[i].end

        << "] ";

 int n1 = sizeof(arr) / sizeof(arr[0]);
    isIntersect(arr, n1) ? cout << "Yes\n" : cout << "No\n";

return 0;
}

the output should be {2,4} {4,7} (that does not overlap)

I'm trying to make an optimal solution to solve this problem. I'm thinking to subtract the end - start and compare it to the addition of this greedy solution
please help I'm stuck!!!!


问:
Why colors on my bar plot not matching my Y axis values
I have monthly rain data from a list, where values are on the Y-axis and months on the X-axis.

This is my color palette:

```<code>sns.color_palette("crest", as_cmap=True)
</code>```

This is my code to barplot the data:

```<code>plt.figure(figsize=(8,4), tight_layout=True)
colors = sns.color_palette("crest")

plt.bar(bocas_rain['Date'], bocas_rain['Pr'], color=colors)

plt.xlabel('Months')
plt.ylabel('Rain in mm')
plt.title('Rain in Bocas')
plt.show()
</code>```

The result I am getting is this:

How can I make the highest values of my data match the dark blue colors from the palette?

Body:
I have monthly rain data from a list, where values are on the Y-axis and months on the X-axis.

This is my color palette:

sns.color_palette("crest", as_cmap=True)

This is my code to barplot the data:

plt.figure(figsize=(8,4), tight_layout=True)
colors = sns.color_palette("crest")

plt.bar(bocas_rain['Date'], bocas_rain['Pr'], color=colors)

plt.xlabel('Months')
plt.ylabel('Rain in mm')
plt.title('Rain in Bocas')
plt.show()

The result I am getting is this:

How can I make the highest values of my data match the dark blue colors from the palette?


问:
How can I deploy a .NET Maui app without using MSIX
UPDATE: I have been using the WiX Toolset to build installers for at least 10 years. Now, I am trying to add a Maui application to the installer, but...

MSIX only installs for the current user - I need it to be a machine-wide install.

MSIX installs to a hidden folder in C:\Program Files\WindowsApps... which I don't like. I want to install it into a folder I have control over.

My question is how can I build the Maui app and take the contents in the ...\bin... folder, run HEAT (a WiX utility) to create the WiX xxx.wxs file and build a WiX bundle with the other components in the application. It is not possible to deploy a MSIX file in a WiX bundle and even if it did, the issues I list above make this unfeasible.

How can I get all of the necessary files so that I can deploy a Maui app and not use MSIX?

@ToolmakerSteve - yes, I deploy .NET6/7 projects via WiX. The actual question here was how to publish a MAUI app in an unpackaged way. @jfversluis describes the process here:

.NET MAUI Windows Unpackaged Apps


问:
While rendering open gym enviorment, not able to view my print statement simultaneously in the console
For the below code print does not work in simultaneously when rendring. All the print displays after completion of rendering.

```<code>import gym

env = gym.make("MountainCar-v0", render_mode="human")
env.reset(seed=9)

done = False
step = 0
while not done:
    print(step,end="|")
    action = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 0, 1, 2, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2][step]
    new_state, reward, done, truncated, info = env.step(action)
    step+=1
    env.render()
env.close()
</code>```

Is it possible to print or view while rendering the enviorment?

Body:
For the below code print does not work in simultaneously when rendring. All the print displays after completion of rendering.

import gym

env = gym.make("MountainCar-v0", render_mode="human")
env.reset(seed=9)

done = False
step = 0
while not done:
    print(step,end="|")
    action = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 0, 1, 2, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2][step]
    new_state, reward, done, truncated, info = env.step(action)
    step+=1
    env.render()
env.close()

Is it possible to print or view while rendering the enviorment?


问:
GenABEL on R4.2.2 Windows
I´m looking for a way to use GenABEL on R4.2.2 with Rstudio-2022.07.2-576.
GenABEL is only accessible through the R archive with latest version from 2017 or github GenABEL-Project /
GenABEL(https://github.com/GenABEL-Project/GenABEL).

Was first trying to use devtools:

install.packages("devtools")
library(devtools)
devtools::install_github("GenABEL-Project/GenABEL")

#> Warning messages:
#> 1: In utils::untar(tarfile, ...) :
#>   ‘tar.exe -xf "C:\Users\Anne\AppData\Local\Temp\RtmpQnQiaa\file14785f1e59c1.tar.gz" -C "C:/Users/Anne/AppData/Local/Temp/RtmpQnQiaa/remotes1478e0b3485"’ returned error code 1
#> 2: In i.p(...) :
#>   Installation des Pakets ‘C:/Users/Anne/AppData/Local/Temp/RtmpQnQiaa/file147853b04d76/GenABEL_1.8-0.tar.gz’ hatte Exit-Status ungleich 0
```

after that I was trying to use the description of:
https://www.r-bloggers.com/2019/11/using-r-installing-genabel-and-repeatabel/
But also no chance.

First I install the package curl. With:
curl -O https://cran.r-project.org/src/contrib/Archive/GenABEL/GenABEL_1.8-0.tar.gz
there was an

Error: unexpected symbol in "curl -O https". I also tried -0, -o and -O. No chance.

Some other google research did not have any usable results.
Hopefully somebody can help me.
Best regards!

Title: GenABEL on R4.2.2 Windows

Body:
I´m looking for a way to use GenABEL on R4.2.2 with Rstudio-2022.07.2-576.
GenABEL is only accessible through the R archive with latest version from 2017 or github GenABEL-Project /
GenABEL(https://github.com/GenABEL-Project/GenABEL).

Was first trying to use devtools:

install.packages("devtools")
library(devtools)
devtools::install_github("GenABEL-Project/GenABEL")

#> Warning messages:
#> 1: In utils::untar(tarfile, ...) :
#>   ‘tar.exe -xf "C:\Users\Anne\AppData\Local\Temp\RtmpQnQiaa\file14785f1e59c1.tar.gz" -C "C:/Users/Anne/AppData/Local/Temp/RtmpQnQiaa/remotes1478e0b3485"’ returned error code 1
#> 2: In i.p(...) :
#>   Installation des Pakets ‘C:/Users/Anne/AppData/Local/Temp/RtmpQnQiaa/file147853b04d76/GenABEL_1.8-0.tar.gz’ hatte Exit-Status ungleich 0

after that I was trying to use the description of:
https://www.r-bloggers.com/2019/11/using-r-installing-genabel-and-repeatabel/
But also no chance.

First I install the package curl. With:
curl -O https://cran.r-project.org/src/contrib/Archive/GenABEL/GenABEL_1.8-0.tar.gz
there was an

Error: unexpected symbol in "curl -O https". I also tried -0, -o and -O. No chance.

Some other google research did not have any usable results.
Hopefully somebody can help me.
Best regards!


问:
Create an object from an Interface using variables (in Typescript)
I'm new to typescript, and I'm trying to create a new object for an Interface that I defined. I know that I can do something like this:

```<code>interface Person {
  name: string;
  age: number;
}

const me: Person = {
  name: "John"
  age: 28,
};
</code>```

However, what if I'd like to declare the variables first, and then build the object based on the variables I declared like this:

```<code>  interface Person {
  name: string;
  age: number;
}

let name: string = "albert"
let age: number = 28

const me: Person = {
  name: name
  age: age,
};
</code>```

This gives me the following error "Type 'void' is not assignable to type 'string'." Any idea of what's going on here?

Body:
I'm new to typescript, and I'm trying to create a new object for an Interface that I defined. I know that I can do something like this:

interface Person {
  name: string;
  age: number;
}

const me: Person = {
  name: "John"
  age: 28,
};

However, what if I'd like to declare the variables first, and then build the object based on the variables I declared like this:

  interface Person {
  name: string;
  age: number;
}

let name: string = "albert"
let age: number = 28

const me: Person = {
  name: name
  age: age,
};

This gives me the following error "Type 'void' is not assignable to type 'string'." Any idea of what's going on here?


问:
Get memory (ROM, PROM) values from IDA disassembler
Want to get 32 bits from 0x8000 adress as 8 bytes

```<code>MEM_EXT:00008000                 db 54h
MEM_EXT:00008001                 db 53h, 57h, 20h
MEM_EXT:00008004                 dd 322E3256h, 31332030h, 30303330h, 31313320h, 43432036h
MEM_EXT:00008004                 dd 2F363535h, 20425345h, 865808FAh, 865808FAh, 865808FAh
MEM_EXT:00008004                 dd 865808FAh, 865808FAh, 865808FAh, 865808FAh, 865808FAh
MEM_EXT:00008004                 dd 865808FAh, 865808FAh, 865808FAh, 0FFA735A7h, 962F8E20h
MEM_EXT:00008004                 dd 0DF00F0h, 0DF00FFh, 0AF008Fh, 70002h, 380038h, 0FF000700h
MEM_EXT:00008004                 dd 0, 0, 0
</code>```

Would this be

0x54 0x53 0x57 0x20 0x32 0x2e 0x32 0x56 ???

How to get further 64 bits, after first 32 bits from 0x8000?

Weird things is that 64 bits as 16 bytes should contain also 0 somwehere

Those should be permutation and S-box key parts

Some more info:

```<code>ROM:00000000 ; Processor       : c166 [C165]
ROM:00000000 ; Target assembler: Keil A166 Assembler
ROM:00000000 ; Byte sex        : Little endian
</code>```

Body:
Want to get 32 bits from 0x8000 adress as 8 bytes

MEM_EXT:00008000                 db 54h
MEM_EXT:00008001                 db 53h, 57h, 20h
MEM_EXT:00008004                 dd 322E3256h, 31332030h, 30303330h, 31313320h, 43432036h
MEM_EXT:00008004                 dd 2F363535h, 20425345h, 865808FAh, 865808FAh, 865808FAh
MEM_EXT:00008004                 dd 865808FAh, 865808FAh, 865808FAh, 865808FAh, 865808FAh
MEM_EXT:00008004                 dd 865808FAh, 865808FAh, 865808FAh, 0FFA735A7h, 962F8E20h
MEM_EXT:00008004                 dd 0DF00F0h, 0DF00FFh, 0AF008Fh, 70002h, 380038h, 0FF000700h
MEM_EXT:00008004                 dd 0, 0, 0

Would this be

0x54 0x53 0x57 0x20 0x32 0x2e 0x32 0x56 ???

How to get further 64 bits, after first 32 bits from 0x8000?

Weird things is that 64 bits as 16 bytes should contain also 0 somwehere

Those should be permutation and S-box key parts

Some more info:

ROM:00000000 ; Processor       : c166 [C165]
ROM:00000000 ; Target assembler: Keil A166 Assembler
ROM:00000000 ; Byte sex        : Little endian


问:
haxball-javascript proyect dont work in module.export
i need help.

```<code>
The project is (https://github.com/hbenormous/hhh-host)

My haxball script and the variable export and HBInit:```

const room = HBInit({
    roomName: roomName,
    password: roomPassword,
    maxPlayers: maxPlayers,
    public: roomPublic,
    noPlayer: true,
    geo: {"code": "ME", "lat": -600, "lon": -600 },
});

```
<p>Variable LI_auth export</p>
```let LI_auth = [AD_auth1,AD_auth2,AD_auth3,AD_auth4,AD_auth5,AD_auth6,AD_auth7,AD_auth8,AD_auth9,AD_auth10,AD_auth11,AD_auth12,AD_auth13,AD_auth14,AD_auth15,AD_auth16,AD_auth17,AD_auth18,AD_auth19,AD_auth20,AD_auth21,AD_auth22,AD_auth23,AD_auth24,AD_auth25,AD_auth26,AD_auth27,AD_auth28,AD_auth29,AD_auth30,AD_auth31];
module.exports = LI_auth;
```
<p>Import variable in commands.js file
Commands.js</p>
```
const { Fun } = require("../functions");
const { MessageEmbed } = require("discord.js");
const { HBInit } = require("../haxball/hbinit");
let LI_auth = require('/my-bot-example.js')

const fun = new Fun();
const room = new HBInit();

```
<p>And this is the terminal error:
enter image description here</p>
```
const room = HBInit({
             ^

ReferenceError: HBInit is not defined
    at Object.<anonymous> (/Users/-/Downloads/Proyectos  JS/hhh-host-main/my-bot-example.js:27:14)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/Users/-n/Downloads/Proyectos  JS/hhh-host-main/node_modules/hhh-host/src/discord/commands.js:4:15)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)

```

And classes Haxball.js here: https://github.com/haxball/haxball-issues/wiki/Headless-Host
If require more information or code, reply this question, thanks in advance.

Resolve the bug and ejecute program

Body:
i need help.

The project is (https://github.com/hbenormous/hhh-host)

My haxball script and the variable export and HBInit:```

const room = HBInit({
    roomName: roomName,
    password: roomPassword,
    maxPlayers: maxPlayers,
    public: roomPublic,
    noPlayer: true,
    geo: {"code": "ME", "lat": -600, "lon": -600 },
});

Variable LI_auth export

let LI_auth = [AD_auth1,AD_auth2,AD_auth3,AD_auth4,AD_auth5,AD_auth6,AD_auth7,AD_auth8,AD_auth9,AD_auth10,AD_auth11,AD_auth12,AD_auth13,AD_auth14,AD_auth15,AD_auth16,AD_auth17,AD_auth18,AD_auth19,AD_auth20,AD_auth21,AD_auth22,AD_auth23,AD_auth24,AD_auth25,AD_auth26,AD_auth27,AD_auth28,AD_auth29,AD_auth30,AD_auth31];
module.exports = LI_auth;

Import variable in commands.js file
Commands.js

const { Fun } = require("../functions");
const { MessageEmbed } = require("discord.js");
const { HBInit } = require("../haxball/hbinit");
let LI_auth = require('/my-bot-example.js')

const fun = new Fun();
const room = new HBInit();

And this is the terminal error:
enter image description here

const room = HBInit({
             ^

ReferenceError: HBInit is not defined
    at Object.<anonymous> (/Users/-/Downloads/Proyectos  JS/hhh-host-main/my-bot-example.js:27:14)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/Users/-n/Downloads/Proyectos  JS/hhh-host-main/node_modules/hhh-host/src/discord/commands.js:4:15)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)

And classes Haxball.js here: https://github.com/haxball/haxball-issues/wiki/Headless-Host
If require more information or code, reply this question, thanks in advance.

Resolve the bug and ejecute program


问:
Set a value deep in a dict dynamically including arrays
Based on Set a value deep in a dict dynamically I tried to apply the answer from https://stackoverflow.com/users/162732/gawel  my own dictionary structures and paths, that include lists within the dicts.

So imagine the following scenario:

```<code>my_dict = {"contacts"[{"addresses":[{"addressLine1": "some street", "category": "home"}]}]}
key = contacts[0].addresses[1]
value = {"addressLine1": "some other street", "category": "work"}
</code>```

I came up with the following, clunky-feeling, structure:

```<code>def set_deep2(my_dict , key, value):
    dd = dictionary
    keys = key.split(".")
    latest = keys.pop()
    name = ""
    number = 0
    for k in keys:
        if k == keys[0] and k.endswith("]"):
            m = re.search(r"\[([0-9]+)\]", k)
            number = int(m[1])
            name = k.split("[")[0]
            dd = dd.setdefault(name, [{}])
        else:
            dd = dd.setdefault(k, {})
    if name and keys and keys[0].startswith(name):
        if len(dd) <= number:
            dd.append({})
        dd[number][latest] = value
    else:
        dd[latest] = value
</code>```

Given that answer is now 8 years old and the fact that the above feels clunky and is likely missing some cases, I wonder is there is any other way of achieving the same thing.

Body:
Based on Set a value deep in a dict dynamically I tried to apply the answer from https://stackoverflow.com/users/162732/gawel  my own dictionary structures and paths, that include lists within the dicts.

So imagine the following scenario:

my_dict = {"contacts"[{"addresses":[{"addressLine1": "some street", "category": "home"}]}]}
key = contacts[0].addresses[1]
value = {"addressLine1": "some other street", "category": "work"}

I came up with the following, clunky-feeling, structure:

def set_deep2(my_dict , key, value):
    dd = dictionary
    keys = key.split(".")
    latest = keys.pop()
    name = ""
    number = 0
    for k in keys:
        if k == keys[0] and k.endswith("]"):
            m = re.search(r"\[([0-9]+)\]", k)
            number = int(m[1])
            name = k.split("[")[0]
            dd = dd.setdefault(name, [{}])
        else:
            dd = dd.setdefault(k, {})
    if name and keys and keys[0].startswith(name):
        if len(dd) <= number:
            dd.append({})
        dd[number][latest] = value
    else:
        dd[latest] = value

Given that answer is now 8 years old and the fact that the above feels clunky and is likely missing some cases, I wonder is there is any other way of achieving the same thing.


问:
Creating refresh tokens for Sharepoint REST API from Matlab
I'm using Matlab's webread function to read lists from my organization's Sharepoint.  I went through a detailed process to generate a token in Postman (with client_id, client_secret, etc).  I then send this token via the webread function and this works perfectly in reading the SP lists.  So far, so good.

However, the Sharepoint access token expires every few hours.  I manually create a new one in Postman each time and manually paste it in my Matlab script.  I've read about creating longer-lasting 'refresh' tokens that are generated automatically.  Being mainly a Matlab user and not an I/T person, I cannot for the life of me figure out how to create these refresh tokens.

A second (less desirable) alternative would be to use catch/try to check if the current token has expired and create a new one.  That command is also quite complicated needing realm, client-id, client-secret, etc.  Here also, I cannot figure out how to structure the webread argument to send all this information.

Has anyone has successfully kept a continuous REST API connection from Matlab to Sharepoint without expiring tokens?  Are there any other (better?) alternatives to using tokens?  I'd greatly appreciate a gentle, step-by-step procedure on how to do this.

TIA

Succesfully generate the initial token, seeking help on a non-expiring REST API connection between Matlab and Sharepoint.


问:
Why clang documentation doesn't contain information on a lot of options?
At work, I work on a C++ program which uses Cmake. In the top-level CMakeLists.txt, the CMAKE_CXX_FLAGS_DEBUG flag is set for Clang to input the different flags we want for the compilation.

My problem is that I see previous developers on the project put a lot of compilation options I don't understand for clang and I don't find them in the documentation... I don't understand why they aren't documented ! Moreover, I really wonder how the previous developers had the idea to put them in the code if they couldn't find them in the official documentation !

Here is a few examples of flags I couldn't find in the documentation :

```<code>-Wno-covered-switch-default
-Wno-exit-time-destructors
-Wno-padded
-Wweak-vtables
</code>```

Body:
At work, I work on a C++ program which uses Cmake. In the top-level CMakeLists.txt, the CMAKE_CXX_FLAGS_DEBUG flag is set for Clang to input the different flags we want for the compilation.

My problem is that I see previous developers on the project put a lot of compilation options I don't understand for clang and I don't find them in the documentation... I don't understand why they aren't documented ! Moreover, I really wonder how the previous developers had the idea to put them in the code if they couldn't find them in the official documentation !

Here is a few examples of flags I couldn't find in the documentation :

-Wno-covered-switch-default
-Wno-exit-time-destructors
-Wno-padded
-Wweak-vtables


问:
notepad++ macro that uses ctrl+alt+shift+enter (within macro; not as shortcut) changes random line of text up above or, worse, causes segfault; why?
Love macros in notepad++. They save time. However, I recorded a macro to wrap a given line with the good ol' try...except, ran it, and it works. However, it ALSO randomly modifies something way up above in the code (dozens of lines above). Not great. On a new .txt file (ctrl+n), using the macro straight crashes notepad++ (assuming a segfault, as it's trying to access memory it doesn't own). Why oh why? Also, is there any fix? (I'm currently avoiding recording ANY ctrl+alt+shift+enters as a workaround in my macros, but that's just plain annoying.)

Steps for reproducing:

Click Macro.

Click Start Recording.

Record keystrokes, mimicking writing the below:

```<code>try:
    <original line>
except Exception as e:
    print(e)
</code>```

Click Macro.

Click Stop Recording.

Click Macro.

Click Playback.

Notepad++ crashes.

Version for reproducing:

Notepad++v8.4.7 (64-bit) Windows

Body:
Love macros in notepad++. They save time. However, I recorded a macro to wrap a given line with the good ol' try...except, ran it, and it works. However, it ALSO randomly modifies something way up above in the code (dozens of lines above). Not great. On a new .txt file (ctrl+n), using the macro straight crashes notepad++ (assuming a segfault, as it's trying to access memory it doesn't own). Why oh why? Also, is there any fix? (I'm currently avoiding recording ANY ctrl+alt+shift+enters as a workaround in my macros, but that's just plain annoying.)

Steps for reproducing:

Click Macro.

Click Start Recording.

Record keystrokes, mimicking writing the below:

try:
    <original line>
except Exception as e:
    print(e)

Click Macro.

Click Stop Recording.

Click Macro.

Click Playback.

Notepad++ crashes.

Version for reproducing:

Notepad++v8.4.7 (64-bit) Windows


问:
Cant use alt gr + b to write left curly bracket
So ,I am from Croatia and I use Redragod Kumara K552 keyboard and its croatian keyboard setting.On croatian keyboard, combination of keys to write left curly bracket is alt gr + b.It worked but suddendly it stoped working, but its weird because both keys are functioning normally except for that.i can still write right curly bracket using alt gr + n.It is a big problem because its slowing me down because i have to copy paste left bracket any time i want to use it.It bothers me most how long it takes to write CSS.Does anyone know how to fix this???

I just want to use my keyboard normally.


问:
AWS Secret manager ssh key read in bash variable
I am trying to use AWS Secret manager to store a private ssh key and read in bash script.
I created the secret with name testsshkey in Secrets manager.
This is a multiline text stored in SecretsMananger
Then I created the bash script with following

```<code>secret_key=$(aws secretsmanager get-secret-value --region us-east-1 --secret-id testsshkey --query SecretString --output text)
echo $secret_key

</code>```

When I run this script, it only prints last line of the key

Body:
I am trying to use AWS Secret manager to store a private ssh key and read in bash script.
I created the secret with name testsshkey in Secrets manager.
This is a multiline text stored in SecretsMananger
Then I created the bash script with following

secret_key=$(aws secretsmanager get-secret-value --region us-east-1 --secret-id testsshkey --query SecretString --output text)
echo $secret_key

When I run this script, it only prints last line of the key


问:
How to get username field automatically in Django
I am working on a Django project which is something similar to Fiverr in its working. I have used abstractuser where there is a buyer and seller. The seller creates a gig then the buyer will go through the gig before placing an order. My issue is how to get the seller and place him in the order that the buyer will create from reading the gig. Currently I am using the system whereby the buyer will have to manually choose a gig from a list, which I think is not effective.
Here is my Models.py

```<code>`class User(AbstractUser):
            is_buyer=models.BooleanField(default=False)
            is_seller=models.BooleanField(default=False)
        class Profile(models.Model):
            user = models.OneToOneField(User, on_delete=models.CASCADE)
            avatar = models.ImageField(default='avatar.jpg', null=True, blank=True)
            about = models.CharField(max_length=100)

            def __str__(self):
                return self.user.username

        class Gig(models.Model):
            seller = models.ForeignKey(Profile, on_delete = models.CASCADE, null=False, blank=False)
            category = models.ForeignKey('Category', on_delete = models.CASCADE, null=False, blank=False)
            title = models.CharField(max_length=500, null=True, blank=True)
            description = models.CharField(max_length=500, null=True, blank=True)
            gig_id = models.UUIDField(default=uuid.uuid4, primary_key=True, unique=True, editable=False)
            created = models.DateTimeField(auto_now_add=True)

            def __str__(self):
                return self.title

        class Order(models.Model):
            buyer = models.ForeignKey(Profile, on_delete=models.CASCADE, null=False, blank=False)
            seller = models.ForeignKey(Gig, on_delete=models.CASCADE, related_name='+', null=False, blank=False)
            title = models.CharField(max_length=500, null=True, blank=True)
            description = models.CharField(max_length=500)
            amount = models.IntegerField(max_length=50, blank=False)
            is_ordered = models.BooleanField(default=False)
            order_id = models.UUIDField(default=uuid.uuid4, unique=True, db_index=True, editable=False)
            slug = models.SlugField(null=True)

            def __str__(self):
                return self.title`
</code>```

And views.py where I am getting the submissions;

```<code>def createOrder(request):
    profile = request.user.profile
    form = CreateOrderForm()
    if request.method == 'POST':
        form = CreateOrderForm(request.POST, request.FILES)
        if form.is_valid:
            order = form.save(commit=False)
            order.buyer = profile
            order.save()
            # form.save()
            messages.info(request, 'Order Succesfully Created')
            return redirect('create_order')
        else:
            messages.error(request, 'Order Not Created! Try Again Later')

    context = {'form':form}
    return render(request, 'users/create_order.html', context)
</code>```

Any help will he highly appreciated.

Body:
I am working on a Django project which is something similar to Fiverr in its working. I have used abstractuser where there is a buyer and seller. The seller creates a gig then the buyer will go through the gig before placing an order. My issue is how to get the seller and place him in the order that the buyer will create from reading the gig. Currently I am using the system whereby the buyer will have to manually choose a gig from a list, which I think is not effective.
Here is my Models.py

`class User(AbstractUser):
            is_buyer=models.BooleanField(default=False)
            is_seller=models.BooleanField(default=False)
        class Profile(models.Model):
            user = models.OneToOneField(User, on_delete=models.CASCADE)
            avatar = models.ImageField(default='avatar.jpg', null=True, blank=True)
            about = models.CharField(max_length=100)

            def __str__(self):
                return self.user.username

        class Gig(models.Model):
            seller = models.ForeignKey(Profile, on_delete = models.CASCADE, null=False, blank=False)
            category = models.ForeignKey('Category', on_delete = models.CASCADE, null=False, blank=False)
            title = models.CharField(max_length=500, null=True, blank=True)
            description = models.CharField(max_length=500, null=True, blank=True)
            gig_id = models.UUIDField(default=uuid.uuid4, primary_key=True, unique=True, editable=False)
            created = models.DateTimeField(auto_now_add=True)

            def __str__(self):
                return self.title

        class Order(models.Model):
            buyer = models.ForeignKey(Profile, on_delete=models.CASCADE, null=False, blank=False)
            seller = models.ForeignKey(Gig, on_delete=models.CASCADE, related_name='+', null=False, blank=False)
            title = models.CharField(max_length=500, null=True, blank=True)
            description = models.CharField(max_length=500)
            amount = models.IntegerField(max_length=50, blank=False)
            is_ordered = models.BooleanField(default=False)
            order_id = models.UUIDField(default=uuid.uuid4, unique=True, db_index=True, editable=False)
            slug = models.SlugField(null=True)

            def __str__(self):
                return self.title`

And views.py where I am getting the submissions;

def createOrder(request):
    profile = request.user.profile
    form = CreateOrderForm()
    if request.method == 'POST':
        form = CreateOrderForm(request.POST, request.FILES)
        if form.is_valid:
            order = form.save(commit=False)
            order.buyer = profile
            order.save()
            # form.save()
            messages.info(request, 'Order Succesfully Created')
            return redirect('create_order')
        else:
            messages.error(request, 'Order Not Created! Try Again Later')

    context = {'form':form}
    return render(request, 'users/create_order.html', context)

Any help will he highly appreciated.


问:
migrating project to comply with google sign in requirements for iOS
I'm trying to get a google sign in button to work with my iOS app, but I'm getting this error here:
Cannot find 'presentingViewController' in scope

This is the code segment:

```<code>func handleSignInButton() {
      GIDSignIn.sharedInstance.signIn(
        with: signInConfig,
        presenting: presentingViewController // this is the line with the error,
        callback: GIDSignInCallback? = nil) { user, error in
          guard let signInUser = user else {
            // Inspect error
            return
          }
          // If sign in succeeded, display the app's main content View.
        }
    }
</code>```

I've been told I need to migrate the way I am signing in and I found this here:
https://developers.google.com/identity/sign-in/ios/quick-migration-guide

but I'm confused about this part here:

```<code>Manually connect GIDSignInButton to a method that calls signInWithConfiguration:presentingViewController:callback: using an IBAction or similar.
</code>```

Can someone show me how to do this properly? I'm a iOS novice :)
Thanks!

Body:
I'm trying to get a google sign in button to work with my iOS app, but I'm getting this error here:
Cannot find 'presentingViewController' in scope

This is the code segment:

func handleSignInButton() {
      GIDSignIn.sharedInstance.signIn(
        with: signInConfig,
        presenting: presentingViewController // this is the line with the error,
        callback: GIDSignInCallback? = nil) { user, error in
          guard let signInUser = user else {
            // Inspect error
            return
          }
          // If sign in succeeded, display the app's main content View.
        }
    }

I've been told I need to migrate the way I am signing in and I found this here:
https://developers.google.com/identity/sign-in/ios/quick-migration-guide

but I'm confused about this part here:

Manually connect GIDSignInButton to a method that calls signInWithConfiguration:presentingViewController:callback: using an IBAction or similar.

Can someone show me how to do this properly? I'm a iOS novice :)
Thanks!


问:
Logging actions - Keil Microvision with Proteus Pro
I work with STM32CubeMX, Keil Microvision and Proteus Simulator, I use C programming language in Keil microvision, how can I print value of some variable and display that value in Proteus log window, any help will be welcome. Do I need to include some library for that action, I tried printf function but program doesn't recognize that part</p>


问:
Player Not Rotating in 2d unity
I'm trying to make something in 2D
It no work:

```<code>        transform.rotation.eulerAngles.Equals(new Vector3(0, 0, Direction));
</code>```

I do not know why but it doesn't work
Note: I have a 2d rigidbody
with locked rotation.

I was trying to rotate an object to a variable

Title: Player Not Rotating in 2d unity

Body:
I'm trying to make something in 2D
It no work:

        transform.rotation.eulerAngles.Equals(new Vector3(0, 0, Direction));

I do not know why but it doesn't work
Note: I have a 2d rigidbody
with locked rotation.

I was trying to rotate an object to a variable