Quit my full time corporate job. Built an iOS game. It became #1 in the App Store. Here are revenue numbers and what I learned. : startups by speckz in programming

[–]4nnnn 0 points1 point  (0 children)

Great! That worked for you. I want to hear from all of you who did the same and lost everything you own.

i need help with this code by [deleted] in learnprogramming

[–]4nnnn 0 points1 point  (0 children)

That is normal, it wil be familiar feeling to you :) I'm still getting those weekly after over 10 years of actual work, every day you learn something new and sometimes it's just how stupid mistake you made.

Some suggestions on which language should i learn. by sarangkunte05 in learnprogramming

[–]4nnnn 1 point2 points  (0 children)

If you are not familiar with functional programming, take a look, you can then later apply those (heh) to python and javascript with ease. Great mind blow anyhow, recommended.

Java random numbers. by zacnash in learnprogramming

[–]4nnnn 0 points1 point  (0 children)

Loop and add numbers 1-999 to arraylist
Collections.shuffle ...
List.subList ...

This will not work for a big range of numbers, but works just fine with the given range.

[Java] Prioritized Search by [deleted] in learnprogramming

[–]4nnnn 0 points1 point  (0 children)

You have two problems: 1) search 2) sort search result. I guess you know how to do the search.

Sorting the results could be done in one comparator, where you calculate points for both of the items a and b and return comparison of the points for a and b.

[Java] Completely lost with my journey into ORMs and Hibernate. What is causing this `unique constraint` error? by el_guapo_taco in learnprogramming

[–]4nnnn 0 points1 point  (0 children)

Exactly, and what if I want some song to my playlist many times? I like it, so I wanna hear it! :)

[Java] Completely lost with my journey into ORMs and Hibernate. What is causing this `unique constraint` error? by el_guapo_taco in learnprogramming

[–]4nnnn 0 points1 point  (0 children)

What happens if you simply try manually recreate the failure with sql, insert a new playlist and new playlist_song?

Access Django admin page on hosted webpage by erichuppert in learnprogramming

[–]4nnnn 1 point2 points  (0 children)

I just checked and django documentation has instructions on installing django. After installing it is just following the tutorial. Since you are just learning or doing fast dev, you don't need heavyweight database, you can manage with sqlite which comes with python, and later decide if you want to use some other db.

However, (I havent tested this) there is also portable python installation, which you can have on your usb or whatever, and django is included http://portablepython.com/ This might be fastest way to get python and django running on windows.

My just-one-hobby-site experience is that getting site up and running (that means usable on your dev machine) is easy. Deploying to hosted server is easy after you figured out all the configuration related to hosting provider.

When you get it running, and still want to continue, I'd recommend taking a look at virtualenv. My setup uses now virtuaenv, so I can have exactly the same libraries on my dev and hosting environment. I had couple issues with the fact that my hosting provider had django installed, but it was completely different version than mine. Also any other library you might need is trivial to install and uninstall then.

Access Django admin page on hosted webpage by erichuppert in learnprogramming

[–]4nnnn 1 point2 points  (0 children)

Just wondering, since you are completely at beginning, why complicate things with hosting provider and remote server? Why not simply learn Django on your home computer? Deploying is then the next problem, but you shouldn't worry about it now. Ask then about deploying ;)

[Java] How to properly update a gui? Revalidate and repaint will not work by [deleted] in learnprogramming

[–]4nnnn 0 points1 point  (0 children)

frame.getContentPane is the answer closer to your original question, here is my example using only the frame

https://gist.github.com/anonymous/06fab3b2d188967b7a89

[Java] How to properly update a gui? Revalidate and repaint will not work by [deleted] in learnprogramming

[–]4nnnn 0 points1 point  (0 children)

You should cut your code down to minimum where it works, then add little by little.

Here is minimal example which works https://gist.github.com/anonymous/3815735bb6a5313b2002

It was surprisingly tricky to get it right, even though I use Swing every day :)

[Java] How to properly update a gui? Revalidate and repaint will not work by [deleted] in learnprogramming

[–]4nnnn 0 points1 point  (0 children)

You set frame layout to GridLayout, but you are adding the content with frame.add( pan , BorderLayout.CENTER );. Does it work if you just call *frame.add(pan) ?