How can I find a file at the same time view the size of the file?  ERROR: I tried this command, but I only got the size and details of other files.  find -name "*.conf" | ls -l
I can easily find files with given string in name:  me@comp:/usr/local/hydra/hydra-7.4.2$ find -D stat -name "*hack*" ./hack881663129.txt ./hack881663129_7.txt ./hack881663129_5.txt ./hack881663129_4.txt ./hack881663129_4_7.txt ./hack881663129_6.txt ./hack881663129_1_6.txt ./hack881663129_8.txt   How can I also print file details, like size, date of creation etc.?
Where should collision detection logic be placed? I am developing a small 2D game engine. The characters have a paint method which currently does the following:   Calculate the new position of the character as per its speed, etc. Update the collision grid cell ** Draw the character at the new position   ** I have created a collision grid to reduce the number of intersection checks  Now the basic algorithm which I have thought for detecting collision is:   For Each Character     Check intersection with characters in surrounding 8 cells   I can simply place this code in the paint method. But here is the problem I anticipate.  Suppose two characters A and B lie in adjacent cells in the collision grid. Now as per the above algorithm in the iteration of character A it will detect that it has collided with B. In the iteration for character B it will detect that it has collided with A.  But I have an idea that when A detects that it has collided with B, it should inform B that it has collided with A. This would save lot of comparisons when there are more than 2 actors colliding. But I am not sure how to handle this. I think instead of every character checking for its collision, I should check for the collision inside the game loop.   Would this approach be correct? How have you handled this kind of problem? I thought of the collision grid thing myself. Are there any alternatives to collision grid logic? $\gcd(a,b)=1, x^a = y^b\Rightarrow x = n^b$, $ y = n^a$ for an integer $n$. If $ a$, $ b$, $ x$, $ y$ are integers greater than $1$ such that $ a$ and $ b$ have no common factor except $1$ and $ x^a = y^b$ show that $ x = n^b$, $ y = n^a$ for some integer $ n$ greater than $1$.  I started this way: $x^a=y^b$ $=&gt;$ $x=y^{b/a}=(y^{1/a})^b$. Thus $x$ is an integer, and so is $y^{1/a}$, so $y=n^a$ for some integer $n$ greater than $1$. Then from the given relation, we get $x=n^b$.   I am not very convinced with my solution, as I feel I did some mistake. Can anyone point out where the mistake is? Any other solution is also welcome :) New to Macbook Pro, need help upgrading I was recently gifted an old Mid 2010 Macbook Pro with the following specs listed here:    I would like to do a few things to it, but I have never owned an apple computer before and I know there are some restrictions on the hardware i can purchase to upgrade it.  These are the things I want to do  1) Upgrade Ram: Currently it has 2x2GB of RAM in it. This model is rated for up to 8GB but I have been reading online and it seems some people have been able to successfully install 16GB of RAM, so i am confused. Does anyone have a definitive statement on whether or not this Macbook Pro will work with 16GB of RAM? If it does accept 16GB total which RAM should i buy for a Macbook Pro like this? If it only accepts 8GB total which RAM should i buy? And I know the clock speed must be 1066Hz for this Macbook Pro, but can i use DDR3, or DDR4 RAM? Does the DDR type matter?  2) Install Secondary Hard Drive: I am not 100% so i need someone to inform me but i believe there is space in this Macbook Pro for a second hard drive. Does the CD Drive need to be removed in order for a second Hard Drive to be put in? Or is there simply space inside it for a second hard drive but not installed by Apple? Either way I would like to install an SSD into it and install the Operating System onto that SSD. Which SSD can i look to buy that is compatible with this  Pro?  3) Fresh install of Mac OSX: As it currently stands my friend who gave this laptop to me didn't erase his data. I am uncomfortable with this and want a fresh start. How do I do a fresh install of Mac OSX Mavericks (or should i wait for Yosemite?). Where can i buy a Disk/USB for it (or make a disk/USB for it) to do a clean install and how do i format a Macbook Pros hard drive and install fresh? Should this be done at an apple store?  4) Higher Screen Resolution: This is my lowest priority and I don't think it is possible to do without major invasive changes to the Macbook Pro but i want to know if it is possible. Currently the Max Resolution on the Device is 1440x900, i would like to know if it is possible to replace the LCD with one that is 1920x1080 for high resolution. I understand how Insight and Perception can be used passively: for the DM to determine if an enemy Deception or Stealth attempt is successful without alerting the players that someone is deceiving or sneaking.    But the Observant feat in the Player's Handbook states:      [...] You have a +5 bonus to your passive Wisdom (Perception) and passive Intelligence (Investigation) scores.     So in what situation would a DM be rolling something against the player's Investigation without letting them know? Changing Default Apache version on MacOS Sierra A DHS sweep of the network showed that one of the researchers Macs is running a non-safe version of Apache (2.4.25) and they would like him to update to at least 2.4.27.  He is having difficulty getting MacOS to use the new version of Apache rather than the one installed by default with Sierra. His issues are:  Mac OS X 10.12.6 Sierra   I have installed httpd 2.4.27 . . .  /usr/local/apache2/bin/ but the default httpd running is located at /usr/sbin/ I cannot install a new httpd into /usr/sbin/  - no write persmissions for sudo I made a root user active - but "root" does not have write permissions for /usr/sbin/ either   I cannot find any source on the web that describes how to change the httpd path from the default system version (/usr/sbin/httpd) to a new USER installed version, like /usr/local/apache2/bin/httpd  What steps am I missing? I was so good with windows, now I’m feeling like a complete idiot.  I have an SSD for ubuntu and want to install the majority of my programs to a separate HDD but I have no clue how. All searches I have tried only turn up with dual-boot installations.   (RESOLVED -> ) I am also having trouble locating "/etc/". Specifically, to modify Conky. Searching for this term only turns up instances where people are telling you to access this file, not how to get to it. Anyone seen this one yet? Vote too old to be changed, unless post is edited My vote was only a few hours old. Then I realized the answer was wrong. Updated my question and went to remove the vote. Even after updating question I still have the issue. Small issue, but frustrating.  See also: I want to perform performance testing on my test server.  How can I capture workload from production and replay on my test server?   Basically I'm looking for detailed steps so that I can replay the workload from production to my test environment. How to download image using requests I would like to know the best way to write test methods for controller extension classes that are used by Visualforce.  What is the minimum set code that I need to cover the basic operation of the controller without taking into account any custom functionality that I might add.  Here is my example class with the test method ready to be completed.  public with sharing class myExtension{      private final Account acct;      public myExtension(ApexPages.StandardController stdController){         this.acct = (Account)stdController.getRecord();     }      public static testMethod void testmyExtension(){      } } Is there something like python's interactive REPL mode, but for Java? I want to burn a Windows ISO to a USB device in Ubuntu. How do I do this?   I know how to burn a Ubuntu ISO into a USB device, but with a Windows ISO it's not the same. I accidentally closed the window for the verfication code I wanted to create an account for Ubuntu One, but I got impatient when the email with the verification code didn't arrive... I thought I might have typed the wrong address, closed the window and tried again. it told me the address already existed and I just got the code. But since I closed the window I missed it. Is there any way to recover the code? How can I get a specific Floor in my Tower? I really really want a specific floor () in my Tiny Tower.  How does the game decide which exact business will go into the "Creative" floor?  Do I have to meet requirements (such as tower height) to unlock certain floors? Error Message:      "A reboot is pending. Please restart before starting Visual Studio".    I installed Visual Studio (Visual Basic 2015 and SQL 2015) and after what looked like a successful install I then got the "Reboot" window.   Not expecting it I had a bunch of things open. So I closed a bunch a bunch of things, and did the reboot myself.   Now I cannot run Visual Basic because it ONLY gives me the above error message in the pop-up window. It won't even let me do a re-install.   All it does is keep giving me the above error message.   If you have any advice that's better than a complete uninstall/reinstall I'm sure everyone in my situation would benefit from it.  How can I resolve this issue? I don't quite understand the difference between /a/ and /æ/. Google gives the transcription for 'add' as /ad/, while Wiktionary returns /æd/.  Are these sounds actually distinct or is this just two different ways of writing the same one? Lightsabers are not made of light, nor have they anything to do with lasers (even if there are people who mistakenly refer to them as "laser swords").   Blaster bolts are also not lasers. They travel significantly slower than light, they travel even slower than ordinary bullets fired by gunpowder. (called slug throwers on the Star Wars universe)  Was there any use of lasers ever presented in the Star Wars universe, either as we use them today, or as weapons?  By laser I mean something which behaves like laser does, even if it's not called by that name in a movie or book. If something is called a laser (in the script or by fans) but clearly doesn't work like a laser (for example, it travels slowly, and in visible blocks) it doesn't count. What's the difference between a shunt resistor and a four-terminal resistor? I want to know if the four-terminal resistor and the shunt resistor are the same.   Is there another use for the four-terminal resistor except measuring current? Algorithm to detect overlapping periods I have a shapefile with 9000 agriculture fields and what I like to do is to determine for each field (=each polygon) the direction of the longest segment.  For instance, the selected polygon in the screenshot has its longest segment from west to east so I would like to mark give the polygon the attribute W (for west) or either E (for east).   Is there any solution to solve my problem in a fast but generalized way?   I do not need very detailed results. It's just for the interpretation of a question.   I'm seeking an answer using ArcGIS 10.2 for Desktop.  To be more precise on what I'm looking for I try to explain more practical: I'm doing winderosion analysis for a specific area with 9000 fields. As result I have a potential susceptibility for each field. I like to check, if the fields with high susceptibility are correlated to a certain orientation of the fields, e.g. check if most of the fields with high risk are oriented in the main winddirection or not.   The search for the longest segment is not really important for me. It was just an idea I had to determine the direction. So forget about the longest segment if there is a way to determine the direction with another method ;)