-- DBMS: bigquery
CREATE TABLE `bigquery-public-data.stackoverflow.posts_questions`
(
  id INT64,
  title STRING,
  body STRING,
  accepted_answer_id INT64,
  answer_count INT64,
  comment_count INT64,
  community_owned_date TIMESTAMP,
  creation_date TIMESTAMP,
  favorite_count INT64,
  last_activity_date TIMESTAMP,
  last_edit_date TIMESTAMP,
  last_editor_display_name STRING,
  last_editor_user_id INT64,
  owner_display_name STRING,
  owner_user_id INT64,
  parent_id STRING,
  post_type_id INT64,
  score INT64,
  tags STRING,
  view_count INT64
);

INSERT INTO `bigquery-public-data.stackoverflow.posts_questions` (id, title, body, accepted_answer_id, answer_count, comment_count, community_owned_date, creation_date, favorite_count, last_activity_date, last_edit_date, last_editor_display_name, last_editor_user_id, owner_display_name, owner_user_id, parent_id, post_type_id, score, tags, view_count) VALUES (24449808, 'Node.js Abort chain in Q in different point', '<p>I have a pretty long chain of check in Q, and I would to interrupt it when an error rise:</p>

<p>I have looked to <a href="https://stackoverflow.com/questions/21821936/how-to-abort-a-failing-q-promise-in-node-js">How to abort a failing Q promise in Node.JS</a> and other answers on SO, but it seems impossible to me, that can''t exist nothing else.</p>

<p>Example
`</p>

<pre><code>Q().then(function(){
    return Q.ninvoke(myObject, ''save'');
}).fail(functon(err){ // if error
    res.status(400).send(err.message);// like duplicate key
}).then(function(){
    add object another object to db referenced to myObject
}).fail(functon(err){ // if error
    res.status(400).send(err.message);// like connection error
}).then(function(){
    do somethinng else
}).done()
</code></pre>

<p>`</p>

<p>Obviously, if it can''t save the first object, I would not go on through other steps, but I would exit without throwing error and blocking the execution of the server without sending the message to the client.</p>

<p>I tried to add two function to done(OK, REJECTED), but only OK() is called.
I would like to avoid chunking the code in 3 different functions if possible.</p>', NULL, 1, 0, 'NaT', '2014-06-27 10:38:02.797000+00:00', NULL, '2014-06-28 11:07:32.630000+00:00', '2017-05-23 12:05:43.480000+00:00', NULL, -1, NULL, 627307, NULL, 1, 0, 'javascript|node.js|promise|q', 256), (24469876, 'Theos iPhone Shell Command App', '<p>I''m using theos to make a app for iOS that installs theos for those that don''t know how.</p>

<p>Here is my code:</p>

<pre><code>#import "RootViewController.h"
#import &lt;UIKit/UIKit.h&gt;

@implementation RootViewController
- (void)loadView {
    self.view = [[[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease];
    self.view.backgroundColor = [UIColor blueColor];

    UIButton *installButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    installButton.frame = CGRectMake(21, 80, 100, 35);
    [installButton setTitle:@"Install Theos" forState:UIControlStateNormal];
    [self.view addSubview.installButton];
    [installButton addTarget:self action:@Selector(installButtonPressed) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:installButton];
}

-(void)installButtonPressed
{
system("apt-get update");
system("apt-get install perl net.howett.theos");
}
@end
</code></pre>

<p>I keep getting this error when I go to make the package:</p>

<pre><code>******-macbook:theosinstaller D3Ath$ make package
/Users/D3Ath/theosinstaller/theos/makefiles/targets/Darwin/iphone.mk:41: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.
Making all for application TheosInstaller...
 Copying resource directories into the application wrapper...
 Compiling RootViewController.mm...
RootViewController.mm:12:26: error: expected '']''
    [self.view addSubview.installButton];
                         ^
RootViewController.mm:13:42: error: unexpected ''@'' in program
    [installButton addTarget:self action:@Selector(installButtonPressed...
                                         ^
2 errors generated.
make[2]: *** [obj/RootViewController.mm.756d20f8.o] Error 1
make[1]: *** [internal-application-all_] Error 2
make: *** [TheosInstaller.all.application.variables] Error 2
</code></pre>

<p>Can anyone help me fix it?</p>', 24470114, 1, 0, 'NaT', '2014-06-28 18:46:16.423000+00:00', NULL, '2014-06-28 19:19:32.933000+00:00', 'NaT', NULL, NULL, NULL, 3152051, NULL, 1, 0, 'ios|iphone|shell|command|theos', 256), (24475530, 'as3 How can parent be null?', '<p>I am creating a tower defense game and upon the aoe tower destroying 2 monsters at the same time i get ''TypeError: Error #1009: Cannot access a property or method of a null object reference...at Document/loop()... at EnemyRed/removeSelf()''</p>

<p>I am using Event.ENTER_FRAME function in the document class to check if (monster hp &lt; 0), then call a function within the monster class to remove itself from its parent. (Code below).</p>

<p>The trace shows that it is trying to remove the same instance twice even though it should have been removed from the array already.</p>

<p>Document class:</p>

<pre><code>public function loop(event:Event):void
    {

        //If enemy hit points &lt; 0 remove self
        if(enemies.length &gt; 0)
        {
            for(var e = 0; e &lt; enemies.length; e++)
                {
                    if(enemies[e].hitPoints &lt;= 0)
                    {
                        enemies[e].removeSelf();
</code></pre>

<p>Monster class:</p>

<pre><code>public function removeSelf():void
    {
            trace(this.name);
            trace(this.parent);
            removeEventListener(Event.ENTER_FRAME, loop);
            parent.removeChild(this);
            Document.enemies.splice(this,1);
    }
</code></pre>

<p>trace returns:</p>

<pre><code>Monster:  instance2019
Parent:  [object Level1]
Monster:  instance2019
Parent:  null
</code></pre>', 24475637, 1, 0, 'NaT', '2014-06-29 11:11:37.293000+00:00', NULL, '2014-06-30 05:20:53.583000+00:00', 'NaT', NULL, NULL, NULL, 3602925, NULL, 1, 0, 'actionscript-3|parent-child', 256), (24483110, 'Cypher query via the REST endpoint : relationship not created', '<p>I''m using Neo4j 2.0.1 Community. I try to insert a relationship in the graph by sending the query through the REST endpoint.</p>

<p>My relationship query is very simple:</p>

<pre><code>    MATCH (t1:Test { name : ''TEST_1'' }), (t2:Test { name : ''TEST_2'' }) CREATE (t1)-[:REL_TEST]-&gt;(t2)
</code></pre>

<p>I call it this way in Powershell:</p>

<pre><code>    $postParams  = "{ `"query`" : `"MATCH (t1:Test { name : {test1} }), (t2:Test { name : {test2} }) CREATE (t1)-[:REL_TEST]-&gt;(t2)`",`"params`" : { `"test1`" : `"TEST_1`", `"test2`" : `"TEST_2`" } }"

    Invoke-WebRequest -Uri http://localhost:7474/db/data/cypher -Method POST -Body $postParams -Headers @{"Accept"="application/json; charset=UTF-8";"Content-Type"="application/json"}
</code></pre>

<p>And I got the following response:</p>

<pre><code>    StatusCode        : 200
    StatusDescription : OK
    Content           : {
                          "columns" : [ ],
                          "data" : [ ]
                        }
    RawContent        : HTTP/1.1 200 OK
                Access-Control-Allow-Origin: *
                Content-Length: 40
                Content-Type: application/json; charset=UTF-8
                Server: Jetty(9.0.z-SNAPSHOT)

                {
                  "columns" : [ ],
                  "data" : [ ]
                }
    Forms             : {}
    Headers           : {[Access-Control-Allow-Origin, *], [Content-Length, 40], [Content-Type, application/json; charset=UTF-8], [Server, Jetty(9.0.z-SNAPSHOT)]}
    Images            : {}
    InputFields       : {}
    Links             : {}
    ParsedHtml        : mshtml.HTMLDocumentClass
    RawContentLength  : 40
</code></pre>

<p>But the relationship is not created. If I then type the same query in the browser UI, it works.
I don''t get what I''m an doing wrong, especially since the query works in the browser and the REST calling procedure works for inserting a node for example.</p>', 24483377, 1, 0, 'NaT', '2014-06-30 04:52:49.250000+00:00', NULL, '2014-06-30 05:21:53.937000+00:00', 'NaT', NULL, NULL, NULL, 715936, NULL, 1, 0, 'rest|neo4j|cypher', 256), (24485544, 'Razor C# template HTML helper?', '<p>I am trying to pass some other vaules to input like this in Razor C#</p>

<pre><code> @(Html.PasswordFor(m =&gt; m.Password, new { @class = "t-input medium field-text", @id = ''password'' , @data=''required''}))
</code></pre>

<p>The problem is i got syntax error?</p>

<p>Any idea where  did i make a mistake?</p>', 24485573, 1, 0, 'NaT', '2014-06-30 08:08:36.980000+00:00', NULL, '2014-06-30 08:13:59.603000+00:00', 'NaT', NULL, NULL, NULL, 3165604, NULL, 1, 1, 'c#|razor', 256);