As many of you many know, In Europe we have a summertime and a wintertime. Twice a year, the clocks in all EU Member States are switched from winter to summertime (on the last Sunday in March) and back from summer to wintertime (on the last Sunday in October) (more info ). Now, the European Commision is about to propose to get rid of those clock changes. In Java, we have Calendars and, a calendar always knows the correct timeZone (i.e. GMT+1 for summertime and GMT+2 for wintertime). How does Java manage this? And, if it's changed, how would it affect to our systems? So, as I see on comments, there shouldn't be any changes because Java uses System Time and it's setted by NTP, right?

I have a Timestamp value that comes from my application. The user can be in any given local TimeZone.  Since this date is used for a WebService that assumes the time given is always in GMT, I have a need to convert the user's parameter from say (EST) to (GMT). Here's the kicker: The user is oblivious to his TZ. He enters the creation date that he wants to send to the WS, so what I need is:  User enters: 5/1/2008 6:12 PM (EST)  The parameter to the WS needs to be: 5/1/2008 6:12 PM (GMT)  I know TimeStamps are always supposed to be in GMT by default, but when sending the parameter, even though I created my Calendar from the TS (which is supposed to be in GMT), the hours are always off unless the user is in GMT. What am I missing?  Timestamp issuedDate = (Timestamp) getACPValue(inputs_, "issuedDate"); Calendar issueDate = convertTimestampToJavaCalendar(issuedDate); ... private static java.util.Calendar convertTimestampToJavaCalendar(Timestamp ts_) {   java.util.Calendar cal = java.util.Calendar.getInstance(       GMT_TIMEZONE, EN_US_LOCALE);   cal.setTimeInMillis(ts_.getTime());   return cal; }   With the previous Code, this is what I get as a result (Short Format for easy reading):  [May 1, 2008 11:12 PM]


I have a poker game that I have been working on and I hit a snag recently. All of the classes have been created, including a Card, Deck, PokerHand and a play method, but I wanted to test the probabilities of certain hands by doing iterations of the game. When I tried this, I got a null pointer exception on my selection sort method, which doesn't happen when I play it just once. Any feedback is appreciated :) (Sorry for any bad coding practices, this is my first year of Java)  Edit: For clarity, I'm only including the parts that caused the null pointer exception, which are the iteration method and the selection sort method. If the problem lies elsewhere, just let me know and I can include it.  public void stats()     {          System.out.println("\f");         int numRoyalFlushes = 0;         int numStraightFlushes = 0;         int numFourKinds = 0;         int numFullHouses = 0;         int numFlushes = 0;         int numStraights = 0;         int numThreeKinds = 0;         int numTwoPair = 0;         int numPair = 0;         int numHighCard = 0;         Deck deck = new Deck();         for(int i = 0;i < 1000000;i++)         {             deck.shuffle();             PokerHand cards = new PokerHand(deck, 5);             int xd = cards.evaluate(cards);             if(xd == 9)                 numRoyalFlushes++;             else if(xd == 8)                 numStraightFlushes++;             else if(xd == 7)                 numFourKinds++;             else if(xd == 6)                 numFullHouses++;             else if(xd == 5)                 numFlushes++;             else if(xd == 4)                 numStraights++;             else if(xd == 3)                 numThreeKinds++;             else if(xd == 2)                 numTwoPair++;             else if(xd == 1)                 numPair++;             else if(xd == 0)                 numHighCard++;             cards.putCardsBack(deck);         }         System.out.println("After 1 million hands, the stats are: ");         System.out.println(numRoyalFlushes + " Royal Flushes");         System.out.println(numStraightFlushes + " Straight Flushes");         System.out.println(numFourKinds + " Four of a Kinds");         System.out.println(numFullHouses + " Full Houses");         System.out.println(numFlushes + " Flushes");         System.out.println(numStraights + " Straights");         System.out.println(numThreeKinds + " Three of a Kinds");         System.out.println(numTwoPair + " Two Pairs");         System.out.println(numPair + " Pairs");         System.out.println(numHighCard + " High Cards");     }  public void selectionSort(PokerHand hand)     {          Card temp = new Card(0,0);         for(int i = 0;i < hand.size()-1;i++)         {             int smallestIndex = i;             for(int j = i+1;j < hand.size();j++)             {                 if(hand.get(j).getRank() < hand.get(smallestIndex).getRank()) // error occurs on this line                 {                     smallestIndex = j;                 }             }             if(smallestIndex != i)             {                 temp = hand.get(smallestIndex);                 hand.set(smallestIndex,hand.get(i));                 hand.set(i,temp);             }         }     }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I upgraded my RAM capacity from 8 GB to 16 GB of DDR3, but Windows still shows 8 GB. I tested several ways to fix it, but nothing happened. All the videos on YouTube says you must go to msconfig and in the "Boot" tab change maximum memory. But when I went there and checked this option, pressed OK and restarted, it changed back to 0 and the problem is still there. In my BIOS it shows 16 GB of RAM. See the screenshots below:    In msconfig -> Boot -> Advanced Options:    Same place after restarting:    This is what Resmon.exe shows:    RamMap program:    The RAM I use is 2x8 GB Corsair XMS3 1600 MHz DDR3 and my motherboard is an MSI 970A-G43. How can I make Windows recognize all the RAM?

After a rather arduous and convoluted series of problems that left me without a desktop for ~80 days, I've finally got the thing up and running, having replaced the power supply, motherboard, graphics card and CPU. Now, however, I'm experiencing the 'hardware reserved RAM' issue. Perhaps this is the exhaustion talking, but looking at the question that tends to get pointed to when this kind of topic gets locked as a duplicate hasn't helped.  I have 16 GB of RAM installed in an MSi 970A-G46, which is spec'd for up to 32 GB of RAM. The BIOS recognizes that I have 16 GB installed, and the resource monitor also shows the whole 16 GB, only it shows 8 GB as hardware reserved. I've seen suggestions that it's an OS issue, but the particular installation of Windows 7 (64-bit) which I'm running on my boot drive is the same as the one that could actually access the 16 GB in my previous motherboard (MSi 870A-G54).  I've updated my BIOS using the MSi Live Update tool and restarted the machine with no effect, and I cannot seem to locate any 'Memory Remapping' option as I've seen mentioned. I've physically swapped the RAM between the slots to no effect. I've unchecked the Maximum Memory box in the msconfig Boot tab's advanced options, also to no effect.  EDIT  In an effort to determine if it was possibly an issue with my installation of Windows having some sort of issue, I booted off a Xubuntu live disc and checked meminfo: the listed memtotal was roughly 8 GB.  END EDIT  These are my system's basic specifications   OS: Windows 7 Home Premium (64-Bit) Motherboard: MSi 970A-G46  CPU: AMD FX-8150 Graphics Card: XFX Radeon HD 6870 Boot Drive: OCZ Agility 3 Storage Drive: Samsung Spinpoint F3 ST1000DM005/HD103SJ 1TB PSU: Thermaltake TR-2 TR600 600W ATX12V v2.3   EDIT: Below is a link to a screen-capture of the Memory node information in Device Manager. This has been posted as an external link because I lack sufficient reputation to post images.


$con1=mysql_pconnect("localhost","root","") or die("not connected to server");  mysql_select_db("wheels",$con1) or die("not connected to database");  $con2=mysql_pconnect("localhost","root","",true) or die("not connected to server");  mysql_select_db("pakbikes",$con2) or die("not connected to database");  $con3=mysql_pconnect("localhost","root","", true) or die("not connected to server");  mysql_select_db("olx",$con3) or die("not connected to database");   but its not working it only connect 2 databases...

I have information spread out across a few databases and want to put all the information onto one webpage using PHP.  I was wondering how I can connect to multiple databases on a single PHP webpage.  I know how to connect to a single database using:  $dbh = mysql_connect($hostname, $username, $password)          or die("Unable to connect to MySQL");   However, can I just use multiple "mysql_connect" commands to open the other databases, and how would PHP know what database I want the information pulled from if I do have multiple databases connected.


I'm having this really weird issue that I thought I might ask about. On one of my computers the zero key will not work.  The zero key on the number pad works just fine, the right parenthesis works just fine, When I RDP in and try using the remote keyboard I'm still unable to use the zero key, when I use the alt code (ALT+48) it works and when I use On Screen Keboard I'm still unable to use the zero key.   If I open Microsoft Keyboard Layout Creator and try to test out the keyboard, it won't recognize the zero key either. However, If I click the start button, click on the search box, and press zero the text will disappear (telling me it is recognizing me pressing the key).  I'm pretty sure it's not the keyboard drivers, since it's not working over RDP or with OSK. But it still could be windows drivers, I'm just not sure which ones.  I'm just curious if anyone has had similar issues and might like to shed some light on the issue.

I have been having this problem for quite a while now, and I thought it was a problem with my keyboard, however upon getting a new keyboard today I'm experiencing the same problem.  The zero key on my keyboard doesn't seen to do anything, however when I press shift it does produce a ")." I am not experiencing this problem with the zero key on the keypad, that works fine.  What I have noticed when I press the zero key while I'm typing is that is seems to remove the ClearType or something. Screenshot  )   The Ds are before pressing zero, the Gs are after.  Any help would be greatly appreciated. This is driving me crazy at this point.  Thanks


I'm trying to identify a novel from the mid 1990s that was based around the idea that a certain subset of the population lived a double life. When they slept they existed in a medieval world and when awake they lived in our current world.   The protagonist was under the impression that he was the only one living this double life. Eventually he was discovered by the others who had this power. As it turns out those that lead this double life had some magical abilities. Their powers were in pairs: life/death, water/fire that sort of thing. The protagonist is able to manipulate life and death.   Some adventures ensue, the details of which I cannot remember. I do remember that in the end of the book the protagonist saves somebody's life by taking the life force of his own unborn twins.   It always felt like a book crying out for a sequel but I never found one and I've since lost the name of the book.

I read a book in my high school library back in the late 90s and pretty sure it was written in the mid 90s. I can't remember the author or title.  The setting is current to the 90s mid-west. But it also takes place in an alternate medieval style fantasy world that only certain individuals can go to via falling asleep.  The main character is a gas station attendant in his early 30s, whose father left or died and he inherited a storage container full of odd stuff. For as long as he can remember he has had these real dreams where he is a monk at a monastery scribing books. He has no knowledge the dreams are actually a real world, that he's part of a family who can travel between the worlds.   Those that can travel between the worlds also possess binary magic, it uses opposites: life/death, fire/water, strength/weakness etc. The main character discovers that he can use life/death. Two strangers save him from the monastery, a woman using strength/weakness and her son who uses fire/water.   The two strangers who rescue him from the monastery are trying to take him to their family holdings to explain why he is important and what the other world is.  In the modern world he is falsely kidnapped and rescued to introduce him to the families, because they want a magical relic that each family has and that his father has taken and hidden.   Because he is new to binary magic and not taught the same rules as everybody else growing up he learns new things that were never considered, such as holding the bond open so he can see other people using magic etc.


I'm trying to fade out an object by using a transparency BSDF. With Transparency set to 0 it looks like:    When turning the transparency up to 100% to get the structure opaque I get this result:     I have no idea where those dark areas are coming from. The mesh I'm using has been imported from an obj file and was originaly created with a CAD software. I have tried to recalculate surfaces and removed all doubles, but I'm still getting those dark areas.   As I want to use it in an animation I think I could turn up transparency and just before it should go 100% transparent I'd set a keyframe on Restrict Rendering in Object Explorer, but I think it still might look a bit "harsh".  Does anyone has an idea, what could be wrong?   Thank you!

Using v2.73, cycles and a very simple scene: an array of cubes, no big deal.   If I set the shader's material to transparent, the cubes in the foreground do become transparent but those far away in the back do not disappear completely and this strange dark things appear (visible in rendered mode and in final renders)    I've played with the clipping distance on the viewport and camera, but I can't figure out how to make those ghosts go away...


When I entered sudo apt update, It showed the following err. ~$ sudo apt update      Hit:1 http://ppa.launchpad.net/sylvain-pineau/kazam/ubuntu focal InRelease       Hit:2 http://archive.canonical.com/ubuntu focal InRelease                        Hit:4 http://ppa.launchpad.net/ubuntuhandbook1/audacity/ubuntu focal InRelease       Hit:5 http://ppa.launchpad.net/ubuntuhandbook1/avidemux/ubuntu focal InRelease       Err:3 http://www.getdeb.net/ubuntu focal-getdeb InRelease 403  Forbidden [IP: 143.95.32.90 80]                         Hit:6 http://in.archive.ubuntu.com/ubuntu focal InRelease        Hit:7 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease      Hit:8 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease      Hit:9 http://in.archive.ubuntu.com/ubuntu focal-security InRelease      Reading package lists... Done      E: Failed to fetch http://archive.getdeb.net/ubuntu/dists/focal-getdeb/InRelease  403  Forbidden [IP: 143.95.32.90 80]      E: The repository 'http://archive.getdeb.net/ubuntu focal-getdeb InRelease' is not signed.      N: Updating from such a repository can't be done securely, and is therefore disabled by default.      N: See apt-secure(8) manpage for repository creation and user configuration details.  Thanks in advance.

I'm trying to install programs/files from the getdeb repo but get a "check your internet connection" error.  Programs than I've tried include Qbittorrent and Mozilla-Plugin-VLC.    Through the terminal I get the following errors:  Err http://archive.getdeb.net/ubuntu/ natty-getdeb/apps qbittorrent amd64 2.8.2-1~getdeb2   Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host) E: Failed to fetch http://archive.getdeb.net/ubuntu/pool/apps/q/qbittorrent/qbittorrent_2.8.2-1~getdeb2_amd64.deb: Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host)   &  Err http://archive.getdeb.net/ubuntu/ natty-getdeb/apps mozilla-plugin-vlc amd64 1.1.10-1~getdeb1   Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host) E: Failed to fetch http://archive.getdeb.net/ubuntu/pool/apps/v/vlc/mozilla-plugin-vlc_1.1.10-1~getdeb1_amd64.deb: Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host)   I'm not having any problems adding/removing other programs/files from my machine.  Is there a problem with GETDEB repo (and if so, is there any way to fix it on my end) or is there something wrong with my computer's configuration?


I have noticed that some Linux Servers in Network takes long time to connect using ssh.   Situations:   There are two situations I have faced:   On some servers some times it takes a long time to ask for password but on other servers When I insert the password it doesn't respond . And after some time say 20 0r 30 seconds it just say Connection Closed   Detail for 1 case:  debug1: Authentications that can continue: publickey,gssapi-with-mic,password debug1: Next authentication method: gssapi-with-mic debug1: Unspecified GSS failure.  Minor code may provide more information Cannot determine realm for numeric host address  debug1: Unspecified GSS failure.  Minor code may provide more information Cannot determine realm for numeric host address  debug1: Unspecified GSS failure.  Minor code may provide more information   debug1: Unspecified GSS failure.  Minor code may provide more information Cannot determine realm for numeric host address  debug2: we did not send a packet, disable method debug1: Next authentication method: publickey debug1: Trying private key: /home/umairmustafa/.ssh/id_rsa debug1: Trying private key: /home/umairmustafa/.ssh/id_dsa debug1: Trying private key: /home/umairmustafa/.ssh/id_ecdsa debug2: we did not send a packet, disable method debug1: Next authentication method: password

Running ssh user@hostname takes ~30s. Here's the scenario:   this is a VM on the local LAN Windows and Mac machines get instant login am using Debian and I could reproduce with an Ubuntu machine someone using Ubuntu says that logging into my machine (local LAN) is also instant using hostname IP address takes about half as much time (~15s)   [update]  Using ssh -vvv user@hostname, here's where it waits the most:  debug3: authmethod_lookup gssapi-with-mic debug3: remaining preferred: publickey,keyboard-interactive,password debug3: authmethod_is_enabled gssapi-with-mic debug1: Next authentication method: gssapi-with-mic   And then it waits a bit here:  debug1: Unspecified GSS failure.  Minor code may provide more information Credentials cache file '/tmp/krb5cc_1000' not found  debug1: Unspecified GSS failure.  Minor code may provide more information Credentials cache file '/tmp/krb5cc_1000' not found


I was doing a physics problem out of my textbook, which could paraphrased as follows:  There’s a frame suspended at rest from a coiled spring. A mass of flexbile putty is dropped onto the frame, causing the frame and putty to move downwards together. What is the maximum distance the frame goes downward?   The problem could clearly modeled as a collision followed by an energy conservation problem.   However, after thinking about it, I couldn’t come up with a justification why momentum should be conserved in this inelastic collision, considering that the net external forces on the frame-putty system are not zero (putty experiences gravitational force, frame experiences gravitational and elastic, right?).   After reviewing the solution, they give no justification why momentum should be conserved in this case, but they utilize an inelastic collision with momentum conservation.   Any thoughts on what I’m missing here?

A bullet of mass 20 g travelling horizontally with a speed of 500 m/s passes through the wooden block of mass 10 kg initially at rest . The bullet emerges with a speed 100 m/s and the block slides 20 cm before coming to rest. Find friction coefficient between block and surface      My teacher solved this question by conserving momentum between the bullet and the block. But how can he do that when there is external force (friction) acting on the system? I think impulse momentum theorem is used in such scenarios, but how can I apply it in this problem?


Related, but no longer reproducible:   Background  I  on Stack Overflow, when I noticed that none of the links in the "about me" section and also the link to a custom page (the one with the chain icon on the right side) worked. I guessed that this was due to the new users limitations, which are removed after you reach 10 rep.   Also see  and this  from chat for more context on the problem I had.  But  (thanks for digging the FAQ out) found out that the  and the  both state that:     [New users can't] post more than eight hyperlinks at a time, either in a post or their user profile.   How it looks, this has been reduced or completely disabled in the meantime. Anyway, the FAQ on meta.SE, SO and very likely all other sites should be updated to state correct information.  EDIT: Please note that the question isn't about the network profile page, I understand that links are disabled there (See the comments). The problem relies in the FAQ/the site-specific profile. The reason posting that here and not on meta.SO is that this problem likely relies also on other sites.

I have a link in my profile, advertising a Stack Exchange question of mine (which I believe is acceptable use of the profile page). The link works fine on my individual profile pages. For example,  and . However, on  the links do not show.  The link is present on the GIF and on the text (two separate links, both to the same place). Both work fine on the individual profile pages but both are absent from the network profile page. The GIF and text are present, just without being linked.  Is there a reason for disallowing links from the network profile page, or is this a bug?


I want to distribute python code in packages, however it is proprietary code that will be stored on client's servers so I do not wish to share the source.  Is it possible to produce a Python Wheel with obfuscated code or removed code?

I am developing a piece of software in Python that will be distributed to my employer's customers. My employer wants to limit the usage of the software with a time restricted license file. If we distribute the .py files or even .pyc files it will be easy to (decompile and) remove the code that checks the license file. Another aspect is that my employer does not want the code to be read by our customers, fearing that the code may be stolen or at least the "novel ideas". Is there a good way to handle this problem?


Partially inspired by , what size of an object could you create with  if the target was affected by ? And what size would the object be after Enlarge/Reduce wears off? True Polymorph says (among other things) (emphasis mine):  Creature into Object. If you turn a creature into an object, it transforms along with whatever it is wearing and carrying into that form, as long as the object's size is no larger than the creature's size. The creature's statistics become those of the object, and the creature has no memory of time spent in this form, after the spell ends and it returns to its normal form.  Enlarge/Reduce says:  Enlarge. The target's size doubles in all dimensions, and its weight is multiplied by eight. This growth increases its size by one category-- from Medium to Large, for example. [...] Reduce. The target's size is halved in all dimensions, and its weight is reduced to one-eighth of normal. This reduction decreases its size by one category--from Medium to Small, for example. [...]  The two spells both require concentration so they would of course have to be cast by two different people. The options I see here are  Medium creature is enlarged to a Large creature and then polymorphed into a Large object. Spell wears off and the Large object is now Medium object since it's still a valid target for E/R.  Medium creature is enlarged to a Large creature and then polymorphed into a Large object. Spell wears off and the Large object is still a Large object as it's no longer the original target of the spell since it targeted a creature in this instance.  Medium creature is enlarged to a Large creature and then polymorphed into a Medium object since the creature is normally Medium. E/R ends.  Some option I haven't thought of.

If a druid (multiclassed into sorcerer) casts Enlarge on himself so that he becomes a Large humanoid (approximately twelve feet tall), and he then Wild Shapes in a brown bear, is the brown bear form normal size or doubled in all dimensions?


class TestClass { public static void main(String... args) {     Bean b=new Bean();     b.setA(10);     b.setB(20);      changeValue(b);      System.out.println("A "+b.getA());     System.out.println("B "+b.getB());  }   static void changeValue(Bean b) {     b.setA(30);     b.setB(40);     b=null; }}   Hi all, I read few questions on stackoverflow about whether java is call by value or not and then I thought of giving it a try. If using reference i can make changes in the value ...why can't i set it to null? Thanks in advance.

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I have been scouring the internet to find where this place is! I havent had much luck.

Windows 10 has an extensive collection of lock screen photos, many of which have  here on Travel.SE.  Is there a website which lists the location of all of these photos? I imagine Microsoft has purchased an official license, so they should have a record about the photographer and the place where the photo was taken.


I have no idea how to answer this problem. Right now even my professor is a little stumped.

What is the number of ways to select ten distinct letters from the alphabet $\{a, b, c, \ldots, z\}$, if no two consecutive letters can be selected?   There are a couple of formulas that I could use, but I am not sure how to use them.     The number of combinations of a given length that use elements from a given set, allowing repetition and with no missing elements in other words, each element of the given set occurs at least once in each combination: $\binom{k-1}{n-1}$ where where $n$ is the number of elements in the given set and $k$ is the length of the combination.   OR     The number of combinations of a given length that use elements from a given set, allowing repetition: $\binom{n+k-1}{n-1}=\binom{n+k-1}{k}$ where $n$ is number of elements in the given set and $k$ is the length of the combination.   Please help me understand what I should do and how to go about solving this question?


Currently I am using Gnome-Shell but now I want to use unity Desktop. I tried to install ubuntu-desktop by following command  sudo apt-get install ubuntu-desktop   Its showing following error  The following packages have unmet dependencies:  ubuntu-desktop : Depends: ubuntu-session but it is not going to be installed                   Depends: unity-control-center but it is not going to be installed                   Depends: unity-settings-daemon but it is not going to be installed                   Recommends: xul-ext-webaccounts but it is not going to be installed E: Unable to correct problems, you have held broken packages.

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


I really need a water flow animation exactly like this. I'm already using follow path, curve and array modifier but the result not as expectation.  Here's the exact sample I wanted:   My result the array is not following the curve path:

I have few arrows to follow a particular path such a way that the arrows will always orient along (steer along) the path. Using 'curve guide', I was able to make the arrows flow along the path, but the arrows do not change direction according to the path.   As you can see arrows are always facing the same direction. What I want is the arrows should change the direction according to the path.  I tried my level best. But no result :( Please help me. you can find my Blender file also.   Thanks and Regards Sabin


I have seen the phrase "Nothing but" used in many places.  e.g.:          Inertia is nothing but the mass of the object.   Time is nothing but a line       How did nothing but come into existence?

Every now and then I stumble about a construction like this:     It was but something....   and I understand it to be      It was nothing but....   or     It was only...   depending on the context.  I do know what this "but" means and I do know what else "but" can mean. My question is this?  Is the a difference between "but" and "nothing but" in this context, be it ever so small and hidden in tone or emphasis? Is there such a difference between "but" and "only"? And finally is "but" in this context something you can say or does that make you sound way out there? Thanks a lot


So I have an issue. My RPC calls will fail due to "NullpointExeption". Meaning that one column contains null in value. This is done on purpose, as I am gonna fill this column with value at some time. How can I allow the Java code to ignore/ or allow this error to happen thru error handling??  @Override public List <BreakRegistered> getAllRegisteredBreaks() throws IllegalArgumentException {     List<BreakRegistered> resultsfromquery = null;    ResultSet resultSet = null;     try {        //Execute query kaldes på resultsetter, fordi der kun nedhentes data        resultSet = getAllEmployeesBreaks.executeQuery();        resultsfromquery = new ArrayList<BreakRegistered>();         while (resultSet.next()) {            resultsfromquery.add(new BreakRegistered(                    resultSet.getTimestamp("time").toString(),                    resultSet.getTimestamp("checkedOut").toString(),  //Error occurs HERE!                    resultSet.getString("navn"),                    resultSet.getInt("medarbejderID")));        }    } catch (SQLException sqlException) {        throw new IllegalArgumentException(" \"getBreaks\" fejlede");    } finally {        try {            resultSet.close();        } catch (SQLException sqlException) {            sqlException.printStackTrace();            close();        }    }     return resultsfromquery; }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I am new to python and I wonder how can we set a specific time for a function to run. Considering here I have a dataframe with 891 rows called df which has a column name body_text I want to perform a function call summary(to summary the text) through the row of dataframe and store them into a new dataframe called df_summary. Here my goal is to set a function summary to run at most for 2mins it will be good if it can finish before 2mins and move to the next iteration. In case it is not, I want to call the other function name preprocess instead of the function summary that cannot finish within 120s. Consider we already created the df_summary with 891 rows and a column name body_text. Here is my code + a bit pseudo code as I dont know how to write it exactly: import time   for i in tqdm(range(0,891)):   # code to detect running time here     df_summary['body_text'][i] = summary(df['body_text'][i])# perform the summary function with at most 120s    # when 120s is over but the summary function cannot finish than perform a preprocessing function instead and move to the next iteration     df_summary['body_text'][i] = preprocess(df['body_text'][i])  Note that if the function summary can run in at most 120s or under that limit time, it wont run the fallback function preprocess and then move to the next iteration. How can I achieve this? Any help will be much appreciated.

I'm calling a function in Python which I know may stall and force me to restart the script.   How do I call the function or what do I wrap it in so that if it takes longer than 5 seconds the script cancels it and does something else?


Is there a way to add all local files (C:\... or file://) to Trusted sites or to be recognized as from the Intranet zone? Inetrnet Explorer (11 if that matters) treats them as being in the Internet zone for which I want to keep Protected mode turned on but that causes various issues to the site I'm trying to debug locally.  There is a trick with adding  <!-- saved from url=(0014)about:internet -->   to the HTML file but it would be hugely inconvenient to do that for every local file. Is there a better way? Possibly some wildcard path to add to Trusted sites or something like that?

I want to add a file on my local drive (C:\something.html) to the Trusted Zone in IE8 (my OS is Windows Server 2003). The Add Sites Dialog box, does not seem to take entries for files on the local drive.   I have tried:  file://C:\something.html file:\\localhost\c$\something.html   I have seen other solutions (on superuser and elsewhere) such Mark of Web, that allow your local file to be treated as if it were part of the internet zone, but I want to add my file to the Trusted Zone.  How can I do this? Thanks.


Can an adjective come after a noun? For example;   Deep caverns  /Caverns deep  What 's the difference between them?  What's the purpose of the second one? Why do we use it?

For a long time I'm having trouble understanding the difference between two kind of expressions like those below in terms of meaning, not grammar:          Excited people are looking forward to seeing this event.   People excited are looking forward to seeing this event.         EDITED TO USE CLEARER EXAMPLES:        "All navigable rivers are being patrolled."   "All rivers navigable are being patrolled."      As a native speaker, how do these expressions in bold sound to you? Is there any difference in meaning between examples #3 and #4? If so what is it, and why is this so?


So I would have 2 lists, with a random amount of values. for example: listx = [15513, 813, 984949, 5000], listj = [76815, 75, 8484, 9419419, 418841814, 84848, 84848]  How would I generate every possible combination of these lists? Like: combination = [15513, 75, 9419419]  it can take as much values as it wants from both list to use in the combination, I want to check every single combination, like it can take 2 values from the first one and 5 from the other, or all from the first one and 3 from the other.

I have a list with 15 numbers in, and I need to write some code that produces all 32,768 combinations of those numbers.   I've found  (by Googling) that apparently does what I'm looking for, but I found the code fairly opaque and am wary of using it. Plus I have a feeling there must be a more elegant solution.  The only thing that occurs to me would be to just loop through the decimal integers 1–32768 and convert those to binary, and use the binary representation as a filter to pick out the appropriate numbers.   Does anyone know of a better way? Using map(), maybe?


I am a Singaporean married to my husband who is from hongkong. He is a US PR working in US now. We have submitted our visa application in July 2017 under form i-130.   Currently i visit him via visa waiver once a year staying for 2 weeks.   May i know how long can i wait to return to US if i use visa waiver to stay till the maximum 90days?

I am currently visiting the USA from the UK (I am a UK citizen) and am intending on staying here for the full 90 days under the Visa Waiver Program.     How long would I have to stay out of the US at the end of this period before returning again?    Would I have to return to the UK, or could I stay with friends in another country (such as Canada) for a while?


I have installed several Windows programs using Wine. The problem is that I wont to uninstall some of them because I don't need them. And I wont to that without affecting the Windows apps that I wont to keep. But I can't see any way to uninstall them! Even if I explore drive C trough Wine I can't find any unistall.exe file for them although I can find the install.exe   Please, help me in this, even if it may sound childish. I think I can't find the solution because I am still influenced by some kind of "Windows mentality" wich makes me blind to such an easy solution.   Thanks!

I am using Ubuntu 11.10. By using wine software i installed some software like nimbuzz and ibibo messenger. Both the programs are not working and showing the bug as We're sorry, but an unknown error has caused ibibo Messenger to close.  So I wanna uninstall those.   How to uninstall those type of programs which I installed through Wine?


Does any one of you know a solution to either read or edit on an iPad files stored with Textedit on iCloud ?

I know that I can save a pages document in the cloud in Mountain Lion and then open it in Pages for iOS, but how do I access something saved in iCloud on TextEdit or Preview.   For instance, with Preview on Mountain Lion I could save a pdf in the cloud, but is there anyway to view that pdf on my iPhone?   Is this coming with iOS 6?


I'd like to ask how to denest the nested radical $\sqrt{5^{\frac{1}{3}}-4^{\frac{1}{3}}}$?

Denest $\sqrt {\sqrt[3]{5}-\sqrt[3]{4}}$.   I have tried completing square by several method but all failed. Can anyone help me please? Thank you.  p.s. I'm a poor question-tagger.


I am trying to color a string, but it doesn't work I've tried this, but it doesn't work at the cmd window  print '\033[1;32mGreen like Grass\033[1;m'   Could someone tell me why?  In pycharm command window it does work

How can I output colored text to the terminal in Python?


I would like to find a way to speed the shutting down process up by using shortcut keys.  I installed Ubuntu 14.10 - Utopic Unicorn on a Compaq HP, but I am not able to do that by following the methods used for the previous Ubuntu versions.  Is there a way to do that?

Is there a keyboard shortcut available to shutdown the computer?  I know I can use the Power button, but I would like to be able to it from the keyboard.  If such a shortcut does not exist already, how do I set one?


on the contrary, let us suppose: $$\sqrt{p} \ + \sqrt{q}\ \ is \ \ a \ \ rational \ \ number,$$ so, $$\sqrt{p}  + \sqrt{q}  = \frac{a}{b} ,\ where\ gcd(a,b) = 1\ and\ b \neq 0$$  upon squaring both sides and some rearrangements, we get $$b^2(p + 2\sqrt{pq} + q) = a^2$$  since b | LHS, we can say that b | $a^2$ if b > 1, then there exists a prime c, such that c | b. therefore c | $a^2$ and c | a. so here we can say that gcd(a,b) $\geq$ c. which leads to a contradiction. Therefore we conclude that $\sqrt{p} \ + \sqrt{q}$ is irrational.   Now the problem I am facing with this method is what happens when b = 1? Suppose when b = 1, the above equation becomes: $$(p + 2\sqrt{pq} + q) = a^2$$ when b was greater than 1, we were not concerned with the values of p and q.  but in this part, how do we prove that the left-hand side can never be a perfect square, even if p and q are distinct or the same?

Inspired by , I was wondering if there is a simple logical argument to   Show that $ a,b, \sqrt{a}+ \sqrt{b} \in\mathbb Q  \implies  \sqrt{a},\sqrt{b} \in\mathbb Q $  Note that the original link is using a computational method, where as I am looking for a simple logical argument.  I tried (unjutifiably) to argue that if some of two square roots is rational then each one is rational, this is a different than the (incorrect) argument that if sum of two algebraic numbers is rational then each one is rational ( counter example $a=1-\sqrt{2},b= 1+\sqrt{2} $)


Let $F$ be a $p$-adic field containing the $n$th roots of unity.  Then by Kummer theory, $[F^{\ast} : F^{\ast n}]$ (which is finite) is equal to the cardinality of $\textrm{Gal}(E/F)$, where $E$ is $F$ adjoined with all the $n$th roots of unity in $F$.    Also $F^{\ast}/N_{E/F}(E^{\ast})$ has cardinality $|\textrm{Gal}(E/F)|$ by local class field theory.  This would give us $N_{E/F}(E^{\ast}) = F^{\ast n}$ provided we could show just one inclusion.  Why is it that every element of $F^{\ast n}$ is a norm?

In section 5, $K$ is a local $p$-adic field containing the $n$th roots of unity, and $L = K(\sqrt[n]{x} : x \in K^{\ast})$.  Kummer theory tells us that $[L : K] = [K^{\ast} : K^{\ast n}]$, and local class field theory tells us that $[L : K] = [K^{\ast} : N_{L/K}(L^{\ast})]$.  The author concludes that $N_{L/K}(L^{\ast}) = K^{\ast n}$, but I don't see how one of these things is contained in the other.  Why are $n$th powers norms from $L$, for example?


I have a code where I am trying to display a cross or tick based on the value of a object property in JSTL. The property is of type Boolean and I am getting a java.lang.NullPointerException thrown in the jsp. My code is as follows   <c:if test="${gem==true}">    </c:if>   <c:if test="${gem==false}">    </c:if>   Can anyone help me to resolve this?

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I just started having this problem on 17.04. As I try to login on Ubuntu the screen just goes black for a second, and then I end up back on the login screen. I have tried reinstalling lightdm, that didn't work. I tried using gdm, that didn't work. I tried the following command sudo rm -v .Xauthority, didn't work.   The only thing that made it possible to log in was by creating a new user, but then I can't access my files. How do I solve this problem?

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


Can't find my Dock after upgrade to Ubuntu 19.04 (available only when I open Activities) Dock settings are present:    Extension itself is installed:    Can anyone help and tell me what might cause the issue?  UPD: Reinstall didn't help:  sudo apt purge gnome-shell-extension-ubuntu-dock sudo apt install --reinstall ubuntu-desktop   UPD2: Tweak tool shows that there is an error loading extension for Dash to Dock:

Is there a way to install GNOME extensions from terminal, for example dash to dock? The way I do it now is to go into Ubuntu Software app store and install it.


How does the center of mass of a collision change after a collision has occurred compared to before. For instance, I know that it is moving, but does the velocity change and if so does it depend on whether the collision is elastic or inelastic

I'm curious as to whether or not the velocity of the center of mass of a system comprised of two spheres can change after the two spheres collide. Looking at the equation for the velocity of the center of mass for a system of particles:  $$V_\text{CM} = \frac{m_1v_1 + m_2v_2 + \cdots + m_nv_n}{m_1 + m_2 + \cdots + m_n}$$  It looks like, if after the collision, one of the particles changes direction, and the negative terms outweigh the positive terms in the numerator, the velocity of the center of mass would change direction (and possibly magnitude). However, I can't think of any examples where this would happen in elastic or inelastic collisions. I'm not even sure if its speed can change. It would make sense that it would if kinetic energy (velocity) was lost in an inelastic collision, however, I can't come up with any conditions to make this happen.  I could really use some insight.


I can not see the question in any disposition in my meta.stackexchange questions.  Any ideas?

Historically this site, , has been the place to ask questions about not just Stack Overflow, but the functioning of the entire Stack Exchange (2.0) network, including Area 51 and stackexchange.com and careers.  (Yes, there was a , but that dealt with the old legacy Stack Exchange 1.0 sites. It was deprecated a while ago, and currently redirects here.)  Now that we've gotten many, many months under our belt from the SE 1.0 days, I think it's time that we gave Stack Overflow its own, true per-site meta, and moved the higher level network meta discussions to meta.stackexchange.com.  Over time, it's begun to bug me more and more that requests for Stack Overflow, the site, kind of get buried here on meta.stackoverflow under the avalanche of network issues. Retag requests, synonym requests, things truly specific to Stack Overflow, the site, not the network. This is unfair to our vastly largest and flagship Q&A site, and it's unfair to the Stack Overflow users to mix their requests in with network level concerns.  It's also odd that Stack Overflow is the only network site without a proper, dedicated per-site meta, where its meta has its own reputation system not tied to the parent site in any way.  This is mostly a quirk of history more than anything else, and I believe it is now an appropriate time to split into two sites:   , a proper per-site meta for Stack Overflow with integrated rep , a global network meta with its own reputation system   Yes, this will be painful. But I believe it is a good, necessary, and healthy step both for the future of the network and the future of Stack Overflow.  Some things to discuss:   which questions should be migrated from here to meta.so? Obviously site-specific things like the retag-requests, and perhaps questions with the  tag. Anything that is 100% wholly specific to Stack Overflow and not generalizable to the rest of the network should be moved over. This may be a pretty small, narrow list of questions, and that's OK. Should we do some meta spring cleaning in our transition? Which questions / tags should be blown away as no longer relevant, referring to ancient versions of Stack Overflow or issues that have long since ceased to exist and aren't instructive for any future visitors? Your meta reps will generally be unaffected, except insofar as we delete for spring cleaning, or move site-specific things to meta.so. We still plan to have a distinct reputation system for the new meta.se site, just like here.   I do not have a timeline for this change, that is up to Jarrod and David to decide. It may be months away. However, we feel pretty strongly that this is something that we need to do to clean things up and pave the way for the future -- so I expect it will happen in the next few months, giving us lots of time to decide how we want to do it, per the above.  Update  .


I have this code and I want to make a copy of characters[currentCharacter]  without a memory reference. Do I have to copy the value of each variable individually or there is some method that allows me to do it? public void Choose(object _info)         {             choosing = false;             characters[currentCharacter].SetDimentions(new Vector2(80,80));             world = new World(characters[currentCharacter]);         }  Character class public class Character: Unit     {         protected _Keyboard keyboard;         protected string name;         protected string description;         protected bool shield;         protected double currentTime;         protected float cooldown;         protected bool readyToShoot;           public Character(string _path, Vector2 _position, Vector2 _dimensions, int _ownerId, List<Projectile> _projectiles) : base(_path, _position, _dimensions, _ownerId)         {             keyboard = new _Keyboard();             shield = false;             readyToShoot = true;                                  }          public string GetName()         {             return name;         }          public string GetDescription()         {             return description;         }          public void SetShieldStatus(bool _status)         {             shield = _status;         }         public bool HasShield()         {             return shield;         }     }

I want to do something like:  MyObject myObj = GetMyObj(); // Create and fill a new object MyObject newObj = myObj.Clone();   And then make changes to the new object that are not reflected in the original object.  I don't often need this functionality, so when it's been necessary, I've resorted to creating a new object and then copying each property individually, but it always leaves me with the feeling that there is a better or more elegant way of handling the situation.  How can I clone or deep copy an object so that the cloned object can be modified without any changes being reflected in the original object?


I tried to install syncthing on Debian Jessie (i386 architecture) following :  curl -s https://syncthing.net/release-key.txt | sudo apt-key add - echo "deb http://apt.syncthing.net/ syncthing release" | sudo tee /etc/apt/sources.list.d/syncthing.list sudo apt-get update   At this point, apt-get fails with the following message:     W: Failed to fetch   Unable to find expected entry 'release/binary-arm64/Packages' in Release file (Wrong sources.list entry or malformed file)   Now, I do have arm64 as a foreign architecture, and syncthing seems to miss packages for it. That shouldn't be a problem, since I only want to install syncthing on my host architecture, i386.  How can I proceed with the installation without removing arm64 from my foreign architectures?

I am trying to use a file repository for updating linux/ubuntu on a non-connected machine. The architecture for this machine (uname -a):  x86_64 GNU/Linux   The results of dpkg --printarchitecture are:  amd64   It is a Trusty Tahr amd64 machine, and it specifically says this, for example, in the aptitude sources.list file. Also, the "About this Computer" in ubuntu specifically says the machine is 64-bit. So, I installed the amd64 packages on the machine. However, when I try to do apt-get update, I get errors such as:  W: Failed to fetch file:/var/spool/apt-mirror-trusty/mirror/archive.ubuntu.com/ubuntu/dists/trusty/main/binary-i386/Packages  File not found   So, in other words, even though it is a 64-bit machine, apt is inexplicably trying to read i386 packages. Why is it doing this and how can I make it use the 64-bit packages?  Note that there is nothing in sources.list that specifies i386.  The only uncommented line in the sources.list file is:  deb file:///var/spool/apt-mirror-trusty/mirror/archive.ubuntu.com/ubuntu trusty main restricted universe multiverse


Now let set $A$ be arbitrary. So set $A$ exists. Using axiom of pairing $\{A\}$ exists. And then using axiom of regularity, we can argue that $A \notin A$. So, there is some $x$ such that $x \notin A$. Is this a valid proof ? Thanks

Using naive set theory and not using the cardinal number of a power set, how can you prove a set cannot contain its own power set? Is this connected to Russell's Paradox?


Lets say you buy a home for $300k, and put down a $100k payment and take out a $200k loan.  The house was purchased for a fair, properly appraised value.  Does this mean that you are now $200k "in debt"?  I read people referring to this as debt, but to me that doesn't make much sense.  The house has a real value equal to the sum of your equity and your principle.  If a year down the road the house is reappraised for $250k, I could see how that would lead to "real debt" and being  upside down in the loan, but as long as the assets securing a loan are worth more than the principle, is it correct to say that you are in debt?  Is there more than one context for "in debt" where it could be true in one sense, and not true in another?

75% of Americans are in debt. I'd like to know if I'm also considered in debt if I am paying my mortgage on a house.  I didn't think I was in debt if I own the house. I guess I pay 'rent' to a bank who sold the mortgage to me. If I stop paying, I lose the house I never 'owned'.  So what is the reality? Are people considered in debt if their only 'debt' is the mortgage/loan for their house, or are these people excluded from the statistic?


Initially I thought that it is but in  a solution to a problem, it was said that $\mathbb{Z}_7 \times \mathbb{Z}_7$ is not a field, because it is not an integral domain due to the fact that: $(7,7) \cdot (1,1)=(0,0)$, which seems wrong to me because $(7,7)=(0,0)$.

Suppose that we have the direct product of two fields, defined as: $\mathbb{F}^2 = \mathbb{F} \ \times\ \mathbb{F}$. Then, this is obviously not a field because we can take $(1,0)$, and this doesn't have a multiplicative inverse. However, I saw a mention to this today in a book, and the reasoning was:     "$\mathbb{F} \ \times\ \mathbb{F}$ has the zero-divisor $(1,0) \neq  (0,0)$, hence it is not a field".   (Lectures on Rings and Modules by Joachim Lambek, pg. 17).  I am not sure what they mean by zero-divisor here nor what $(1,0) \neq  (0,0)$ has anything to do with the direct product of fields not being a field. I always assumed there wasn't a multiplicative inverse, and that was it. Am I missing something deeper?


I have two objects in Illustrator, a black circle and the silhouette of a person (in white). I want to subtract the silhouette from the black circle. So that everything but (what is left of) the black circle is transparent. How do I do this?

I have an image (below) of two hands over a black circle. All three are currently separate paths with a fill but no stroke, all on the same layer.  How do I delete the shape of the hands from the black circle, so that afterwards I can delete the hands themselves, and just have the circle, with the shape of the hands cut out of it?


Will the temperature of the room increase or decrease when the refrigerator door is kept open for a while ?  My book says that , the room temperature increases . But I don’t understand its reasoning.   I want to understand the role of compressor here along with the roles of evaporation and condensation tubes...How do the refrigerants warm up the room ?

I'm well aware that the default answer to this textbook default question is "it doesn't work", but still, I believe it does.  To cool the insides of the fridge, the compressor must do work, and since the efficiency isn't 100% you are constantly warming the whole room to cool it's insides, the winning move here is simply turning the fridge off. However, let's suppose the fridge must stay on, wouldn't it be better to open the door?   In other words: Isn't opened fridge turned on better than closed fridge turned on for the whole room temperature?


$H = \left\{ id, (12)(34), (13)(24), (14)(23)\right\}$ is a subgroup of $A_4$.  A normal subgroup is a subgroup where the right and left cosets are the same.  To show that $H$ is a normal subgroup would I have to compute every single coset and show that the left and right cosets are the same?  Is there a clever way to do this problem?

Let H={e,(12)(34)} and K ={e, (12)(34), (13)(24), (14)(23)} be subgroups of $ S_4$ where e is identity element. Then which of following is true   H and K are normal subgroups of $S_4$ H is normal in K and K is normal in$ A_4$ H is normal in $A_4$, but not normal in $ S_4$ K is normal in $S_4$ but H is not   How should this question be approached, checking left and right cosets of these subgroup is very time consuming. Checking gh$ g^{-1}$ $\in $ H for every g in $ S_4$ is also time consuming.


I'dont have the option in my ubuntu desktop to connect to wifi. I have never connected internet in ubuntu before. Do I need to install drivers or something like that. If yes how can I do it?  09:00.0 Network controller [0280]: Broadcom Corporation BCM43228 802.11a/b/g/n [14e4:4359]     Subsystem: Broadcom Corporation Device          [14e4:05e2]     Kernel driver in use: bcma-pci-bridge

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


Almost everything you can pickup in Fallout 4 can be scrapped for components, but not quite everything.   Some things clearly are not junk, even though they can be scrapped. As far as I'm aware, this includes all non-legendary weapons and armor and mods when attached, so ignore those. Some things are pretty clearly not junk, and cannot be scrapped. As far as I'm aware, this includes aid items, so ignore those. If you know an exception to these broad strokes, please mention it.  This leaves Misc items. I think some of these can be broken down (in workshop mode), but many cannot. Folders, for instance, .  What items are in this category?   An exhaustive list would be nice if it's short enough, but the point is to avoid picking up things I can't scrap, so focus on ones one is likely to see, and on describing them in a way that can be remembered.

Fallout 4 adds the kleptomaniac-friendly ability to deconstruct practically anything into useful components. As such, I have built an impressive store of building materials, and enforce a "pick up everything, leave nothing" strategy. This works quite well.  However, a few guys on Live have been recommending I hold on to any copies of the Daily Bugle I find, as there is supposedly an NPC that will pay caps for them. I assume this is the case for both regular and rolled up copies.  I know that in previous Fallout games, there were a few "junk items" that would serve a purpose, often in regards to an NPC that would buy them off you for a fair amount of caps.  Are there any junk items in Fallout 4 that serve any type of purpose other then component scrapping? Are there any particular items I should be holding on to, instead?   I am specifically asking about items that can otherwise be lost through the automatic dis-assembly of junk. Items that fall under the "misc" category, like overdue books and subway tokens, are of no use in this context as there is no great risk of accidentally destroying them.


From time to time I get blocked by hotmail servers.  The reason, as far as I digged in, is because my server is sending mails for non-existing users.  Hotmail seems to interpret these attempts as "if the user doesn't exist and you are attempting to mail it, you might be a spammer".  Since my DB is a bit old (has records from ~7 years ago), some emails, indeed, no longer exist - as well as some mail servers.  Two Scenarios: bad user input and inexistent email   BAD USER INPUT   John's email is johndoe@hotmail.com  But he inputs it as:  johndeo@hotmail.com  johndoe@ohtmail.com  Obviously, it will fail to deliver and Hotmail may interpret these attempts as email mining.   INEXISTENT EMAIL   Hotmail mail accounts are deleted after a certain period* of inactivity. That said, obviously, I can't mail them.  When a user tries to recover his account at my server, it may happens that the email he used to sign up isn't used by him and it no longer exists. I cannot know or control that and then the account recovery email will be sent anyway. Again, Hotmail may interpret it as email mining, since the best practices establishes that "one should know his receiver's correct and updated email".  *365 days as of this article:     HOW CAN I FIND OUT IF AN EMAIL EXIST?  How can I find if an email exists beforehand sending it my message?  The moment the user clicks the "Forgot Password" link and inputs his email, what PHP measures can I take to let him know that he inputted a non-existing email?

I have come across this .  Has anyone tried anything similar or does it work for you? Can you tell if an email customer / user enters is correct & exists?


Does the Nikon 85mm 1.8 D work correctly with the Nikon D80 body? I just received mine today and keep getting error reading fEE when the lens is set to all apertures except f/16.

I have a AF Nikkor 50mm f/1.8. When I have the aperture setting on the lens to 22 I can take photos. But when I change the dial to anything other than 22(lowest f/stop) then I get a flashing fEE message and r09 where the number of exposure left is.  I don't have the manual for this lens but am just wondering if anyone knows what the issue is here.  My camera is a Nikon D70S.


I was trying to imitate the code listings in the book ,  I understand that it uses the CM TT font. What I am interested is in the proportion between the text and the code, and the treatment of the comments which are formatted as sans serif roman characters of the same size as the code. As I intend to include small text files with the original code  I would like that no additional formatting is needed inside the code.   I have tried the listings package but I have some problem with the width of the characters in the listings environment this is what I have tried  \documentclass[fontsize=10pt]{article} \usepackage{verbatim} \usepackage{lipsum} \usepackage{listings} \lstset{   morecomment=[s]{//},   basicstyle=\ttfamily\footnotesize,    commentstyle=\rmfamily }  \begin{document} \lipsum[4] \begin{lstlisting} void square(float d){return d*d;} // formated with listings \end{lstlisting} {\footnotesize \begin{verbatim} void square(float d){return d*d;} // formatted with verbatim \end{verbatim} } \end{document}   and I get this (compared with the output of verbatim):    The individual letters are identical but the listings ouput uses a lot more space. Is there a way to obtain in the listings package a result similar than in verbatim?

I used the following code to list my java code, but the it looks like there's too much space between words. What can I do?  % source code listing \usepackage{listings} \usepackage{color} \usepackage{xcolor}  \usepackage{caption}  % citation style \usepackage{apacite} \DeclareCaptionFont{white}{\color{white}} \DeclareCaptionFormat{listing}{\colorbox{gray}{\parbox{\textwidth}{#1#2#3}}}  \begin{document} \begin{lstlisting}[label=some-code,caption=bind to service call] bindService(new Intent(this, Recognizer.class), recConnection, Context.BIND_AUTO_CREATE); \end{lstlisting} \end{document}   The snapshot of what I got. The code not completely shown, and space too wide, in function bindService.


I am following  in order to add vector tiles using geoserver and OL3. I am using some layer from a remote geoserver which I have access:  var layer = 'myworkspace:arm_trs_roads_osm'; var projection_epsg_no = '4326';   var vectorLayer = new ol.layer.VectorTile({   style:style_simple,   source: new ol.source.VectorTile({     tilePixelRatio: 1, // oversampling when > 1     tileGrid: ol.tilegrid.createXYZ({maxZoom: 19}),     format: new ol.format.MVT(),     url: 'http://ogcserver.gis.wfp.org/geoserver/gwc/service/tms/1.0.0/' + layer +         '@EPSG%3A'+projection_epsg_no+'@pbf/{z}/{x}/{-y}.pbf',     crossOrigin: null   }) })   When I try to display the layer on the map I get the well known CORS error:  Failed to load http://ogcserver.gis.wfp.org/geoserver/gwc/service/tms/1.0.0/my_workspace:arm_trs_roads_osm@EPSG%3A4326@pbf/3/0/4.pbf: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://vagrant-test.local.com' is therefore not allowed access. The response had HTTP status code 404.   I am not sure how to solve this issue. I found this  which says to enable CORS in the tomcat level. But it also says that this feature is available after tomcat 7.0.41 (I have 7.0.39; not possible to upgrade currently).   I have also enabled JSONP in my geoserver config files. But still I get the same error. Which other alternative do I have?

Using OpenLayers 3, I cannot get this message to go away:  Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://myserver:8085/geoserver/sf/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=sf:view1&maxFeatures=1&outputFormat=JSON. This can be fixed by moving the resource to the same domain or enabling CORS.   This is the code:  // Ol3 only supports Projections "EPSG:4326" and "EPSG:3857". For every other projection you need proj4js         proj4.defs("EPSG:2236", "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");          // Leases Layer         var myLayer = new ol.layer.Vector({             source: new ol.source.GeoJSON({                 projection: 'EPSG:2236',                 url: 'http://myserver:8085/geoserver/sf/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=sf:view1&maxFeatures=1&outputFormat=JSON',                 crossOrigin: null             })         });  // View         var view = new ol.View({             projection: 'EPSG:2236',             center: [0, 0],             zoom: 4         });          // Map         var map = new ol.Map({             target: 'map',             renderer: 'canvas',             layers: [myLayer],             view: view         });   I have tried setting the crossOrigin setting to:  crossOrigin: null crossOrigin: 'null' crossOrigin: 'anonymous'   I only see the zoom in/out control but the layer is not rendered.    I went with simon's option 3 below.  I enabled CORS in GeoServer by copying the necessary jetty-servlets jar files and enabling it in the \WEB-INF\web.xml:  <filter>     <filter-name>cross-origin</filter-name>     <filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>     <init-param>         <param-name>allowedOrigins</param-name>         <param-value>*</param-value>     </init-param>     <init-param>         <param-name>allowedMethods</param-name>         <param-value>*</param-value>     </init-param>     <init-param>         <param-name>allowedHeaders</param-name>         <param-value>*</param-value>     </init-param> </filter> <filter-mapping>     <filter-name>cross-origin</filter-name>     <filter-pattern>/*</filter-pattern> </filter-mapping>   After I did that, I tested the page again and receive the same error:  Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://myserver:8085/geoserver/sf/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=sf:view1&maxFeatures=1&outputFormat=JSON. This can be fixed by moving the resource to the same domain or enabling CORS.   Looks like I am still missing something.  Do I have to do anything from the OpenLayers Side?    I ended up getting rid of Jetty and uninstalling GeoServer completely.  The problem is when you install the geoserver windows installer, it installs a version of jetty that is 4 years old! (Jetty version 6.1.8)  Even though I had copied the jar files for CORS, it is only supported in Jetty 7+.    I found out that you can install a WAR file.  I decided to use Tomcat since that is what GeoServer is mostly tested on according to this note from the GeoServer website:  Note GeoServer has been mostly tested using Tomcat, and therefore these instructions may not work with other container applications.  These are the instructions for installing the WAR file:    This is a nice how-to video also:    After you complete the install, you then enable CORS:


I am trying to prove a lemma that the only solution of $q|(p^2-1)$ with $p<q$ is $p=2$ and $q=3$. i.e if $p<q$ are primes and $q|(p^2-1)$, then $p=2$ and $q=3$. Since $q|(p^2-1)$, then $q|(p+1)$ or $q|(p-1)$. Since $p<q$, we have only $q|(p+1)$. But I am not sure if $q|(p^2-1)$ implies $q|(p+1)$ or $q|(p-1)$, since $p<q,$ we have $q|(p+1)$. But I got stuck here.

We have $q, p$ prime and $tq = (p-1)(p+1)$ for some positive integer $t$. The book I'm reading says that because $q$ is prime, it divides $p-1$ or $p+1$.   Question: Why exactly does it matter that $q$ is prime here?


I was wondering something regarding the Back To The Future movie: Marty McFly is on stage and he's playing Johnny B. Goode. Marvin Berry phones his cousin Chuck Berry (the person who wrote the song).  Chuck hears the song and he uses it as a hit for himself. Now at this point Chuck learns the song through Marty but Marty learned it through Chuck. There is no actual creation moment of the song as both parties copied the song. So doesn't that mean the song can't exist at all? What kind of paradox would this be?

In Back To The Future II, we learn that traveling forward in time, after having altered the past, lands the traveler into an alternate present or future compared to the one they originally left.  (Thanks to @Xantec for the image) However, in Back to the Future I, it is clearly implied that Marty's performance of Johnny B. Goode at the Enchantment Under The Sea dance was the inspiration for Chuck Berry's composition of the song. If, in the altered past, Marty is the inspiration for Johnny B. Goode, then how did Chuck Berry come up with it in the original timeline?  Could this be a paradox? Related:


I want to switch from Ubuntu to Mint.  Can I somehow turn my laptop's Ubuntu install into a virtual machine that I can then run on my computer so that I can refer to all my applications and settings and such there for when I want to configure my new mint install?

Is it possible to convert a Physical Ubuntu Install (Intel based PC with Ubuntu 10.10) to a virtual box disk, so that I can use that same environment on a separate pc or can keep it virtual for testing?  Something similar to "Disk2VHD" which converts a physical Windows 2K3 and above box into a VHD or VMware image.  Will be grateful for your assistance ! Kind Regards


Sample Variance, customarily denoted, $s^2$, as in the formula below, is the average of the squared deviations, except that we divide by $n-1$ instead of $n$.     $$s^2 = \frac{1}{n-1} \sum\limits_{i=1}^{n} (X_i - \overline{X})^2$$   My question is: Why do we divide by $n-1$ instead of $n$?  Does it have anything to with having a "binary" operation, meaning two (bi-nary) operands?    This may be a duplicate question.

Does anyone have an intuitive explanation (no formulas, just words! :D) about the "$n-1$" instead of "$n$" in the unbiased variance estimator $$S_n^2 = \dfrac{\sum\limits_{i = 1}^n \left(X_i-\bar{X}\right)^2}{n-1}?$$


Suppose my teacher gives Me and my friend homework. After completing the homework, my friend comes to my house to be sure if he has done his homework correctly or not. He asks me "have I completed my homework correctly?" It seems to me that there is something wrong with his homework. Can I reply "No, I think you may have/might have made a mistake."  'May' or 'might': Which one is correct in the given context? I think both are correct but "might" expresses less probability. I am not sure.

Are they always interchangeable or subtle meaning differences occurred when we prefered one to another?  Here some sentences I came across. Can we rewrite these sentences with keeping their meanings?     General: We may have been able to save victims, we'll never know.(original sentence)   Possible variations:     General: We might have been able to save victims, we'll never know.      General: We could have been able to save victims, we'll never know.      General: We would have been able to save victims, we'll never know.     Another example sentence :     If he had worked harder, he may /might/could/would have been able to   get A at the exam.     Another example sentence :     I may/might/could/would have gone to university but I decided to get a   job.


I am trying to multiply decimal value with 10 in Javascript:  console.log(1000.56 * 10); console.log(100.56 * 10);   It is printing.  10005.59999999999 1005.6   Why?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


Hello, I'm trying to adapt a vape mod so I can plug it in directly to my car cigarette lighter instead of using batteries. The device I'm using has a DNA 200 chip in it and according to the datasheet max input voltage is 12V and max amps is 23. According to a google search a car batter puts out around 48 amps. From my understanding the device will only draw as many amps as it needs or am I wrong? Could I connect the leads of my cigarette lighter adapter straight to the board or is there anything special I should do? Here is the full data sheet for reference.  Also I know it has a charge port on it. Problem is it charges to slow and I'm tired of messing around with batteries on long road trips.

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


I need your help here  I m Indian Citizen and i want to apply for national visa for my collage , but the problem is i m not getting any dates in India , So can i apply for appointment from Malaysia because i have Malaysia tourist visa still valid for me ,  So please tell me can i book appointment in Malaysia because i can see dates available in Malaysia , So can i book them and go for the interview in Malaysia <  does it matter that where i m apply from ? its just an visa interview Right ?   i m sharing you link where i can my application screen shot for you  prnt.sc/ob4761 prnt.sc/ob47q6

I'm a citizen of country A who would like to apply for a Schengen visa at a consulate in country B. When is this possible?


I am developing an 2d open world mmorpg game for learning purposes, and have a issue with big maps.  A year ago i developed 2d open world single player / co-op game. It saved map in chunks, and AI for NPCs starts 'ticking' when specified map chunk is loaded.  In my mmorpg game, NPCs AI is handled by server, and its always 'ticking' in some specified interval. That is where my troubles begin. I want NPC to walk in random directions. For this to work, I have to check map collision for every step, so my NPC wouldn't end up in wall. Problem is when I have big map, for example 10000x10000, and every tile is represented with 6 bytes, that is about 572MB of map data my server must hold in memory all the time, and i cant load just few map chunks, like in my single player RPG because of lot NPCs AI needs to be updated all the time, even if player is not located near by.  My goal is to archive map size of 50000x50000 tiles. I know its possible because i seen 2d mmorpgs with huge open worlds, a lot bigger then 50000x50000, and I doubt that their server have 20GB of ram to waste just on maps.   If anyone have any ideas how I can lower memory usage, I woud like to hear you.   Thanks in advance, and sorry for my bad english

I've been developing  for a little while now, but I've found that I want to make the game world MUCH bigger. It's currently about 300*300 tiles, but has creatures and bad guys running around the whole thing, so I've got to keep track of all the enemies movement and hostile-finding algorithms. I'm wondering how I can scale something like this up? It seems (from code profiling) that enemies are the limiting factor, and it's mainly that for each enemy, I need to scan through all the player-units and creatures to see if they're close enough for the enemies to see/attack. Edit: W,S,A,D,B,Q, if anyone's interested in controls :) Edit 2: Please tell me if there's any way I could improve the question!


I have just started learning c++, in c++ programming some times I have to use ^ after string for example   string^ abc;   And sometimes there is no need of ^ and we can write our line as  string abc;   This confuse me a lot, I don't know when to use ^ and when to ignore it. I know its a foolish question but I desperately need to clear my concept of ^ so please tell me when to use and when to ignore ^ in c++.

I just came across this code and a few Google searches turn up no explanation of this mysterious (to me) syntax.  Hashtable^ tempHash = gcnew Hashtable(iterators_);  IDictionaryEnumerator^ enumerator = tempHash->GetEnumerator();   What the heck does the caret mean? (The gcnew is also new to me, and I asked about that .)


I've two method:         static int SumInt(List<string> list)         {             return list.Select(o => int.Parse(o)).Sum();         }          static float SumFloat(List<string> list)         {             return list.Select(o => float.Parse(o)).Sum();         }  How can i get a generic method such as static T Sum<T>(List<string> list) where T:struct{},or a method with a ValueType return: static ValueType Sum(List<string> list){} The key point is not how to convert, but how to sum a struct or ValueType.

I am trying to write a generic Parse method that converts and returns a strongly typed value from a NamedValueCollection.  I tried two methods but both of these methods are going through boxing and unboxing to get the value.  Does anyone know a way to avoid the boxing?  If you saw this in production would you not like it, how bad is it for performance?  Usuage:  var id = Request.QueryString.Parse<int>("id");   Attempt #1:  public static T Parse<T>(this NameValueCollection col, string key) {     string value = col[key];      if (string.IsNullOrEmpty(value))         return default(T);      if (typeof(T) == typeof(int))     {         //return int.Parse(value); // cannot convert int to T         //return (T)int.Parse(value); // cannot convert int to T         return (T)(object)int.Parse(value); // works but boxes     }     if (typeof(T) == typeof(long))     {         return (T)(object)long.Parse(value); // works but boxes     }     ...      return default(T); }   Attempt #2 (using reflection):  public static T Parse<T>(this NameValueCollection col, string key) {     string value = col[key];      if (string.IsNullOrEmpty(value))         return default(T);      try     {         var parseMethod = typeof(T).GetMethod("Parse", new Type[] { typeof(string) });          if (parseMethod == null)             return default(T);          // still boxing because invoke returns an object         var parsedVal = parseMethod.Invoke(null, new object[] { value });         return (T)parsedVal;     }     // No Proper Parse Method found     catch(AmbiguousMatchException)      {     }      return default(T); }


I have created onclick javascript button functionality but when I clicked on button I am getting "Problem with onclick javascript for this button or link was encountered: Invalid or Unexpected token". My code is  {!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}  {!REQUIRESCRIPT("/soap/ajax/25.0/apex.js")}   function post_to_url(path, method) {  method = method || 'post'; // Set method to post by default, if not specified.  var form = document.createElement('form');  form.setAttribute('method', method);  form.setAttribute('action', path);  form.setAttribute('target', '_blank');  document.body.appendChild(form);  form.submit();  }  var address1 =      '{!URLENCODE(Account.BillingStreet)}';  address1.replace(/\r?\n|\r/g, '');  var s1 = http://www.another_page.com &param=  {!URLENCODE(Account.IOG_Customer_ID__c)} %0D  {!URLENCODE(Account.Website)} %0D  {!URLENCODE(Account.Name)} %0D  {!URLENCODE(Account.Billing_Contact_Street__c)} %0D  {!URLENCODE(Account.Billing_Contact_City__c)} %0D  {!URLENCODE(Account.Billing_Contact_State__c)} %0D  {!URLENCODE(Account.Billing_Contact_Zip__c)} %0D  {!URLENCODE(Account.Phone)} ' ;  post_to_url(s1, 'POST');

Here is the field I am trying to update, the far left is the picklist I am wanting to update. the field on the left is another picklist. both lists have the same values.   As you can see below I have tried a number of approaches. Is this possibly a limitation with the Javascript button?  Any help would be appreciated.   Example 1   00N5000000AIfdn = {!TEXT($User.New_Business_Admin__c)};   Error: Invalid or unexpected token error   Example 2   app.New_Business_Admin2__c = {!TEXT($User.New_Business_Admin__c)};   Error: Unexpected Token ; (I am not missing one nor do I have duplicates)   Example 3  app.New_Business_Admin2__c = '{!$User.New_Business_Admin__c}';   Error: Field New_Business_Admin__c is a picklist field. Picklist fields are only supported in certain functions.   Example 4  00N5000000AIfdn = {!$User.New_Business_Admin__c};   Error: Field New_Business_Admin__c is a picklist field. Picklist fields are only supported in certain functions


As far as your variety of English goes, can the verbal turn "order something done" be used interchangeably with "order something to be done"?     "We  to our local store."      "I  to my son in Utah."      "I  to my girlfriend's workplace."      "Yemen  dead or alive."

I'm from Western Pennsylvania. Until I moved away, I never realized that when I omitted the to be from phrases like needs to be cleaned, my usage was different than what most English speakers are accustomed to. Is it wrong?


"I want your love and I want your revenge   You and me could write a bad romance"   I have always seen "You and I", as opposed to "You and me". I rely on a rule of thumb that if we remove the other person ("you and"), then what remains (I or me) should make grammatical sense.  Here, "Me could write a bad romance" does not make sense, but who am I to question the grammar of an English-speaking singer?

I was told the correct usage is for example: "My wife and me" but I hear often "I and my wife" or "my wife and I". Google gives 34M results for "My wife and I" and 909K results for "My wife and me" Which is the correct form and why? It occurred to me that maybe it could depend on the rest of the phrase? (subject or object)  "My wife and I are eating an apple" "You can see my wife and me in this picture"


I would like to do this:  git --git-dir=../navcl/.git format-patch -k -1 --stdout 607780ee9 \   | nano \   | git am -3 -k    The issue is, in my other git dir, a file path is different, so I need to edit this in the patch. I could go via a file, but is there the option to edit the piping command in an editor? My use of nano here doesn't actually work, since I'm not aware how to get it to write to stdout.

Sometimes I need to write text and then pipe that text into another command. My usual workflow goes something like this:   vim # I edit and save my file as file.txt cat file.txt | pandoc -o file.pdf # pandoc is an example  rm file.txt   I find this cumbersome and seeking to learn bash scripting I'd like to make the process much simpler by writing a command which fires open an editor and when the editor closes pipe the output of the editor to stdout.  Then I'd be able to run the command as quickedit | pandoc -o file.pdf.   I'm not sure how this would work. I already wrote a function to automate this by following the exact workflow above plus some additions. It generates a random string to act as a filename and passes that to vim when the function is invoked. When the user exits vim by saving the file, the function prints the file to the console and then deletes the file.   function quickedit {     filename="$(cat /dev/urandom | env LC_CTYPE=C tr -cd 'a-f0-9' | head -c 32)"     vim $filename     cat $filename     rm $filename } # The problem: # => Vim: Warning: Output is not to a terminal   The problem I soon encountered is that when I do something like quickedit | command vim itself can't be used as an editor because all output is constrained to the pipe.   I'm wondering if there are any workarounds to this, so that I could pipe the output of my quickedit function. The suboptimal alternative is to fire up a separate editor, say sublime text, but I really want to stay in the terminal.


Hatcher's Algebraic Topology Corollary $3.37$ states that a closed manifold of odd dimension has Euler characteristic zero. But to consider about the Euler characteristic, every closed manifold must have a finite CW structure. However, there are no relevant comments in the book. Is this true? (It should be true, though) Where can I find a proof or statements of this?  Remarks.   There is a theorem that the Euler characteristic does not depend on a particular CW structure(thus, well-defined) for a finite CW complex. More precisely, we have for a finite CW complex $X$, $\chi(X)=\sum_i(-1)^i\mathrm{rank}H_i(X)$, where $\chi(X)$ is the Euler characteristic of $X$. In Hatcher's, a closed manifold means a compact manifold without boundary. In particular, we only need to show that a closed manifold has a CW structure, since a compact CW complex must be finite. Hatcher does not require second countability defining manifolds. Thus, a manifold is just a Hausdorff space which is locally Euclidean.

What is the strongest known theorem (if any) that classify which manifolds can be built as CW complexes? Thank you guys. This is just  a question I thought of during class, obviously not homework...


Some hosting providers don’t support IPv6 at all, others such as DigitalOcean only support IPv6 on non-custom Droplets and don’t support it at all for load balancers and other shenanigans. I’ve read that IPv6 requires ICMP to work properly, but can’t find good documentation on what to allow in iptables. So, what’s the deal here... my quest to adopt IPv6 has been very frustrating so far. Am I missing something? Should I just drop the project?

My web server (Ubuntu, Nginx) have both IPv4 and IPv6 addresses assigned by the host. For my website, shall I bind it to only an IPv6 address? Is it the standard recommended way? Or, shall I use both IPv4 and IPv6 addresses?


So I am taking computing machinery course in university this spring and we don't get any kind of decent assistance with assignments.  I have a program that multiplies two binary values using add-shift method which works fine for small numbers of any sign, but I need it to work with 2 certain numbers for part B of the assignment.  While debugging I have discovered that the code has the right product stored in the register but after printing the number shown is not the same as the number in the register.  Sorry if I posted too much code or didn't post enough information, please let me know if I should change anything about the post.  The code is all done through putty connecting to the school's server which is run on linux.  This is where the debugger shows that register x3 (which stores the product argument for the printf formatting) holds the right number immediately before the print statement  (gdb) i r x3 x3             0x1850505038     104426655800    This is after the print statement where it prints the wrong number  (gdb) next 50              bl      printf (gdb) next 522133279 times 200 equals 1347440696   Here is the program          define(multiplicand, w19)         define(multiplier, w20)         define(product, w21)         define(i, w22)         define(temp3, w23)          define(result, x24)         define(temp1, x25)         define(temp2, x26)  fmt:    .string "Multiplicand: %d \nMultiplier: %d\n" msg:    .asciz "%d times %d equals %d\n"         .balign 4         .global main main:   stp     x29, x30, [sp, -16]!         mov     x29, sp          mov     multiplicand, 0b11111000111110001111100011111         mov     multiplier, 0b11001000          adrp    x0, fmt         add     x0, x0, :lo12:fmt         mov     w1, multiplicand         mov     w2, multiplier         bl      printf          mov     i, 0         mov     temp3, 1 loop:         cmp     i, 32         b.eq    print         tst     multiplier, temp3         b.eq    count         uxtw    temp1, multiplicand         uxtw    temp2, i         lsl     temp1, temp1, temp2         add     result, result, temp1 count:         add     i, i, 1         lsl     temp3, temp3, 1         b       loop print:         ldr     x0, =msg         mov     w1, multiplicand         mov     w2, multiplier         mov     x3, result         bl      printf          mov     w0, 0         ldp     x29, x30, [sp], 16         ret   There were no error messages  The expression i'm trying to compute is:  522133279 * 200 = 104 426 655 800  The value that printed was 1 347 440 696, but this value came from the register that had the correct value stored immediately before the print statement

The printf function takes an argument type, such as %d or %i for a signed int. However, I don't see anything for a long value.


I've got a Java method that takes a Calendar as a parameter, calculates some date before the provided date, and returns this new Calendar. Now, if I log the values of the first Calendar, initialize a new Calendar as the value of the returned Calendar, then log them both, they're shown to be the same date. Why does the method return the value of start and also change the value of startDate in the main method? Section of code that passes a Calendar to the method Dating.getStartDate(); Calendar endDate = Calendar.getInstance();  Log.i("DATING", "End Date = " + endDate.getTime());          Calendar startDate= Dating.getStartDate(endDate);          Log.i("DATING", "Start Date = " + startDate.getTime()); Log.i("DATING", "End Date = " + endDate.getTime());  The Method: public static Calendar getStartDate(Calendar end) {          Calendar start;      Log.i("DATING", "Calculating 100 previous occurrences");     for (int count = 0; count < 100; count++){         start = getPreviousOccurrence(end);      // Calculates some day before end         end = start;                             // sets end to new value of start     }     Log.i("DATING", "getStartDate() returning start date of " + start.getTime());     return start; }  And here is the log output: I/DATING: End Date = Sat Jan 09 23:13:04 EST 2021 I/DATING: Calculating 100 previous occurrences I/DATING: getStartDate() returning start date of Sat Jan 25 23:13:04 EST 2020 I/DATING: Start Date = Sat Jan 25 23:13:04 EST 2020 I/DATING: End Date = Sat Jan 25 23:13:04 EST 2020

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


On windows home we have several users (mostly family members). These users have different path requirements. Can they set their respective path ( without affecting others)? If that is not possible, how can the admin change the path for a particular user?

When clicking on "Advanced system settings", I need to login as the administrator and hence only edit the administrators environment variables (in addition to the machine wide ones). How do I edit the environment variables of a standard user?  Details  With the migration to Windows 7, I decided to work as a standard user instead of an unprivileged administrator. Works well so far but I encountered a tiny problem:  When I try to change per user environment variables via the control panel I have to login as an administrator. But since I run that part of the control panel as the administrator I can only edit the administrators variables.   How am I supposed to edit my own environment variables?  Without resorting to extreme measures, such as editing the registry (as suggested in  )


I recently came across an MCAT question that confused me, and I haven't been able to understand it. The answer explanation claims that the work energy theorem is not valid when there are nonconservative forces or a change in potential energy. Is that true? I have looked at other posts, but as far as I can tell, non-conservative forces and potential energy shouldn't invalidate the work energy theorem. The question is included below   "Knowing the speed of an RBC means that the initial and final kinetic energies of the RBC can be found, and therefore that the change in kinetic energy can be calculated. However, realize that the work energy theorem is valid only when there is no energy lost to non-conservative forces. Since in moving from the aorta to the capillaries, energy of the RBCs will be dissipated due to frication and the potential energy will change, the work energy theorem is invalid." According to Kaplan

How can the  be valid in presence of non-conservative forces since conservation of energy is not there?


Suppose that $P$ is an ortogonal matrix.   Then we have the following:   ($a$ and $b$ are vectors)   $$\frac{Pa \times Pb}{\|Pa \times Pb\|}=\frac{\det{(P)}P (a\times b)}{\|\det{(P)}P (a\times b)\|}=\frac{\pm P (a\times b)}{\|\pm P (a\times b)\|}=\frac{\pm P (a\times b)}{\| P (a\times b)\|}=\frac{\pm P (a\times b)}{\|  a\times b\|}$$   Is this correct so far?   How can we continue?   To what is $P (a\times b)$ equal when $P$ is orthogonal?   $$$$     $$$$   EDIT:   I want to show what happens to the second fundamental form of a surface $\sigma$ if we apply an isometry.    An isometry is $\tilde{\sigma}=P\sigma+a$.   Then $$\tilde{\sigma}_u=P\sigma_u , \ \tilde{\sigma}_v=P\sigma_v, \ \tilde{\sigma}_{uu}=P\sigma_{uu}, \ \tilde{\sigma}_{uv}=P\sigma_{uv}, \ \tilde{\sigma}_{vv}=P\sigma_{vv}$$   We have $$\tilde{\textbf{N}}=\frac{\tilde{\sigma}_u\times\tilde{\sigma}_v}{\|\tilde{\sigma}_u\times\tilde{\sigma}_v\|}=\frac{P\sigma_u \times P\sigma_v}{\|P\sigma_u \times P\sigma_v\|}=\frac{\pm P (\sigma_u\times \sigma_v)}{\|  \sigma_u \times \sigma_v\|}$$   Can we eliminate $P$ ?

Let $a$ and $b$ be two unitary vectors in $\mathbb E^3$, and let $Q$ be an orthogonal matrix. Does the following hold?  $$Qa \wedge Qb = \pm Q(a \wedge b)$$


I am quite new with Linux and Ubuntu in general but this isn't my first installation (failed or not).  I have a fresh computer with this config:   Asus Rog Crosshair hero viii AMD Ryzen 9 3900X NVIDIA Geforce RTX 2080 Ti 2x16 RAM G Skillz 2 SSD M.2 NVME 2 HDD   I started to install Windows on the first SSD and I use one of the HDD as storage.  What I want and tried to do is now to install Ubuntu on the second SSD with the last HDD as storage.  I created a bootable USB with the LTS version of Ubuntu, restarted my computer and asked to boot on that USB.  Note: the USB is a 16Gb Corsair USB 3.0.  Then, I selected install Ubuntu and the error came just after this step. Here is the output i got just before the screen started to output weird green, blue and pink lines:    Can anyone help me please? I didn't find a similar problem on Google and I don't know what to do.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I ran into the same problem as posted here   I now found a solution but am not able to aswer due to my newbie state.  I found out that the problem only exists on my Intel video laptops (nvidia was fine) and occured only with themes having window borders with more than 1px width.  My solution was to create a file /usr/share/X11/xorg.conf.d/20-intel.conf with the content :  Section "Device"    Identifier  "Intel Graphics"    Driver      "intel"    Option      "AccelMethod"  "uxa" EndSection   This switches off sandy bridge acceleration and turns back to slower but reliable uxa acceleration.

I upgraded to the latest Xubuntu 13.03 and sometimes borders of my windows (regardless the application) become strangely dashed. I managed to make a screenshot:    The screenshot is with , but the issue is not theme-dependent. I tried multiple themes including the default one for Xubuntu and these dashed borders still appear.  Dashes appear and disappear - they are not permanent. It's annoying. Does anyone know why such dashing appears and how to fix it?    Update: Adding my compositor settings:


If I connect to my server via any of the ips (moo1210.tk:25561 or localhost:25561) I get a java.net.connectexception: Connection refused: no further information error, its allow on the firewall and its being port forwarded, what should I do? The server type is a 1.7.10 forge server.

I am trying to play a map on LAN. But every time I try to log on, I get:     java.net.ConnectException: Connection refused: no further information:   This used to work, but for some reason has stopped all of a sudden. I looked it up online, and everything I found said the firewall just wasn't allowing Java through. I followed tutorials to allow Java through the firewall, but even then it won't work. I know for a fact that I'm putting the IP in correctly, and everything seems to be correct, but yet I still get the same error message.  If it helps any, I'm using MC version 1.8.9 (the map requires it), and I don't have any mods.


I'm trying to be able to hit a button, and 5 out of 6 times have nothing happen, but on the 1 out of 6 time, I want it to give a pulse output. This is to make a Russian roulette game, I'd like the input to be a button because I want to charge tokens to play it on a server with friends.  If you press the button, there's a 1/6 chance that a dispenser will fire out a single tent, and a 5/6 chance that nothing happens.

I have 5 buttons and only one of these can be correct, all others must be false. These 5 outputs will go into 2 outputs, in between there needs to be a circuit which changes which single button out of the 5 will go down the "correct" output of the final 2. The 4 remaining buttons must go to the second of the final 2 outputs. Both final outputs must give out a true signal for a brief period the same as a button on its own would produce. There should also be a way of activating the circuit. Not sure if that is explained well enough so I have made a basic diagram of what I need.  The diagram shows how I need the signal to be split. However in between the buttons and the final two wires there needs to be a circuit (marked by the grey box). This circuit changes the single button connected to the left wire. The right input should start the circuit and randomise the 5 buttons. There are no limits to size, amount of materials used or method used. This question is similar to the one asking about , but I am specifically working with Redstone circuitry - the commands solutions do not apply here