« first day (1050 days earlier)      last day (3916 days later) » 

3:43 PM
netsh wlan>show networks mode=bssid

Interface name : Wi-Fi
There are 2 networks currently visible.

SSID 1 : Harish
    Network type            : Infrastructure
    Authentication          : WPA2-Personal
    Encryption              : CCMP
    BSSID 1                 : 48:f8:b3:32:92:55
         Signal             : 32%
         Radio type         : 802.11n
         Channel            : 11
         Basic rates (Mbps) : 1 2 5.5 11
         Other rates (Mbps) : 6 9 12 18 24 36 48 54

SSID 2 : Link-RRR
any way to plot json out of it ?
 
Write a compiler
 
^ This, a tokenizer should be relatively easy to do
 
just split by two linebreaks and then by lines and then by colon
 
If i forget the first two useless lines
this looks like a config file to me
 
@AbhishekHingnikar This looks like a job for...regex! \o/
 
3:48 PM
@Michael overkill
 
@AbhishekHingnikar xD
 
besides i want to keep the data
at pycon we had a problem today, when the user spoke the signal was completely broken ...
the idea was some sort of interference... but 500Mhz interfering with 2.4Ghz was kind of stupid argument. So we just want to map the data and see a pattern
Looks like a job for node.js to me :3
the problem is i want it to be as less lines as possible
 
Why?
 
dont want to spend time on it ? I am busy with work projects
 
Less lines isn't necessarily less time
But it's a simple process. You have blocks denoted by two newlines, as ThiefMaster pointed out.
 
3:53 PM
I realized now its YAML kindoff
but yeah i will do what thief said :3
 
@Pinocchio what does the cv-pls tag mean?
 
@synth3tk Close Vote Please.
 
oh, summer has arrived... I mean the sintflut
 
0
Q: Lazy grass animation?

VAGABONDMyProject till now(my commented Box2d code in javascript,tried to make it self documenting) What I want:Desired effect I am trying to give these hair some bend with lazy grass like movement,but its still quite rigid. I want to make my project like the grass movement.

 
evidently they tried nothing.
 
4:11 PM
@Feeds Lazy, good for nothing grass. Get a job.
 
!!> ('stackoverflow.com').replace('stackoverflow', 'giveMeCodeFor');
 
m59
function refresh() {
  $.ajax({
    url: 'page/that/needs/to/refresh',
    success: function() {
      setTimeout(refresh, 50000);
    }
  });
Did I get that right?
 
No
 
@m59 You're just fetching a page, not using it
 
You missed a } on line 7
 
m59
4:18 PM
doh
 
And you don't call your function
 
m59
thanks :)
 
(function f(){ something();f(); })();
 
m59
Am I wrong??
0
A: Auto refresh php file content from external site

m59You need to use javascript ajax. Once the server serves the page, php is no longer involved. An example of how you might accomplish this (using the jQuery library): Click here for live demo! function refresh() { $.ajax({ url: 'page/that/needs/to/refresh', success: function(response) {...

Fail answer gets the upvote.
 
@m59 fail answer fails to be downvoted
by you
 
4:31 PM
I have a good question
 
m59
@JanDvorak I suppose I'm afraid of being wrong. I still feel like a noob.
 
@m59 yet you used the words "terrible answer"
 
m59
well, true =D
That was a crime of passion, lol.
 
No. A crime of passion would be premarital sex in ancient Israel :-)
 
m59
lolzzzz
I think it still applies, I am a Christian after all.
 
4:34 PM
This is more a case of "don't say anything you can't take back. Anything else is free reign" ;-)
 
m59
Heh.
I'd just feel bad taking away the rep if I were an ignorant douche.
 
yours, or theirs?
 
DOM have a range of checkboxes (That range depend) .And i have a variable call count that value (INT) is depend.If user selecting check boxes he could be select(checked) only count variable value check boxes quantity
??????????????????
<input type="checkbox"
 
m59
theirs.
Dude, I can't tag you with those crazy symbols in your name.
 
tell me here
 
m59
4:37 PM
But, I don't understand what you said at all.
 
@m59 try clicking the tiny arrow beside the message
 
m59
Make a jsbin.com please.
 
how to get the check status of a checkbox?
 
m59
@JanDvorak ah true
 
use jQuery?
 
4:38 PM
@paulcheung cb.checked
 
<input type="checkbox"
<input type="checkbox"
<input type="checkbox"
<input type="checkbox"
if count variable is set to 3
i can select only what ever 3 checkboxes
 
@ఠ_ఠ $(":checkbox:checked").length
if it equals three, and an unchecked checkmark is being checked, cancel that action
 
@JanDvorak checked="?" to display it as unchecked?
 
@paulcheung cb.checked=false
in jQuery, I'd try cb.val(false)
 
ok....
how to do?
 
4:43 PM
Can you vote to delete ?
-1
Q: How to get the file absolute path using javascript or ...?

Vikixp AbsI have a javascript that used to upload files. The problem is I can't get the absolute path using javascript. Is there any other client-side scripting language that can be used to get the absolute path of the file and pass it to my javascript? I don't want to used server-side scripting language ...

 
@paulcheung try $(":checkbox:checked").val()
 
@JanDvorak ok, thks
 
http://stackoverflow.com/questions/18550366/node-function-result-undefined#18550366
 
posted on August 31, 2013

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {}

 
i use jsfiddle to demo, <input type="checkbox" checked="false" value="ypdinner" id="ypdinner"> this will display checked box?
@JanDvorak
 
4:45 PM
@JanDvorak I flagged
 
@JanDvorak jsfiddle pls
 
@paulcheung try the empty string
@ఠ_ఠ sorry, that's what answerers say, not askers
 
there is no difference
@JanDvorak
 
don't set the attribute at all, then
 
yap, works fine
 
4:50 PM
@JanDvorak jsfiddle.net/YjbgE how to do it
?
if count is 3 i can select only 3 checkboxes
 
@ఠ_ఠ uh, no. You don't show a template into which I do your homework. You show some effort to actually understand the code and dig up read the neccessary documentation.
 
it's not a homework
i need some guide to start this
 
!!tell smiley jquery on change prop preventdefault
!!are you alive?
 
yeah
 
@ఠ_ఠ not you. I'm asking the bot
ok:
@ఠ_ఠ look up the jQuery documentation on on, change, prop and preventDefault
The rest is connect-the-dots
 
4:56 PM
maybe you can bind .check event to checkbox, and then verify the value of the $(":checkbox:checked").length, if its value is bigger than 3, do stuff
@ _
 
@ఠ_ఠ , you only wan't to select 3 out of the 4 checkboxes?
 
@Pinocchio s/3/4/
 
    jQuery.fn.max = function( val ) {
        return this.filter(function( item ) {
            return val-- > 0;
        });
    };
 
Eww
 
there is a variable.that count is changing always. also changing the DOM available check boxes count .if count is set to 3 if there are 4 checkboxes i can only be select 3 out of 4 checkboxes
 
5:00 PM
@copy Better way?
yes
there is
 
to get each value of element in the array $(":checkbox:checked") and concatenate them as a string, how to do?
@JanDvorak
 
What are you even doing? Looks like slice or something
 
jQuery.fn.limit = function( val ) {
    return this.slice(0, val);
};
That's better ^
$(":checkbox").limit(3);
 
Now give it a reasonable name
 
@paulcheung $.each, then some basic string manipulation, or array manipulation + join
 
5:02 PM
ok, i will try that
 
@copy ^
 
-1
Q: Installing jQuery - What Have I Missed?

silver arrowI'm very new to coding from scratch and use Aptana Studios. I only learned to code through the site Codeacademy so although I can code I am unfamiliar with working with programs like Aptana, linking documents and terminology. So, I apologize in advance for the length of this question. In short, I...

 
What's up with Syria?
 
@BenjaminGruenbaum a lot
 
5:07 PM
<input type="hidden" id="ypdinnerplatform" value="iOS" />
<input type="hidden" id="guessplatform" value="Android" />
<input type="hidden" id="nbaplatform" value="iOS&Android" />

<input type="checkbox" value="ypdinner" id="ypdinner">
<input type="checkbox" checked="true" value="guess" id="guess">
<input type="checkbox" checked="true" value="nba" id="nba">

i want use the value of checkbox whose status is checked as the prefix of the hidden id, and get that hidden input value
 
$(":checkbox:checked").val()
you should give them a class, however
 
@paulcheung $( '#' + $(":checkbox:checked").val() + 'platform').val();
You could do it better than that though
 
move the value directly to the checkbox
 
or create a data-somePlatformDataForMyFormApplication attribute for the value
 
I know the jquery way... That has nothing to do with jQuery, you can do that perfectly fine with native JavaScript events. This is the problem with people learning how to use a library before learning how things like the API work themselves. On the upside - jQuery does normalize keyboard events across old browsers. — Benjamin Gruenbaum 6 secs ago
Too harsh?
 
5:12 PM
For a 1GB Ram-OpenVZ VPS (4 core shared Xeon), would switching to node.js from an NGINX + PHP app provide any performance benefits? (most likely Sails + Mongodb)
 
You just got to say shit how it is now a days @BenjaminGruenbaum
 
@Pinocchio ?
 
@BenjaminGruenbaum It's not even close
 
@copy So not harsh enough :P?
 
Aye
 
5:14 PM
Heh, I'd say something about that guy having a site full of (horrible) tutorials and 5K rep, but then again.. @Neal
 
I don't think we should bash Neal too much, he has a lot of reputation but he's also genuinely nice and wants to help people
 
@BenjaminGruenbaum does not belong to a question comment thread unless it mentions said tutorials
 
@BenjaminGruenbaum Not too harsh, but no need to be harsh, so OK
 
@copy I think he means Yasser
 
@JanDvorak Didn't mention all the tutorials in the comment.
 
5:16 PM
Just asked question stackoverflow.com/questions/18550690/… anyone please ans stuck for few hrs now
 
@copy I'm not saying anything that's not true, he does have a lot of rep because he leaves a lot of low quality answers, and he doesn't know JavaScript... I didn't say he was an asshole or a bad person. On the contrary, I've said multiple times @Neal is one of the few people who actually get how rep is supposed to work in SO.
 
What's SO's view on linking to an existing site to ask a question? I'm trying to create a working Plunkr to recreate what I need to achieve in Angular, but at this point I'm basically using the entire page.
 
@synth3tk The view is - don't do it. Create a self contained example
 
We're refactoring to use Angular, but I'm not sure how to achieve a specific piece of functionality in Angular.
 
@synth3tk So ask about that piece of functionality
Also, make sure you do plenty of research before asking it on SO
 
5:19 PM
@synth3tk questions must be self-sufficient without any dependency on external resources
 
@BenjaminGruenbaum It's hard to explain what I'm trying to achieve, hence why I can't seem to find it anywhere. Can't find something if you're not sure what you're looking for.
 
@synth3tk If you can't explain what you're trying to achieve then it's a bad question for Stack Overflow to begin with.
 
@BenjaminGruenbaum Oh well, you're right
Doesn't mean that Windows is a good OS though
 
@BenjaminGruenbaum Bah. Ok, so where do I go to ask what to search for?
 
5:21 PM
cause right now i'm stuck trying to figure out what the equivalent is in Angular
 
@BenjaminGruenbaum LOL
the submit function does not get called, what is "submit" event here ? — Yasser 1 min ago
 
@synth3tk You figure out what your problem is first. What state of affairs are you trying to bring?
 
m59
@synth3tk, ya know...I find myself in that situation pretty often. What I've finally learned to do is just go ahead and rebuild the scenario from the ground up in a jsbin even if it is that complicated. In the process, I often realize a lot of things I could improve and don't need help after all
 
@synth3tk What are you trying to do? What is your goal ?
 
m59
Or, you could link us a piece at a time and get some critiques as you go
 
5:23 PM
@copy I don't think Windows is a good OS, I just think I'm more productive on it than on the alternatives, that's totally not the same thing :P There are plenty of things I hate about it.
 
m59
Even if you chained 10 directives, I could tell you if the first one is fail without knowing what the other 9 do. That's part of the idea of writing good code.
 
Essentially it's a multi-webcast viewer. You can view up to 6 webcasts simultaneously. The functionality I'm trying to recreate in Angular is the switch that changes up the layout.
There's a dropdown currently that has a list of layouts, and arranges divs to the layout clicked on by the user.
 
m59
That sounds extremely basic.
Did you write your view first?
 
No
 
m59
There's your problem.
Do you understand what I mean?
 
5:26 PM
Not necessarily. I'm trying to learn Angular as I go, but I'm piecing together thirty different sites because no one explains it well enough for a newbie.
 
m59
Well, let's do this together then.
You said you can have up to 6.
That sounds like ng-repeat to me.
Are you familiar with it?
 
@ThiefMaster stackoverflow.com/questions/18550609 OP clarified his question you closedhere
 
Yes. I've got a grasp on that.
 
0
Q: bacon.js: how do I handle the file system

bjelliI'm trying to get my head around asyncronous programming in node.js. My example is reading all the files from a directory. I know I can avoid asyncronous programming by using the syncronous methods: var fs = require('fs'); names = fs.readdirSync("."); for(i in names) { fileinfo = fs.statSync...

 
m59
<div webcast ng-repeat="webcast in selectedWebcasts"></div>
 
5:27 PM
@JanDvorak jsfiddle.net/X5L8Y if the count is set to 3 it will select only 2 .\Why is that ?
 
@ఠ_ఠ no need to parseInt(length) ?
 
no need to parse the numeric constant either
 
i;m getting it from Db
that's why i add that
 
@ఠ_ఠ And justChecked is always going to be 4
 
but without it same result
 
5:29 PM
the length is not from db
 
@m59 That much I get. Now, the layout is the part I'm having issues with. I want the user to be able to change the layout to only display 3 webcasts (1 large one with 2 small ones on the side).
 
m59
ok
<select ng-model="selectedLayout"><option ng-repeat="layout in layouts"></select>
 
@JanDvorak there are 4 checkboxex but my count is set to 3 .\So why i can check only 2 checkboxes
 
@ఠ_ఠ change is fired after the checkbox has been checked
 
m59
now, you need to use the value of that model to determine what html is shown.
 
5:31 PM
so there are already three checked checkboxes when you're reacting to the change of the third one
 
m59
I just blanked of the attr for that....
ng-include I think
 
(sorry)
 
wat
 
m59
@synth3tk yeah, use that model like this:
 
wtf
They behave the same if not overridden. — Ingo Bürk 1 min ago
 
m59
5:32 PM
<div ng-include="selectedLayout"></div>
 
@JanDvorak what is the possible way for it?
 
@ఠ_ఠ the click event fires, then, if you don't prevent it, the checkbox changes state and the change event fires
 
m59
but, you might have to fix the variable since you're likely displaying a title and need to associate it with an actual filename or something like that.
 
so just uncheck if there are more than three
 
alright. thanks.
 
m59
5:34 PM
@synth3tk or, you can have all the views present already and use ng-show
that's better!!
^
 
$('input[type="checkbox"]').on('click', function () {
    var shouldChecked = 3;
    var justChecked = $(":checkbox:checked").length;
    alert(justChecked)
    if (justChecked > parseInt(shouldChecked)) {
        $(this).prop('checked', false);

    }

}); @JanDvorak
 
m59
If it's just a few small views, I'd say load them all at once and have them become visible (ng-show/ng-hide) when the selectedLayout model corresponds to that view @synth3tk
 
@ఠ_ఠ looks better; you should parse the string only once, however
 
@JanDvorak jsfiddle.net/S6tFW/3, please take a look, why has an undefined in my concatenated string?
 
Well i thought about that, but it may collide with how it currently works. let's say View #2 is default (1 large webcast + 2 small ones). Myself, as a user, puts Webcast A in box #1 (the large one) and Webcast B in box #2 (one of the small ones).

When I switch to View #3 (four equal boxes), will those two webcasts still play as the layout changes? We want the transition to be smooth (no jarring reload of all the webcasts on layout change).
 
5:38 PM
@paulcheung I can't see any undefined. Only two lines of text that don't seem to change.
ah, you're supposed to click the text
 
yap
sorry
 
@paulcheung hint: what is the initial value of temp?
 
nothing, just declaration
var temp
 
what happens when you try to concatenate that to a string?
 
have you tried to click the Text?
@JanDvorak
 
5:41 PM
@paulcheung those are rhetorical questions
 
im sorry
i will get a string like undefined.... when i click the Text
but i dunt no why
 
@paulcheung what is undefined + "something"?
try that out in a console
 
oh, i tried to change my "var temp;" as "var temp="";", that works fine without undefined
@JanDvorak thank you so much,,,
 
@paulcheung the usual way is to build an array of strings and then use join
 
in javascript world?
 
5:46 PM
yep
 
wow, :))
im fool...
 
or, better yet, when you have an array of DOM elements, use map to get an array of strings
map is an ES5 stuff (so shim for IE), but join exists since the dawn of time or so
 
when you have an array of DOM elements, use map to get an array of strings?
 
jQuery has map built-in
@paulcheung $(":checkbox:checked").map(function(){return this.value}).join("|")
 
@m59 I guess to rephrase my last message, when a user drags a webcast into a layout box, that webcast is now associated with said box. I need the webcast to not only stay in that box when the layout changes, but the webcast shouldn't reload when this happens.
 
5:51 PM
0
Q: Javascript and CSS review

ThiSGUyI have been doing some JS lately and I would like to get some constructive criticism. The project I am working https://github.com/Nikamura/YoutubeToSpotify-JavaScript/ Live demo: http://youtubetospotify.eu01.aws.af.cm/ Thanks

 
m59
@synth3tk it's just too complicated for me to understand without seeing a jsbin or something like that
make anything even remotely close, draw me a picture
something
but all I'm going to do is look at it and write markup with some angular attributes on it that sound like the picture
it's usually pretty easy
 
in node how would you get the data returned of a $.get() request into a global variable?
 
m59
@TrevorRudolph you almost definitely shouldn't.
 
welll how about an ajax request with async:false?
 
m59
But if you wanted to anyway, why would that be an issue? Can you just make a global variable and give it the value?
async false is also fail..
 
6:04 PM
@TrevorRudolph async:false is a fail, especially on node
 
well say i want to get data then use it, i dont wanna do it all in the .done(function(data){}) i wanna do it outside of that
in the main script
 
m59
you're lost.
 
node.js is fast if you don't use synchonous blocking calls
 
m59
do you mean like this?
 
6:06 PM
@TrevorRudolph you will like ES6
 
m59
function success(data) {
  //do something with data
}

.done(function(data) {
  success(data);
}
 
i know... but then again, if i have ajax request in a function and i need to get the data then process and return a string, that almost impossible because im trapped in the .done() function, thats what im having problems with
 
m59
@JanDvorak what about ES6?
 
@m59 it seems fair, i havent tried it yet..
 
m59
@TrevorRudolph that doesn't make any sense.
 
6:07 PM
eh ill give an example
 
@m59 async xhr(url, options) ~~ xhr(url,options,function(){...})
 
@JanDvorak A what now?
async isn't due till ES7 :P
Also, it's await iirc, like in C#
 
@BenjaminGruenbaum :-(
 
var result = await xhr(url,options); // Teh awesome
 
aye
 
Looks fun.
 
@JanDvorak $.map($(":checkbox:checked"),function(a,i){return a + "platform";});
 
@paulcheung can be; why are you declaring the second argument?
 
that is unused
:(
it will return [object HTMLInputElement]platform,[object HTMLInputElement]platform
 
ah, yeah... a is the DOM object
so a.value
 
6:12 PM
$.map($(":checkbox:checked"),function(a,i){return a.val() + "platform";});
this does not work well
i mean, a.val() can not return its value
 
a.value or, if you're lame, $(a).val()
a is a DOM node, not a jQuery object
 
yes, my head is hot...
:(((
 
m59
@BenjaminGruenbaum this might be simple, but I got hung up here. Could you check this out really quick? jsbin.com/UxUsEjO/1/edit
 
Hope that helps
 
6:14 PM
@m59 What about it?
 
m59
So, I am wanting to change the "pages[page]" thing via the select, but the blank option throws off the view
like...this makes sense view-wise:
template in templates[selectedTemplate].positions
but if they are using the default, there is NO selectedTemplate, technically.
I need a conditional to deal with that, but not sure where/how
In case it matters, if something is selected there, it overrides the site template with a page specific one. I feel like a blank value makes the most sense. This page's template doesn't have a value, so fallback to the site's template.
@synth3tk ok, I see what you mean.
I like the idea, but it is more complicated than I imagined. You're going to need some interesting directives. Angular will make that a lot easier than without angular, but it's really just going to take some work.
What I think you'll need is the sets of markup and a system to evaluate where to pull/place the existing elements (webcasts) into the markup
 
@m59 Yeah, that's what I figured. The code in use now for changing the layout is half the custom file for this page. Part of the reason we're moving to Angular is to make it easier to maintain, but it's gonna be a bitch to port over.
 
m59
I actually did something similar and it's pretty easy to understand now that I'm done.
 
That's how most stuff is for me. The problem is getting it done. :p
 
m59
Yeah, I spent a good 60 hours working on it and it's easier than what you have, lol.
 
6:26 PM
@m59 A filter?
 
m59
But I learned a TON in the process.
 
Guess I'll play around with directives for a bit, see what I can come up with.
thanks anyway
 
m59
@BenjaminGruenbaum hmm..nothing comes to mind.
@synth3tk the best thing you can do is highly consider how each piece can be broken down. Try to let one thing process and handle one issue.
That's what I messed up the most :)
@BenjaminGruenbaum oops, I forgot to give singleView a value. I updated it. Now, you can see what would happen if you did override with a page template. That works great. But going back to the default (empty) means that the positions property can't be found. Note that the example is overriding the site's template with the same template, lol, but that doesn't matter.
 
I made a fiddle based on the progress bar posted here yesterday
it was built for chrome. btw
 
Anyone knows these guys?
They're my roomies for the next month apparently
@Esailija they seem to be from Finland.
 
6:42 PM
just updated for firefox :)
 
m59
@BenjaminGruenbaum got it =D
The key was ng-change="myFunc(selection)"
 
@BenjaminGruenbaum Your time machine vomited on my computer screen.
 
@synth3tk It's a guy who's staying with me in a room from Tomorrow and for the next month, their actual site looks decent though and I love working with people who make games since that's the industry I come from.
 
m59
I set selectedTemplate to the site's default to begin with, so the positions are showing for that, then if overriden, the page's model is set right and the change function runs to update selectedTemplate
Dang I spent forever on that and it was so dang easy :(
 
6:53 PM
@BenjaminGruenbaum Cool. Why are you staying with them? Some sort of conference or event?
yay! the chick-fil-a breakfast site is back up. sort of. poor IT department. hope they're getting paid decent money.
 
@synth3tk Appcademy
 
wow, that sounds amazing. congrats, and have fun!
 
Good Evening Everyone!
 
Good morning everyone!
 
user1125394
I need to implement something to output important extrema of a time-series (means dropping extrema near a greater one)
 
6:58 PM
bah. still get an error when i try to confirm. guess the chickens are fighting back.
 

« first day (1050 days earlier)      last day (3916 days later) »