« first day (1753 days earlier)      last day (3196 days later) » 

user3119231
10:00 AM
0
A: PHP Image Upload per HTTP Request Corona SDK

ovican i get your code to upload an image to server as i am facing problems with my code

 
@Neoares this is a chat, not Bingo. Don't disrespect the english language or us.
 
user3119231
u serious?
 
*you
 
lool
@Maurize o/
 
user3119231
\o
 
10:01 AM
@JohnSnow it's working with function
 
@JohnSnow Eh?
 
user3119231
30 degrees here and I'm sitting in office working on eBusiness System :(
 
var hi = 'hi';
setTimeout(function(hi){console.log(hi)}, 5000); // works but returns undefined because the parametres don't get inserted
 
You didnt pass one
 
Nor did setTimeout
 
10:04 AM
^ My point
 
setTimeout(function(hi){console.log(hi)}(hi), 5000);
try that
 
@Neoares won't work
 
I don't know if it will work
ok :D
 
IIFE
Try closure or curry
 
Just guessed
 
10:05 AM
@JohnSnow setTimeout calls the function without any parameters
Any parameters you use need to arrive from closure.
 
Exactly
"11:59
The parameter of the function needs to be in that function's scope"
 
how change the url codepen.io for obtain the visual fullscreen?
I need only the output.
 
there is a menu right above
"editor" click on that, "Full Page" , there is a small "get url" link
 
In my spare time I like to search for jQuery questions and answer them without using jQuery
 
Or if you want to be a geek : http://codepen.io/<profile_name>/full/<pen_ID>
 
10:11 AM
Anyone knows why process.stdout fails in intelliJ?
 
Ok thx...
 
@JohnSnow "fails"?
 
but is not applicable for other pen...
 
user3119231
I know I will be punished to death if I quick ask this here, but the query "UPDATE projects SET $row=? will update every row in this table?
 
just change url
 Anonymous Pens Can't Be Viewed in Full Page View

This is for security reasons and to prevent abuse.

To view this Pen in Full Page View, fork it.
 
10:12 AM
It throws an error of being undefined, but works fine running from cli
 
@Maurize Correct.
 
I'm suspecting something's missing in INtelliJ
 
user3119231
@MadaraUchiha thank you very much, don't have the time to google around like an insane :D
 
@MirkoCianfarani the message says the reason ...
 
Sign up. It's free!
I still can't interpret arrow functions when they're nested :|
 
10:18 AM
yeah!!!
already sign in..
 
@cswl don't write them then
"Sign up. It's free!" sounds like something that would get validated by 10ks if flagged as spam.
 
@cswl a => b => c => d ====> a => (b => (c => d))
Newlines can also help
a =>
    b =>
        c => d
 
had to do it
 
I just meant you need to sign up to fork.
 
let me use the same argument to kick you
 
10:23 AM
:P
 
@MadaraUchiha Um...how to pass some variables?
 
@HendryTanaka What do you mean?
@cswl Do you know how [].filter() works?
 
@MadaraUchiha var obj = {
func3: function() { return 3; }
};
console.log(obj["func2"]());
 
@HendryTanaka Paste, CTRL+K, enter
 
@MadaraUchiha Okay, sorry...
var obj = {
func3: function() { return 3; }
};
console.log(obj["func2"]());
How to pass some variable? I lose my mind, a lot of work..fiuh
 
10:25 AM
@JanDvorak because i have ie-8
 
Pass some variable where??
 
@Learner ew
 
@Learner That's a valid excuse for jQuery
Not for on* attributes
 
@MadaraUchiha Um...for example I want to add a parameter to pass and execute..
function test(param1, param2)
 
@HendryTanaka Great, what's stopping you?
It works just the same like any other function.
 
10:30 AM
func2: function test(param) { alert(param); }
@MadaraUchiha like this?
 
@Learner i'm in QA and sometimes review websites. The fact that IE8 got removed from our company supporting browser should tell you that you should not think about that anymore.
// away lunch
 
@MadaraUchiha how to call the func2 then? func2("Hello") ?
 
@HendryTanaka obj.func2("Hello") or obj["func2"]("Hello")
 
@HendryTanaka May I suggest you do a tutorial first?
 
10:34 AM
@JanDvorak That's what I need. Please lead me the tutor link ^ ^
@MadaraUchiha Thanks buddy
 
@HendryTanaka eloquent javascript
 
@MadaraUchiha Okay...thanks by the way
 
Cooking noodles is hard
@MadaraUchiha You mean Array.prototype.filter or literally [].filter?
 
@cswl Wai wai?
 
@cswl They are exactly the same thing
[].filter === Array.prototype.filter
true
 
10:41 AM
@BadgerCat Wai Wai Quick
 
Wow, I'm good.
 
user3119231
if I click in text areas the cursor is on start instead of end of content?
 
Hello, when I am developing some controls for the UI...what sort of tools can help me with the placement of the ui element, or, where is the co-ordinate of the control's centroid is...etc...chrome developer tools don't provide any support for that?
 
@MadaraUchiha Ah, yes.. I was just testing you :p
 
@cswl Here's an exercise:
 
10:43 AM
didn't know 1+2+3+4+5+6+7... = -1/12
my brain almost exploded with the proof
but it's true xD
 
Fried eggs and fried noodles, tastes like fried eggs and fried noodles
 
var mandatoryFields = ['body', 'headers', 'data', 'users'];
var data = request.body;
if (!Object.keys(data).every(foundIn(mandatoryFields))) {
    throw new Error('Missing fields: ' + Object.keys(data).filter(not(foundIn(mandatoryFields))).join(', '));
}
Write the functions foundIn and not so that the above example works.
 
@Neoares it's not really true, it's just that it's the result that breaks the least amount of maths
 
user3119231
<textarea name='PROJECTCOLUMNS'>somestuffxyz</textarea>
 
user3119231
what is wrong here lol?
 
10:46 AM
can you use 'thing'?
 
For input {body: "foo", data: "bar"} an error should be thrown: Missing fields: headers, users.
 
Aye Sir .just let me finish my noodles first
 
@Maurize Depends on the context. If it is javascript, problem is it is not javascript. If it is html, it is missing doctype. If it is html snippet, technically nothing is wrong.
 
for this declaration statement,
var myVar;
myVar = 'Helloworld';
Can I write the code like this?
 
user3119231
@Sheepy this doesn't make much sense. It is html echo'd by php.
 
10:51 AM
window['myVar'];
window['myVar'] = 'Helloworld';
 
user3119231
@Sheepy maybe cause textarea is in form?
 
How can I check the syntax that am typing is alowed by JS engine?
 
@overexchange Just say window.myVar = 'Helloworld'; They are not exactly the same; simple var works in Node or any other JS environment, while window is not. var may create local variable, and window likely do not.
 
user3119231
Okay user-select: none causes disabling textareas
 
@overexchange Get an editor with syntax highlight. Firefox has a simple editor built-in.
 
10:54 AM
@Sheepy chrome console would suffice?
 
@overexchange If you have only one line, sure.
@Maurize Without knowing your problem, we cannot tell you what is wrong with that textarea.
 
user3119231
@Sheepy this question was meant as joke. there was all right with this textarea :D
 
@Sheepy For your point: var may create local variable within a function scope(for example), yes, but out of curiosity, how can I use dictionary notation for a local variable in a function? afterall local variable would also be an attribute of window['somefunc']?
 
@overexchange You cannot. Local execution context is not an object. Local variable is NOT an attribute of window.somefunc. In fact, not all function has names or publicly accessible.
 
10:59 AM
ok
 
@Maurize Ok. For reference, textarea does not need to be in a form now.
 
user3119231
@Sheepy and how do you get $_POST on php side?
 
@Sheepy local execution context of a function is like activation record of C/java world?
 
@Maurize Uh, let me guess, "$_POST is evil. Please use filter_input"?
 
var data = request.body; Wont data be "foo" here? o.O @MadaraUchiha
 
user3119231
11:06 AM
@Sheepy good to know. Will continue using $_POST :P
 
@Maurize XD
PHP 7 is coming, you know. I think it is in beta now?
 
user3119231
Huh PHP7? Any link?
 
@overexchange I am not sure Java call it activation record. Anyway, no, they are not the same. JS execution context is preserved in closure, after the original function has finished and no longer on stack.
@Maurize www.php.net I guess XDDDDD
 
user3119231
Good guessing, Sir.
 
11:10 AM
@Sheepy Can you recommend a javascript tutorial for a beginner(on youtube)? which can start from datatypes and all such quality stuff
 
PHP 7 is good. Consistent syntax and exceptions. Real random numbers. Plus all the goodies in 5.x like short array syntax or lambda.
 
@overexchange Eloquent JavaScript. JavaScript The Good Parts. If it is quicker and shorter, they are not good.
 
@overexchange I have a good book list one sec
I gotta make a chat command for it but idk how
 
@Meredith reading books, that is tough for me, I am looking for a youtube video training
 
11:14 AM
You can read books
 
@overexchange tough for you to read.. books?
 
this is the best material I found on youtube: youtube.com/view_play_list?p=92D70E98B0336AB2
 
but you're reading a chat room right now :o
 
@overexchange If reading ain't your thing, stop being a programmer.
 
I agree with Roel. You need to read. A lot.
 
11:16 AM
ok
which book do you prefer?
 
If you prefer hyperlink instead of dead tree, eloquent javascript has online version. free.
 
@overexchange Speaking JavaScript by Rauschmeyer, JavaScript: The Good Parts by Crockford, Learning JavaScript Design Patterns by Osmani, Maintainable JavaScript by Zakas
All are available for free online
 
Yes these are also good books.
I'd say start with Eloquent and/or The Good Parts.
They are the basics.
 
Start w/ speaking javascript
 
@overexchange As Sheepy said, Eloquent JavaScript and The Good Parts.
Then write code. Lots and lots of code.
 
11:22 AM
I'll never get why people would put Youtube - Coding tutorials over written content
 
Yeah
 
@Sheepy as am very comfortable with python lists/dictionaries/closure/higherorderfunctions, I thought to quickly complete JS fundamentals and get into angular JS and bootstrap stuff.
 
I mean unless you're getting the tutorials from someone like crockford
But even then
 
@GNi33 There is lot of quality stuff on youtube as shown in one of the link youtube.com/view_play_list?p=92D70E98B0336AB2 I feel, these are quality lectures.
 
yeah, but it's just exhausting to watch compared to just reading up on stuff
 
11:27 AM
@GNi33 it happens a lot in the drupal community
 
no doubt there's really good stuff out there, I just prefer to read a good tutorial or book
 
@overexchange Video is, IMHO, the slowest way to learn a new programming language (when you already know some others). With books you can skim. You control the pace.
 
@GNi33 listening video need 2 of your senses, reading book need 1. This makes a lot of difference.
 
@Sheepy also a million times easier to read back and take notes
 
Reading is also much faster than listening.
 
11:29 AM
pause video rewind grab pen opps too far put down pen fast forward ah to much
 
@Sheepy eloquent JS looks good, what about angular JS/bootstrap, are there any good resources?
 
@overexchange Sorry. I don't use them. Have to ask the real experts here.
 
don't use what?
 
@overexchange AngularJS by Green & Seshadri
Bootstrap you don't really need to "learn"
Going through the docs is enough
 
11:33 AM
Hi Guys ...
 
Hi
 
@Sheepy ah sorry, ignore my prev comment
 
Anyone having experience building a hybrid app with phonegap or ionic framework .... just want an insight into the pros and cons of hybrid frameworks ...
 
!!are you alive?
 
I haven't written hybrid apps but I've used a few and it seems it's not easy to make the transitions seamless
 
11:36 AM
@Sheepy In this JS fundamental topic list, do you think any thing is missing? youtube.com/… BTW lectures are very slow pace. lectures for dummies kind of stuff
 
@ivarni by transitions you are referring to layout transitions ?
 
@Meredith going thru these docs would be fine for writing production code?
 
@Aukhan No, when it switches between native and html
 
@overexchange I mean it's bootstrap
It's not like you're working with anything super complex
 
Do we have something like list comprehensions and generators in JS? In python it helped me do functional programming
 
11:45 AM
We have generators in es6
I don't know a whole lot about python so I'm not sure if we have list comprehensions
 
python lists are JS arrays
 
We don't have list comprehension in JS.
 
Collections in Backbone.js or Underscore.js if you want stay low would give you similar functionality ...
 
Anyone know why jetbrain products highlight types and methods and how I can make it not
;_;
 
@MadaraUchiha Does that exercise work? :\
 
11:59 AM
@cswl Link again please? I had a long meeting
 
I wrote a guide on how to make that pen I got patted on the head for yesterday if anyone's interested ;)
http://codepen.io/towc/blog/a-guide-to-wavy-waved-radial-waves (cc: @AwalGarg, you said you wanted to learn canvas, right? @catgocat )
2
 
1 hour ago, by Madara Uchiha
@cswl Here's an exercise:
 
> This pen went completely viral some time ago (august 3),
I chuckled
 
@JoshLeBlanc too pretentious?
 
No, it's good
 
12:01 PM
I mean, it got 3500 views in 20h, it's not something you see every day
 
By the way, that pen looks like a plasma plate
 
It's a good practice to use addListener instead of addEventListener just to support IE8 users?
 
Speaking of bing, I managed to break Edge
 
@JoshLeBlanc bing? 0.o
 
@towc Edge default, I just never changed it
 
12:04 PM
@JoshLeBlanc how dare you!
but yeah, kinda
 
I have a plasma ball, immediately what I thought of
 
@towc Is there any way to have it load 3rd party deps over HTTPS instead of HTTP?
 
@JoshLeBlanc Break it? I imagine it wasn't too hard?
 
@cswl What do you mean "does it work"?
 
@towc nvm, found it in the editor. Looks really cool
 
12:11 PM
If it's possible? Yes, it's solvable.
 
user3119231
Anyone got a fast solution for extracting img links out of string?
 
user3119231
oh done already
 
@Neoares I would just polyfill it.
 
For input {body: "foo", data: "bar"} ,
`var data = request.body` will be foo.
Is that the intended behavior?
 
@cswl No, request.body.body would be foo
 
ttj
12:18 PM
why can't i load angular2/router?
/// <reference path="../typings/tsd.d.ts" />
tsd.d.ts contains:
/// <reference path="_custom/custom.d.ts" />
custom.d.ts contains:
/// <reference path="ng2.d.ts" />
ng2.d.ts contains:
declare module "angular2/router" {
 
request.body = {body: "foo", data: "bar"};
 
@GNi33 after going through Eloquent JS it looks like it is more efficient to read this book rather than going thru videos
there is exhaustive stuff in this book
 
@ttj How do you load it?
 
ttj
@RoelvanUden import {Location, RouteConfig, RouterLink, Router} from 'angular2/router';
 
Aye, got it
 
ttj
12:20 PM
import {Component, View, bootstrap} from 'angular2/angular2';
^ this works
 
what's a good book for learning javascript patterns on large-scale applications? I feel like mine are very messy.
 
@ttj I don't know angular2 very well, but does it really contain Location, RouteConfig, RouterLink and Router? It makes little sense to me that /router would contain Router, but it might, I'm not sure.
@corvid no patterns, just dry kiss soc srp etc :p
 
A... are you hitting on me? I accept your advances.
 
ttj
@RoelvanUden umm... it does. i'm looking at it in ng2.d.ts now
 
@ttj Are your typings in the right folder? Typings are super annoying.
 
ttj
12:24 PM
@corvid yup. everything is in the right place. i've loaded another class successfully
 
@ttj Don't know then. All I can come up with is that your type definitions aren't properly included (use a project file, it saves a lot of trouble and stupid ///reference errors)
 
ttj
@RoelvanUden what is a project file?
 
If you use Atom, you also get filesGlob to automatically update references
 
ttj
@RoelvanUden i'm confused how that works. at one time i had that file in the directory and it didn't seemed like it did anything
 
@ttj run tsc and it compiles everything according to the proj file
 
ttj
12:27 PM
i have no task runner or anything
 
it resolves references automatically
tsc --watch to run a watcher
if you use atom (w/ atom-typestrong) it already uses it, ctrl + p => create project file
if you use vs, consider upgrading to atom
 
ttj
i'm using vs. LOL. i have a tsc watch on the background
i've downloaded atom. i'll try it out
 
you don't need that if you use visual studio :P at least if you use a TS project
nor do you need references inclusions
just add things to the project
 
ttj
i'm working on a empty website project
 
Visual Studio does have TypeScript projects y'know, it does things for you, like suggestions, auto-completes, error checking, etc.
 
12:30 PM
@cswl Any luck? :)
 
ttj
question: tsc watch on the path that tsconfig.json is in?
 
@ttj Yeah.
 
Hi, I was wondering if anyone worked with passport-jwt (github.com/themikenicholson/…) and if so, I would like to know some opinions about it and/or if it's better to use a combination of passport-local and node-jwt-simple instead. Thanks.
 
@towc using your codepen as screensaver
 
ttj
@RoelvanUden thanks for everything
 
12:33 PM
@FlorianMargaine :D
 
@ttj no problem, hope you figure out the angular2 preview stuff :)
 
12:45 PM
@towc nice implementation of the smooth curves
 
@AwalGarg it's soooo easy. When I had first seen it I couldn't believe it
 
Hmm, this refreshes the scripting I did in AE back then. Niiiiice!
 
Hi guys whats the syntax to set a websocket onopen method = mymethod for example please?
i.e. ws.onopen = myfunc();
i can find anything on google (my googling skill arent on par at th emoment)
 
drop the ()
 
lol
 
@MadaraUchiha Can i override, the .filter? I don't see how I can use .filter to return a totally new array :|
 
and morning btw
 
@cswl You may not override .filter.
Also, .filter always returns a new array.
 
@catgocat almost done a talk. More like a blog post in the style of a talk...
 
I need to check your blog post
 
12:53 PM
just scroll up until you see a ping
 
How does one emit events from a class on the client?
 
@towc Nice
 
thanks!
 
And retweeted
 
12:58 PM
@BadgerCat thanks ;)
 
user3119231
question: If i click on an image it gets dragged. Can I prevent it from being dragged?
 

« first day (1753 days earlier)      last day (3196 days later) »