Slavi 94 Master Poster Featured Poster

Hello Mike,
thanks for answering :), About my os version, I am pretty sure its the latest one released. In order to get to the pepperflashplayer, I had to add a rep in my source.list file and then I could install it. As I mentioned, when I check my pc I get back that the newest version of it is installed but in my chromium I don't see it at all being listed. There is only 1 flash player, some old version of adobe flash which won't work and if I disable it, when i try to run a video it says "sockwave player cannot be loaded", if I enable and run a video, it says you need adobe flash player to run this

Slavi 94 Master Poster Featured Poster

?? if I didn't have it installed, --version would fail ..

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

Copy/Paste the whole thing didn't work as good as expected :D by the way, I am sorry for spamming on the thread lookin for answers but I spent pretty much all day and couldn't get it to compile correct at all, new ideas are always good I guess so DaniwebRules >.>

0c1282c3f9b6372b3efff842c2c8ea57

But then I changed it to @James's idea, and it worked, got 2 stars for it( out of 3). I kinda feel like I cheated on this one but owell couldn't move to the next section without it:( Thanks guys =)

Slavi 94 Master Poster Featured Poster

Some success but not fully :D ced94017276423c6b9042e152f214d53

Not sure why wouldnt it write out {1,2} now, the loop seems good enough also 1<2

Slavi 94 Master Poster Featured Poster

6b37486e52f7fa46b4942868eed5889a .

Slavi 94 Master Poster Featured Poster

Nope, same output :(

Slavi 94 Master Poster Featured Poster

Here take a look at this >.>

Slavi 94 Master Poster Featured Poster

Elementary os = Linux version of Mac :)

Slavi 94 Master Poster Featured Poster

Hey oussama, thanks for replying! Pretty much what I thought in my previous response :) Thanks for clearing tho, 1 thing though ... when I have the code as this

public static int[][] Puzzle(int[] numbers, int x) {

    int rows = 0,a = 0;
    for (int i = 0; i<numbers.length;i++){
           for (int j = i; j<numbers.length;j++){
               if (numbers[i] +numbers[j]==x){
                   rows++;
               }
    }} 

    int [][]b = new int [rows][2];
    for (int i = 0; i<numbers.length;i++){
           for (int j = i; j<numbers.length;j++){
               if (i!=j){
                   if(numbers[i]+numbers[j] == x){
                        b[a][0] = i;
                        b[a][1] = j;
                        a++;
                    }
    }} 
    }return b; 
    }

its slighty chnaged to ur version, if I need to find whether 2 numbers sum to 66 and the first number of the array is {33, i, i, i,i}, I get output that {0,0} is a correct anwswer, where i and j are pointing to the same element however I am trying to avoid that, I don't want to sum the same element. What I did was to add if(i!=j) but it doesnt seem to be workin, any clue why?

Slavi 94 Master Poster Featured Poster

Can't use array list, the compiler won't let me to :( How would I reduce the size to a correct one? like if i have array[3] but i could add only 2 items, how can I shrink it?

if array[i]!=0 can tell me whether array element is occupied and get the count of that then make new array of that count?

Slavi 94 Master Poster Featured Poster

Hey guys,
another one that I got stuck on(Although I passed 4000 points, soon to be on the leader board!:D) ... so here is the idea

I have an input array for example {1,2,3,4,5,6,7} and an int number for example 10; so what I have to do is return all combinations for which the sum of 2 numbers will be 10. such as {{3,7},{4,6}}.

The problems that I am facing is that I have to return a 2d array and I can't know its size until everything is checked. so I tried something simple just to get all into 1d array and then make sets out of that array. But problem again is the size of the 1d array. Here is what I have

public static int[] Puzzle(int[] numbers, int x) {
        int position=0;
        int[] a = new int[numbers.length];
        for (int i = 0; i<numbers.length/2; i++){
            for (int j=0;j<numbers.length;j++){
                if((numbers[j]+numbers[i])== x) {
                    a[position] = i;
                    position++;
                    a[position] = j;
                    position++;
                }
            }
        }
        return a;
    }

if my input is {512,1,3,5,3} and 4 , my 1d array has 1,2,1,4,0 then again the size is a bit too much and has to be redifined. I think a solution would be to make at this point new array of size position and move all from a to the new one and then copy it once again into 2d? Seems inefficient somehow

Slavi 94 Master Poster Featured Poster

I was just watching some of the educational videos from imperva on youtube, and one of them was session hijacking. Basically you can obtain a coockie, in some way such as cross-site scripting, and then use the coockie to access a web page where you will be logged in as the user who that coockie belongs to, though I am wondering, would this be the case if its htts traffic? Not even sure if that exists in https? Like can you even sniff packets?

Slavi 94 Master Poster Featured Poster

Got it ;)

Slavi 94 Master Poster Featured Poster
int [][] arrayOfSets = new int[5][5];
        int [] a = {0,0,0,0,0};
        for(int i=0; i<5;i++){
            for(int j=0;j<5;j++){
                arrayOfSets[i][j] = 0; 
               }
        }
        return arrayOfSets;

This solved it, had a typo in the code =D but I only got 1 star for it :( Any ideas on improving it?

Slavi 94 Master Poster Featured Poster

Hey guys,
I need to produce an output such as {{0,0,0,0,0}{0,0,0,0,0}{0,0,0,0,0}{0,0,0,0,0}{0,0,0,0,0}};
I have no input paramethers so I assume I need to have int[] array= {0,0,0,0,0} and then make 2d array of it?

I tried

int [][] arrayOfSets = new int[0][25];
        int [] a = {0,0,0,0,0};
        for(int i=0; i<1;i++){
            for(int j=0;j<5;j++){
                array2d[i][j] = a[i]; 
               }
        }
        return arrayOfSets;

But I get error array value is required pointing at a[i]

Any suggestions/ideas?

Slavi 94 Master Poster Featured Poster

This is a webpage, aimed to teach beginner programmers to program using either C# or Java, Note it is not a TUTORIAL, those are mathematical exercises and expressions. Dependent on how good is your code's performance you get a score(stars up to 3). I find it very entertaining, hope you do too

Slavi 94 Master Poster Featured Poster

Just to add up something, this is the case when you create a text file and you compile it using terminal. However, if you have an IDE project where you have the entire dependency tree with folders such as src and bin etc, when you compile a file which is in src/apples.java , you should compile it from the src folder so your command would be javac /apples.java , and then java /apples. Sorry had to mention this incase you get in this situiated because I remember few years ago, it took me ages to figure out what was wrong :D

Slavi 94 Master Poster Featured Poster

Thanks guys for your help :\ unfortunately after over 20 hours, still no success and I think I am giving up .. He'll be getting a new os, tried so many things even use the HDD as external to mine and use easyBCD to go in, it won't load past windows welcome screen, tried playing with /Boot/BCD , tried reparing it with easyBCD and so many things nothing really worked. Gave up :x

Slavi 94 Master Poster Featured Poster

cool

Slavi 94 Master Poster Featured Poster

Or even better, according to this i can delete the unwanted boot entries, including the 1 that is default currently using msconfig, however will I even be able to start that 1 through live usb of ubuntu? Like, I am really out of ideas how to make it boot into windows now ...or install EasyBCD from the live usb ?

Slavi 94 Master Poster Featured Poster

Basically, what I should do is access somehow the boot manager that already is there and probably make it so it has 10 seconds or so time before it boots to the default option where I can select the correct position of the os. Do you understand what I mean? I think from live usb I should be able to access the windows files right? but then what to change the boot loader?

Slavi 94 Master Poster Featured Poster

Hey Mike, the problem now is that I can't boot in the os, its in a countless loop restart - upgrade option, cant do anything if restart again it will go to the upgrade option again, it's not that I want dual os boot(I got easybsd for windows 8.1 and Kali on my laptop,it was the only thing that could bypass widnows 8.1 security not to boot other os)

Slavi 94 Master Poster Featured Poster

Okay guys, I am having a tough time tryin to figure out this one and I hope some of you can lead me to a right direction ..
My friend who has windows 7 as operating system, usually on boot up he has 3 options to choose inbetween and a 30 seconds to do so or it loads the default one. The default one was "Upgrade windows" or something like that, and he really got tired of seeing that massage and being on the pc as it starts to select the correct one so he went to windows 7 bootloader and chose to skip the 30 seconds time of choosing thinking it will auto start the correct one ... but instead now it doesn't have the seconds to choose and starts on the Upgrade option automatically, and that option is broken so nothing happens, if you restart the same thing over again ..

Now I had a similiar problem with my Kali linux but I managed to change the grub loader settings from a live usb ubuntu and I am wondering is that possible to do for this case on Windows? To access the boot manager, I think it is boot.ini file? Or anything else I could do to fix this?

Slavi 94 Master Poster Featured Poster

Nevermind , solved :)

Slavi 94 Master Poster Featured Poster

Hey hey ..I've got stucked onto another one ...

So, not sure how to explain this 1 but I can give an example ...

When input = 1 - expected result is a string = "a b c d e f g h i j k l m n o p q r s t u v w x y z"
When input - 2 - expected result is a string = "a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x z"

Note - "y" is missing on the second expected result

What I have so far is :

public static String Puzzle(int t) {
         String s;
         String alp = "a b c d e f g h i j k l m n o p q r s t u v w x y z";
         s = new String(new char[t]).replace("\0",alp);
         return s;
    }

Well, it works for the first 1 but I am getting absolutely nowhere further one, any suggestions? :s

Slavi 94 Master Poster Featured Poster

Last result should've been s.length()-1 , it works now thank you. Got 2 stars @ codehunt, no idea what to improve but I guess I' ll try to solve all before improving to 3 .. :p

Slavi 94 Master Poster Featured Poster

oh, didnt know thank, thanks James

Slavi 94 Master Poster Featured Poster

Hmm, thanks for your help .. this is how I converted it and I can't seem to find any difference now but I get IndexOutOfRangeException, can you spot something wrong in this?

String result = "";
        for (int index = 0; index <s.length() - 1; index++){
            if (s.charAt(index + 1) == ' ')
                result += Character.toString(s.charAt(index)).toUpperCase();
            else
                result += Character.toString(s.charAt(index));}
        result += Character.toString(s.charAt(s.length())).toUpperCase();
        return result;
Slavi 94 Master Poster Featured Poster

Here take a look at Click Here

Slavi 94 Master Poster Featured Poster

Um, 1 problem though .. I just made this code and it seems to work

public static String Puzzle(String s) {
       String ss = new StringBuilder(s).reverse().toString();
                //System.out.println("Reversed "+ ss);
                String[] sa = ss.split(" ");
                for(int i = 0; i<sa.length;i++){
                //System.out.println("Split "+sa[i]);
                String c = String.valueOf(sa[i].charAt(0));
                String c1 = String.valueOf(Character.toUpperCase(sa[i].charAt(0)));
                //System.out.println(c1);
                sa[i]=sa[i].replaceFirst(c, c1);
                //System.out.println(sa[i]);
                sa[i] = sa[i].concat(" ");
                }
                StringBuilder sb = new StringBuilder();
                for(int i =0; i<sa.length;i++){
                        sb.append(sa[i]);
                }
                s = sb.toString().trim();
                s = new StringBuilder(s).reverse().toString();
                //System.out.println(s);
                return s;
    }

The problem here is that if my input is "a<space><space><space> " , then I get exceptions. I think it will be same if I do ur last suggestions ;(

Slavi 94 Master Poster Featured Poster

I can reverse and use split, then I get an array of strings in which each string in there I want to capitalize the first char

Slavi 94 Master Poster Featured Poster

Yep

Slavi 94 Master Poster Featured Poster

Hey guys, I've got stucked on something here ... so to explain it here is an example.

Let's say I have a string "aa a i". My idea is to get a result that is "aA A I". -> this is a challenge on Codehunt and I got stucked on it. I think I figured out how to solve it but I can't get the coding right. So,
what it should be(I believe) first reverse the string so I have "i a aa" , then UpperCase the first char and every char that has a space before it. What I have so far (compiles but won't work correctly), where I am just trying to reverse the string, uppercase the first char, reverse back and return it with the last now letter uppercased

public static String Puzzle(String s) {
       String ss = new StringBuilder(s).reverse().toString() ;
       char[] c = ss.toCharArray();
       c[1] = Character.toUpperCase(c[1]);
       ss = new String(c);
       s = new StringBuilder(ss).reverse().toString();
       return s;
    }
Slavi 94 Master Poster Featured Poster

Thank you

Slavi 94 Master Poster Featured Poster

It worked thanks, just out of curiousity, would it be able to work if we don't substract 97?

Slavi 94 Master Poster Featured Poster

97 to 121 %122 gives it right but then when I go at 122 or higher than it gets scrumbled

Slavi 94 Master Poster Featured Poster

Hey guys, I am making something that it takes a char, then it sums it with 5 and returns the new char according to the ASCII table, for example input is 'a' , then output will be 'f'. This code is doing it somewhat ..

public static String Puzzle(String s) {
        char[] c = new char[s.length()];
        for(int i =0; i<s.length();i++)
        c[i] =(char) (s.charAt(i) + 5);
        return new String(c);
    }

but the problem is that if I get 'z' input for example, my result is not what it has to be since the program should return back from 'a' and forward till count 5 and return the new char. Any ideas how to work around this and keep it so that it loops back the the chars 97-122 (small letters in english)

Slavi 94 Master Poster Featured Poster

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

Slavi 94 Master Poster Featured Poster

"Professional atheletes are in many ways our culture's holy men:
they give themselves over to a pursuit, endure great privation and pain to actualize themselves at it,and enjoy a relationship to perfection that we admire, reward and LOVE to watch, even though we have no desire to walk that road ourselves. In other words, they do it "for" us, sacrifice themselves for our(we imagine) redemption." -David Foster Wallace

Slavi 94 Master Poster Featured Poster

sale

Slavi 94 Master Poster Featured Poster

@Mike, I don't think any passwords at all are stored in plaintext. In general back in the days they'd use a hash function such as MD5 to produce a certain length output characters that in no way can reveal your password. The problem in those such as MD5 was that if 2 users have the same password, it will give the same hashes. Do you see why is this a vulnerability? An intruder can create hashes for a password dictonary, and then just check those hashes with obtained password hashes and figure out what was the actual password .. For example Click Here you can enter a hashed word and literally immediately you'll be able to find out what the word actually was, as crackstation has a HUGE amount of stored hashes where they just perform hash to hash match. However, currently with the salting it seems more secure. I am not sure myself, whether it's been compromised in any way yet but indeed it is a good solution. As for those who are not sure what that is, a random workd called "salt" is added to your password, in which case even if 2 users have the same passwords, due to randomness in salts, the produced hash will be different and unless you know what the "salt" was, I don't see how it would be possible to find the password(Hash functions are 1 way, cannot reverse it from hash to plain text password)

Slavi 94 Master Poster Featured Poster

VMware and have windows on virtual machine?

Slavi 94 Master Poster Featured Poster

Check what is on line 14, you'll see why you get cannot convert from "double"

Slavi 94 Master Poster Featured Poster

I actually read an article about this yesterday and literally couldn't believe it, thanks for clearing. Also having Gmail account or any google account infact and not having 2step would be really self stupid, as they have their 2step not only by Google auth app, not only by sending an sms if you don't have a phone but also you could even generate backup codes .. Basically, theres plenty of options provided to have a secure access to your account(s). Although, I wonder what if you have no backup codes and your phone breaks, so you can't connect to the app? Are you out of your account for good?

Slavi 94 Master Poster Featured Poster

It would just return max - the greater of the two values and min - the smaller of them , such as

public int findMin(int a, int b)
    if(a>b) return b;
    else return a;

Likewise for max

Slavi 94 Master Poster Featured Poster

in your addNumbers do you want to add? - sum = number1 + number2 , your sum is never set

Slavi 94 Master Poster Featured Poster

Could you show us your client code? Also is there any reason to use RMI? I've had big time troubles with it as well and I'd , much rather use sockets unless its a must

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

bate