Slavi 94 Master Poster Featured Poster
#!/usr/bin/env python3
# -*-coding: utf8-*-
def sayhi():
    print('hi everybody!')
def goodbye():
    print('see you soon!')
if __name__ == "__main__":
    sayhi()
    goodbye()
Slavi 94 Master Poster Featured Poster

python file.py

Slavi 94 Master Poster Featured Poster

Didn't that make grub your MBR? as in overwrite easyBCD?

The idea I was giving was to use super grub to get into your ubuntu and once there to reinstall the grub from inside

Slavi 94 Master Poster Featured Poster

Where does it say that the checksum is mismatch? Do you calculate it yourself and compare with the one provided on the server that the iso came from?

Slavi 94 Master Poster Featured Poster
Slavi 94 Master Poster Featured Poster

Did you import it? Is PySide.py in the same directory as your main.py?

Slavi 94 Master Poster Featured Poster

The easiest is probably to use a tool called Universal USB Installer, if you are putting on a Linux distro it can download it even for you, literally do all the job. Or you could just select an iso file and it will make a bootable flash for you.

If you want to do it using Linux, then you can use the following command:
sudo dd if=/path-to-the-iso-file/filename.iso of=/dev/sdb , where /dev/sdb is the location of the flash drive, which could be different for you, so make sure to check out. Something important here is that you need to unmount the flash drive before writing to it, this could be done using the following:
sudo umount /dev/sdb

There are a couple of more ways for doing this but those 2 are the main ones I use depends whether I am using Windows or Linux to make it

Slavi 94 Master Poster Featured Poster

Get a tool called Super_Grub2(Make a bootable flash of it), using that you should be able to boot in any OS that is installed on your computer.

If the image of the operating system is fine, you will have no problems booting in any of them and once in there you can try to configure your GRUB(I didn't read all the thread so not sure what exactly your problem is but limited with time right now)

If super grub2 can't boot you in, there has to be something wrong with the OS images themselves, in which case I guess you'd have to reinstall your operating systems.

Other thing that you could do is run live Ubuntu and from there run gparted as in sudo gparted and then show us how your HDD partitions from there.

If you got any further questions please do not hesitate to get back here

Slavi 94 Master Poster Featured Poster

Do you mean like this?

import time
run = input("Start? Y/N> ")
secs = 0
#if user's input starts with 'y' / 'Y' start counting
if run.upper().startswith('Y'):
    # Loop until we reach 20 minutes running
    while secs != 1200:
        print (">>>>>>>>>>>>>>>>>>>>>", secs)
        # Sleep for a second
        time.sleep(1)
        # Increment the second total
        secs += 1
Slavi 94 Master Poster Featured Poster

Since you encrypt using XOR and decrypt using XOR, wouldn't it work if you just run the same method encryptData twice? Once to encrypt it and once to decrypt it, however in the first case you use the plain text message and in the second you use the cipher text

Slavi 94 Master Poster Featured Poster

By move validing you mean this method?

bool ticTacToe::checkmove()
{
}
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

cout << " \n"; doesn't include it because it's printing only an empty line on that statement?

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

This is a guide of how loops work with examples by Oracle Click Here

Slavi 94 Master Poster Featured Poster

Okay, i just saw what James replied to your previous post, is this what you want:

If sum is 5 it will print

Sum is 5
Sum is 5
Sum is 5
Sum is 5
Sum is 5

If this is what you want, use loop as he said on your other thread, for loop will do it

Slavi 94 Master Poster Featured Poster

I am confused, do you have 2 variables called sum? One decleared globally and one that is a parameter of a method? Maybe show the entire code or give more explanation

Slavi 94 Master Poster Featured Poster

so if you print out the content of the arraylist now you get the numbers that are in the file?

Slavi 94 Master Poster Featured Poster

The print that we are doing there is just to check whether values were read from the file and added to the arraylist ...

fix your catch statement as this:

catch (FileNotFoundException e) {
             e.printStackTrace();
         }

and then this ..

 while(input.hasNextDouble())  {
              double value = input.nextDouble();
              System.out.println("Inside while with a value of "+ value);
              weight.add(value);
          } 

so that we can see whether your file is being read or not ...
not sure why it would give you an error if the file path is with /

Slavi 94 Master Poster Featured Poster

/ and // worked no problem

Slavi 94 Master Poster Featured Poster

I just tried this, works like a charm for me

public class Test {
    static Scanner input;
    static ArrayList<Double> weight = new ArrayList<Double>();
    public static void main(String[] args){  
        try { 
          input  =  new Scanner(new FileInputStream ("C://Users//Slavi//workspace//Tests//src//DeleteMe//file.txt"));                                           
          while(input.hasNextDouble())  {                                                  
              weight.add(input.nextDouble());
          } 
         }catch (FileNotFoundException e) {
             e.printStackTrace();
         }
        for (int i = 0; i < weight.size(); i++) {
             System.out.println( weight.get(i).toString());
        } 
    }
}

the output was

2.2
3.3
4.4
Slavi 94 Master Poster Featured Poster

It was inside the catch statement, you enter it if you get an exception, but you moved it out ...
did you change \\ with // in your path ...?

Slavi 94 Master Poster Featured Poster

try
System.out.println(input.nextDouble());
right after the while loop

oh and change \\ to //

Slavi 94 Master Poster Featured Poster

Oh, and I believe if you are running on windows machine, your path should be
// not \\

Slavi 94 Master Poster Featured Poster

Your for loop is in the wrong place, it is inside the catch statement, move it after and try again

EDIT: Well, this is what james said as well but didn't see his reply as I had the thread opened b4 that :(

Slavi 94 Master Poster Featured Poster

Yep
how do you read the file?

Slavi 94 Master Poster Featured Poster

well, try to print the array and see if it's empty

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

You can use packet analyzing tool, for example using Wireshark. It will display all the traffic in and out

But doing DDOS is not really something that you have to do yourself anymore rea
lly ... I've seen many online services offer to do it for you, at exact time of your wish and a duration of your wish. Further, I've even seen people sharing GUI's to their botnets for free etc(which I doubt they have no "bonus" inside or something)

Slavi 94 Master Poster Featured Poster

What I would do instead is something like this pseudo code

input from user // such as(name name1 name2)
split the input from user and your regex is space, into an array of Strings
at this point you have 3 strings into an array, your initials are the first char
for each of those strings 

String name = input.scanner(System.in);
String[] names = name.split(" ");
for (String s : names) System.out.print(s.chatAt(0));
Slavi 94 Master Poster Featured Poster

What have you done so far?

Slavi 94 Master Poster Featured Poster

What is the structure that you have now?

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

I bought 2002 Golf, 4 or 5 years ago then I moved abroad and never got the chance to use it properly ;(

Slavi 94 Master Poster Featured Poster

Pretty much what rubberman said, its VPN's that are used to do so, but you have to be extremely careful on setting up things, such as firewall policies ...

Slavi 94 Master Poster Featured Poster

from what I understand, when you click b2 for example, you want ur op1 to be 2? If so, in actionPerformed, the if statements .. for example

if source was b2
    if op1 is empty , op1 = 2;
    else op2 = 2;

and so on until you fill it for all of them.
At the end when all if else statements are checked, you can do operations the input or just write the answers out to the third text field

Slavi 94 Master Poster Featured Poster

Can you point out what is wrong in the output?

Slavi 94 Master Poster Featured Poster

Isn't it being printed just as a static string value in the print method?
perhaps if you show some code ..

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

Interesting ..

Slavi 94 Master Poster Featured Poster

Are you compiling from the src folder, or the class folder?

Slavi 94 Master Poster Featured Poster

Pretty much what @happygeek said,and watches like ... why ... I really thing that some absolutely unnecessary items are becoming part of our daily life and that would really affect the coming age of children, they' ll prolly end up being zombie-like connected to the net and games all the time while back in my childhood, net was something that we place in the middle and play games around

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

So basically you enter first number 5, second 20 and you are trying to find which multiple it is? how about 20/5 = 4?

Slavi 94 Master Poster Featured Poster

How about after each element added to the list check its size, if the size says it has 3 elements print it and set the list back to empty. Once all elements from the original big string/array are passed through, stop execution

Slavi 94 Master Poster Featured Poster

@Xlphos, Pretty sure that linux(in general) doesnt have troubles with NFTS although, it is meant to perform slower in some cases compared to Ext4 for example. Actually, If I were you I'd give it a go and format one of the existing empty partitions to EXT4 and see if SUSE can see it for installation. Something else quick that you can do is get ubuntu(or w/e else) on bootable flash and try to install it, check whether it is able to detect your partitions without asking to make 1(or multiple) automatically

Slavi 94 Master Poster Featured Poster

During the step where it asks you to create a partition, you can just select (an empty) already existing one instead

EDIT: Uh, not sure why SUSE won't list them, is that the actual problem you are facing?

Slavi 94 Master Poster Featured Poster

What I am saying is that you can perform the pertition before installing your openSuse. As to begin with, you mentioned you have no idea what pertitions you really have as you think that your windows os is on a pertition 75GB however, you don't get that 1 listed. Using GParted you'll see all existing partitions and you won't be in doubt what/where exists or not. As from there if you have a partition as mentioned earlier 400-somethin GB, you can separate it and then install SUSE on already existing partition instead of making 1 while installing it

Slavi 94 Master Poster Featured Poster

Run linux on bootable flash drive and use GParted to see your actual partitions. You can use GParted to create a partition for Linux only or anything you want, a separated one