Forum Replies Created

Amit Member

It’s only your own perspective of the fact being negative that brings you to feel bad.
Not the fact itself, but your judgement of the fact and how you perceive it to be in your own twisted little head.

Amit Member

Your example of the ‘fact that you don’t have a girlfriend’ is the best example of why negative ‘facts’ do not really exist.

‘I don’t have a girlfriend? Ok maybe I should go get one, what do I need to do? I dunno, maybe I should ask guys who get lots of girls”. Every problem in your life is changeable and in my opinion, the fact that the future does exist, does come, that tomorrow will arrive, is good enough for me to say ‘Ok, I don’t have a girlfriend, but tomorrow I could meet the most beautiful girl ever who I fall madly in love with’.

Don’t ever think that life is pointless or is unfixable or isn’t going to get better because every decision you make, despite how insignificant or small you might think it is, makes a huge impact and what goes around comes around – so be good and good will happen.

One of the biggest lessons I have learnt in life is that everyone you see that has something? They earned that. Yes there are some who are ‘luckier’ but it was all their effort in the end. You don’t learn french unless you get lessons, you don’t get a girlfriend unless you talk to girls, you don’t get a job unless you apply for one.

There are the small percentage of times where you might get something without consciously doing something, but getting a job from some guy you met at a bar that you had a good yarn with is still applying, its just that it was unintentional which is why I say that despite how insignificant things you do might seem, they really aren’t and its not hard to make a big impact and change your world completely.

No such thing as negative facts, only negative opinion of facts.

Amit Member

Forcing yourself to think positively and smile is to me part of what being mature means.
Being sad is like trying to get this world to pity you, like when you were a baby and used crying to get what you needed.

As an adult you need to work for what you want. But really when you compare your life to the lives of people who lived before you.

or many people who live in 3rd world countries, you realize how lucky you really are, even if you don’t have all that you want.

Maybe having a girlfriend is a sort of luxury you know..?

With that said, I must admit it really depends on what that ‘true fact’ is..
If it something really harsh, distractions are the key.. (tv shows, games, whatever..)
Otherwise you should try to look realistically at the situation and see if it’s really that bad?

Other than that watching comedies and stand ups is always a mood booster and a good distraction.

Amit Member

With my best intentions, IT DEPENDS, I do not know if you should go to college. College is not for everyone, or put more accurately, institutionalized education is not for everyone. You could learn many other ways. College is a way to get a piece of paper (diploma), develop ideas that you are passionate about that are more easily accessible in academia, research, networking, partying, or getting laid. You will also accrue debt while you go to college.

Especially at your age, mid 20’s, its time to focus on career.

Have you thought about internships or apprenticeships in mechanics? Have you thought about just speaking with a professor and sitting in a class that may align with the interests you describe in your notebook? Have you spoken to professors at colleges, maybe an email for advice? Have you tried learning by yourself to innovate?

There is the education that is available through the institutionalized system
Then there is practical experience, which is also education, but is more hands on (i.e. mechanical vocational school, electrical engineering training, etc.) These are not “colleges” per se, however, they offer specialized training and will not force you to take ~ Steer Manure ~ history or english to complete training. Maybe this may appeal to you.

Once you become successful in your area of specialized training, maybe then, you can go for specialized certification. However, the whole point of college is either to do research or to get a diploma and two fucking letters to put on your resume. If none of those appeal to you, i suggest specialized training in doing something YOU LOVE. Networking with people who can help you with an entry level job in the field you like will be your new college, and then you can think about getting a ~ Steer Manure ~ degree online so you can go for your MBA when you want to start your own business or consult for other engineering firms.

Amit Member

When you learn with the purpose of comprehension and knowledge the speed of your reading is not that important in my opinion since you have to grasp a meaning and understanding takes time deepening on the field of knowledge you would like to acquire.
Especially when you want to learn about programming and cryptography – it’s helpful to learn about calculus and combinations, you don’t usually read it like a novel but in small bites that make you think and understand by thinking not just reading.

In general I’d recommend you to learn JavaScript first for web-based app development. With programs like Phone-gap you can convert your web app to android/apple.
And in extend to java script try some functional programming language like Haskell. This will broaden your horizon a lot and be very useful for your java-script development style.

Amit Member

Learn Linux if not already. It is one most important thing that a computer security specialist must learn.

Amit Member

I don’t really have any atm as I’ve been trying loads of different stuff.

Here’s what I’m basing it around on the first page:

I also have a form on the same page, and then I need to print the username on another page

Amit Member

Make a Calculator that accepts different inputs like polish notation, reverse polish notation, normal notation. You could support parentheses and the basic operations like plus, minus, multiply, divide, maybe even mod and pow. This will cause you to use a couple basic data structures like the stack and bonus points for parsing.

Amit Member

i’ve made some changes according to your suggestions please tell me what do you think ?

Worker * add_workers(Worker * factory, int * size){

Worker **arr,*temp;
int i,length;

printf("Enter number of workers for adding : \n");
scanf("%d",&length);
getchar();
arr=(Worker**)malloc(length*sizeof(Worker*));
size=&length;
for(i=0;iwd = (WorkDay*)malloc(sizeof(WorkDay));
printf("Enter the Worker name :\n");
gets(w->name);
printf("Enter ID :\n");
scanf("%ld",&w->ID);
printf("Enter number day's working in month: \n");
scanf("%d",&w->workdays);
w->wd = (WorkDay*)malloc(sizeof(WorkDay));
printf("Enter the day number : \n");
scanf("%d",&(w->wd->DayNumber));
printf("Enter the day's work hours : \n");
scanf("%d",&(w->wd->WorkHours));
return w;
}
Amit Member

Some logical errors in the below – struggled to convert some of your logic, see the comments for where these issues are. The code will compile though.

import java.util.*;

class WarezBB {

   private static ArrayList heap = new ArrayList();
   private static Scanner cin = new Scanner(System.in);
   
   public static void main(String[] args) {
      heap.add(0);
      
      int n,x;
      n = cin.nextInt();
      for (int i = 0; i < n; i++) {
         x = cin.nextInt();
         ubaci(x);
      }

      int m, y = 0;
      m = cin.nextInt();
      for(int i = 0; i < m; i++) {
         y = cin.nextInt();
         if (y != 0){
            if (heap.size() > 1) {
               System.out.println(heap.get(1) + " ");
               izvadi();
            }
            else {
               System.out.println("Nema!");
            }
         } else {
            ubaci(y);
         }
      } 
   }
   
   private static void ubaci(int x) {
      heap.add(x);
      int t = heap.size();
      // *something less than t /2 ???
      while (/* t/2 && */ (heap.get(t) > heap.get(t/2))) {
         int temp = heap.get(t/2);
         heap.set(t/2, heap.get(t));
         heap.set(t, temp);
         t/=2;
      }
   }
   
   private static void izvadi() {
      heap.set(1, heap.get(heap.size()));
      heap.remove(heap.size());
      int t = 1, r;
      while(true) {
         if (t*2+1 < heap.size()) {
            if(heap.get(t*2) > heap.get(t*2+1))
               r = t*2;
            else
               r = t*2+1;
         } else if(t*2 < heap.size()) {
            r=t*2;
         } else {
            break;
         }
         // NOT SURE WHAT YOU'RE DOING HERE... (CODE UNREACHABLE)
         if(heap.get(r) > heap.get(t)) {
            int temp = heap.get(t);
            heap.set(t, heap.get(r));
            heap.set(r, temp);
            t = r;
         } else {
            break;
         }
      }
   }
   
}
Amit Member

If you’re on windows look up using a Schema.ini to label the field names and type. Then all you have to do is something like SELECT * INTO tbl FROM [File Path] IN [Name of File] (I can’t remember the exact syntax now). You’ll end up with a table that has been imported nicely from a CSV.

If you need more info PM me and i’ll reply when I’m at work – I’m doing this kind of thing there at the minute. It’s a very fast and easy way of getting the data into a table.

Amit Member

Finally get it, before your reply Smile. But i made few fixes and it’s working like a charm.

// This IF format text like that
cat
cat
cat
cat
//
if(typ.equals("B")){
       int length=i+1;
       
       
       for(int x=0;x

And final question !

If want to format text like that (spaced) in the same line.
I.E. c a t d o g c a t etc.

And first thought is, chaAt, for loop and add space between letters ? Am i thinking right ? Smile

Somehow i managed to do that:

if(typ.equals("A")){
           int length=words.length();
           
           for(int z=0;z
    
in reply to: SQL login check help
Amit Member

Instead of using UID’s for that, why not create usergroups which have certain permissions?

Amit Member

You should be able to do

SimpleScreenManager screen = new SimpleScreenManager();
DisplayMode[] availableModes = screen.getCompatibleModes();
DisplayMode displayMode = screen.findFirstCompatibleMode(availableModes);
screen.setFullScreen(displayMode);
// do your funky stuff involving Graphics i guess
screen.update(); // everytime there is a change

import java.awt.*;
import javax.swing.JFrame;

/**
    The SimpleScreenManager class manages initializing and
    displaying full screen graphics modes.
*/
public class SimpleScreenManager {

    private GraphicsDevice device;

    /**
        Creates a new SimpleScreenManager object.
    */
    public SimpleScreenManager() {
        GraphicsEnvironment environment = GraphicsEnvironment.getLocalGraphicsEnvironment();
        device = environment.getDefaultScreenDevice();
    }

   /**
        Returns a list of compatible display modes for the
        default device on the system.
    */
    public DisplayMode[] getCompatibleDisplayModes() {
        return device.getDisplayModes();
    }


    /**
        Returns the first compatible mode in a list of modes.
        Returns null if no modes are compatible.
    */
    public DisplayMode findFirstCompatibleMode(DisplayMode modes[]) {
        DisplayMode goodModes[] = device.getDisplayModes();
        for (int i = 0; i < modes.length; i++) {
            for (int j = 0; j < goodModes.length; j++) {
                if (displayModesMatch(modes[i], goodModes[j])) {
                    return modes[i];
                }
            }

        }

        return null;
    }


    /**
        Enters full screen mode and changes the display mode.
    */
    public void setFullScreen(DisplayMode displayMode,  JFrame window) {
        window.setUndecorated(true);
        window.setResizable(false);

        device.setFullScreenWindow(window);
        if (displayMode != null && device.isDisplayChangeSupported()) {
            try {
                device.setDisplayMode(displayMode);
            }
            catch (IllegalArgumentException ex) {
                ex.printStackTrace();
            }
        }
    }


    /**
        Returns the window currently used in full screen mode.
    */
    public Window getFullScreenWindow() {
        return device.getFullScreenWindow();
    }


    /**
        Restores the screen's display mode.
    */
    public void restoreScreen() {
        Window window = device.getFullScreenWindow();
        if (window != null) {
            window.dispose();
        }
        device.setFullScreenWindow(null);
    }

    /**
        Updates the display.
    */
    public void update() {
        Window window = device.getFullScreenWindow();
        if (window != null) {
            BufferStrategy strategy = window.getBufferStrategy();
            if (!strategy.contentsLost()) {
                strategy.show();
            }
        }
        // Sync the display on some systems.
        // (on Linux, this fixes event queue problems)
        Toolkit.getDefaultToolkit().sync();
    }

}
Amit Member

If i were to change the program so it loops back around to put another letter (choice) do I use continue ? I also need to figure out how to end the loop if I were to put a different letter besides the 3 options.

Viewing 15 posts - 1 through 15 (of 108 total)