My Top 10 actions chart always shows "No data to display" - recaptcha-v3

on my recaptcha v3 chart , there are some charts always shows "No data to display"
What causes them and How do i fix it?
my script
grecaptcha.ready(function() {
grecaptcha.execute('site_key', {action: 'login'}).then(function(token) {
document.getElementById('g_recaptcha_response').value = token;
});
});
thank you.

Related

data:application/pdf;base64,undefined (pdf-generation problem)

I was creating a pdf generator following guidelines from this website "https://www.wix.com/velo/forum/coding-with-velo/pdf-generator-api-npm-demo"
code screenshot
I copy every code from the guideline, but when I click the submit button, error of [data:application/pdf;base64,undefined] occur, and no record is saved at the pdf generator.
Check the link of the website here: website link
I believe it should be something wrong with the code below
//code start
import { pdf } from 'backend/pdf.jsw';
$w.onReady(function () {
var base64;
$w('#btnSubmit').onClick(() => {
let name = $w('#inName').value;
let detail = $w('#inDetail').value;
pdf(name, detail).then( e => {
base64 = e;
base64 = 'data:application/pdf;base64,' + base64
let msg = {
"conv": true,
"dataUrl": base64
}
$w('#html1').postMessage(msg);
});
});
});
// Code end
I search through the internet and some mentioned open data URl directly function is not supported since 2020 (see website). I am new in programme or codes, it would be greatful if someone could provide me the adjusted code.
Sorry for the trouble

Getting All series on a given axis must be of the same data type, with Vue + Google Spreedsheet

I used the exact example and even created the same spreedsheet as in the vue example https://codesandbox.io/embed/yqxxkp32mj?module=%2Fsrc%2FApp.vue here, if i copy the spreedsheet from their example it works fine but when I add my own spreedsheet (which is practically a copy of what they have it gives me this error)
Getting All series on a given axis must be of the same data type
methods: {
onChartReady(chart, google) {
const query = new google.visualization.Query(
"https://docs.google.com/spreadsheets/d/1GpwJaxUPYv9MV2uAvW4qkKanFlwrzTHWS55vzK3J9VE/edit?usp=sharing"
);
query.send(response => {
const options = {
title: "Creating a Chart from a Separate Spreadsheet"
};
const data = response.getDataTable();
chart.draw(data, options);
});
}
}
};
This is my google sheet
https://docs.google.com/spreadsheets/d/1GpwJaxUPYv9MV2uAvW4qkKanFlwrzTHWS55vzK3J9VE/edit?usp=sharing
I am using vue-google-charts
Thanks

React Native Show custom message after Capturing image

I am trying to show a message to the user after he captures an image and the image is saved in gallery. I have surfed through the net but can not find any solution. So far what I have tried the following code from here for capturing image-
takePicture = async function() {
if (this.camera) {
this.camera.takePicture().then(data => {
FileSystem.moveAsync({
from: data,
to: `${FileSystem.documentDirectory}photos/Photo_${this.state
.photoId}.jpg`,
}).then(() => {
this.setState({
photoId: this.state.photoId + 1,
});
Vibration.vibrate();
});
});
}
};
Now I want to know what should I do to get the completion event. Any help is highly appreciated.
I am not the best with what all to put in that code, but you can make a message show this way:
Toast.makeText(getApplicationContext(),"Picture taken!",Toast.LENGTH_SHORT).show();
Instead of Toast you can use a cross platform library : react-native-dropdown-alert

UI5 Image Gallery with Indices (Carousel or Paginator)

I would like to build a image gallery (in a lightbox (Overlay)) with Indices displaying the index of the current shown image. Like:
I will rarely have more than 5 pictures, I need "swipe" gestures to display the next/prev ones AND arrows.
First I thought the sap.ui.commons.Carousel would be perfect, but as I did not find any events (like e.g. "transitionEnd") I do not know how to access the current index then. The paginator has no swipe event (?)..
I would appreciate any advice which approach you would follow! Just for the first steps, then I'd be happy to post my code here. Right now I need a little help to start with the best fitting solution of controls.
Thanks a lot.
Why not use sap.m.Carousel? It has pageChanged event with oldActivePageId and newActivePageId params.
Here is a sample:
var appCarousel = new sap.m.App("myApp", {initialPage:"carouselPage"});
var carouselPage = new sap.m.Page("carouselPage",
{title: "Carousel",
enableScrolling: false }
);
var page1 = new sap.m.Page("page1",
{title: "Carousel Test Page 1",
enableScrolling: false }
);
var page2 = new sap.m.Page("page2",
{title: "Carousel Test Page 2",
enableScrolling: false }
);
var carousel = new sap.m.Carousel("myCarousel", {
activePage: page1,
loop: true,
pages: [page1, page2]
});
//Listen to 'pageChanged' events
carousel.attachPageChanged(function(oControlEvent) {
console.log(1);
console.log( "sap.m.Carousel: page changed: old: " + oControlEvent.getParameters().oldActivePageId );
console.log(" new: " + oControlEvent.getParameters().newActivePageId );
});
carouselPage.addContent(carousel);
appCarousel.addPage(carouselPage);
appCarousel.placeAt("content");
sap.ui.getCore().applyChanges();
jsbin: http://jsbin.com/tuqohoqinu/2/edit?html,css,js,console,output
You can see changing of pages in the output window. Hope that helps. Thanks.

Alert the page no. on jQuery dataTables page change event

The following is working for me:
$('#datatable').on('page.dt', function() {
alert("changed");
});
Whenever I am changing the page,the alert is shown.But if I want to alert the page no. which is clicked then what's the way
table.page.info() returns the current pagination information. That is current page, number of pages, recordsDisplay, recordsTotal and more.
var table = $('#datatable').DataTable();
$('#datatable').on('page.dt', function() {
var info = table.page.info();
var page = info.page+1;
alert('changed - page '+page+' out of '+info.pages+' is clicked');
});
see demo -> http://jsfiddle.net/qpLtLfaz/