« first day (2601 days earlier)      last day (2571 days later) » 

10:00
@OliverSalzburg it is just a nested collection ...
@KarelG I was merely pointing out how ridiculous the request sounded
I was only commenting on
> Menus are a big deal
But no problem is too small for overengineering
I should have been specific. Sorry
Dynamic Role Based menu and submenu In MVC any source code?
10:02
Aah, for overengineering, you can look at @towc
Seriously.
overengineer, at your service
@IvinRaj yo, try the other text input, the one that invokes google.
@IvinRaj do you read at the other comments?
10:03
Can't we kill kick him?
@towc make a most complex way to have 1 + 1 with using only binary operators.
@OliverSalzburg third times a charm I guess...? :)
that is fairly simple to do with a binary operator tho. It is just 1 << 1
clearly the most maintainable and responsible way to do it is to write an LC program that takes the binary ascii data from the numbers, converts them into surreals, and does the operation that way, and does the conversion back. You also need to implement an LC parser
I "pretended" to be drunk yesterday and asked people in the bar about LC
Boy I do hope LC stands for Legit Calculator
10:06
no positive replies :/
LiteCoin?
Logic Compliant!
And why would you pretend to be drunk instead of getting drunk?
you've both been here long enough to know what I'm talking about :/
λ-calculus?
> converts them into surreals
lol
10:07
ג-calculus
!!> 1 << 1 | 1
@KarelG 3
1 + 1 + 1
:)
@KarelG you wouldn't want Infinity + 1 to return Infinity, would you? :/
you can do such thing too with 1 + 1 + 1 + 1 +1 +1
just comprehend binary operators
10:08
@KarelG 1*2+1
5 mins ago, by KarelG
@towc make a most complex way to have 1 + 1 with using only binary operators.
@Wietlol ^--
Surreal numbers!
1 + 1 = 1 * 2 = 1 << 1
I see 7 7 5 7 8 6 9 4 3 1 2 1 9 6 0 in that image
Where is 0?
10:10
@KamilSolecki jokes on you, surreal numbers are a real thing :P
@towc yeah I know :D
@KamilSolecki where isn't 0? :P
0 is the viewer
0 is the critic
/r/mathPuns
@KamilSolecki the last 4 digits, 1 9 6 0 are part of his signature 😉
Ooh there
Nice
Crap 3% battery in phone
And I haven't finished my coffee yet
10:13
blow it up
what is the best thing to do about a serial crap-answerer, other than downvote them? there's someone who keeps answering javascript related questions with answers that are just completely wrong, miss the point, don't work, and often have a spam signature for his website at the end. is it just a case of downvoting and flagging, or is there any way of voting to get someone suspended from answering until they just decide on their own to stop answering?
@KamilSolecki Time to buy a new phone!
I went through the guy's answers out of curiosity and they were all awful, so I downvoted them all, but then a script undownvoted them all at 3am, I assume because they thought I was bullying. Which I wasn't. Or targeting, which I kinda was
@KarelG no sir
@MattFletcher If he is spamming, flag and provide that as a reason
10:20
The math goes off if the battery level is low tho
@MadaraUchiha me and copy implemented it ~4 years ago I think
The spamming seems to have ceased recently, but the whole answering when you don't know the answer continues
@MattFletcher A lot of people do that on SO
And SE in general
@KarelG for another 41 min.
Read
10:22
"another 48 min of use" vs "another 41 min" in ultra mode
Yeah, but it's another another!
Another from another mother
error. not clear. Phone died.
meh, I have a powerbank as backup
covered with leather :3
and a LED flash light as "accessory" lol
Like a tiny electric cow
hah @ the location of the plug
I bet they use the same mold for a pig variant
10:31
You have to mail someone if you want to buy one 😐
offer to build them a web store in exchange for a life time supply of energy cows
suggest that to towc
nothing wrong with that
@towc You should wear a cow T while working on it
my maths teacher in middle school had a thing for cows
I'm with zirak on the animal thing
10:44
@towc What's that?
goats :3
Oh. I thought the "animal thing" was some kind of animal racism and you agree that all animals should die
the fact that you think I was capable of thinking that is concerning
tbf I don't know what I think anymore
@towc You never know what kind of crazy reasoning people come up
that reminds me of a quiz yesterday. One of the participants is a politician from "Groen", a green party, aimed for social and environment friendly community. He said "from a green book, avoid online shopping" because it leads to a big impact on the environment
ya know the oversized packing and transporting it
10:53
guys
@OliverSalzburg nah, I just fell asleep with it in hand today and didn't charge
has anyone found docker-compose on Docker for Mac buggy?
Then someone asked : "What if you need something that you need, but is only available in Germany?"
He said "I will go to there then"
Very simple mysql to djangto connection doesn't work
irony ++
10:54
but the same compose file works on Ubuntu
@KarelG why would reality have any impact on ones ideology
can anyone please help me with this
https://stackoverflow.com/questions/47524870/ionic-2-ios-app-stuck-on-splashscreen-on-app-restart
I am really stuck here since 2 days
can't find anything helpful on google
:(
@KarelG also, I really like the unsaid implication, that people, who are do willing to tell others what to do, can actually afford to go to a different country on a whim
those were probably the same type of people, who thought, that "needing a visa to go to a different country" was a strong argument ... they did not understand, that the people, who were their opponents, have not had a vacation in 3 years and have not been abroad for 10 or more
11:24
@KamilSolecki Yeah, well, charging it might work as an alternative, I guess
@KarelG That's why I shop all my items by driving my SUV to the store down the road
depends of the location
One of our politicians OK'd the use of glyphosat in the EU for pest control and that is apparently known to cause cancer. He now says that we need it for the environment
That is also a very special kind of logic
Really stupid question: I want to store a master copy of a JSON (data extracted from MySQL database). Currently, when storing in a master variable in $scope it stores a reference to original variable meaning that when I press "Cancel" on my form and the data is changed then those changes are reflected on refresh... Any ideas how to help?
@JustCarty Make a copy
My nearby local store is too far to go by foot. So I use my car. It is hard to use my bicycle. If by foot, I could wear a bag. But not with bicycle...
11:27
@OliverSalzburg $scope.master.user = $scope.user;
even seen someone trying to move with a 12x1l pack of milk with a bicycle? right
but when accessing $scope.master.user it is the exact value of $scope.user
@JustCarty That's not a copy
this is oddly satisfying
Okay, thanks you fixed the problem :P
(I told you it was a silly question;))
11:30
You're welcome :D
@OliverSalzburg Let's pretend I gave you a +15 rep bonus for answering the question correctly
wtf, I thought BTC was supposed to crash once it hits 10k?!
@JustCarty Agreed
Also, what is up with the prices here bitcoinwisdom.com/markets/bitcoinde/btceur?
I do not understand those high/lows
@xopoc ping
11:47
New EC2 instances and hibernation. Like!
And run-instances has --market now to request spot instances. Neat
haha....!
@AbidRaza Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
Anyone with ionic 2 experience?
Aw, nice. I got an error corrected on regular-expressions.info.
12:01
I want to make ajax requests faster. So I need to enable .gzip compression. Any clue where should I start?
@Shafizadeh read about how to configure (it's something you set in webserver's config, not in php or js )
Finally science comes up with something useful. http://www.valleynewslive.com/content/news/Scientists-call-for-ban-on-glitter-say-its-a-global-hazard-460587853.html
also, in general the compression for ajax calls will not actually make it faster
@tereško I need to modify something into apache2.conf, right?
they should ban plastics in toothpastes too
but yeah, lobbyists ...
12:08
I was trying to insert JSON object in a table body section with reference from encodedna.com/javascript/… this site and I am always getting XSS. You can view the code here paste.ofcode.org/FcLC2axDrmjjyAWmFL4Zwx
@tereško how can I make an ajax request faster? my website is slow
it's one of those "it depends" questions
on what?
the php script on the server side executes fast
but the slow part is into transfering the data
on what is actually slowing it all down
if the network is slow, you cannot do much on that
12:10
is it transfer or TTFB ?
it really depends of the user's location
I don't know what's TTFB
time to first bit - as in, how much it takes for server to start sending something back
@KarelG I use CDN
@tereško hmm, I don't know, I didn't check this yet
you can see TTFB in network tab of your dev tools/inspector
so, it looks like your PHP code actually takes 1.1s to start sending something back
the transfer time is 2ms (compression wont help here)
I see
does it mean the php code is slow?
probably
add some benchmarking code and send data about it back in headers
another request ^
@tereško yes the query is slow
then you need to improve the query
12:17
It is not possible
or add a "progress indicator", to make it feel a bit faster
Actually I need to make a good search engine
@tereško to make that I need to use node.js?
@tereško these are just icons
12:18
I like to make a progress bar which will be fill based on the result response
no
use one of these instead
its 1-2 seconds, you don't need a real progress bar
@Shafizadeh How would that work if you don't know when it completes?
@OliverSalzburg that's the problem
@tereško maybe
anyway, how can I improve this query:
SELECT x.user_id, x.name, x.avatar, x.date_time,
       SUBSTRING_INDEX(x.vv_s,',', 1) as vote_value,
       SUBSTRING_INDEX(x.vv_s,',', -1) as score,
       x.tc as tc,
       x.tt as tt
 FROM ( SELECT u.id user_id,
               CONCAT(u.user_fname, ' ', u.user_lname) name,
               u.avatar,
               u.date_time,
               user_repo(u.id, '$range') as vv_s,
               user_top_tags(u.id, '$range', 2) as tt,
               user_top_categories(u.id, '$range', 1) as tc
        FROM users u
@Shafizadeh Start by properly indenting it
Then use ANALYZE
That's better :D
Why do people use such shitty aliases in SQL?
^ that, everywhere, by everyone
12:22
They don't look shitty to me
@Shafizadeh That's the problem! :D
vv_s means "vote_value_<a word starts with s>"
Either way, use ANALYZE to check where the time is spent. Then ignore that and just cache the result :P
@Shafizadeh If you need to explain it, it's shitty
A good variable explains itself
ok one thing
is being slow because of this: my database is on the server, and my php codes are on my local
??
not likely
12:24
@Shafizadeh Possibly
Asking us these questions will get you nowhere. If you want to find out, start looking
Run the query directly in some SQL GUI and see how fast it performs
since the backend is PHP, you should sprinkle microtime() around
Then measure how fast your PHP code executes it
Then measure how long it takes to serialize your data to JSON
And so on
and, yes, try running that query from SQL client and see what time it takes to execute
12:27
@tereško I use it sometimes when I want to do a benchmark
@tereško in the client, the whole proccess takes 0.3 sec (which is acceptable to me)
and how long it takes in PHP?
it should be around 0.4 to 0.6 (since the DB server is remote)
@tereško I said the whole proccess takes 0.3, so php part should be less than that number
TTFB was 1.2s
If you don't like your 0.65s HTTP response time, then 0.3s for the SQL response can not be acceptable
@tereško nope, when every thing is local it takes 0.3
@tereško in this case, db is remote
12:29
15 mins ago, by Shafizadeh
user image
51 secs ago, by tereško
TTFB was 1.2s
@tereško yes, that's exactly why I'm doubt the problem is because of using db through remote
> First, let's look what's happening at a high level. When a user (or attacker) attempts to log into an account that is not currently enabled (i.e. root), the system will create that account with whatever password the user specifies...even if that password is blank. This is why to perform this attack via the UI, you have to click on 'Unlock' twice:
That's amazing
Why would it do that lol
If you're connecting to a remote DB, of course it's going to introduce another delay
@Cereal Also, how does it create an account that already exists
* glups * a LIKE CONCAT(?,'%') twice ??
@OliverSalzburg It said enabled, not created
I haven't finished reading the article
12:36
Building a webapp for a kind of a game. Something like goosechase.com. Action happens IRL, the app is for submitting photos and reviewing them. Need a little help deciding on separation of "playing" and "managing" events. Users can create events or participate in events. An event has a mission list with various settings.

I will use Vue.js for frontend. I can't decide if I should make a single app for playing and managing, or two separate ones. Any recommendations on this matter?
The API should provide endpoints for both, so it doesn't really matter if you split it into different front ends or not, no?
@Cereal It said "the system will create that account"
And before that it says "an account that is not currently enabled"
Which would imply that the account exists before an attempt is made to create it
Oh you're right
I keep getting pulled off from reading, so I don't know what it's doing
Hello everyone,
Im starting with javascript and im doing a hangman game and I did a prompt to insert the word to guess, afterwords I do a click event to insert a letter. IF matches i print the letter in green in the result and ELSE I print a red letter and appears the head of the hangman, my question is HOW I KEEP GOING? How i print the second image (head and body) if the mistakes guessing keep goin? With if if?
@fran Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
12:40
@Cereal Well, the article is definitely looking like good analysis
weird. Co-worker asks me to investigate something. A backend API instance has an unit test which is 100% success. But when sending '51', it responds with "For x, a value between 0 and 100 is expected". Either unit test is fucked up or someone jeopardized the endpoint.
@KarelG Try sending 51 instead of '51'
Hello everyone,
Im starting with javascript and im doing a hangman game and I did a prompt to insert the word to guess, afterwords I do a click event to insert a letter. IF matches i print the letter in green in the result and ELSE I print a red letter and appears the head of the hangman, my question is HOW I KEEP GOING? How i print the second image (head and body) if the mistakes guessing keep goin? With if if?
@fran You just said that
Sorry oliver mistake
anyway, is a simple question im starting with this can you gimme little help plzzz :)
12:47
@fran You need to use a loop
// GLOBAL VARIABLES
var start = document.getElementsByTagName('div')[3];
var result = document.getElementsByTagName('div')[2];
var imagen = document.getElementById('imagen');

//I PICK WORD
var wordComputer = prompt('INTRODUCE A WORD');
var wc = wordComputer.split('');
console.log(wc);

start.addEventListener('mouseenter', function(){
//PLAYER PICK LETTER
var wordPlayer = prompt('INTRODUCE YOUR LETTER');
var wp = wordPlayer.split('');
if (wp[0] === wc[0] || wp[0] === wc[1] || wp[0] === wc[2] || wp[0] === wc[3] || wp[0] === wc[4] || wp[0] === wc[5] || wp[0] === wc[6] || wp[0] === wc[7]) {
@Cereal I haven't decided about backend either, whether it should be two APIs or one. Some logic will overlap between player and manager apps (both in front and back end), for example player score calculation, displaying current event status, etc. So it would make sense to make a single one. On the other hand, managing is about editing events and playing is about submitting answers, so keeping them separate could be cleaner.
a while loop right?
@Andrius Same data though. Sounds like two routes for 1 app
@Cereal Yeah, data is the same. I got this idea of separating admin/user apps from a large e-commerce app that I worked on a little bit as an intern. But maybe it only makes sense for a large app.
12:52
@OliverSalzburg there is a smart conversion to numeric if a numeric value is expected. Found the problem. the key name was not correct.
I think I'm leaning towards one API server. Still deciding about the frontend app(s) though.
@KarelG Is it the kind of smart that turns b33fc4c3 into a Number?
Well, you already found the problem, so yay :)
@Andrius I usually nest another app for admin pages in my apps. I don't know how you'd do that for javascript, but in ruby you essentially map /admin to another app entirely(in the same project)
So they're functionally the same app, but logically different
no. It works with pointers. If a method takes in a numeric argument, a check is done beforehand. If not numeric, convert. if success, call method. otherwise raise flag and return
Took me a while to develop that CRM backend 🤓. But now ... nobody wants to maintain or update it...
I assign related issues to a dev of my team to see it labeled as "cannot-do-it" after a couple of days
@KarelG Yeah, I know those kinds of checks, because I messed them up myself in the past :D
13:00
If I am away of this company, they're fucked up I assume :D
gotcha use that when I need a raise
I wrote systems like that. They still run
It is a mix of C++ and asm <.<
@Cereal are you talking about the API in this case? You mean that a different API is served on /admin than, say, /user_api ? Or are they related in some ways, like authentication?
@OliverSalzburg it has to be fast. Distributed system, thousands requests per minute, ect.
so wrote the most optimized code I could write at that moment
13:11
@KarelG Yeah, makes sense. But I can see how it would be hard to find someone to maintain it in the web world
13:24
Hey guys; I'm trying to add a method by ref in Vue.js
Something like :
this.$ref.item.addMethode(mymethod)
Anybody has an hint on how to do that ?
any thoughts on this?
@Wietlol That is an extremely popular data visualization library for JS
@KarelG What is? Also C++ and ASM :|
even the sound of it is dodgy
I've just began learning Vue, so don't know much, but maybe mixins would solve your problem?
https://stackoverflow.com/questions/32752527/how-to-add-methods-or-data-on-current-vue-instance
(it's an old question so it could be different now)
I was trying to insert JSON object in a table body section with reference from encodedna.com/javascript/… site and I am always getting XSS. You can view the code here paste.ofcode.org/FcLC2axDrmjjyAWmFL4Zwx
13:32
@Baldráni how do you mean?
vue uses the functions and data you provide as templates, that get used to generate new functions/objects that have been bound to other contexts/been replaced with setters/getters
so that might help you understand why simply doing someComponent.somethingNew = function() { ... } doesn't work, I'd think
@KendallFrey well I can't for the life of me figure out how to fucking align stuff in this sketch in onShape
it could by using proxies, but honestly it's not worth it, for performance/compatibility
if you need to add a new method, you're probably doing something wrong
@rlemon pic?
there are other ways to extend previously defined components
not very complex :D
13:37
I think just select both lines and make them coincident
How about that javascript amirite
@Heijmaaans Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
protip: if you drag the upper rectangle from the line, it should automatically connect them
okay, that aligns them on the lines
how would I get the top rect to align horizontally with the middle of the bottom?
One way would be to draw a line between the midpoints of the edges, and add a vertical constraint
13:41
ffs. onshape can do fillets, and tinkercad makes the rest easier
but tinkercad can't do measured fillets
I'm not sure if you can select midpoints to add a constraint directly, but you can also create points from the midpoints and add the constraint to those
so now I'm stuck trying to make this in two different programs
@rlemon How does tinkercad do it? Snap-to, or something?
tinkercad has auto alignment tools.
so I can align multiple parts relative to eachother.
OnShape does too, they just work differently
13:44
@towc @oboecat
In your case the part is mirror symmetric so I might even just do one side and mirror it as the last step
Why would the response of an AJAX request not be the same as what's shown in the Network tab?
Because you're looking at the wrong one
@Vap0r by ajax do you mean jQuery ajax?
I woke up thinking I lost my eye sight in one eye
13:49
@towc yes please tell me this is a bug
@KendallFrey I'm not
only to realize there was a mosquito stuck in b/w my eye lashes :|
I've been pulling my hair out
@OliverSalzburg I am smart enough to not delegate that kind of issues to web devs. I delegate it to backend engineers. But the code is - even documented - complex due of its distributed nature and using assembly here and there. They are also not so familiar with C++ like i am. They work mainly with C# / PHP / python / node.js.
what's the jQ look like?
@ShrekOverflow Nice, Trollland
13:49
there might be an option like "sanitize" that fucks things around
and how are they different exactly?
        $.post('/api/ShoppingCenterAPI/SaveShoppingCenter', postData, (response, status, xhr) => {
            if (!response || response === null) {
                return;
            }

            // WILEY: figure out what's going on here
            console.log("WHAT?", response);
            console.log("xhr", xhr);
     });
@KendallFrey Yep, they are valued permanent resident here.
also, learn not to use jQ for xhrs
@KendallFrey so here's the basic shape, all the dimensions are wrong tho
how can I alter those without guessing?
13:50
@KarelG People who work on backend on web applications are also "web devs" in my book
not in mine :P
like, I can drag lines, but it doesn't give me the inputs after laying down the part first time
@towc I agree. I've convinced them to let me drop jQuery for the next application we start, and to use an actual mocking/testing framework rather than jQuery mockjax
@Vap0r what happens and what do you expect to happen?
13:51
@rlemon
you're better than this, cmon :P
@KendallFrey danke
most useful constraint ever
oh, wait, if you're mocking on the client, ofc the network is going to be different
@towc ... well it's not supposed to be in place in production, but I never actually checked that the previous developer didn't set up the mock environment flags correctly :(
wait one sec that could be it
13:52
@towc Sry I was away. (Vue pb) The thing is I want to test a value to check if it is true or not (isMobile) and if not attach a new method to specifics elements
I'm sure there is multiple way of doing it
Like mounted + $refs I guess
why not add it regardless?
it might take even more performance away if you add them dynamically
@rlemon If you want to learn more, I could make a video showing how I'd make the part. I'm guessing you'd see something you never saw before.
Huum
:/
I could I guess do the check of is Mobil in the function...
what's the function supposed to do?
@towc nice guess but that wasn't it.... So back to what happens and what I expect to happen. Basically the network tab is "correct" in this instance. It returns the data I expect (updated data). The AJAX response (both jQuery's data object and XHR's data object [inside jquery]) has the old data contained within, which is weird
13:55
@towc nothing crazy, just a specific comportement on mobil (opening fancybox)
@Vap0r make an mcve to confirm it
then replace the jQuery thing with a proper xhr
if it works, you'll know there's something wrong with jQ or your configuration of it
@KendallFrey I'm still struggling getting them aligned on the y axis
if it doesn't work, you know you need to learn how to check the devtools, or fix your mcve code :P
vertical constraint
between midpoints or the origin or something
rlemon, do you know a good LED display for rpi model 3 B ?
13:57
@Baldráni and how are you calling it?
can you provide a jsfiddle or a codepen or pastebin?
@towc in this situation it feels like my employer is holding my arm and making me hit myself, and you're saying "stop hitting yourself"... but you're absolutely right it's probably a problem with our configuration or something
@KarelG I know of the one I use
ohh, onshape?
@Luggage I'm trying to beat it into lemon :P
@Vap0r well, give it a try
13:58
@towc aoutch i could try haha Its huge and call of a call of a parent :/
@Baldráni sounds like your whole setup is a mess :/
and you might want to rethink the whole thing
onshape is like redux for modeling... in a good way.
I really don't understand it
:(
it takes a few videos
like, even moving parts is giving me trouble.
13:59
@towc Im not sure; I just took the project but it was suppose to be done by a pro :/
I guess I'll ask a proper question on stack :) Ty for your time anyway !

« first day (2601 days earlier)      last day (2571 days later) »