« first day (3323 days earlier)      last day (1609 days later) » 
00:00 - 19:0019:00 - 00:00

7:06 PM
@Spencer because the events are added by better means
 
is cookies based authentication still relevant in angular?
 
cookies and angular have nothing to do with eachother
 
why is that?
 
what?
they have nothing to do with eachother. I don't understand why you'd ask "why"
 
how the authenticatiion works?
 
7:12 PM
How you authenticate with your server also has nothing to do with angular
This sounds like an X/Y question
 
usually, with cookies or some other form of local storage
 
What are you actually trying to ask
 
why are you so harsh in your response @ndugger
3
 
It's not harsh at all
You ask a question, I tell you your question makes no sense. That isn't harsh.
 
it does make sense
 
7:14 PM
I am just learning and the old way you store cookies on client
 
but how do you do that in angular
I know about the token authentication
 
Cookies and angular aren't related at all
 
he's trying to help
 
it's an odd question... but no reason to get all upset about it
just say yes and move on. of course apps still use cookies for authentication.
 
7:15 PM
its not that odd I think @kevin
@KevinB
 
@KevinB
 
@KevinB
 
@azam What are you trying to do? There are many ways to set cookies. None of them have to do with a front end ui framework.
oops, broke the chain
 
of course authenticating user
I know that can be done with JWT
 
if you want to access cookies on the client side for auth (you shouldn't) look at document.cookie
|| mdn document cookie
 
in php we store session Id in cookie
 
also this
453
A: Get cookie by name

kirlichOne approach, which avoids iterating over an array, would be: function getCookie(name) { var value = "; " + document.cookie; var parts = value.split("; " + name + "="); if (parts.length == 2) return parts.pop().split(";").shift(); } Walkthrough Splitting a string by token will produce ...

JS really needs a new cookie api
 
$.cookie
 
A lot of browser APIs are pretty stale. Cookies are probably the worst.
 
Glad to know all the hate for cookies :D
You guys should not even be allowed eat one :D
 
7:24 PM
We were saying how the cookies API is bad, not cookies themselves
plenty of "cookie jar" libraries out there, though
 
So to put it another way how the authentication works in angular in abstract way
 
I don't know how angular manages your session, if at all, but how you authenticate with your server has nothing to do with the JS framework you use. I'm very confused about your question. What kind of authentication is your server expecting?
 
If your server is php, it probably used the same session cookies your used to.
 
you can't check the database on each request to the server, so in php we store session id in cookie to verify against. I had this kind of thing going in my mid
I think my previous question was not that odd
 
Well you're the only one
 
7:28 PM
hhhh how
 
it's kinda like asking if ajax is relevant to angular
 
Well is it!?
 
no
 
neither is authenticating with your server
So your question is confusing
 
okay but you can help me
 
7:30 PM
Not if I don't understand your question, no
 
instead stunning me ..
 
ndugger, you're stunning
 
thanks, fam
 
user10141648
Does someone know a good tutorial on how to make a good livesearch with jquery/ajax/php ?
I want to make one for my webshop and it needs to show output in a drop down
Needs to be something like this:
https://www.youtube.com/watch?v=mZOpvhywT_E
But he uses an .json file to get data from
 
@Merdin 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.
 
7:31 PM
@azam I mean you can
 
php can output json
 
yes
 
@Merdin
 
ElasticSearch is a great search back-end, if that's what you're asking for
 
user10141648
I can't use external frameworks/APIs and stuff
 
user10141648
7:31 PM
It's for a school project
 
elastic is also pretty heavy
 
My server checks login cookie against a db on every request.
 
Elastic is great, because I know how to use it
 
@jbis okay
 
7:32 PM
@Merdin so are you gonna implement a binary search tree yourself or what
 
and other mechanism
 
if you can't use external code
 
@forresthopkinsa he did mention php
 
user10141648
Look at the video
 
user10141648
It needs to be something like that
 
7:33 PM
no
 
@Merdin what's the source of data? DB? Type?
 
i'm not gonna watch a video tutorial for code
 
user10141648
but I don't want to get data from a .json file but from sql
 
another external api
where does it end
 
Just make a php file that talks to sql and outputs json
 
7:34 PM
@Merdin you can do search in SQL queries pretty easily if the table is small
 
If you can use a SQL database, you can probably use an ElasticSearch instance. It's just another data store, but used explicitly for search. I wouldn't want to implement search on top of a relational DB. That's gonna be a lot of work for no benefit.
 
it's pretty simple if all you're using for is a school project
 
@ndugger elastic is going to be overkill if his table has like 20 rows
 
don't overcomplicate it
 
@Merdin look up the sql "WHERE LIKE" clause
 
7:35 PM
But we're software engineers. It's our job to overcomplicate it.
 
it won't give you fuzzy matching or anything like that but it doesn't sound like you need that
 
@Jbis
 
Forrest solution is backend, you can also do front end search depending on size and scenario
 
@azam
 
7:38 PM
what kind of client side authentication mechanisms are available with angular
One is JWT
 
all of them
 
...
 
Isnt angular just a UI framework?
 
Yes, he's confused
 
@azam do you understand the difference between UI and logic?
 
7:39 PM
lol I thought that part is only for you
 
azam, keep in mind the language barrier we discussed yesterday
 
user10141648
What is a good website to make code snippets in?
 
user10141648
I mean like big code
 
don't get aggressive
@Merdin code sandbox*
 
@Merdin localhost does a good job
 
user10141648
7:40 PM
I mean like to share
 
gist.github.com
 
he is asking if you undersand difference between UI and Logic what else should I say.. @forresthopkinsa
 
when you say "big code" do you mean multi-file
@azam you should say "yes" or "no"
 
user10141648
i mean multi-file
 
user10141648
@forresthopkinsa
 
7:42 PM
okay then code sandbox is the way to go
 
@Merdin gist.github.com
if you don't need to run any of the code
 
that's true I'm assuming you're hoping to be able to demonstrate the code
 
@Merdin repl.it iirc is a good one
 
repl.it is a lifesaver if you're working with a non-web language
but there's a lot of competition for web languages
jsfiddle, jsbin, codesandbox, codepen, plunker, etc
 
@forresthopkinsa sometimes it becomes difficult to put your question right.. especially for a non native speaker of english
 
user10141648
7:44 PM
https://gist.github.com/MerdinDev/8104d0c19be32c146e1bd3804003f015

Okay, so now my live search thing is on a seperate webpage.
I want to put it into a nav (which I already tried and works) but it doesn't show any output.
 
user10141648
Just to let you know. This is something what a classmate made and I didn't but I'm trying to fix it
 
@azam google translate?
 
@azam I understand, but don't get upset when native speakers can't make sense of what you're saying
 
don't make fun of others @JBis
 
I am literally trying to help not make fun.
@Merdin Bobby tables may pay you a visit
$search = mysqli_real_escape_string($connect, $_POST["query"]);
    $query = "
  SELECT * FROM stockitems
  JOIN stockitemstockgroups ON stockitems.StockItemID = stockitemstockgroups.StockItemID
  JOIN stockgroups ON stockitemstockgroups.StockGroupID = stockgroups.StockGroupID
  WHERE StockItemName LIKE '%" . $search . "%'
  OR ColorID LIKE '%" . $search . "%'
  OR StockGroupName LIKE '%" . $search . "%'
 ";
 
7:46 PM
have you ever tried translating with google translate
that thing is stupid
 
@Merdin Your code is susceptible to mysql injection. Please use prepared statements. php.net/manual/en/mysqli.quickstart.prepared-statements.php
Ok then don't use it azam, just trying to help lol
 
user10141648
I know it is, my classmate made it like I said. I already fixed it on other pages. But I first try to fix it so things work and then do security work
 
Well for something as easily fixable and blatant as sql injection i would fix it asap
 
@azam you're automatically assuming bad intent. Nobody here is making fun of you, or responding harshly. We're trying to help.
 
user10141648
@JBis I will fix that as soon as I fix the problem I currently have.
 
user10141648
7:50 PM
So if someone can help me to fix the problem or can find a good tutorial for me I would really appreciate it
 
I do understand difference between UI and logic. I do know that Http is used to do all the communication. I was just trying to know that (considering the http protocol ) that you have to keep track of the user and don't search the database on every request so what logic should angular use to make it easy for the server to identify the user @JBIS
 
@Merdin Also add a doctype, your last script element is out of the html so its invalid, and you also don't need $(document).ready because your script is at the end of the body.
 
user10141648
That is because I'm testing it on a different page @JBis
 
@azam Ok. Angular is the UI. Authentication is the logic. They are (should be) separate. Angular has no barring on any logic and therefore doesn't affect how you do authentication.
 
user10141648
I want to include it in my nav
 
8:11 PM
In other news, I tried C, C++, and Objective C and they are really hard :(
 
Have you tried C#?
 
C# looks like it could be fun in future, but don't need it now.
 
I took C and C++ in college. I haven't used them since except in learning C#.
 
I need to sit down and actually learn it instead of trying to shortcut my way around copy and pasting others code and getting frustrated when it doesn't work.
 
It's ok to copy and paste code, just take the time to understand what the code is doing.
 
8:14 PM
I'm sure I will learn C#. It sounds like a good versatile language.
 
No pesky pointers to worry about (unless you're in unsafe mode, but who does that?)
 
8:37 PM
C# is alright. I disagree with some of the language design decisions (parameter modifiers are awful) but I wouldn't say I'm enough of an expert to really judge it fairly
 
Can we clear the stars from the abusive user who claimed I was acting harshly? It was obviously a language barrier, or a behavioural issue on their end, and I'd like to not be put on blast for something I didn't do.
 
I didn't star it. Not sure who did, but I agree with @ndugger.
 
I didn't star it, but I imagine that the people who did probably did so comically
I doubt they were genuinely agreeing with the user
 
I don't really understand why people personally attack people who are trying to help them.
 
Language barrier, in this case
But we told him very clearly that we're not making fun of him, and he still lashed out, so whatever
 
8:48 PM
I think "don't be a dick" translates easily but whatever
 
this guy in particular seems to get frustrated by said barrier frequently
we were just talking about this with the same dude yesterday
 
¯\_(ツ)_/¯
I felt the response was unnecessarily rude
 
there it is
the truth comes out
 
Which response? Because nothing I said was even remotely rude or sarcastic
 
you're entire response
 
8:53 PM
wat
Me saying that angular has nothing to do with cookies is not rude
 
ndugger, when you're overly direct, it comes off as rude
you are not the only person of my acquaintance with this problem
but surely you've encountered this professionally
 
> cookies and angular have nothing to do with eachother
> what? they have nothing to do with eachother. I don't understand why you'd ask "why"
> How you authenticate with your server also has nothing to do with angular
> This sounds like an X/Y question
> What are you actually trying to ask
Then he said I was responding harshly
Please point out exactly which part is harsh
 
saying they have nothing to do with each other was clearly interpreted as shutting him down
 
So we can't tell people facts?
 
Oh please
 
8:55 PM
Yeah, I think your interpretation of harsh is ridiculous
 
I think your tone was assumed to be "harsh" due to how short you were
 
So I have to write an essay in order to tell someone something factual now?
Come on. You don't actually believe that
 
No, I didn't think you were being harsh, but I understand why it was interpreted that way
And I think you do too
You don't have to write an essay but at the same time, people will respond better if redirected rather than shut down
 
I don't think you were abnormal. Your response is consistent with SO.
 
That's untrue. When presented with facts, I much prefer that you get to the point, tell me yes, no, or to rephrase my question. I don't agree that I was short, or that it was even remotely interpretable to be harsh.
 
8:58 PM
That's literally what "short" means
I understand you because I know a number of other people who also prefer to communicate with the utmost directness
But that level of directness is not natural in conversation
And people don't expect to be speaking to a robot
So they instead feel like you must, for some reason, not want to talk to them
Of course, they won't be able to articulate that this is why your response made them upset
 
The whole point of him asking here was to get a direct answer on how to solve his problems. Programming is highly technical, and answers should be as well.
 
But subconsciously they're feeling like you must really not be enjoying their conversation
Well your philosophy on that is not the only one
that's just, like, your opinion, man
 
Well everyone else is wrong
^ that's a joke, before you start going "waaah, I told you so"
 
9:16 PM
 
alright alright
 
just doin my job :shrug:
not that i don't agree
 
no worries
 
 
1 hour later…
10:19 PM
🚽
 
posted on November 21, 2019 by Myles Borins

Notable Changes addons: Deprecate one- and two-argument AtExit(). Use the three-argument variant of AtExit() or AddEnvironmentCleanupHook() instead (Anna Henningsen) #30227 child_process,cluster: The serialization option is added that allows child process IPC to use the V8 serialization API (to e.g., pass through data types like sets or maps) (Anna Henningsen) #30162 deps: Update V8 to 7.9

 
10:42 PM
@KevinB Can you "do your job" with this one too chat.stackoverflow.com/transcript/message/47914275#47914275?
 
 
lmao
 
I'm very tempted to do that
 
11:02 PM
i've seen it before
never gets old
 
11:37 PM
Is there a way to simplify this?
try {
    done(false, JSON.stringify(exec(code)));
} catch (e) {
    if (e.message === "Illegal return statement") {
        try {
            done(false, JSON.stringify(execIIFE(code)));
        } catch (e) {
            done(false, JSON.stringify(e.toString()));
        }
    } else {
        done(false, JSON.stringify(e.toString()));

    }
}
I don't like the duplication in the catch statement.
 
00:00 - 19:0019:00 - 00:00

« first day (3323 days earlier)      last day (1609 days later) »