« first day (3419 days earlier)      last day (1512 days later) » 

12:08 AM
Thanks
goodnight everyone o/
 
12:32 AM
later
 
1:04 AM
Hi Guys, I need an idea to build an infrastructure for banks and corporations, where banks and corporations can integrate their infrastructure to generate a receipt of transaction whenever a user buys a product. What opensource project on Js (Nodejs) should I review to understand how this system is supposed to work
 
1:45 AM
I'm gonna save you a lot of time and tell you that banks hate new or modern technology
They don't like open source, they don't like Node.js, and they despise APIs
They generally require software to be "battle tested" which means it's written in C++ or Java, it's built on legacy frameworks for outdated application servers, and it's already widely adopted in the industry
The only way to break into FIs is through small credit unions and those can't pay almost anything for software
@Xcode tl;dr you'd be better off selling software to hospitals
 
2:49 AM
Hi all,
 
@Creditto 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.
 
I have a strange problem. I am storing some datas in hidden field. When I changed value of hidden field through inspect element, it get changed in server side also.
any one help me how to get actual value
 
 
1 hour later…
4:03 AM
@forresthopkinsa Plus with hospitals you don't even need to worry about security or releasing update! In fact, they prefer outdated vulnerable technology.
 
 
3 hours later…
6:39 AM
@forresthopkinsa I worked in the second biggest bank in Brazil for some years, and while some parts of the bank development areas were like you said, they had some areas using a lot of open source projects for developments, data mining, data storage, etc. Also were adopting cloud storage / computing in a lot of different sectors of the bank. But that is because some of the board members were former IT professionals and understand the value of open source, etc
but they are definitely not "giving" their code back to the community lol
 
 
3 hours later…
9:21 AM
@forresthopkinsa monzo.com/blog/technology
 
10:10 AM
@forresthopkinsa @Neil you're the expert here
 
Yep, kind of have to agree with you there @forresthopkinsa @FelipeOliveira
banks don't like depending on software they themselves didn't write, at least concerning the more sensitive aspects of it
At my bank, we switched to java 8 recently, and it was only because IBM basically said if we wanted their continual support, we'd have to upgrade
 
10:32 AM
Is it possible to use a Modal to open an entire webpage to overcome the CORS policies issues?
Or should i go for a server-side solution?
I´m trying since two hours to serverside parse the html, but this seems to be very comlicated... maybe there is an easier way that I just dont know?
 
async function downscaleImage33(dataUrl, imageType, imageArguments) {

       let formSettingObject = await getFormSettingObject();
       let allowOriginalImgSize  = formSettingObject.is_allow_original_file_size;
       // check if from form setting if allow_original image size
       if (allowOriginalImgSize) {
           return  dataUrl;
       }
       var image, canvas, ctx, newDataUrl;
       var file = dataURLtoBlob(dataUrl);
       var size = file.size;
       var sizeKB = size/1000;
       var fileReader = new FileReader();
i have try this script but it does not working,
and image data come null on iphone, but it's working web and android
 
why are you having a CORS problem? are you still in development (localhost)? If you create a proxy for this address you want to access you wouldnt have the CORS poicy issue @elsololobo
 
problem is comming on iphone can anyone guide me
1
A: How can show image in proper orientation, Landscape or portrait

Rafael CavalcanteStep #1: Check if the image's width is bigger than its heigth. Then you'll figure out that the image is a landscape image. You can check it quickly using javascript. Step #2: Create a CSS and apply it using a class (apply the class using javascript) for whatever orientation you need.

i have try this but image data come null on iphone
@KevinB ?
 
10:57 AM
@FelipeOliveira yes I´m still in development.. oh okay, didnt thought about using some kind of proxy concept to do this
i will take a look at it
 
Hi all
 
@elsololobo not sure what kind of technologies you're developing with atm, but I did something similar some days ago inside webpack
 
using nodejs/ express
so the idea would be: frontend => request to proxy => proxy makes GET request to wepage => return to frontend?
 
are you using any front end framework?
 
EJS
so no
serverside rendering
the current problem is. When making GET from my serverside it fails to render the HTML because there a css and js files missing that werent downloaded by the GET
 
11:01 AM
I'm not sure exactly how it would be in your case, but basically what I did was, set a proxy to the address I needed to request to (in my case locahost:3000 which was my node back end), so my front end thinks it is requesting to the same address localhost:8080 (front end address)
 
i will try this out. Thanks
 
something like that:

proxy: {
        '/apis': {
            target: 'http://localhost:3000/',
            secure: false
        }
    }
but this is in webpack, you gotta see what works for your stack
 
 
1 hour later…
12:11 PM
Quiet in here
 
12:26 PM
mORNIN
God caps lock
:L
Anyways, G' Mornin everyone
Man sure is sleep chat today.
Ima go do PLATO work
 
hola
 
Hey
 
what's up?
 
Hopefully AMD today
 
? Hopefully AMD Today? What does that mean
you hoping for a new AMD card to get released?
 
12:36 PM
hmm that reminds that I expect a package today
:|
 
ya makin a new pc?
I built one recently, and my dad's trying to save up and hes going to let me build my sister's new pc all on my own
 
that package is just ... clothing
:D
 
Oh...
Cloths...
Sadface...
 
sloths
 
Im getting that feeling I get when I get cloths for my birthday
:I
 
12:40 PM
that's strange
 
Speaking of which... my B-Day is in about 12/13 days
Turnin' 15
 
you don't know the actual date?
 
March 7
:P
 
🤨
 
im just guessing it off current time, too lazy to subtract rn
half alseep
 
12:41 PM
@TaylorS stock market, AMD stock
 
Oh...
I dont care about STONKS usually....
Seems a waste of money
 
stupid Corona virus fucking it up
 
They say the flu is actually worse than corona
I say nah
 
it is lol
but since it happens yearly, we got used with it
Corona is ... "new"
@JBis any reason to get amd stocks today?
 
A friend and his family had the flu. Awful stuff. Out all last week
 
12:43 PM
mrmhm I need to check my broker
account
 
Compare the numbers.

13 Million Infected, 16k dead.

corona: about 80k Infected, 3k dead
that many dead with such a low infection number
 
Or Asynchronous Module Definition design pattern
 
so if the corona infects at a similar rate.... about 460k will die
Way more
487,000*
Excuse my terrible math
 
Yeah, sounds about right
 
@KarelG So I wanted to get it a little bit ago but funds took time to transfer. From the time I wanted to invest and the time I could invest it went up like 15%. So I waited, and it went down again and I invested. Next day (yesterday), it goes down like 7%. May buy more once the market turns around.
 
12:46 PM
Generally speakingl, its new, and theres no vaccine, so I understand the death rate being higher, but I also think that its just a terrible disease, needs more attention
brb switching classes
 
as you said Corona is new, it will blow over soon enough
 
Maybe
 
lol those numbers are biased
 
Yeah Corona is over rated
 
the flu numbers are a rough estimate and not all corona "hits" are being reported
I love the way how the chinese gov handled it
 
12:47 PM
Ebola was so much worse, that you actually die from
@KarelG don't get me started
 
they went from "if positive after a lab test, then +1" to "if you have symptoms then +1"
 
how about silencing docs before the outbreak?
 
ack. their responsibility
 
1:21 PM
Chinese already starve their own economy for the welfare of the government via their imperialistic playing-god rulers
with corona? I bet to them its just population control :L
Rip Chinese
hey does anyone got some good docs that can compare typescript and javascript?

I wanna try out TS but the syntax is a little funky, and I dont just wanna llook it all up again
like I did when first starting JS
google.com google.com google.com google.com goog- You get the point
 
i'm sure there are plenty of good docs out there with the scope of teaching typescript to people who are already familiar with javascript
 
Ill play around with their 5 minute guide and see what I can come up with typescriptlang.org/docs/handbook/typescript-in-5-minutes.html
all sorts of new fancy objects to play with...
interfaces... assignable type object arguments
+_+
 
it's all syntactic sugar in the end
 
.-.
 
if it didn't ultimately transform to javascript in some way or another, then it would be considered an entirely different language
 
1:28 PM
that reference
 
Too much sugar ain't good for us
 
to the syntectic sugar dude
that I starred forever ago
:D
lol
 
Syntactic aspertame
 
> sometimes this syntecis sugar is braindamege for me
 
:)
 
1:29 PM
too much sugar in the diet
 
Causes cavities in the code
 
Im bored again. Stuck doing ancient greece platos
Cavities in the code. THats GeTing StarrEd riGht NoW
 
focus on ur college
lol
 
College my ass, Stuck as a freshman still
I got 3 more years of this shit Xd
 
you should be happy that you get education
if you don't, leave it lol. You can study from home
 
1:41 PM
Again, quitting highschool mighta worked for a couple lucky butts out there, but not in the modern day, that gets stuck on your record, and companies will judge you for that.
Plus, im a goodie goodie, Id rather not ruin the fragile "mature kid" reputation ive managed to hold onto over the last couple years
my parents would make my life hell if Id quit
Um quick question
does this syntax work in a class
	setSetting(n, v) {
		if (localStorage.getItem(this.name + n) === null) {
			this.addSetting(n, v);
		}
	}
Calling a function from within the class with the "this" statement?
this.addSetting(n, v);
or is there a better way to do that :3
Ok nevermind, it is correct, didnt bother googling; stackoverflow.com/questions/43642729/…
 
@TaylorS yeah so long as addSetting is part of the class
 
It is, I just dont bother pasting all the code
	addSetting(n, v) {
		localStorage.setItem(this.name + n, JSON.stringify(v));
	}
	setSetting(n, v) {
		if (localStorage.getItem(this.name + n) === null) {
			console.error("Sorry, the setting \"" + n + "\" doesnt exist!");
		} else {
			localStorage.setItem(this.name + n, v);
		}
	}
usually..
Just making a quick localstorage settings API, because I hate having temporary settings
had to use dat.gui on many projects to automate settings before
might as well make my own
 
			console.error("Sorry, the setting \"" + n + "\" doesnt exist!");
ew
 
lol
 
using string templates
at least
 
1:51 PM
yeah I was too lay to use the literals.. I forgot about that... brb ``
 
i just make a getOrDefault function which grabs existing value or returns the default
 
I noticed that error is cheesy
console.error(`The Setting "${n}" does not exist.`);
Better?
 
no
non-meaningful variable names
you deserve a slap
 
Arguments are the only things I shorten nowadays
should see my old clicker games
var d = {
 a : '',
 b : '',
 c : ''
}
etc
 
why shorten?
 
1:57 PM
Idk, I find arguments to be differentiated from normal variables more easily like that.

its easier to understand as a single letter that represents an undefined value
rather than a big fat word that represents a default value
its just a thing that helps me understand my own code
Also, Im using 2 localStorage items for my settings, 1 sets all the setting names so they can be retrieved at any time, another one actually will hold a setting, and more of them can be created/removed
Curious if that is a good idea
to get a better idea, just see how I wrote it
	constructor(n) {
		super();
		this.name = n;
		this.settings = [];
		localStorage.setItem(this.name, JSON.stringify(this.settings));
	}
	addSetting(n, v) {
		localStorage.setItem(this.name + n, JSON.stringify(v));
		this.settings.push(v);
		localStorage.setItem(this.name, JSON.stringify(this.settings));
	}
I use JSON.stringify so the settings can be exported in a simpler format for use elsewhere
 
we already have discussed that
I will only keep repeating it. Up to you to handle it.
 
discussed what?
oh the shortened variables from earlier?
yeah I know I should improve, its just hard to stray from the way I do something
 
if you start to work and the accepted company standard is to start the curly on the new line for everything, you have to adapt on day 1.
 
Yeah, I guess thats true
I can easily change how I code, but on a personal project Im doing with my own code and ideas, I usually go with the sense that, its mine, so i can write it how I like
or how I find suitable
Is super() appropriate here? JSFiddle is telling me its unexpected
	constructor(name) {
		super();
		this.name = name;
		this.settings = [];
		localStorage.setItem(this.name, JSON.stringify(this.settings));
	}
 
super is for when you have a class that extend other class
class Parent {
  ...
}
class Child extends Parent {
  constructor() {
    super(); // ok now
  }
}
it's just calling Parent.constructor in essence
 
2:06 PM
Ok, I always thought it changed the appropriation of the this statement so it affected the parent class
so rather than this representing the constructor, itd represent the class as a whole
making calling methods in methods possible
but I guess I was wrong
eh It happens often
Im actually going to hop off the chat in a bit, but before I do, I have more of a biased question.

If the user wants to return a setting from localStorage, but that setting does not EXIST, is it better to return False if the setting doesnt exist, and the settings value if it does..

or is it better to return nothing/ return undefined or something
		if (localStorage.getItem(this.name + name) === null) {
			console.error(`The Setting "${name}" does not exist.`);
			return false;
		} else {
			return localStorage.getItem(this.name + name);
		}
after this, I have to go though
 
someone on reddit:
> W3schools is great for SQL
 
.-.
No
Never
 
lol'd
got 10 upvotes
 
w3schools has some decent js/html/css docs for beginners
Ok.. Karel were talking about reddit here XD, what da ya expect
its not stack... or mdn
 
and this chat is not msn :)
 
2:11 PM
true
 
@TaylorS return an empty string or null (eww, but that's what the function really returns)
 
Ok.. for my settings thing ima just return undefined, so the user atleast knows theres no setting defined, and thatway its also not just sending a random value
		if (localStorage.getItem(this.name + name) === null) {
			console.error(`The Setting "${name}" does not exist.`);
			return undefined;
		} else {
			return localStorage.getItem(this.name + name);
		}
Or that
You can return Null?
:I
 
you can
 
ok switching classes, brb
 
but is not advisable
 
2:19 PM
Ok
So would returning false or undefined be more acceptable?
 
2:36 PM
@TaylorS ew
 
sigh
 
2:57 PM
where can I learn about the JS best practices?(web links) more focused on NodeJS
 
post code here, if you get an ew its bad
jk
 
JBis your such a meany... considering what you wrote yesterday to piss everyone off lol
 
what'd i say
 
Gotta find it, brb lol
22 hours ago, by JBis
<HTML id="html">
<BODY></html>
<SCRIPT>eval(`

const x = 5;
alert(x);

`);</script>
</html>
;>
mega ultra terrible end of the world EUW
22 hours ago, by JBis
11 mins ago, by JBis
hmm, how can i rile up some js devs
shoulda used var isntead of const too
;>
 
@JudeNiroshan You can take a look at MDN docs. They usually follow good practices and explain things well. As for design and dir structure, you can ask here, read some medium articles, and/or look at example projects.
 
3:08 PM
@JBis Thanks. I have lot of review comments usually regarding the unit test names. Consider this example: should return empty row when price attribute value is 0 Is this a common pattern we follow in unit tests? Or is there a better structure for naming?
 
Having some issues with my api.

both options return the same value as a string, but only the raw string works as a value.
function testAPI() {
  document.querySelector(".background").style.background = "#ff0000";
	document.querySelector(".background").style.background = set.setting("Background"); // Returns "#ff0000"
	console.log(set.setting("Background")); // Returns "#ff0000"
}
The first option, changes background color
the 2nd option fails
the 3rd option just logs the same value as the first option
 
"empty row" is a bit descriptive. Also what happens when price attribute isn't 0? But thats not bad.
 
@FelipeOliveira That's pretty cool! I guess I'm mostly talking about the USA, I don't really know about the rest of the world. In the US the big banks are e.g. Wells Fargo
and Wells Fargo is a developer's nightmare, let me tell you
 
@JBis "Also what happens when price attribute isn't 0?" shouldn't this be another unit test?
 
3:11 PM
How can 3 pieces of code all return EXACTLY the same value... but only one work as a value
Each are a string
Each are a CSS Color Hex
Anyone got any ideas why this does what it does?
 
@JudeNiroshan depending on what you are doing yes
i was just nit picking, that sounds to me like a fine description
I haven't done much unit testing so i may not be the best person to respond. However, there are many articles on unit testing name conventions.
 
no worries. Thanks :)
 
@TaylorS which line are you referring to?
 
@Neil 51-54
its just not an expected output
considering all 3 represent the same thing
 
@TaylorS DOM has had this sort of functionality for a while, but it has only been added to javascript semi recently
there's just a setter that doesn't assign if the input is invalid
if you assign to true or false, it doesn't know what to do with that and just ignores it
no, sorry I misread that as setSetting
 
3:21 PM
yeah its on the bottom in API Testing
 
not sure I understand what you mean
 
in the bottom of the code...
 
you set it twice do you not?
 
on the jsfiddle
 
yep, I saw that.. lines 51-54
 
3:22 PM
Yes, and only the first one will affect it
remove the first line, and youll see it doesnt change the background color, even though the return value is "#ff0000"
 
oh I see what you mean
interesting
@TaylorS I think what you're assigning is "\"#ff0000\""
so in the console you see "#ff0000"
but what you really should see is #ff0000
 
oooh
wait no
the only time I assigned that was in the error logs
nowhere else
I bet maybe because Im serializing JSON, its using the JSON and I forgot to un-serialize it!
facepalm thats probably it
return localStorage.getItem(this.name + name)
lolus really...
im stupid asf
 
it happens
took me a second to understand why
 
return JSON.parse(localStorage.getItem(this.name + name));
That should fix it
yup
working now
phew I thought Id really f'ed up
Ive seriously screwed up code in spaghetti format before, and its a pain in the ass to clean, and I usually just start over
 
we always find clever ways of screwing up, though don't we?
 
3:38 PM
Yuppers
Hey is there a way to set a method array ( {} ) and add a name + value into it via js
like... so I can create a new array... and append the variable "name" as its key, and "val" as its value
Setting the key as a variable just makes a new variable called name
so thats not going well
Thats what Im currently doing
but I want to create a dynamic variable that can hold ALL of the values
so
output : {
 Background : "#ff0000",
 Color : "#ff0000"
}
but creating it after page load
in vanilla js
Such a thing as creating variables possible in JS?
after page load atleast
Ok screw that, I think im going a bit far
Ill just get the names of the variables in the output of the main settings, then use forEach and return the values of each of them.
Easy
 
4:01 PM
array? key/value?
 
Ok everythings working now
 
18 mins ago, by TaylorS
Such a thing as creating variables possible in JS?
 
https://jsfiddle.net/SirCode/gp5sqn6w/149/

Kevin B, its fine, i was just brainstorming something unreasonable
Kevin B, I mean like.. Creating Variables AFTER the JS has been executed
:>
now that I read it, it sounds like I dont know what variables are
Ignore that :P
gotta finish work, cya
 
😬
 
;)
 
4:07 PM
Hello all ,
could someone please help me in this question, I really stuck and want to resolve my problem .
Thanks
 
@Jonas 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.
 
1
Q: How to set TextInput above of the keyboard in React Native

Jonas I am working on an app where I am handling a form but I have some serious problem actually when I click on TextInput then textinput disappear . I want to set TextInput above of the keyboard . Thanks Code import React from "react"; import styled from "styled-components"; import { Platform } f...

 
I didnt understand half of that question. Sorry dude
 
@Jonas are you referring to an input box "attached" to the keyboard?
 
@JBis Yes, actually currently when I click on input field then input field disappear I want that when I click on input after that I want to show field above of the keyboard
 
4:12 PM
3
Q: How to set text input above the keyboard when clicked? React-Native

SequinexCurrently I have a TextInput at the bottom of my screen, when I press the TextInput the keyboard is placed on top of the TextInput, so I can't see what I am typing. Does anyone know how I would be able to show the TextInput component just above the keyboard, when the component is pressed?

 
@JBis I tried but face same problem
<KeyboardAvoidingView behavior="padding" enabled>
      <FieldContainer>
        <TextField
          placeholder={placeholderData}
          placeholderTextColor="#0b4975"
          secureTextEntry={
            placeholderData === "Password" ||
            placeholderData === "Confirm Password"
              ? true
              : false
          }
        />
      </FieldContainer>
    </KeyboardAvoidingView>
 
@Jonas 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.
For posting large code blocks, use a paste site like like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
no one appreciates hatebin.com
:((
so far it hasnt had any maintenence or "server down" issues like hastebin
@JBis You should add hatebin to the list for jamesbot
 
We don't tolerate hate in this room
 
O.o
there are levels of hate that are perfectly acceptable
 

« first day (3419 days earlier)      last day (1512 days later) »