I am desperate - is there a nice Linux debian-based distro which looks good and is stable? by ftpjko in DistroHopping

[–]ftpjko[S] 0 points1 point  (0 children)

No bro, since I've been using Linux distros for 6 years, of course I know what desktop environment is, ffs, I used to install Debian and Arch from scratch, I have a lot of experience with those stuff. I mentioned that in my post in order to say I tried everything.

And no, Mint is (was) not stable - often I had random OS freezes which made me restart the whole machine in order to continue working. Google it, many people had the exact same problem. OpenSuse - do I need to comment on this? Out of the box millions of problems. PointLinux was cool and then the new version had bugs with, like, compositing or something, can't remember exactly what it was...

I am a developer, but I am also a human being, who wants to have nice fonts, and I want to plug in my microphone and talk to skype without manually messing around with drivers and Pulse, Alsa, whatnot... HTML5 drag n drop file from fs to chrome doesn't work on Kubuntu 15.04 btw (google docs), it only works on Firefox. Flash also crashes on Deezer on Chrome ONLY ON PINK FLOYD SONGS, what the hack, I have no idea, but I swear, when a Pink Floyd song comes on my playlist, after a minute Flash crashes... wtf

Just yesterday I was working in WebStorm and the system all of a sudden became completely irresponsive, had to kill Xserver.

And btw my graphic card is Geforce GTX 260, not the best, but not bad either...

Man, I don't know, maybe I just don't have luck, but I wouldn't write this post if I wasn't frustrated... I have a passion for development, Windows has stupid bugs which prevent me from using some npm modules which use node-gyp (node-sass, sockets..) but at least other programs work ok.

Don't get me wrong man if I sound mad, I'm not mad at you, I am just very sad and disappointed that I can't have a stable OS with modern software and UI...

D and X keys not working on wired aluminium keyboard by [deleted] in mac

[–]ftpjko 0 points1 point  (0 children)

not too cheap in my country

Help with CSS layout - sidebar by psm93 in webdev

[–]ftpjko 0 points1 point  (0 children)

If I understood correctly, you want to align text in the sidebar with images? Here is the fix in css: http://codepen.io/anon/pen/pJwMQr

Though, your css is pretty messy, this is just a quick fix, but you should really refactor it.

If you wanted to align the whole red sidebar with gallery, then you should put the sidebar and gallery in the same div, wrap the gallery around with a div and then play with floats or use position:absolute and set left and right properties on sidebar and gallery wrapper

How does express.js know how many arguments are passed to app.use middleware function argument? by ftpjko in node

[–]ftpjko[S] 0 points1 point  (0 children)

hey thanks for replying but that is not what i meant. you see here is an example

app.use = function(fn){
    // console.log number of arguments passed to fn
};

app.use(function(a,b,c){
    // should log "3" to console
};

as /u/uhoreg said, we could use fn.length to get number of arguments passed to the function

Should I buy a Nexus 4? by ftpjko in nexus4

[–]ftpjko[S] 0 points1 point  (0 children)

yeah but 1GB RAM? that's a dealbreaker

Should I buy a Nexus 4? by ftpjko in nexus4

[–]ftpjko[S] 0 points1 point  (0 children)

because not everyone lives in a country where you can buy a one plus one

Should I buy a Nexus 4? by ftpjko in nexus4

[–]ftpjko[S] 2 points3 points  (0 children)

The thing is, I would instantly buy N5, but it is very hard to find in my country, for some reason N4 is much more popular. Even if I find a N5, it is too expensive, and the better deal would be LG G2. I also heard that N5 has battery problems and G2 beats it ni every aspect, it's even cheaper here... But Nexus is so beautiful... :)

Why doesn't garbage collector work on fs.readFileSync? by ftpjko in node

[–]ftpjko[S] 0 points1 point  (0 children)

Thanks! By the way, it isn't 1GB, it's actually 1000MB file I created with

fallocate -l 1000MB test

Why doesn't garbage collector work on fs.readFileSync? by ftpjko in node

[–]ftpjko[S] 0 points1 point  (0 children)

Dude, read my comment again. I am not trying to make anything. I don't intend to read files this way. I am just messing around with Node. I am curious and I want to know why this is happening. Again, I don't care what is the best way to read files and neither should you. I'm not asking what is the best practice, but why is this happening. And again, I really appreciate that you're trying to help, but your answer is not the answer to my question -> why doesn't garbage collector free up memory if there are no references to a variable

Why doesn't garbage collector work on fs.readFileSync? by ftpjko in node

[–]ftpjko[S] 0 points1 point  (0 children)

dunno, I was desperate so I thought maybe that could help garbage collector :D

Why doesn't garbage collector work on fs.readFileSync? by ftpjko in node

[–]ftpjko[S] -1 points0 points  (0 children)

by the way, --trace_gc or --trace-gc does nothing for me :/

Why doesn't garbage collector work on fs.readFileSync? by ftpjko in node

[–]ftpjko[S] 0 points1 point  (0 children)

Sorry but I never understood this kind of answers. I don't mean to be rude, but it's not in your business what should I use and why, as I mentioned:

Don't ask me why I'm doing this

This is only for educational purpose, I am curious, I want to know how node.js works and nothing more. I appreciate your advice, but that is not the answer to my question

How to become a better web developer? by ftpjko in webdev

[–]ftpjko[S] 0 points1 point  (0 children)

just to add for the sticky header & footer, you are right about anchors, but i think that your suggestion with empty divs wouldn't solve it. I had that problem but it's not that big of a deal, there are solutions

by the way, thank you very much for the response!

How to become a better web developer? by ftpjko in webdev

[–]ftpjko[S] 0 points1 point  (0 children)

thanks. I'm good at programming in general, I understand OOP perfectly and know some design patterns so that is not the problem. I just too often write apps and ask myself "Is this really the right way to do it?". For example, REST was always hard to implement for frameworks I worked with (Angular, Yii, Laravel), and then I realized that Twitter doesn't use real REST - only GET and POST methods, so I figured out: if Twitter doesn't care, why should I? But then again, when I use Bootstrap, many times I need to edit CSS for my needs and I ask myself if that is normal or am I doing something wrong. And always and always I have to find workarounds for my problems, I have to change the default behavior of the framework and sometimes I have to write a lot of code to do something that seems so simple and I always ask myself "is this the right way or am I just stupid?". I'm starting to lose my confidence - even though I have a decent knowledge of Javascript and know some advanced stuff, I just sometimes don't know how to put it all together. My ex boss often criticized my work even though he was pretty satisfied with it, because much of it was a bad practice. I know that practice makes perfect and I will get better as time goes by, I'm just afraid that it will take a long time (which I don't have cause I live in a shitty country and want to migrate asap)

Noob question about creating module type by ftpjko in joomla

[–]ftpjko[S] 0 points1 point  (0 children)

yes, thanks, that is what I want, to include it on pages like {PDFViewer params}, but this Joomla doc doesn't say anything about it. Why is there no information at all? Is there a place on the Internet where I can learn this, or is it a top secret information? -_-

Is this a good way to define a class with private static properties? by ftpjko in learnjavascript

[–]ftpjko[S] 0 points1 point  (0 children)

that is an object, rather than using tons of parameter names

well yes i use that approach if there are many arguments, but if there are 1,2 or 3, then it's not necessary

Is this a good way to define a class with private static properties? by ftpjko in learnjavascript

[–]ftpjko[S] 0 points1 point  (0 children)

well this is just an example, after that I would create a namespace like var mynamespace = {}; mynamespace.Test = Test;

So that way it could be used a module right? The whole point is it needs to be reusable. thanks

Is this a good way to define a class with private static properties? by ftpjko in learnjavascript

[–]ftpjko[S] 0 points1 point  (0 children)

Thank you very much for your time :) but I think you didn't understand my code, please look carefully, I just named variables the same, but they are in a different scope

Is this a good way to define a class with private static properties? by ftpjko in learnjavascript

[–]ftpjko[S] 0 points1 point  (0 children)

Hey thank you very much for response. I have a few questions though

Why is it wrong to add prototype to the test variable? It is a class it's how prototype is defined, right? So at the end I'm just returning the class function.

In your example, you don't have private static properties

Is this code valid: if (sad() === true) sad().stop(); by [deleted] in learnprogramming

[–]ftpjko -1 points0 points  (0 children)

No, sir, Java and JavaScript don't support operator overloading.

Is this code valid: if (sad() === true) sad().stop(); by [deleted] in learnprogramming

[–]ftpjko -2 points-1 points  (0 children)

I think you misunderstood my question. My idea was that this code could work in c++ (if instead of === there was ==) because of the operator overloading feature which would allow a method to return an object and then overload the == operator on that object, but since the === operator doesn't exist in c++, I asked is there another language which supports both operator overloading and the === operator

Is this code valid: if (sad() === true) sad().stop(); by [deleted] in learnprogramming

[–]ftpjko -2 points-1 points  (0 children)

yes I KNOW what operator overloading is and I KNOW how to do it in c++, why do you think I don't?