i want dfa that accept string of{a,b,c} that starting with a and ending with c and have even no. of b - finite-automata

i have done below dfa for this...but it's not right...please help me...valid strings are abbc,aabbcc,aabbbbc,abbcccc.
and invalid strings are abca,abc,abbcb,babbc.please help me.i have done this.
<?php
include "config.php";
if (isset($_POST['submit'])) {
include('PHPMailer-master/PHPMailerAutoload.php');
$userName=$_REQUEST['username'];
$userEmail=$_REQUEST['mail'];
$userPhone=$_REQUEST['mobile'];
$subject=$_REQUEST['sub'];
$userMsg=$_REQUEST['msg'];
//i have image of DFA. but, i don't have 10 reputation so,i can't upload it...
?>
stackoverflow not accepting my question so i put my explanation in php.please avoid php tag.
please help me...i really stuck with this.

i think this dfa will work.........

Related

Please help understand API post with Json body

I'm new to API. I try to understand the attached code meaning.
body <- '{
"subquery":[{"entity":"drug","joinField":"PrimaryDrugsTested.drugId","and":[{"is":{"value":["PD-1","PD-L1"],"name":"targets.targetSynonyms"}},{"is":{"value":["Registered","Launched"],"name":"globalStatus"}}]}]})
}'
Why is it 'subquery' at beginning?
I understand that I want to find pd-1/pd-l1 for targetSynonyms and "Registered","Launched" for globalStatus. What's meaning of 'is' here and how can I understand 'and' ???
What should I modify if I would like to add 'OtherDrug' for 'joinField'
Big thanks advance!!!

Telegram quiz message handler but don't know how to display correct answer when answered

Here is a sample of the code that I am using would be gratefully if someone can point me in the right direction.
import telebot
bot = telebot.TeleBot("API KEY")
print("Bot starting...")
#bot.message_handler(commands=['quiz'])
def quiz(message):
q = 'What is the capital of Italy?'
answers = ['Rome', 'London', 'Amsterdam']
bot.send_poll(message.chat.id, question=q, options=answers, correct_option_id=0, open_period=5)
bot.polling()
What I'm not sure about on how to make work, is once the question has been answered how to display the correct answer out of the options that are available. For Example the question above, for it to say the correct answer is "Rome" after each question.
Thank You in advance
If you pass type='quiz' to send_poll, then TG will automatically take care of that. See the official docs of sendPoll.
If you don't want to the native quiz interface of TG, you'll have to make the poll non-anonymous. In that case, you'll receive PollAnswer updates when a user makes a vote and you can respond to that update in the way that you want to.

Concat in xslt, unable to get an image from server

I am new to xslt coding, I am trying to fix an issue in existing piece of code. I got stuck up at a point
<fo:external-graphic content-width="150pt"
content-height="50pt"
src="url:{concat('${OA_MEDIA}/',$revised_last_name,',',DOCUMENT_BUYER_FIRST_NAME,'.gif')}" />
The above piece of code is trying to find a .gif file in OA_MEDIA directory. Till that part I can understand fine.
When I am placing a file name as "Eckert,Tim.gif" (excluding the quotes) my program isn't picking that file
In the above piece, I printed $revised_lastname and $document_buyer_first_name..It's coming as Tim and Eckert, but it's still not picking the file. If I am hardcoding a file name like below it's working fine
<fo:external-graphic content-width="150pt"
content-height="50pt"
src="url:{concat('${OA_MEDIA}/','Tim','.gif')}" />
How can I print what value is coming into the src in above piece of code so I can see what file is it trying to look in the $OA_MEDIA.
Any suggestions are appreciated.
Thanks!
Your first problem appears to be that in your constructed URI and your file name, you have put the given name and the family name in different orders: Tim,Eckert.gif vs Eckert,Tim.gif. Choose one.
If you still have problems after that, your next step is to confirm that your concatenation is producing the value you expect. I'd add a line like
<xsl:message>Generating fo:external graphic with URI <xsl:value-of
select="concat('url:',
'${OA_MEDIA}/',
$revised_last_name,
',',
DOCUMENT_BUYER_FIRST_NAME,
'.gif')"/></xsl:message>
And if that did not shed light on what was going wrong, I'd insert individual messages to display the current value of $revised_last_name and DOCUMENT_BUYER_FIRST_NAME.
More than that it's difficult to say, because your question does not provide a short, self-contained, complete example that allows readers to reproduce the problem you are trying to solve. There is good advice on asking effective questions in the SO help files and in Eric Raymond and Rick Moen's essay How to ask questions the smart way.

VB.NET Console and RichTextBox difficulties

I am new here. I am very happy that I joined this website, because everyone here is so smart!
Now, let's cut to the chase! Hopefully, I will be able to explain everything properly.
I am creating a Visual Basic application. It's supposed to reassemble a so-called "fake programming language." It's having some issues though.
Let me show you an example before explaining:
If RichTextBox1.Text.Contains("console output >'insert comment';") then
Console.WriteLine("insert comment")
End If
Now, what I want here is a custom input. (if someone types "I want cookies" then I want the console to say that!
For instance, if I type:
If RichTextBox1.Text.Contains("console output >'Insert something here';") then
Console.WriteLine("Whatever the user wrote!")
End If
I just want to possibility to write whatever I want, that's all! I hope I made myself clear, because I am having a hard time explaining here. Help is appreciated! Thank you!
You need to match just the part with the console output > and then replace that portion of the string with empty space, like this:
If RichTextBox1.Text.Contains("console output >") Then
Console.WriteLine(Replace(RichTextBox1.Text, "console output >", ""));
End If

onCLick getElementById().innerHTML doesn't work repeatedly?

here is the page on which the problem lies: www.hodaradesign.com/vis-vertical2.html
I tried to enter code here but the site wouldn't let me. So go to the page and view source. There is a list of 10 inputs. three dont work even though all 10 inputs use the same code.
can anyone help me out?
Thank you
In the HTML code you use for "Light n Life" there is a sentence: "LNL's founder wanted a logo [...]". It contains a single quote ("LNL's") which ends the string. You have to escape single quotes.