« first day (3558 days earlier)      last day (1373 days later) » 

5:36 AM
Hi All
im suddenly facing one issue, with the code which was already working on the production
await new AWS.SES(configs)
        .sendBulkTemplatedEmail(params)
        .promise()
        .then(function(data) {
            winston.debug(`Emails send`);
        })
        .catch(function(err) {
            winston.error(err.stack);
        });
not sure what is suddenly wrong with this!!!
 
What is the issue?
 
6:03 AM
it throw me the error with
(intermediate value).sendBulkTemplatedEmail is not a function
 
 
1 hour later…
7:10 AM
Ahhhhhhhhhh githubs down, the world is ending, save your family
 
@JBis you mean its due to lack communication establishment with the service?
 
7:27 AM
@JBis I was wondering why some userscripts I have couldn't update.
 
8:20 AM
@JBis Lol
 
9:16 AM
`
var status = row.data["orderStatus"];
            if (status) {
                switch (status) {
                    case when status.replace(/\s/g, '').length:
                    case 'pending':

                        break;
                }
            }
`
just trying the case when on js. Is it possible?
 
9:37 AM
@ARr0w no, there is no when for cases in JS. switch(x) { case a: break; case b: break; default:} is directly comparable to if (x == a) {} else if (x == b) {} else {} You can at best rig it to inverse things switch (true) { case foo == "hello": break; case foo == "world"; } - you have the expected result and each case as an expression that hopefully resolves to that result. However, I'd very much advise against it - it's not at all easier to read or understand.
It's usually more complex to maintain because you have to make absolutely certain you've exhausted all cases that will produce the result and you don't have overlaps. It's more hassle than it's really worth unless you have exceptional circumstances.
 
9:50 AM
okay. thanks <3
 
 
6 hours later…
3:33 PM
hi
 
o/
 
@IsraelObanijesu Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
1 message moved to Trash can
 
uhm, please can you help me with this code......i have a koa.js middleware that is suppose to write to a file then returns a response immediately after it has written to the file....this is my code: `await fs.writeFile(employeesDataStore, JSON.stringify(decodedEmployeeData), err => {
    if (err) throw err;
    ctx.response.status = 200;
    ctx.response.message = 'Data Retrieved Successfully!';
  });`
 
that await there worries me
 
so the issue is when i send a request to the endpoint using postman, it says 'Not Found'.....although, i noticed that when i moved the response status and message out of the writeFile callback, the response works
 
3:38 PM
you can only await things that return a promise
so if you're hoping for that await to cause the lines that follow to not run until after the file is written, that's not gonna happen
 
oh
okay
please do you know how can i prevent the lines that follow to not run until after the file is written?
 
ou would need to promisify fs.writefile, or move the lines that follow up into the callback.
 
i already moved them into the callback as shown in my code, but it says 'not found'
i should probably try the promisify option
 
3:55 PM
okay, so i found about fs.promises, it looks promising......thanks
 
😃
 
4:22 PM
Hi everyone can anyone please help me for this
https://stackoverflow.com/questions/62879529/how-to-make-an-ajax-call-for-getting-data-from-a-div-onclick
 
@G.Lakshmi don't just copy and paste code to SO
|| mcve
 
Invalid command! Did you mean: msie, dice, mcve? Try help for a list of available commands..‍.‍.‍.‍.‍.‍.‍.‍.‍
If you would like assistance, please create a Minimal, Complete, and Verifiable Example
 
@JBis its the div and I am trying to get the data in jquery to ajax call
I am trying to get the data from the textfields checkboxes and dropdown positioned in a div with id in ajax call
@JBis
 
4:39 PM
put it here jsfiddle.net
your js isn't even valid
 
where do you mean @JBis
 
did you read this stackoverflow.com/help/mcve?
 
yes @JBis
 
Hi everyone!
 
@LianNivin Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
4:43 PM
o/
@G.Lakshmi ok so create one
 
thats not valid js
if your not gonna put in the effort to give me valid js then why should i or anyone else help
 
where the mistake is @JBis
 
you have open brackets you haven't closed
 
ya ok fixed now please see once
 
4:56 PM
post the link
 
ok you gotta a bunch of issues
|| mdn scope
 
read that
then fix accordingly and come back
 
are you saying about change(function()) or get_checkbox function
@JBis
 
5:15 PM
posted on July 13, 2020 by Prudhvikumar Bommana

The beta channel has been updated to 84.0.4147.89 for Mac, Linux and Windows A full list of changes in this build is available in the log. Interested in switching release channels?  Find out how here. If you find a new issue, please let us know by filing a bug. The community help forum is also a great place to reach out for help or learn about common issues. Google Chrome Prudhvikuma

 
@JBis actually I didnt understand for which function it is required
 
Hello, I 'm stuck on finding a method to convert a docx to pdf.
I m running a django app which has to send back a FileResponse back as pdf
 
5:30 PM
@G.Lakshmi get_checkbox_data();
 
I can send the docx file with no problem but converting to pdf requires libreoffice/ms word. Instead it is guaranteed that my clients have a microsoft word. Can I use the browser "Ctrl +P" to send a file as docx and capture it in a fetch request and then throw at the user converting it to pdf on client side?
Oh I forgot to tell I can't install libreoffice/ms office on the server which is the main headache."
 
that means I need to first learn how to use node with django.
I know node and django seperately
Also this module seems to use itself to convert word doc to pdf which is a problem because it often changes the formatting
 
@JBis yes I ha changed
But it is not working @JBis please help me
I didn't understood what is wrong
 
@JBis I m reading the docx for the time inbetween but it seems this package is used to extract pages from the pdf
@G.Lakshmi why are you using ajax in times of fetch?
 
5:47 PM
I am trying get data through ajax and jquery could you help @VisheshMangla
 
yep I guess
but I w'd use fetch, would it be ok?
it's the "new" ajax
 
this is such a facepalm convo
 
No actually I need like this @VisheshMangla
 
ok I m reading ajax give me a minute
 
Alright here we go
 
5:51 PM
Ok
 
AJAX stands for Asynchronous JavaScript And XML more info here
You can use a verity of method to make requests, including XMLHttpRequest and fetch.
jQuery has its own method, .ajax, that works similar to fetch but not exactly
in this age there is basically no point in using jquery (except in some rare situations) but we're not going to worry about that for now
@VisheshMangla idk why you are using nodejs with a python lib
 
I would comply with @JBis , @G.Lakshmi I can't help with jquery it looks more dirty than javascript
@JBis you only referred me that module
 
@VisheshMangla this the JS chat so i am assuming you are using js. You can use that module to convert word to pdf. If you want more information google the library, there are some tutorials online.
 
U mean code is wrong
 
@G.Lakshmi The jsfiddle link doesn't update automatically. You must repost a link everytime you make a change. Before asking a question you need to do a couple things:
 
5:57 PM
Ok now I got the relevant stuff , thanks @JBis
there is no python library unfortunately that converts word to pdf
but I can inject a webpack script into my django code
 
First, make sure you have tried everything you can. Lookup your question or any errors you see. If you need help understanding fine ask about it but at least try. It's not trying when there are basic syntax errors on your code. No one wants to take time to fix them thats your job as the asker. Secondly, ask the question in coherent english. You don't need perfect spelling but make it understadable. Thirdly post a MCVE. No one wants to look through tons of code to find your issue. Finally,
state the expected result and the actual result. This will allow us to know your goal and whats not working. We are not a code writing service so don't just say "show me how to do x".
Show what you've tried and whats not working
@VisheshMangla i'm sure there is. Are you trying to do it client or server side. it should be done server side imo
i gtg for now so good luck to you all o/
 
there are but they require bulky third party softwares to be installed on your server
python is not for frontend
I don't care if its done on the server or client side. I just want a package which can do it without installation of these big microsoft word/libreoffice/pandoc etc
 
@JBis yes that shared fiddle is what I tried so far but not able to get the alert of success
 
@JBis pdftron.com/documentation/samples/py/OfficeToPDFTest seems to be a paid api and nothing else
similarly for javascript
"To run this sample, get started with a free trial of PDFTron SDK." -- from the docs
also it requires its installer of some kind(of whatever gigabytes) as a dependency to be installed on the server which is against the ultimate goal here
 
 
1 hour later…
7:27 PM
Anyone know of any good KVM with dual monitor support?
 
Sam
8:24 PM
export const getClaims = async uid => {
  let thisClaims= [];
  firestore()
  .collection('claims')
  .where('uuid', '==', uid)
  .onSnapshot(documentSnapshot => {
    documentSnapshot.forEach(x => thisClaims.push(x.data()))
  });
  return thisClaims;
}
Is there any reason why this shouldn't be waiting properly until returning its response? If I log the response I get the blue I in the console meaning some expressions have been evaluated after printing
 
 
2 hours later…
10:18 PM
@Gaston Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
1 message moved to Trash can
 
Sorry, I didn't realize about the code formatting stuff. Anyway, question... if I wanted to send more than just "myForm" in the below code, can I do that? If yes, how?

  const res = await axios({
      method: 'POST',
      url: 'http://127.0.0.1:8000/api/v1/tours',
      data: myForm
    });
 
Idk what myForm is but if it's an object you could do
 { ...myForm, moreData: true}
 
its FormData
From a front end from where the user inputs values
 
|| mdn FormData
 
So... the other item I want to put in is an object called startLocation
 
@Gaston there info there ^
 
I tried doing the below, but it made my application angry. :) Thanks for posting, I'll take a look at that.

data: { myForm, startLocation }
Ah, I just read it. The problem is that the additional object I'm trying to include in my POST request can't be a part of the form data (to the best of my knowledge) because it isn't a straightforward key/value pair. StartLocation consists of sub attributes (type, coordinates, address, description)
So I was trying to build the StartLocation object before the POST request happens... which I can do, but I don't know how to send it off to the API
 
10:56 PM
 
11:15 PM
I am getting a JSON response from a form Handler script. It appears in console log as
Object { errors: "Captchas do not match." } This is all well and dandy, but when I try to iterate over the errors( array?) the length is coming back as 22.. instead of 1, or 2.. w/e the error count is.. Does anyone know why?
contactUsForm.addEventListener('submit', function(event) {
	event.preventDefault();
	contactUsForm.style.visibility = "hidden";
	var xhr = new XMLHttpRequest();
	var url = 'form-to-email.php';
	xhr.open("POST", url);
	var formData = new FormData(contactUsForm);
	xhr.send(formData);

	xhr.onreadystatechange = function() {
		if(xhr.readyState == 4 && xhr.status == 200) {
			var formResponseObj = JSON.parse(this.responseText);
			console.log(formResponseObj);
			if(formResponseObj.status == 'sent'){
console.log(formResponseObj.errors.length) == 22
console.log(formResponseObj) == Object { errors: "Captchas do not match." }
Shouldn't formResponseObj.errors.length return 1? I'm confused
I am parsing the responseText as JSON and a JSON object seems to be returned
 
11:33 PM
posted on July 13, 2020 by Krishna Govind

Hi everyone! We've just released Chrome Beta 84 (84.0.4147.89) for Android: it's now available on Google Play. You can see a partial list of the changes in the Git log. For details on new features, check out the Chromium blog, and for details on web platform updates, check here. If you find a new issue, please let us know by filing a bug. Krishna Govind Google Chrome

 

« first day (3558 days earlier)      last day (1373 days later) »