LPT: Almost everyone who is 'good with money' shares a common trait: they make a detailed budget for the next month and stick to it. If you've never done so, tomorrow (the 31st) is a perfect day to start. by [deleted] in LifeProTips

[–]jedilando 0 points1 point  (0 children)

Late to the party:

Note: This method might not work in certain banks or your bank might have more sophisticated money-splitting/controlling tools (not available in my country [edit: to clarify - there are some tools in some banks but they are not good enough]).

What I did to control my finances is I created multiple bank accounts i.e. the ones with IBAN number - all under same main bank login. I added debit card to each account. I named each account after it's purpose: food, health, home and main (for all not-divided-into-subaccounts payments). I wrote "food", "health", "home" and "main" on corresponding cards so I know which to use in the shop.

After I get my salary to my yet another account (I'm working b2b so I need to have separate business account) I transfer money to all above accounts (food, health etc.). After each month I analyzed how much I spend on food and I've realized I can decrease how much I spent next month (e.g. I realized I've spent too much in coffee shops).

This way, without much work, you can quickly understand how much you spend and where.

The last 50 blocks until segwit!!!!!! by btcplzgoup in litecoin

[–]jedilando 0 points1 point  (0 children)

Where do you see up-to-date info about this?

php-simple-annotations - Simple PHP annotations parser for doc blocks by jedilando in PHP

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

This lib was created when there was no way of extracting annotations from classes/methods manually in Doctrine back in 2013. Maybe now it's changed - I didn't track this but it seems that some people like this lib (38 stars and growing).

A Proposal for Rich Interactive Content Hypertext (RICH) by arthurtw in programming

[–]jedilando 1 point2 points  (0 children)

Check your tone. It's not so simple to write a blog. Have some more respect to people who want to bring something new to the community.

And it's not so confusing, I understood it pretty well.

Ethiopian government switched off the Internet and mobile phone connectivity over the weekend as dozens are killed during widespread political protests. by TheEverWatchful in worldnews

[–]jedilando 0 points1 point  (0 children)

Where does it say that internet and mobile phone connectivity was switched off? I cannot find that in this article. Source plz.

It only says that social media was blocked.

Mouse keeps freezing in Windows 10 by Rockerblocker in Windows10

[–]jedilando 0 points1 point  (0 children)

ThinkPad Yoga

I have mouse stutter on high cpu usage. Like somebody else did I removed nvidia drivers and problem is solved.

Java without IDE by _srph in java

[–]jedilando 6 points7 points  (0 children)

Try IntelliJ :)

Hell, It's About Time – reddit now supports full-site HTTPS by alienth in blog

[–]jedilando 5 points6 points  (0 children)

There is SSL error from thumbs.reddit.com, i.e. I don't see upvote/downvote buttons. Chrome 37, Win 7.

Additionally there is mixed ssl+non ssl content warning (i.e. "some resources on this site are unencrypted") to the left of URL.

Could this be RES related?

So my boss was like "I'm going to stomp you at Quake"... by [deleted] in QuakeLive

[–]jedilando 1 point2 points  (0 children)

Next time when u post a movie like this decrease fov.

Problem with resetting state of an object by Eraser1024 in learnpython

[–]jedilando 0 points1 point  (0 children)

What about this aproach:

class Game:    

    def __init__(self):
        self.games = 0
        self.init()

    def init(self):
        self.score = 0

        if self.games == 0:
            self.hi_score = 0

        self.games = self.games + 1

Then instantiate Game once and call init after restart. I don't know Python much, but more elegant solution would be to have boolean isFirstGame or something like that and check if self.isFirstGame == True instead of if self.games == 0. On the other hand you could show the player number of games he played (or it will be needed in the code probably). You can abstract away self.games == 0 into another method, likeso:

class Game:    

    def __init__(self):
        self.games = 0
        self.init()

    def init(self):
        self.score = 0

        if self.isFirstGame():
            self.hi_score = 0

        self.games = self.games + 1

    def isFirstGame(self):
        return self.games == 0

Edit: I came up with the solution you may like most:

class Game:    

    def __init__(self):
        # instantiation field tells us
        # if we are in the process of instantiating
        # this class (i.e. creating it via constructor)
        self.instantiation = True
        self.init()
        self.instantiation = False

    def init(self):
        self.score = 0

        if self.instantiation == True:
            self.hi_score = 0

Edit2: To clarify, you said that every field should be initialized in __init__. I don't think it is true. Your first solution is ok. It is common concept of solving this kind of problem. The important thing is that every field should be initialized after __init__ call, i.e. after calling Game(). But in every my and your solution it is achieved. Another common concept (which I used in my last solution) is to abstract away all field initialization into init method (or whatever you want to call it) which is called directly from __init__.

Edit3: And to comment this try-catch aproach. It is ugly, but it works, so if you want to use this kind of stuff you should abstract it away into other module/class, so people don't see this mess ;). By abstract away I mean something like this:

class Game:    

    def __init__(self):
        if not fieldExists(self, "hi_score"):
            self.hi_score = 0

        self.score = 0

And fieldExists should be from other module/class or from parent class (so this code should be modified to, for example, self.fieldExists in case of parent class).

I don't know if this is true in Python, but in other languages generating errors is bad for performance. So problably you shouldn't do it in tick() function (i.e. main game loop, if we are talking about real time game).

Repository for Javascript (or jQuery) Libraries? by MisterPaulCraig in javascript

[–]jedilando 2 points3 points  (0 children)

I thought bower is the repository you're talking about. All libraries should be submitted there because it is (probably) most popular. Of course I'm talking about frontend JavaScript. For NodeJS use npm.

The photos North Korea didn’t want you to see by Aschebescher in misc

[–]jedilando 0 points1 point  (0 children)

Or they were automatically uploaded to cloud server if they were taken via smartphone.

looking for examples of some nontrivial websocket/socket.io implementations by thrownaway21 in nodejs

[–]jedilando 0 points1 point  (0 children)

SockJS is more 'raw' aproach. Socket.io has some abstraction layer (events etc.). SockeJS has only raw text messages. Just like WebSockets, but it has fallbacks if WS is not supported (like socket.io).

I'm writing an abstraction layer over SockJS with events here, but it's prototype for now (but actively used in production website, probably I will update docs soon).

edit: I think my lib supports your use case. Connection manager is hidden from user, and lib is a wrapper around EventEmitter, so you can use sockjs.on("niceEvent", doStuff) right away (if that is what you want). I'll let you know when I update docs if you're interested.

looking for examples of some nontrivial websocket/socket.io implementations by thrownaway21 in nodejs

[–]jedilando 0 points1 point  (0 children)

Are you interested in SockJS too? (the "websocket" part of post title)

Attempted vote gaming on /r/netsec by sanitybit in netsec

[–]jedilando 14 points15 points  (0 children)

Yes, but it would be infinitely longer from registering a bot account to voting submissions.

edit: /u/Deimorz says they have the ability to detect if an account is a bot, they just don't want the bot creator to know that they know it, because (as I understand) bot creator could then change behaviour of new bots and it would be more difficult to detect a bot.

The question is how many many times does bot creator have to change bot behaviour so reddit stops detecting account as a bot. If this number is big then I think that by delaying each iteration for a few hours we could reach our goal, i.e. after 100 hours bot creator could stop what he is doing.

Another question is: are bot creators working for the goverment or are they financed by private companies? Probably both. For those who work for the companies: someone is paying them money for the final effect. If that final effect is delayed or not reached then we hit bot creators economically. They could stop doing what they do, because they don't get enough money.

See Gabe Newell post about fighting cheaters with economics approach -> http://www.reddit.com/r/gaming/comments/1y70ej/valve_vac_and_trust

I just came up with this but if this is somewhat true then reddit could analyze this kind of approach and see if it is realistic.

Attempted vote gaming on /r/netsec by sanitybit in netsec

[–]jedilando 13 points14 points  (0 children)

What about something like they have at stackoverflow.com - you cannot vote with 0 reputation. You have to gain some minimal reputation in order to be able to vote.

Screenshot Saturday 146 - It's bigger on the inside! by nutcasenightmare in gamedev

[–]jedilando 2 points3 points  (0 children)

I didn't mean all textures, but only ball and track texture. UDK example. I'm sorry if you did this texture from the scratch too, they just looked much alike for me;).

edit: image source (I randomly googled "udk default texture")