I have this code:  String[] arr1 = {"asd1", "asd2", "asd3", "asd4", "asd5", "asd6", "asd7"};     String[] arr2 = {"asd8", "asd9", "asd10", "asd11", "asd12", "asd13", "asd14"};      String[] concatenated = Stream.of(arr1, arr2)            .flatMap(Stream::of)            .toArray(String[]::new);      String[] concatenated = Stream             .concat(Arrays.stream(arr1), Arrays.stream(arr2))             .toArray(String[]::new);      String[] concatenated = Stream.of(arr1, arr2)             .reduce(new String[arr1.length + arr2.length],                     (String[] a, String[] b) -&gt; )); ///// how to proceed from here?      System.out.println(Arrays.toString(concatenated));   I am playing around and i didn't managed to find how to use the reduce function to combine them both to get this result:  [asd1, asd2, asd3, asd4, asd5, asd6, asd7, asd8, asd9, asd10, asd11, asd12, asd13, asd14]  note: The order doesn't really matter, the important thing is to get them both into one array with the reduce function..  Is it possible to do it with the reduce?
I need to concatenate two String arrays in Java.  void f(String[] first, String[] second) {     String[] both = ??? }   What is the easiest way to do this?
I am new to Apex, but it is apparent to me that most (if not all) standard objects probably have an ID field. However, this field does not appear in the reference for the standard objects in the Soap API Developer's Guide. Instead, it reads:     To verify the complete list of fields for an object, you can use a   describe call from the API, or inspect with an appropriate tool, for   example, inspecting the WSDL or using a schema viewer.   If I want to find out for sure whether an object has an ID field, or what the field is named (is it ID, Identifier, id, etc), it sounds like I need to use a "describe call" or "an appropriate tool" or inspect the "WSDL" using a "schema viewer".  Now, I am an experienced software developer, but those solutions are so ambiguous I have no idea where to look next to figure out how to get an object's ID. Can anybody either refer me to more specific documentation, or explain how to find the complete field documentation via a "describe call", "appropriate tool", or "schema viewer"? I would like to render an animation as a series of .png images with transparent backgrounds for use in a video. Is this possible? Can I choose which records are copied in a Partial Copy sandbox? We have a partial copy sandbox that we're using for development and testing.  This is really helpful as some of our applications internally store Salesforce id's.  However, there is a limitation with the partial copy as it only brings in 10,000 records per object from the production environment.  Unfortunately some of the id's we internally store are not being brought down into our partial copy which causes errors.  The 10,000 records that it did copy over aren't needed; I realistically only need 1 or 2.  Is there any way I can achieve copying over a specific record from the production environment? Currently my spouse and I rent a small apartment.  Eventually we'd like to expand the family, and a one bedroom rental won't cut it forever - even if we continue renting we'll be expanding to a detached single family home eventually.  In our area the rent ratios work out to about 16, which is under the cut for buying being a better financial decision over the long haul - i. e. I don't think it'd be economically an awful decision to buy (NYT calculator shows 10 years at the current prices and rents for buying to make sense).  I've also read enough of the rental propagandists to know that home ownership isn't the best way to grow my money.  My reasons for wanting to own are the intangibles: knowing we aren't going to have to move due to a landlord, being able to modify the place to our own liking, and that intangible sense of "this is mine" (even when it's the bank's for a while).  The things we do have:   Around (at or over) a 30% down payment depending on purchase price, and we won't be under 30% Closing costs separate from that fund Around 1% of the home value in reserve for emergency repairs separate from those funds A six month emergency fund separate A fund to replace an ailing car that will probably die before we can save up after this expense   At some point in the year or so after the purchase we plan to have enough saved up to pay down the principal and change our monthly payment somewhat, but not significantly.  So it seems like we've got the financial ducks in a row.  We can continue to fully fund our retirement accounts and make the monthly payments (PITI).  The only hesitation we have is that we can't make our payments comfortably on one income alone - it'd be over 30% of one income to do so, by just a bit.  So neither of us can completely stop working, although the second income does not need to be large.  Are we missing any important financial data about this step?  Should we be concerned about job loss (even though no signs of it are imminent for either of us)? Audits bug in the filtered review queue Just recently the . I've got  this morning which seems to be out of scope for my filtered list. I have filtered my list to only review VBA and Excel-VBA tags while the audit is tagged with perl http pipes which have nothing in common with VBA. I see a problem with the way the system currently works  Since I have a filtered list of tags, once I see a differently tagged question I already know it's an audit. Come on, that's too easy!  Can this please be fixed? update I have ran into  which I decided to edit - the question was tagged VBA and I thought it had nothing to do with VBA so I selected Edit which was the correct action. Now, once the first audit was clearly one to close - nothing to do with VBA and really easy to know that it actually was an audit - the second one was a very good audit. I am just thinking now if this is a proper bug or just a matter of malfunction in the system. I think the first one may have been made an audit for the wrong reason. Let's turn this into a discussion as I can't clearly work the system out. How do I make an HTML text box show a hint when empty? I'm using Ubuntu 13.04 and I have ASUS X550V laptop. This is my rfkill list:  0: asus-wlan: Wireless LAN     Soft blocked: no     Hard blocked: no 1: asus-bluetooth: Bluetooth     Soft blocked: no     Hard blocked: no 2: phy0: Wireless LAN     Soft blocked: no     Hard blocked: yes 3: hci0: Bluetooth     Soft blocked: no     Hard blocked: no   Before you start going: Hey, just turn on your hardware switch, dummy... my hardware switch is Fn + F2 and it works perfectly fine on my Windows boot. But, on my Ubuntu boot it does nothing... All the other Fn + F_ combos work (turn off the touchpad, screen turn off, screen brightness, sound) and they give some kind of visual indicator when I press it.  My lshw log:  *-network DISABLED                 description: Wireless interface                 product: AR9485 Wireless Network Adapter                 vendor: Atheros Communications Inc.                 physical id: 0                 bus info: pci@0000:03:00.0                 logical name: wlan0                 version: 01                 serial: 24:0a:64:28:b4:25                 width: 64 bits                 clock: 33MHz                 capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless                 configuration: broadcast=yes driver=ath9k driverversion=3.8.0-19-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11bgn                 resources: irq:17 memory:f7900000-f797ffff memory:f7980000-f798ffff How can continue the equation of the rectangle red in next line?   \documentclass[11pt,a4paper,twocolumn]{article}  ...  \begin{equation*}     \left| \dot{r} \right| =     \sqrt{{- \, {e}^{-t} \left( \cos t + \sin t \right)}^{2} \, + \, {{e}^{-t} \left( \cos t + \sin t \right)}^{2} \, + \, {(- \, {e}^{-t})}^{2}} \end{equation*} Google Drive files opening in new window vs new tab? This might be a duplicate of  but that question is 5 years old and unanswered.  When I'm in drive.google.com and I open a G Suite file (either double-click or select &amp; press enter) in Firefox it opens in a new window whereas in Chrome it opens in a new tab.   Why do they do that? Is this a browser-specific quirk or a Google setting (that I haven't found)? Is there a way to control the behavior? I'd like them both to open in tabs, but presumably the same answer would be relevant in the opposite direction too. I am crawling some data using Apache Nutch and storing it on my USB Drive. The OS itself is Ubuntu Live Boot OS. But for every restart or shutdown I am losing my data. I also tried suspending my Ubuntu user still data was not visible when I reinserted my live USB.  Is there any way I can keep the data intact and does not loose and application settings installations when I do restart Ubuntu.  Used USB installer provided by pendrivelinux.com at Why does copying the same amount of data take longer if spread across many separate files? I noticed that copying 24Mb worth of data from one folder to another took about 30 seconds because (I'm assuming this is the reason) it was over 1,000 separate files. Copying 24Mb shouldn't take so long. Why does the number of files make a different?  I'm running Windows 7 on a MacBook (4GB ram, Intel(R) Core(TM)2 Duo CPU P7450 @ 2.13GHz, 32-bit Operating System)  EDIT: NTFS is the file system used on the drive Trying to wrap my head around the ways to properly handle collision in a game designed around components.  I see many examples have some sort of PhysicsComponent that gets added to the entity's list of components but the actual implementation is confusing me.  For this to work, the PhysicsComponent would need access to the world around it. This doesn't make intuitive sense to me. Shouldn't a component be unaware of not only its container (the entity), but its container's container (the world)?  To me, it sounds like the level or scene should maintain a list of these entities and every game update, loop through the entities to determine which collide.  My question is firstly, whether or not this is good design, and secondly, how to determine which entities can collide. I suppose solid entities could implement an empty IRigidBody interface so the level could determine which entities in the list support collision. But is this breaking the component design?  Instead, should they contain an empty RigidBody component? This may actually be better because it may not always be empty and this approach is more future-proof. The only problem with this is the complexity. The scene would have to loop through not only every entity, but also every entity's components to determine if it had this RigidBody component.  Thirdly, when they do collide both entities should be informed somehow and I am unsure on how to accomplish this either.  Let's say that both entities contained a HealthComponent and when they collided both their healths would be decreased by some arbitrary value, 5. I suppose it would be the scene's responsibility to handle this when it detects a collision between two entities?  But then is the scene responsible for too much? I could see this possibly getting out of hand and becoming unwieldy when the scene is responsible for many things entities should not (?) have access to.  Edit: Question updated with more details. I've been wondering why I've never seen any official specifications of the maximum allowed torque that can be exerted upon lens mounts. It seems to me like a very useful specification, but I can't seem to find it from any manufacturer.  indicates that there might be no specifications for Nikon mounts. Are there really no manufacturer that publish these specification of their mounts? For an infinite line charge, $E$ falls off with $1/r$; for an infinite sheet of charge it's independent of r! The infinitesimal contributions to $E$ fall off with $1/r^2$, so why doesn't the total $E$ fall off the same way for the infinite line and sheet charges? Should an image carousel on a mobile site automatically rotate? Or should the user have complete control? The intention is to have a slider/carousel that shows 6 or 7 images which the user can look through by clicking arrow buttons left or right. But the question has also come up if the user has not started looking through the images, should the carousel start automatically rotating the images. Since this is for a mobile site, I'm uncertain... What primitives are needed to generically implement public-key cryptography? Are the review queues planned for the iOS app? Excel "if-then" formula IF(B4-40&lt;0,0,(B4-40))   Above is my formula to show only positive numbers above 40 in the given cell. If my hours are, let's say, 35, I do not want a value of -5; I want the cell value to be 0. Why is this not working? how to get the last character of a string? Is "each" singular or plural? You goes with are. Does the presence of each change this?  How satisfied are each of you with the time you've spent in your respective  universities. How satisfied is each of you with the time you've spent in your respective  universities