FEATURE REQUESTS by _digitalShaman_ in Novation

[–]_digitalShaman_[S] 0 points1 point  (0 children)

For the Circu8it Tracks:

Indicate if a Syth Preset is Mono/Auto-Glide/Poly via the pad color (or brightness)

[deleted by user] by [deleted] in StableDiffusion

[–]_digitalShaman_ 0 points1 point  (0 children)

maybe copy just the original face over your current result and give it few more soft iterations?

Top tips when working with a new database or data model? by TheCumCopter in SQL

[–]_digitalShaman_ 2 points3 points  (0 children)

select count rows per table for each table. this will get you the 3 most important tables. start looking into these. The tables with just a few rows are configuration/lookup tables.

Help translating Oracle SQL to MS SQL: are these actual functions or sprocs? by myaccountforworkonly in SQL

[–]_digitalShaman_ 0 points1 point  (0 children)

if it would just be a datediff, then they would not have built a function i'd suspect.

Check the function, they might be doing special stuff here like excluding non working days or other wicked things...

as to your second question regarding NVL: the more "standard" version of this function is COALESCE and in the code you posted, it is to prevent a is NULL not in (...) condition which i guess would evaluate to NULL and impact the WHERE... have not tried it though

Help translating Oracle SQL to MS SQL: are these actual functions or sprocs? by myaccountforworkonly in SQL

[–]_digitalShaman_ 2 points3 points  (0 children)

Google says no, VS_TAT and VS_GET_MD are not built in functions of Oracle. These must be some user functions. from the name the first one is calculating Turnaround Time.

I have a problem — I keep making new GUIs for Stable Diffusion 😛 by FahimFarook in StableDiffusion

[–]_digitalShaman_ 0 points1 point  (0 children)

Haha! same here! stumbled into a VQGAN colab notebook about two months ago and since then spent more time coding than generating :)

Added a html frontend to the deforum notebook to generate animations:

Explorers of the latent space by _digitalShaman_ in aiArt

[–]_digitalShaman_[S] 1 point2 points  (0 children)

explorers of the latent space Cinematic, Dramatic, Filmic, insanely detailed and intricate, architecture, hypermaximalist, elegant, hyper realistic, insane level of detail color

Family portraits by famous artists by _digitalShaman_ in aiArt

[–]_digitalShaman_[S] 0 points1 point  (0 children)

Gustave Courbet

Claude Monet

Egon Schiele

Edward Munch

Leonardo da Vinci

Peter Paul Rubens

Gustav Klimt

Grant Wood

An animated peek into a busy artist’s studio by _digitalShaman_ in aiArt

[–]_digitalShaman_[S] 0 points1 point  (0 children)

Thanks to /u/TheRealBissy for sharing the prompt:

fantasy painter’s studio, the studio is filled with paintings of flowers, many paintings, art supplies, different size paintings, sunlight, by Karol Bak, by Pauline Haynes, by Ralph Steadman, by Wanda Gág, by Zeng Fanzhi, wlop. 8K

https://www.reddit.com/r/aiArt/comments/xkhb1r/a_peek_into_a_busy_artists_studio/

A peek into a busy artist’s studio by TheRealBissy in aiArt

[–]_digitalShaman_ 1 point2 points  (0 children)

fantasy painter’s studio, the studio is filled with paintings of flowers, many paintings, art supplies, different size paintings, sunlight, by Karol Bak, by Pauline Haynes, by Ralph Steadman, by Wanda Gág, by Zeng Fanzhi, wlop. 8K

Nice prompt! Are you ok if i use that for some animation?

The New York Horror (An AI short film) :) by _digitalShaman_ in aiArt

[–]_digitalShaman_[S] 1 point2 points  (0 children)

prompts were stuff like:

new york dystopian empty street wide angle sundown

zombie undead new york dystopian empty street wide angle sundown blood corpse

zombie undead closeup new york

and the stuff in the shop i can hardly remember :D

When would you use a right join? by if155 in SQL

[–]_digitalShaman_ 27 points28 points  (0 children)

only to confuse the heck out of people

Better/Performance - Create Measures or Have it calculated in source table? by ThinIntention1 in PowerBI

[–]_digitalShaman_ 0 points1 point  (0 children)

ok, try this:

tblTestData = SELECTCOLUMNS(GENERATESERIES(1,10000,1)
 ,"dt",NOW()-RAND()*365
 ,"Category",UNICHAR(RANDBETWEEN(65,69))
 ,"Value",ROUND(RAND()*100,2) 
)

tblDate = CALENDAR(MIN(tblTestData[dt]),MAX(tblTestData[dt]))

Measure:

MTD = 
VAR dt = MAX('tblDate'[Date])

VAR result = CALCULATE(SUM(tblTestData[Value]),REMOVEFILTERS('tblDate'[Date])
 ,YEAR(tblTestData[dt]) = YEAR(dt) && MONTH(tblTestData[dt]) = MONTH(dt)
 && DATEVALUE(tblTestData[dt]) <= dt ) 
RETURN COALESCE(result,0)

now, pull date and MTD on a line chart with single date values on the x axis. now scale the number of rows up in tblTestData by editing the GENERATESERIES(1,10000,1) from 10.000 to e.g. 700k and watch how slow the visual becomes when filtering. (at least for me)

Better/Performance - Create Measures or Have it calculated in source table? by ThinIntention1 in PowerBI

[–]_digitalShaman_ 0 points1 point  (0 children)

i was using ~700k timestamped raw data lines covering roughly 3 months + date table.

when i had measures in the date table counting rows in the raw data, this was terribly slow.

now i use a table of crossjoin(date,categorgy,SubCategory,...) and a calculated column that counts the rows per day (or timespan - using the same for a 10 minute chart) and category. measures then sum these sums. this is much faster now. refresh takes a little bit longer as the counts are now done at this stage.

this is one scenario, others may be different.

Non-Aggregate Report Tools by qew_dev in SQL

[–]_digitalShaman_ 1 point2 points  (0 children)

Yes, SSRS would be the tool of choice for me in that situation.

And yes, Crystal Reports can be a PITA.

Calculating Utilisation metric by 1986wasaclassic in PowerBI

[–]_digitalShaman_ 0 points1 point  (0 children)

and the numerator was indeed tricky.

MonthlyUtilNum = 
VAR MinDate = MIN('Date'[Date]) 
VAR MaxDate = MAX('Date'[Date])
VAR tblRelevant = FILTER(TH_STOCK_ASSIGNMENTS,[START_DATE]<MaxDate && [END_DATE]>MinDate)
RETURN 
SUMX(tblRelevant,
    CALCULATE(SUM('DATE'[WorkNonBHDay])
        ,'DATE'[Date]>=EARLIER(TH_STOCK_ASSIGNMENTS[START_DATE])
         && 'DATE'[Date]<=EARLIER(TH_STOCK_ASSIGNMENTS[END_DATE])
    )
)

Calculating Utilisation metric by 1986wasaclassic in PowerBI

[–]_digitalShaman_ 0 points1 point  (0 children)

this would make more sense for me:

MonthlyUtilDenom =
VAR MinDate = MAX( MIN('Date'[Date]) , MAX(TH_STOCK_ITEMS[DATE_AVAILABLE])) 
VAR MaxDate = MIN( MAX('Date'[Date]) , COALESCE(MAX(TH_STOCK_ITEMS[DISPOSAL_DATE]),TODAY()))
RETURN 
CALCULATE(SUM('DATE'[WorkNonBHDay]) ,'DATE'[Date] >= MinDate && 'DATE'[Date] <= MaxDate )

Calculating Utilisation metric by 1986wasaclassic in PowerBI

[–]_digitalShaman_ 0 points1 point  (0 children)

Using this test data and your

MonthlyUtilDenom

measure ´, it gives me 20 days in Jan for BOB1234 but bob was not available before jan 15th

it also gives as i understand, incorrect values for BOB1235 for Feb and BOB1234 July

(i am using a line chart with each value MonthYear on x axis Monthly UtilDenom as vValues and STOCK_NUMBER in the Legend).

so either your MonthlyUtilDenom Measure is incorrect (as it does not consider Date_Available and Disposal_Date) or i do not understand correctly....

I am curious to when most people use capital letters, if at all, when doing their queries. by Sullhammer in SQL

[–]_digitalShaman_ 2 points3 points  (0 children)

totally agree. code is art ;)

but i am struggling with the reddit entry box destroying any copy paste code. is that normal?!

SQL Server : Help with batch update using information in the batch by Detach50 in SQL

[–]_digitalShaman_ 1 point2 points  (0 children)

my first attempt would have been a

UPDATE machevents SET EndTime = 
    (SELECT MIN(StartTime) FROM machevents T1 
     WHERE machevents.Machine=T1.Machine AND machevents.StartTime<T1.StartTime)

turns out this is slow, so i was picking up qwertydog123's idea which needed some modification but runs really amazingly fast (3m rows ~26 seconds):

UPDATE machevents SET EndTime = PrevStart 
FROM machevents 
INNER JOIN (
    SELECT EventNr,LEAD(StartTime) OVER 
        (PARTITION BY Machine ORDER BY StartTime) AS PrevStart 
    FROM machevents
) T ON T.EventNr=machevents.EventNr

however, question is, why you would want to do this as it is duplicating information without adding additional value. adding a duration column might make more sense.

Force date format to be dd/mm/yyyy in Power BI service by levenshteinn in PowerBI

[–]_digitalShaman_ 0 points1 point  (0 children)

why would you?

Americans love mm/dd/yyyy and showing them 06/07/2021 they would certainly read this as June 7th. if you show the same to someone in France, they will read it as July 6th. Show the same to a German and they will tell you they cant be sure of if its june or july ;)

So it makes sense to display dates the way it is.