Slavi 94 Master Poster Featured Poster

OSI model,packets travel/communication, encryption
You might want to take a look at Computer Networking book for detailed explanation of the terms

Slavi 94 Master Poster Featured Poster

Will give me something to do for now, ty! oh, sockets for networking? I've tried java RMI but was a complete failure back in the days never managed to get it running

Slavi 94 Master Poster Featured Poster

Click Here

Let me know if it worked

EDIT: Something that might come handy is this found it on comments where couple of people had solved the issue following that link

it says to blacklist the rtl8192cu (or approximate) driver which is the driver I have currently functioning (same model and everything). I had to instead blacklist ath and ath5k.
Slavi 94 Master Poster Featured Poster

Sounds pretty cool making gui and everything, I will most definitely try it. Just 1 question ... I made a similiar application earlier this year and I had to implement vector clocks(to make sure in distributed computing that no "answers arrive before questions"), would I have to do that again as well if its multychat system? Or just try without to begin with and do if needed? But indeed, sounds like a good project to go for, thanks

Slavi 94 Master Poster Featured Poster

Hey James, Thanks for your suggestion!
Do you mean a chat system that can send private and group messages and for example "choose picture" button that can transfer a image file through?

Slavi 94 Master Poster Featured Poster

Me as one of the users in Dani web and a person who has interest in Java, I've tried to solve if not all, most of the begginers problems. I've even tried to solve some myself afterwards however, now I ran out of ideas. I would also like to move to a bit more complicated structures and projects bigger than 1-2 files. Something that is so to speak "real life projects", to gain some more experience. Can you guys suggest some projects that I could be working on? My goal is just to gain experience. Also, I would like to take a look at structures such as queues and stack, that are possibly used in a project/mid sized program. I am sure that with the great support in here, any project will be solved! :D

Slavi 94 Master Poster Featured Poster

Qurbani, your link points to this thread.

Cascer, The trouble you are facing is because of windows 8.1 . It has security enabled so you won't be able to run another OS basically, however there is a way around. I had Kali Linux on my pc and installed Windows 8.1 a few days ago. After hours and hours trying to play with grub/windows loader to show me to switch between both and being able to boot into them I found somewhere around google about a program called openBCD(i think it was). Ran it and now it works like a charm I can switch between both. To begin with I'd run gparted (Linux partition program) to check the hard drives and make sure that both OS are still on there(to make sure you havent overwritten windows)). There are some great guides for how to install Ubuntu dual with windows 8.1. But basically in most cases from what I found was that windows 8.1 has some security enabled and in order to be able to dual boot them you have to disable it before installing linux. (wasn't the case for me as I had linux already on, and I am not on ubuntu)

Slavi 94 Master Poster Featured Poster
  • gets pop corn * also I'd never ever suggest this but if it won't let you even sleep, then pain killers at that time might be somewhat a good idea(Just not the BEAR dose ones cuz they are addictive as far as I've heard)
Slavi 94 Master Poster Featured Poster

No beard for me ;) I even shave my chest, cuz my biggest hobby is bodybuilding so I clear off all the hair to show dem gainz ;)

Slavi 94 Master Poster Featured Poster

Many people in here are skilled enough to help you out but instead create your own thread instead of stealing a solved one!

Slavi 94 Master Poster Featured Poster

Connect to the router. Open cmd type in ipconfig. Find what it says at gateway (possible 192.168.1.1 or 192.168.0.1). Put that into a web browser and u'll get prompt to enter user and pw, I think it is admin and admin for both(At least was for mine if back to default settings) unless try to google what is the default for your router. Once in the GUI you can set up anything you like

Slavi 94 Master Poster Featured Poster

Thank you

Slavi 94 Master Poster Featured Poster

I think you can use Collections.sort(LinkedListObject)

Slavi 94 Master Poster Featured Poster

Is xp proven to be really vulnerable after the support stopped or is it expected to be within 12 months?

Slavi 94 Master Poster Featured Poster

Hey Mike!
Yes this helped amazing!

Just to mention for future usage, you have to fix gksu-properties within the current user you want to have the permissions not from the root account (I did from root, didn't work so tried from not root account the permission wasn't changed so just changed it on it and works like a charm!)

Slavi 94 Master Poster Featured Poster

update takes an object of type BodyDef. Then you can set it using the setters just as in the object bdef

Slavi 94 Master Poster Featured Poster

I just installed windows 8.1 and wanted to have a performance widget on the side but noticed that I don't have any inbuilt .. just google and found this . It seems incredable? Does any1 have any experience with it?

Slavi 94 Master Poster Featured Poster

Um, if you want to install it on that hard drive, burn the iso image on a flash stick and then install from flash drive. When asked which drive to install windows 7 on select that drive.The HDD for windows should have NTFS file system. I can give you detailed walk through of doing so if you want to try it( I just installed windows 8.1 on a hard drive that I had Linux only on and it was extremely painful trying to make windows 8.1 to dual boot ..)

Stuugie commented: Thanks I will try as you suggest and get back to you. +5
Slavi 94 Master Poster Featured Poster

Hey Mike, thanks for your response. My new user is a sudoer. I have installed a lot of software and changing desktop environment etc, setting date/time and everything required it to be a sudoer. If I run things from the terminal with sudo it asks for the user PW and then everything is fine. The updates are a graphical tool saying for example 60 updates are available

Slavi 94 Master Poster Featured Poster

I have Kali Linux and a week or 2 ago I made a new user which was a copy of root. Now I am getting message that new updates are available and when I click install it asks me for administrative password. When I enter the user's password I get error password is wrong, if i enter Root's password it says user is not root to update the programs. How can I give permission to the user to be able to modify those files/install updates?

Slavi 94 Master Poster Featured Poster

e.printStackTrace() in the catch block

Slavi 94 Master Poster Featured Poster

Try this

myPicture = ImageIO.read(getClass().getResource("Companylogo_FINAL.jpg"));

Slavi 94 Master Poster Featured Poster

Chrome/ium have stopped support for NPAP plugins since April 2014. Won't get this working, gotta used another browser ..

Slavi 94 Master Poster Featured Poster

So, basically I tried to do everything i found to fix this but nothing really worked .. (It works fine on my 32 bit pc using elementary os(Luna linux). However my laptop has Kali Linux 64 bit. I have chromium installed. Some of the things that I tried which worked on my pc back when I needed it: I just downloaded java's latest update jre1.7.0_60
In the folder amd64 in there, they have the java plugin libnpjp2.so and then I use the following command

sudo ln -s /usr/java/jre1.7.0_60/lib/amd64/libnpjp2.so libnpjp2.so

while being at /user/lib/chromium/plugins/

Afterwards I see the plugin in there, restart cromium, go to about:plugins and I dont see it there. Another thing that I tried afterwards is basically the same with IcedTea7 plugin from jdk-7 and again I don't see anything at about:plugins. On my pc, i am using icedtea7 and it works like a charm ... Any ideas?

Slavi 94 Master Poster Featured Poster
private static  String JohnDoe = null;
private static String name = JohnDoe;
BankAccount account = new BankAccount();
String name = askName();

When you ask for the name here, it returns null because it hasn't been set. Also becareful you have name string object global and within main. You want to avoid that and I don't see why do you create and set those strings to null.

The reason why you get null is because you don't set those variables on object creation (In a constructor) you just have created a variable name which has "JohnDoe" value but its not set to the new object. Make a constructor. It is a method which has the same name as the class and it executes always when new object is created. Within the constructor set those variables that you want to any values you desire

Slavi 94 Master Poster Featured Poster

Added to sudo group now using adduser <username> sudo

Slavi 94 Master Poster Featured Poster

That fixed it all! It's working great! Thanks for your time and help Hiroshe, much appreciated!!

Should I redo everything and use chmod -R 644 /home/<username> and skip 17-19? A bit confused on this as after you said
You've already set the executable bit with the last command. Why are you doing it again?

And, should the new user have permissions to access root folder and such? Because currently it has

Also, sudo apt-get update returns
<username>is not in the sudoers file. This incident will be reported

Slavi 94 Master Poster Featured Poster

Okay found solution to that incase any1 ever reads that here

Slavi 94 Master Poster Featured Poster

chsh requires the pw of the user, when typed it returns authentication failed. Tried with root pw as well still says authentication failed.

so if using chmod -R 744 /home/<username> then I dont need 17-19? Also, I used 744 here as suggested on one of the posts earlier.

but yeah from what I've seen digging in google chsh seems to be what might be the main concern for the problem right now. I tried it 2 days ago as well as i asked a friend and he said exactly that but even then it was failing to authenticate me

Slavi 94 Master Poster Featured Poster

Okay, I did some google digging, it might come down to the permission for /bin . I found in some other forums people say

make sure you are using /bin/bash instead of /bin/sh as your shell
Using /bin/bash fixed this issue for me.

My problem now I guess is that I don't have a bin folder in the new user?

I do have a bin folder in my File System, and the first file it in is bash. Is that what they are referring to?

Slavi 94 Master Poster Featured Poster

Okay so what I did step by step ..

Create the users home directory.

mkdir /home/<username>

Copy home over from root.

cp -r /root/* /home/<username>
cp -root/. /home/<username>

Create the account.

useradd <username> -d /home/<username>
passwd <username>

Set default permissions.

chown -R <username> /home/<username>
chgrp -R users /home/<username>
chmod -R 744 /home/<username>

Fix some other permissions.

chmod 700 /home/<username>/.profile
chmod 700 /home/<username>/.bashrc

This resulted in exactly the same state as before, in terminal the only thing that appears is the dollar sign and tab doesn't auto complete location/folder/file names. I can get the text files with permissions but its a bit weird since i am not sure if permissions are the problem now, everything else seems to be working normally

Slavi 94 Master Poster Featured Poster

oh I have .profile I guess this is the one we need. Running the commands now :)

EDIT: Um, no change terminal only shows $ and tab is just spaces. If I delete the user and remake everything again do you recon it would change something?

Slavi 94 Master Poster Featured Poster

don't have .bash_profile in root i got .bash_history , but I have .bashrc. Should I run only on bashrc? Also in the previous post you said 644 instead of 700, now 744, should I use 744 as last?

Slavi 94 Master Poster Featured Poster

cd/flash drive to install it on your computer and Internet(aka google)

Slavi 94 Master Poster Featured Poster

I used cp -r /root/. /home/<username> and it did copy all hidden hiles. I am now in the new user and everything works great. The only thing I didn't do was lines 17-19 because the files don't exist. Um, Another thing is when I type in terminal usually it shows <username>@pcName$ now it only shows $ and it doesn't auto complete directories using tab. I wonder if some of that was caused because I ran the new user before moving the hidden files?

Slavi 94 Master Poster Featured Poster

Okay I'll try it and get back :) Um, about malicious software, I just reinstalled everything completely so should be safe for now

Edit: When I used copy the root folder root/* with the star afterwards, doesnt that mean it would include hidden files too? At least I thoguht so

Slavi 94 Master Poster Featured Poster

^Also shotcut keys? :p

Slavi 94 Master Poster Featured Poster

Hey, I just tried it and all programs and files are available to the new user! Is there any way to move desktop environment and desktop effects or just set it again? Thanks by the way, much =)

Slavi 94 Master Poster Featured Poster

yeah its gnome by default, will try using that permission instead when I get home, thanks

Slavi 94 Master Poster Featured Poster
Fix some other permissions.

chmod -R 700 /home/<username>/bin
chmod 700 /home/<username>/.bash_profile
chmod 700 /home/<username>/.bachrc

Those file's dont exist in the newly created folder, its just copy of root(Which is basically the "home" for root user so it has Downloads/Documets etc)

I did the steps until then, when I try to log into the newly created account it just takes me back to log in screen

Slavi 94 Master Poster Featured Poster

Thats why I don't want to use it as root. Currently the only existing user is root and I want to create another one that has sudo group and can add/remove programs after entering password. However while running in root I spent like 2 days configuring my desktop and installing programs, then realized it was root user. So in order to protect my system I want to make antoher user but still use whatever is already installed. I wrote the thread after I made another user and all the settings are brought to default on that(Not taking after what was done by root)

Slavi 94 Master Poster Featured Poster

Just a quick question before I try it .. that means all settings and graphical changes/desktop effects will be the same right?

Also THANKS for the detailed commands and explanation

Slavi 94 Master Poster Featured Poster

I installed Kali linux and while i was running as root I installed quite some programs and made graphical changes etc, even changed desktop environment .. then made a new user so I won't be using root and the new user has all the default stuff and no access to anything I did in the root session .. is there any way to ..um .. maybe use root's session without the previliges until password is entered? :s

Slavi 94 Master Poster Featured Poster

You compare srtings with the method equals() in the String class
sdr.equals(rds). Equals would check whether the objects are the same, while == checks their references

Slavi 94 Master Poster Featured Poster

Pointers! :D I would say syntax. In c++ you also don't have garbige collection and with inheritance you have to play with the keyword virtual to satisfy the compiler.To me java is indeed much easier when with GUI's (at least to me)

Slavi 94 Master Poster Featured Poster

BufferedReader or Scanner to read the text file

Slavi 94 Master Poster Featured Poster

is your question how to create a 2D array?
int [][] Array array = new Array[Size][Size];

Slavi 94 Master Poster Featured Poster

When you declare a method, if it throws an exception of some kind, you don't have to use the try/catch block, if its not decleared that it throws an exception then you use try/catch. I'd rather use try/catch in most cases as you can print the strack trace of the exection in the catch, which will help you find/fix your error faster.

In your case what you want to see if it throws an exeption is the if statement itself. Also in the catch block you want to exceptionObject.printStackTrace()

Slavi 94 Master Poster Featured Poster

Is that what you were looking for?

Slavi 94 Master Poster Featured Poster

I asked a week ago a question about this, now I tried to google around and found this toHex method. It has an empty spot about the charset. For example I want to use UTF-8 but if I enter it returns an error and if I don't specify it, the output is huge amount of 0s and few numbers afterwards. My goal is a Hex representation of the entered string

public String toHex(String arg) {
    return String.format("%040x", new BigInteger(1, arg.getBytes(/*YOUR_CHARSET?*/)));
    } 
    public static void main(String[] args){
        EncodingHex ec = new EncodingHex();

        System.out.println(ec.toHex("abv"));
    }