How do I set application_name so that it doesn’t get the “?” characters?

I have this UTF-8 string in PHP:

$  test_title = 'My criticál business applicätiön'; 

If I send that to PostgreSQL to set the application_name, it then looks like this:

My critic?l business applic?ti?n 

If I try to salvage it by transliterating like this before sending to PG:

$  test_title = iconv('UTF-8', 'US-ASCII//TRANSLIT', $  test_title)); 

Then I get:

My critic'al business applic"ati"on 

Basically just as bad. It tries its best to represent the UTF-8 characters as the US-ASCII charset that PG demands for the application_name, but it just doesn’t look right. It cannot possibly look right because US-ASCII simply doesn’t contain all the non-USA characters.

Unfortunately, there also exist people outside of the USA. (I know, it’s annoying, but it’s sadly true.)

I refuse to believe that application_name must be ugly like this. It cannot be. It’s too stupid to be true. I must be missing something. There has got to be some way to set application_name to the actual application name and not have it butchered in the above manner.

Basically, I don’t "buy" that PG would be this primitive and crippled still in year 2020.

Problem using ‘Regular expression’ in order to split characters of a column when there is no delimiter between them

I have a table with below structure:

create table TBL_TEST (   col_id   NUMBER,   col_name VARCHAR2(500) ) 

Some example data :

col_id | col_name    -----------------   1    | aetnap           2    | elppa          3    | ananab        

What I need to do is to split characters of column col_name for each col_id for example for col_id=1 we must have :

col_id | col_name    -----------------   1    | a   1    | e   1    | t   1    | n   1    | a   1    | p 

this query is fine when there is only one record in the table :

SELECT col_id, REGEXP_SUBSTR(col_name, '[a-z]{1}', 1, LEVEL) AS VAL   FROM tbl_test t CONNECT BY REGEXP_SUBSTR(col_name, '[a-z]{1}', 1, LEVEL) is not null 

but as soon as I insert another record in the table (say col_id=2 and col_id=3) I can not have the desired result. I want to know two things:

  1. Why is this query works fine for one record and it does not for more ?
  2. what is the best way to split the characters when there is no delimiter between them?

Thanks in advance

How to remove any words containing two adjacent characters with different cases?

I have a list of permutations of ABCabc and I want to remove any permutations with two adjacent characters with different cases (uppercase and lowercase).

For example,

  • ABCcab is kept.
  • ABCacb must be removed because Ca contains two adjacent characters with different cases.
  • AbBcaC must be removed as well.

Attempt

Here is my attempt but without filtering.

Select[StringJoin /@ Permutations[Characters@"ABCabc"],....] 

Remove special characters in a URL

I need a help to prevent special characters in URL & it should redirect to 404 error page, if anyone specifically entered characters. I tried couple of ways through .htaccess but none of them worked.

Expected URL: http://www.abcd.com/ar/shop-listing/health-beauty/ but still I can see the page if I entered like http://www.abcd.com/ar/shop-listing/health-beauty~@/#$ &&&%%$ %3Cscript%3E/

Can anyone suggest a best solution to approach this issue?

Thanks in advance guys!

Would being blind reduce a character’s speed?

A PC is under the effect of a Suggest spell and told to follow someone who had darkvision. The PC, who is under the effect, doesn’t have darkvision, and they are led into a tunnel system that is pitch black. How fast are they able to move?

I can’t find anything RAW which states that trying to move in darkness has any detrimental effects, other than the obvious statement of not being able to actually see where they are going.

How can I convince my DM that my diplomacy will work on his characters?

So I’m playing D&D 3.5e with a small group, and my character, a smooth talker whose main ability is diplomacy, was trying to convince one of the DM’s characters to come and help him with a quest to gain fame in the village. But when I rolled diplomacy he said it didn’t work on his characters because they weren’t NPCs.

I showed him that in the book that all characters played by the DM, even ones that are unique and part of the group, are considered NPCs, yet he refused to acknowledge this, claiming it was an insult to call characters he worked hard on NPCs. I have tried showing him that NPC is defined as Non-Player Character, but he still doesn’t acknowledge it, saying that his characters aren’t NPCs.

King, commoners, merchants, and shop keeps are NPCs, but characters he’s put a lot of work into and given their own sheets aren’t, in his perspective. There are GM-controlled characters who follow the group, but if a character is going to stick around (such as a scholar I hired) he makes a sheet for them and considers them a PC.

I’ve tried reasoning with him many times over this matter but nothing has worked. He’s used diplomacy on my characters multiple times, and refuses to acknowledge that he did. (Each time it was explicitly stated as diplomacy, I had to roll Sense Motive in response, and if I failed my character had to slowly start to agree with whatever the person who was attempting diplomacy was saying.)

Is there a way around this? Something else I can use besides trying to chat RP it? Or a way to convince him that it would work on his characters?

He is a co-DM, the other DM agrees with me, but we are barely ever able too get them both together in RP at the same time, due to different preferences of play (in person, and through chat). Besides the two DMs and myself there are two other players.

Why was this Base64 encoding of password string with the last two characters in a separate encoding?

As i was testing the security of my own network, i visited the login page of my router. I wanted to see how it managed the credentials. This was when i noticed it transformed the entered password to a ciphered text, with some obvious visible patterns. This was found via burpsuite, and was decoded with the base64. However, the decoded text ONLY provided the password in clear text, except the last two characters.

Transformed            ||        Clear text PW            || Decoded from base64 ================================================================================ YWRtaW4%3D                       admin                      admaW4%3D  cGFzc3dvcmQ%3D                   password                   passwocmQ%3D MTIzNGY%3D                       1234f                      123NGY%3D  YWRtaW5hZG1pbjIyMjI%3D           adminadmin2222             adminadmin22MjI%3D YWRtaW5hZG1pbjIyMTE%3D           adminadmin2211             adminadmin22MTE%3D 

All obfuscated text ends with %3D which is something i wanted to comment about but i just found it out from this link that it’s due to URL encoding of the ‘=’ sign.

And i just figured out the answer to this questions whilst creating it..

The process is: clear text password => Base64 encoding => URL encoding of last 2 characters and '=' character => Base64 encoding of the URL encoded characters

Does reducing a character’s max HP with a spell also reduce the “negative HP” threshold needed to cause instant death?

Here’s my situation: In a fight with a group of vampire thralls, the party’s wizard got caught in a corner and was being savaged by vampire bites, his max HP dropping from 24 to 11. They fended off the vampires, but the wizard was at 3hp (He refused to be healed by the cleric due to his character’s hatred of religion and gods). He activated a trap collapsing the temple, and ended up getting hit by a falling chunk of stone ceiling, taking 15 damage (the rock rolled better than any of the vampires).

Now, the wizard is reduced to 0 hp, with 12 damage left over. The cleric’s player says that exceeds the wizard’s current max hp of 11, causing insta-death. The wizard’s player argues that the death threshold for negative HP isn’t affected by max-hp-reducing spells, claiming that would make those kinds of spells more powerful than intended.

I have stories planned in either case, but I’d rather be certain that I’m following the rules.

Is the threshold for instant death based on current max hp or normal max hp?

Is a young black dragon enough of a challenge alone for group of five level-5 characters?

I have a 5-member party in D&D 5e (ranger, fighter, sorcerer, rogue and bard) who are all level 5. They will soon be meeting with the “big bad”, a young black dragon, in his lair which contains pools of acid. They would most likely be fully rested before the fight.

I know the CR is 7, but I was wondering whether it would prove to be a satisfying battle, in the sense that they may come close to defeat and might be able to beat the odds.

Is this fight well-balanced? Would it be challenging?

If not, should I add some hatchlings or small mobs to adjust the action economy appropriately?

Site with absurdly powerful characters for D&D 3/3.5

A good ten years ago a friend of mine told me about a site somewhere where absurdly powerful characters for D&D 3/3.5 were listed, with detailed level-by-level character progression.

As far as I can remember, it included characters like a mage who turns into a beholder with a beholder’s full powers, and a four-armed humanoid that hits for over a hundred damages with a regular spear. And all of it perfectly legal: they just combined every handbook’s feats and spell with each other to exploit all advantages and synergies.

I’ve never been interested in powergaming so after a cursory glance I dismissed that site: but now I’d wish to find it again to show another friend and who’d wish to take a look himself.

Do you know what site it could be?