BhajunSingh
Members-
Content Count
10 -
Joined
-
Last visited
About BhajunSingh
-
Rank
Newbie [Level 1]
-
I certainly believe that global warming exists and that were are in a period of warming - it's quite undeniable, and a nearly all credible scientists would agree. But it is the cause, the degree, and the problems that will be faced from global warming that people simply can't agree on.I happen to believe that the global warming we are experiencing is natural for the most part. I don't believe that humans have had absolutely no effect on climate change - dumping millions of tons of carbon and methane into the atmosphere can't possible have no consequence, I do believe that we need to cut back regardless of whether global warming proves to be a threat or not on the simple premise of living more in harmony with earth. There is evidence mainly from ice cores that there exists a relatively short period (1500-2000 year) climate cycle that exists in the temperate and frigid zones (clearly there are no ice core samples from the tropics). Historical evidence does support this argument, with records of a Medieval Optimum, a period of higher than normal temperatures in Europe, and the Little Ice age that Europe experienced from the 16th to 19th centuries. No one has a clear answer to how global warming will affect us (even though people might claim they do), and so its up to us to consider what evidence there is, come to a conclusion, and decide what we individually want to do about it.
-
Custom Jpanel Class Does Not Show When Instantiated
BhajunSingh replied to Jeune's topic in Programming
The reason it shows up in the second one is because it has a give height: 300. In your first example, the JPanel doesn't, and for some reason the SOUTH area in BorderLayout does not tend to show components without a specified height.So, you could keep the first example by either adding something like drawPanel.setPreferredSize(new Dimension(300, 100)); or using BorderLayout.CENTER instead. -
Rankine is to Fahrenheit as Kelvin is to Celsius, and 0K and 0°R are both absolute zero. Basically, 0°C = 273.15K 0°F = 491.67°R Rankine is one of 5 lesser known temperature scales apparantly...Besides Rankine, I only knew of one other, the Réaumur scale, but there are actualy a few others: the Delisle, Remer, and Newton scales...learn something new every day Btw, why was this topic moved? I thought it seemed all right in the What is...? forum...
-
No, bin and cue format is a type of CD/DVD image - so what you can do is run a cd buring application to burn a CD image and select the .cue file, which if the index file. You don't need to convert it at all.But, if the video is in a VCD format, you can use VCDGear (http://www.vcdgear.com/) to convert the image to mpeg format.
-
Absolute zero is also 0K (Kelvin), which is the SI unit of temperature. Movement is theorized to stop at absolute zero because if ever reached and sustained (which is theoretically impossible), all heat energy will be removed from even the molecules, and without heat there is no molecular motion
-
Confused With Mousemotion Listener And Mouselistener
BhajunSingh replied to Jeune's topic in Programming
The method knows what happens because when the event object is generated, that information is provided when the event is created - I can't go into much more detail than that because I honestly don't know how its created. But I can go from a certain level...for example, look at this code from the Component.processEvent method: if (e instanceof MouseEvent) switch(e.getID()) { case MouseEvent.MOUSE_PRESSED: case MouseEvent.MOUSE_RELEASED: case MouseEvent.MOUSE_CLICKED: case MouseEvent.MOUSE_ENTERED: case MouseEvent.MOUSE_EXITED: processMouseEvent((MouseEvent)e); break; case MouseEvent.MOUSE_MOVED: case MouseEvent.MOUSE_DRAGGED: processMouseMotionEvent((MouseEvent)e); break; case MouseEvent.MOUSE_WHEEL: processMouseWheelEvent((MouseWheelEvent)e); break; } processEvent, first off, handles the newly generated event. The process of event generation is beyond me just because I never had the interest to find out Anyway, this block determines that the "raw" event is actually a MouseEvent, and it checks to see what type of MouseEvent it is...this, I believe, is what you're asking. To find out the type of AWTEvent is passed, you can get the ID of the event and compare it to some of the constant values in the different event objects, such as MouseEvent, MouseMotionEvent, etc...this ID value is added to the event during initialization, and as each id value is unique to each event type, the processMouseEvent (invoked by the block above) is able to call a certain method from the listener: int id = e.getID(); switch(id) { case MouseEvent.MOUSE_PRESSED: listener.mousePressed(e); break; case MouseEvent.MOUSE_RELEASED: listener.mouseReleased(e); break; case MouseEvent.MOUSE_CLICKED: listener.mouseClicked(e); break; case MouseEvent.MOUSE_EXITED: listener.mouseExited(e); break; case MouseEvent.MOUSE_ENTERED: listener.mouseEntered(e); break; } Now, if you're still asking how the event gets the id during creation, i don't know...but however it obtains it, the id remains constant throughout this process and throughout the api... I hope that helps a bit more now! -
Confused With Mousemotion Listener And Mouselistener
BhajunSingh replied to Jeune's topic in Programming
Basically, the component you set the event listener to keeps a track of all events performed to it. Lets start by clicking a ui component...such as a JLabel (I assume you're using swing, but it works the same for awt too). The event handlers built into all ui components extending the java.awt.Component class recognize a new user-invoked event and calls the processEvent method, which determines the type of event has been invoked. In this case, a mouse click I'm suggesting, the processMouseEvent would be called - or if the mouse was dragged across the component, the processMouseMotionEvent would be called.Now, all of this happens, even if you don't set up a listener of your own...it just goes unnoticed. However, when you add a MouseListener object to this JLabel, you're basically requesting that all events received by the processMouseEvent method notify your listener in your class, which in turn enables you to see exactly when a certain type of event is performed.Cool, huh? Hope that helped you -
I would recommend you first get an application called Process Explorer from https://technet.microsoft.com/en-us/sysinternals (They have some other great security utilities). When loaded up, go to Find->Find Handle and type in the filename of the first log or something (lcapi0.log). Hopefully you will then be able to find the process that is writing to the log file and decide whether you wish to remove it or not. If you do, depending on what the application is you might want to reboot into safe mode to uninstall it. Hope that helps
-
There are several ways. Executable jar files can be wrapped into exe files with utilities such as JShrink and JSmooth, and some other utilities can actually package the classes and jre into a binary executable to run from the temporary files. Finally, java files can actually be compiled into native code by using applications such as JET.Limewire, though, probably uses the jar wrapper method or limewire.exe is just a loader, included so you don't need jre installed to run it. I've never installed it, though, so I don't know for sure.
-
I find this kind of pure mathematics very interesting personally - its also really amazing to me how people were able to come up with this stuff thousands of years ago. Also, in case anyone's interested further in perfect numbers, each number has a direct relation with a unique Mersenne Prime number. A Mersenne prime is a prime number in the form of (2^n - 1), where n is also a prime number. So, for example, the first Mersenne prime is 3, where n = 2, the second is 7, where n = 3, and so on. To find the directly related perfect number, you take the Mersenne prime (2^n - 1) and multiply it with (2^(n - 1)). So for example, with n = 2, the Mersenne prime is 6, and the perfect number is also 6: (2^n - 1)(2^(n - 1))(2^2 - 1)(2^(2 - 1))(4 - 1)(2^1)(3)(2)6 And when n = 3, the Mersenne prime is 7, and the perfect number is 28: (2^n - 1)(2^(n - 1))(2^3 - 1)(2^(3 - 1))(8 - 1)(2^2)(7)(4)28 Hope that makes some sense Anyway, so basically, since Mersenne primes are smaller and have more searching formulas, they're used to find more and more perfect numbers...and as there are only 43 known Mersenne primes, there are 43 known perfect numbers. Also, on an off note, Mersenne primes are also the largest primes known...the 43rd MPrime was about 2^30,400,000ish...just over 9 million digits long Anyway, I ramble - I just find Mersenne primes especially, and the searching algorithms, very interesting. If anyone else wants to know more about then, http://www.mersenne.org/ is a good site - it runs the GIMPS (Great Internet Mersenne Primes Search) program that uses distributed computing to attempt to discover new Mersenne primes.