Archer Questionnaires, tally the total questions that has answered - archer

I'm new in archer, i need help on the calculating questions.
We need to tally question that has been answer.
sample: have 5 question but 3 of it has been answer
to display: 3 of 5 Question
<br><br>
GEN* - question field
<br>
total answer - field i need to add to the layout
<br>
<br>
**code:**<br>
IF(AND(NOT(ISEMPTY([GEN-01: Management Commitment (*HC*)]))),
<br>(NOT(ISEMPTY([GEN-02: ITC Department Staffing (*HC*)]))),
<br>(NOT(ISEMPTY([GEN-03: ITC Communication (e.g., Process Changes, Regulatory Changes)]))),
<br>(NOT(ISEMPTY([GEN-04: Internal Escalation])))
<br>VALUEOF([Total Answer]), “Completed”,
VALUEOF([Total Answer]), “Not Completed”)
<br><br>
my script is not working

Related

Schema warning about QAPage on Question type

I have a page with multiple Question and Answers and I'm getting the following warning on each question:
Missing a QAPage markup item on page to which this item should be associated.
This is example markup:
<div itemscope="" itemtype="http://schema.org/Question">
<h3 class="question" itemprop="name text">This is the question?</h3>
<div class="answer" id="IdForTheAnswer" itemprop="acceptedAnswer" itemscope="" itemtype="http://schema.org/Answer">
<div itemprop="text">
<p>This is the answer text.</p>
</div>
</div>
</div>
And below is the example warning from https://search.google.com/structured-data/testing-tool/ :
Question | 0 ERRORS | 1 WARNING
#type
- Question
- name
- This is the question?
- text
- This is the question?
- acceptedAnswer
- #type
- Answer
- #id
- https://www.example.com/IdForTheAnswer
- text
- This is the answer text.
warning
- Missing a QAPage markup item on page to which this item should be associated.
What is this warning actually asking me to provide?
What I've tried unsuccessfully so far:
Remove the id from the acceptedAnswer
Use suggestedAnswer instead of acceptedAnswer
Provide the Question with a mainEntityOfPage
Ok so after an entire day of trying I finally stumbled on the answer.
I was getting that same warning if I removed everything but the question item, so it's something related to that. I tried a lot of things and on a hunch I ended up wrapping the whole collection of questions in this:
<div itemscope itemtype="http://schema.org/FAQPage">
<!-- Rest of Q&A markup -->
</div>
And now I get valid schema without any errors or warnings.
I feel like the documentation and error messages are not very good, or I just don't understand this ecosystem and its resources yet!
p.s. I also tried the QAPage itemtype but that requires a lot more props and doesn't actually describe the page I'm building, so FAQPage comes closest.

Scraping the table data from accuweather website

Hi I want to scrap the data from the table. I need all the weather information for all days
click to see image
Please check this link
https://www.accuweather.com/en/in/bengaluru/204108/month/204108?view=table
Source code:
<tbody>
<tr class="pre">
<th scope="row">Tue <time>5/1</time></th>
<td>91°/71°</td>
<td>0 <span class="small">in</span></td>
<td>0 <span class="small">in</span></td>
<td> </td>
<td>93°/71°</td>
</tr>
<tr class="pre">
<th scope="row">Wed <time>5/2</time></th>
<td>91°/75°</td>
<td>0.03 <span class="small">in</span></td>
<td>N/A <span class="small">in</span></td>
<td> </td>
<td>93°/71°</td>
</tr>
<tr class="today lo calendar-list-cl-tr cl hv" data-href="https://www.accuweather.com/en/in/bengaluru/204108/daily-weather-forecast/204108?day=1">
<th scope="row">Thu <time>5/3</time></th>
<td>93°/72°</td>
<td>0.04 <span class="small">in</td>
<td>0 <span class="small">in</span></td>
<td>
<div class="icon i-17-s"></div>
<p>A thunderstorm in spots</p>
</td>
<td>93°/71°</td>
</tr>
</tbody>
This doesn't really directly answer your question but may be the closest you'll get without adding more information to your question and showing that you're making an effort to solve this on your own, by including some code in your question. Or maybe this will work better for you:
Why scrape a site that is willing to practically "hand you" the data, in an easier to handle format, for free?
Accuweather (like many sites) has an API which is free for home use (free up to 50 calls per day) Here is a link.
However (as a big weather & data geek) I much prefer DarkSky Weather API, which allows up to 1000 calls a day for free and (depending on where you're interested in querying) is the most accurate I've seen. (H The get the data from their own sources combined with everything else they can get their hands on (Here is a link.)
I have an Access DB that, for over a year now, has bee automatically opening itself every 8 hours (with Windows Task Scheduler) and querying detailed weather 10 days into the future and 3 days into the past, seeking weather trends and ultimately doing a pretty good job of predicting my home heating costs.
In the USA (where I am not) they even claim the most accurate forecasts down the square-yard, down to the minute.
"It's going to rain this afternoon from 1:17pm until 2:05pm at an average intensity of 0.6mm/hr."
Plus, DarkSky is the only one with an optional Emoji Weather Map. Not very useful but always good for a chuckle. lol
Just for fun, here's your area tomorrow... split down the middle there eh? (They do have real data too.)
Anyway it's worth checking out - but as #Peh indicated, you can't expect all the work to be done for you.

Change maxlength based on name="..." Possible?

I'll admit, I'm new to this world. Im working on my first site, which has a template file setup. In the template I have a code thats similar to
<input type="text" name="option[**]"/>
Where Option[**] is pulled from somewhere else, heres my issue;
Is there something I can do to limit the text input length based on the option number pulled? I did a
<input maxlength=10 type="text" name="option[**]"/>
and that worked to limit all my text input boxes there to 10, however I have say Option[1] and option[2]; I want 1 limited to 10 and 2 limited to 15. is this possible? remember, Im new to all this :)

WebMatrix Nested WebGrid VB code

I have looked at the code in both the following posts:
formatting in razor nested webgrid, replied to by nemesv in October 2011 and
Razor Nested WebGrid, replied to by Chad Moran in April 2011.
They both seem to be close to my problem but the code is C# based, I believe, and I am having difficulty converting it to VB. I am also not sure they are exactly where I am at. I am particularly bemused by the following line, because of the two equals signs and double reference to subGrid.
WebGrid subGrid = subGrid = new WebGrid(item.SubItems)
I am also not sure whether topGrid and subGrid are just generic names, used for the purpose of illustration, or whether they are key words.
As a very relevant aside I will mention that this point in my web page project has held me up for five years now (I am not exaggerating - I just stopped working on the project for two years because of it). I have tried using ASP in VWD and now Grid View in WebMatrix and I hope I will not fail again.
Database record
Fields: Publisher_Name, Publisher_City, Series_Published, No_of_Series
Record Example: Price Stern Sloan, Baltimore, JKLMNO, 6
My two planned grid names
Publishers_Grid (top)
Series_Grid (sub)
What I am trying to do
For each of the characters in the string JKLMNO, access a second table, where each letter is the primary key for a record in that table.
Retrieve the value of the field, Back_Cover_Image, in that second table, which will be the file name or, at least, the unique part of the file name, for the image to be displayed.
If I go with the partial unique bit of file name approach, build the full file names for the images. And then -
Display as a second web grid row, the images thus pointed at, in the record example, that would be 6 images.
Thus I would end up, for the example record, something like the following (I have used XX to stand for an image): -
Price Stern Sloan Baltimore XX XX XX XX XX XX
I certainly I hope I am not wasting the valuable time of experts who I greatly admire. I'm just trying to achieve something that seems quite simple to me, having originally been a PL/1 programmer, 30 years ago, and a great user of nested arrays within that language, but I just can't work out the syntax in VB, Razor and WebMatrix.
I look forward to some constructive answers, and please do use VB.
My WebMatrix page so far
#Code
Layout = "~/Shared/Layouts/_Layout.vbhtml"
Dim HWB_Database As Database = Database.Open("How_and_Why_Wonder_Books")
Dim HWB_Publishers_All_sqlCommand = "SELECT * FROM Publishers ORDER BY Publisher_Code"
Dim Publishers_Data = HWB_Database.Query(HWB_Publishers_All_sqlCommand)
Dim Publishers_Grid = New WebGrid(Publishers_Data)
End Code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>How and Why Wonder Books - Publishers</title>
</head>
<body>
<div style="margin-left: 100px">
<p style="Width: 1020px; border-width: 1px" class="InstructionsHeader">
Click on a publisher to see the list of titles produced under that imprint, click on a thumbnail to see details of that series type.
</p>
</div>
<br>
<br>
<div id="Publishers_Grid_Display">
#Publishers_Grid.GetHtml(columns:= Publishers_Grid.Columns(
Publishers_Grid.Column("Publisher_Name"),
Publishers_Grid.Column("Place_of_Publication"),
Publishers_Grid.Column("Series_Published")
)
)
</div>
Thank you for your promptings and encouragement.

Is there any tool to automatically capture screenshots of running ad campaigns? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Objectif would be to monitor a bunch of websites and automatically take screenshots when a specific ad tag is called (previously defined, belonging to a new campaign)
automatically take screenshots when a specific ad tag is called
I'm not really sure what you mean when you say that a specific ad tag is "called." What do you mean when you say that?
If I understand you correctly, you seem to want to capture an ad if it's displayed on a website. If that's the correct understanding then you can just save the HTML of an ad and "replay" it later. You do have to check for certain tags in the HTML in order to detect if an ad is showing.
So let's look at how things work on with Google ads. And let's say you search for the keyword "dentist": http://www.google.com/search?hl=en&q=dentist
First you have to detect that an ad exists and the most common way this is indicated on Google is with the <div id="tads"> div. If you look at the HTML, the div tag will look like this:
<div id="tads" class="c" style="margin:0 0 14px;padding-top:2px;padding-right:36px;padding-bottom:2px;padding-left:8px;min-height:0">
<h2 style="font-size:11px;font-weight:normal;margin:0 -35px 0 0;padding:1px 4px 0 0;text-align:right">
<ol style="padding:3px 0" onmouseover="return true">
<li class="taf">
// collapsed html for the purposes of this example
<li class="tam">
// collapsed html for the purposes of this example
<li class="tal">
// collapsed html for the purposes of this example
</ol>
<div id="topDnsPrefetchHints">
</div>
If you take all the HTML in the parent node, plop it in the middle of some <html></html> tags, save it to a file and you would have essentially made a copy of the ad. When you open the saved page you will see the ad (although it will not have any of the pretty formatting):
<html>
<head>
</head>
<body>
<span style="margin-right:0" id="taw"> <div></div> <div style="margin:0 0 14px;padding-top:2px;padding-right:36px;padding-bottom:2px;padding-left:8px;min-height:0" id="tads" class="c"><h2 style="font-size:11px;font-weight:normal;margin:0 -35px 0 0;padding:1px 4px 0 0;text-align:right">Ads<span> - <a onclick="google.x(this,function(){if(google.wta){google.wta.toggleLightbox(this,'0CAYQJw','0CAgQKQ',380);}});return false;" id="wtata" class="gl wtall" href="javascript:void(0)">Why these ads?</a><span style="display:none" class="wtalbc">These ads are based on your current search terms.<br><div style="padding-top:12px">Visit Google’s <a class="std gl wtaal" href="#">Ads Preferences Manager</a> to learn more or opt out.</div></span></span></h2><ol style="padding:3px 0" onmouseover="return true"><li class="taf"><div sig="1W8" cved="0CA8Qhw0wAQ" pved="0CA0QhQ0wAQ" class="vsc vsta"><h3 onmouseover="document.getElementById('topDnsPrefetchHints').innerHTML='<link rel="dns-prefetch" href="//www.1800dentist.com">';">Find a Local <b>Dentist</b> - 24/7 Online Appointment Booking.</h3><div class="vspib" aria-label="Result details" role="button" tabindex="0"><div class="vspii"><div class="vspiic"></div></div></div><div><div class="kv"><cite>www.1800<b>dentist</b>.com/Chicago<b>Dentist</b></cite></div></div><div><div style="display:none" id="poAs0p1" class="esc slp">You +1'd this publicly. <a class="fl" href="#">Undo</a></div></div><span class="ac">Call or Visit 1-800-<b>DENTIST</b>® Today! </span><div><div style="margin-bottom:0px;margin-top:4px" class="oslk osi">Find Gentle Pain-Free Dentists - Find a Dentist Online for Free</div></div></div></li><li class="tam"><div sig="nxV" cved="0CBYQhw0wAg" pved="0CBQQhQ0wAg" class="vsc vsta"><h3 onmouseover="document.getElementById('topDnsPrefetchHints').innerHTML='<link rel="dns-prefetch" href="//dentalsalon.com">';"><b>DENTIST</b> at Dental Salon - Super Convenient</h3><div class="vspib" aria-label="Result details" role="button" tabindex="0"><div class="vspii"><div class="vspiic"></div></div></div><div><div class="kv"><cite>www.dentalsalon.com/Great-Reviews</cite></div></div><div><div style="display:none" id="poAs0p2" class="esc slp">You +1'd this publicly. <a class="fl" href="#">Undo</a></div></div><span class="ac">Open 7 Days and Evenings - Affordable - 12 <b>Dentists</b> </span><div><div style="margin-bottom:0px;margin-top:0px">Suite 800, 939 W North Ave, Chicago, IL - 1 (312) 642-3370 - <a google.adping('t',2,11)"="" &&="" class="flonmousedown="google.adPing" href="http://maps.google.com/maps?hl=en&um=1&ie=UTF-8&daddr=Suite+800,+939+W+North+Ave,+Chicago,+IL&f=d&saddr=&iwstate1=dir:to&fb=1&geocode=3891923684064231596,41.910331,-87.652690&sa=X&ei=NnM5T9nSC-r20gGymeXFAg&ved=0CBMQmxA">Directions</a></div></div></div></li><li class="tal"><div sig="ohs" cved="0CCAQhw0wAw" pved="0CB4QhQ0wAw" class="vsc vsta"><h3 onmouseover="document.getElementById('topDnsPrefetchHints').innerHTML='<link rel="dns-prefetch" href="//www.BigSmileDental.com">';">Big Smile Dental - $1 Exam & X-Rays or Free Whitening</h3><div class="vspib" aria-label="Result details" role="button" tabindex="0"><div class="vspii"><div class="vspiic"></div></div></div><div><div class="kv"><cite>www.bigsmiledental.com</cite></div></div><div><div style="display:none" id="poAs0p3" class="esc slp">You +1'd this publicly. <a class="fl" href="#">Undo</a></div></div><span class="ac">As Seen on FoxNews (773)772-8400 </span><div><div style="margin-bottom:0px;margin-top:4px" class="oslk osi">Porcelain Veneers - Invisalign - Teeth Whitening - Dental Implants</div></div></div></li></ol><div id="topDnsPrefetchHints"><link href="//www.1800dentist.com" rel="dns-prefetch"></div></div> </span>
</body>
</html>
Finally, if you want the pretty formatting, then reference Google's style sheet and now you have an almost identical copy of the ad that Google is displaying.
Things to note:
Every advertiser (Google, Bing, Yahoo, etc.) has a different format, so you may have to do the above for every advertiser you want to monitor.
Even within advertisers, there may be variations on the ad depending on the browser that is displaying the ad (Google displays ads differently on iphones than they do for android phones).
Finally, since I already work for a company that provides the ad capturing service (and more), I might as well plug our solutions.
We have several examples on how the ads look once captured, including this one: