JSON Creation Issue

I’m new to PostgreSQL database. Although I’ve good experience on Oracle Database. I’m facing issue while generating JSON from Postgres. I’ve tried to generate the same output but not able to achieve is properly. Can someone please help or guide may be with examples on similar problem. I’ll be very much thankful to you.

"PostgreSQL 12.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9), 64-bit"

Tables and Sample Data.

CREATE TABLE PARKING_LOT (       PARKING_LOT_ID      NUMERIC(10)      ,PARKING_LOT_NAME    VARCHAR(100) ) ;  CREATE TABLE PARKING_LOT_VEHICLE_CLASS_MAP (       PARKING_LOT_ID       NUMERIC(10)      ,VEHICLE_CLASS_ID     NUMERIC(10)      ,AVAILABLE_SLOT_COUNT NUMERIC(10) ) ;   CREATE TABLE PARKING_SLOT (       PARKING_LOT_ID          NUMERIC(10)      ,VEHICLE_CLASS_ID        NUMERIC(10)      ,PARKING_SLOT_ID         NUMERIC(10)      ,SLOT_OCCUPANCY_STATUS   NUMERIC(10) ) ;   INSERT INTO PARKING_LOT VALUES( 1, 'PARKING 1' ) ; INSERT INTO PARKING_LOT VALUES( 2, 'PARKING 2' ) ;  INSERT INTO PARKING_LOT_VEHICLE_CLASS_MAP VALUES( 1, 1, 10 ) ; INSERT INTO PARKING_LOT_VEHICLE_CLASS_MAP VALUES( 1, 1, 11 ) ; INSERT INTO PARKING_LOT_VEHICLE_CLASS_MAP VALUES( 2, 2, 12 ) ; INSERT INTO PARKING_LOT_VEHICLE_CLASS_MAP VALUES( 2, 2, 13 ) ;  INSERT INTO PARKING_SLOT VALUES( 2, 1, 1, 1 ) ; INSERT INTO PARKING_SLOT VALUES( 2, 1, 2, 1 ) ; INSERT INTO PARKING_SLOT VALUES( 2, 2, 3, 0 ) ; 

Desired Output

{    "ResHeader":{       "ResDate":"09-01-2021 12:38:20",       "ResID":"12345",       "ResName":"Occupancy",       "ResDesc":"Parking Lot Availability and Occupancy Status"    },    "ResDetail":[       {          "ParkingLotID":"1",          "ParkingLotName":"PARKING 1",          "ParkingLotOccupancySummary":[             {                "VehicleClassID":"1",                "AvailableSlotCount":"10"             },             {                "VehicleClassID":"2",                "AvailableSlotCount":"12"             }          ]       },       {          "ParkingLotID":"2",          "ParkingLotName":"PARKING 2",          "ParkingLotOccupancySummary":[             {                "VehicleClassID":"1",                "AvailableSlotCount":"5",                "SlotOccupancyDetails":[                   {                      "SlotID":"1",                      "OccupancyStatus":"1"                   },                   {                      "SlotID":"2",                      "OccupancyStatus":"1"                   }                ]             },             {                "VehicleClassID":"2",                "AvailableSlotCount":"7",                "SlotOccupancyDetails":[                   {                      "SlotID":"3",                      "OccupancyStatus":"0"                   }                ]             }          ]       }    ] } 

What I’m able to achieve till now in bits and pieces

WITH     HEAD AS     (         SELECT json_build_object( 'ResHeader', H ) HeaderData         FROM         (             SELECT                  TO_CHAR(CURRENT_TIMESTAMP, 'YYYY-MM-DD HH24:MI:SS.MS') "ResDate"                 ,1  "ResID"         ) H     ) SELECT * FROM HEAD H  SELECT X.PARKING_LOT_ID, row_to_json(X) FROM (     SELECT VCM.PARKING_LOT_ID, VCM.VEHICLE_CLASS_ID  "VehicleClassID"     FROM PARKING_LOT_VEHICLE_CLASS_MAP2 VCM     LEFT OUTER JOIN PARKING_SLOT2 PS     ON VCM.PARKING_LOT_ID = PS.PARKING_LOT_ID ) X 

Regards Manoj

How to implement multiclassing during character creation? [closed]

Assume I want to have characters defined by classes, archetypes, whatever. And there’s no advancement, or at least sufficiently little advancement that the choices made at chargen always define the character.

But I want to have multiclassing. Or, more exactly, I want to have characters with differing numbers of archetypes without imbalancing them.

So a class/archetype can’t be a package of mostly or entirely good abilities, because adding another class makes a character better. Thus, the first idea I had was to have chargen start with an “average” set of traits, and each class adds a package of advantages and disadvantages. Works numerically, but I know that “disadvantages cost negative points” systems are easily exploitable. That is, players will try to put PCs in situations that take advantage of their strong points. Only if players and their characters had no control over the situation would “disadvantages cost negative points” be balanced. Thus, having more advantages and disadvantages is generally a good thing. I presume it’s for this reason that the Fate versions I’ve seen don’t just give you a pool of points but specify how many skills of what value you must buy in chargen.

So what other options are there?

I recognize that this post is about something very similar, but there’s no answer satisfying my requirements.

From the description, Apocalypse World and its derivatives allow for cross-class abilities, but only through experience rather than at chargen. Other suggestions lean toward full point-buy, but that’s not what I’m talking about. I don’t want complex character generation. And again, I don’t want to add abilities from other classes in play, but to have class combination in chargen.

Creation of failed links and problems with emails?

Hi everyone, I recently made a purchase for a premium list subscription, everything is automatically synced with dropbox. It’s all OK.
Approximately 2 days have passed and I cannot create links, the maximum that I have just created from those lists are only 4 links.
My updated filters to use the premium lists are:
See attached image

Now, yesterday I had had problems with the emails, in the registration panel it said: email verification failed, and when I go to check, see the following image a window appears that said: failed emails

and finally I am seeing a lot of failed registrations in wordpres articles.

In theory I should be creating many links, thanks to the help of the premium lists but something is missing or something is wrong in my configuration, could you help me find that fault?
I would like to see the full potential of GSA at work.

Does anyone know about Halfling creation?

I have been playing tabletop RPGs for a number of years, specifically HackMaster 4E.

At the moment, I am doing some extensive worldbuilding, and even to extent of developing my own creationist theories for the world. I have ideas for how the gods created the Dwarves, Elves, Gnomes, and even Humans. I have not, however, got any clue about how the Halfling creationist theory would work.

I have been researching for a number of weeks, and have turned up empty.

Does anyone have any ideas, or know of where I need to look to continue my research?

Thanks

Ed

BuddyPress – Contextual Article link creation

I’ve been trying to build up contextual links, and have been scraping per platform. I’ve had variable success using BuddyPress, so did some troubleshooting to see if there was anything I could do to improve the process. Listed below is an overview of the process as well as some interesting findings:

SETTINGS
– Used Gscraper and custom footprints for BuddyPress – got around 6,000 unique domains to test with SER.
– ran the list on 3 different dedicated servers (stopped other projects while doing troubleshooting)
– 50 semi-dedicated proxies, used either catchall SEOSpartans email or free yahoo/nokiamail
– created only article links (no profile or micromessage anchor text etc)
– all other settings on SER are identical

– HTML timeout – 180
– maximum size of website to download – 50MB

All dedi’s have similar resources (around 8- 16GB ram, good processor), dedi #1 has 1000mbps, dedi#2 and#3 have 100mbps uplink port speed.
All 3 dedi’s are from popular hosting companies used widely for SER
All 3 dedi’s run SER projects well with no major issues in getting verified links

RESULTS
– For this list, I get around 700 successfully created BuddyPress accounts created and successfully logged into
– Dedi #1 got around 100 verified article links – great result.

BUT,
Dedi #2 and Dedi #3 only got around 10-20 verified article links

FINDINGS
I choose to troubleshoot one URL – this URL I could consistently get a verified article posted with dedi#1, but never on dedi#2 or #3

– account creation, email verification and login where generally able to be created on all 3 dedi’s, although occasionally account creation was not successful on dedi #2/3 (error: no form at all)
– article was created always on dedi #1, but never on dedi#2/3 (I tried disabling proxies, using different emails etc)

LOG
This is the most common log entry for failed article creation:

21:06:51: [+] 1/1 matches engine BuddyPress – http://domain.com/register/
21:06:51: [+] 1/1 new URL – http://domain.com/wp-login.php
21:06:51: [+] 1/1 login successful – http://domain.com
21:06:51: [+] 1/1 new URL – http://domain.com/groups/create/step/group-details/
21:06:51: [-] 1/1 no form at all – http://domain.com/groups/create/step/group-settings/

Even though SER did not create an article, I was able to manually log on using dedi #2/3 into the domain, and go to the page: http://domain.com/groups/create/step/group-settings/ and was able to manually post an article (using proxies or not using proxies)

@Sven,
I will PM you the URL to look at – I can’t think of why I am getting a “no form at all” error, even though I have run this specific URL multiple times, and confirm that the domain is active and taking registrations.

I am happy to PM anyone else the URL if they also want to test

The reason I have gone into so much detail is to see whether there is any global issue with how SER is creating verified contextual links, and wonder whether this is an issue with the dedicated server or with SER.

I wonder whether there is an issue where SER is looking for an element on a page BEFORE the page has completely loaded. So if the element is not found, SER will log a “no form at all” and not try further with submission.

– it seems like SER might not be waiting long enough to get all page elements and so the submission fails
– SER only seems to try once to create an account and post article – if it fails during the submission, it does not seem to try again
– so even if a domain is down for a few seconds, the submission will fail

– Is there any way to try post an article again on accounts which have been successfully created? I know you can do scheduled article posting and post multiple times to a URL, but is there any way of adding option: “Set status ..> Active (log in and submit only)” ?

I’m going to continue troubleshooting to see the best way to get as many verified contextual links with SER as possible. The way I have my settings at the moment, I’m sure there are many links which SER should be able to post to but is not posting to.

If a College of Creation bard is incapacitated, who controls the bard’s dancing item?

The College of Creation bard gets Animating Performance at 6th level which allows them to animate an object and control it using a bonus action:

It can move and use its reaction on its own, but the only action it takes on its turn is the Dodge action, unless you take a bonus action on your turn to command it to take another action. That action can be one in its stat block or some other action. If you are incapacitated, the item can take any action of its choice, not just Dodge.

My question is, when the bard gets incapacitated, what does it mean for the object to take an action "of its choice?"

Does control of the object pass to the dungeon master?

For comparison, other, similar effects either explicitly state that the DM gains control. For example, Conjure elemental:

If your concentration is broken, the elemental doesn’t disappear. Instead, you lose control of the elemental, it becomes hostile toward you and your companions, and it might attack. An uncontrolled elemental can’t be dismissed by you, and it disappears 1 hour after you summoned it.

…Or simply dictate the conjured creature’s fallback behavior. For example, any of the new Summon spells in Tasha’s Cauldron:

The creature is an ally to you and your companions [and] It obeys your verbal commands […] If you don’t issue any, it takes the Dodge action and uses its move to avoid danger.

Note that the wording of Dancing Item is also used in the Circle of Wildfire Druid’s Wildfire Spirit.

Can objects created by Performance of Creation be used as expensive material components?

Tasha’s Cauldron of Everything introduces the College of Creation which gets the class feature Performance of Creation:

As an action, you can channel the magic of the Song of Creation to create one nonmagical item of your choice in an unoccupied space within 10 feet of you. The item must appear on a surface or in a liquid that can support it. The gp value of the item can’t be more than 20 times your bard level, and the item must be Medium or smaller.

…this isn’t a huge deal since there is a gold limit, so the cost of what you could reach is fairly small, but later on the College grants:

Creative Crescendo

[…]

You are no longer limited by gp value when creating items with Performance of Creation.

Could you create expensive nonmagical objects such as a diamond for resurrection magic, or the 500 gp statue for imprisonment? Would it work when casting these spells?