@sebas when you're done not being impressed with my unpolished 2 day work, we can talk about how you're building rank. What would be a very simplified rule you're using for rank?
In the end, I learned not to care, to do what I believe was right. All of a sudden the Android room's quality increased, you could have technical discussions without twenty users asking for code, you could have fun discussions just like here.
So yea, that's more or less the story behind the Android incident.
Except for the jQuery animations which I had to use for the scroll-bar, it's all just backbone, if it was production code I'd even drop jQuery altogether because it's useless when your codei s bound the right way. If you open the HTML or JavaScript files you can see that except for the tool-tips (which don't really belong anywhere), I don't have a single selector
@AmaanCheval Nope. Users don't get rejected because of rooms they are in but because of how they chat in the other rooms, only the content gets evaluated.
@sebas If you want more data, you also get the number of successful recommendations, and a rating (Buy, Hold or Sell) and a number of total recommendations and a firm, you can use those if you need more fields
@BenjaminGruenbaum Still waiting for an answer to that friend request on FB. To be honest, I am just waiting for her to finally "deny" it and I am also considering the option to cancel the request altogether.
@BenjaminGruenbaum gist.github.com/Gacnt/3b4cb1b33964d9cb0dc7 this is what I have so far, I cannot figure out how to get my socket into that User class so that I can call it on inviteplayer
@sebas we can update the criteria we sort on, it's very straightforward, KnockoutJS which we just used has a very simple tutorial (at learn.knockoutjs.com ) , I chose to use it because it is the simplest, but we didn't have to use it at all, or could have used another framework, it just took care of the data-binding for us, otherwise we could have done the drawing manually
@sebas It's important to take from this how simple it is to manipulate data when we store it as data, programming tasks turn into, well, programming tasks when your logic isn't mixed into your presentation.
@sebas you can of course do this on the server side with PHP too and return the HTML, but that means you should do all the manipulation on the server and return the final HTML, if you want to change it you ask the server for an updated version. Either your logic is done in JS or PHP, as long as it's not in the DOM you're doing ok. You can ask the PHP room here for help on how to do it on the PHP side, they're a helpful bunch
This is a project where style isn't important, so I'm not going to search anymore, but if you have a cleaner solution for fixing my issue, it'd be appreciated.
Issue: TinyMce v3 ('cause a plugin I need isn't compatible with the next version) becoming huge (very high width, making the page need to scroll horizontally to almost half its size more to see the edge of the editor) if there is a lot of text.
My solution:
#tinyMce_ifr {
max-width: 800px !important;
color: red !important;
}
@BenjaminGruenbaum Last thing, gist.github.com/Gacnt/3b4cb1b33964d9cb0dc7 at the very bottom, the client side gets that object back, which is console.log keys, but when I for key of keys (coffeescript) key.username is undefined, why is that, it's clearly there, console.log key returns Gacnt
Eeehm, is there a way to reduce the scope of my CSS, or reset it for a particular part of the document? Because some of my CSS is affecting TinyMCE in weird ways, and not only is that unwanted, but it could be the cause of my width problem
@BenjaminGruenbaum I'm using socket.to(users[data].socket).emit 'alertInvite', socket.username and users[data].socket is the right socket id, but it's just alerting the person that clicked the link, not the person that should be receiving, am I suing socket.to wrong?
Grmbl. Been working for nearly an hour to use JBImages, only to discover that it gives TinyMCE the wrong paths and doesn't let me manage an image list. Too awesome.
The sad thing about Node, is there isn't much documentation for learning it, other than a book or two, you just kind of have to play with it, but it's really fun and powerful when you do
I asked this and I wanted to answer it myself but this guy answered it before I was able and his answer was better than what I was going to write, so I just accepted it and left a comment for stuff I wanted him to clarify :)
I was wondering how one would go about developing a website from scratch with node.js .
I understand how I could possibly do it, but I am interested in the best design practice.
I need this theoretical website to:
Do a lot of AJAX
Be very straightforward
Be relatively small
Connect to... let's...
Node.js version 0.10 was released today and introduced setImmediate. The Api changes documentation suggests using it when doing recursive nextTick calls.
From what mdn says it seems very similar to process.nextTick
When should I use nextTick and when should I use setImmediate?
This one is a PHP question, author said 'if you want to use node, you may' so I answered in node, explaining pretty much how the HTTP protocol works during that, I'm proud of that answer:
First of all, you can try this code yourself using the GitHub repo I created for this. Just clone the repository and run node header.
(Spoiler, if you're reading this and are under time pressure to get something to work and not in the mood to learn ( :( ), there is a simpler solution at the end...
It uses the net module, that's one level lower than the HTTP module, way lower than express
I ended up using domains, I have created the following file I called mistake.js which contains the following code:
var domain=require("domain");
module.exports = function(func){
var F = function(){};
var dom = domain.create();
F.prototype.catch = function(errHandle){
var args...
The Real Underlying Issue
This issue isn't just limited to socket.io. It is a well known problem called the Two Generals' Problem.
Two armies, each led by a general, are preparing to attack a fortified city. The armies are encamped near the city, each on its own hill. A valley separates the ...
> if integer ids are good enough for setTimeout and setInterval, they're good enough for setImmediate (named in the same vein). These were my attempt at weak refs in 1995, and they "stuck".
@ThiefMaster turns out, it's actually in the specification, whatwg.org/specs/web-apps/current-work/multipage/… , "Let timeout be the second argument to the method, or zero if the argument was omitted."
So calling setTimeout with 0 is actually supposed to behave the same, although I remember it being considerably slower when testing, at least in node
@OronM Welcome to the JavaScript chat! Please review the room pseudo-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.
is it possible to append an entire html file into a div when the ajax returns the file contents ? for example currently i add the contents of the page via to parent div via .innerHTML because its not just an element its both text and divs and other such things.
@Tukkan Welcome to the JavaScript chat! Please review the room pseudo-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.
@TheReddKing Welcome to the JavaScript chat! Please review the room pseudo-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.
guys i can't animate scrollTop from place to place because its always animating from top to exact place: $("html, body").stop().animate({ scrollTop: offsets[index] - 50});
@DemCodeLines just run call your script directly and instead of waiting for $_REQUEST or similar directly describe your var like $email= '[email protected]';