« first day (3233 days earlier)      last day (1698 days later) » 

3:14 AM
where da hell is the different with regular mat-form-field?
Shit. It was a word wrap. I thought it was auto font size
 
 
3 hours later…
6:01 AM
Hi, How do I type function property assignment in typescript?
e.g.

const init = (a: string): void => {};
init.use = (a: string): null | Error | string => {}
 
6:20 AM
I am trying to install packages using npm but I am getting `E404
Not Found - GET http://registry.npmjs.org/express`. [This] (https://pastebin.com/PfvWfWgF) is my npm configuration. What am i doing wrong here?
 
6:51 AM
Can you access that link directly in browser?
(from the same location where you got that 404 error)
 
@KarelG yes i can
 
is that npm endpoint registered in your npm ?
(that is the default one but could be changed at your end)
nvm just checked your pastebin
 
hello everyone
need help regarding ajax call
I'm getting response like
{"Message":"Authentication failed.","StackTrace":null,"ExceptionType":"System.InvalidOperationException"}
function TreeView_ToggleNode(data, index, node, lineType, children) {
alert('data123456');
alert($('#MainContent_MainFrameObjectTreeViewt0').text());
var rootnodeval = $('#MainContent_MainFrameObjectTreeViewt0').text();
$.ajax({
method: "POST",
url: "Main.aspx/GetChildrenTest",
data: { rootnodeval: rootnodeval },
contentType: 'application/json; charset=utf-8',
in config file I wrote
<authorization>

<allow users="*" />
</authorization>
I want to get this rootnodeval into main.aspx.cs file
getchildrentest method
[System.Web.Services.WebMethod(EnableSession = true)]
public void GetChildrenTest(string rootnodeval)
{
string rootnodevalue = rootnodeval;


}
but not working at all
 
@TBag since you are using a proxy, don't you have to provide access credentials in your proxy link? (I am not sure if you did provide that)
http://proxy.something.com/ -> http://user:password@proxy.something.com/
check with your colleagues or the network admin or something else
 
7:07 AM
@KarelG ok let me try that out
 
hey could someone help me apply a charcode editor to a full string?
String.fromCharCode(a.charCodeAt(0) + 1);
This code ups it to the next letter in the alphabet
but it only works for single characters
Ive been searching for hours, found quite a few questions about it on SO
but nothing about FULL strings
 
Rob
Loop through the string and apply it to each character?
By the way, what you're doing is called a ROT cipher. Google ROT13 and then apply it to +1 rather than +13
 
well, Im trying to make my OWN rot cipher with a custom digit replacement
meaning it pushes the letters a specific amount of times
converting it through several other cipher methods between each digit replacement
 
Rob
Well.. check out existing implementations that mutate an entire string.. then modify it with your requirement
Because you're basically asking for how to loop over a string
And.. if you're using this as a type of encryption in any way other than for fun... don't
 
Well, Its not for fun, ehhhh its for something else
its not just the cipher alone
its called push 32, Because it "pushes" the text through 32 different binary ciphers
 
Rob
7:21 AM
Doesn't matter. If you're trying to encrypt some data, use a library that does it properly
Applying multiple weak ciphers or encryptions doesn't help
 
it just happens that rot13 is sortof one of the ones I require, but cant seem to figure out how to make
Well, its sortof for fun
Its hard to explain to ya lol
 
Rob
Guessing it's an assignment?
 
Meh, more like "impressive project"
 
Rob
Then again.. Just check out any code that mutates a string digit-by-digit. ROT13 will certainly have an implementation for you
Then swap out the guts in the loop..
 
if you flip text through enough binary ciphers, the text is physically unreadable without the exact same ciphers
I read up on a while back
 
Rob
7:22 AM
Wrong
 
Rob
Well, yes. But ciphers are trivially crackable.
Don't use them as encryption, they're not
 
Hmm well the cipher is only located on my pc atm
I only plan on using it as a project
but itd deffinetly be useful to send "perfectly" unreadable messages to a friend or anyone
 
there are many ceasar cipher codes on the web
(or ROT# as Rob said)
 
Rob
I can promise you, you will never be able to make unreadable messages without using a library, unless you've got a PHD in mathematics/security
And even if you had a PHD, very unlikely
 
7:25 AM
well Im trying to making fun, eh, just using a ton of different vigeneres or ceasers with different keys is kindof boring
it ruins the point of making the project hard
so Im using, exactly as I said, 32 different ciphers
 
Rob
Well, as long as you understand that what might seem unreadable, I promise you, won't be
You could use 1million ciphers
It makes no difference if they're weak
 
a PhD in security? :P
 
does it exist? I imagine a big dude in tuxedo, sunglasses and muscular
 
Rob
@KarelG unsw.adfa.edu.au/degree/postgraduate-research/… I should have clarified the 'cyber' part :)
 
7:26 AM
with knowledge about cyber security
 
Rob
Though honestly, I'm not sure what path you'd go down to make a decent encryption algorithm. Probably more mathematical than IT
 
it requires good insights in math yes
 
So your telling me if I made a cipher that assigned a unicode character to (as many) english words as I could,
And added 100 ciphers on them, with 256 bit keys, and it turns Hello into a 2 terrabyte file, and I deleted the ciphers.

That somehow someone would figure it out???
 
AES got even defined by mathematicians.
 
rob what kind of fantasy world are you living in
Just to tell, that was sortof exxagerated
but you get my point?
 
7:28 AM
@TaylorSpark if I have the key then yes.
 
I just dont see how its possible
 
or keys
 
Rob
I do, and you're wrong. Many others have been wrong about this too. Myself included, when I was a lot younger
523
Q: Is my developer's home-brew password security right or wrong, and why?

nallenscottA developer, let's call him 'Dave', insists on using home-brew scripts for password security. See Dave's proposal below. His team spent months adopting an industry standard protocol using Bcrypt. The software and methods in that protocol are not new, and are based on tried and tested implementa...

If your encryption or cipher is weak, it doesn't matter what key is used. You probably won't even end up using the key at all
 
if it took like 40 years to decipher a few passages of some krypto thingymagic in the CIA headquarters, I seriously doubt someone would be able to figure out a powerful enough cipher
 
Rob
Point being; yeah, your friends probably won't be able to crack it. They might have a chance using a pre-made tool to do it
If anyone who's an expert in encryption tried? You'd probably last an hour or two at best
 
7:30 AM
Rob, I wrote my own cipher.
 
Rob
Doesn't matter
 
the 32nd cipher is my own
anyways
 
Rob
You don't need to know the algorithm to crack it
 
Lol now your just making up fantasy.
 
Rob
Unless you feed the cipher white noise, your homebrew implementation will leak details
 
7:30 AM
If that was true, any word could be represented as a hidden password or secret message
 
Rob
Did you read the post I linked?
 
as i said before, it would mean INFINITE possibilities
 
Rob
You're wrong. But good luck
 
lol rob your really breaking the boundaries of what humans can do
 
Rob
Doubly good luck on properly generating a random value from an infinite set :)
 
7:31 AM
there is a profession called as crypto-analyst
these people are trained to find patterns in encrypted data to crack it. You see them working at security/government organizations
 
lol I give up, I came here for help with writing a rot13 myself in JS, and this thing appeared
this got alot worse than expected
 
I am just correcting some mistakes here. Rob went kinda further on this. But you can find solutions on the web about ROT# as I just mentioned
> there are many ceasar cipher codes on the web
 
@Rob Your a "crypto-analyst" correct?
 
Rob
No
 
is anyone here a "crypto-analyst"
:L
 
Rob
7:36 AM
Have you read the Dave post?
 
You seem to know enough about "cryptology" I guess you could call it, to proudly argue here.

Would you accept a challenge to "decode"
if anything is "supposedly" decodable
 
Rob
No, because I don't have a bunch of hours to waste proving my point, when the post I linked already does that
 
Then my point is seen
anyways, even IF i expanded a 5 letter word enough to something worth megabytes
 
*sets AC to freeze mode to chill down the room*
 
it probably would be "theoretically" possible to decode, but I thnk it would take a LOT more than a couple hours
lol
 
7:39 AM
let's drop it please
 
So YES rob, if you want to be "Happy", Every single word and symbol in existance can be a secret message and can be decodable.
 
*resists urge to tell about "hashing"*
 
its simply cosmically unfeasible to know how to decode such things.
And yes, So yes, Karel,I will drop it
 
did you see codereview.stackexchange.com/questions/132125/rot13-javascript for some rot13 examples in js yet?
 
no, Im reading about it on wikipedia rn ^_^
I know rot is so easy to decrypt
a 5 year old switching letters could do
but, I still require it for a portion of push32
Ok I found my code
function rot(s, i) {
			return s.replace(/[a-zA-Z]/g, function (c) {
				return String.fromCharCode((c <= 'Z' ? 90 : 122) >= (c = c.charCodeAt(0) + i) ? c : c - 26);
			});
		}
goodbye javascript, sorry for the arguement
 
7:45 AM
I suggest to do some little effort to make it readable so that you comprehend how it works
eg 90 : 122 in the ternary, both are charcodes, I guess that it is respectively z and Z.
!!> ''+ String.fromCharCode(90) + String.fromCharCode(122)
 
@KarelG "Zz"
 
oh forgot that upper case characters comes first. W/e
 
It's not a Friday without some moron arguing
 
Hello Guys
I have question about "new Function()" statement
 
Go for it
 
7:55 AM
When we create function via "new Function " this function [[Environment]] always be Global Lexical Environment. What is reason this. Is this happened for optimisation?
 
@MuradSofiyev I like you. That is an interesting question
 
:d Thanks This question occupate my mind from yesterday and I have OCD and I can't think another problems because any unanswred question occupate my mind
So any idea about this question
 
I don't actually know why, just the where.
 
8:11 AM
the only reason I can think of is that it is done so to prevent variable access in some closures. the window one is the last environment.
 
For example why there are don't do it for eval,
?
 
8:31 AM
input:-internal-autofill-selected {
  background-color: rgb(232, 240, 254) !important;
  background-image: none !important;
  color: rgb(0, 0, 0) !important;
}
how can I remove this from my textfields?
it says it from user agent stylesheet
I think is chrome adding this
 
@MuradSofiyev eval creates a function with the current scope as execution scope
that in contrary to new Function that sets the execution scope to global.
tbh I never have asked myself why
@Aurelius chrome has added it yes
if there is a problem with it, override it. Yet why? It is a feature from Chrome.
some people rely on it. There is no reason to annoy them by adjusting it.
 
it messes up all the styling of the page
and overriding doesn't work
 
it only shows that this input got autofilled
who cares.
 
I do, as the light blue that it uses
doesn't have anything to do with the style
of the page
3
A: Material UI remove the yellow background on TextField autofill

Ryan CogswellThe replacement for inputStyle would be inputProps: const inputStyle = { WebkitBoxShadow: "0 0 0 1000px white inset" }; <TextField name="last_name" inputProps={{ style: inputStyle }} /> InputProps vs. inputProps is a common point of confusion. Uppercase "I" InputProps provides props for the In...

as you can see there are many people trying
 
8:51 AM
user agent styles are default css style, set by browser. You can tweak it yourself in the config window.
don't waste your time on this
 
9:30 AM
    input:-webkit-autofill {
      -webkit-text-fill-color: rgba(0, 0, 0, 0.87) !important;
    }
    input:-webkit-autofill,
    input:-webkit-autofill:hover,
    input:-webkit-autofill:focus,
    input:-webkit-autofill:active {
      -webkit-box-shadow: 0 0 0 30px white inset !important;
    }
export default withStyles(theme => ({
  root: {
  }
}))(TextField);
how can I insert that css into that withStyle?
so that I can get this fixed
 
10:15 AM
Guys hello, how to convert this Array to Object as below:
var users = [
  { user: 'barney', age: 36, active: true },
  { user: 'fred',  age: 40, active: false },
  { user: 'travis', age: 37, active: true}
];
var users = {
  barney: { age: 36, active: true },
  fred: {  age: 40, active: false },
  travis: { age: 37, active: true}
};
 
users[0]...
 
In your opinion what is the best open source calendar to work with full calendar?
 
@JohnValdetine why? the array one is more usable
 
@KarelG You are right but i need to define UID to every array objects.
 
add it to those objects?
 
10:26 AM
or how can i get index of an item that was selected by me ?
how ?
 
array.findIndex() ?
!!> [{ user: 'barney', age: 36, active: true },{ user: 'fred', age: 40, active: false },{user: 'travis', age: 37, active: true}].findIndex(o => o.user == 'fred')
 
@KarelG 1
 
if you want to have active only ones use .filter
!!> [{ user: 'barney', age: 36, active: true },{ user: 'fred', age: 40, active: false },{user: 'travis', age: 37, active: true}].filter(o => o.active)
 
@KarelG [{"user":"barney","age":36,"active":true},{"user":"travis","age":37,"active":true}]
 
ect
 
10:30 AM
hmmm I know these functions Karel, thanks.
But for practice, how can i get as i told you?
 
what? the uuid?
 
var users = [
  { user: 'barney', age: 36, active: true },
  { user: 'fred',  age: 40, active: false },
  { user: 'travis', age: 37, active: true}
];
var users = {
  barney: { age: 36, active: true },
  fred: {  age: 40, active: false },
  travis: { age: 37, active: true}
};
can you convert it ?
 
sure
 
Is there any short way to convert ? :)
 
use .reduce
like
!!> [{ user: 'barney', age: 36, active: true },{ user: 'fred', age: 40, active: false },{user: 'travis', age: 37, active: true}].reduce((result,obj) => {result[obj.user] = {'age': obj.age, 'active': obj.active}; return result;}, {})
 
10:39 AM
@KarelG {"barney":{"age":36,"active":true},"fred":{"age":40,"active":false},"travis":{"age":37,"active":true}}
 
if there are more keys, you can use object spread but eh
fyi: object spread is that {user, ...rest} instead of obj in the above
 
Thank you so much :)
 
anyone here works with mongoose and passport js
?
 
@user8121899 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.
 
11:06 AM
According to this answer stackoverflow.com/a/40195701/6542186
var data = {
    code: 42,
    items: [{
        id: 1,
        name: 'foo'
    }, {
        id: 2,
        name: 'bar'
    }]
};
It can be possible access just items values with object.entries?
 
@SilverSurfer Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
@CapricaSix Edited, thanks
 
11:30 AM
Yo boys
An idea of if there is a plugin comparable to react-lifecycle-visualizer but for vue ?
Or a way of visualizing it
 
12:09 PM
!!friday
!!undo
 
12:32 PM
$(document).on("keypress", "#edit-cont-org-emails", function(event){
	var allowedChars = [39,44,45,46,48,48,49,50,51,51,52,52,53,53,54,54,55,55,56,56,57,57,59,64,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,95,97,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122
];
	var g = event.which;
	var check = jQuery.inArray( g, allowedChars );
	console.log(check);
});
The above code is not throwin -1 when I press on semicolon
what could be the issue
 
FYI, don't use event.which
use event.key
.which is deprecated
 
*scrolls the horizontal bar to see manually(?) entered numbers*
 
got it
 
lmao
pleb
 
thannk you rlemon
@KarelG
 
12:41 PM
56,57,57,59,
Guess which one is 58
oh you said semi colon
either way, rethink your method, because that's a PITA to debug
 
Ben Fortune
suggest a better way
i am trying to restrict special chars
 
What is #edit-cont-org-emails?
Is it an input?
 
textarea
 
What do you mean by special chars?
What do you want to accept?
 
@-_.
 
12:44 PM
!!> [39,44,45,46,48,48,49].map(n => String.fromCharCode(n))
 
@KarelG ["'",",","-",".","0","0","1"]
 
okay
just use regex
 
@Ben Fortune - @-_.
to accept
 
.
 
So then it'd be something like [^a-zA-Z0-9\@\-\_\.]
 
12:47 PM
@Ben Fortune - regex
[^a-zA-Z0-9\@\-_\.\,]
@Ben Fortune - also comma to be allowed
waiting for ur response
 
1:19 PM
⌚️
 
who said I'm going to respond
 
pitter patter
 
damn it
 
1:33 PM
thats rude
 
I'm a rood boi
 
can confirm
 
@CommonMan better to whitelist your characters
just remove the hat, le ^
and go to regexr.com to learn + try regexes (if you aren't familiar with it)
now-imma-off /happeh-weekend
 
1:52 PM
demanding someone help you is rude
 
I guess there is no fanfare for the common man, after all
nobody? I thought it was an OK joke
 
2:26 PM
@Rob you have the patience of a saint
Petition to rename Dunning-Kruger Effect to Taylor-Spark Effect
2
 
3:09 PM
He's still here?
 
yes
 
He's determined....
 
last i heard he was calling the JS chat rude and moving to python
but.... he kinda got kicked from there
 
probably why he's back here
 
hey! Anyone here with a little Angular experience?
 
3:21 PM
just ask your question
 
1 message moved to Trash can
@Falcon Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
   <div *ngIf="{{parseInt(freight.FreightStatusCode) > 55}} ">
            <span class="dot"></span>
        </div>
I'm looking for something like this
 
3:36 PM
it's pretty bad when you have 0 experience with angular and suddenly you have to write some functions because your co-worker is on a holiday trip :P
 
3:59 PM
why should I use this material-ui.com/components/hidden instead of display: none?
 
Did you read the page you linked
Because that explains what it does
 
4:28 PM
How do you get array-style access for a class?
Meaning I have my own custom class (I don't want it to extend Array)
Basically it's a hashmap
So I have O(1) performance on key-based lookups
But I still have O(n) performance on index-based lookups
If I make it so that when it's created it creates an array of the keys, then when a lookup-by-index is performed I can get the key O(1), then use the key to get the element O(1)
But I want to be able to access it via myClassObj[index]
 
4:41 PM
@Falcon you don't need the curlybraces
 
@Vap0r look into Proxy
 
Yeah I just landed there. I think that's the way to go because then I can check to see if my accessor is numeric and if so attempt to retrieve from the HashMap's hashMap property via index
I'm kind of curious now how array does it, because from what I can tell proxy wasn't around and the array object doesn't have a property for each index
But yeah, proxy is the way to go since I'm not going to extend Array, thanks!
@rlemon would you mind taking a look at my code to critique it?
For now I implemented it as itemAt
 
5:02 PM
hey guys
do any on you have idea about webrtc with socket.io?
in reactjs
 
5:27 PM
@Atulkumarsingh Dude, come on you have asked about this many times. I gave you a couple links that were the first result of a google search. Did you read those? Did you do any more research?
 
i have buddy and tried it was not much fruitful
 
5:43 PM
Much fruitful are the efforts of those who try
-JBis
 
well my efforts are not working in the i want
 
 
2 hours later…
7:27 PM
@Cereal of course but it doesn't mention any comparsion with display: none
 
 
1 hour later…
8:38 PM
Hey. Can somebody please tell me why decorators aren't a bad idea?
My experience with them has been awful. They always come off as a duct-tape magic solution which vastly overcomplicates something which could have been done in a more direct and understandable way.
But surely I'm wrong.
 
i mean
the only place i've used decorators are with mobx
and.. it's wonderful there,
 
They were pretty good in mobx. I really disliked the whole inject by string name bit though.
And I'm pretty sure I remember having some difficulties with console.log and rather unreadable data.
 
9:02 PM
-3
Q: Why javascript is showing UNDEFINED?

soheljamanI create some element inside HTML textarea using javascript. But javascript showing UNDEFINED. What is the problem in my code? document.getElementById("myText").innerHTML = divs; var divs = document.createElement("div"); var p = document.createElement("p"); var text = document.createText...

i received an email from UPS telling me i have a package coming, 5 minutes after it arrived
 
That took me a second. It's been a while since I've used var. Hoisting is totally unfamiliar.
 
9:42 PM
@KevinB do you constantly find yourself hacking javascript frameworks to make them do a thing they didn't intend to?
 
no
i often find myself removing modules in favor of much simpler solutions
 
Hmmm... it's not often I remove a module. Usually won't add one unless absolutely necessary.
 
i rarely start from scratch, usually it's some boilerplate, so i'm left removing a whole lot of junk
 
 
Getting rid of bootstrap at my last company was a wave of relief.
 
10:03 PM
We got rid of bootstrap a few years ago, but it snuck back in with some 3rd party code
 
10:58 PM
getting bootstrap is like getting rid of jquery
you may think it's gone but it will always be lurking in the shadows, waiting for its moment
@SephReed I like your site
 

« first day (3233 days earlier)      last day (1698 days later) »