I have seen way of querying in many ways but does that really make a difference or its  just a way of coding  List&lt;CustomObj__c&gt; CustObj = new List&lt;CustomObj__c&gt;(); CustObj = [Select id, Name, CustField1__c, CustField2__c from CustomObj__c];   And  for(CustomObj__c i : Select id, Name, CustField1__c, CustField2__c from CustomObj__c){}   Is there a difference or just a way of writing a code.
Some of code I read in trigger is like this    for(account a: [select id  from account where id in: mapAccount.keySet()]) {     //code      }    some are like   List&lt;Account&gt; listAccount = [select id  from account where id in: mapAccount.keySet()];   for(Account a: listAccount ){   //coode   }   Are those same from performance view?which one is better?
I can't (vote to) close a question I voted to close before but then retracted? For example...  I closed a vote for 'too broad'. But then I realized I wanted to close it as a specific duplicate of another question instead. So I retracted my close vote.  That worked. But I can't now vote to close as duplicate and the title says I already voted to close.  Maybe this is intentional but it doesn't feel that way. What is Elrond's position/status, as compared to Galadriel's? In the Lord of the Rings books, Galadriel of Lorien is even more exalted than in the movies.  She is essentially a queen, and the deference shown to her far exceeds that shown to Elrond of Rivendell.  Yet in the films, we see her trying to persuade Elrond to intervene in the battle of Helm's Deep by sending Elf troops to reinforce Theoden's forces.  Eventually, Elrond relents, and orders the Elves into battle.  But the troops in question are Galadriel's, not Elrond's - they are led by Haldir, one of Galadriel's guards; the trip from Rivendell to Helm's Deep (500 miles as the crow flies) is about 2 times longer than the trip from Lorien to Helm's Deep (250 miles as the crow flies), far too long for the reinforcements to arrive in time.  But then Haldir greets Theoden of Rohan by saying he has come bearing a message from Elrond - not Galadriel.     I bring word from Lord Elrond of Rivendell. An Alliance once existed between Elves and Men. Long ago we fought and died together. We come to honor that allegiance.    This seems odd for a few reasons. The troops are Galadriel's, not Elrond's, and they come from Lorien, not Rivendell. She clearly wanted to send them to Helm's Deep - she was cajoling, prodding, and guilt-tripping him into doing just that.  She is also a queen, and could presumably order them into battle regardless of what Elrond says.    So why does she have to talk Elrond into letting her send her own troops into battle, especially when he is too far away to contribute manpower (elfpower) or materiel to the battle of Helm's Deep?  Why not say, "I'm not going to sit here doing nothing while Saruman runs roughshod over Rohan;  you can support me or not, Elrond, but if you aren't willing to help, you can at least get the hell out of the way"?  Why does her aide Haldir "bring word from Elrond" when the troops - and the impetus for sending them - came from Galadriel, and Elrond resisted sending them out for as long as he could?  And again, what is Elrond's official position/status/rank, and why would a queen need his permission to deploy her own troops? Automatic line breaking of long lines of text? Changing unusual foreign currencies in London I've just returned from several unusual countries in Asia, and annoyingly despite being told I'd have no problem, I'm unable to find anyone in London to change back to pounds.  I've tried Travelex in Heathrow, a currency exchange place, and the post office.  The currencies include cash from: Mongolia, Kyrgyzstan, Kazakhstan and Uzbekistan.  Most of the responses when shown the money is to the tone of "What the hell currency is this?" which doesn't fill me with confidence.  Any suggestions welcomed for places that may change this. Otherwise I may need to go back next year ;) Instant e-mail notifications of answers to questions I'd like to have Instant notifications by email of answers to my questions.  Can this be implemented? Is there an ideal PWM frequency for DC brush motors? How to connect Android with MySQL using Mysql JDBC driver Copy existing property from e.g. Properties window to a custom panel So if I have this custom panel in the 3D view, is there a way I can take a property from for example the properties window and paste it onto my panel below the "text" prop, without creating a new property?  The reason I do not want to create a new property is because I want them to share all data, such as values, keyframes, drivers etc.        bl_info = {     "name": "",     "description": "",     "author": "",     "version": (0, 0, 1),     "blender": (2, 70, 0),     "location": "",     "warning": "",      "wiki_url": "",     "tracker_url": "",     "category": "" }  import bpy  from bpy.props import (StringProperty,                        BoolProperty,                        IntProperty,                        FloatProperty,                        FloatVectorProperty,                        EnumProperty,                        PointerProperty,                        ) from bpy.types import (Panel,                        Operator,                        AddonPreferences,                        PropertyGroup,                        )   class inouse_Settings(PropertyGroup):      my_bool = BoolProperty(         name="Enable or Disable",         description="A bool property",         default = False)     class UV_OT_my_panel(Panel):     bl_space_type = 'VIEW_3D'     bl_idname = "UV_OT_my_panel"     bl_label = "Custom"     bl_category = "Custom"     bl_region_type = 'TOOLS'      def draw(self, context):          scn = context.scene         mytool = scn.inhouse         layout = self.layout          col = layout.column(align=True)         row = col.row(align = True)         row.prop(mytool, "my_bool", text="Text")       def register():     bpy.utils.register_module(__name__)     bpy.types.Scene.inhouse = PointerProperty(type=inouse_Settings)  def unregister():     bpy.utils.unregister_module(__name__)     del bpy.types.Scene.inhouse  if __name__ == "__main__":     register() I am not very familiar with databases and the theories behind how they work.  Is it any slower from a performance standpoint (inserting/updating/querying) to use Strings for Primary Keys than integers? I am following Carroll's GR book. He explain that it is convention to parameterize geodesics of photons by a parameter $\lambda$ such that  $$p^\mu ~=~ \frac{d x^{\mu}}{d \lambda}.\tag{3.62}$$  But this is the definition of 4-velocity for a massive particle in the case of $\lambda=\tau$ equal to proper time. My question then, is $$u^\mu = p^\mu$$ for all massless particles? I ask because it's well-known that proper time $\tau$ freezes for massless particles. How do I fix my locale issue? I am getting this message every time I do something like starting or stopping a service.  perl: warning: Setting locale failed.    perl: warning: Please check that your locale settings:            LANGUAGE = "en_US:en",            LC_ALL = (unset),            LC_MESSAGES = "en_US.UTF-8",            LANG = "en_US.UTF-8"        are supported and installed on your system.    perl: warning: Falling back to the standard locale ("C").    locale: Cannot set LC_CTYPE to default locale: No such file or directory    locale: Cannot set LC_MESSAGES to default locale: No such file or directory    locale: Cannot set LC_ALL to default locale: No such file or directory    (Reading database ... 21173 files and directories currently installed.)   Removing bind9 ...    * Stopping domain name service... bind9                                        [ OK ] Processing triggers for man-db ...    locale: Cannot set LC_CTYPE to default locale: No such file or directory    locale: Cannot set LC_MESSAGES to default locale: No such file or directory    locale: Cannot set LC_ALL to default locale: No such file or directory      How do I fix this error ? Sorting an array of an array of objects in PHP by key value Basically I have a setup like the following:  Array (  [0] =&gt; Array ( [0] =&gt; stdClass Object ( [nid] =&gt; 1 [title] =&gt; title1 [uid] =&gt; 1 [parent] =&gt; 0 [weight] =&gt; -15 [name] =&gt; name1 [value] =&gt; 0 )                [1] =&gt; stdClass Object ( [nid] =&gt; 2 [title] =&gt; title2 [uid] =&gt; 1 [parent] =&gt; 0 [weight] =&gt; -7 [name] =&gt; name2 [value] =&gt; 100 )                [2] =&gt; stdClass Object ( [nid] =&gt; 3 [title] =&gt; title3 [uid] =&gt; 2 [parent] =&gt; 0 [weight] =&gt; -1 [name] =&gt; name3 [value] =&gt; 0 )                [3] =&gt; stdClass Object ( [nid] =&gt; 4 [title] =&gt; title4 [uid] =&gt; 2 [parent] =&gt; 0 [weight] =&gt; 1 [name] =&gt; name4 [value] =&gt; 80 )               )   )   What I need is a way to sort all the arrays inside the parent array by the [value] key in the Object. I've been trying for about 2 days now with usort and different methods but I just can't seem to get my head around it. The [value] key will range anywhere from 0 to 100 and I need all of the arrays sorted in decreasing order (IE: 100 down to 0). Resonances in high energy physics I still do not understand what a  precisely is. Is it exactly the same as a particle? Or only an excited state?  And why does it make a peak in some diagrams? And which diagrams? I downloaded and installed version 0.29.2 of pokemon go on my Android phone, running lollipop. The app works fine most of the time, however, when I open the app without a WiFi connection (with mobile data on and working), it gets stuck on around 20% on the loading screen and doesn't budge.   The app works when I open it with a Wi-Fi connection and then leave Wi-Fi range or turn off Wi-Fi after it has passed the loading screen. However, the app will not pass the loading screen without WiFi. (Edit: Hotspots don't work either)  I've tried all the usual solutions - restarting, clearing cache, reinstalling, turning off and on mobile data. None of them work.  Any idea how I can start the app when I'm not in WiFi range? Retrieve the position (X,Y) of an HTML element relative to the browser window QGtkStyle was unable to detect the current GTK+ theme When I start any Qt app, I get this message in the terminal, and the Qt app doesn't use the same theme as my Gtk apps:  QGtkStyle was unable to detect the current GTK+ theme.   How do I make QGtkStyle detect my current GTK+ theme?  It seems that LXDE is using a settings daemon, and there is no gtkrc-2.0 file in my home folder. How to randomly subset X% of selected points? What methods are available in ArcGIS 10.2 to randomly subset a selection of points.  For example, in the attached screenshot I am interested in keeping 20% of the selected points and deleting the rest. Not to Mention ≈ [Let Alone ≈ Much Less ≈ Still Less] For brevity, I symbolise synonymity with ≈.  So  X ≈ Y  means  X and Y are synonyms.  From : let alone ≈ not to mention  From :  let alone ≈ much less ≈ still less.  Are these all synonyms? What are the similarities and differences between each? interior points and limit points of $\{(x,y): x^2+2y^2 < 1\}$ Find out all interior points and limit points of $ A =\{(x,y): x^2+2y^2 &lt; 1\}$  I understand this problem graphically, but i'm not quite sure how to prove the answer rigorously using mathematical word.  My try : Let k be an element of A, and suppose t is an element of $\{(x,y):x^2+2y^2 =1\}$, which makes minimum $||t-k||$. Then $N(k,\delta)\subset A$ when $\delta = \||t-k||$.  I suppose this will work, but I want more clear and detailed proof.  Thank you in advance. Is it possible in Minecraft to switch over from survival to creative in single player?