Undefined symbols for architecture x86_64: stack
What is an undefined reference/unresolved external symbol error and how do I fix it?
How to handle UNABLE_LOCK_ROW errors when this is caused by a batch APEX job we are facing a serious issue. We have a batch APEX job running daily which makes updates on records fulfilling certain conditions. There is another job running parallel to this, in some cases updating or accessing to the same records than the batch job and hence, causing the error:     Update failed. First exception on row 400 with id XXX; first error:    UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record or 200    records:   So, I had then read that in order to fix this kind of error you should use FOR_UPDATE in your select statement (records that have to be updated). The problem is, that you can not use FOR UPDATE for batch jobs. We tested this and effectively, we get the error:     System.QueryException: Locking is implied for each batch execution and   therefore FOR UPDATE should not be specified      It will however lock the records within each execution of execute. See   QueryLocator.getQuery()usage:      You cannot use the FOR UPDATE keywords with a getQueryLocator query to   lock  a set of records. The start method automatically locks the set   of records in  the batch.   Could you find a solution to this?. We would like to handle this in the code itself, because we don't have the permission to schedule the batch job for another time as the another job. In Ubuntu, I want to scroll up while a command is running in my terminal window and generates new output (the command that is running is rspec). I can scroll up, but each time rspec generates a new line of console output, it throws me back down to the bottom. Is there a way to scroll all the way up? I'm using terminator on Linux Mint/Ubuntu 12.04 LTS. I found a possible workaround.  says that with stty ixon  you can turn on &quot;XON/XOFF flow control for terminal output. Being able to pause output by typing ^S and resume it by typing ^Q [...]&quot; This it not totally what I wanted though, without having to pause the output (and maybe wondering when forgetting to turn it on again), I thought there might be a simple modifier key like shft-alt with mouse wheel scroll-up. Are there better solutions? I am a economics major undergraduate student who will apply for grad schools in the coming semester. I think I have quite a strong research experience in mathematical statistics (asymptotic statistics to be specific), but, unfortunately, not much in economics itself. So I am curious if economics departments in graduate schools will care about my research experience in statistics?  Maybe a broader question is if grad schools care about applicants' research experience in a different (maybe even unrelated) field at all? I guess in my case statistics and economics are still quite correlated, but what about other more distant combinations of target departments and previous research experience? How can I connect the top loop to the down loop with faces Hey I want to connect the bottom loop with the top loop so that it forms a solid.  I have tried selecting multiple vertices and pressing F but that just creates a large face which I do not want. I have tried using grid fill bu that doesn't work either. The solution that seems to work is by selecting four vertices and pressing F and then selecting the next 4 and pressing F and on and on. That just takes too long. What info does Google backup? Does anyone know what exactly does Google backup (and restore) when you enable that option?  Also, are we able to see this list somewhere? (Maybe hidden n-levels deep in Google Account information?)  Reason I ask is I've had the unfortunate experience of my SD Card dying on me, put in a temporary SD Card and allowed Google to do the auto-restore.  Some things that were restored:   Saved wireless networks Background Some apps - strangely enough only a subset of my apps were restored (some with data, some without). All previous apps were installed via Android Market.   Then finally got my new SD Card, put that in and the following were restored   Saved wireless networks Some apps - again, same problem... only a subset (different subset, even fewer apps). This time no data seemed to have been restored either.   I think it would be very helpful to be able to view/manage a list of what is backed up, and thus would be restored (but I have yet to find this list... if it even exists). I have an Optimus Elite, and it has a minimum brightness setting. In certain apps, I can reduce the brightness below the safe minimum, but when I leave the app, the brightness is increased to the system-wide minimum.  Using , I can permanently set the brightness below the safe amount, and it will stay even after going to other apps. Or using , I can accomplish almost the same thing even without needing root (it displays a translucent 'filter' over the whole screen, reducing brightness/contrast but not actually changing the backlighting power amount).  What I want to know is where the minimum screen brightness is stored. I have a rooted phone with CyanogenMod 9, so I have permissions to edit anything and could change a config or sqlite entry, but I don't know where this value is stored. What I would like to do is use the status bar brightness slider to be able to slide to the actual minimum of the screen, rather than the OS-controlled minimum. Having an app is useful, but having the functionality without the app seems to be within reach, if only I knew where the OS is getting it's safe minimum setting.  Where is this "safe minimum brightness" setting stored? If I can change it, I can remove my apps and use native controls. Redirecting cout to a console in windows I have an application which is a relatively old. Through some minor changes, it builds nearly perfectly with Visual C++ 2008. One thing that I've noticed is that my "debug console" isn't quite working right. Basically in the past, I've use AllocConsole() to create a console for my debug output to go to. Then I would use freopen to redirect stdout to it. This worked perfectly with both C and C++ style IO.  Now, it seems that it will only work with C style IO. What is the proper way to redirect things like cout to a console allocated with AllocConsole()?  Here's the code which used to work:  if(AllocConsole()) {     freopen("CONOUT$", "wt", stdout);     SetConsoleTitle("Debug Console");     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED); }   EDIT: one thing which occurred to me is that I could make a custom streambuf whose overflow method writes using C style IO and replace std::cout's default stream buffer with it. But that seems like a cop-out. Is there a proper way to do this in 2008? Or is this perhaps something that MS overlooked?  EDIT2: OK, so I've made an implementaiton of the idea I spelled out above. Basically it looks like this:  class outbuf : public std::streambuf { public:     outbuf() {         setp(0, 0);     }      virtual int_type overflow(int_type c = traits_type::eof()) {         return fputc(c, stdout) == EOF ? traits_type::eof() : c;     } };  int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) {     // create the console     if(AllocConsole()) {         freopen("CONOUT$", "w", stdout);         SetConsoleTitle("Debug Console");         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED);       }      // set std::cout to use my custom streambuf     outbuf ob;     std::streambuf *sb = std::cout.rdbuf(&amp;ob);      // do some work here      // make sure to restore the original so we don't get a crash on close!     std::cout.rdbuf(sb);     return 0; }   Anyone have a better/cleaner solution than just forcing std::cout to be a glorified fputc? How to set up Dolphin as default file manager? In C# check that filename is *possibly* valid (not that it exists) Is there a method in the System.IO namespace that checks the validity of a filename?  For example, C:\foo\bar would validate and :"~-* would not  Or a little trickier, X:\foo\bar would validate is there is an X: drive on the system, but wouldn't otherwise.  I suppose I could write such a method myself, but I'm more interested in a built-in one. I want to subtract the current frame from a previous frame, I have a image sequence and I want blender to subtract the current frame from the frame with an offset of -4. If I am on frame 5 so blender will subtract and use frame 1. Does anyone know what the Inverse Cumulative Distribution Function of Normal Distribution is? Does it have a closed form expression? I did not find any good answer using Google. What is the right way to indent your source code? What are the rules of engagement with respect to SEO in HTML 5?  Examples of things we have been mulling over with no conclusion:   Are you penalised for not using &lt;head&gt; and &lt;body&gt; tags? Do links in &lt;nav&gt; blocks get prioritised for follows? With &lt;aside&gt; (no bside though), &lt;section&gt;, &lt;summary&gt; and &lt;details&gt; which ones carry the most weight for content, one-liner descriptions and keyword tags are there search engine implications? If you use CSS to put a &lt;footer&gt; element at the top and a &lt;header&gt; element at the bottom (not that you would but it may be construed as such by an incomplete spider implementation)? Does the use of placeholder attributes on &lt;input&gt; show you are more user focused?   At the minute we are haphazardly pinning the content on the donkey with regard to tag usage but would be interesting to know if anyone has any insight into the "correct" tags to use with regards to SEO. How to check if element is visible after scrolling? I'm loading elements via AJAX. Some of them are only visible if you scroll down the page. Is there any way I can know if an element is now in the visible part of the page? Quickly read the last line of a text file? How do you format Facebook Wall posts? There doesn't appear to be any formatting links when I do a Facebook Wall post.  Is there any way to do formatting like HTML, markup, etc? How to prove $a^3 + b^3 +c^3 - 3abc =1 $, If a,b,c are infinite series as given in the description box below? How do I prove that $$ a^3+b^3+c^3−3abc = 1 $$ if   $ a = 1+\frac{x^3}{3!}+\frac{x^6}{6!}......$ , $b=x+\frac{x^4}{4!}+\frac{x^7}{7!}....$ , $c=\frac{x^2}{2!}+\frac{x^5}{5!}+\frac{x^8}{8!}......$ ?  I have tried the following :-  I discovered that $a+b+c=e^x$ and that $a=\frac{d(b)}{dx}$, $b=\frac{d(c)}{dx}$, $c=\frac{d(a)}{dx}$ . But I am unable to proceed further with these information. Export File Dialog in Blender 2.80 How can I get bring up a popup file browser in Blender 2.80 invoked by a button click in my addon, to define the name and location of a file to be exported?  In Blender 2.7x, I did this via the context window manager in the invoke function, but it is very possible that this hasn't been the preferred method for years, as I'm not finding useful documentation when I search for how to update this.  class MYTOOL_OT_write_data(bpy.types.Operator):     bl_idname = "mytool.write_data"     bl_label = "Write data file"      directory: bpy.props.StringProperty(subtype="FILE_PATH")     filename: bpy.props.StringProperty(subtype="FILE_NAME")      def invoke(self, context, event):  # 2.7x method         WindowManager = context.window_manager         context.window_manager.FILEBROWSERect_add(self)  # &lt;-- error here         return{"RUNNING_MODAL"}      def execute(self, context):         directory = self.directory         filename = self.filename         # Write csv data file using normal python functionality         return{'FINISHED'}   In Blender 2.80, I am getting the error "AttributeError: 'WindowManager' object has no attribute 'FILEBROWSERect_add'".  Thanks for your help.    UPDATED SOLUTION based on brockmann's solution below.  The trick is to use the ExportHelper util (which existed long before Blender 2.80):  from bpy_extras.io_utils import ExportHelper  class MYTOOL_OT_write_data(bpy.types.Operator, ExportHelper):     bl_idname = "mytool.write_data"     bl_label = "Write data file"      filename_ext = ".csv"  # ExportHelper mixin class uses this     def execute(self, context):         filepath = self.filepath         # f = open(filepath, 'w')         # f.write(stuff)         # f.close()         return{'FINISHED'} do_shortcode() within Admin Page I'm using a few plugins that have shortcodes ... however, instead of creating a public page for the content, I've created some new pages within the admin using add_menu_page and I need to know how to utilize do_shortcode() within this context.  As it stands, all the function does it spit out the string. I'm assuming it's because the shortcode API isn't available within an admin page.  How do I get around this? There is no documentation that I can find that explains how to utilize shortcodes within the WP Admin... or if it's even possible.    Specifically I'm trying to utilize WooCommerce shortcodes within the WP Admin. I hate the fact that plugins don't utilize the WP Backend for account/user management. tl;dr  Due to the special nature of Meta and the high rate of "lost souls", should we try out the Ask a Question Wizard here on Meta Stack Exchange too?  General idea  In case anyone doesn't know yet, . It guides new users towards writing better questions.  I think that such a question wizard would be useful on Meta Stack Exchange too, for three main reasons:   . There are four types of questions on Meta, each represented by the different required tags: , ,  and . Especially bug reports can often be split into a certain structure (what's wrong, how to reproduce, why I think it's wrong, examples). The same holds true for feature requests. Such a structure is ideal for a question wizard. Quite a few users  and . While the Meta community is well prepared to deal with these posts quickly, they lead to an less-than-ideal first impression by the new users and they distract the community from more important issues. Site-specific questions are often off-topic. This  since nowhere is it hinted at in the help pages (and there are a lot of old, not-yet-closed SO-specific questions from a prior era of this site) and can lead to unnecessary drama. If we add an honeypot into the wizard to catch this case (and ideally redirect them to the proper meta site), we could prevent this.   As Sonic said, there's an  new users need to read and confirm. However this doesn't really prove effective right now and we might need to try stronger tools (e.g. question wizard).  Therefore I think that we should test the Ask Question Wizard here on Meta too.  Implementation details (help welcome)  I think the wizard should have six main entry points:   I want to discuss a specific post or action from any Stack Exchange site. (-> honeypot, redirects to the appropriate per-site meta) I have a question regarding the use of Stack Exchange sites (-> support mode) I think I found a bug while using the Stack Exchange sites  (-> bug mode) I have an idea for improving the Stack Exchange sites  (-> feature request mode) I have a discussion I want to start about Stack Exchange communities or their rules  (-> discussion mode) I have some other (e.g. programming) question  (-> honeypot, redirects to )   Coming from these choices, the user would either be redirected to a landing page explaining, why this is not the right community and offering some alternative choices or they would follow the guided assistant.  For 1. the user might be asked on which site the post/action is. Maybe the system could show the three sites where the user was recently active/has the highest reputation on.  support mode would ask the user for these details:   what do you want to achieve? what have you tried? what is your current problem?   bug mode would ask the user for these details:   bug description how to reproduce the problem why do you think that this is wrong? (possibly) examples   feature request mode would ask the user for these details:   what is your goal? how do you think could this be achieved? why will the community benefit from this change? (possibly) details   discussion mode would ask the user for these details:   which rule do you want to propose/clarify (optionally) examples/why is this rule required?   Note: the above implementation details probably require some revision. Feel free to edit/suggest improvements for both wording and details.