« first day (3253 days earlier)      last day (1681 days later) » 
00:00 - 12:0012:00 - 22:00

user11867329
12:02 AM
idk, it's like unreal.
 
morn
 
afternoon
 
user11867329
evening
 
12:24 AM
I have the feeling there's a good joke to be made out of this...
 
user11867329
12:56 AM
does it involves bees
 
ABC
1:34 AM
Hi
can anyone know my error here
1
Q: How to fix echart doesn't display in angular

ABCHere's the code. How to fix data doesn't display in yaxis or charts. kindly check if there's an error on my code. list.component.ts tempTrendOption: any = { title: { text: 'Temperature Chart', x: 'center', y: '3%' }, tooltip: { show: false, trigger: 'a...

 
user11867329
Guys a more serious note, i offer 50k to the person who can help me
 
user11867329
var PushBullet = require('pushbullet');
var pusher = new PushBullet('o.HMZez1lGKXXXXXXXXXXXXzGtKAMYe');

pusher.link('ujA6XXXXXXXXXXXXXXDUbhuu', 'Restock Bot Alert', 'https://www.restockcrc.com/all/', 'New Item Added', function(error, response) {});
 
user11867329
How can I see what didn't go well? I get no errors.
 
user11867329
but it doesnt go through
 
ABC
@KarelG
can anyone help me
1
Q: How to fix echart doesn't display in angular

ABCHere's the code. How to fix data doesn't display in yaxis or charts. kindly check if there's an error on my code. list.component.ts tempTrendOption: any = { title: { text: 'Temperature Chart', x: 'center', y: '3%' }, tooltip: { show: false, trigger: 'a...

thanks in advance
can I use globalservice inside the function?
 
ABC
2:23 AM
like
 
2:39 AM
@ABC you might want to read this: javascriptroom.github.io/rules
 
ABC
@Tavo ok sir
 
no sir. Just Tavo. No need to ping either :)
 
somebody here?
$(document).ready(function(){
  $("body").on("click", "#delete_post_'.$post_id.'", function(e) {
    e.preventDefault();

		  $.ajax({
                    type: "POST",
                    url: "backend/ajax/delete_post.php",
                    data:{
                        "post_id": "'.$post_id.'"

                    },
                    success: function(data){
                      //  $("#result").append(data);

                    }
				});
          });
});
this script is dinamic generated by my php because it also has php vars on it
'.$post_id.'
 
if the post id is a number, you could remove all these double quotes
 
it's a string
 
2:54 AM
k. so what's the problem?
 
for some reason the ajax call is not working
 
what does it do? what is returned by the request? Is the request even made? Look in the developper's console, the network tab will give you insights on the problem.
 
I will add console log on the sucess function, let me see
 
that is not what I meant. in the network tab, you can see the requests being made
selecting the request will show you exactly what have been sent to, and exactly what has been received from, the server
 
200 status
 
2:57 AM
and the content?
 
sintax error on backend
haha
 
progress!
though that returning a 200 is... a problem
 
I forgot a ; on the PDO query
@FélixGagnon-Grenier why return 200 it's a problem?
 
@OtávioBarreto because it's a lie. 200 means that the request was successful. However there was a syntax error. We need to be able to trust http status codes.
syntax errors normally return 500 internal server errors
 
how to validate ?
 
3:10 AM
I'm sorry, what do you mean?
 
sucess(function) is not the right way
I mean I should validate the status code with php right?
 
hmmm, not exactly. the response from your server should have the proper code.
the client can then receive that response, and act accordingly. if the status code is 200, it should be safe to presume everything was ok, and we can continue execution
 
got it
:47282841 ctrl+k
 
Otherwise, I know you haven't asked about it, but if you'll indulge me: there's no need to use jquery $.ajax method anymore. built-in fetch has wide support and everything you need to transfer json data
 
ABC
I got an error which is i use echarts
then the data doesn't display in echarts
but when I console on it the data are inside the data
 
3:16 AM
@FélixGagnon-Grenier built-in fetch?
 
look at the second code snippet. not everything in there is needed, but it's an ok example to transfer json.
 
very cool approach
 
fetch(url, {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
    },
    body: JSON.stringify({ identity: 'groot' }),
}).then(
    response => console.log(response),
    error => console.log(error),
);
@ABC Hey is there a problem? Why do you keep removing that message?
 
ABC
0
Q: How to fix echarts doesn't display data in Angular

ABCHow to fix the area line echarts, it doesn't display data in echarts. the output is empty. here's the code. list.component.ts tempTrendOption: any = { title: { text: 'Temperature Chart', x: 'center', y: '3%' }, tooltip: { show: false, trigger: 'axis', ...

 
I think the chat is blocking his link
 
ABC
3:20 AM
@OtávioBarreto I just remove it
 
dude, it's the third time you post your question today
 
@FélixGagnon-Grenier very simple, I am reading but it's still suported only on chrome and firefox right?
 
so the link I read is out of date
I think I will replace all ajax to fetch now
 
depends on your project, of course, I don't really have to support older browsers, and I have the liberty of saying "yeah fuck ie" if I need to choose between using a modern api vs being compatible. you may or may not be in that situation
@OtávioBarreto start slowly, maybe start learning it by doing the next one with it, and see if you are successful.
also... use git
now
:)
 
3:27 AM
1 message moved to Trash can
@OtávioBarreto 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
 
$.ajax({
  url: 'http://link.com',
  dataType: 'JSONP',
  type: 'GET',
  async: false,
  crossDomain: true,
  success: function () { },
  failure: function () { },
  complete: function (data) {
    if (data.readyState == '4' && data.status == '200') {
      console.warn({ Status: 'SUCCESS' })

    }
    else {
      console.warn({ Status: 'FAIL' })
    }
  }
});
also a alternative
 
yeah, whatever suits you. I hope our local jQuery rep will not be angry at me for proposing vanilla JS :)
(totally not looking at @Kevin)
 
well jquery is also vanilla, it just make faster to write but in essence it's vanilla
 
ABC
3:55 AM
@OtávioBarreto Sir
 
4:41 AM
@OtávioBarreto You are essentially saying that all js that runs in browser is ultimately vanilla, including those Unreal games and on-the-fly translated jsx code. When we say vanilla js we mean the js does not depend on frameworks. jQuery itself is vanilla, but code that use jQuery are not.
And while many common parts of jQuery is a thin wrapper over vanilla, ajax is arguable not one of those. The xhr object is faked, not native, and there are many jq processing done.
 
5:31 AM
How do I solve this issue with TypeScript? I certainly know that the only values m can be, are the ones in the map, because they are equal to the ones in the regex selection. How can I tell TypeScript that it is that way? typescriptlang.org/play/#code/…
I also tried wrapping that with an if (map.hasOwnProperty(m)) hoping TS would understand that in that case m has to be a key of the map but to no avail either.
 
wat
 
Maybe what I am doing is just plain stupid as well, I don't know :D
 
interface encodings {
     [key: string]: string
}

const map:encodings = {
    '&': '&',
    '<': '&lt;',
    '>': '&gt;',
    '"': '&quot;',
    "'": '&apos;',
};
 
ooooh!
Yup, that works! Thanks a bunch :)
 
Yeah np
Just got into TS myself a few months back and had to do dynamic object properties
good luck!
 
5:46 AM
Thanks ^^
 
6:27 AM
is there not a smarter way to encode characters?
I'd think there'd be some sort of native support for that
 
6:37 AM
There doesn't seem to be for HTML in node. With DOM support you could create an HTML node set the html and get the innerText or something but that doesn't work for React Native
 
well not even for say, encoding in a URL?
if you put an ampersand in a URL and then use the encoded URL, then I'd think it would turn & to &amp;
 
The code I got here that I need to rebuild first turns & to &amp; and after that turns it to %26amp%3B
 
well I mean it's gotta perform two steps for sure
or you could just directly encode & as %26amp%3B
but it's probably preferable to let native support do the second step if you have it available
 
Hey, I am currently not here to optimize, just to get this working :D
What do you mean with the one step option though?
Oh, just directly replace it with that, yeah, fair
But I am just using encodeUriComponent for the second step, so I really don't mind. And with &amp; and the others, it's more clear what that step is for, imo
 
that only works if the whole %26 stuff applies to only the characters you swap
could get very complicated, which is why even if you're 95% sure of how it works, you should probably just refer to the native call to do it for you
even if it means doing it the less optimal way
in other words, if anything, you convert to &amp; and you let the call do its magic to turn it into %26amp%3B rather than just convert & to %26amp%3B
 
6:57 AM
ywans
 
same
Sidenote: I hate JS
See, my Job got an Address. Address has a method prettyPrint. When I click on a button in my app, it refreshes the Address based on the current location of the phone, creates an Address object (which should have said prettyPrint method, mind you) and assigns it to the job.address field.
When I now go ahead and try to call this.props.job.address.prettyPrint() I get told that prettyPrint() is undefined... Why?
 
7:17 AM
@geisterfurz007 presumably your assumption that "Address has a method prettyPrint" is wrong in some sense
though I couldn't tell you why
did you define the object or the class?
 
If I print the constructor name of that field, I get Object. If I use an Address object within the same class, I get Address
The class
 
ok well do other methods exist in the same space you've defined prettyPrint?
 
no there are no other methods or no, the methods exist but not when you need to call prettyPrint?
 
No, there are no other methods named prettyPrint in my entire project
I think for some reason at some point my nice and cute Address object is being turned into a not so nice and not so cute plain old object
But I don't understand why :/
 
7:22 AM
no, I meant are there other methods other than prettyPrint which are defined together with prettyPrint?
Because you could check if somehow that method exists and prettyPrint doesn't when you try to call it
 
Oh! Sorry, no there are not; let me try that!
 
I'm guessing other methods wouldn't work either
that would imply that your definition isn't carrying over for some reason
 
Yeah nope, that method is gone as well
That's what I meant. The this.props.job.address.constructor.name is Object and not Address
Is there any sensible reason why that would happen?
 
hmm, this probably goes over my head a little bit, but maybe address is just an object, and not an actual instance of Address as you'd expect
does it have the other data properties?
I mean is it just an empty object or does it have something?
 
No, the data is in there (street, city and stuff) just not the methods
Could it be that mobx eats them for whatever reason?
Oh
Hang on, I think I got it!
Yeah, I am pretty sure that's it. The problem isn't in between the getting the address and displaying it. The problem is when I load it from storage because I just parse the JSON and not make them class instances!
 
7:34 AM
@geisterfurz007 This method may help: Object.setPrototypeOf
 
Is that really a good idea? I don't trust stuff that fiddles with prototypes. I know that that is what is going on under the hood of the new class syntax but I'd rather not touch that "low level" basically if you understand what I mean
 
https://dotnetfiddle.net/

i've been triyng to conver this long number to datetime in above fiddler but still unsuccessful.

where this website succesfully converts this long number to date time https://www.epochconverter.com/
9223372036854775807
 
@geisterfurz007 It kind of depends on what is good. And no it is generally bad idea. Restoring prototype chain after loading data is one of the few ways where I would tolerate it.
 
Does it work recursively? So if I got my Job which contains an Address, can I set the prototype for the job and the one for the address is set as well? Probably not, no?
tbf, it doesn't matter, Job doesn't have any instance methods in my case, but still asking for curiosity
 
Each object has their own prototype, so you need to process all of them - whether you do it property by copying props to new objects or take the quick and dirty shortcut.
 
7:45 AM
hey sheepy
 
Hi Karel~ has it been a long time?
 
tbf in that case I found something with Object.assign(new Something(), json) but I will try the dirty hack then ^^
 
yes sheep!
yours lamb is not a baby anymore, normally seen.
must have been at least a year
 
Yes! Now in kindergarden. Just started school. Everyday I wake him up and he'd say "I don't want to go to school." :(
@geisterfurz007 That assign actually looks pretty good XD Good luck in it.
 
@geisterfurz007 using setPrototypeOf is kinda controversial because many does not understand the risks with it.
from a quick glance of yours issue, I think that you could use Object.create
 
7:53 AM
So many methods :D
 
it is a lengthy document but try to understand it. Then you can use it to solve your problem
 
There is also the spread syntax which I prefer! let data = { new Something(), ... json }
 
@geisterfurz007 js has still less methods than the Java API
it is true that there are methods that appears doing the same thing, but the difference is mostly subtle
 
But js definitely has more ways to skin this cat than Java.
 
eh. I was thinking at the means to get a substring from a given string. There are three native string functions that allows you to do that
 
7:57 AM
I found this thread here: stackoverflow.com/questions/22885995/… And all of that looks a bunch more complicated 🤔
 
The fact that it is a TypeScript question may have something to do with the complication.
 
Not really, I think. TS doesn't complain about anything because JSON.parse returns T and it just assumes that I know what I am doing which is clearly not the case. But it should only be the "JavaScript part" of TS now that is the issue I think.
 
@geisterfurz007 JSON.parse does not return T
It returns any.
 
Oh, or that, yah
sorry
 
Just when I thought I finally caught up with React, everyone has already moved onto TS...
 
8:05 AM
@MadaraUchiha The part with the "assumes that I know what I am doing" still applies though :D
 
Madara, does TS have a sorta descriptor so that when a JSON string is given, it can be converted to a structure of known type objects?
something you see in java/C#
 
Ok, so I read a bit of that now @KarelG. So I would Object.create(Address.prototype, JSON.parse(json));
?
No. No I would not.
 
@geisterfurz007 It depends on how your objects are designed. If they depends on constructor, instead of prototype, then you may be better off with object.assign or spread.
 
8:20 AM
They don't depend on the constructor; I was just using that to check why the prettyPrint method wasn't there.
But for Object.create I need this properties object in the back there to tell what stuff should exist and what stuff shouldn't, no?
 
The problem with Object.create is that it expects a properties object, the same that you pass in to setProperties, which is pretty different from "the source to copy properties from".
 
Yeah, exactly
 
Can you combine them? Object.assign( Object.create( Address.prototype ), JSON.parse( json ) )
 
Do I have to though? Isn't new Address() simpler to read and the same as Object.create(Address.prototype)?
 
@KarelG Cast
 
8:27 AM
Is that actually a conversion though or just a change in type for TS only (not for anything during runtime)?
 
@geisterfurz007 All TypeScript types are in compile time only
 
Fair, but that's not what I meant. I meant does the cast compile to anything in JS that does prototype conversion (or whatever that would be properly called)?
 
@geisterfurz007 No.
 
Ok, thanks ^^
 
@Sheepy You can, but it will not have any type-wise bearing on Address.prototype.
 
8:30 AM
Invalid attempt to spead non-iterable instance
I just don't want to do this anymore
 
?
What are you trying to do?
 
Each moment you get something done, this rubbish puts another brick in the way ._.
not to cry, currently :)
 
@geisterfurz007 Yeah, but each brick it puts in your way is generally a bug saved later on..
 
I am loading stored information from the React Native AsyncStorage and have to convert it to an Address object so I get access to the instance method of it. Alternatively which might just be the way I will be using here though, I will change that instance method to a static method so I just put the objects in there so I don't have to do all this junk.
 
Ultimately, unless we see your code (and do the work for you), it'll be up to you to find which of the many proposed method/syntax works...
 
8:34 AM
Yeah, no ^^ I am just ranting. You already helped quite a bunch, thanks! :D
 
I want to rant too. Why we still can't get cpu core count through JavaScript... and I am not sure whether I should be offended when Chrome insists that my code is minified.
It can't even list my dynamic sub-workers created from code blobs. So I have to use Firefox. I love you, Firefox.
 
@Sheepy To stop malicious scripts profiling, the same reason you can't get the total RAM, or disk space etc
I can't think of any case where you'd need that info
 
To know if it's worth trying to mine cryptocurrency on the device :P
 
No it's not worth it. Certainly not with js.
It seems to be a bit weirder than usual security restrictions. My page spawn a controller, which spawns a number of workers. Both controller and workers are created from code blobs. Chrome fails to jump to the correct worker line in debugger (e.g. through Error stacktrace), and in performance profile I can only see the controller thread, no workers. However everything is fine on Firefox, so I can profile and optimise for Firefox. lol.
 
8:52 AM
@geisterfurz007 sneaking crypto mining with js does exist
 
Yes. And if you try that in 2019 your site will be blocked.
 
indeed it does - and frankly if you have a system that is popular enough doesnt matter how inefficient JS is at doing it a million in efficient machines mining for free is still worth it
 
This is why they were buying library ownership and slip code into those. If a popular site is good, many popular sites is even better!
 
note to the wise, dont try and work from a hospital waiting room chair - they are super uncomfy!!
 
@Sheepy if it gets noticed ...
 
9:02 AM
@KarelG just add it as an obscure clause in the T&Cs of the site
 
I recall a site doing that yes. Went "lol"
 
Let's pretend that the Internet is nice. Optimism is good to health. Make you live longer. (And when you are optimistic, you'd think that is good.)
Hey, anyone tried TabNine? Pretty amazing.
 
had a beta invite, haven't used it yet
 
looks like there is a lot of strength in it, however when it goes wrong i suspect it will be a pain in the back side?
 
> Enabling TabNine Cloud sends your code to TabNine servers to provide GPU-accelerated completions. Your code is deleted from our servers after your query is fulfilled.
Yeah I don't trust that lmao
 
9:16 AM
There is a local version now where you can opt-out of data upload.
That's also when I started trying it lol.
 
lmao it's completely broken my autocomplete
 
Well, I'd say you won't miss much by not trying it. Just an insteresting experience. Most helpful when filling loops and conditions. My coding style may hurts it somewhat.
 
9:38 AM
@Sheepy it uploads segments of your codebase to their server to feed their ML
so. no. Also blocked its server domains from my current work network
 
Looks like they changed how it works, because sending was the default too when I tried it:
"By default, TabNine makes web requests only for ... downloading updates and validating registration keys. In this case your code is not sent anywhere ... You may opt in to TabNine Cloud, which ..."
 
yeah it's disabled by default
 
best to monitor your network traffic
there are projects I'm working on that has to be kept internal at all costs, it even has to be en/de-crypted each time the laptop is being booted/shut down
 
Wow. Yeah better be safe in that case. Mine are not so top secret. The most valuable one, which only sits on client's server, has just been locked by ransomware. It is still very valuable - to the ransomer.
 
9:55 AM
😅
had a client that has "lost" his server because he forgot to pay the bills for some months. Apparently the mail notification got sent to an IT'er of that small company, but he has left it and got replaced. So the delivery address is not valid anymore.
 
Happens a lot. Even Sony let that happen to a game server once.
 
Potentially stupid question... I am trying to convert an image file to an arrayBuffer in React Native. The only solution I found so far that was supposed to work was to read the file to a base64 string, convert that to a dataurl, use fetch to request that URL and call arrayBuffer() on the response. Is there anything else because the fetch always straight up fails without any further comment. Only thing I get is "network request failed".
I checked the data URL and it properly shows the image in the browser when I paste it in firefox.
I can also do the fetch(...).then(response => response.arrayBuffer()) thing in the browser console so I am quite clueless as to why it doesn't work on the phone
 
That refers to the body though when sending data
I am just using that hack to get the arrayBuffer out of it
 
._.
what do you want to do with the image?
 
10:03 AM
I have to convert it to a hexstring because that is what the shitty backend wants
 
seems that you were doing a barrel roll first before doing something useful
ah image uploads?
 
That appears to be the case the more and more I get into this thing, yes.
Well, kinda but also no.
The backend wants an XML string that has to contain said hexstring
 
Is that file on local or fetched from network?
 
that file is on the phone
 
Ok. Problem seems to be that react-native-fs support only base64 for binary files.
 
10:06 AM
I am mostly trying to replicate what the original Objective-C code is doing because I have 0 knowledge of the backend and what stuff you can do, so I have to rely on the code I got. And in that code the image is converted to a byte array which is then converted to that hexstring and that is put into a CDATA tag in the XML.
 
I googled "js base64 to hex" and I got this answer: stackoverflow.com/a/55910865/893578
 
I found this and that is what I tried to use but I just get "network request failed" stackoverflow.com/a/50046159/6707985
 
@geisterfurz007 are you using Uint8Array along the way?
 
Not yet. As I cannot even get the image to any blob form, I didn't have the chance to try out how I would go from there. But currently the idea is to use a DataView around the ArrayBuffer and getInt8 for as long as I can.
@Sheepy I don't have access to a class called Buffer unless I am missing something :/
 
it is best to consult @BenjaminGruenbaum for this. He's more experienced with it. But I think that reading this would be beneficial for you
a blob to hex string is just a PITA initially
 
10:10 AM
@geisterfurz007 Wow. I thought Buffer is provided by js engine. There is a buffer on npm but it is a polyfill, not high performance native code. Yeah I guess you are stuck with inefficient conversions. Cost of react-native.
 
I am going to write this framework into the mud in my bachelor thesis...
 
You can write your own base64 to hex conversion if you're unhappy with existing solutions. A good exercise. Good luck!
 
don't forget to mention that the backend is awkward (use a proper definition) in your thesis
I would fix the problem at backend myself if the silly decides that it has to be xml + hex coded string. Really?
 
I will have a talk with a coworker who is overseeing my bachelor thesis to see if I am writing my own one or not (because it's known that the prof likes REST in his apps).
 
@KarelG Nay. That just imply that you are too lazy to do it the Right Way which is to roll your own backend. Remember TeX, Bugzilla, Git, and many more.
 
10:14 AM
The backend is some kind of form-server here. It's basically just abused to get data from outside the network to the inside because it can basically push the received data to anywhere (file on some share, database, as email to certain people, etc).
So nothing I can fix, not even close to a chance :D
 
10:28 AM
Hello, we are facing a problem where our web application stops working at night.
 
@zegulas 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.
 
its made in loopback2
 
if you don't make that mention in your thesis, the reader might think that you don't have problems with it
when mentioning it, just give out reasons so that they see that you have remarks on it and investigated on it to propose solutions.
(and makes yours thesis a page more long :P )
 
@zegulas does it throw an error or anything?
 
@zegulas just formulate yours question. Any error codes? Logs?
unable to restart the service?
 
10:30 AM
we are tracing for cpu spike, database spike, but none are there
no error
just the api stops working
no response all are getting timed out
 
how do you fix it?
 
basically how do we find the root cause in production
restarting pm2 does the job
that is how we are fixing it right now
 
sounds like it might be getting stuck in a loop somewhere
 
oh ok, we will check for that too
 
what ever it is, it is blocking all requests/input from being dealt with
 
10:32 AM
how do you guys do the tracing on production, what tools help for what purpose, if you can just name a few, we might give them a try
 
is it the same call that fails? or is a specific one that fails thats only run first thing in the morning?
 
May be there is a device, such as a wifi router, that sleeps at night?
 
no particular call as such,
 
logging with relevant log levels is usually the quickest and easier
@Sheepy has potential
 
@zegulas monitoring
there are plenty tools to monitor data and write it away to the same server or another server (dedicated for monitoring data) so that you can analyze spikes, traffic requests and ect
you can ofc keep logs all the way but it is not useful because it is a point in the time while monitoring gives you a means to plot it as a graph and find trends
and logs may contain noise.
was going to click that @Sheepy :|
 
10:39 AM
Bugs. Happens when I am doing two tasks at the same time. :p
 
I copied one of the solutions in the same thread that contained the Buffer.from thingy. The request to the backend gave me a 200, so now it's to see whether I receive the mail or not.
But thanks a bunch for your effort :)
You really helped preserve my sanity for another day today :D
Turns out I do not get an email. Would be great to know why but I also don't get any errors.
I like this backend.
 
silencing errors meh
i can understand that it gets silenced in production (which is what we do) but for dev?
 
@geisterfurz007 Ok, this one should be good... paste.ofcode.org/C8FydBs67XG4cR2WW5Stss
 
@KarelG I assume that there is something in the logs of the formserver but I don't have access to them.
heh, your code appears to work better 😀 Mine said the same but with an added NaN in the end :D.
Thanks a bunch Sheepy!
 
10:57 AM
@Sheepy is it different to .atob?
I meant btoa
 
seriously.. who named those to functions?
 
@geisterfurz007 a team of collaborators behind the specs?
 
Why the fuck would you name something a to b and b to a?
 
But it has been improved througout the years by allowing the community to discuss about any new/existing/running proposals
 
Is it ascii to binary and binary to ascii?
 
11:01 AM
yes
 
Why not decodeBase64 and encodeBase64? Because that would be easy to remember, I see
Oh, no. I am starting to rant again; sorry
 
because "binary" can be have their own representations?
 
@KarelG It outputs to hex string instead of binary.
 
which can be decoded from base64 and encoded to base 64, yes.
Heh. My ESLint complains about the use of bitshifting 😀
 
Here is an optimised version which I hope will run faster. Yes I quite like optimising little code.
https://paste.ofcode.org/qXjUaej55rVDBgmypzfJTa
 
11:05 AM
I literally don't understand anything of that code :D
 
Let's just say I don't get along well with ESLint... XD
 
Will you look at that! I actually do get a message from the Server. In a CODE 200 RESPONSE WELL THANK YOU GOOD BACKEND I LOVE YOU TOO!
And now my coworkers are back from lunchbreak so I cannot throw stuff around anymore.
 
A good exercise, like I said :) The first version should be easier to understand, I'll admit that XD
 
I DID IT
I GOT THE EMAIL
WITH THE IMAGE
HOLY SHIT!!!!!
Sheepy I love you so much :)
 
Congrat :)
I google a base64 decode loop and rewrote the output to hex. And may be optimised it a tiny little bit.
 
11:17 AM
I bet it would have been but considering that I have quite some stuff in front of me until the app is done and I also have to write it in flutter as well (most stuff isn't done, only the request is missing) and I also need to do testing for both apps and write a 15 page report for the whole thing until somewhere mid october I don't have time for that currently, I am afraid :/
 
Yeah. Should pre-calculate the indexOf result too. Must be a bottleneck after the output concat...
 
use an object (Map)
 
I am thinking about an Array with charCode as index.
Going off, see you some other time!
 
11:39 AM
Cya and thanks for the incredible help!
 
hey does anyone know if you can reference a variable name inside an input?
 
@TaylorSpark Do we need the rabbit hole or are you going to explain what you actually mean?
 
Im trying to "re create" a custom console app for my project, and I already made the console using incrementors and decrementors and such.
@BenFortune I want to be able to write a variables name in an input
and have it output the variables value
but also be able to use strings like normal.. Is this possible?
as seen here, Im using increment and decrement, plus a little regex to make a console app codepen.io/SkylerSpark/pen/rNBdJBx
Its finished, but for bonus, I want to allow it to output variable values.
oops... Did I write an essay again...
 
Give us an example, what do you mean by "write a variables name in an input"?
 
he probably meant
 
11:45 AM
How is that variable assigned?
 
var foo = 1;
and in input type=text write "foo"
on enter (or button click) display 1
 
KarelG
so just using "" Quotes in an input will render a variable?
 
There is a bug in that codepen
 
Codepen has lots of bugs
 
When you go back, it doesn't add a new line the next time you log something
 
11:50 AM
but its the only web development site I can access at school.
@geisterfurz007 it does for me
 
Oh wait, I see
Well Im not the best at regex, so im not sure how to fix that
 
00:00 - 12:0012:00 - 22:00

« first day (3253 days earlier)      last day (1681 days later) »