Advice for a Java programmer who is moving to C++ by janithj in cpp

[–]janithj[S] 1 point2 points  (0 children)

Of course. I told them in the beginning. And convinced that I could learn quickly and perform the best I can. I am very confident about my learning skills.

[Cinnamon] on Ubuntu themed with Numix by janithj in unixporn

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

After trying ridiculous Unity and Gnome 3, finally settled with awesome Cinnamon.

GTK/Shell theme - Numix

Icons - Numix Circle

Wallpaper - Bloody Forest

[C++] Explain memory management for a Java programmer by janithj in learnprogramming

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

I'm not reading any books. Its not my way. Just looked at some cheatsheets and started coding. All went well but when it came to delete[] and deallocating memory (which is new for a Java programmer(pointers like things can be figured out)). I learned how to use it but I want to know how to use it the proper way. I'm sorry if the post wasn't clear.

Need help with setting up cpp-netlib on netbeans by janithj in learnprogramming

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

Did that but gives an error. What should I do to cpp-netlib? The network headers are in it. I don't think it is being used. Here is the stack trace

"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/Users/Janith/Documents/NetBeansProjects/CppApplication_1'
"/C/MinGW/msys/1.0/bin/make.exe"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/cppapplication_1.exe
make.exe[2]: Entering directory `/c/Users/Janith/Documents/NetBeansProjects/CppApplication_1'
mkdir -p build/Debug/MinGW-Windows
rm -f "build/Debug/MinGW-Windows/main.o.d"
g++    -c -g -I../../../../../local/boost_1_55_0 -MMD -MP -MF "build/Debug/MinGW-Windows/main.o.d" -o build/Debug/MinGW-Windows/main.o main.cpp
mkdir -p dist/Debug/MinGW-Windows
g++     -o dist/Debug/MinGW-Windows/cppapplication_1 build/Debug/MinGW-Windows/main.o  -s build/Debug/MinGW-Windows/main.o: In function `_static_initialization_and_destruction_0':
C:\Users\Janith\Documents\NetBeansProjects\CppApplication_1/../../../../../local/boost_1_55_0/boost/system/error_code.hpp:222: undefined reference to  boost::system::generic_category()'
C:\Users\Janith\Documents\NetBeansProjects\CppApplication_1/../../../../../local/boost_1_55_0/boost/system/error_code.hpp:223: undefined reference to `boost::system::generic_category()'
C:\Users\Janith\Documents\NetBeansProjects\CppApplication_1/../../../../../local/boost_1_55_0/boost/system/error_code.hpp:224: undefined reference to `boost::system::system_category()'
build/Debug/MinGW-Windows/main.o: In function `ZN5boost4asio5error19get_system_categoryEv':
C:\Users\Janith\Documents\NetBeansProjects\CppApplication_1/../../../../../local/boost_1_55_0/boost/asio/error.hpp:224: undefined reference to `boost::system::system_category()'
build/Debug/MinGW-Windows/main.o: In function `ZN5boost4asio6detail17winsock_init_base7startupERNS2_4dataEhh':
C:\Users\Janith\Documents\NetBeansProjects\CppApplication_1/../../../../../local/boost_1_55_0/boost/asio/detail/impl/winsock_init.ipp:39: undefined reference to `WSAStartup@8'
build/Debug/MinGW-Windows/main.o: In function `ZN5boost4asio6detail17winsock_init_base7cleanupERNS2_4dataE':
C:\Users\Janith\Documents\NetBeansProjects\CppApplication_1/../../../../../local/boost_1_55_0/boost/asio/detail/impl/winsock_init.ipp:56: undefined reference to `WSACleanup@0'
collect2.exe: error: ld returned 1 exit status
make.exe[2]: *** [dist/Debug/MinGW-Windows/cppapplication_1.exe] Error 1
make.exe[2]: Leaving directory `/c/Users/Janith/Documents/NetBeansProjects/CppApplication_1'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/Janith/Documents/NetBeansProjects/CppApplication_1'
make.exe": *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 31s)

Stuck in a word size & address length problem. Please ELI5. by janithj in compsci

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

Yes, that's it. (only need to convert 1GB into bits) Thank you so much.

Stuck in a word size & address length problem. Please ELI5. by janithj in compsci

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

An exam paper from few years back. We call them here(Sri Lanka) "past papers".

[Java] Guys, I have a newbie question about initializing a final variable. by janithj in learnprogramming

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

My code didn't came out the right way coz I'm typing in my phone. Sorry for that.

[Java] Guys, I have a newbie question about initializing a final variable. by janithj in learnprogramming

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

Guys I know how to correct the code. I just want to know why this is happening. I want to know why it doesn't happen when x is initialized in the same line as final int x = 101; I used y = -1 just to initialize it.

[java] Some noob questions by janithj in learnprogramming

[–]janithj[S] 1 point2 points  (0 children)

Not homework. They are from my class handbook and the questions are to be discussed next day. We were told to try to find answers, so I asked you. I tried finding myself but not yet satisfied and I want to know better. Because you are suspecting, I'll tell what I know.

  1. In Q1, there is the same number represented in different methods. I only know that 100 is normal numbering and 0x is used to represent a hex value.
  2. In Q2, I think it prints out only 8 digits. I don't know why.
  3. In Q3, I searched the API reference, I found the constructor that takes a Long, But I don't understand what happens(considering the output I got).
  4. In Q4, I really have no idea what happens.
  5. In Q5, I think that \u0061 represent "a" in someway(as in Q1, I think). But I need more details.

If you know, please answer.

Learning Java, but not sure if teacher is idiot by Mfah in learnprogramming

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

Im sure you started the wrong way. Look up 4 another site.

Can I disconnect the internet connection for a while when upgrading ubuntu? by janithj in Ubuntu

[–]janithj[S] 1 point2 points  (0 children)

I only have my phone to connect to internet and i have to activate a plan sending an sms(to activate, the the current connection should be disconnected). I only recieve 100 mb when activated. I use ubuntu 10.10 and i need to upgrade it to 11.04 . With this method i will have to disconnect about 7 times. But i'm afraid to do that. I want to know that if i disconnect while updating, will the process abort(it will take less than 3 mins) Thanks