Slavi 94 Master Poster Featured Poster

Hey guys, I have a quick question here,
I have Python 2 installed on my machine and I read a book on Python and Vega's great threads. However, my next book that I am about to read states that I need Python 3 to compile the code on their examples, I was wondering whether it is possible to have Python 2 and 3 on the same machine installed, or do I need to remove python 2 before installing 3?

Slavi 94 Master Poster Featured Poster

Merry xmas and Happy New year guyzzzz :)))

Dani commented: Thanks for starting this! +0
Slavi 94 Master Poster Featured Poster

Okay .. so Here we go with my latest essay ...

I got repair disk on my usb and I ran it .. it worked well.

Then when I restarted, it was GRUB the default loader

where I get option to go to Kali or go to Win8

I went to Win8, it took me to easyBCD boot menu .. selected win8, went in made a new entry for easyBCD, restarted.
Once again grub was the first loader to appear, I clicked win8 went to easyBCD configuration, clicked Linux entry, still got my error message there ..

Restarted again using GRUB's menu now chose to go to Kali
It took me to command mode ... I clicked ctrl-alt-f7 to switch to gui mode and screen just went black. Restarted, while loading Kali I got into an error message .. like this so i followed what the guy in the commends said fsck /dev/sda1 and then i got prompted with many things saying that some stuff got corrupted others got changed etc and if i wanted them to be fixed .. I clicked yes ... after a reboot I got into GUI mode and it seems to be working as in I am able to boot into it

Well but now a bit weird that I get grub as default loader, and easyBCD still doesn't detect that grub loader. Not sure if i should just give up at this point as it works or not :D

Slavi 94 Master Poster Featured Poster

Oh wait, why are you using && operator? i cannot be 2 and 9 at the same time ... did you mean ||?

#include <iostream>
using namespace std;
int main()
{
    int i;
    for (i = 1; i <= 12; i++)
    {
        if ((i == 2) || (i == 9)){
            cout << " \n";
        }
        else {
            cout << i << '\n';
        }
    }
    return 0;
}
Slavi 94 Master Poster Featured Poster

Nope, let's take a look at it

For(int i = 0; i<AnyVariableOfYourChoice; i++)
basically says, for the integer i which is 0, as long as i is less than AnyVariableOfYourChoice, increment i by 1 after the code inside the loop has executed

So in your case it would be

for(int i=0; i<sum; i++)
     {
      System.out.println("Sum is " + sum);
     }

so you create a variable i and set it to 0, lets say your sum is 5. It checks the condition is i<sum? yes it is, so the code inside the loop executes, where it prints the sum and at the end after all the code inside the loop has been executed, it increases the value of i. Then for the next iteration i is 1 and it checks again and so on ... At the point when i is 5, the loop won't execute, however it will have executed 5 times already since i starts at 0

Slavi 94 Master Poster Featured Poster

What James said but I think you need to do it inside actionPerformed, so that is actually happening when a button is pressed not as a default image

JamesCherrill commented: Yes, that's what I intended +15
Slavi 94 Master Poster Featured Poster

He is trying to say that your loop may not execute even once, in such case your print out will be printing out 0/0. Maybe print just count and see if it ever increases to begin with?

Slavi 94 Master Poster Featured Poster

make a print method which is being called after each transaction and prints the updated contents

Slavi 94 Master Poster Featured Poster

your scanner object is supposed to read input from users, not an object of your class that has not even been decleared
I'd suggest you start again from this point, and ask about any line you add in your code that you are not sure about

import java.util.Scanner;
public class HelloWorld{


     public static void main(String []args){
        System.out.println(getInput());
     }
     public static String getInput(){
         Scanner scanner = new Scanner(System.in);
         return scanner.nextLine();
     }
}
Slavi 94 Master Poster Featured Poster

You can read through a text file and compare the words in the file to a word of your(or your user's) choice, if there is a match, then the word is in english unless it is not

Slavi 94 Master Poster Featured Poster

First of all, there is no need to write into an absolutely dead thread ..
Second, if you can't even think of a loop that can do 1 to 5, you might really want to consider starting from the basics ...
Third .. well here's a loop in 2 versions ..first for and then while loops

for(int i = 0; i<5;i++){
    System.out.println(i);
}

or ...

int i = 0;
while(i<5){
    System.out.println(i);
    i++; // means i = i + 1
}
stultuske commented: or the simpler version: System.out.println("1,2,3,4,5"); :) +13
Slavi 94 Master Poster Featured Poster

I can't express how sad reading this made me, from what I've seen on DaniWeb, he was amazing person, increadably skilled software developer and a human. RIP :(

Slavi 94 Master Poster Featured Poster

Ultimately, if you cannot resolve it I think you can create new project copy/paste the code, then right click your class Run as -> java application , should work

Slavi 94 Master Poster Featured Poster

Perhaps take a look in Here

Slavi 94 Master Poster Featured Poster

Protection in what way? As in communication to the router? Most routers now AES to encrypt the data, making it for hackers difficult to intercept(Man in the middle attack). If other encrypting algorithm is suggested, I'd advice you just leave it as suggested and go for AES, as thats the standard currently and the best known attacks on it are still practically "impossible". Another issue might be the security protocol used by the routers, the known ones are WEP, WPA and WPA2. WEP has been known to be broken for many many years, I think the world record for breaking it and getting the password to the router is about 7 seconds. WPA was released "quickly" to change WEP, however some flaws were found in it and WPA2 was released fixing those, therefore for security protocol of your wireless router, it is recommended using WPA2.

However, there is something called quick set up, known as WPS, which gives an easy connection to a device that has physical access to a router, as you can just enter a PIN to connect to the router. The problem is that the PIN can be brute forced easily .. there was another problem with the PIN itself which made it possible to brute force WPS in less than 3 hours(3 to 4 hours is average time to break WPS). So I highly recommend you, shutting off WPS option on your router if it is available.

With this said, I am using a TP-link router, …

Slavi 94 Master Poster Featured Poster

Nevermind, dumb moment only had to restart the server as the method didn't exist before i started it :p

Slavi 94 Master Poster Featured Poster
public class MyProgram{
    //Enter your code or be more specific when asking a question!
}
Slavi 94 Master Poster Featured Poster

Try reinstalling java jre, I think the latest version up to date is 8u25

Slavi 94 Master Poster Featured Poster

Seems like an assignment, what have you done so far? Here's some tips

While loop will keep the program running until user terminates it
cin operator takes an input from the user, such as 500, I assume your input is in grams? multiple it with 1000 and the result will be in kilograms.
cout operator can be used to print back to the user how much was the entered value in kilograms.
At this point you can ask the user whether he wants to continue or exit, using if/else statement will do it such as if user inputs 'q' , terminate the program else, start the loop over

If you face any issues post back with your current code and what exactly you need help with, as no one in here is willing to do it(your homework) for you

Meeno commented: it's not an assignment. i do have quiz tommorrow about do-while statment, but my instructor didn't teach us. so that i'm asking.. +0
Slavi 94 Master Poster Featured Poster

Havent done android inawhile but you created 2 buttons with 2 different id's , and if you don't link a handler to the first one, nothing will happen whenever it is clicked

Slavi 94 Master Poster Featured Poster

So, some time ago PPAPI plugins, were stopped to work on google's chrome n chromium for linux, which really sucked for me at least .. Just figured that google have something called pepperflashplayer and I followed this https://wiki.debian.org/PepperFlashPlayer/Installing to install it.It worked like a charm but the problem that I am facing is that in plugins there is no pepperflashplayer just some old version of adobe flash player. If I run
update-pepperflashplugin-nonfree --status
I get
Flash Player version installed on this system : 15.0.0.152

But again I don't see it and vids wont work :(

ideas/solutions?

Slavi 94 Master Poster Featured Poster

“Strength does not come from winning. Your struggles develop your strengths. When you go through hardships and decide not to surrender, that is strength.”
- Arnold Schwarzenegger

Slavi 94 Master Poster Featured Poster

Show us your latest version of the code

Slavi 94 Master Poster Featured Poster

Ok, so in order to find out whether it is a multiple, you can use the % operator, if it returns 0 then it is. If so, just divide the second number to the first number and u'll get the number you want. if you want to get all multiples of a number , up to 10 for example, you could do this

private int multiple;

public void findMultiples(int firstNumber){
     for(int i = 1; i<11; i++){
         multiple = i*firstNumber;
         System.out.println("Multiple at position "+ i+1 +"is "+ multiple);
     }
}

Is this what you need? I am sorry but as the others I am having troubles understanding the question

Slavi 94 Master Poster Featured Poster

I find it pretty easy to navigate through although I am not a windows fan. I barely use it mainly because I can't make eclipse luna to run on my linux but windows button + "S", makes life easier, you can just search for everything you need and all the system tools, just right click the start button. You don't really have to go to the start menu now at all, the search will bring you up any app you are looking for

Slavi 94 Master Poster Featured Poster

Did you try extracting your rar file? It is possible that the ISO image is inside as rar is a compression format

Slavi 94 Master Poster Featured Poster

Good articles get destroyed by weird spam, keep sharing @Geek thanks

Slavi 94 Master Poster Featured Poster

I am just wondering, how do browsers actually keep/save usernames and passwords? Is it in plaintext? or encrypted somewhere and then decrypted when a specific page is visitted?

Slavi 94 Master Poster Featured Poster

Pretty cool tbh, web pages really need to be more secure and shouldnt communicate in plain text(sending passwords/usernames)

Slavi 94 Master Poster Featured Poster

I have my Bachelors in Electronics and computer engineering. It will be really hard for you to do some of the projects as we were given, provided with most of the hardware we needed for our projects such as robot, line follower, where you start at the very begining and you have to make the hardware and the software yourself. But away, here is partly my education

Semester 1

Digital electronics, getting into VHDL and making a project with a small elevator. We had to make the software to move the elevator to different floors with some spesific reqs such as if the door is opened do not move and wait until it is closed.

Java Introduction with Blue J - Any java book would give you the basics, especially this forum. People in here are really skilled and I find the support extremely helpful for myself not only in programming. Also, google is your best friend but don't cheat yourself, try to write all the code yourself

Mathematics(Can't remember the exact name of the course nor any of the subjects)

Semester 2
Digital Electronics 2 - Getting into C language

Java 2, intro to Android

Project combined - we had to make a system that keeps tract of medical equipment, such as a knife, or anything. The idea is to have an rfid card that represents an item and rfid readers on each door so when an item is moved around the reader will send a data to …

Slavi 94 Master Poster Featured Poster

Welcome Parm

Slavi 94 Master Poster Featured Poster

You are trying to declear methods inside the main method. After you declare what you want to have in the main, make sure you close it }. Also its a good practice to always declear your methods public/private instead of leaving them with a default public one

Slavi 94 Master Poster Featured Poster

Have in mind that c++ is used for all platforms, you have access to memory using pointers. C# is used for making applications for Windows OS, newest .NET versions are really easy to use with or without much experience for creating graphics or animations. Python is a scripting language, as Hiroshe stated it is probably the easiest of those 3 to learn, you can learn the basics using it

qulu.quliyev.58 commented: can I use python for creating object priented programs such as calculator we use in windows ? +0
Slavi 94 Master Poster Featured Poster

This is how you can locate the image in your class folder
private Icon icon = new ImageIcon( getClass().getResource( "ImageName.png" ));

Then you can use the image to create a new Jlabel of it such as
private JLabel jl = new JLabel(icon);

Afterwards you can use the Jlabel to attach it to a Panel or anything you want to do with it

Slavi 94 Master Poster Featured Poster

In general people are not educated about security, thus this can really damange them. Security of public wifis can lead to losing private details such as bank card(I don't understand why would u use it on public network even on an SSL connection) etc, but on the other hand insecurying your own wifi is probably as much if not more dangerious. Currently had a friend who owned an IP address to be visited by police. Apparently someone had hacked his wifi, and sells stolen things from that address... trust me he had hard time proving it wasn't him ...

Slavi 94 Master Poster Featured Poster

Implement the game Rock-Papper-Scissors. By doing so, you'll get to play around with getting input by user and displaying the winner.

Further: Create a GUI for the game instead of using the command prompt

Even More! :D - include networking, create a server that receives inputs from 2 clients, check who wins and replies back to the players

Slavi 94 Master Poster Featured Poster

I'd also say wait for the eye to show up .. avoid real life contacts! :p

Slavi 94 Master Poster Featured Poster

You have to implement what happens if the grade is less than 0. Currently there is nothing and it just won't do anything about it

JeffGrigg commented: Yes; exactly! +6
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

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

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

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

I just saw someone doing a Combination Lock, the idea is to enter 3 numbers and if they match with the password, then you have gained permission. Pretty easy/simple and would definately be useful for people who just start