These are chat archives for FreeCodeCamp/HelpJavaScript

8th
Nov 2018
Jason Luboff
@JLuboff
Nov 08 2018 00:00
@bradtaniguchi Which means its half failing :P
Brad
@bradtaniguchi
Nov 08 2018 00:00
Itall get there, unfortunantly I don't have my debugger setup, so gotta do this the old fashion way, with old fashion console logs :/
Jason Luboff
@JLuboff
Nov 08 2018 00:01
Well call me old fashioned then
I still need to learn how to use tests :(
Brad
@bradtaniguchi
Nov 08 2018 00:02
I used to only rely on them, but got fed up with running the same crap over and over again, printing more and more crap every time. Just spam breakpoints and observe all variables :D
@JLuboff Easier to get going with the debugger than setting up tests :D
Jason Luboff
@JLuboff
Nov 08 2018 00:03
Ah... ya breakpoints can be nice. Used them when I was using C#
Brad
@bradtaniguchi
Nov 08 2018 00:04
I read an article about debugging and really persuaded me to figure it out. The main thing I remember is "you can see the value of ALL THE VARIABLES", so many times Ill be like "well I console logged the wrong thing" haha
but enough talk, I can't do anything of that right now :/
Jason Luboff
@JLuboff
Nov 08 2018 00:06
Why not
Brad
@bradtaniguchi
Nov 08 2018 00:07
I'm on a different machine, so it's not setup with the debugger, I'll have to figure out how to add it. I might end up doing it if my console logs don't help, but I need to add more logging anyways, since this is a pretty complex feature that could break in lots of ways, need the visibility
Jason Luboff
@JLuboff
Nov 08 2018 00:07
Ah
Brad
@bradtaniguchi
Nov 08 2018 00:21
welp I found a source of the current bug... I have this code:
const validItemsDeleted = deletedItems.reduce((arr, item) => {
  const valid = this.isValidItem(item);
  if (!valid) {
    logger.warn('item with id is not valid, id:', item.id);
    return arr;
  }
  return arr;
}, []);
Jason Luboff
@JLuboff
Nov 08 2018 00:21
what should it be doing and whats it not doing?
Brad
@bradtaniguchi
Nov 08 2018 00:22
The code is support to get me valid items to delete, and log any items that aren't valid. When I run the code I don't see any invalid items being logged (which is correct), but I never get any items back from the reduce....
its' always an empty array
Jason Luboff
@JLuboff
Nov 08 2018 00:23
Oh ya that could be a problem
Brad
@bradtaniguchi
Nov 08 2018 00:23
Yea, probably because I just return the array and don't do anything besides logging, so the array is always empty -__-. Of course I didn't add tests for this method since "its simple enough to not screw up" yea....
Jason Luboff
@JLuboff
Nov 08 2018 00:26
Probably should have added tests homie
Brad
@bradtaniguchi
Nov 08 2018 00:28
Yea.... I really should :(
Jason Luboff
@JLuboff
Nov 08 2018 00:30
How do I add tests when most of what my app does is processing forms and handling it accordingly with the database? Obiviousily I have logic in there and some functions...but.. I'm really tired of having to run through each portion of the form to test lol
Brad
@bradtaniguchi
Nov 08 2018 00:42
@JLuboff Optimally you'd want to test your business logic, since that's what matters the most and should be abstracted away well enough to make it easy to test. So the processing part is what you'd want to focus on testing, less to the actual db interactions
You could also start with higher level testing, but that almost always requires you to setup a fake database somewhere to use just for testing, which is a lot more work
In that way you end up actually calling all your backend code (and front-end code too if you want) to actually update the database. Much harder to debug issues, but much easier to see if entire features are broken. It is harder to setup, and odds are you'd only want/have a handful of these due to the amount of work involved
Jason Luboff
@JLuboff
Nov 08 2018 00:43
Eh... fake database wouldn't be all that much work to be honest
I think I just need to share my code (not in here) and get suggestions that way lol
Brad
@bradtaniguchi
Nov 08 2018 00:44
@JLuboff If you can easily tear it down, set it up would be good too
otherwise you might end up with tests affected other tests (which is not what you want) since the db carries over state between each run
Jason Luboff
@JLuboff
Nov 08 2018 00:45
Mmm...yes yes (aka I don't fully follow but I sort of get what you're saying)
Brad
@bradtaniguchi
Nov 08 2018 00:45
@JLuboff i think its mostly dependant upon your code structure, and what part handles what. If you showed me all your logic in an express callback id be :(
Jason Luboff
@JLuboff
Nov 08 2018 00:46
oh man...you might be like :(
Haha nah I have queries seperate
and more involved logic in a seperate file
Brad
@bradtaniguchi
Nov 08 2018 00:47
Ok doesn't sound to bad, but yea the main reason why I've been refactoring is because 60% of the logic in our app was like that, the other 40% was thrown about everywhere with no pattern or organization
Jason Luboff
@JLuboff
Nov 08 2018 00:48
My longest route is 100 lines (including an object with each item on its own line which is 24 lines alone)
Brad
@bradtaniguchi
Nov 08 2018 00:49
Now the route files are usually concerned with only route security, and calling the right model methods. The models handle the specific business logic, utilities handle re-usuable business logic. So far so good, I already found I needed to start splitting some of the logic in the models into other models for specific use cases (like to audit what the user is doing)
@JLuboff If your logic is simple you can just test the entire route, no need getting more complicated than need be. Chai+sinon can allow you to make a fake http request to your route, and sinon can mock your backend calls to "unit-test" your route callbacks
Jason Luboff
@JLuboff
Nov 08 2018 00:50
Hmm alright. I'm going to send you that long route via DM and see what you have to say
Brad
@bradtaniguchi
Nov 08 2018 00:50
hehe alright I'm prepared :P
Pagnito
@Pagnito
Nov 08 2018 03:42
anyone build anything with next js?
Pagnito
@Pagnito
Nov 08 2018 04:23
thinkin about doing server side auth with facebook passport, any advice. im using next js. so im tryin not to have rerender of the header happenin on the client side with componentdidmount get('/getUser')
i dont think i asked the question right
or the right question rather
Pagnito
@Pagnito
Nov 08 2018 04:28
nvm i thinnk whatim thinking might not b possible since the cookies are in the browser
Phillip Kelley-Dotson
@pkdotson
Nov 08 2018 06:57
why the hell is this erroring out?
const stack = (arr) =>{
      let newArr = [];
    let stack=arr;
   while(stack.length){

      if(Array.isArray(stack[0]) === false){
        newArr.push(stack[0]);
           stack.shift();
      }
      if(Array.isArray(stack[0]) === true){
          for(let j=0; j<stack[0].length; j++){
             stack.push(stack[0][j]);
        }
      }
   }
    return newArr;
}
flatten array
using stack
Aditya
@ezioda004
Nov 08 2018 07:01
What error?
Phillip Kelley-Dotson
@pkdotson
Nov 08 2018 07:01
it won't run if i add subarray within the an original array
i think it's timing out
i see the issue
lol
Aditya
@ezioda004
Nov 08 2018 07:03
Yeah you have an infinite loop.
Phillip Kelley-Dotson
@pkdotson
Nov 08 2018 07:03
stack = function and stack = arr is going to break it
Aditya
@ezioda004
Nov 08 2018 07:08
Adding stack.shift() after the for loop seems to fix.
Not sure why you're calling it a "stack", when you're using it as a "queue".
Phillip Kelley-Dotson
@pkdotson
Nov 08 2018 07:12
yah that would make sense. Thanks @ezioda004
Jefferson
@jeffersonnnn
Nov 08 2018 07:53
hey guys, so i have this regex i can't seem to wrap my head around. can anyone help me parse it? here is it /[^a-zA-Z ]/
Aditya
@ezioda004
Nov 08 2018 07:57
@jeffersonnnn The regex matches everything except alphas, ^ inside [ ] means negate the following regex.
Jefferson
@jeffersonnnn
Nov 08 2018 07:58
@ezioda004 wow. i was looking for regex that would match only alphabets and white spaces, and this was the best i could find. Does this mean that this isn't correct?
Aditya
@ezioda004
Nov 08 2018 08:00
@jeffersonnnn Yeah, you can do /[a-zA-Z ]/ to match only alphas and whitespace, though you might also need the g flag to match all instances.
Jefferson
@jeffersonnnn
Nov 08 2018 08:01
@ezioda004 that youuuuu.
okay the fact is i have already written my code but it is buggy, the idea behind the code is to get the first non-repeating character in a string. here is said code

// for preventing invalid input
function allow(thisInput) {
  thisInput.value = thisInput.value.split(/[^a-zA-Z ]/).join("");
}

//recieve input from textbox and print to div

function runCode() {
  var strName = document.getElementById("textName");
  var str = strName.value;

//alas, we print to div

  var arr = str.split('');
  var conc = '';
  var ctr = 0;

  for (var i = 0; i < arr.length; i++) {
    ctr = 0;

    for (var j = 0; j < arr.length; j++) {
      if (arr[i] === arr[j]) {
        ctr += 1;
      }
    }

    if (ctr < 2) {
      conc = arr[i];
      break;
    }
  }
  var huxtable = conc;
  document.getElementById("result").innerText = huxtable;
}
Dan Couper
@DanCouper
Nov 08 2018 10:01
Can you explain the "prevent invalid input" bit?
Jason Luboff
@JLuboff
Nov 08 2018 16:17
Morning :wave:
Christopher McCormack
@cmccormack
Nov 08 2018 16:18
@JLuboff yo gm
Jason Luboff
@JLuboff
Nov 08 2018 16:18
Whats up
Christopher McCormack
@cmccormack
Nov 08 2018 16:20
making tables
Jason Luboff
@JLuboff
Nov 08 2018 16:20
database tables?!
Christopher McCormack
@cmccormack
Nov 08 2018 16:20
didn't think after 10 years I'd still be making excel documents, but here we are
Jason Luboff
@JLuboff
Nov 08 2018 16:20
oh...excel...ew...
Christopher McCormack
@cmccormack
Nov 08 2018 16:22
I like Excel for what it is, and I'm pretty good at it, but I would rather make this a web form
but then I have to worry about where to host it, supporting it, etc...
Jason Luboff
@JLuboff
Nov 08 2018 16:23
Fair enough. I know very little about excel
oh...and I hate macros...they're the devil
Christopher McCormack
@cmccormack
Nov 08 2018 16:24
I don't use them
sure they are powerful, but they are security vulnerabilities
I'll only use them in my own documents
but usually if I need something like a Macro I'll just use python
Jason Luboff
@JLuboff
Nov 08 2018 16:27
I see problems where we upgrade Excel and macro's break. Shitty things
Christopher McCormack
@cmccormack
Nov 08 2018 16:28
We have a data collection form for new iVPN connections, it has macros AND updates from some data source (I think that was a mistake) but every engineer/PM seems to be perfectly content clicking through the warnings and errors...
Making a new one that makes that one look like :poop:
Jason Luboff
@JLuboff
Nov 08 2018 16:33
Good good. Make them suffer no more
Tom
@moT01
Nov 08 2018 16:34
:poop:
Christopher McCormack
@cmccormack
Nov 08 2018 16:34
Yeah!
@moT01 :wave:
Tom
@moT01
Nov 08 2018 16:34
:hello:
Christopher McCormack
@cmccormack
Nov 08 2018 16:35
:sup?:
Tom
@moT01
Nov 08 2018 16:35
nothing
I tagged you in a PR that needs some resolving
Christopher McCormack
@cmccormack
Nov 08 2018 16:35
ok
been really busy with work but I can look this afternoon
How's the progress going?
Tom
@moT01
Nov 08 2018 16:36
yea, not a big deal - needs to be resolved via command line - so I thought it was a good one for you to try out
progress, down to almost 10k
Christopher McCormack
@cmccormack
Nov 08 2018 16:36
those are always... fun?
Tom
@moT01
Nov 08 2018 16:37
weren't you trying to figure out how to do that
Christopher McCormack
@cmccormack
Nov 08 2018 16:37
I did two now
In one the PR was to actually delete a file, and apparently that causes a merge conflict
have you tried it?
Tom
@moT01
Nov 08 2018 16:39
no
Christopher McCormack
@cmccormack
Nov 08 2018 16:40
gotta try it, white knuckle experience
Tom
@moT01
Nov 08 2018 16:41
yea
probably something to figure out
accidentally sliced the ribbon cable for the monitor to my arcade about a half millimeter
Tom
@moT01
Nov 08 2018 16:46
enough to break it
Christopher McCormack
@cmccormack
Nov 08 2018 16:47
oh that sucks
need a new one?
can't imagine soldering that would be easy
Jason Luboff
@JLuboff
Nov 08 2018 16:47
so @bradtaniguchi helped me gain an average of 5.09 ms quicker route processing
Christopher McCormack
@cmccormack
Nov 08 2018 16:47
how so @JLuboff ?
no more log statements?
Jason Luboff
@JLuboff
Nov 08 2018 16:48
Har har. No, some destructuring and Promise.all
Tom
@moT01
Nov 08 2018 16:48
i dont need a new one cause I have a second one that will work - but I wanted to use that for something else
Jason Luboff
@JLuboff
Nov 08 2018 16:49

Changed this

     const fullReview = await read.reviewRequest(requestID);
      const userInfo = await read.userInfo(user);
      const approvers = await read.approversData(requestID);
      const actionItems = await read.actionItems(requestID);
      const preStartupItems = await read.preStartupItems(requestID);
      const cleanActionItems = await utils.cleanActionOrPreStartItems(actionItems[0]);
      const cleanPreStartupItems = await utils.cleanActionOrPreStartItems(preStartupItems[0]);

to

     const [fullReview, userInfo, approvers, actionItems, preStartupItems] = await
      Promise.all([read.reviewRequest(requestID), read.userInfo(user),
        read.approversData(requestID),
        read.actionItems(requestID),
        read.preStartupItems(requestID)]);
      const [cleanActionItems, cleanPreStartupItems] = await
      Promise.all([utils.cleanActionOrPreStartItems(actionItems[0]),
        utils.cleanActionOrPreStartItems(preStartupItems[0])]);
Tom
@moT01
Nov 08 2018 16:49
new ribbon cable is only like 20$, but I got both monitors for free - so I'd rather not buy a new one
Christopher McCormack
@cmccormack
Nov 08 2018 16:50
@JLuboff the classic async blocking setup
Jason Luboff
@JLuboff
Nov 08 2018 16:50
In the first block, each await needs to wait for the prior before running, resulting in a longer cumulative time. In the second block, it only will take as long as the slowest running query (or in the second part, my function)
@cmccormack Perhaps...I had no idea until he told me that that was a thing lol
Christopher McCormack
@cmccormack
Nov 08 2018 16:51
Yeah, I wish there were a syntactic sugar for Promise.all as well
maybe like an awaitmany then at the end awaitmanydone or something shorter
I also have no idea what you should do in the event you want to fail back all requests if one fails
but that's a different problem I guess
Jason Luboff
@JLuboff
Nov 08 2018 16:54
Mmm...I should test that...see if it still transfers to the catch block
Christopher McCormack
@cmccormack
Nov 08 2018 16:55
Promise.all returns itself a promise that you can .catch on right?
so maybe just chain .catch to the end?
Jason Luboff
@JLuboff
Nov 08 2018 16:56
It rejects with the reason of the first promise that rejects.
So I think that should transfer to the catch block
Christopher McCormack
@cmccormack
Nov 08 2018 16:56
it's all in a try catch right?
Jason Luboff
@JLuboff
Nov 08 2018 16:56
Ya
Christopher McCormack
@cmccormack
Nov 08 2018 16:57
Do you need to await the Promise.all for it to hit the catch?
would be a good test
Jason Luboff
@JLuboff
Nov 08 2018 16:57
As opposed to not having await in front, is that what you mean?
Christopher McCormack
@cmccormack
Nov 08 2018 16:57
yeah like you don't have now
Jason Luboff
@JLuboff
Nov 08 2018 16:58
?? I do have await
Christopher McCormack
@cmccormack
Nov 08 2018 16:58
I'm not sure but I would think you would get an UnhandlePromiseRejection error or whatever if one failed
oh sorry your code wraps
didn't see it
Jason Luboff
@JLuboff
Nov 08 2018 16:59
So just tested it, by changing a query to cause an error. It did go to the routes catch block
Christopher McCormack
@cmccormack
Nov 08 2018 16:59
and the route itself is the async function right?
Jason Luboff
@JLuboff
Nov 08 2018 17:00
Ya
Christopher McCormack
@cmccormack
Nov 08 2018 17:00
I'd be interested to see what happens if you took await off
Jason Luboff
@JLuboff
Nov 08 2018 17:00
The query returning a promise but not an async function (I'll probably switch it to async in the future...don't know that there is really any benefit other than being uniform
I'm going to try right now
@cmccormack So without await I get TypeError: Promise.all is not a function as well as a unhandledPromise rejection
Interestingly... it did still attempt to run the queries, but the query error did not bubble up
Christopher McCormack
@cmccormack
Nov 08 2018 17:03
how can it be not a function and still run those queries?
oh are you invoking error?
in your catch?
no..
that doesn't make sense
Jason Luboff
@JLuboff
Nov 08 2018 17:04
I'm not going to lie.. I don't understand why the queries were running if it doesn't think Promise.all is a function...
Christopher McCormack
@cmccormack
Nov 08 2018 17:04
oh
you have two Promise.all
did only one run?
Jason Luboff
@JLuboff
Nov 08 2018 17:05
Route: /reviewRequest/46 Query/Error: TypeError: Promise.all is not a function
(node:17524) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): (read)actionItems Error: RequestError: Invalid object name 'dbo.ActionItm'.
(node:17524) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Thats my full console error. So the top line is from the catch block of the route. The second is the error inside my query (I purposely changed the name of the table resulting in invalid object name) which is not bubbled up hence unhandled promise rejection
I removed the await from the first of the two Promise.all
Gotta step away...will be back soon
Christopher McCormack
@cmccormack
Nov 08 2018 17:06
I remember without async/await you can have errors that are obscured due to promises maybe that's it
ok see ya
Blauelf
@Blauelf
Nov 08 2018 17:08
If I remember correctly, first the function and parameters are evaluated, then it checks whether the function is actually callable.
class Blah {
  get blubb() {
    console.log("blubb got read");
    return 42;
  }
}
console.doWeirdThing((new Blah).blubb);
blubb got read
TypeError: console.doWeirdThing is not a function
ajthemaniac
@ajthemaniac
Nov 08 2018 17:51
Hey I am using react-table library , but getting the error : "ReactTable .map is not a function in ReactJs" . when i try to add object to my existing data array of objects
Jason Luboff
@JLuboff
Nov 08 2018 18:00
@Blauelf Interesting. Seems kind of odd behavior
Blauelf
@Blauelf
Nov 08 2018 18:01
Not that odd. Just that it gets everything ready first.
Ghost
@ghost~5928d90bd73408ce4f629b9e
Nov 08 2018 18:02
is this possible
     const formData = new FormData({
      uid: user.id,
      time,
      product: id,
      name: productNmae.value,
      public: isPublic,
     });
instead of using append cause im doing this and im having a 500 network error
Jason Luboff
@JLuboff
Nov 08 2018 18:03
@2HexGFX_twitter I just replied to you in the nodejs/node room that I believe is the issue
Essentially looking at the docs, that doesn't seem to be valid
Ghost
@ghost~5928d90bd73408ce4f629b9e
Nov 08 2018 18:04
Really, i thought it makes sense that it will know im passing an object
wow
why cant life be simpler
back to ugly aPpEnd
Jason Luboff
@JLuboff
Nov 08 2018 18:07
Becuase FormData doesn't store just an object. IF you ever try and console.log(myFormData) you'll see the everything is obscured.
Ghost
@ghost~5928d90bd73408ce4f629b9e
Nov 08 2018 18:10
if i become super pro im gonna redo this shite
Pagnito
@Pagnito
Nov 08 2018 18:34
anyone know why my array comes back empty ?
  fs.readdir(pathTo, (err,gifs)=>{
      gifs.forEach(gif=>{
        fs.readFile(`${pathTo}/${gif}`, (err,data)=>{      
          if (err) {
              throw err;
          } else {
             content = data;
            gifsArr.push(content)
          }
        })
      })
      console.log(gifsArr)
      res.json(gifsArr);
    })
`
Jason Luboff
@JLuboff
Nov 08 2018 18:41
Where is gifsArr declared?
And have you checked inside your fs.readFile callback to see if you can access gifsArr?
Pagnito
@Pagnito
Nov 08 2018 18:49

oh wait i think i know

i think i gotta use a promise
gifsarr is declared outside the reddir method, i was able to get it done with a promise, but im getting a bunch of buffer numbers in my data

oh ok i had to specify utf-8
hey umm, i have a bit of a problem, if u can help me. I have two axios calls, in axios.all
and i want the user data to resolve and setState for user data even if the gifs call is pending
  componentDidMount(){
    axios.all([
      axios.get('/api/getUser').catch(err=>{console.log(err)}),
      axios.get('/api/getGifs').catch(err=>{console.log(err)})
    ])
    .then(axios.spread((user, gifs)=>{
      console.log(gifs.data)
      this.setState({user:user.data,
                     })
    }));
  }
Jason Luboff
@JLuboff
Nov 08 2018 18:58
I've never used axios.. so can't really help there. But if axios.all works the same as Promise.all then its not going to move onto the then block until its completed
Pagnito
@Pagnito
Nov 08 2018 18:59
i see
thnx
Brad
@bradtaniguchi
Nov 08 2018 22:20
@danydin What's your code looking like right now?
Dany Din
@danydin
Nov 08 2018 22:21
should i print the call and just regularly return the func?
@bradtaniguchi
how can i use the return value from a func
Brad
@bradtaniguchi
Nov 08 2018 22:36
@danydin I have no idea what your talking about. Do you have code so we know what your trying todo?
DMZ
@DMZ011
Nov 08 2018 22:49
hi guys
what do u guys use to test scripts on a live website, something like a console window in chrome, but would be more like a light editor
is there something like that?
Brad
@bradtaniguchi
Nov 08 2018 22:59
@DMZ011 What do you mean test scripts on a live website?
DMZ
@DMZ011
Nov 08 2018 23:00
let's say gitter has some objects, and APIs
and they work when u are in the context of this page
just like when u do in console window in chrome
where u type jQuery. and u get intellisense
but the problem with chrome console, is when u hit enter, the code is executed right away
I was thinking if there's a more rich editor, than the console window
Brad
@bradtaniguchi
Nov 08 2018 23:02
I mean, the chrome console is an editor, and your in a live "environment"
DMZ
@DMZ011
Nov 08 2018 23:02
yeah but
it's not rich
like, it allows u to write one line at a time
when u hit enter, that's it
Brad
@bradtaniguchi
Nov 08 2018 23:02
that doesn't make it rich
DMZ
@DMZ011
Nov 08 2018 23:02
u can't write multi lines of code, u can't debug
u can hit shift+enter, but that's dumb
Brad
@bradtaniguchi
Nov 08 2018 23:03
and there are a number of features to go around that, like shift+enter
DMZ
@DMZ011
Nov 08 2018 23:03
IE has the functionality of being able to write multilines, but IE is .... #$#@$#@
i'll check the snippets thingy
sounds closest to what I need
thanks @bradtaniguchi
Brad
@bradtaniguchi
Nov 08 2018 23:12
np :D
DMZ
@DMZ011
Nov 08 2018 23:12
man, I like it
being able to debug is just awesome
DMZ
@DMZ011
Nov 08 2018 23:22
@bradtaniguchi here?
Brad
@bradtaniguchi
Nov 08 2018 23:22
yes
DMZ
@DMZ011
Nov 08 2018 23:23
so if I go to mywebsite/_api/web .. I can see the returned result
that's the end point for the rest request
however, if I am on the homepage of the site, and do something like: fetch('mywebsite/_api/web').then... it gives me 403
I guess that's because the snippet doesn't know that the end point is actually for the current website that's open
Dany Din
@danydin
Nov 08 2018 23:24
@bradtaniguchi how to access the return in a different func?
def collatz(number):
    if number%2==0:
        res = (number//2)
        print(res)
        return res
        # 
    else:
        res = (3*number+1)
        print(res)
        return res
Brad
@bradtaniguchi
Nov 08 2018 23:25
@danydin this is python?
Dany Din
@danydin
Nov 08 2018 23:25
indeed
Brad
@bradtaniguchi
Nov 08 2018 23:26
@danydin if your calling the function, you can do this:
res = collatz(2) # this will print res
print(res) # this will also print res
@danydin isn't 403 an error saying the server got it, but there was something wrong?
If you got a 404 then the snippet might not be able to actually hit the route
Dany Din
@danydin
Nov 08 2018 23:27
you tagged me by mistake
DMZ
@DMZ011
Nov 08 2018 23:27
403 => forbidden
Dany Din
@danydin
Nov 08 2018 23:27
ok let me check it and i'll update thanks @bradtaniguchi
DMZ
@DMZ011
Nov 08 2018 23:27
yeah server got it, but access denied
Brad
@bradtaniguchi
Nov 08 2018 23:28
@DMZ011 Odds are you have some security on your backend right, your snippet probable doesn't provide whatever you use to authenticate requests between your client and the server. (like a jwt or session or something)
Dany Din
@danydin
Nov 08 2018 23:28
@bradtaniguchi it works but i try to use while loop for the res
and it only cache the first res result and not update it again just loop the same first res it got
DMZ
@DMZ011
Nov 08 2018 23:29
@bradtaniguchi yeah, I guess it won't work in this case
Brad
@bradtaniguchi
Nov 08 2018 23:29
@danydin I'm not sure what your doing anymore, but since this is the javascript channel I recommend asking in the python room (even tho its dead) or on the fcc forums
Dany Din
@danydin
Nov 08 2018 23:29
you cant help this time?
Brad
@bradtaniguchi
Nov 08 2018 23:29
@DMZ011 You can probably make it work, but it depends on how you setup the security on your request
@danydin I can, but not here, nor do I really understand what your doing. You will need to go into it more and this isn't the right place.
Dany Din
@danydin
Nov 08 2018 23:30
ok ill message you there
Jason Luboff
@JLuboff
Nov 08 2018 23:30
Ugh...nothing like wasting most of the day trying to get 3rd party software installed on a server
Christopher McCormack
@cmccormack
Nov 08 2018 23:30
@danydin to access return, you either store it in a variable in a parent scope, or you call that function from another function
DMZ
@DMZ011
Nov 08 2018 23:31
@JLuboff next, next, next, finish
Christopher McCormack
@cmccormack
Nov 08 2018 23:31
children always have access to parent scope but parents don't have access to children unless you store it outside
Dany Din
@danydin
Nov 08 2018 23:31
@cmccormack i did call it from another func but it stores just the first time
and when i use a loop it not updates the return
but keep cache the first return value
DMZ
@DMZ011
Nov 08 2018 23:32
@cmccormack my high school teacher won't agree with that statement
Christopher McCormack
@cmccormack
Nov 08 2018 23:32
@danydin you'd have to show more code, the python room is better for that so I'll let it progress there
@DMZ011 which?
DMZ
@DMZ011
Nov 08 2018 23:32
about children and parents :joy_cat:
Dany Din
@danydin
Nov 08 2018 23:33
can you go to that room? @cmccormack
DMZ
@DMZ011
Nov 08 2018 23:33
tbh, when I first read it, i thought u were talking about real parents/children :joy_cat:
Christopher McCormack
@cmccormack
Nov 08 2018 23:33
I'm always in that room
Dany Din
@danydin
Nov 08 2018 23:33
nice good to know cya there lol
Jason Luboff
@JLuboff
Nov 08 2018 23:34
@DMZ011 If only it was that easy... wouldn't install (kept failing to start the service), and the guy we were talking with wasn't much help. My coworker finally found that we needed a missing DLL (downloaded via Windows Update). So we got the app installed...but than we needed to convert the Access database to SQL Server database since they no longer support Access databases. And you have to use their import tool...an import tool that doesn't work...
Christopher McCormack
@cmccormack
Nov 08 2018 23:34
@DMZ011 I think it's good for kids to store them outside, helps promote good gut bacteria
Jason Luboff
@JLuboff
Nov 08 2018 23:34
So now we have to wait until the morning to talk with the actual programmers in Scotland
And we're under pressure to get it done since several people are doing training starting Monday for this new version..
DMZ
@DMZ011
Nov 08 2018 23:35
@JLuboff ay ay ay
Jason Luboff
@JLuboff
Nov 08 2018 23:35
When they just started getting us involved yesterday afternoon..
DMZ
@DMZ011
Nov 08 2018 23:35
sounds like a mess
Jason Luboff
@JLuboff
Nov 08 2018 23:35
Partly becuase my manager usually deals with this particular software but he is on vacation
It is indeed a mess
DMZ
@DMZ011
Nov 08 2018 23:37
I have Exchange migration to office 365
:S
then Skype for business on prem to Teams
before all of that, Ad to Azure AD sync
:S
Jason Luboff
@JLuboff
Nov 08 2018 23:38
Why is that falling onto you? Shouldn't your IT department be handling that?
DMZ
@DMZ011
Nov 08 2018 23:38
I asked for it :joy_cat:
I was like: that sounds like a cool project, let me go for it
Jason Luboff
@JLuboff
Nov 08 2018 23:40
Well..good luck lol
DMZ
@DMZ011
Nov 08 2018 23:41
they look like it's a tough thing, but they seem to be straightforward
or at least that's how MS make it seem
Jason Luboff
@JLuboff
Nov 08 2018 23:41
I know when my company switched from on premise Exchange to Office 365...there were issues with user accounts..but I wasn't here so not 100% on what the issues were
DMZ
@DMZ011
Nov 08 2018 23:42
but u still have AD on prem, or azure AD?
Jason Luboff
@JLuboff
Nov 08 2018 23:43
AD on premise which syncs to O365
DMZ
@DMZ011
Nov 08 2018 23:43
ah cool
Jason Luboff
@JLuboff
Nov 08 2018 23:45
Ya except when the syncing breaks lol]
DMZ
@DMZ011
Nov 08 2018 23:45
:S
don't scare me
Jason Luboff
@JLuboff
Nov 08 2018 23:45
It actually hasn't broken in a while. The current syncing tool works fairly well
DMZ
@DMZ011
Nov 08 2018 23:45
:joy_cat:
Jason Luboff
@JLuboff
Nov 08 2018 23:46
The old one could take up to 4 hours to autosync versus the new one which autosyncs usually within 30 minutes if not less
DMZ
@DMZ011
Nov 08 2018 23:46
dunno why MS has problems with sync tools
onedrive for business sync tool got updated 3 times
to finally become stable
Jason Luboff
@JLuboff
Nov 08 2018 23:48
:shrug:
DMZ
@DMZ011
Nov 08 2018 23:49
haaa, am having the 403 problem even in chrome console when making fetch requests
Jason Luboff
@JLuboff
Nov 08 2018 23:54
Jesus christ. First a mass shooting last night, now a fire close to the same area in So Cal
Brad
@bradtaniguchi
Nov 08 2018 23:56
@JLuboff There's a fire now?
Jason Luboff
@JLuboff
Nov 08 2018 23:56
@bradtaniguchi Yup...in Newbury Park.. so..basically Thousand Oaks
Brad
@bradtaniguchi
Nov 08 2018 23:59
Damn thats near you right? Be careful.