« first day (2244 days earlier)      last day (2710 days later) » 

11:00 AM
"California Style Sheets: From Mess to a Clean Wipe"
 
I made selection sort algorithm simulation on codepen: codepen.io/reciosonny/pen/MbVbop
3
 
@SonnyRecio 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.
 
user3119231
@FilipDupanović nice. additional the result without flex: jsfiddle.net/qggm5mj7/7
 
@SonnyRecio <3<3<3
man, do something dope with anime-js.com, I need examples :D
 
@SonnyRecio Nice, doesn't work with values > 10 though
 
11:09 AM
@SonnyRecio I think I broke it.
 
user3119231
I too
 
huh, looks like a case of a skipped parseInt somewhere
yeap, works now snag.gy/wEiPKG.jpg
@SonnyRecio arr = txtArrayValue.value.split(',').map(x => parseInt(x, 10))
 
@SonnyRecio nice sim!
 
@Opentuned 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.
 
11:31 AM
hot dajum, sharp is fast sharp.dimens.io/en/stable/performance
 
That sorting pen is boring af. I figured out the ending pretty much from the get go and it just kept dragging it out
 
@OliverSalzburg you have some serious issues with progressions :\
I feel there'd be some serious 💣🔥🔥🔥 if he turned it into a loop
 
@littlepootis holu shit
 
11:48 AM
@Loktar "Free with Touch activation" how stupid is that, I want to download it now
 
@FilipDupanović Neat!
 
@FilipDupanović Yep, uses vips
 
@SonnyRecio Neat. I did bubble sort once: awal.js.org/alpg/?gist=5835518dd6122616f5543701ee895d4b. That's the only sorting algo I know :P
 
I just implemented a new image service in our stack using lwip :(
But, goddamnit, do I hate native modules
So I'm staying with lwip :P
 
user7029249
0
Q: change dropdown value & save in database - No record selected

abcdwe are displaying orders in custom orders.php page in www.1234.com/site6/orders.php I am trying to change status of each order from Paid to unpaid or returned or viceversa..... i can select required status & click on "submit" button & it displaying "NO record selected".... php function ...

 
12:02 PM
how can i trigger togglecheckbox() when pressing enter key in the input field. Please view this codepen. codepen.io/surajkhanal/pen/PbPGgJ?editors=1001
 
I can't wait to patch this baby in, I want to cry every time I have to start Webpack and resize 50mb of images into several sets
eavesdropping on Bosnians celebrating business: two tankers of oil and several trucks of spruce moved to Germany and none of them have money to pay for lunch ¯_(ツ)_/¯
 
@FilipDupanović "trucks of spruce" is that drug lingo?
 
12:25 PM
no, it's like the trees they illegally cut down from our rainforest :'(
 
Oh
There are Chinese Fidget Cube ripoffs on Amazon O__o
Original Fidget Cube: 20€, Chinese version: 5€
Should have gotten that amazing shit patented
 
I don't get them
 
12:42 PM
Me neither. I just like the phenomenon :P
 
I love some of the reviews
> Inferior quality and a violation of intellectual property.
Is it a violation if they didn't patent/copyright it?
 
I think if there's no patent, others are free to build it
I thought that was the whole point
Wikipedia says: "It's complicated"
 
@oliver could you help me plz?
 
@SurazKhanal What do you want? Money?
 
you're giving away money?
sign me up
 
12:50 PM
Well then! Good talk
 
no, how can i tick the checkbox and call the togglecheckbox() function . if you have time, please view this code pen codepen.io/surajkhanal/pen/PbPGgJ?editors=1001
 
@rlemon Yeah, I got a couple of sweet 500 INR notes to give away
@SurazKhanal I understand neither the question nor the problem
 
haha, ok i have one input field and one check box. i want to check the check box when i hit enter to input field.
 <label class="item item-input">
	    <input type="text" my-enter="success.first=!success.first || toggleCheckBox(success.first,values.first,0)" placeholder="In a word, what is important to you?" ng-model="values.first" ng-disabled="success.first">
	    <ion-checkbox ng-click="toggleCheckBox(success.first,values.first,0)"  ng-change="show2='true'" ng-model="success.first"
	           ng-disabled="!values.first" style="border: none;padding-left: 30px;" class="checkbox-royal"></ion-checkbox>
	  </label>
here how can i call the ng-click="toggleCheckBox(success.first,values.first,0)" to the directive my-enter
 
what's the use case for that?
(just curious)
 
1:09 PM
the amount of passwords you can farm from people sharing them is insane
try searching for config files on github
 
^--
it's already included in some dictionaries that I know of
why would the creators behind such tools not abuse this? :P
 
so i got a question. I have an empty div element to whom through js i append additional child elements (tag <p>). Now i need to be able to click on each individual p tag inside the div. I have done it in way that when i add a new p element i take all the p element and assign click listener on them
this seems bad cause everytime i add an element, after that i select all the p element and assign click to them
another way is that i make a click listener on div element and get child that way
but then i have to check if that div contains p elements because initially it is empty
whats the best approach to this ?
 
div.addEventListener('click', event => {
  if( event.target.tagName.toLowerCase() !== 'p' ) return;
  // handle the paragraph click.
});
 
slightly OT: You should use a focusable element like a button or maybe a link in the first place, so keyboard users can also interact with them
 
event.target in a container will give you the element that the click propagated from
 
1:24 PM
hi all
hey guys
which CMS is perfekt as backend for apps?
have you used such things already?
 
@PomeGranate what language are you looking for for the backend?
If Python is OK, try Django together with Django Rest Framework, using this as an app backend.
 
@PomeGranate wordpress
 
friendos, I don't know if you know wordpress => AFC (advanced custom fields)
Im looking for something like that
@SvenvandeScheur can you use Django and create "custom post/page" types?
 
bleh i'm a moron
thx @rlemon
 
custom objects/documents?
@rlemon do you know AFC?
 
1:34 PM
@FelipeAls message was aimed at me or?
 
I want an CMS where I can define my fields, and those fields are combined together as one "Object"
 
@PomeGranate yes, Django is a framework, but you really a CMS (you can add a CMS "app" like Django CMS if you want) but by design it's just an MV(C) framework.
This means you can create models and store objects in them en user various views/forms for those objects.
Django Rest Frameworks allow you to set up an REST api for these models.
Which can then be consume by your app.
 
yeah but its a framework, I don't want to write extra code
 
It will require you to write some code, for defining your models for instance (although it can "inspect" your existing db.
 
@Proxy Yep, instead of p (or as children of p)
 
1:42 PM
@SvenvandeScheur ok thx :)
who knows Magnolia CMS?
 
@PomeGranate Are you starting a survey?
 
yeah later i will put a small picture with an x to do it :P @FelipeAls
 
Hi guys!
 
@Arheisel 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.
 
1:46 PM
@OliverSalzburg somehow ja - but I have to check if there is a possiblity for custom fields and custom models in magnolia cms, and in the documentation it doesn't seem to be so - thats why I'm asking ^^
maybe someone has an ideaaa
 
what would be the best way to define a standard process for 404 server response in a React SPA application? I want to route the user to the login screen, but don´t want to write the same code in every ajax request.
 
@PomeGranate An ideaaa?
 
Usually all AJAX stuff is in promises to I'm using the .then(fn, fn) chain to catch all expected results. Generic uncaught errors go in the .catch(fn) chain (second callback in then throws so code hits it).

The fn in .catch is usually a generic handler that shows a modal with something like "Stroopwafels out of sync, please try again" and is defined in a module which is imported.

TLDR;

import error from 'error';


getAsyncStuff()
.then(fn, fn)
.catch(error);
 
the second fn is an error handler, making the catch redundant.
 
1:59 PM
see explanation
 
Yea, I read it, but I'm not sure I see how that un-redundant-izes it
is the first error handler re-throwing errors it doesn't expect?
ohh, right, ok, i see that part.
 
1 message moved to Trash can
@SvenvandeScheur 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
 
Gotcha. Was that an answer to a question or a preamble to a question?
 
@BenFortune Like
 
"""
what would be the best way to define a standard process for 404 server response in a React SPA application? I want to route the user to the login screen, but don´t want to write the same code in every ajax request.
"""
my idea was to use a imported error handler
 
2:02 PM
A 404 from an ajax request?
 
currently the app is still done with jquery ajax without promises
 
jquery lets you define a global ajax error handler fallback.
 
didn't jq 3 did a+ comlient promisses?
 
@SvenvandeScheur Aye, they removed the success/fail shit
 
jquery 2 is compatible with a+, too, now, I think.
 
2:04 PM
@OliverSalzburg vielleicht hat jemand eine ideee
 
But regardless of library, if you put all ajax requests through your own wrapper, you can do things like handle 404s
 
da spricht ja noch jemand deutsch :P
 
@elsololobo english please!
 
@luggage ok thanks
@PomeGranate :P
 
That's what I do. I use my own function ajax(method, url, data) {} that internall just wraps another (currelt jQuery :( ) and does common things.
 
2:06 PM
@Luggage ohh FYI you can just import <Redirect /> and render it wherever you need to redirect
it's a touch sloppy in how I have done it
 
@rlemon true
 
but works.
 
just do what you need to do with routing and keep it contained. We'll replace it later.
 
can whoever is flag hunting in the transcript please stop
 
HAMMERTIME!
 
2:07 PM
custom routers are better.
 
you're just creating noise.
 
I'll keep out of this one hahaha
 
@elsololobo heisst das wir sind jetzt Kameraden?
 
@Luggage well, this is not contained 😛
 
well, that's your goal. keep it contained. otherwise you will regret it.
 
2:08 PM
return this.state.redirectTo ? <Redirect .... /> : <Component />
 
you probably only need a few redirects, right?
 
3 mins ago, by PomeGranate
@elsololobo english please!
 
if this is just the login/logout pages, that's fine.
 
two that I can think of
 
Someone I talked to at work said the principle difference between mobx and redux is that redux is a tree structure and mobx is a graph structure -- is that true?
 
2:09 PM
login/logout and redirection after submitting a new gist
 
@corvid mobx doesn't really enforce any structure at all..
@rlemon so.. I have given up on react-router (3 or 4) for my own uses. It LOOKS nice, being all 'reacty' but it's not really a good solution. I'll make you something better (the thing I started) once you are stable enough for me to make those changes without conflict-city.
 
ohh I think I can probably take a stab at the previous version of react-router once I'm done this
 
In my own app, I have been using a 'normal' router with good success and just made a raect component to handle to page switching smartly. Something react-router doesn't do without a lot of work.
 
I'll have questions of course
 
the previous one isn't much better.
 
2:12 PM
Really? I think react-router is super easy
 
I've already spent time playing with react-router 3 nd rejected it, so, I won't be terribly interested in helping too much (but I'll answer what I know)
it's easy, until you start getting sophisticated.
 
in what ways do you have to get sophisticated with a router? Maybe I've just been doing it a dumb way. Entry animation, some simple regex patterns/route params, render a container
 
handle showing the old page while the new is is pre-fetching data
also, I use a mixture of some pages that are written in knockout and some in react with different lifecycles
 
I think react-router will work for my current project and my upcoming project
 
named routes. They were a pain in 3 and more of a pain in 4
 
2:14 PM
both are 2-3 pages with very little routing going on
 
all my urls are named, I use 0 hard-coded urls.
@rlemon yea, if you are happy, keep it.
 
I'll be interested in looking at your public projects tho
 
My project is private, but I can let you see it. It's a few years old and started as a non-react app, so it's got a lot of cruft.
but.. I want to take what I like and make a boilerplate out of it.
 
yea, I can wait till the boilerplate
😛
 
@corvid I am currently working on a "RootPageContainer" react element (using mobx) that accepts data from a router and handles switching pages, pre-fetching data, etc.
 
user3119231
2:17 PM
@FilipDupanović solution found: jsfiddle.net/41cqno1e
 
I am using some things I liked from react-router.
 
user3119231
Now I have serious problems with placing the name on the right side of the image.
 
user3119231
+ centered in height
 
@Maurize I heard vertical centering is pretty easy
 
user3119231
@OliverSalzburg I heard it's not about vertical centering
 
2:19 PM
Alright. Continue.
 
user3119231
nevermind. I should go home.
 
user3119231
Neat
 
absolute positioning inside of a relative container is positioned relative to that container.
 
user3119231
yes... Enough computer today. Time for a little Chillax
 
2:27 PM
What's it called when you 'clean' data before it's actually used, like removing the white space or illegal characters? I thought it was sanitize, but when searched online I'm getting mixed opinions on what it means. Also, I think there is another word that goes along with what I'm asking, just can't remember it.
I just want to make sure I use the correct words when describing this type of thing.
 
normalize?
clean is fine. don't get fancy if you don't know the 'perfect' term.
 
Maybe it was normalize. Hmmm, I don't know why I thought there was a specific industry term for this type of stuff, but I'll use clean then! (just doesn't sound fancy and I want to be fancy)
 
normalize has a meaning with data and relational databases that may confuse some people.
but I think it can generally mean what you describe.
deshitification.
 
Yeah I've always associated normalize with databases so probably won't use that word. Deshitification could work, at least get a laugh or two from someone.
 
when I hear normalize the first thing that comes to mind is making a vector length equal to 1, then adjusting the amplitude of a signal to prevent clipping, then databases :)
 
user2620028
2:39 PM
how can you tell how much data is being used from a chrome extension?
 
@HatterisMad yes, pull down the menu at top right, More Tools, Task Manager
 
@Maurize looking slick
 
user2620028
no shit lmfao google chrome has its own task manager?!
 
user2620028
sick
 
git clone their repo. they probably have sandwiches in there, from the size of it
one of the only repos where I've had to actually wait during clone
 
hey I have a formal question, is this a stackoverflow question, or will it be deleted?

I'm looking for a CMS, which allows you to create your own "content type / model" - for that model you should get a HTML form. You should be allowed to create new objects with an API (REST).

For example create a new "content type" named Book. Define the Model of a book => title:string, cover:file, author:string - now you can create a new book with the html form in the cms. and you can get those books with an GET request: myserver.com/books => response a json with all books
 
> I'm looking for a CMS,
closed as software request
 
@rlemon holly molly cowly rowlly owlly lovely
ok soo hmm what should I change?
 
don't ask for software recs on SO
 
2:50 PM
I'll just suggest the same 3 I always think about; WordPress, Drupal, and Joomla, but whether or not they will allow you to do what you're asking, I have no idea.
 
@PomeGranate Django is the only thing that comes to mind
Rails also has scaffolding, but you eventually end up ditching it
 
in flow, how do you specify a function which should return a function?
export function toggle(id: string): // ??? {
  return function () { };
}
 
@FilipDupanović yeah ok, but those are frameworks and not cms for the end user you know :)
@AmericanSlime with wordpress you can do that with advancedcustomfields.com/resources/creating-a-field-group
 
@corvid function
 
@FilipDupanović gives me a syntax error
 
2:55 PM
@corvid weird flowtype.org/try/…
 
@PomeGranate use drupal 8, it has exactly that functionality. drupal.org/docs/8/core/modules/rest/…
 
Nvm, that's the parameter
 
@1nterference 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.
 
@FilipDupanović yeah here is the gist
 
2:57 PM
@PomeGranate fair enough, if you need users to generate models on the fly there's probably something better than Django
 
good monospace (using it for terminal, 8px) fonts?
 
@towc consolas
 
hack
 
somehow my monospace regular file got corrupted -_-
 
2:59 PM
@rlemon interesting
 
@towc Fira Sans, Menlo, Inconsolata, Monaco, Consolas
 

« first day (2244 days earlier)      last day (2710 days later) »