-- DBMS: snowflake
create or replace TABLE STACKOVERFLOW_POSTS (
	"id" NUMBER(38,0),
	"title" VARCHAR(16777216),
	"body" VARCHAR(16777216),
	"accepted_answer_id" NUMBER(38,0),
	"answer_count" NUMBER(38,0),
	"comment_count" NUMBER(38,0),
	"community_owned_date" NUMBER(38,0),
	"creation_date" NUMBER(38,0),
	"favorite_count" NUMBER(38,0),
	"last_activity_date" NUMBER(38,0),
	"last_edit_date" NUMBER(38,0),
	"last_editor_display_name" VARCHAR(16777216),
	"last_editor_user_id" NUMBER(38,0),
	"owner_display_name" VARCHAR(16777216),
	"owner_user_id" NUMBER(38,0),
	"parent_id" NUMBER(38,0),
	"post_type_id" NUMBER(38,0),
	"score" NUMBER(38,0),
	"tags" VARCHAR(16777216),
	"view_count" NUMBER(38,0)
);

INSERT INTO "STACKOVERFLOW"."STACKOVERFLOW"."STACKOVERFLOW_POSTS" (tags, score, last_editor_display_name, comment_count, last_edit_date, parent_id, favorite_count, creation_date, answer_count, owner_display_name, body, title, community_owned_date, id, last_activity_date, last_editor_user_id, owner_user_id, post_type_id, view_count, accepted_answer_id) VALUES ('', 3, NULL, 6, 1345489443110000.0, 12043365, NULL, 1345488922380000, NULL, NULL, '<pre><code>lis = [''fi'' ''do'' ''ca''] for item in lis: for name in glob.glob(''*.html''): if item in name: with open(name) as k: </code></pre> <p>or create a list of all files first and then filter that list with every iteration of <code>list</code>:</p> <pre><code>&gt;&gt;&gt; names=glob.glob(''*.html'') &gt;&gt;&gt; lis=[''fi''''do''''ca''] &gt;&gt;&gt; for item in lis: ... for name in filter(lambda x:item in xnames): ... with open(''name'') as k: </code></pre>', NULL, NULL, 12043418, 1345489443110000, 846892.0, 846892, 2, NULL, NULL), ('', 39, NULL, 6, 1458102533000000.0, 12165636, NULL, 1384075370847000, NULL, NULL, '<p>it''s possible using Django ORM:</p> <p>here''s what you should do:</p> <pre><code>from django.db.models import Sum total = ( Task.objects .filter(your-filter-here) .aggregate( total=Sum(''progress'' field= progress*estimated_days ) )[''total''] ) </code></pre> <p>Note: if the two fields are of different types say <code>integer</code> &amp; <code>float</code> the type you want to return should be passed as the first parameter of <code>Sum</code></p> <p>It''s a late answer but I guess it''ll help someone looking for the same.</p>', NULL, NULL, 19888120, 1458102533000000, 1673391.0, 1232826, 2, NULL, NULL), ('', 1, NULL, 6, nan, 11656868, NULL, 1343243633750000, NULL, NULL, '<p>Your code as-is works: <a href= http://jsfiddle.net/vWRAw/ rel= nofollow >http://jsfiddle.net/vWRAw/</a></p> <p>The json being returned from your temp-webserver however is JSON and not JSONP. If you want to request it as JSON remove the <code>?callback=?</code> however that would mean your temp webserver would need to be on the same domain as the page making the request.</p>', NULL, NULL, 11656918, 1343243633750000, nan, 400654, 2, NULL, NULL), ('', 5, NULL, 6, 1436303301943000.0, 3112550, NULL, 1277402054163000, NULL, NULL, '<p>Reference arguments were originally invented AFAIK for one thing: <strong>operator overloading semantics</strong>. For example operator[] just must return a reference.</p> <p>It was then a subject of great debate whether the ''concealed pointer'' should be used for anything else ever. </p> <p>Many development convention documents of many firms said never use references. If you need a pointer say so .</p> <p>However it was then discovered that references have one major advantage (no not the syntax sugar). It is this: a reference is guaranteed to be valid unless you work really hard to break it.</p> <p>Personally I still don''t understand why I cannot do this in C++:</p> <pre><code>int a1 a2; int &amp;b = a1; &amp;b = a2; // Error. address of referenced is not an lvalue. Why?! </code></pre>', NULL, NULL, 3112592, 1436303301943000, 63550.0, 73656, 2, NULL, NULL), ('', 14, NULL, 6, nan, 11273313, NULL, 1341051808937000, NULL, NULL, '<p><code>Ishoppingcart::addToCart()</code> states that the method does not take any parameter while the implementation <code>Shoppingcart::addToCart(Product $product)</code> requires that a parameter of type <code>Product</code> must be passed into the method. This means that both declarations are incompatible and while the implemented interface must be satisfied PHP throws the shown error.</p> <p>Solution would be to either change <code>Ishoppingcart::addToCart()</code> to <code>Ishoppingcart::addToCart(Product $product)</code> so that it requires a parameter of type <code>Product</code> or to change <code>Shoppingcart::addToCart(Product $product)</code> to allow no parameter to passed into the method: <code>Shoppingcart::addToCart(Product $product = null)</code>;</p> <p>The correct way depends on your application requirements.</p>', NULL, NULL, 11273340, 1341051808937000, nan, 11354, 2, NULL, NULL);